Esempio n. 1
0
 public bool TryGetSoftCast <T>(System.Type traitType, out T key)
     where T : Key
 {
     return(this.TryGetSoftCast <T>(KeyTypeInfo <Key> .Find(traitType), out key));
 }
Esempio n. 2
0
 private bool TryGet(KeyTypeInfo <Key> info, out Key key)
 {
     return(this.rootToKey.TryGetValue(info, out key));
 }
Esempio n. 3
0
 public bool TryGet(System.Type traitType, out Key key)
 {
     return(this.TryGet(KeyTypeInfo <Key> .Find(traitType), out key));
 }
Esempio n. 4
0
 private T GetSoftCast <T>(KeyTypeInfo <Key> info)
     where T : Key
 {
     return((T)((object)this.Get(info) as T));
 }
Esempio n. 5
0
 public T GetSoftCast <T>(System.Type type)
     where T : Key
 {
     return(this.GetSoftCast <T>(KeyTypeInfo <Key> .Find(type)));
 }
Esempio n. 6
0
 public Key Get(System.Type type)
 {
     return(this.Get(KeyTypeInfo <Key> .Find(type)));
 }
Esempio n. 7
0
 private T GetHardCast <T>(KeyTypeInfo <Key> info)
     where T : Key
 {
     return((T)(object)this.Get(info));
 }
Esempio n. 8
0
 private Key Get(KeyTypeInfo <Key> info)
 {
     return(this.rootToKey[info]);
 }
Esempio n. 9
0
 public static void Add(KeyTypeInfo <Key> info)
 {
     KeyTypeInfo <Key> .Registration.dict.Add(info.Type, info);
 }
Esempio n. 10
0
 public override int GetHashCode(KeyTypeInfo <Key> obj)
 {
     return(obj.Root.Type.GetHashCode());
 }
Esempio n. 11
0
 public override bool Equals(KeyTypeInfo <Key> x, KeyTypeInfo <Key> y)
 {
     return(x.Root == y.Root);
 }
Esempio n. 12
0
 public override int Compare(KeyTypeInfo <Key> x, KeyTypeInfo <Key> y)
 {
     return(-this.CompareForward(x, y));
 }