Example #1
0
        static DebugTests()
        {
            FieldInfo fieldInfo = typeof(Debug).GetField("s_provider", BindingFlags.Static | BindingFlags.NonPublic);

            _debugOnlyProvider = (DebugProvider)fieldInfo.GetValue(null);
            // Triggers code to wire up TraceListeners with Debug
            Assert.Equal(1, Trace.Listeners.Count);
            _debugTraceProvider = (DebugProvider)fieldInfo.GetValue(null);
            Assert.NotEqual(_debugOnlyProvider.GetType(), _debugTraceProvider.GetType());
        }
Example #2
0
 public static void Write(string?s) => DebugProvider.WriteCore(s);
Example #3
0
 public static void Write(string?s) => DebugProvider.WriteCore(s ?? string.Empty);