Beispiel #1
0
    public static void Main(string[] args)
    {
        Console.WriteLine("Application started.");

        var runtimeVersion = typeof(object).Assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? "Unknown";

        Console.WriteLine($"NetCoreAppVersion: {runtimeVersion}");

        InteropClient.Run(args);
    }
Beispiel #2
0
    public static void Run(string[] args)
    {
        var parserResult = Parser.Default.ParseArguments <ClientOptions>(args)
                           .WithNotParsed(errors => Environment.Exit(1))
                           .WithParsed(options =>
        {
            Console.WriteLine("Use TLS: " + options.UseTls);
            Console.WriteLine("Use Test CA: " + options.UseTestCa);
            Console.WriteLine("Client type: " + options.ClientType);
            Console.WriteLine("Server host: " + options.ServerHost);
            Console.WriteLine("Server port: " + options.ServerPort);

            using (var interopClient = new InteropClient(options))
            {
                interopClient.Run().GetAwaiter().GetResult();
            }
        });
    }
Beispiel #3
0
        public async Task <string> RunTestAsync(string serverHost, int serverPort, string grpcWebMode, string testCase)
        {
            var clientOptions = new ClientOptions
            {
                TestCase    = testCase,
                ServerHost  = serverHost,
                ServerPort  = serverPort,
                UseTls      = false,
                GrpcWebMode = grpcWebMode
            };
            var client = new InteropClient(clientOptions, _loggerFactory);

            try
            {
                await client.Run();
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, ex.Message);
                return(ex.ToString());
            }

            return("Success");
        }
Beispiel #4
0
 public static void Main(string[] args)
 {
     InteropClient.Run(args);
 }