Ejemplo n.º 1
0
        public async Task scoped_handler_function()
        {
            var serviceProvider = TestConfiguration.GetServiceProvider();

            var are      = new AutoResetEvent(false);
            var executor = new Executor <ICommandWrapper, Aggregate>()
                           .AddHandler <CommandWrapper <Increment> >((d, s) =>
            {
                are.Set();
            });

            var data = CommandWrapper.From(new Increment(), "One", 1);

            await executor.ExecuteAsync(data, new Aggregate());
        }