示例#1
0
        static int Main(string[] args)
        {
            // before we localize, make sure we have all the error
            // messages in en-us
            CultureInfo.CurrentUICulture =
                CultureInfo.DefaultThreadCurrentUICulture =
                    CultureInfo.GetCultureInfoByIetfLanguageTag("en-us");

            try
            {
                return(CommandLineSettings.Run(args, (c) => Run(c, args)).GetAwaiter().GetResult());
            }
            catch (CommandParsingException exception)
            {
                Console.WriteLine(exception.Message);
                return(1);
            }
        }
示例#2
0
        static async Task <int> Run(CommandLineSettings settings, string[] args)
        {
            try
            {
                var plt = new EventHubCopyTest(settings.TargetNamespaceConnectionString,
                                               settings.SourceNamespaceConnectionString, settings.TargetEventHub, settings.SourceEventHub,
                                               settings.SourceConsumerGroup);
                await plt.RunTest();

                var plt1 = new EventHubOrderTest(settings.TargetNamespaceConnectionString,
                                                 settings.SourceNamespaceConnectionString, settings.TargetEventHub, settings.SourceEventHub,
                                                 settings.SourceConsumerGroup);
                await plt1.RunTest();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
                return(1);
            }
            return(0);
        }