Instantiate() private method

private Instantiate ( RuntimeTypeHandle inst ) : RuntimeTypeHandle
inst RuntimeTypeHandle
return RuntimeTypeHandle
コード例 #1
0
ファイル: runtimehandles.cs プロジェクト: wwkkww1983/ZJCredit
        internal unsafe RuntimeType Instantiate(Type[] inst)
        {
            int length;

            fixed(IntPtr *pInst = RuntimeTypeHandle.CopyRuntimeTypeHandles(inst, out length))
            {
                RuntimeType o = (RuntimeType)null;

                RuntimeTypeHandle.Instantiate(this.GetNativeHandle(), pInst, length, JitHelpers.GetObjectHandleOnStack <RuntimeType>(ref o));
                GC.KeepAlive((object)inst);
                return(o);
            }
        }
コード例 #2
0
        internal unsafe RuntimeType Instantiate(Type[] inst)
        {
            int numGenericArgs;

            IntPtr[] array = RuntimeTypeHandle.CopyRuntimeTypeHandles(inst, out numGenericArgs);
            fixed(IntPtr *ptr = array)
            {
                RuntimeType result = null;

                RuntimeTypeHandle.Instantiate(this.GetNativeHandle(), ptr, numGenericArgs, JitHelpers.GetObjectHandleOnStack <RuntimeType>(ref result));
                GC.KeepAlive(inst);
                return(result);
            }
        }