Esempio n. 1
0
 protected virtual void OnDictionaryChanged(TKey key, object value, DictionaryChangedType changedType)
 {
     if (DictionaryChanged != null)
     {
         DictionaryChanged(this, new DictionaryChangedEventArgs <TKey>(key, value, changedType));
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a new instance of the <see cref="DictionaryChangedEventArgs{TKey,TValue}"/> class.
 /// </summary>
 /// <param name="key">The key of the item causing the change in the dictionary.</param>
 /// <param name="index">The index of the item causing the change in the dictionary.</param>
 /// <param name="value">The item that is causing the change in the dictionary.</param>
 /// <param name="propertyName">The name of the property causing the item to change.</param>
 /// <param name="dictionaryChangedType">A <see cref="DictionaryChangedType"/> value indicating the type of change.</param>
 public DictionaryChangedEventArgs(TKey key, int index, TValue value, string propertyName, DictionaryChangedType dictionaryChangedType)
 {
     _key                   = key;
     _index                 = index;
     _value                 = value;
     _propertyName          = propertyName;
     _dictionaryChangedType = dictionaryChangedType;
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a new instance of the <see cref="DictionaryChangedEventArgs{TKey,TValue}"/> class.
 /// </summary>
 /// <param name="key">The key of the item causing the change in the dictionary.</param>
 /// <param name="index">The index of the item causing the change in the dictionary.</param>
 /// <param name="value">The item that is causing the change in the dictionary.</param>
 /// <param name="dictionaryChangedType">A <see cref="DictionaryChangedType"/> value indicating the type of change.</param>
 public DictionaryChangedEventArgs(TKey key, int index, TValue value, DictionaryChangedType dictionaryChangedType)
     : this(key, index, value, null, dictionaryChangedType)
 {
 }
Esempio n. 4
0
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="effectKey">发生变更的Key</param>
 /// <param name="changedType">变更类型</param>
 public DictionaryChangedEventArgs(T effectKey, object effecValue, DictionaryChangedType changedType)
 {
     DictionaryChangedType = changedType;
     EffectKey             = effectKey;
     EffectValue           = effecValue;
 }