This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// A column showing download progress. | |
| /// </summary> | |
| public sealed class DownloadedColumn : ProgressColumn | |
| { | |
| private static readonly string[] _suffixes = new[] { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" }; | |
| private static readonly int _base = 1024; | |
| /// <summary> | |
| /// Gets or sets the <see cref="CultureInfo"/> to use. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <bom xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cyclonedx.org/schema/bom/1.4"> | |
| <metadata> | |
| <tools> | |
| <tool> | |
| <vendor>Spectre Systems AB</vendor> | |
| <name>Hades CLI</name> | |
| <version>1.0.0.0</version> | |
| </tool> | |
| </tools> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Spectre.Console; | |
| using System.Text; | |
| // Create the output | |
| var output = new StringWriter(); | |
| // Create the console | |
| var console = AnsiConsole.Create(new AnsiConsoleSettings | |
| { | |
| Ansi = AnsiSupport.Yes, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Spectre.Console; | |
| using Spectre.Console.Rendering; | |
| using System.Text; | |
| namespace SpectreVirtual; | |
| public static class Program | |
| { | |
| public static void Main(string[] args) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Spectre.Console; | |
| using Spectre.Console.Rendering; | |
| var renderable = new Markup("[yellow]H[/]ello [blue]W[/]orld"); | |
| foreach (var segment in SplitSegments(renderable)) | |
| { | |
| AnsiConsole.Write(new SegmentRenderable(segment)); | |
| Thread.Sleep(Random.Shared.Next(100, 500)); | |
| } |
OlderNewer