Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Base class question

Status
Not open for further replies.

ralphtrent

Programmer
Jun 2, 2003
958
US
Hello
I have the following code
Code:
public class LoggedEvent : Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry
    {
    
    }

this code is exposed over a WCF.

Code:
public void LogEvent(LoggedEvent loggedEvent)
        {
            el.LogWriter elw = EnterpriseLibraryContainer.Current.GetInstance<el.LogWriter>();
            try
            {
                elw.Write(loggedEvent);
            }
            catch
            {
                throw;
            }
}

when I refer to this service in another project I do not see the Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry properties like Message, Title...
instead I am seeing message, title (notice the case difference) and I get a ton more properties then what is exposed in Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry. I only get to see the properties i expect to see when I include a reference to Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry in my calling project.

Is that an expected behavoir since I am not providing any properties in my derived class?

meaning should my first code block look like this:

Code:
public class LoggedEvent : Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry
    {
        new string Message { get { return base.Message; } set { base.Message = value; } }
        new string Title { get { return base.Title ; } set { base.Title = value; } }    
    }

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top