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); }
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)); }
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); }
public Event(EventInformation eventInformation) { m_info = eventInformation; }
public Event(EventInformation eventInformation) { m_info = eventInformation; }