@@ -16,24 +16,26 @@ You should have received a copy of the GNU General Public License
1616 along with this program. If not, see <https://www.gnu.org/licenses/>.
1717*/
1818
19- using Microsoft . Extensions . CommandLineUtils ;
20- using Microsoft . Extensions . DependencyInjection ;
21- using Microsoft . Extensions . Hosting ;
2219using System ;
2320using System . IO ;
2421using System . Linq ;
2522using System . Reflection ;
23+ using Microsoft . Extensions . CommandLineUtils ;
24+ using Microsoft . Extensions . DependencyInjection ;
25+ using Microsoft . Extensions . Hosting ;
26+
27+ [ assembly: CLSCompliant ( true ) ]
2628
2729namespace UsbIpServer
2830{
2931 static class Program
3032 {
31- static string Product { get => Assembly . GetExecutingAssembly ( ) . GetCustomAttribute < AssemblyProductAttribute > ( ) ! . Product ; }
32- static string Copyright { get => Assembly . GetExecutingAssembly ( ) . GetCustomAttribute < AssemblyCopyrightAttribute > ( ) ! . Copyright ; }
33+ static string Product => Assembly . GetExecutingAssembly ( ) . GetCustomAttribute < AssemblyProductAttribute > ( ) ! . Product ;
34+ static string Copyright => Assembly . GetExecutingAssembly ( ) . GetCustomAttribute < AssemblyCopyrightAttribute > ( ) ! . Copyright ;
3335
3436 static void ShowCopyright ( )
3537 {
36- Console . WriteLine ( $@ "{ Product } { GitVersionInformation . FullSemVer }
38+ Console . WriteLine ( $@ "{ Product } { GitVersionInformation . MajorMinorPatch }
3739{ Copyright }
3840
3941This program is free software: you can redistribute it and/or modify
@@ -57,7 +59,7 @@ static int Main(string[] args)
5759 {
5860 Name = Path . ChangeExtension ( Path . GetFileName ( Assembly . GetExecutingAssembly ( ) . Location ) , "exe" ) ,
5961 } ;
60- app . VersionOption ( "-v|--version" , GitVersionInformation . FullSemVer , GitVersionInformation . InformationalVersion ) ;
62+ app . VersionOption ( "-v|--version" , GitVersionInformation . MajorMinorPatch , GitVersionInformation . InformationalVersion ) ;
6163
6264 void DefaultCmdLine ( CommandLineApplication cmd )
6365 {
@@ -69,10 +71,12 @@ void DefaultCmdLine(CommandLineApplication cmd)
6971
7072 DefaultCmdLine ( app ) ;
7173 app . OptionHelp . ShowInHelpText = true ;
72- app . Command ( "license" , ( cmd ) => {
74+ app . Command ( "license" , ( cmd ) =>
75+ {
7376 cmd . Description = "Display license information" ;
7477 DefaultCmdLine ( cmd ) ;
75- cmd . OnExecute ( ( ) => {
78+ cmd . OnExecute ( ( ) =>
79+ {
7680 ShowCopyright ( ) ;
7781 return 0 ;
7882 } ) ;
@@ -91,14 +95,16 @@ void DefaultCmdLine(CommandLineApplication cmd)
9195 cmd . Option ( "-b|--busid=<busid>" , "Unbind VBoxUsb.sys from device on <busid>" , CommandOptionType . SingleValue ) ;
9296 } ) ;
9397#endif
94- app . Command ( "server" , ( cmd ) => {
98+ app . Command ( "server" , ( cmd ) =>
99+ {
95100 cmd . Description = "Run the server stand-alone on the console" ;
96101 DefaultCmdLine ( cmd ) ;
97102 cmd . Argument ( "key=value" , ".NET configuration override" , true ) ;
98103 cmd . OnExecute ( ( ) => ExecuteServer ( cmd . Arguments . Single ( ) . Values . ToArray ( ) ) ) ;
99104 } ) ;
100105
101- app . OnExecute ( ( ) => {
106+ app . OnExecute ( ( ) =>
107+ {
102108 app . ShowRootCommandFullNameAndVersion ( ) ;
103109 app . ShowHint ( ) ;
104110 return 0 ;
0 commit comments