Ejemplo n.º 1
0
        ///// <summary>
        ///// Create a default logger factory to be used to capture log messages and scopes in a test sink.
        ///// </summary>
        ///// <param name="configure">A delegate used to configure the <see cref="TestLoggerOptions"/>.</param>
        ///// <returns>The test logger factory.</returns>
        //public static ITestLoggerFactory CreateTestLoggerFactory()
        //{
        //    return new TestLoggerFactory(new TestSink());
        //}

        internal static TestLoggerOptions CreateOptions(Action <TestLoggerOptions> configure)
        {
            var options = new TestLoggerOptions();

            configure(options);
            return(options);
        }
Ejemplo n.º 2
0
#pragma warning disable CS0612 // Type or member is obsolete
        internal static ITestSink CreateTestSink(TestLoggerOptions options) => new TestSink(options.WriteEnabled, options.BeginEnabled);