public static void Run(string[] args) { Console.WriteLine("gRPC C# interop testing server"); ServerOptions options = ParseArguments(args); if (!options.port.HasValue) { Console.WriteLine("Missing required argument."); Console.WriteLine(); options.help = true; } if (options.help) { Console.WriteLine("Usage:"); Console.WriteLine(" --port=PORT"); Console.WriteLine(" --use_tls=BOOLEAN"); Console.WriteLine(); Environment.Exit(1); } var interopServer = new InteropServer(options); interopServer.Run(); }
public static void Run(string[] args) { var parserResult = Parser.Default.ParseArguments <ServerOptions>(args) .WithNotParsed(errors => Environment.Exit(1)) .WithParsed(options => { var interopServer = new InteropServer(options); interopServer.Run(); }); }
public static void Run(string[] args) { var parserResult = Parser.Default.ParseArguments<ServerOptions>(args) .WithNotParsed(errors => Environment.Exit(1)) .WithParsed(options => { var interopServer = new InteropServer(options); interopServer.Run(); }); }
public static void Run(string[] args) { var options = new ServerOptions(); if (!Parser.Default.ParseArguments(args, options)) { Environment.Exit(1); } var interopServer = new InteropServer(options); interopServer.Run(); }
public static void Run(string[] args) { Console.WriteLine("gRPC C# interop testing server"); ServerOptions options = ParseArguments(args); if (!options.port.HasValue) { Console.WriteLine("Missing required argument."); Console.WriteLine(); options.help = true; } if (options.help) { Console.WriteLine("Usage:"); Console.WriteLine(" --port=PORT"); Console.WriteLine(" --use_tls=BOOLEAN"); Console.WriteLine(); Environment.Exit(1); } var interopServer = new InteropServer(options); interopServer.Run(); }
public static void Run(string[] args) { var options = new ServerOptions(); if (!Parser.Default.ParseArguments(args, options)) { Environment.Exit(1); } var interopServer = new InteropServer(options); interopServer.Run(); }