Marco,
if I understand your code, your object sends an event to itself
Why don't you use the normal (.net) way of sending an event in this case
public partial class Activity1: SequenceActivity { public event EventHandler evento; public Activity1()
{ InitializeComponent(); evento += new EventHandler(Activity1_myEvent); }
void Activity1_myEvent(object sender, EventArgs e) { Console.WriteLine("event called");
}
protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { if (evento != null) evento(this, new EventArgs()); return ActivityExecutionStatus.Closed; }
|