Esempio n. 1
0
        internal EventManifest ParseManifest(EtwNativeEvent etwNativeEvent)
        {
            EventManifest result = null;

            if (etwNativeEvent.ProviderId == this.etwProviderId)
            {
                switch (etwNativeEvent.Id)
                {
                case 3:
                    result = ParseRegularManifest(etwNativeEvent);
                    break;

                case 4:
                    result = this.ParseChunkedManifest(etwNativeEvent);
                    break;
                }
            }

            return(result);
        }
Esempio n. 2
0
        private string GetTypeNameFromManifest(EventManifest manifest)
        {
            var line = manifest.Manifest.Split('\n').LastOrDefault(l => l.Trim().StartsWith(@"struct ", StringComparison.OrdinalIgnoreCase));

            string className = string.Empty;
            if (line != null)
            {
                className = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[1].Trim();
            }

            return className;
        }