static public Type GetType(TypeIndex index) { if (!TypesByIndex.TryGetValue(index, out Type type)) { throw new System.Exception("Type index is not set: " + index.ToString()); } return(type); }
public static DarkMeta Get(TypeIndex typeIndex) { if (typeIndex != TypeIndex.Invalid) { DarkMeta meta; if (MetasByIndex.TryGetValue(typeIndex, out meta)) { return(meta); } else { Type type; if (TypeRegistry.TryGetType(typeIndex, out type)) { return(Get(type)); } } } return(null); }
public DarkContractAttribute(TypeIndex typeIndex, DarkFlags flags = DarkFlags.Serializable) { this.TypeIndex = typeIndex; this.Flags = flags; }
static public bool TryGetType(TypeIndex index, out Type type) { return(TypesByIndex.TryGetValue(index, out type)); }