mirror of
				https://github.com/spectreconsole/spectre.console.git
				synced 2025-10-25 15:19:23 +00:00 
			
		
		
		
	* Renames Spectre.Cli to Spectre.Console.Cli. * Now uses Verify with Spectre.Console.Cli tests. * Removes some duplicate definitions. Closes #168
		
			
				
	
	
		
			25 lines
		
	
	
		
			892 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			892 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Spectre.Console;
 | |
| 
 | |
| namespace GridExample
 | |
| {
 | |
|     public static class Program
 | |
|     {
 | |
|         public static void Main()
 | |
|         {
 | |
|             AnsiConsole.WriteLine();
 | |
|             AnsiConsole.MarkupLine("Usage: [grey]dotnet [blue]run[/] [[options]] [[[[--]] <additional arguments>...]]]][/]");
 | |
|             AnsiConsole.WriteLine();
 | |
| 
 | |
|             var grid = new Grid();
 | |
|             grid.AddColumn(new GridColumn().NoWrap());
 | |
|             grid.AddColumn(new GridColumn().PadLeft(2));
 | |
|             grid.AddRow("Options:");
 | |
|             grid.AddRow("  [blue]-h[/], [blue]--help[/]", "Show command line help.");
 | |
|             grid.AddRow("  [blue]-c[/], [blue]--configuration[/] <CONFIGURATION>", "The configuration to run for.");
 | |
|             grid.AddRow("  [blue]-v[/], [blue]--verbosity[/] <LEVEL>", "Set the [grey]MSBuild[/] verbosity level.");
 | |
| 
 | |
|             AnsiConsole.Render(grid);
 | |
|         }
 | |
|     }
 | |
| }
 |