44 * Xecrets Cli - Copyright © 2022-2025 Svante Seleborg, All Rights Reserved.
55 *
66 * This code file is part of Xecrets Cli, parts of which in turn are derived from AxCrypt as licensed under GPL v3 or later.
7- *
7+ *
88 * However, this code is not derived from AxCrypt and is separately copyrighted and only licensed as follows unless
99 * explicitly licensed otherwise. If you use any part of this code in your software, please see https://www.gnu.org/licenses/
1010 * for details of what this means for you.
1919 *
2020 * The source repository can be found at https://github.com/ please go there for more information, suggestions and
2121 * contributions. You may also visit https://www.axantum.com for more information about the author.
22- */
22+ */
2323
2424#endregion Copyright and GPL License
2525
@@ -44,43 +44,48 @@ public Task<Status> RealAsync(Parameters parameters)
4444
4545 sb . AppendLine ( $ "public enum { nameof ( XfOpCode ) } ") ;
4646 sb . AppendLine ( "{" ) ;
47- foreach ( XfOpCode opCode in Enum . GetValues ( typeof ( XfOpCode ) ) )
47+ foreach ( XfOpCode opCode in Enum . GetValues < XfOpCode > ( ) )
4848 {
4949 sb . Append ( " " ) . Append ( Enum . GetName ( opCode ) ) . Append ( " = " ) . Append ( ( int ) opCode ) . AppendLine ( "," ) ;
5050 }
51+
5152 sb . AppendLine ( "}" ) ;
5253 sb . AppendLine ( ) ;
5354
5455 sb . AppendLine ( $ "public enum { nameof ( XfOptionKeys ) } ") ;
5556 sb . AppendLine ( "{" ) ;
56- foreach ( XfOptionKeys optionKey in Enum . GetValues ( typeof ( XfOptionKeys ) ) )
57+ foreach ( XfOptionKeys optionKey in Enum . GetValues < XfOptionKeys > ( ) )
5758 {
5859 sb . Append ( " " ) . Append ( Enum . GetName ( optionKey ) ) . Append ( " = " ) . Append ( ( int ) optionKey ) . AppendLine ( "," ) ;
5960 }
61+
6062 sb . AppendLine ( "}" ) ;
6163 sb . AppendLine ( ) ;
6264
6365 sb . AppendLine ( $ "public enum { nameof ( XfStatusCode ) } ") ;
6466 sb . AppendLine ( "{" ) ;
65- foreach ( XfStatusCode statusCode in Enum . GetValues ( typeof ( XfStatusCode ) ) )
67+ foreach ( XfStatusCode statusCode in Enum . GetValues < XfStatusCode > ( ) )
6668 {
6769 sb . Append ( " " ) . Append ( Enum . GetName ( statusCode ) ) . Append ( " = " ) . Append ( ( int ) statusCode ) . AppendLine ( "," ) ;
6870 }
71+
6972 sb . AppendLine ( "}" ) ;
7073 sb . AppendLine ( ) ;
7174
7275 sb . AppendLine ( $ "public enum { nameof ( XfSubStatusCode ) } ") ;
7376 sb . AppendLine ( "{" ) ;
74- foreach ( XfSubStatusCode subStatus in Enum . GetValues ( typeof ( XfSubStatusCode ) ) )
77+ foreach ( XfSubStatusCode subStatus in Enum . GetValues < XfSubStatusCode > ( ) )
7578 {
7679 sb . Append ( " " ) . Append ( Enum . GetName ( subStatus ) ) . Append ( " = " ) . Append ( ( int ) subStatus ) . AppendLine ( "," ) ;
7780 }
81+
7882 sb . AppendLine ( "}" ) ;
7983 sb . AppendLine ( ) ;
8084
8185 sb . AppendLine ( "public class XfCliApi" ) ;
8286 sb . AppendLine ( "{" ) ;
83- string version = $ "{ parameters . Parser . ExportableCliVersion . Major } ,{ parameters . Parser . ExportableCliVersion . Minor } ";
87+ string version =
88+ $ "{ parameters . Parser . ExportableCliVersion . Major } ,{ parameters . Parser . ExportableCliVersion . Minor } ";
8489 sb . Append ( " public Version XfCliVersion { get; } = new Version(" ) . Append ( version ) . AppendLine ( ");" ) ;
8590 sb . AppendLine ( ) ;
8691 sb . AppendLine ( " public List<(int, string, string)> XfCliOptions { get; } =" ) ;
@@ -89,6 +94,7 @@ public Task<Status> RealAsync(Parameters parameters)
8994 {
9095 sb . AppendLine ( $ " ({ def . OpCode } , \" { def . Prototype } \" , \" { def . Description } \" ),") ;
9196 }
97+
9298 sb . AppendLine ( " ];" ) ;
9399 sb . AppendLine ( "}" ) ;
94100
0 commit comments