Пример #1
0
        // Token: 0x060064D5 RID: 25813 RVA: 0x001C4874 File Offset: 0x001C2A74
        internal static WeakDictionary <object, List <KeyValuePair <int, object> > > EnsureItemValueStorage(DependencyObject owner)
        {
            WeakDictionary <object, List <KeyValuePair <int, object> > > weakDictionary = Helper.ItemValueStorageField.GetValue(owner);

            if (weakDictionary == null)
            {
                weakDictionary = new WeakDictionary <object, List <KeyValuePair <int, object> > >();
                Helper.ItemValueStorageField.SetValue(owner, weakDictionary);
            }
            return(weakDictionary);
        }
Пример #2
0
        // Token: 0x060064D4 RID: 25812 RVA: 0x001C483C File Offset: 0x001C2A3C
        internal static List <KeyValuePair <int, object> > EnsureItemValues(DependencyObject owner, object item)
        {
            WeakDictionary <object, List <KeyValuePair <int, object> > > weakDictionary = Helper.EnsureItemValueStorage(owner);
            List <KeyValuePair <int, object> > list = Helper.GetItemValues(owner, item, weakDictionary);

            if (list == null && HashHelper.HasReliableHashCode(item))
            {
                list = new List <KeyValuePair <int, object> >(3);
                weakDictionary[item] = list;
            }
            return(list);
        }
Пример #3
0
 // Token: 0x06008A12 RID: 35346 RVA: 0x002568D3 File Offset: 0x00254AD3
 public ValueCollection(WeakDictionary <KeyType, ValueType> dict)
 {
     this.Dict = dict;
 }
Пример #4
0
 public KeyCollection(WeakDictionary <KeyType, ValueType> dict)
 {
     Dict = dict;
 }
Пример #5
0
        // Token: 0x060064D3 RID: 25811 RVA: 0x001C481C File Offset: 0x001C2A1C
        internal static List <KeyValuePair <int, object> > GetItemValues(DependencyObject owner, object item, WeakDictionary <object, List <KeyValuePair <int, object> > > itemValueStorage)
        {
            List <KeyValuePair <int, object> > result = null;

            if (itemValueStorage != null)
            {
                itemValueStorage.TryGetValue(item, out result);
            }
            return(result);
        }