public LoginViewModel(ILoginView view, IComponentContext container, SteamAuthentication steamAuthentication) : base(view, container) { this.steamAuthentication = steamAuthentication; this.steamAuthentication.TwoFactorCodeRequired.Subscribe(OnTwoFactorCodeRequired); this.steamAuthentication.ExceptionThrown.Subscribe(OnExceptionThrown); this.LoginCommand = new AsyncCommand(OnLoginCommand, CommandExecutionPolicies.OneAtATime); }
public void TestMethod1() { var auth = new SteamAuthentication(); const string login = ""; const string password = ""; const string twoFactorCode = ""; void OnR(object sender, EventArgs args) { auth.Authenticate(login, password, twoFactorCode); } auth.TwoFactorCodeRequired.Subscribe(OnR); auth.Authenticate(login, password, ""); }