GetGenericTypeDefinition() private method

private GetGenericTypeDefinition ( ) : RuntimeTypeHandle
return RuntimeTypeHandle
Beispiel #1
0
        public override Type GetGenericTypeDefinition()
        {
            if (!IsGenericType)
            {
                throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
            }

            return(RuntimeTypeHandle.GetGenericTypeDefinition(this));
        }
Beispiel #2
0
        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);
        }