Beispiel #1
0
        public void Update(string key, T value)
        {
            int index = m_source.IndexOfKey(key);

            m_source.Remove(key, UpdateSource.User);
            m_source.Add(key, value, UpdateSource.User, index);
        }
Beispiel #2
0
        void WrappedUnderlyingValueUpdated(object sender, DataWrapperUpdatedEventArgs e)
        {
            if (Updated != null)
            {
                // sender will be the underlying wrapped value that has been updated. e.g. an IEditableScripts item
                TWrapped updatedItem = (TWrapped)sender;

                Updated(this, new EditableListUpdatedEventArgs <TWrapped>
                {
                    UpdatedItem = m_wrappedItemsLookup[updatedItem],
                    Index       = m_source.IndexOfKey(m_wrappedItemsLookup[updatedItem].Key)
                });
            }
        }