internal static EventSourceArgumentElement Read(XElement element) { var instance = new EventSourceArgumentElement { Key = (string)element.Attribute(KeyAttributeKey), Value = (string)element.Attribute(ValueAttributeKey), }; return(instance); }
internal static EventSourceArgumentElement Read(XElement element) { var instance = new EventSourceArgumentElement { Key = (string)element.Attribute(KeyAttributeKey), Value = (string)element.Attribute(ValueAttributeKey), }; return instance; }
internal static EventSourceElement Read(XElement element) { var instance = new EventSourceElement { Name = (string)element.Attribute(NameAttributeKey), EventId = (Guid?)element.Attribute(EventIdAttributeKey) ?? Guid.Empty, Level = (EventLevel)Enum.Parse(typeof(EventLevel), (string)element.Attribute(LevelAttributeKey) ?? default(EventLevel).ToString()), MatchAnyKeyword = (EventKeywords)long.Parse((string)element.Attribute(MatchAnyKeywordAttributeKey) ?? ((long)default(EventKeywords)).ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture), Arguments = element.Elements(ArgumentsElementName).Elements().Select(e => EventSourceArgumentElement.Read(e)).ToArray(), ProcessNameFilters = element.Elements(FilterElementName).Elements().Select(e => EventSourceProcessFilterElement.Read(e)).ToArray() }; return(instance); }