public bool TryGetSoftCast <T>(System.Type traitType, out T key) where T : Key { return(this.TryGetSoftCast <T>(KeyTypeInfo <Key> .Find(traitType), out key)); }
private bool TryGet(KeyTypeInfo <Key> info, out Key key) { return(this.rootToKey.TryGetValue(info, out key)); }
public bool TryGet(System.Type traitType, out Key key) { return(this.TryGet(KeyTypeInfo <Key> .Find(traitType), out key)); }
private T GetSoftCast <T>(KeyTypeInfo <Key> info) where T : Key { return((T)((object)this.Get(info) as T)); }
public T GetSoftCast <T>(System.Type type) where T : Key { return(this.GetSoftCast <T>(KeyTypeInfo <Key> .Find(type))); }
public Key Get(System.Type type) { return(this.Get(KeyTypeInfo <Key> .Find(type))); }
private T GetHardCast <T>(KeyTypeInfo <Key> info) where T : Key { return((T)(object)this.Get(info)); }
private Key Get(KeyTypeInfo <Key> info) { return(this.rootToKey[info]); }
public static void Add(KeyTypeInfo <Key> info) { KeyTypeInfo <Key> .Registration.dict.Add(info.Type, info); }
public override int GetHashCode(KeyTypeInfo <Key> obj) { return(obj.Root.Type.GetHashCode()); }
public override bool Equals(KeyTypeInfo <Key> x, KeyTypeInfo <Key> y) { return(x.Root == y.Root); }
public override int Compare(KeyTypeInfo <Key> x, KeyTypeInfo <Key> y) { return(-this.CompareForward(x, y)); }