/// <summary> Removes the child at the specified index from the specified list property, and returns the removed value. </summary> /// <exception cref="InvalidOperationException"> Thrown if the specified list is not actually a list. </exception> /// <exception cref="ArgumentNullException"> Thrown if the specified list is null. </exception> /// <exception cref="ArgumentOutOfRangeException"> Thrown if the specified index is not valid. </exception> public static IProperty RemoveAt(this IProperty self, int index) => self.AsList().RemoveAt(index);
/// <summary> Inserts the specified value at the specified index in the specified list property. </summary> /// <exception cref="InvalidOperationException"> /// Thrown if the specified list is not actually a list /// -OR- if this list property's size is already at <see cref="PropertyList.MAX_SIZE"/>. /// </exception> /// <exception cref="ArgumentNullException"> Thrown if the specified list or value is null. </exception> /// <exception cref="ArgumentOutOfRangeException"> Thrown if the specified index is not valid. </exception> /// <exception cref="NotSupportedException"> Thrown if the specified value can't be converted to an <see cref="IProperty"/>. </exception> public static void Insert <T>(this IProperty self, int index, T value) => self.AsList().Insert(index, value);
/// <summary> Adds the specified value to the end of the specified list property. </summary> /// <exception cref="InvalidOperationException"> /// Thrown if the specified list is not actually a list /// -OR- if this list property's size is already at <see cref="PropertyList.MAX_SIZE"/>. /// </exception> /// <exception cref="ArgumentNullException"> Thrown if the specified list or value is null. </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, T value) => self.AsList().Add(value);
/// <summary> Inserts the specified property at the specified index in the specified list property. </summary> /// <exception cref="InvalidOperationException"> /// Thrown if the specified list is not actually a list /// -OR- if this list property's size is already at <see cref="PropertyList.MAX_SIZE"/>. /// </exception> /// <exception cref="ArgumentNullException"> Thrown if the specified list or property is null. </exception> /// <exception cref="ArgumentOutOfRangeException"> Thrown if the specified index is not valid. </exception> public static void Insert(this IProperty self, int index, IProperty property) => self.AsList().Insert(index, property);
/// <summary> Adds the specified property to the end of the specified list property. </summary> /// <exception cref="InvalidOperationException"> /// Thrown if the specified list is not actually a list /// -OR- if this list property's size is already at <see cref="PropertyList.MAX_SIZE"/>. /// </exception> /// <exception cref="ArgumentNullException"> Thrown if the specified list or property is null. </exception> public static void Add(this IProperty self, IProperty property) => self.AsList().Add(property);