Exemplo n.º 1
0
        internal FastMethod(ConstructorInfo method, bool doNotCreate = false)
        {
            parameters  = method.GetParameters();
            this.method = method;
#if NET472 || NETCOREAPP2_1
            fastMethod = EmitHelper.CreateMethodHandler(method, doNotCreate);
#endif
        }
Exemplo n.º 2
0
        /// <summary>
        /// Construct a new <see cref="FastMethod"/> associated with an existing method.
        /// </summary>
        /// <param name="method">The method.</param>
        /// <remarks>the constructor is kept private as the FastMethod constructor itself is expensive and instance MUST be cached for performance improvement</remarks>
        internal FastMethod(MethodBase method)
        {
            parameters  = method.GetParameters();
            this.method = method;
#if NET472 || NETCOREAPP2_1
            fastMethod = EmitHelper.CreateMethodHandler(method);
#endif
        }
Exemplo n.º 3
0
        internal FastMethod(ConstructorInfo method, bool doNotCreate = false)
        {
            parameters  = method.GetParameters();
            this.method = method;
#if __NET__ || __NETCORE__
            fastMethod = EmitHelper.CreateMethodHandler(method, doNotCreate);
#else
#endif
        }
Exemplo n.º 4
0
        /// <summary>
        /// Construct a new <see cref="FastMethod"/> associated with an existing method.
        /// </summary>
        /// <param name="method">The method.</param>
        /// <remarks>the constructor is kept private as the FastMethod constructor itself is expensive and instance MUST be cached for performance improvement</remarks>
        internal FastMethod(MethodBase method)
        {
            parameters  = method.GetParameters();
            this.method = method;
#if __NET__ || __NETCORE__
            fastMethod = EmitHelper.CreateMethodHandler(method);
#else
#endif
        }