Run() private method

private Run ( ) : Task
return Task
Beispiel #1
0
        public static void Run(string[] args)
        {
            Console.WriteLine("gRPC C# interop testing client");
            ClientOptions options = ParseArguments(args);

            if (options.serverHost == null || !options.serverPort.HasValue || options.testCase == null)
            {
                Console.WriteLine("Missing required argument.");
                Console.WriteLine();
                options.help = true;
            }

            if (options.help)
            {
                Console.WriteLine("Usage:");
                Console.WriteLine("  --server_host=HOSTNAME");
                Console.WriteLine("  --server_host_override=HOSTNAME");
                Console.WriteLine("  --server_port=PORT");
                Console.WriteLine("  --test_case=TESTCASE");
                Console.WriteLine("  --use_tls=BOOLEAN");
                Console.WriteLine("  --use_test_ca=BOOLEAN");
                Console.WriteLine();
                Environment.Exit(1);
            }

            var interopClient = new InteropClient(options);

            interopClient.Run().Wait();
        }
Beispiel #2
0
 public static void Run(string[] args)
 {
     var parserResult = Parser.Default.ParseArguments <ClientOptions>(args)
                        .WithNotParsed(errors => Environment.Exit(1))
                        .WithParsed(options =>
     {
         var interopClient = new InteropClient(options);
         interopClient.Run().Wait();
     });
 }
Beispiel #3
0
        public static void Run(string[] args)
        {
            var options = new ClientOptions();

            if (!Parser.Default.ParseArguments(args, options))
            {
                Environment.Exit(1);
            }

            var interopClient = new InteropClient(options);

            interopClient.Run().Wait();
        }
Beispiel #4
0
        public static void Run(string[] args)
        {
            Console.WriteLine("gRPC C# interop testing client");
            ClientOptions options = ParseArguments(args);

            if (options.serverHost == null || !options.serverPort.HasValue || options.testCase == null)
            {
                Console.WriteLine("Missing required argument.");
                Console.WriteLine();
                options.help = true;
            }

            if (options.help)
            {
                Console.WriteLine("Usage:");
                Console.WriteLine("  --server_host=HOSTNAME");
                Console.WriteLine("  --server_host_override=HOSTNAME");
                Console.WriteLine("  --server_port=PORT");
                Console.WriteLine("  --test_case=TESTCASE");
                Console.WriteLine("  --use_tls=BOOLEAN");
                Console.WriteLine("  --use_test_ca=BOOLEAN");
                Console.WriteLine();
                Environment.Exit(1);
            }

            var interopClient = new InteropClient(options);
            interopClient.Run().Wait();
        }
Beispiel #5
0
 public static void Run(string[] args)
 {
     var parserResult = Parser.Default.ParseArguments<ClientOptions>(args)
         .WithNotParsed(errors => Environment.Exit(1))
         .WithParsed(options =>
         {
             var interopClient = new InteropClient(options);
             interopClient.Run().Wait();
         });
 }
        public static void Run(string[] args)
        {
            var options = new ClientOptions();
            if (!Parser.Default.ParseArguments(args, options))
            {
                Environment.Exit(1);
            }

            var interopClient = new InteropClient(options);
            interopClient.Run().Wait();
        }