partial void PushLoginButton(UIButton sender) { DependencyConfig config = new DependencyConfig(); config.Define(typeof(IServiceAuthenticator), typeof(OnlineModeAuthenticator)); OperationProcessor processor = OperationProcessor.Instance; processor.DepedencyContainer.Config = config; Parameters parameters = new Parameters(); parameters ["Credentials"] = new List <string> () { LoginTextField.Text, PasswordTextField.Text }; processor.PerformOperation(typeof(LoginOperation), parameters, (Parameters result) => { InvokeOnMainThread(() => { NavigationViewController navigationController = (NavigationViewController)NavigationController; navigationController.PushLandingViewController(); }); }, null); }
public void TestInitializationOperation() { Setting setting1 = new Setting("setting1", typeof(int), 42); Setting setting2 = new Setting("setting2", typeof(string), "fortytwo"); List <Setting> settings = new List <Setting> (); settings.Add(setting1); settings.Add(setting2); Parameters parameters = new Parameters(); parameters ["Settings"] = settings; var settingsIntializationExpectation = new AutoResetEvent(false); OperationProcessor op = OperationProcessor.Instance; op.PerformOperation(typeof(InitializeSettingsOperation), parameters, (Parameters result) => { settingsIntializationExpectation.Set(); }); Assert.True(settingsIntializationExpectation.WaitOne(TimeSpan.FromSeconds(10))); }