main
 1using Castle.DynamicProxy;
 2using gorilla.infrastructure.threading;
 3
 4namespace solidware.financials.windows.ui
 5{
 6    public class RunInBackgroundInterceptor : IInterceptor
 7    {
 8        CommandProcessor command_processor;
 9
10        public RunInBackgroundInterceptor(CommandProcessor command_processor)
11        {
12            this.command_processor = command_processor;
13        }
14
15        public void Intercept(IInvocation invocation)
16        {
17            command_processor.add(() =>
18            {
19                invocation.Proceed();
20            });
21        }
22    }
23}