Beispiel #1
0
        protected override void PerformRunCommand(string[] args)
        {
            System.Console.Write("Login: "******"Password: "******"Аутентификация пройдена.");
            OutputHelpers.ShowBoxes(ConsoleContext);
        }
Beispiel #2
0
        protected override void PerformRunCommand(string[] args)
        {
            var boxId = args.Length > 0 ? args[0] : null;

            if (boxId == null)
            {
                OutputHelpers.ShowBoxes(ConsoleContext);
                return;
            }
            ConsoleContext.CurrentBoxId = InputHelpers.AutocompleteBoxId(ConsoleContext, boxId);
            System.Console.WriteLine("Текущий ящик: " + ConsoleContext.CurrentBoxId);
            ConsoleContext.Events = null;
        }
        protected override void PerformRunCommand(string[] args)
        {
            var thumbprint = args.Length > 0 ? args[0] : null;

            if (thumbprint == null)
            {
                ShowCertificates();
            }
            else
            {
                ConsoleContext.CurrentCert = FindCertificate(thumbprint);
                if (ConsoleContext.CurrentCert != null)
                {
                    ConsoleContext.CurrentToken = ConsoleContext.DiadocApi.Authenticate(ConsoleContext.CurrentCert.RawData);
                    ConsoleContext.ClearAuthenticationContext();
                    System.Console.WriteLine("Аутентификация пройдена. Сертификат: " + CertificateToString(ConsoleContext.CurrentCert));
                    OutputHelpers.ShowBoxes(ConsoleContext);
                }
                else
                {
                    System.Console.WriteLine("Аутентификация не пройдена: не найден сертификат");
                }
            }
        }
 protected override void PerformRunCommand(string[] args)
 {
     OutputHelpers.ShowBoxes(ConsoleContext);
 }