public void Set(string name, KvValue value) { Require.NotNull(name, nameof(name)); Require.NotNull(value, nameof(value)); _children.RemoveAll(kv => kv.Name == name); _children.Add(new KvObject(name, value)); }
/// <summary> /// Initializes a new instance of the <see cref="KvObject"/> class. /// </summary> /// <param name="name">Name of this object.</param> /// <param name="value">Value of this object.</param> public KvObject(string name, KvValue value) { Require.NotNull(name, nameof(name)); Require.NotNull(value, nameof(value)); Name = name; Value = value; }