/// <summary> /// <para>Add a key and a value to the <see cref="IconMapping" />.</para> /// </summary> /// <param name="key">The key of the new value.</param> /// <param name="value">The value to add to the table.</param> public void Add(string key, PreferencesAssetReference value) { if (IndexOfKey(key) == -1) { throw new ArgumentException("An item with the same key has already been added."); } dictionary.Add(key, value); keyValuePairs.Add(new TableEntry(key, value)); InvokeChanged(); }
public TableEntry(string key, PreferencesAssetReference value) { this.key = key; this.value = value; }