slimCODE

commUNITY
Welcome to slimCODE Sign in | Join | Help
in Search

slimCODE, aka Martin Plante

NamedEvent slimKEYS plug-in sample

I'm playing a little with the Microsoft Workflow Foundation, and needed a quick way to set a system-wide named event, to make an activity unblock and continue its processing. So I started with my own slimKEYS plug-in sample, and modified it to set a named EventWaitHandle when the handler's hotkey is pressed.

Now, within a CodeActivity's ExecuteCode event, I can make a very simple wait on the same name:

// Timeout management ignored for simplicity
EventWaitHandle eventHandle = new EventWaitHandle( false, EventResetMode.AutoReset, "FooBar" );
eventHandle.WaitOne();

You can find this new sample plug-in here.

 

Published Saturday, December 09, 2006 4:47 AM by slimcode
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit