Captin.ConsoleIntercept 1.0.0

Tool to allow you to capture System.Console output of the current process but with selective scope instead of modifying the global singleton.

There is a newer version of this package available.
See the version list below for details.
Install-Package Captin.ConsoleIntercept -Version 1.0.0
dotnet add package Captin.ConsoleIntercept --version 1.0.0
<PackageReference Include="Captin.ConsoleIntercept" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Captin.ConsoleIntercept --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
            using Captin.ConsoleIntercept;

            Console.Write("only goes to real console");
            var writer = new StringWriter();
            using (ConsoleOut.BeginIntercept(writer))
            {
                Console.Write("This goes to the real console and will be in 'writer'");
            }
            Console.Write("only goes to real console");
            using Captin.ConsoleIntercept;

            Console.Write("only goes to real console");
            var writer = new StringWriter();
            using (ConsoleOut.BeginIntercept(writer))
            {
                Console.Write("This goes to the real console and will be in 'writer'");
            }
            Console.Write("only goes to real console");

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.0 72 2/18/2020
1.0.0 135 2/17/2020