/// <summary> /// Copy Constructor /// </summary> /// <param name="propertiesDictionary">properties to copy</param> /// <remarks> /// <para> /// Initializes a new instance of the <see cref="ReadOnlyPropertiesDictionary" /> class. /// </para> /// </remarks> public ReadOnlyPropertiesDictionary(ReadOnlyPropertiesDictionary propertiesDictionary) { foreach (DictionaryEntry entry in propertiesDictionary) { InnerHashtable.Add(entry.Key, entry.Value); } }
public void Add(ManagedObjectName objectName, Entry instance) { lock (this) { InnerHashtable.Add(objectName, instance); } }
public fk_columns(DataRow row) { foreach (string field in fields.Split(',')) { InnerHashtable.Add(field, row[field]); } }
/// <summary> /// See <see cref="IDictionary.Add"/> /// </summary> /// <param name="key">the key</param> /// <param name="value">the value to store for the key</param> /// <remarks> /// <para> /// Store a value for the specified <see cref="String"/> <paramref name="key"/>. /// </para> /// </remarks> /// <exception cref="ArgumentException">Thrown if the <paramref name="key"/> is not a string</exception> void IDictionary.Add(object key, object value) { if (!(key is string)) { throw new ArgumentException("key must be a string", "key"); } InnerHashtable.Add(key, value); }
// Instance Methods public void Add(string key, Symbol value) { if (InnerHashtable.Contains(key)) { Debug.Fail(Owner.FullName + " already holds " + key); } InnerHashtable.Add(key, value); }
public void Add(string name, object value) { if (string.IsNullOrEmpty(name)) { return; } InnerHashtable.Add(name, value); }
/// <summary> /// Adds the data the dictionary from reader /// </summary> public void AddData(SqlDataReader reader) { while (reader.Read()) { string key = reader.GetString(1); if (Contains(key)) { InnerHashtable.Remove(key); } InnerHashtable.Add(key, new App(reader)); } reader.Close(); }
void IDictionary.Add(object key, object value) { OnValidate(key, value); OnInsert(key, value); InnerHashtable.Add(key, value); try { OnInsertComplete(key, value); } catch { InnerHashtable.Remove(key); throw; } }
/// <summary> /// Construct a JsonObject from a IDictionary /// </summary> public JsonObject(IDictionary members) { foreach (DictionaryEntry entry in DictionaryHelper.GetEntries(members)) { if (entry.Key == null) { throw new InvalidMemberException(); } InnerHashtable.Add(entry.Key.ToString(), entry.Value); } _nameIndexList = new ArrayList(members.Keys); }
public IPAddresses(string filePath) { string line; string[] words; StreamReader streamReader = File.OpenText(filePath); while (streamReader.Peek() != -1) { line = streamReader.ReadLine(); words = line.Split(','); InnerHashtable.Add(words[0], words[1]); } streamReader.Close(); }
/// <summary> /// Construct a JObject from a IDictionary /// </summary> public JsonObject(IDictionary members) { // FIXME: Use IDictionaryEnumerator.Entry instead and enumerate manually (faster and more robust). // See comment in DictionaryExporter for details. foreach (DictionaryEntry entry in members) { if (entry.Key == null) { throw new InvalidMemberException(); } InnerHashtable.Add(entry.Key.ToString(), entry.Value); } _nameIndexList = new ArrayList(members.Keys); }
void IDictionary.Remove(object key) { if (InnerHashtable.Contains(key)) { Object temp = InnerHashtable[key]; OnValidate(key, temp); OnRemove(key, temp); InnerHashtable.Remove(key); try { OnRemoveComplete(key, temp); } catch { InnerHashtable.Add(key, temp); throw; } } }
public void Add(string url, Exception value) { InnerHashtable.Add(url, value); }
/// <summary> /// Default constructor /// </summary> public AppDictionary() { App a = new App(true); InnerHashtable.Add(a.ApplicationName, a); }
protected void BaseAdd(string name, object value) { InnerHashtable.Add(name, value); }
public void Add(string name, ILQHsm hsm) { InnerHashtable.Add(name, hsm); }
public void Add(string name, string ip) { InnerHashtable.Add(name, ip); }