/// <summary> Adds the an entry with the specified name and value to the specified map property. </summary> /// <exception cref="InvalidOperationException"> Thrown if the specified property is not a map. </exception> /// <exception cref="ArgumentNullException"> Thrown if the specified map, name or value is null. </exception> /// <exception cref="ArgumentException"> Thrown if an entry with the same name already exists. </exception> /// <exception cref="NotSupportedException"> Thrown if the specified value can't be converted to an <see cref="IProperty"/>. </exception> public static void Add <T>(this IProperty self, string name, T value) => self.AsMap().Add(name, value);
/// <summary> Removes the entry with the specified name from the specified map property, /// and returns the removed value, or null if the name was not found. </summary> /// <exception cref="InvalidOperationException"> Thrown if the specified property is not a map. </exception> /// <exception cref="ArgumentNullException"> Thrown if the specified map or name is null. </exception> public static IProperty Remove(this IProperty self, string name) => self.AsMap().Remove(name);
/// <summary> Adds the an entry with the specified name and property to the specified map property. </summary> /// <exception cref="InvalidOperationException"> Thrown if the specified property is not a map. </exception> /// <exception cref="ArgumentNullException"> Thrown if the specified map, name or property is null. </exception> /// <exception cref="ArgumentException"> Thrown if an entry with the same name already exists. </exception> public static void Add(this IProperty self, string name, IProperty property) => self.AsMap().Add(name, property);