GetGenericTypeDefinition() private method

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

            return(RuntimeTypeHandle.GetGenericTypeDefinition(this));
        }
Exemplo n.º 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);
        }