コード例 #1
0
        public virtual void UseAsync <TStrategy>() where TStrategy : IAsyncProcessStrategy <TContext>
        {
            var strategyType = typeof(TStrategy);

            IAsyncProcessStrategy <TContext> strategy = (TStrategy)System.Activator.CreateInstance(strategyType);

            this.UseAsync(strategy);
        }
コード例 #2
0
        public virtual void UseAsync(IAsyncProcessStrategy <TContext> strategy)
        {
            if (strategy == null)
            {
                throw new System.ArgumentNullException("Tried to queue a null value for strategy.");
            }

            this.UseAsync(strategy.ProcessAsync);
        }