James Steele

All things dotNet running through my veins

System.Diagnostics.EventLogTraceListener Not Inerhitable! Why?

I was starting to design a listener framework for an ASP.NET application.  I had a look at the three out of the box listener implementations provided by the .NET Framework.

EventLogTraceListener
TextWriterTraceListener
DefaultTraceListener

I decided I wanted to extend the EventLogTraceListener interface and add a few of my own interface methods and properties. At that point I made the decision I was going to use this class as a base class and derive my own sub class from it. To my surprise the EventLogTraceListener is marked as Not Inherhitable!

The TextWriterTraceListener and DefaultTraceListener are Inheritable? What gives with the EventLogTraceListener? Why can it not be used as a base class?

Comments

Drew Marsh said:

Why not create a custom TraceListener that contains an EventLogTraceListener and delegates to it after you've done whatever specific pre-processing work you need to do?
# March 18, 2004 11:38 AM

James Steele said:

Yes Drew, that is one of the options I am considering.
# March 18, 2004 1:33 PM

joomla extension said:

I’ve been reading your blog all along, I simply don’t have the words. I just wanted you to know that I’m fond of your blog so much.

# November 17, 2011 5:33 AM

Matthews said:

Hey there! First-rate post! Please when all could see a follow up!

# January 7, 2013 12:20 AM

Ibarra said:

I’m curious to uncover out what blog platform you’re working with?

I’m having some minor security issues with my latest

website and I’d just like to discover something more safe.

Do you have any recommendations?

# January 7, 2013 7:25 AM

Shafer said:

You actually make it seem actually easy with your presentation but I in finding this matter to be really one thing that I think

I’d by no tactic understand. It kind of feels too complex and very huge for

me. I am searching ahead for the subsequent submit,

I¡¦ll try to look for the hang of it!

rentacarkosovo

# January 25, 2013 10:49 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)