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); } }
public TestLogger(IExternalScopeProvider scopeProvider, string category) { _scopeProvider = scopeProvider; _category = category; }
public void SetScopeProvider(IExternalScopeProvider scopeProvider) { _scopeProvider = scopeProvider; }