Пример #1
0
        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();
            }
        }
Пример #2
0
        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();
            }
        }
Пример #3
0
		public void Add(IEventDetailFactory factory)
		{
			if ( _factories == null )
				_factories = new SortedList<string, IEventDetailFactory>();
			_factories[factory.Name] = factory;
		}