private RuntimeArrayTypeInfo(UnificationKey key, bool multiDim, int rank) : base(key) { Debug.Assert(multiDim || rank == 1); _multiDim = multiDim; _rank = rank; }
internal static RuntimeConstructedGenericTypeInfo GetRuntimeConstructedGenericTypeInfo(RuntimeTypeInfo genericTypeDefinition, RuntimeTypeInfo[] genericTypeArguments, RuntimeTypeHandle precomputedTypeHandle) { UnificationKey key = new UnificationKey(genericTypeDefinition, genericTypeArguments, precomputedTypeHandle); RuntimeConstructedGenericTypeInfo typeInfo = ConstructedGenericTypeTable.Table.GetOrAdd(key); typeInfo.EstablishDebugName(); return(typeInfo); }
// // For app-compat reasons, we need to make sure that only TypeInfo instance exists for a given semantic type. If you change this, you must change the way // RuntimeTypeInfo.Equals() is implemented. // internal static NativeFormatRuntimeGenericParameterTypeInfoForMethods GetRuntimeGenericParameterTypeInfoForMethods(RuntimeNamedMethodInfo methodOwner, MetadataReader reader, GenericParameterHandle genericParameterHandle) { UnificationKey key = new UnificationKey(methodOwner, reader, genericParameterHandle); NativeFormatRuntimeGenericParameterTypeInfoForMethods type = GenericParameterTypeForMethodsTable.Table.GetOrAdd(key); type.EstablishDebugName(); return(type); }
// // For app-compat reasons, we need to make sure that only TypeInfo instance exists for a given semantic type. If you change this, you must change the way // RuntimeTypeInfo.Equals() is implemented. // internal static NativeFormatRuntimeGenericParameterTypeInfoForTypes GetRuntimeGenericParameterTypeInfoForTypes(NativeFormatRuntimeNamedTypeInfo typeOwner, GenericParameterHandle genericParameterHandle) { UnificationKey key = new UnificationKey(typeOwner.Reader, typeOwner.TypeDefinitionHandle, genericParameterHandle); NativeFormatRuntimeGenericParameterTypeInfoForTypes type = GenericParameterTypeForTypesTable.Table.GetOrAdd(key); type.EstablishDebugName(); return(type); }
internal static RuntimeArrayTypeInfo GetArrayTypeInfo(RuntimeTypeInfo elementType, bool multiDim, int rank, RuntimeTypeHandle precomputedTypeHandle) { Debug.Assert(multiDim || rank == 1); UnificationKey key = new UnificationKey(elementType, precomputedTypeHandle); RuntimeArrayTypeInfo type; if (!multiDim) { type = ArrayTypeTable.Table.GetOrAdd(key); } else { type = TypeTableForMultiDimArrayTypeTables.Table.GetOrAdd(rank).GetOrAdd(key); } type.EstablishDebugName(); return(type); }
internal static NativeFormatRuntimeNamedTypeInfo GetRuntimeNamedTypeInfo(MetadataReader metadataReader, TypeDefinitionHandle typeDefHandle, RuntimeTypeHandle precomputedTypeHandle) { RuntimeTypeHandle typeHandle = precomputedTypeHandle; if (typeHandle.IsNull()) { if (!ReflectionCoreExecution.ExecutionEnvironment.TryGetNamedTypeForMetadata(new QTypeDefinition(metadataReader, typeDefHandle), out typeHandle)) { typeHandle = default(RuntimeTypeHandle); } } UnificationKey key = new UnificationKey(metadataReader, typeDefHandle, typeHandle); NativeFormatRuntimeNamedTypeInfo type = NamedTypeTable.Table.GetOrAdd(key); type.EstablishDebugName(); return(type); }
private RuntimeConstructedGenericTypeInfo(UnificationKey key) { _key = key; }
public static RuntimeCLSIDTypeInfo GetRuntimeCLSIDTypeInfo(Guid clsid, string server) { UnificationKey key = new UnificationKey(clsid, server); return(ClsIdTypeTable.Table.GetOrAdd(key)); }
private RuntimePointerTypeInfo(UnificationKey key) : base(key) { }
private RuntimeCLSIDTypeInfo(Guid clsid, string server) { _key = new UnificationKey(clsid, server); _constructors = new RuntimeConstructorInfo[] { RuntimeCLSIDNullaryConstructorInfo.GetRuntimeCLSIDNullaryConstructorInfo(this) }; }
protected RuntimeHasElementTypeInfo(UnificationKey key) : base() { _key = key; }
private RuntimeByRefTypeInfo(UnificationKey key) : base(key) { }