/// <summary>Gets the value of <paramref name="field"/> of the item at index <paramref name="itemIndex"/>. </summary> /// <exception cref="ArgumentNullException">Thrown when one or more required arguments are null. </exception> /// <param name="itemIndex">Zero-based index of the item. </param> /// <param name="field">The field. </param> /// <returns>The field value. </returns> public object GetFieldValue(int itemIndex, Field field) { if (field == null) throw new ArgumentNullException("field"); var item = this.itemCollection[itemIndex]; return this.GetFieldValue(item, field); }
/// <summary>Gets the value of <paramref name="field"/> of <paramref name="item"/>. </summary> /// <exception cref="ArgumentNullException">Thrown when one or more required arguments are null. </exception> /// <param name="item">The item. </param> /// <param name="field">The field. </param> /// <returns>The field value. </returns> public object GetFieldValue(Item item, Field field) { if (item == null) throw new ArgumentNullException("item"); if (field == null) throw new ArgumentNullException("field"); return item.Values[field.Index]; }
public void ExoticCoverage() { var f = new Field(); Executing.This(() => f.GetValue(null)).Should().Throw<ArgumentNullException>(); }