Hi,
I have an event sink which has passed into it custom event args (similar to the statemachine sample).
That event
sink invokes a Code Activity - my question is what is the syntax for
extracting the parameters out of the event sink for use in the Code
Activity.
private void SendMailCode_ExecuteCode(object sender, EventArgs e)
{
//TODO:pick up parameters from event sink and pass to this code to send
the email.
System.Diagnostics.Debug.Print("Send Email to Purchasing Officer");
}
I basically
passing in List<string> for use in emailing upon an event being
raised and I'm trying to do the mailing stuff in the code activity.
The Activity Gallery daoes have an Email activity but it is a bit constrained for my needs.
TIA
John

How do I Pass Values from an Event Sink
Saverain
You should be able to set properties on your event sink that map the parameters of your event args onto local variables. You can then use those local workflow variables in your execute code method.
Matt
GrantStephen
1. issue a variable for property "e" of HandleExternalEvent activity
public EmailEventArgs e = default(WorkflowConsoleApplication169.EmailEventArgs);2. in code activity execution handler refer to issued e
private void codeActivity1_ExecuteCode(object sender, EventArgs e){List<string> emailParameters = this.e.EmailParameters;
//...}