Esempio n. 1
0
 internal override Type GetGenericTypeArgument(int index)
 {
     if (typeArgs == null)
     {
         typeArgs = new Type[index + 1];
     }
     else if (typeArgs.Length <= index)
     {
         Array.Resize(ref typeArgs, index + 1);
     }
     return(typeArgs[index] ?? (typeArgs[index] = new MissingTypeParameter(this, index)));
 }
Esempio n. 2
0
        public override Type[] GetGenericArguments()
        {
            MethodInfo method = TryGetForwarder();

            if (method != null)
            {
                return(Forwarder.GetGenericArguments());
            }
            if (typeArgs == null)
            {
                typeArgs = new Type[signature.GenericParameterCount];
                for (int i = 0; i < typeArgs.Length; i++)
                {
                    typeArgs[i] = new MissingTypeParameter(this, i);
                }
            }
            return(Util.Copy(typeArgs));
        }