Пример #1
0
        /// <summary>
        /// Add a lambda function as foreign member function to a type.
        /// </summary>
        /// <typeparam name="T1"></typeparam>
        /// <typeparam name="T2"></typeparam>
        /// <typeparam name="T3"></typeparam>
        /// <typeparam name="T4"></typeparam>
        /// <typeparam name="T5"></typeparam>
        /// <typeparam name="T6"></typeparam>
        /// <typeparam name="T7"></typeparam>
        /// <typeparam name="T8"></typeparam>
        /// <typeparam name="T9"></typeparam>
        /// <typeparam name="T10"></typeparam>
        /// <typeparam name="T11"></typeparam>
        /// <typeparam name="T12"></typeparam>
        /// <typeparam name="T13"></typeparam>
        /// <typeparam name="T14"></typeparam>
        /// <typeparam name="T15"></typeparam>
        /// <typeparam name="TResult"></typeparam>
        /// <param name="delimiter"></param>
        /// <param name="name"></param>
        /// <param name="func"></param>
        /// <returns></returns>
        public IMemberFunction AddForeignFunction <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>(IdDelimiter delimiter, string name, Func <TType, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult> func)
        {
            var method = new ForeignMemberFunction <TType, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>(func);

            AddMemberFunction(delimiter, name, method);
            return(method);
        }
Пример #2
0
        /// <summary>
        /// Add a lambda function as foreign member function to a type.
        /// </summary>
        /// <typeparam name="T1"></typeparam>
        /// <typeparam name="T2"></typeparam>
        /// <typeparam name="TResult"></typeparam>
        /// <param name="delimiter"></param>
        /// <param name="name"></param>
        /// <param name="func"></param>
        /// <returns></returns>
        public IMemberFunction AddForeignFunction <T1, T2, TResult>(IdDelimiter delimiter, string name, Func <TType, T1, T2, TResult> func)
        {
            var method = new ForeignMemberFunction <TType, T1, T2, TResult>(func);

            AddMemberFunction(delimiter, name, method);
            return(method);
        }