private void ReadDetails(XmlReadAdaptor adaptor) { m_details = new EventDetails(); if (adaptor.ReadElement(Constants.Xml.Exception.DetailsElement)) { while (adaptor.ReadElement()) { string name = adaptor.Name; IEventDetailFactory factory = m_eventDetailFactories[name]; IEventDetail detail = factory.CreateInstance(); ((IXmlSerializable)detail).ReadXml(adaptor.XmlReader); m_details.Add(detail); adaptor.ReadEndElement(); } adaptor.ReadEndElement(); } }
private void ReadDetails(XmlReadAdaptor adaptor) { _details = new EventDetails(); if (adaptor.ReadElement(Constants.Xml.DetailsElement)) { while (adaptor.ReadElement()) { string name = adaptor.Name; IEventDetailFactory factory = InstrumentationManager.GetEventDetailFactory(name); if (factory != null) { IEventDetail detail = factory.CreateInstance(); ((IXmlSerializable)detail).ReadXml(adaptor.XmlReader); _details.Add(detail); } adaptor.ReadEndElement(); } adaptor.ReadEndElement(); } }
public void Add(IEventDetailFactory factory) { if ( _factories == null ) _factories = new SortedList<string, IEventDetailFactory>(); _factories[factory.Name] = factory; }