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