// Token: 0x06000E6E RID: 3694 RVA: 0x00037648 File Offset: 0x00035848 public TraitDictionary(Key[] traitKeys) { if (traitKeys == null || traitKeys.Length == 0) { this.rootToKey = new Dictionary <KeyTypeInfo <Key>, Key>(0); } else { this.rootToKey = new Dictionary <KeyTypeInfo <Key>, Key>(traitKeys.Length, KeyTypeInfo <Key> .Comparison.EqualityComparer); foreach (Key key in traitKeys) { if (key) { this.rootToKey.Add(KeyTypeInfo <Key> .Find(key.GetType()), key); } } } }
public TraitDictionary(Key[] traitKeys) { if ((traitKeys == null) || (traitKeys.Length == 0)) { this.rootToKey = new Dictionary <KeyTypeInfo <Key>, Key>(0); } else { this.rootToKey = new Dictionary <KeyTypeInfo <Key>, Key>(traitKeys.Length, KeyTypeInfo <Key> .Comparison.EqualityComparer); foreach (Key local in traitKeys) { if (local != null) { this.rootToKey.Add(KeyTypeInfo <Key> .Find(local.GetType()), local); } } } }
public TraitDictionary(Key[] traitKeys) { if (traitKeys == null || (int)traitKeys.Length == 0) { this.rootToKey = new Dictionary <KeyTypeInfo <Key>, Key>(0); } else { this.rootToKey = new Dictionary <KeyTypeInfo <Key>, Key>((int)traitKeys.Length, KeyTypeInfo <Key> .Comparison.EqualityComparer); Key[] keyArray = traitKeys; for (int i = 0; i < (int)keyArray.Length; i++) { Key key = keyArray[i]; if (key) { this.rootToKey.Add(KeyTypeInfo <Key> .Find(key.GetType()), key); } } } }
// Token: 0x06000E86 RID: 3718 RVA: 0x000378E4 File Offset: 0x00035AE4 public T GetHardCast <T>(Type type) where T : Key { return(this.GetHardCast <T>(KeyTypeInfo <Key> .Find(type))); }
// Token: 0x06000E84 RID: 3716 RVA: 0x000378C4 File Offset: 0x00035AC4 public Key Get(Type type) { return(this.Get(KeyTypeInfo <Key> .Find(type))); }
// Token: 0x06000E77 RID: 3703 RVA: 0x000377B8 File Offset: 0x000359B8 public bool TryGetHardCast <T>(Type traitType, out T key) where T : Key { return(this.TryGetHardCast <T>(KeyTypeInfo <Key> .Find(traitType), out key)); }
// Token: 0x06000E75 RID: 3701 RVA: 0x00037798 File Offset: 0x00035998 public bool TryGet(Type traitType, out Key key) { return(this.TryGet(KeyTypeInfo <Key> .Find(traitType), out key)); }
public bool TryGetSoftCast <T>(System.Type traitType, out T key) where T : Key { return(this.TryGetSoftCast <T>(KeyTypeInfo <Key> .Find(traitType), out key)); }
public T GetSoftCast <T>(System.Type type) where T : Key { return(this.GetSoftCast <T>(KeyTypeInfo <Key> .Find(type))); }