src/Azos/DataUtils.cs
/// <summary>
/// Converts field names separated by ',' or ';' into a FieldFilterFunction
/// </summary>
Converts field names separated by ',' or ';' into a FieldFilterFunction
Converts field names separated by ' ' or ' ; ' into a FieldFilterFunction
public static FieldFilterFunc AllButTheseFields(this IEnumerable<string> fields, bool caseSensitive = false)
    {
      if (fields==null) return (row, key, fdef) => false;
      var names = fields.Where(n => n.IsNotNullOrWhiteSpace()).Select( n => n.Trim());
      return (row, key, fdef) => !fields.Contains(fdef.Name, caseSensitive ? StringComparer.InvariantCulture : StringComparer.InvariantCultureIgnoreCase);
    }
public static FieldFilterFunc AllButTheseFields ( this IEnumerable < string > fields , bool caseSensitive = false ) { if ( fields == null ) return ( row , key , fdef ) => false ; var names = fields . Where ( n => n . IsNotNullOrWhiteSpace ( ) ) . Select ( n => n . Trim ( ) ) ; return ( row , key , fdef ) => ! fields . Contains ( fdef . Name , caseSensitive ? StringComparer . InvariantCulture : StringComparer . InvariantCultureIgnoreCase ) ; }
Converts field names separated by ',' or ';' into a FieldFilterFunction
Converts field names separated by ' ' or ' ; ' into a FieldFilterFunction
IEnumerable<string>
this
caseSensitive
bool