using System; using Pegasus.Diagnostics; using Pegasus.Workflow.Service; namespace Pegasus.UnitTests.Workflow.Service.Workflows { /// <summary> /// The starting state that catches the second event in the event workflow test. /// </summary> public class StateCatchSecondEvent : WorkflowState { /// <summary> /// Initializes a new instance of the <see cref="T:StateCatchFirstEvent"/> class. /// </summary> public StateCatchSecondEvent() : base( "StateCatchSecondEvent" ) { } /// <summary> /// Called when intialize complete of the workflow is completed. /// </summary> protected override void OnIntializeComplete() { base.OnIntializeComplete(); // Bind to the data exchange event TestDataExchangeService dataExchangeService = Workflow.GetService<TestDataExchangeService>(); dataExchangeService.SecondEvent += new TestDataExchangeService.CustomerDelegateHandler( DataExchangeService_SecondEvent ); } /// <summary> /// Handles the SecondEvent event of the DataExchangeService control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="args">The <see cref="T:Pegasus.UnitTests.Workflow.Service2.Workflows.TestingEventArgs"/> instance containing the event data.</param> private void DataExchangeService_SecondEvent( object sender, TestingEventArgs args ) { Workflow.WorkflowComplete( 123 ); } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)