コード例 #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public ThreadPoolFastExecutionStrategy(bool useCommonMessageBusPool)
        {
            _useCommonMessageBusPool = useCommonMessageBusPool;

            GeneralHelper.GenericDelegate<Envelope> delegateInstance = new GeneralHelper.GenericDelegate<Envelope>(PerformExecution);
            _performExecutionDelegate = FastInvokeHelper.GetMethodInvoker(delegateInstance.Method, true, false);
        }
コード例 #2
0
            /// <summary>
            /// Constructor.
            /// </summary>
            public TargetInfo(string invokerName, object target, FastInvokeHelper.FastInvokeHandlerDelegate delegateInstance,
                bool poolAsFirstParameter, ThreadPoolFast pool, params object[] args)
            {
                DelegateInstance = delegateInstance;
                Target = target;
                InvokerName = invokerName;

                if (poolAsFirstParameter)
                {
                    Args = new object[] { pool, args };
                }
                else
                {
                    Args = args;
                }

                //if (args != null && args.Length == 1)
                //{// Single parameter pass.
                //    Args = new object[] { pool, args[0] };
                //}
                //else
                //{
                //    Args = new object[] { pool, args };
                //}
            }