mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-20 05:48:14 +08:00
Use file scoped namespace declarations
This commit is contained in:

committed by
Phil Scott

parent
1dbaf50935
commit
ec1188b837
@ -1,31 +1,30 @@
|
||||
using System.IO;
|
||||
|
||||
namespace Spectre.Console
|
||||
{
|
||||
internal static class TextWriterExtensions
|
||||
{
|
||||
public static bool IsStandardOut(this TextWriter writer)
|
||||
{
|
||||
try
|
||||
{
|
||||
return writer == System.Console.Out;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
namespace Spectre.Console;
|
||||
|
||||
public static bool IsStandardError(this TextWriter writer)
|
||||
internal static class TextWriterExtensions
|
||||
{
|
||||
public static bool IsStandardOut(this TextWriter writer)
|
||||
{
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
return writer == System.Console.Error;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return writer == System.Console.Out;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsStandardError(this TextWriter writer)
|
||||
{
|
||||
try
|
||||
{
|
||||
return writer == System.Console.Error;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user