private void Login() { var email = emailInputField.text; var password = passwordInputField.text; LoginButtonClicked?.Invoke(email, password); }
private void OnLoginButtonClicked() { var email = emailInputField?.text; var password = passwordInputField?.text; var authenticationDetails = new UIAuthenticationDetails(email, password); LoginButtonClicked?.Invoke(authenticationDetails); }
//delegate method to invoke public event protected virtual void OnLoginButtonClick(EventArgs e) { LoginButtonClicked?.Invoke(this, e); }