private static DiagnosticsHeader CreateDefault()
        {
            var sdkAssembly = Assembly.GetExecutingAssembly();
            var sdkAssemblyName = sdkAssembly.GetName();

            var header = new DiagnosticsHeader(sdkAssemblyName);

            header.Dependencies = sdkAssembly.GetReferencedAssemblies()
                    .Where(a => a.Name != "mscorlib" && a.Name != "System" && !a.Name.StartsWith("System."))
                    .Select(a => new DiagnosticsComponent(a));

            header.Environments = new[] 
                {
                    new DiagnosticsComponent(".NET CLR", System.Environment.Version),
                    new DiagnosticsComponent("OS", System.Environment.OSVersion)
                };

            return header;
        }
 /// <summary>
 /// Resets the <see cref="Default"/> and <see cref="Suppress"/> instances.
 /// </summary>
 public static void Reset()
 {
     _default = null;
     _suppress = null;
 }
Example #3
0
 /// <summary>
 /// Resets the <see cref="Default"/> and <see cref="Suppress"/> instances.
 /// </summary>
 public static void Reset()
 {
     _default  = null;
     _suppress = null;
 }