Brian put together a nice little plugin for Live Writer (WLW) to allow paste as HTML. This is needed if you CopyAsHtml from your Visual Studio to keep the code formating. Code below is Copied from VS using Copy As Html and pasted into LiveWriter using Insert/ClipboardHtml – which is Brians plugin. I would prefer a Paste Special menu item, but this will work for now.
public static void Test()
// Create some object that has PortEvent(s) on it.
MyBizObj mbo = new MyBizObj();
// Client posts a reply port to the EventPort.
Port<int> replyPort = new Port<int>();
Arbiter.Activate(new DispatcherQueue("replyQ", new Dispatcher()),
Console.WriteLine("Got it event:" + i);
mbo.Event2.Post(replyPort); // Subscribe to event.
Thread.Sleep(0); // Why not work without this sleep? Live lock?
// Biz Object publishes event to all subscribers.