main
 1using System.Threading;
 2
 3namespace jive
 4{
 5  public interface ISynchronizationContext : Command<Command> {}
 6
 7  public class SynchronizedContext : ISynchronizationContext
 8  {
 9    readonly SynchronizationContext context;
10
11    public SynchronizedContext(SynchronizationContext context)
12    {
13      this.context = context;
14    }
15
16    public void run(Command item)
17    {
18      context.Post(x => item.run(), new object());
19      //context.Send(x => item.run(), new object());
20    }
21  }
22}