Exemplo n.º 1
0
        private void InitAuthPresenter()
        {
            IAuthorizationInteractor interactor = new AuthorizationInteractor(new LoginValidator(), new PasswordValidator());
            IAuthView view = new AuthView(this);

            _authPresenter = new AuthPresenter(interactor, view);
            _authPresenter.Subscribe();
        }
Exemplo n.º 2
0
        partial void LoginButton_TouchUpInside(UIButton sender)
        {
            var authSender = new AuthSender(TEST_LOGIN, TEST_PASS);
            var interactor = new AuthorizationInteractor(new LoginValidator(), new PasswordValidator(), authSender);

            var result = interactor.Login(loginField.Text, passwordField.Text).Result;

            var message = GetMessage(result);

            Alert(message);
        }
Exemplo n.º 3
0
        private async void LoginButton_Click(object sender, System.EventArgs e)
        {
            var authSender = new AuthSender(TEST_LOGIN, TEST_PASS);
            var interactor = new AuthorizationInteractor(new LoginValidator(), new PasswordValidator(), authSender);

            var result = await interactor.Login(loginField.Text, passwordField.Text);

            var message = GetMessage(result);

            Alert(message);
        }