public void OnTestFixtureSetUp() { _appHost = new OperationTestsAppHost(); _appHost.Init(); _operationControl = new OperationControl { HttpRequest = new MockHttpRequest { PathInfo = "", RawUrl = "http://localhost:4444/metadata" }, MetadataConfig = ServiceEndpointsMetadataConfig.Create(""), Format = Format.Json, HostName = "localhost", RequestMessage = "(string)", ResponseMessage = "(HttpWebResponse)", Title = "Metadata page", OperationName = "operationname", MetadataHtml = "<p>Operation</p>" }; }
public ArrayList GetPeople(int number) { // This helps us illustrate our progress OperationControl.GetInstance().Maximum += number; ArrayList people = new ArrayList(); for (int i = 1; i <= number; i++) { string companyName = ""; string fullName = ""; fullName = (string)this._fullNames[i]; companyName = (string)this._companyNames[i]; // Create an instance of Person based on name & company and add to list people.Add(new PersonInformation(fullName, companyName)); // Increment our progress OperationControl.GetInstance().Increment(1); } // Return our list of people return(people); }
private void GetPeopleButton_Click(object sender, System.EventArgs e) { OperationControl.GetInstance().Start("Get People", numPeople); People people = new People(); this.peopleList.Items.Clear(); // use BeginUpdate to minimize repainting this.peopleList.BeginUpdate(); foreach (PersonInformation person in people.GetPeople(this.numPeople)) { ListViewItem personItem = new ListViewItem(new string[] { person.FullName, person.Employer }); // use enumerated value instead of literals personItem.ForeColor = Color.Blue; this.peopleList.Items.Add(personItem); OperationControl.GetInstance().Increment(1); } // call EndUpdate to do one repaint this.peopleList.EndUpdate(); OperationControl.GetInstance().Stop(); }
public void AddOperation(string name, OperationControl operation) { _operationEntries.Add(InstanceName, name, _operationMachinesByControlObject.For(operation), Maybe.Not); }
public void AddOperation(string name, OperationControl operation, string dependencyName) { _operationEntries.Add(InstanceName, name, _operationMachinesByControlObject.For(operation), Maybe.From(dependencyName)); }
private void InitializeOperationControl() { operationControl = new OperationControl(operationManager); }
public void AddOperation(string name, OperationControl operation) { var stateMachine = _operationMachinesByControlObject.For(operation); stateMachine.SaveUsing(this, name, _xmlConfigurationOutputBuilder); //bug remove name from here and pass through constructor }
public OperationStateMachine For(OperationControl operation) { return(_operationMachinesByPluginView[operation]); }