Example #1
0
 /// <summary>
 /// Gets the field value.
 /// </summary>
 /// <param name="info">The field info.</param>
 /// <param name="row">The row.</param>
 /// <returns>value as object</returns>
 protected object GetFieldValue(FieldInformation info, T row)
 {
     try
     {
         if (info.GetFieldCallback != null)
         {
             // caller supplied a callback to get the value
             return(info.GetFieldCallback(info, row));
         }
         return(info.IsProperty
                    ? info.ProInfo.GetValue(row, null)
                    : info.FieldInfo.GetValue(row));
     }
     catch (Exception e)
     {
         throw new EnaxosExportException(string.Format(AppResources.ExportBase_GetFieldValue_Can_t_read_property__0_, info.Name), e);
     }
 }