Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 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();
     });
 }
Exemplo n.º 3
0
 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();
         });
 }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
        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();
        }