mirror of
				https://github.com/spectreconsole/spectre.console.git
				synced 2025-10-25 15:19:23 +00:00 
			
		
		
		
	Previous changes introduced some bugs to the code generation scripts and templates, which now have been fixed.
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| //------------------------------------------------------------------------------
 | |
| // <auto-generated>
 | |
| //     This code was generated by a tool.
 | |
| //
 | |
| //     Partly generated from
 | |
| //     https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json
 | |
| //
 | |
| //     Changes to this file may cause incorrect behavior and will be lost if
 | |
| //     the code is regenerated.
 | |
| // </auto-generated>
 | |
| //------------------------------------------------------------------------------
 | |
| 
 | |
| using System;
 | |
| using System.Collections.Generic;
 | |
| 
 | |
| namespace Spectre.Console
 | |
| {
 | |
|     public abstract partial class Spinner
 | |
|     {
 | |
|         {{~ for spinner in spinners ~}}
 | |
|         private sealed class {{ spinner.normalized_name }}Spinner : Spinner
 | |
|         {
 | |
|             public override TimeSpan Interval => TimeSpan.FromMilliseconds({{ spinner.interval }});
 | |
|             public override bool IsUnicode => {{ spinner.unicode }};
 | |
|             public override IReadOnlyList<string> Frames => new List<string>
 | |
|             {
 | |
|                 {{~ for frame in spinner.frames ~}}
 | |
|                     "{{ frame }}",
 | |
|                 {{~ end ~}}
 | |
|             };
 | |
|         }
 | |
|         {{~ end ~}}
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Contains all predefined spinners.
 | |
|         /// </summary>
 | |
|         public static class Known
 | |
|         {
 | |
|             {{~ for spinner in spinners ~}}
 | |
|             /// <summary>
 | |
|             /// Gets the "{{ spinner.name }}" spinner.
 | |
|             /// </summary>
 | |
|             public static Spinner {{ spinner.normalized_name }} { get; } = new {{ spinner.normalized_name }}Spinner();
 | |
|             {{~ end ~}}
 | |
|         }
 | |
|     }
 | |
| }
 |