Пример #1
0
            /// <inheritdoc/>
            protected internal override object GetValue(object key)
            {
                SerializableProperty keyProperty = (SerializableProperty)key;

                SerializableDictionary dictionary = property.GetDictionary();

                return(dictionary.GetProperty(keyProperty.GetValue <object>()).Value);
            }
Пример #2
0
            /// <summary>
            /// Updates the ordered set of keys used for mapping sequential indexes to keys. Should be called whenever a
            /// dictionary key changes.
            /// </summary>
            private void UpdateKeys()
            {
                orderedKeys.Clear();

                if (dictionary != null)
                {
                    SerializableDictionary dict = property.GetDictionary();
                    foreach (var key in dictionary.Keys)
                    {
                        orderedKeys.Add(dict.GetProperty(key).Key);
                    }
                }
            }