Example #1
0
        public Event CreateEvent(XmlElement element)
        {
            XmlAttributeCollection attrs = element.Attributes;

            EventInformation info = new EventInformation();
            info.Id = Convert.ToUInt32(attrs["id"].Value);
            info.Type = (EventType)Enum.Parse(typeof(EventType), attrs["type"].Value);
            info.Timestamp = DateTime.FromFileTimeUtc(Convert.ToInt64(attrs["timestamp"].Value));
            info.ProcessName = attrs["processName"].Value;
            info.ProcessId = Convert.ToUInt32(attrs["processId"].Value);
            info.ThreadId = Convert.ToUInt32(attrs["threadId"].Value);
            info.RawData = element.OuterXml;

            return CreateEvent(info);
        }
Example #2
0
        public Event CreateEvent(XmlElement element)
        {
            XmlAttributeCollection attrs = element.Attributes;

            EventInformation info = new EventInformation();

            info.Id          = Convert.ToUInt32(attrs["id"].Value);
            info.Type        = (EventType)Enum.Parse(typeof(EventType), attrs["type"].Value);
            info.Timestamp   = DateTime.FromFileTimeUtc(Convert.ToInt64(attrs["timestamp"].Value));
            info.ProcessName = attrs["processName"].Value;
            info.ProcessId   = Convert.ToUInt32(attrs["processId"].Value);
            info.ThreadId    = Convert.ToUInt32(attrs["threadId"].Value);
            info.RawData     = element.OuterXml;

            return(CreateEvent(info));
        }
Example #3
0
        public Event CreateEvent(EventInformation eventInfo)
        {
            ISpecificEventFactory specificFactory = null;
            XmlElement eventData = null;

            if (eventInfo.Type == EventType.FunctionCall)
            {
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(eventInfo.RawData);
                eventData = doc.DocumentElement;

                string fullFunctionName = eventData.SelectSingleNode("/event/name").InnerText.Trim();
                string functionName = fullFunctionName.Split(new string[] { "::" }, StringSplitOptions.None)[1];
                m_funcCallFactories.TryGetValue(functionName, out specificFactory);
            }

            if (specificFactory != null)
                return specificFactory.CreateEvent(eventInfo, eventData);
            else
                return new Event(eventInfo);
        }
Example #4
0
 public Event(EventInformation eventInformation)
 {
     m_info = eventInformation;
 }
Example #5
0
 public Event(EventInformation eventInformation)
 {
     m_info = eventInformation;
 }