mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 08:52:50 +08:00
Use file scoped namespace declarations
This commit is contained in:
parent
1dbaf50935
commit
ec1188b837
@ -30,6 +30,9 @@ trim_trailing_whitespace = false
|
|||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
|
|
||||||
[*.cs]
|
[*.cs]
|
||||||
|
# Prefer file scoped namespace declarations
|
||||||
|
csharp_style_namespace_declarations = file_scoped:warning
|
||||||
|
|
||||||
# Sort using and Import directives with System.* appearing first
|
# Sort using and Import directives with System.* appearing first
|
||||||
dotnet_sort_system_directives_first = true
|
dotnet_sort_system_directives_first = true
|
||||||
dotnet_separate_import_directive_groups = false
|
dotnet_separate_import_directive_groups = false
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static partial class Program
|
public static partial class Program
|
||||||
{
|
{
|
||||||
public sealed class BarSettings : CommandSettings
|
public sealed class BarSettings : CommandSettings
|
||||||
@ -13,4 +13,3 @@ namespace Spectre.Console.Examples
|
|||||||
public int Count { get; set; }
|
public int Count { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static partial class Program
|
public static partial class Program
|
||||||
{
|
{
|
||||||
public static int Main(string[] args)
|
public static int Main(string[] args)
|
||||||
@ -35,4 +35,3 @@ namespace Spectre.Console.Examples
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System.ComponentModel;
|
|||||||
using Demo.Utilities;
|
using Demo.Utilities;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Demo.Commands
|
namespace Demo.Commands;
|
||||||
{
|
|
||||||
[Description("Add a NuGet package reference to the project.")]
|
[Description("Add a NuGet package reference to the project.")]
|
||||||
public sealed class AddPackageCommand : Command<AddPackageCommand.Settings>
|
public sealed class AddPackageCommand : Command<AddPackageCommand.Settings>
|
||||||
{
|
{
|
||||||
@ -44,4 +44,3 @@ namespace Demo.Commands
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System.ComponentModel;
|
|||||||
using Demo.Utilities;
|
using Demo.Utilities;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Demo.Commands
|
namespace Demo.Commands;
|
||||||
{
|
|
||||||
public sealed class AddReferenceCommand : Command<AddReferenceCommand.Settings>
|
public sealed class AddReferenceCommand : Command<AddReferenceCommand.Settings>
|
||||||
{
|
{
|
||||||
public sealed class Settings : AddSettings
|
public sealed class Settings : AddSettings
|
||||||
@ -27,4 +27,3 @@ namespace Demo.Commands
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Demo.Commands
|
namespace Demo.Commands;
|
||||||
{
|
|
||||||
public abstract class AddSettings : CommandSettings
|
public abstract class AddSettings : CommandSettings
|
||||||
{
|
{
|
||||||
[CommandArgument(0, "<PROJECT>")]
|
[CommandArgument(0, "<PROJECT>")]
|
||||||
[Description("The project file to operate on. If a file is not specified, the command will search the current directory for one.")]
|
[Description("The project file to operate on. If a file is not specified, the command will search the current directory for one.")]
|
||||||
public string Project { get; set; }
|
public string Project { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System.ComponentModel;
|
|||||||
using Demo.Utilities;
|
using Demo.Utilities;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Demo.Commands
|
namespace Demo.Commands;
|
||||||
{
|
|
||||||
[Description("Build and run a .NET project output.")]
|
[Description("Build and run a .NET project output.")]
|
||||||
public sealed class RunCommand : Command<RunCommand.Settings>
|
public sealed class RunCommand : Command<RunCommand.Settings>
|
||||||
{
|
{
|
||||||
@ -67,4 +67,3 @@ namespace Demo.Commands
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -3,8 +3,8 @@ using System.ComponentModel;
|
|||||||
using Demo.Utilities;
|
using Demo.Utilities;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Demo.Commands
|
namespace Demo.Commands;
|
||||||
{
|
|
||||||
[Description("Launches a web server in the current working directory and serves all files in it.")]
|
[Description("Launches a web server in the current working directory and serves all files in it.")]
|
||||||
public sealed class ServeCommand : Command<ServeCommand.Settings>
|
public sealed class ServeCommand : Command<ServeCommand.Settings>
|
||||||
{
|
{
|
||||||
@ -38,4 +38,3 @@ namespace Demo.Commands
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Demo.Commands;
|
using Demo.Commands;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Demo
|
namespace Demo;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static int Main(string[] args)
|
public static int Main(string[] args)
|
||||||
@ -34,4 +34,3 @@ namespace Demo
|
|||||||
return app.Run(args);
|
return app.Run(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Demo.Utilities
|
namespace Demo.Utilities;
|
||||||
{
|
|
||||||
public static class SettingsDumper
|
public static class SettingsDumper
|
||||||
{
|
{
|
||||||
public static void Dump(CommandSettings settings)
|
public static void Dump(CommandSettings settings)
|
||||||
@ -26,4 +26,3 @@ namespace Demo.Utilities
|
|||||||
AnsiConsole.Write(table);
|
AnsiConsole.Write(table);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -3,8 +3,8 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Demo
|
namespace Demo;
|
||||||
{
|
|
||||||
public enum Verbosity
|
public enum Verbosity
|
||||||
{
|
{
|
||||||
Quiet,
|
Quiet,
|
||||||
@ -51,4 +51,3 @@ namespace Demo
|
|||||||
throw new NotSupportedException("Can't convert value to verbosity.");
|
throw new NotSupportedException("Can't convert value to verbosity.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public sealed class MyCommand : Command
|
public sealed class MyCommand : Command
|
||||||
{
|
{
|
||||||
public override int Execute(CommandContext context)
|
public override int Execute(CommandContext context)
|
||||||
@ -17,4 +17,3 @@ namespace Spectre.Console.Examples
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static int Main(string[] args)
|
public static int Main(string[] args)
|
||||||
@ -21,4 +21,3 @@ namespace Spectre.Console.Examples
|
|||||||
return app.Run(args);
|
return app.Run(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public sealed class DefaultCommand : Command<DefaultCommand.Settings>
|
public sealed class DefaultCommand : Command<DefaultCommand.Settings>
|
||||||
{
|
{
|
||||||
private readonly IGreeter _greeter;
|
private readonly IGreeter _greeter;
|
||||||
@ -27,4 +27,3 @@ namespace Spectre.Console.Examples
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public interface IGreeter
|
public interface IGreeter
|
||||||
{
|
{
|
||||||
void Greet(string name);
|
void Greet(string name);
|
||||||
@ -12,4 +12,3 @@ namespace Spectre.Console.Examples
|
|||||||
AnsiConsole.WriteLine($"Hello {name}!");
|
AnsiConsole.WriteLine($"Hello {name}!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public sealed class TypeRegistrar : ITypeRegistrar
|
public sealed class TypeRegistrar : ITypeRegistrar
|
||||||
{
|
{
|
||||||
private readonly IServiceCollection _builder;
|
private readonly IServiceCollection _builder;
|
||||||
@ -38,4 +38,3 @@ namespace Spectre.Console.Examples
|
|||||||
_builder.AddSingleton(service, (provider) => func());
|
_builder.AddSingleton(service, (provider) => func());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public sealed class TypeResolver : ITypeResolver, IDisposable
|
public sealed class TypeResolver : ITypeResolver, IDisposable
|
||||||
{
|
{
|
||||||
private readonly IServiceProvider _provider;
|
private readonly IServiceProvider _provider;
|
||||||
@ -31,4 +31,3 @@ namespace Spectre.Console.Examples
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
public static int Main(string[] args)
|
public static int Main(string[] args)
|
||||||
@ -19,4 +19,3 @@ namespace Spectre.Console.Examples
|
|||||||
return app.Run(args);
|
return app.Run(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public class HelloCommand : Command<HelloCommand.Settings>
|
public class HelloCommand : Command<HelloCommand.Settings>
|
||||||
{
|
{
|
||||||
private ILogger<HelloCommand> _logger;
|
private ILogger<HelloCommand> _logger;
|
||||||
@ -31,4 +31,3 @@ namespace Spectre.Console.Examples
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -5,8 +5,8 @@ using System.Globalization;
|
|||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public class LogCommandSettings : CommandSettings
|
public class LogCommandSettings : CommandSettings
|
||||||
{
|
{
|
||||||
[CommandOption("--logFile")]
|
[CommandOption("--logFile")]
|
||||||
@ -53,4 +53,3 @@ namespace Spectre.Console.Examples
|
|||||||
throw new NotSupportedException("Can't convert value to verbosity.");
|
throw new NotSupportedException("Can't convert value to verbosity.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,8 +1,8 @@
|
|||||||
using Serilog.Core;
|
using Serilog.Core;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public class LogInterceptor : ICommandInterceptor
|
public class LogInterceptor : ICommandInterceptor
|
||||||
{
|
{
|
||||||
public static readonly LoggingLevelSwitch LogLevel = new();
|
public static readonly LoggingLevelSwitch LogLevel = new();
|
||||||
@ -16,4 +16,3 @@ namespace Spectre.Console.Examples
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,8 +1,8 @@
|
|||||||
using Serilog.Core;
|
using Serilog.Core;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
internal class LoggingEnricher : ILogEventEnricher
|
internal class LoggingEnricher : ILogEventEnricher
|
||||||
{
|
{
|
||||||
private string _cachedLogFilePath;
|
private string _cachedLogFilePath;
|
||||||
@ -35,4 +35,3 @@ namespace Spectre.Console.Examples
|
|||||||
logEvent.AddPropertyIfAbsent(logFilePathProperty);
|
logEvent.AddPropertyIfAbsent(logFilePathProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public sealed class TypeRegistrar : ITypeRegistrar
|
public sealed class TypeRegistrar : ITypeRegistrar
|
||||||
{
|
{
|
||||||
private readonly IServiceCollection _builder;
|
private readonly IServiceCollection _builder;
|
||||||
@ -38,4 +38,3 @@ namespace Spectre.Console.Examples
|
|||||||
_builder.AddSingleton(service, _ => func());
|
_builder.AddSingleton(service, _ => func());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public sealed class TypeResolver : ITypeResolver
|
public sealed class TypeResolver : ITypeResolver
|
||||||
{
|
{
|
||||||
private readonly IServiceProvider _provider;
|
private readonly IServiceProvider _provider;
|
||||||
@ -18,4 +18,3 @@ namespace Spectre.Console.Examples
|
|||||||
return _provider.GetRequiredService(type);
|
return _provider.GetRequiredService(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -12,8 +12,8 @@ using Spectre.Console.Cli;
|
|||||||
* Spectre.Console CommandInterceptor
|
* Spectre.Console CommandInterceptor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
static int Main(string[] args)
|
static int Main(string[] args)
|
||||||
@ -50,4 +50,3 @@ namespace Spectre.Console.Examples
|
|||||||
return app.Run(args);
|
return app.Run(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -87,4 +87,3 @@ namespace Spectre.Console.Examples
|
|||||||
AnsiConsole.WriteLine();
|
AnsiConsole.WriteLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
@ -14,4 +14,3 @@ namespace Spectre.Console.Examples
|
|||||||
.AddCalendarEvent("A third event", 2020, 10, 13));
|
.AddCalendarEvent("A third event", 2020, 10, 13));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -5,8 +5,8 @@ Licensed under GNU Free Documentation License 1.2
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Mandelbrot
|
public static class Mandelbrot
|
||||||
{
|
{
|
||||||
private const double MaxValueExtent = 2.0;
|
private const double MaxValueExtent = 2.0;
|
||||||
@ -83,4 +83,3 @@ namespace Spectre.Console.Examples
|
|||||||
return new Color(0, 0, (byte)(MaxColor * Math.Pow(value, ContrastValue)));
|
return new Color(0, 0, (byte)(MaxColor * Math.Pow(value, ContrastValue)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -3,8 +3,8 @@ using System.Reflection;
|
|||||||
using SixLabors.ImageSharp.Processing;
|
using SixLabors.ImageSharp.Processing;
|
||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -44,4 +44,3 @@ namespace Spectre.Console.Examples
|
|||||||
AnsiConsole.Write(canvas);
|
AnsiConsole.Write(canvas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -38,4 +38,3 @@ namespace Spectre.Console.Examples
|
|||||||
.Header(title));
|
.Header(title));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -100,4 +100,3 @@ namespace Spectre.Console.Examples
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -27,4 +27,3 @@ namespace Spectre.Console.Examples
|
|||||||
return $"[b]{name}[/]\n[yellow]{city}[/]";
|
return $"[b]{name}[/]\n[yellow]{city}[/]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public sealed class User
|
public sealed class User
|
||||||
{
|
{
|
||||||
public string FirstName { get; set; }
|
public string FirstName { get; set; }
|
||||||
@ -86,4 +86,3 @@ namespace Spectre.Console.Examples
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
@ -15,4 +15,3 @@ namespace Spectre.Console.Examples
|
|||||||
AnsiConsole.WriteLine("Universe");
|
AnsiConsole.WriteLine("Universe");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
@ -19,4 +19,3 @@ namespace Spectre.Console.Examples
|
|||||||
.RoundedBorder());
|
.RoundedBorder());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Security.Authentication;
|
using System.Security.Authentication;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
@ -62,4 +62,3 @@ namespace Spectre.Console.Examples
|
|||||||
throw new InvalidCredentialException("The credentials are invalid.");
|
throw new InvalidCredentialException("The credentials are invalid.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
@ -9,4 +9,3 @@ namespace Spectre.Console.Examples
|
|||||||
AnsiConsole.Write(new FigletText("Right aligned").RightAligned().Color(Color.Blue));
|
AnsiConsole.Write(new FigletText("Right aligned").RightAligned().Color(Color.Blue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -19,4 +19,3 @@ namespace Spectre.Console.Examples
|
|||||||
AnsiConsole.Write(grid);
|
AnsiConsole.Write(grid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -29,4 +29,3 @@ namespace Spectre.Console.Examples
|
|||||||
return value ? "Yes" : "No";
|
return value ? "Yes" : "No";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -16,4 +16,3 @@ namespace Spectre.Console.Examples
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -78,4 +78,3 @@ namespace Spectre.Console.Examples
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
private const int NumberOfRows = 10;
|
private const int NumberOfRows = 10;
|
||||||
@ -83,4 +83,3 @@ namespace Spectre.Console.Examples
|
|||||||
return (source, dest, rate);
|
return (source, dest, rate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -10,4 +10,3 @@ Write(new Table()
|
|||||||
.AddColumns("[red]Greeting[/]", "[red]Subject[/]")
|
.AddColumns("[red]Greeting[/]", "[red]Subject[/]")
|
||||||
.AddRow("[yellow]Hello[/]", "World")
|
.AddRow("[yellow]Hello[/]", "World")
|
||||||
.AddRow("[green]Oh hi[/]", "[blue u]Mark[/]"));
|
.AddRow("[green]Oh hi[/]", "[blue u]Mark[/]"));
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -37,4 +37,3 @@ namespace Spectre.Console.Examples
|
|||||||
.HeaderAlignment(Justify.Right));
|
.HeaderAlignment(Justify.Right));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class DescriptionGenerator
|
public static class DescriptionGenerator
|
||||||
{
|
{
|
||||||
private static readonly string[] _verbs = new[] { "Downloading", "Rerouting", "Retriculating", "Collapsing", "Folding", "Solving", "Colliding", "Measuring" };
|
private static readonly string[] _verbs = new[] { "Downloading", "Rerouting", "Retriculating", "Collapsing", "Folding", "Solving", "Colliding", "Measuring" };
|
||||||
@ -42,4 +42,3 @@ namespace Spectre.Console.Examples
|
|||||||
+ " " + _nouns[_random.Next(0, _nouns.Length)];
|
+ " " + _nouns[_random.Next(0, _nouns.Length)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -86,4 +86,3 @@ namespace Spectre.Console.Examples
|
|||||||
"[grey]...[/]");
|
"[grey]...[/]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
@ -38,4 +38,3 @@ namespace Spectre.Console.Examples
|
|||||||
AnsiConsole.WriteLine();
|
AnsiConsole.WriteLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class ExceptionGenerator
|
public static class ExceptionGenerator
|
||||||
{
|
{
|
||||||
public static Exception GenerateException()
|
public static Exception GenerateException()
|
||||||
@ -27,4 +27,3 @@ namespace Spectre.Console.Examples
|
|||||||
throw new InvalidOperationException("Something went very wrong!");
|
throw new InvalidOperationException("Something went very wrong!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static partial class Program
|
public static partial class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -150,4 +150,3 @@ namespace Spectre.Console.Examples
|
|||||||
.AddItem("Bash", 5, Color.Blue);
|
.AddItem("Bash", 5, Color.Blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -66,4 +66,3 @@ namespace Spectre.Console.Examples
|
|||||||
AnsiConsole.MarkupLine($"[grey]LOG:[/] {message}[grey]...[/]");
|
AnsiConsole.MarkupLine($"[grey]LOG:[/] {message}[grey]...[/]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -42,4 +42,3 @@ namespace Spectre.Console.Examples
|
|||||||
.AddRow(new Markup("[blue]Hej[/]").Centered(), new Markup("[yellow]Världen![/]"), Text.Empty);
|
.AddRow(new Markup("[blue]Hej[/]").Centered(), new Markup("[yellow]Världen![/]"), Text.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -40,4 +40,3 @@ namespace Spectre.Console.Examples
|
|||||||
return tree;
|
return tree;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public sealed class ColorBox : Renderable
|
public sealed class ColorBox : Renderable
|
||||||
{
|
{
|
||||||
private readonly int _height;
|
private readonly int _height;
|
||||||
@ -121,4 +121,3 @@ namespace Spectre.Console.Examples
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Examples
|
namespace Spectre.Console.Examples;
|
||||||
{
|
|
||||||
public static class ColorExtensions
|
public static class ColorExtensions
|
||||||
{
|
{
|
||||||
public static Color GetInvertedColor(this Color color)
|
public static Color GetInvertedColor(this Color color)
|
||||||
@ -12,4 +12,3 @@ namespace Spectre.Console.Examples
|
|||||||
return (float)((0.2126 * color.R) + (0.7152 * color.G) + (0.0722 * color.B));
|
return (float)((0.2126 * color.R) + (0.7152 * color.G) + (0.0722 * color.B));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup Label="Settings">
|
<PropertyGroup Label="Settings">
|
||||||
<Deterministic>true</Deterministic>
|
<Deterministic>true</Deterministic>
|
||||||
<LangVersion>9.0</LangVersion>
|
<LangVersion>10</LangVersion>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>embedded</DebugType>
|
<DebugType>embedded</DebugType>
|
||||||
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
|
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Analyzer.Sandbox
|
namespace Spectre.Console.Analyzer.Sandbox;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sample sandbox for testing out analyzers.
|
/// Sample sandbox for testing out analyzers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -13,4 +13,3 @@ namespace Spectre.Console.Analyzer.Sandbox
|
|||||||
AnsiConsole.WriteLine("Project is set up with a reference to Spectre.Console.Analyzer");
|
AnsiConsole.WriteLine("Project is set up with a reference to Spectre.Console.Analyzer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -6,8 +6,8 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|||||||
using Microsoft.CodeAnalysis.Diagnostics;
|
using Microsoft.CodeAnalysis.Diagnostics;
|
||||||
using Microsoft.CodeAnalysis.Operations;
|
using Microsoft.CodeAnalysis.Operations;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer
|
namespace Spectre.Console.Analyzer;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Analyzer to suggest using available instances of AnsiConsole over the static methods.
|
/// Analyzer to suggest using available instances of AnsiConsole over the static methods.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -92,4 +92,3 @@ namespace Spectre.Console.Analyzer
|
|||||||
(!isStatic ^ i.Modifiers.Any(modifier => modifier.Kind() == SyntaxKind.StaticKeyword)));
|
(!isStatic ^ i.Modifiers.Any(modifier => modifier.Kind() == SyntaxKind.StaticKeyword)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -7,8 +7,8 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|||||||
using Microsoft.CodeAnalysis.Diagnostics;
|
using Microsoft.CodeAnalysis.Diagnostics;
|
||||||
using Microsoft.CodeAnalysis.Operations;
|
using Microsoft.CodeAnalysis.Operations;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer
|
namespace Spectre.Console.Analyzer;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Analyzer to detect calls to live renderables within a live renderable context.
|
/// Analyzer to detect calls to live renderables within a live renderable context.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -75,4 +75,3 @@ namespace Spectre.Console.Analyzer
|
|||||||
}, OperationKind.Invocation);
|
}, OperationKind.Invocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -7,8 +7,8 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|||||||
using Microsoft.CodeAnalysis.Diagnostics;
|
using Microsoft.CodeAnalysis.Diagnostics;
|
||||||
using Microsoft.CodeAnalysis.Operations;
|
using Microsoft.CodeAnalysis.Operations;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer
|
namespace Spectre.Console.Analyzer;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Analyzer to detect calls to live renderables within a live renderable context.
|
/// Analyzer to detect calls to live renderables within a live renderable context.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -81,4 +81,3 @@ namespace Spectre.Console.Analyzer
|
|||||||
}, OperationKind.Invocation);
|
}, OperationKind.Invocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
using Microsoft.CodeAnalysis.Diagnostics;
|
using Microsoft.CodeAnalysis.Diagnostics;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer
|
namespace Spectre.Console.Analyzer;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Base class for Spectre analyzers.
|
/// Base class for Spectre analyzers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -22,4 +22,3 @@ namespace Spectre.Console.Analyzer
|
|||||||
/// <param name="compilationStartContext">Compilation Start Analysis Context.</param>
|
/// <param name="compilationStartContext">Compilation Start Analysis Context.</param>
|
||||||
protected abstract void AnalyzeCompilation(CompilationStartAnalysisContext compilationStartContext);
|
protected abstract void AnalyzeCompilation(CompilationStartAnalysisContext compilationStartContext);
|
||||||
}
|
}
|
||||||
}
|
|
@ -4,8 +4,8 @@ using Microsoft.CodeAnalysis.CSharp;
|
|||||||
using Microsoft.CodeAnalysis.Diagnostics;
|
using Microsoft.CodeAnalysis.Diagnostics;
|
||||||
using Microsoft.CodeAnalysis.Operations;
|
using Microsoft.CodeAnalysis.Operations;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer
|
namespace Spectre.Console.Analyzer;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Analyzer to enforce the use of AnsiConsole over System.Console for known methods.
|
/// Analyzer to enforce the use of AnsiConsole over System.Console for known methods.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -60,4 +60,3 @@ namespace Spectre.Console.Analyzer
|
|||||||
}, OperationKind.Invocation);
|
}, OperationKind.Invocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Analyzer
|
namespace Spectre.Console.Analyzer;
|
||||||
{
|
|
||||||
internal static class Constants
|
internal static class Constants
|
||||||
{
|
{
|
||||||
internal const string StaticInstance = "AnsiConsole";
|
internal const string StaticInstance = "AnsiConsole";
|
||||||
@ -12,4 +12,3 @@ namespace Spectre.Console.Analyzer
|
|||||||
"Spectre.Console.Status",
|
"Spectre.Console.Status",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
@ -3,8 +3,8 @@ using Microsoft.CodeAnalysis;
|
|||||||
using static Microsoft.CodeAnalysis.DiagnosticSeverity;
|
using static Microsoft.CodeAnalysis.DiagnosticSeverity;
|
||||||
using static Spectre.Console.Analyzer.Descriptors.Category;
|
using static Spectre.Console.Analyzer.Descriptors.Category;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer
|
namespace Spectre.Console.Analyzer;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Code analysis descriptors.
|
/// Code analysis descriptors.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -76,4 +76,3 @@ namespace Spectre.Console.Analyzer
|
|||||||
Warning,
|
Warning,
|
||||||
"Avoid prompting for input while a current renderable is running.");
|
"Avoid prompting for input while a current renderable is running.");
|
||||||
}
|
}
|
||||||
}
|
|
@ -7,8 +7,8 @@ using Microsoft.CodeAnalysis.CSharp;
|
|||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
|
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer.CodeActions
|
namespace Spectre.Console.Analyzer.CodeActions;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Code action to change calls to System.Console to AnsiConsole.
|
/// Code action to change calls to System.Console to AnsiConsole.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -113,4 +113,3 @@ namespace Spectre.Console.Analyzer.CodeActions
|
|||||||
.Expression;
|
.Expression;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -6,8 +6,8 @@ using Microsoft.CodeAnalysis.CodeFixes;
|
|||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
using Spectre.Console.Analyzer.CodeActions;
|
using Spectre.Console.Analyzer.CodeActions;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer.FixProviders
|
namespace Spectre.Console.Analyzer.FixProviders;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fix provider to change System.Console calls to AnsiConsole calls.
|
/// Fix provider to change System.Console calls to AnsiConsole calls.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -32,4 +32,3 @@ namespace Spectre.Console.Analyzer.FixProviders
|
|||||||
context.Diagnostics);
|
context.Diagnostics);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -6,8 +6,8 @@ using Microsoft.CodeAnalysis.CodeFixes;
|
|||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
using Spectre.Console.Analyzer.CodeActions;
|
using Spectre.Console.Analyzer.CodeActions;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer.FixProviders
|
namespace Spectre.Console.Analyzer.FixProviders;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fix provider to change System.Console calls to AnsiConsole calls.
|
/// Fix provider to change System.Console calls to AnsiConsole calls.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -32,4 +32,3 @@ namespace Spectre.Console.Analyzer.FixProviders
|
|||||||
context.Diagnostics);
|
context.Diagnostics);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,10 +1,9 @@
|
|||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
|
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
|
||||||
|
|
||||||
namespace Spectre.Console.Analyzer
|
namespace Spectre.Console.Analyzer;
|
||||||
{
|
|
||||||
internal static class Syntax
|
internal static class Syntax
|
||||||
{
|
{
|
||||||
public static readonly UsingDirectiveSyntax SpectreUsing = UsingDirective(QualifiedName(IdentifierName("Spectre"), IdentifierName("Console")));
|
public static readonly UsingDirectiveSyntax SpectreUsing = UsingDirective(QualifiedName(IdentifierName("Spectre"), IdentifierName("Console")));
|
||||||
}
|
}
|
||||||
}
|
|
@ -6,8 +6,8 @@ using SixLabors.ImageSharp.Processing;
|
|||||||
using SixLabors.ImageSharp.Processing.Processors.Transforms;
|
using SixLabors.ImageSharp.Processing.Processors.Transforms;
|
||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a renderable image.
|
/// Represents a renderable image.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -141,4 +141,3 @@ namespace Spectre.Console
|
|||||||
return ((IRenderable)canvas).Render(context, maxWidth);
|
return ((IRenderable)canvas).Render(context, maxWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using SixLabors.ImageSharp.Processing;
|
using SixLabors.ImageSharp.Processing;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains extension methods for <see cref="CanvasImage"/>.
|
/// Contains extension methods for <see cref="CanvasImage"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -132,4 +132,3 @@ namespace Spectre.Console
|
|||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="ICommandInterceptor"/> that triggers a callback when invoked.
|
/// A <see cref="ICommandInterceptor"/> that triggers a callback when invoked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -25,4 +25,3 @@ namespace Spectre.Console.Testing
|
|||||||
_callback(context, settings);
|
_callback(context, settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a <see cref="CommandApp"/> runtime failure.
|
/// Represents a <see cref="CommandApp"/> runtime failure.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -26,4 +26,3 @@ namespace Spectre.Console.Testing
|
|||||||
.Trim();
|
.Trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the result of a completed <see cref="CommandApp"/> run.
|
/// Represents the result of a completed <see cref="CommandApp"/> run.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -40,4 +40,3 @@ namespace Spectre.Console.Testing
|
|||||||
.Trim();
|
.Trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="CommandApp"/> test harness.
|
/// A <see cref="CommandApp"/> test harness.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -132,4 +132,3 @@ namespace Spectre.Console.Testing
|
|||||||
return new CommandAppResult(result, output, context, settings);
|
return new CommandAppResult(result, output, context, settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is a utility class for implementors of
|
/// This is a utility class for implementors of
|
||||||
/// <see cref="ITypeRegistrar"/> and corresponding <see cref="ITypeResolver"/>.
|
/// <see cref="ITypeRegistrar"/> and corresponding <see cref="ITypeResolver"/>.
|
||||||
@ -188,4 +188,3 @@ namespace Spectre.Console.Testing
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains extensions for <see cref="string"/>.
|
/// Contains extensions for <see cref="string"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -44,4 +44,3 @@ namespace Spectre.Console.Testing
|
|||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains extensions for <see cref="Style"/>.
|
/// Contains extensions for <see cref="Style"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -22,4 +22,3 @@ namespace Spectre.Console.Testing
|
|||||||
return style.Background(color);
|
return style.Background(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
internal sealed class NoopCursor : IAnsiConsoleCursor
|
internal sealed class NoopCursor : IAnsiConsoleCursor
|
||||||
{
|
{
|
||||||
public void Move(CursorDirection direction, int steps)
|
public void Move(CursorDirection direction, int steps)
|
||||||
@ -14,4 +14,3 @@ namespace Spectre.Console.Testing
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
internal sealed class NoopExclusivityMode : IExclusivityMode
|
internal sealed class NoopExclusivityMode : IExclusivityMode
|
||||||
{
|
{
|
||||||
public T Run<T>(Func<T> func)
|
public T Run<T>(Func<T> func)
|
||||||
@ -15,4 +15,3 @@ namespace Spectre.Console.Testing
|
|||||||
return await func().ConfigureAwait(false);
|
return await func().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents fake capabilities useful in tests.
|
/// Represents fake capabilities useful in tests.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -37,4 +37,3 @@ namespace Spectre.Console.Testing
|
|||||||
return new RenderContext(this);
|
return new RenderContext(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -3,8 +3,8 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A testable console.
|
/// A testable console.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -119,4 +119,3 @@ namespace Spectre.Console.Testing
|
|||||||
_cursor = cursor;
|
_cursor = cursor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains extensions for <see cref="TestConsole"/>.
|
/// Contains extensions for <see cref="TestConsole"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -64,4 +64,3 @@ namespace Spectre.Console.Testing
|
|||||||
return console;
|
return console;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -3,8 +3,8 @@ using System.Collections.Generic;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Spectre.Console.Testing
|
namespace Spectre.Console.Testing;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a testable console input mechanism.
|
/// Represents a testable console input mechanism.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -89,4 +89,3 @@ namespace Spectre.Console.Testing
|
|||||||
return Task.FromResult(ReadKey(intercept));
|
return Task.FromResult(ReadKey(intercept));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -27,4 +27,3 @@ namespace Spectre.Console
|
|||||||
Console.WriteException(exception, settings);
|
Console.WriteException(exception, settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -17,4 +17,3 @@ namespace Spectre.Console
|
|||||||
return Console.Live(target);
|
return Console.Live(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -67,4 +67,3 @@ namespace Spectre.Console
|
|||||||
Console.MarkupLine(provider, format, args);
|
Console.MarkupLine(provider, format, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -23,4 +23,3 @@ namespace Spectre.Console
|
|||||||
return Console.Status();
|
return Console.Status();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -63,4 +63,3 @@ namespace Spectre.Console
|
|||||||
.Show(Console);
|
.Show(Console);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -67,4 +67,3 @@ namespace Spectre.Console
|
|||||||
return _recorder.Export(encoder);
|
return _recorder.Export(encoder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -32,4 +32,3 @@ namespace Spectre.Console
|
|||||||
Console.Write(renderable);
|
Console.Write(renderable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -16,4 +16,3 @@ namespace Spectre.Console
|
|||||||
Console.AlternateScreen(action);
|
Console.AlternateScreen(action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -60,4 +60,3 @@ namespace Spectre.Console
|
|||||||
CurrentStyle = Style.Plain;
|
CurrentStyle = Style.Plain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -250,4 +250,3 @@ namespace Spectre.Console
|
|||||||
Console.Write(string.Format(provider, format, args), CurrentStyle);
|
Console.Write(string.Format(provider, format, args), CurrentStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -270,4 +270,3 @@ namespace Spectre.Console
|
|||||||
Console.WriteLine(string.Format(provider, format, args), CurrentStyle);
|
Console.WriteLine(string.Format(provider, format, args), CurrentStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A console capable of writing ANSI escape sequences.
|
/// A console capable of writing ANSI escape sequences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -75,4 +75,3 @@ namespace Spectre.Console
|
|||||||
Console.Clear();
|
Console.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -3,8 +3,8 @@ using System.Runtime.InteropServices;
|
|||||||
using Spectre.Console.Enrichment;
|
using Spectre.Console.Enrichment;
|
||||||
using Spectre.Console.Internal;
|
using Spectre.Console.Internal;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Factory for creating an ANSI console.
|
/// Factory for creating an ANSI console.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -109,4 +109,3 @@ namespace Spectre.Console
|
|||||||
return (supportsAnsi, legacyConsole);
|
return (supportsAnsi, legacyConsole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -2,8 +2,8 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents console output.
|
/// Represents console output.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -55,4 +55,3 @@ namespace Spectre.Console
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Settings used when building a <see cref="IAnsiConsole"/>.
|
/// Settings used when building a <see cref="IAnsiConsole"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -53,4 +53,3 @@ namespace Spectre.Console
|
|||||||
Enrichment = new ProfileEnrichment();
|
Enrichment = new ProfileEnrichment();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines ANSI escape sequence support.
|
/// Determines ANSI escape sequence support.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -21,4 +21,3 @@ namespace Spectre.Console
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
No = 2,
|
No = 2,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a border.
|
/// Represents a border.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -39,4 +39,3 @@ namespace Spectre.Console
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static BoxBorder Square { get; } = new SquareBoxBorder();
|
public static BoxBorder Square { get; } = new SquareBoxBorder();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Spectre.Console.Rendering;
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Spectre.Console
|
namespace Spectre.Console;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a border.
|
/// Represents a border.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -19,4 +19,3 @@ namespace Spectre.Console
|
|||||||
/// <returns>A character representation of the specified border part.</returns>
|
/// <returns>A character representation of the specified border part.</returns>
|
||||||
public abstract string GetPart(BoxBorderPart part);
|
public abstract string GetPart(BoxBorderPart part);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user