Beispiel #1
0
 protected DustObject(string typeName, DustType superType = null)
     : base(typeName, superType ?? DustTypes.Object)
 {
 }
Beispiel #2
0
 public static DustType BestTypeFor(DustType type1, DustType type2)
 {
     return(type1.Rank > type2.Rank ? type1 : type2);
 }
Beispiel #3
0
 public bool IsAssignableFrom(DustType type)
 {
     // TODO: Support multiple levels of inheritance
     return(this == type || this == type.SuperType);
 }
Beispiel #4
0
 public bool Equals(DustType other)
 {
     return(TypeName == other.TypeName && SuperType == other.SuperType);
 }
Beispiel #5
0
 protected DustType(string typeName, DustType superType = null)
 {
     TypeName  = typeName;
     SuperType = superType;
 }