コード例 #1
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="statementName">Name of the statement.</param>
        /// <param name="subscriber">is the subscriber receiving method invocations</param>
        /// <param name="deliveryConvertor">for converting individual rows</param>
        /// <param name="method">to deliver the insert stream to</param>
        /// <param name="startMethod">to call to indicate when delivery starts, or null if no such indication is required</param>
        /// <param name="endMethod">to call to indicate when delivery ends, or null if no such indication is required</param>
        /// <param name="rStreamMethod">to deliver the remove stream to, or null if no such indication is required</param>
        public ResultDeliveryStrategyImpl(String statementName,
                                          Object subscriber,
                                          DeliveryConvertor deliveryConvertor,
                                          MethodInfo method,
                                          MethodInfo startMethod,
                                          MethodInfo endMethod,
                                          MethodInfo rStreamMethod)
        {
            _statementName     = statementName;
            _subscriber        = subscriber;
            _deliveryConvertor = deliveryConvertor;
            FastClass fastClass = FastClass.Create(subscriber.GetType());

            _updateFastMethod = fastClass.GetMethod(method);

            _startFastMethod = startMethod != null?fastClass.GetMethod(startMethod) : null;

            _endFastMethod = endMethod != null?fastClass.GetMethod(endMethod) : null;

            _updateRStreamFastMethod = rStreamMethod != null?fastClass.GetMethod(rStreamMethod) : null;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ResultDeliveryStrategyImpl" /> class.
        /// </summary>
        /// <param name="statement">The statement.</param>
        /// <param name="subscriber">The subscriber.</param>
        /// <param name="deliveryConvertor">The delivery convertor.</param>
        /// <param name="method">The method.</param>
        /// <param name="startMethod">The start method.</param>
        /// <param name="endMethod">The end method.</param>
        /// <param name="rStreamMethod">The r stream method.</param>
        /// <param name="engineImportService">The engine import service.</param>
        public ResultDeliveryStrategyImpl(
            EPStatement statement,
            object subscriber,
            DeliveryConvertor deliveryConvertor,
            MethodInfo method,
            MethodInfo startMethod,
            MethodInfo endMethod,
            MethodInfo rStreamMethod,
            EngineImportService engineImportService)
        {
            _statement         = statement;
            _subscriber        = subscriber;
            _deliveryConvertor = deliveryConvertor;
            _updateMethodFast  = FastClass.CreateMethod(method);

            if (startMethod != null)
            {
                _startMethodFast           = FastClass.CreateMethod(startMethod);
                _startMethodHasEPStatement = IsMethodAcceptsStatement(startMethod);
            }
            else
            {
                _startMethodFast           = null;
                _startMethodHasEPStatement = false;
            }

            if (endMethod != null)
            {
                _endMethodFast           = FastClass.CreateMethod(endMethod);
                _endMethodHasEPStatement = IsMethodAcceptsStatement(endMethod);
            }
            else
            {
                _endMethodFast           = null;
                _endMethodHasEPStatement = false;
            }

            _updateRStreamMethodFast = rStreamMethod != null?FastClass.CreateMethod(rStreamMethod) : null;
        }