/// <summary> /// Return the Reflection type associated with the type subtree. /// </summary> /// <param name="f">Reader to be used for resolving tokens.</param> /// <param name="typepars"> /// Generic instantiation of enclosing generic type arguments if any /// (null otherwise) /// </param> /// <param name="methodpars"> /// Generic instantiation of enclosing generic method arguments if any /// (null otherwise) /// </param> /// <returns>The Reflection type associated with the type subtree.</returns> public override Type GetReflectionType(CLIFile f, Type[] typepars, Type[] methodpars) { return(type.GetReflectionType(f, typepars, methodpars).MakePointerType()); }
/// <summary> /// Used to cross the bridge with Reflection. /// </summary> /// <param name="methodinst"> /// The list of type parameters of the enclosing type. /// </param> /// <param name="typeinst"> /// The list of type parameters of the enclosing method. /// </param> /// <returns>The Reflection type representing the assembly type.</returns> /// <remarks> /// Type arguments can be omitted by specifying null as the corresponding argument. /// If the context is empty but required an exception will be thrown. Context can usually /// be provided in two ways: when accessing directly through Reflection and handles the /// Reflection object can be asked for type arguments; when reading the metadata in the /// natural order by simply keeping track of read instantiations. /// </remarks> public Type GetReflectionType(Type[] typeinst, Type[] methodinst) { return(type.GetReflectionType(this.file, typeinst, methodinst)); }
/// <summary> /// Returns the reflection type for the array type. /// </summary> /// <param name="f">The CLIFileReader defining the assembly.</param> /// <returns>The reflection type.</returns> public override Type GetReflectionType(CLIFile f, Type[] typepars, Type[] methodpars) { Type t = type.GetReflectionType(f, typepars, methodpars); return(szarray ? t.MakeArrayType() : t.MakeArrayType(rank)); }