/// <summary> /// Gets the stored value in the column specified by name /// </summary> /// <typeparam name="T">Target type</typeparam> /// <param name="name">Name of the column</param> /// <returns></returns> public T GetValue <T>(string name) { if (!ColumnIndexes.ContainsKey(name)) { throw new ArgumentException(String.Format("Column {0} not found", name)); } return(GetValue <T>(ColumnIndexes[name])); }
/// <summary> /// Gets the stored value in the column specified by name. /// </summary> /// <typeparam name="T">Target type</typeparam> /// <param name="name">Name of the column</param> /// <returns></returns> public virtual T GetValue <T>(string name) { //The method is marked virtual to allow to be mocked if (!ColumnIndexes.ContainsKey(name)) { throw new ArgumentException(String.Format("Column {0} not found", name)); } return(GetValue <T>(ColumnIndexes[name])); }