GetGenericTypeDefinition() private method

private GetGenericTypeDefinition ( ) : RuntimeTypeHandle
return RuntimeTypeHandle
コード例 #1
0
ファイル: RuntimeType.cs プロジェクト: mikem8361/runtime
        public override Type GetGenericTypeDefinition()
        {
            if (!IsGenericType)
            {
                throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
            }

            return(RuntimeTypeHandle.GetGenericTypeDefinition(this));
        }
コード例 #2
0
ファイル: runtimehandles.cs プロジェクト: wwkkww1983/ZJCredit
        internal static RuntimeType GetGenericTypeDefinition(RuntimeType type)
        {
            RuntimeType o = type;

            if (RuntimeTypeHandle.HasInstantiation(o) && !RuntimeTypeHandle.IsGenericTypeDefinition(o))
            {
                RuntimeTypeHandle.GetGenericTypeDefinition(o.GetTypeHandleInternal(), JitHelpers.GetObjectHandleOnStack <RuntimeType>(ref o));
            }
            return(o);
        }