Ejemplo n.º 1
0
        public async Task <ServiceExecutionResult> SignInTask()
        {
            var loginField = new UIField("Username");
            var passwField = new UIField("Password");

            passwField.HideChars = true;

            var inputFields = new List <UIField>();

            inputFields.Add(loginField);
            inputFields.Add(passwField);

            if (uiService.SingleThreaded)
            {
                while (this.status != ServiceExecutionStatus.Completed)
                {
                    uiService.WaitUserInput(inputFields, new Action(Authenticate));
                }
            }
            else
            {
                uiService.WaitUserInput(inputFields, new Action(Authenticate));
                await MonitorServiceStatus();
            }

            return(this.result);
        }