示例#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());
        }
示例#2
0
 public static void Write(string?s) => DebugProvider.WriteCore(s);
示例#3
0
 public static void Write(string?s) => DebugProvider.WriteCore(s ?? string.Empty);