예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <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];
        }
예제 #3
0
 public void ExoticCoverage()
 {
     var f = new Field();
     Executing.This(() => f.GetValue(null)).Should().Throw<ArgumentNullException>();
 }