locked
Trace source extraAttribute RRS feed

  • Question

  • I am extending framework TraceSource class with my own, that supports two additional attributes:

    public class TraceSource2 : TraceSource  
    {  
        TraceSource2(String name)  
            : base(name)  
        {  
        }  
        protected override string[] GetSupportedAttributes()  
        {  
            return new String[] { "attr1""attr2" };  
        }  
    }  
     

    How do I confgure it in configuration file?
    Friday, July 18, 2008 3:24 PM

Answers

  • The sample does not have what I need, but here is the answer:
    <source name="MySource" 
            attr1="attr1_value" 
            attr2="attr2_value">  
    </source> 
     
    • Marked as answer by Alex Ivanoff Sunday, July 20, 2008 4:17 PM
    Sunday, July 20, 2008 4:17 PM

All replies