예제 #1
0
        /// <summary>
        /// The internal aggregate Step function callback, which wraps the raw context pointer and calls the virtual Step() method.
        /// </summary>
        /// <remarks>
        /// This function takes care of doing the lookups and getting the important information put together to call the Step() function.
        /// That includes pulling out the user's contextData and updating it after the call is made.  We use a sorted list for this so
        /// binary searches can be done to find the data.
        /// </remarks>
        /// <param name="context">A raw context pointer</param>
        /// <param name="nArgs">Number of arguments passed in</param>
        /// <param name="argsptr">A pointer to the array of arguments</param>
        internal void StepCallback(IntPtr context, int nArgs, IntPtr argsptr)
        {
            int    n = _base.AggregateCount(context);
            long   nAux;
            object obj = null;

            nAux = (long)_base.AggregateContext(context);
            if (n > 1)
            {
                obj = _contextDataList[nAux];
            }

            Step(ConvertParams(nArgs, argsptr), n, ref obj);
            _contextDataList[nAux] = obj;
        }