Пример #1
0
#pragma warning disable CA1303 // Do not pass literals as localized parameters
        static async Task Main(string[] args)
        {
            bool debugMode = false;
            Uri  socketUri = null;

            CaptureConfiguration.Init();

            Parser.Default.ParseArguments <Options>(args)
            .WithParsed(options =>
            {
                socketUri = options.Uri == null ? new Uri(CaptureConfiguration.Configuration["Piscato.Gateway.Endpoint"]) : options.Uri;
                debugMode = options.Debug;
            });

            Console.WriteLine("Start recording");
            DeviceManagement.DisplayAllDevices();

            var conversationId = Guid.NewGuid().ToString();

            await StartCaptureAsync(socketUri, conversationId, debugMode).ConfigureAwait(false);

            StopCapture();
            Console.WriteLine("End of recording");
            Cleanup();

            Console.CancelKeyPress += (s, e) =>
            {
                Exit();
            };

            Console.ReadLine();
            Exit();
        }