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