Exemplo n.º 1
0
        public string FormatEvent(EventRecord eventRecord, out string eventType, out string eventText, int formatVersion = 0)
        {
            eventType = null;
            eventText = null;
            string s = null;

            // Check if this is a special event from EventSource which contains manifest
            if (ProcessEventSourceEvent(eventRecord))
            {
                // Stop further processing for this event, we don't want it to be displayed as well so return null
                return(null);
            }

            if (ManifestCache.IsStringEvent(eventRecord))
            {
                s = EventFormatter.FormatStringEvent(formatVersion, eventRecord, out eventType, out eventText);
            }

            if (s == null)
            {
                ProviderDefinition providerDef;
                if (this.providers.TryGetValue(eventRecord.EventHeader.ProviderId, out providerDef))
                {
                    s = providerDef.FormatEvent(eventRecord, out eventType, out eventText, formatVersion);
                }
            }

            return(s);
        }
Exemplo n.º 2
0
        public TraceFileParser(ManifestCache cache, Action <string> traceDispatcher)
        {
            if (cache == null)
            {
                throw new ArgumentNullException("cache");
            }

            if (traceDispatcher == null)
            {
                throw new ArgumentNullException("traceDispatcher");
            }

            this.cache           = cache;
            this.traceDispatcher = traceDispatcher;
        }
Exemplo n.º 3
0
 public void SetEtwManifestCache(Tools.EtlReader.ManifestCache manifestCache)
 {
     this.manifestCache = manifestCache;
 }