Domanda

I am trying to understand the couple of lines form windows work flow. But I am unable to understand these lines. I am using windows work flow for first time that's why I am unable to understand. I have complete knowledge of basics of C#(delegate etc) Please explain me these couple of lines.

WorkflowApplication wfApp = new WorkflowApplication(wf);

wfApp.Completed = delegate(WorkflowApplicationCompletedEventArgs e)
{

};
È stato utile?

Soluzione

The first statement creates the object (wfApp) that controls the running of a workflow. In that statement wf is the workflow. So you would then say wfApp.run() in order to run the wf workflow.

The second statement says that when the workflow completes then wfApp runs some code or method. In this case the code would be put into the brackets after the delegate.

This is covered in http://msdn.microsoft.com/en-us/library/dd560894(v=vs.110).aspx

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top