Esempio n. 1
0
 private static void List()
 {
     if ((options.List & ListFlags.CLR) != 0)
     {
         Console.WriteLine("\nSupported CLR keywords (use with --clr):\n");
         foreach (var keyword in Enum.GetNames(typeof(ClrTraceEventParser.Keywords)))
         {
             Console.WriteLine($"\t{keyword}");
         }
     }
     if ((options.List & ListFlags.Kernel) != 0)
     {
         Console.WriteLine("\nSupported kernel keywords (use with --kernel):\n");
         foreach (var keyword in Enum.GetNames(typeof(KernelTraceEventParser.Keywords)))
         {
             Console.WriteLine($"\t{keyword}");
         }
     }
     if ((options.List & ListFlags.Registered) != 0)
     {
         Console.WriteLine("\nRegistered or enabled providers (use with --other):\n");
         foreach (var provider in
                  TraceEventProviders.GetRegisteredOrEnabledProviders()
                  .Select(guid => TraceEventProviders.GetProviderName(guid))
                  .OrderBy(n => n))
         {
             Console.WriteLine($"\t{provider}");
         }
     }
     if ((options.List & ListFlags.Published) != 0)
     {
         Console.WriteLine("\nPublished providers (use with --other):\n");
         foreach (var provider in
                  TraceEventProviders.GetPublishedProviders()
                  .Select(guid => TraceEventProviders.GetProviderName(guid))
                  .OrderBy(n => n))
         {
             Console.WriteLine($"\t{provider}");
         }
     }
     if ((options.List & ListFlags.Framework) != 0)
     {
         Console.WriteLine("\nPublished providers (use with --framework):\n");
         foreach (var keyword in Enum.GetNames(typeof(FrameworkEventSourceTraceEventParser.Keywords)))
         {
             Console.WriteLine($"\t{keyword}");
         }
     }
 }