private decimal GetParsedFilterValueToDecimal(FilterProtocol filter, string tableName)
 {
     try
     {
         return(decimal.Parse(filter.Value));
     }
     catch (Exception ex)
     {
         throw new ApplicationException(
                   string.Format("Could not parse value '{0}' as a Decimal for field '{1}' on object '{2}'.",
                                 filter.Value, filter.Field, tableName), ex);
     }
 }
 private int GetParsedFilterValueToInetger(FilterProtocol filter, string tableName)
 {
     try
     {
         return(int.Parse(filter.Value));
     }
     catch (Exception ex)
     {
         throw new ApplicationException(
                   string.Format("Could not parse value '{0}' as an Integer for field '{1}' on object '{2}'.",
                                 filter.Value, filter.Field, tableName), ex);
     }
 }
 private object GetParsedFilterOperation(Type opEnum, FilterProtocol filter, string tableName)
 {
     try
     {
         return(Enum.Parse(opEnum, filter.Operation, true));
     }
     catch (ArgumentException ex)
     {
         throw new ApplicationException(
                   string.Format("Could not parse operation '{0}' as an op enum '{1}' for field '{2}' on object '{3}'.",
                                 filter.Operation, opEnum, filter.Field, tableName), ex);
     }
 }