21 if ((
object)
con ==
null)
217 if (typeInfo ==
null)
224 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2055:UnrecognizedReflectionPattern", Justification =
"MakeGenericType is only called on a TypeBuilder which is not subject to trimming")]
231 if (
method.IsGenericMethod && !
method.IsGenericMethodDefinition)
235 if (
method.DeclaringType ==
null || !
method.DeclaringType.IsGenericTypeDefinition)
239 if (
type.GetGenericTypeDefinition() !=
method.DeclaringType)
243 if (
type.IsGenericTypeDefinition)
245 type =
type.MakeGenericType(
type.GetGenericArguments());
254 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2055:UnrecognizedReflectionPattern", Justification =
"MakeGenericType is only called on a TypeBuilder which is not subject to trimming")]
261 if (!
constructor.DeclaringType.IsGenericTypeDefinition)
271 type =
type.MakeGenericType(
type.GetGenericArguments());
280 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2055:UnrecognizedReflectionPattern", Justification =
"MakeGenericType is only called on a TypeBuilder which is not subject to trimming")]
287 if (!
field.DeclaringType.IsGenericTypeDefinition)
297 type =
type.MakeGenericType(
type.GetGenericArguments());
299 if (
type.GetGenericTypeDefinition() !=
field.DeclaringType)
322 private static extern void SetMethodIL(
QCallModule module,
int tk,
bool isInitLocals,
byte[] body,
int bodyLength,
byte[]
LocalSig,
int sigLength,
int maxStackSize,
ExceptionHandler[]
exceptions,
int numExceptions,
int[]
tokenFixups,
int numTokenFixups);
433 type2 = typeBuilder.m_enumUnderlyingType;
540 if (interfaces !=
null)
542 for (
int i = 0; i < interfaces.Length; i++)
544 if (interfaces[i] ==
null)
549 array =
new int[interfaces.Length + 1];
550 for (
int i = 0; i < interfaces.Length; i++)
555 int num =
fullname.LastIndexOf(
'.');
556 if (num == -1 || num == 0)
598 if (name.Length == 0)
607 string text =
"$ArrayType$" + size;
610 if (typeBuilder ==
null)
902 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2070:UnrecognizedReflectionPattern", Justification =
"The GetInterfaces technically requires all interfaces to be preservedBut in this case it acts only on TypeBuilder which is never trimmed (as it's runtime created).")]
919 if (typeBuilder ==
null)
927 if (!
base.IsInterface)
932 for (
int i = 0; i < interfaces.Length; i++)
1045 if (attributeType ==
null)
1063 if (attributeType ==
null)
1079 if (interfaces !=
null)
1091 if (
names.Length == 0)
1095 for (
int i = 0; i <
names.Length; i++)
1097 if (
names[i] ==
null)
1107 for (
int j = 0;
j <
names.Length;
j++)
1114 [
RequiresUnreferencedCode(
"If some of the generic arguments are annotated (either with DynamicallyAccessedMembersAttribute, or generic constraints), trimming can't validate that the requirements of those annotations are met.")]
1197 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2082:UnrecognizedReflectionPattern", Justification =
"Reflection.Emit is not subject to trimming")]
1204 if (name.Length == 0)
1224 MethodBuilder methodBuilder =
new MethodBuilder(name, attributes,
callingConvention,
returnType,
returnTypeRequiredCustomModifiers,
returnTypeOptionalCustomModifiers,
parameterTypes,
parameterTypeRequiredCustomModifiers,
parameterTypeOptionalCustomModifiers,
m_module,
this);
1236 return DefinePInvokeMethodHelper(name,
dllName, name, attributes,
callingConvention,
returnType,
null,
null,
parameterTypes,
null,
null,
nativeCallConv,
nativeCharSet);
1242 return DefinePInvokeMethodHelper(name,
dllName,
entryName, attributes,
callingConvention,
returnType,
null,
null,
parameterTypes,
null,
null,
nativeCallConv,
nativeCharSet);
1246 public MethodBuilder DefinePInvokeMethod(
string name,
string dllName,
string entryName,
MethodAttributes attributes,
CallingConventions callingConvention,
Type?
returnType,
Type[]?
returnTypeRequiredCustomModifiers,
Type[]?
returnTypeOptionalCustomModifiers,
Type[]?
parameterTypes,
Type[][]?
parameterTypeRequiredCustomModifiers,
Type[][]?
parameterTypeOptionalCustomModifiers,
CallingConvention nativeCallConv,
CharSet nativeCharSet)
1248 return DefinePInvokeMethodHelper(name,
dllName,
entryName, attributes,
callingConvention,
returnType,
returnTypeRequiredCustomModifiers,
returnTypeOptionalCustomModifiers,
parameterTypes,
parameterTypeRequiredCustomModifiers,
parameterTypeOptionalCustomModifiers,
nativeCallConv,
nativeCharSet);
1252 private MethodBuilder DefinePInvokeMethodHelper(
string name,
string dllName,
string importName,
MethodAttributes attributes,
CallingConventions callingConvention,
Type returnType,
Type[]
returnTypeRequiredCustomModifiers,
Type[]
returnTypeOptionalCustomModifiers,
Type[]
parameterTypes,
Type[][]
parameterTypeRequiredCustomModifiers,
Type[][]
parameterTypeOptionalCustomModifiers,
CallingConvention nativeCallConv,
CharSet nativeCharSet)
1264 if (name.Length == 0)
1294 MethodBuilder methodBuilder =
new MethodBuilder(name, attributes,
callingConvention,
returnType,
returnTypeRequiredCustomModifiers,
returnTypeOptionalCustomModifiers,
parameterTypes,
parameterTypeRequiredCustomModifiers,
parameterTypeOptionalCustomModifiers,
m_module,
this);
1351 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2082:UnrecognizedReflectionPattern", Justification =
"Reflection.Emit is not subject to trimming")]
1370 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2055:UnrecognizedReflectionPattern", Justification =
"MakeGenericType is only called on a TypeBuilderInstantiation which is not subject to trimming")]
1371 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2075:UnrecognizedReflectionPattern", Justification =
"GetConstructor is only called on a TypeBuilderInstantiation which is not subject to trimming")]
1403 constructorBuilder.m_isDefaultConstructor =
true;
1424 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2082:UnrecognizedReflectionPattern", Justification =
"Reflection.Emit is not subject to trimming")]
1585 if (name.Length == 0)
1616 if (name.Length == 0)
1620 if (name[0] ==
'\0')
1650 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2083:UnrecognizedReflectionPattern", Justification =
"Reflection.Emit is not subject to trimming")]
1678 array2 =
new int[m_typeInterfaces.Count + 2];
1683 array2 =
new int[m_typeInterfaces.Count + 1];
1744 else if (body ==
null || body.Length == 0)
1751 if ((body ==
null || body.Length == 0) && !
methodBuilder.m_canBeRuntimeImpl)
1759 SetMethodIL(
new QCallModule(
ref module),
methodBuilder.MetadataToken,
methodBuilder.InitLocals, body, (body !=
null) ? body.Length : 0,
localSignature,
signatureLength, maxStack,
exceptionHandlers, (
exceptionHandlers !=
null) ?
exceptionHandlers.Length : 0,
tokenFixups, (
tokenFixups !=
null) ?
tokenFixups.Length : 0);
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void AddRange(IEnumerable< KeyValuePair< TKey, TValue > > collection)
void Add(TKey key, TValue value)
static Type GetUnderlyingType(Type enumType)
static readonly string TypeConstructorName
static readonly string ConstructorName
static object[] GetCustomAttributes(RuntimeType type, RuntimeType caType, bool inherit)
static bool IsDefined(RuntimeType type, RuntimeType caType, bool inherit)
readonly AssemblyBuilderAccess _access
AssemblyBuilderData _assemblyData
static void CheckContext(params Type[][] typess)
static ConstructorInfo GetConstructor(ConstructorInfo Constructor, TypeBuilderInstantiation type)
void CreateCustomAttribute(ModuleBuilder mod, int tkOwner)
static FieldInfo GetField(FieldInfo Field, TypeBuilderInstantiation type)
TypeBuilder GetTypeBuilder()
override int MetadataToken
static MethodInfo GetMethod(MethodInfo method, TypeBuilderInstantiation type)
int GetConstructorToken(ConstructorInfo con)
AssemblyBuilder ContainingAssemblyBuilder
TypeBuilder DefineType(string name)
int GetTypeTokenInternal(Type type)
override Assembly Assembly
void AddType(string name, Type type)
int GetMethodToken(MethodInfo method)
virtual Type FindTypeBuilderWithName(string strTypeName, bool ignoreCase)
static readonly OpCode Call
static readonly OpCode Ret
static readonly OpCode Ldarg_0
static SignatureHelper GetPropertySigHelper(Module? mod, Type? returnType, Type[]? parameterTypes)
static Type FormCompoundType(string format, Type baseType, int curIndex)
static Type MakeGenericType(Type type, Type[] typeArguments)
readonly ConstructorInfo m_con
CustAttr(CustomAttributeBuilder customBuilder)
void Bake(ModuleBuilder module, int token)
readonly byte[] m_binaryAttribute
readonly CustomAttributeBuilder m_customBuilder
CustAttr(ConstructorInfo con, byte[] binaryAttribute)
static int DefineType(QCallModule module, string fullname, int tkParent, TypeAttributes attributes, int tkEnclosingType, int[] interfaceTokens)
void SetParent([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent)
override? object InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object?[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters)
readonly MethodBuilder m_declMeth
override bool IsConstructedGenericType
ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, Type[]? parameterTypes, Type[][]? requiredCustomModifiers, Type[][]? optionalCustomModifiers)
override bool HasElementTypeImpl()
override bool IsSecurityCritical
MethodBuilder DefineMethod(string name, MethodAttributes attributes, Type? returnType, Type[]? parameterTypes)
override bool IsSecuritySafeCritical
TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packSize)
static FieldInfo GetField(Type type, FieldInfo field)
bool m_isHiddenGlobalType
PropertyBuilder DefineProperty(string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers)
override? string Namespace
void SetGenParamAttributes(GenericParameterAttributes genericParameterAttributes)
void DefineMethodOverrideNoLock(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration)
TypeBuilder(ModuleBuilder module)
override bool IsDefined(Type attributeType, bool inherit)
void SetInterfaces(params Type[] interfaces)
static void DefineMethodImpl(QCallModule module, int tkType, int tkBody, int tkDecl)
override object[] GetCustomAttributes(Type attributeType, bool inherit)
override int GenericParameterPosition
readonly string m_strNameSpace
override Type MakeByRefType()
override bool IsSubclassOf(Type c)
PropertyBuilder DefineProperty(string name, PropertyAttributes attributes, Type returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers)
static void SetParentType(QCallModule module, int tdTypeDef, int tkParent)
static void SetMethodImpl(QCallModule module, int tkMethod, MethodImplAttributes MethodImplAttributes)
readonly int m_genParamPos
override bool IsPrimitiveImpl()
RuntimeType BakedRuntimeType
MethodBuilder DefineMethod(string name, MethodAttributes attributes, CallingConventions callingConvention)
override? MethodBase DeclaringMethod
override? string AssemblyQualifiedName
static ConstructorInfo GetConstructor(Type type, ConstructorInfo constructor)
void SetGenParamCustomAttribute(CustomAttributeBuilder customBuilder)
MethodBuilder DefineMethod(string name, MethodAttributes attributes)
TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, int typeSize)
const int UnspecifiedTypeSize
MethodBuilder DefinePInvokeMethodHelper(string name, string dllName, string importName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers, CallingConvention nativeCallConv, CharSet nativeCharSet)
ConstructorBuilder DefineDefaultConstructor(MethodAttributes attributes)
override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr)
TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, PackingSize packSize, int typeSize)
GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names)
static void SetPInvokeData(QCallModule module, string DllName, string name, int token, int linkFlags)
static void TermCreateClass(QCallModule module, int tk, ObjectHandleOnStack type)
static void SetFieldLayoutOffset(QCallModule module, int fdToken, int iOffset)
override bool IsByRefImpl()
override bool IsAssignableFrom([NotNullWhen(true)] Type? c)
static void SetMethodIL(QCallModule module, int tk, bool isInitLocals, byte[] body, int bodyLength, byte[] LocalSig, int sigLength, int maxStackSize, ExceptionHandler[] exceptions, int numExceptions, int[] tokenFixups, int numTokenFixups)
PropertyBuilder DefineProperty(string name, PropertyAttributes attributes, Type returnType, Type[]? parameterTypes)
static int DefineMethod(QCallModule module, int tkParent, string name, byte[] signature, int sigLength, MethodAttributes attributes)
override Type[] GetNestedTypes(BindingFlags bindingAttr)
TypeInfo CreateTypeNoLock()
PropertyBuilder DefinePropertyNoLock(string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent)
MethodBuilder DefineMethod(string name, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes)
override? FieldInfo GetField(string name, BindingFlags bindingAttr)
override Type MakeArrayType()
override Type MakePointerType()
static void SetClassLayout(QCallModule module, int tk, PackingSize iPackingSize, int iTypeSize)
static unsafe void SetConstantValue(ModuleBuilder module, int tk, Type destType, object value)
static int GetTokenFromSig(QCallModule module, byte[] signature, int sigLength)
override EventInfo[] GetEvents()
override? ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers)
FieldBuilder DefineField(string fieldName, Type type, FieldAttributes attributes)
override bool IsTypeDefinition
Type m_enumUnderlyingType
override? Type GetInterface(string name, bool ignoreCase)
ModuleBuilder GetModuleBuilder()
PropertyBuilder DefineProperty(string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[]? parameterTypes)
TypeBuilder DefineNestedType(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent, Type[]? interfaces)
GenericTypeParameterBuilder[] m_inst
override bool IsByRefLike
override bool IsSecurityTransparent
FieldBuilder DefineUninitializedDataNoLock(string name, int size, FieldAttributes attributes)
List< Type > m_typeInterfaces
readonly TypeAttributes m_iAttr
MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers, CallingConvention nativeCallConv, CharSet nativeCharSet)
FieldBuilder DefineInitializedDataNoLock(string name, byte[] data, FieldAttributes attributes)
int m_lastTokenizedMethod
override TypeAttributes GetAttributeFlagsImpl()
override Type MakeArrayType(int rank)
override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
TypeBuilder(string szName, int genParamPos, TypeBuilder declType)
override bool IsGenericParameter
readonly TypeBuilder m_genTypeDef
ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, Type[]? parameterTypes)
static int SetParamInfo(QCallModule module, int tkMethod, int iSequence, ParameterAttributes iParamAttributes, string strParamName)
override? Type GetNestedType(string name, BindingFlags bindingAttr)
override bool IsCOMObjectImpl()
void VerifyTypeAttributes(TypeAttributes attr)
override Type[] GetGenericArguments()
FieldBuilder DefineInitializedData(string name, byte[] data, FieldAttributes attributes)
TypeInfo? CreateTypeInfo()
override? MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers)
override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods|DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType)
override? EventInfo GetEvent(string name, BindingFlags bindingAttr)
ConstructorBuilder DefineDefaultConstructorNoLock(MethodAttributes attributes)
TypeBuilder(string szName, int genParamPos, MethodBuilder declMeth)
void SetCustomAttribute(CustomAttributeBuilder customBuilder)
TypeBuilder(string fullname, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type parent, Type[] interfaces, ModuleBuilder module, PackingSize iPackingSize, int iTypeSize, TypeBuilder enclosingType)
override FieldInfo[] GetFields(BindingFlags bindingAttr)
GenericParameterAttributes m_genParamAttributes
override Type UnderlyingSystemType
FieldBuilder DefineUninitializedData(string name, int size, FieldAttributes attributes)
override string ToString()
override Type[] GetInterfaces()
override? Type DeclaringType
override? Type ReflectedType
static bool IsTypeEqual(Type t1, Type t2)
override MethodInfo[] GetMethods(BindingFlags bindingAttr)
TypeBuilder DefineNestedTypeNoLock(string name, TypeAttributes attr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type parent, Type[] interfaces, PackingSize packSize, int typeSize)
static void DefineCustomAttribute(QCallModule module, int tkAssociate, int tkConstructor, byte[] attr, int attrLength)
MethodBuilder DefineMethodNoLock(string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
static void AddInterfaceImpl(QCallModule module, int tdTypeDef, int tkInterface)
TypeBuilder DefineNestedType(string name, TypeAttributes attr)
override EventInfo[] GetEvents(BindingFlags bindingAttr)
TypeBuilder DefineNestedType(string name)
override object[] GetCustomAttributes(bool inherit)
static void DefineMethodSemantics(QCallModule module, int tkAssociation, MethodSemanticsAttributes semantics, int tkMethod)
void DefineMethodOverride(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration)
FieldBuilder DefineField(string fieldName, Type type, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers, FieldAttributes attributes)
override bool IsGenericType
ConstructorBuilder DefineTypeInitializerNoLock()
override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers)
static int DefineGenericParam(QCallModule module, string name, int tkParent, GenericParameterAttributes attributes, int position, int[] constraints)
MethodBuilder DefineMethod(string name, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers)
MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet)
override bool IsArrayImpl()
FieldBuilder DefineFieldNoLock(string fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes)
void SetGenParamCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
override bool IsAssignableFrom([NotNullWhen(true)] TypeInfo? typeInfo)
static int DefineProperty(QCallModule module, int tkParent, string name, PropertyAttributes attributes, byte[] signature, int sigLength)
readonly bool m_bIsGenParam
readonly PackingSize m_iPackingSize
List< MethodBuilder > m_listMethods
readonly ModuleBuilder m_module
override Type GetGenericTypeDefinition()
static MethodInfo GetMethod(Type type, MethodInfo method)
static int DefineMethodSpec(QCallModule module, int tkParent, byte[] signature, int sigLength)
ConstructorBuilder DefineTypeInitializer()
RuntimeType m_bakedRuntimeType
static void DefineCustomAttribute(ModuleBuilder module, int tkAssociate, int tkConstructor, byte[] attr)
void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
ConstructorBuilder DefineConstructorNoLock(MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers)
FieldBuilder DefineDataHelper(string name, byte[] data, int size, FieldAttributes attributes)
override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
void SetGenParamCustomAttributeNoLock(CustAttr ca)
EventBuilder DefineEventNoLock(string name, EventAttributes attributes, Type eventtype)
override bool IsGenericTypeDefinition
override RuntimeTypeHandle TypeHandle
override? string FullName
static int DefineField(QCallModule module, int tkParent, string name, byte[] signature, int sigLength, FieldAttributes attributes)
static unsafe void SetConstantValue(QCallModule module, int tk, int corType, void *pValue)
override MemberInfo[] GetMembers(BindingFlags bindingAttr)
static int DefineEvent(QCallModule module, int tkParent, string name, EventAttributes attributes, int tkEventType)
override bool IsPointerImpl()
override Type MakeGenericType(params Type[] typeArguments)
MethodBuilder DefinePInvokeMethod(string name, string dllName, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet)
readonly TypeBuilder m_DeclaringType
EventBuilder DefineEvent(string name, EventAttributes attributes, Type eventtype)
void AddInterfaceImplementation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType)
readonly string m_strName
override Type GetElementType()
override string ToString()
static string GetRankString(int rank)
override EventInfo GetEvent(string name, BindingFlags bindingAttr)
override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
override bool IsAssignableFrom([NotNullWhen(true)] TypeInfo typeInfo)
override Type GetInterface(string fullname, bool ignoreCase)
override FieldInfo[] GetFields(BindingFlags bindingAttr)
override Type[] GetNestedTypes(BindingFlags bindingAttr)
override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
void InvalidateCachedNestedType()
override object InvokeMember(string name, BindingFlags bindingFlags, Binder binder, object target, object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParams)
override MethodInfo[] GetMethods(BindingFlags bindingAttr)
override Type[] GetInterfaces()
override Type GetNestedType(string fullname, BindingFlags bindingAttr)
override FieldInfo GetField(string name, BindingFlags bindingAttr)
override EventInfo[] GetEvents(BindingFlags bindingAttr)
override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods|DynamicallyAccessedMemberTypes.NonPublicMethods)] Type ifaceType)
override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr)
override MemberInfo[] GetMembers(BindingFlags bindingAttr)
static string Argument_ConstantNotSupported
static string Argument_BadSizeForData
static string NotSupported_TypeNotYetCreated
static string Argument_InvalidMethodDeclaringType
static string Argument_BadTypeAttrNestedVisibilityOnNonNestedType
static string Argument_InvalidFieldDeclaringType
static string Arg_MustBeType
static string Argument_MustBeTypeBuilder
static string ArgumentException_BadMethodImplBody
static string Argument_ConstructorNeedGenericDeclaringType
static string InvalidOperation_ConstructorNotAllowedOnInterface
static string Argument_BadPInvokeOnInterface
static string InvalidOperation_NoUnderlyingTypeOnEnum
static string Format(string resourceFormat, object p1)
static string Argument_TypeNameTooLong
static string Argument_NeedNonGenericType
static string InvalidOperation_BadMethodBody
static string Argument_ConstantDoesntMatch
static string Argument_FieldNeedGenericDeclaringType
static string Argument_BadNestedTypeFlags
static string Argument_BadTypeAttrNonNestedVisibilityNestedType
static string Argument_MethodNeedGenericDeclaringType
static string NotSupported_DynamicModule
static string Argument_IllegalName
static string Argument_BadTypeAttrInvalidLayout
static string InvalidOperation_TypeHasBeenCreated
static string Argument_InvalidConstructorDeclaringType
static string Argument_MethodRedefined
static string Arg_EmptyArray
static string Argument_MismatchedArrays
static string Argument_EmptyName
static string Argument_NeedGenericMethodDefinition
static string NotSupported_NoParentDefaultConstructor
static string Argument_BadTypeAttrReservedBitsSet
static string Argument_BadPInvokeMethod
static string InvalidOperation_BadInterfaceNotAbstract
static string Argument_CannotSetParentToInterface
static string InvalidOperation_BadTypeAttributesNotAbstract
static string InvalidOperation_BadEmptyMethodBody
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
virtual Type[] GetGenericArguments()
ConstructorInfo? GetConstructor(Type[] types)
static readonly Type[] EmptyTypes
MethodInfo? GetMethod(string name)
virtual Type GetGenericTypeDefinition()
DynamicallyAccessedMemberTypes
GenericParameterAttributes
MethodSemanticsAttributes
static ? Type GetUnderlyingType(Type nullableType)
static CorElementType GetCorElementType(RuntimeType type)