internal TypeBase FindCoreTypeReference( CoreTypeReference coreTypeReference ) { // This method must be called on only Core Assembly's PEFileToObjectModel. How so we state this? // Issue: How about Generics etc if the runtime version 1.0 was inited? How should the platform types be? //^ assert coreTypeReference.NamespaceFullName != null; TypeBase/*?*/ retModuleType = this.ResolveNamespaceTypeDefinition(coreTypeReference.NamespaceFullName, coreTypeReference.mangledTypeName); Debug.Assert(retModuleType != null); // Assume this. //^ assert retModuleType != null; return retModuleType; }
internal TypeBase FindCoreTypeReference(CoreTypeReference coreTypeReference) { // This method must be called on only Core Assembly's PEFileToObjectModel. How so we state this? var retModuleType = this.ResolveNamespaceTypeDefinition(coreTypeReference.NamespaceFullName, coreTypeReference.mangledTypeName) as TypeBase; Contract.Assume(retModuleType != null); return retModuleType; }
/// <summary> /// Determines whether the referenced type corresponds to a numeric primitive /// or nullable of same /// </summary> /// <param name="t">The type to examine</param> /// <returns></returns> public static bool IsNumber(this CoreTypeReference t) => t.ReferencedType.IsNumber();
public CoreDataValue(CoreTypeReference DataType, string ValueAsText) { this.DataType = DataType; this.ValueAsText = ValueAsText; }
/// <summary> /// Determines whether the referenced type corresponds to the <see cref="ulong"/> type /// or nullable of same /// </summary> /// <param name="t">The type to examine</param> /// <returns></returns> public static bool IsUInt64(this CoreTypeReference t) => t.ReferencedType.IsUInt64();
/// <summary> /// Determines whether the referenced type corresponds to the <see cref="int"/> type /// or nullable of same /// </summary> /// <param name="t">The type to examine</param> /// <returns></returns> public static bool IsInt32(this CoreTypeReference t) => t.ReferencedType.IsInt32();
/// <summary> /// Determines whether the referenced type corresponds to the <see cref="System.Enum"/> type /// or nullable of same /// </summary> /// <param name="t">The type to examine</param> /// <returns></returns> public static bool IsEnum(this CoreTypeReference t) => t.ReferencedType.IsEnum();
/// <summary> /// Determines whether the referenced type corresponds to the <see cref="decimal"/> type /// or nullable of same /// </summary> /// <param name="t">The type to examine</param> /// <returns></returns> public static bool IsDecimal(this CoreTypeReference t) => t.ReferencedType.IsDecimal();
/// <summary> /// Determines whether the referenced type corresponds to the <see cref="System.DateTime"/> type /// or nullable of same /// </summary> /// <param name="t">The type to examine</param> /// <returns></returns> public static bool IsDateTime(this CoreTypeReference t) => t.ReferencedType.IsDateTime();