示例#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
文件: Details.cs 项目: formist/LinkMe
		public void Add(IEventDetailFactory factory)
		{
			if ( _factories == null )
				_factories = new SortedList<string, IEventDetailFactory>();
			_factories[factory.Name] = factory;
		}