コード例 #1
0
            private static void WriteScopeInformation(TextWriter textWriter, IExternalScopeProvider scopeProvider)
            {
                if (scopeProvider != null)
                {
                    Action <object, TextWriter> callback = (scope, state) =>
                    {
                        state.Write(" => ");
                        state.Write(scope);
                    };

                    // Logs injection emulation
                    LoggerIntegrationCommon.AddScope(Tracer.Instance, callback, textWriter);
                    scopeProvider.ForEachScope(callback, textWriter);
                }
            }
コード例 #2
0
 public TestLogger(IExternalScopeProvider scopeProvider, string category)
 {
     _scopeProvider = scopeProvider;
     _category      = category;
 }
コード例 #3
0
 public void SetScopeProvider(IExternalScopeProvider scopeProvider)
 {
     _scopeProvider = scopeProvider;
 }