Example #1
0
 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;
 }
Example #3
0
 /// <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();
Example #4
0
 public CoreDataValue(CoreTypeReference DataType, string ValueAsText)
 {
     this.DataType    = DataType;
     this.ValueAsText = ValueAsText;
 }
Example #5
0
 /// <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();
Example #6
0
 /// <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();
Example #7
0
 /// <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();
Example #8
0
 /// <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();
Example #9
0
 /// <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();