示例#1
0
        private ProcessorConfiguration(ProcessorConfiguration configuration, CommandHandlerSettings settings)
        {
            Contract.Requires(configuration != null);
            Contract.Requires(settings != null);

            this.filters                = configuration.Filters;
            this.dependencyResolver     = configuration.DependencyResolver;
            this.DefaultHandlerLifetime = configuration.DefaultHandlerLifetime;
            this.Properties             = configuration.Properties;
            this.CommandBroker          = configuration.CommandBroker;

            // per-handler settings
            this.Services = settings.Services;
            this.AbortOnInvalidCommand       = settings.AbortOnInvalidCommand;
            this.ServiceProxyCreationEnabled = configuration.ServiceProxyCreationEnabled;

            // Use the original configuration's initializer so that its Initialize()
            // will perform the same logic on this clone as on the original.
            this.Initializer = configuration.Initializer;
        }
示例#2
0
        private ProcessorConfiguration(ProcessorConfiguration configuration, CommandHandlerSettings settings)
        {
            Contract.Requires(configuration != null);
            Contract.Requires(settings != null);
            
            this.filters = configuration.Filters;
            this.dependencyResolver = configuration.DependencyResolver;
            this.DefaultHandlerLifetime = configuration.DefaultHandlerLifetime;
            this.Properties = configuration.Properties;
            this.CommandBroker = configuration.CommandBroker;

            // per-handler settings
            this.Services = settings.Services;
            this.AbortOnInvalidCommand = settings.AbortOnInvalidCommand;
            this.ServiceProxyCreationEnabled = configuration.ServiceProxyCreationEnabled;

            // Use the original configuration's initializer so that its Initialize()
            // will perform the same logic on this clone as on the original.
            this.Initializer = configuration.Initializer;
        }