Class DataUtils
Provides various extension methods for construction of FieldFilterFunc and casting rowsets
Inheritance
System.Object
DataUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX
Assembly: NFX.dll
Syntax
public static class DataUtils
Methods
AllButTheseFields(IEnumerable<String>, Boolean)
Converts field names separated by ',' or ';' into a FieldFilterFunction
Declaration
public static FieldFilterFunc AllButTheseFields(this IEnumerable<string> fields, bool caseSensitive = false)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.String> |
fields |
|
System.Boolean |
caseSensitive |
|
Returns
AllButTheseFields(String, Boolean)
Converts field names separated by ',' or ';' into a FieldFilterFunction
Declaration
public static FieldFilterFunc AllButTheseFields(this string fields, bool caseSensitive = false)
Parameters
Type |
Name |
Description |
System.String |
fields |
|
System.Boolean |
caseSensitive |
|
Returns
AsEnumerableOf<TRow>(IEnumerable<Row>)
Casts enumerable of rows (such as rowset) to the specified row type, returning empty enumerable if the source is null
Declaration
public static IEnumerable<TRow> AsEnumerableOf<TRow>(this IEnumerable<Row> source)where TRow : Row
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Row> |
source |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TRow> |
|
Type Parameters
Clone<TRow>(TRow, Boolean, Boolean, Func<String, Schema.FieldDef, Boolean>, Func<String, String, Boolean>)
If source is not null, creates a shallow clone using 'source.CopyFields(copy)'
Declaration
public static TRow Clone<TRow>(this TRow source, bool includeAmorphousData = true, bool invokeAmorphousAfterLoad = true, Func<string, Schema.FieldDef, bool> fieldFilter = null, Func<string, string, bool> amorphousFieldFilter = null)where TRow : Row
Parameters
Type |
Name |
Description |
TRow |
source |
|
System.Boolean |
includeAmorphousData |
|
System.Boolean |
invokeAmorphousAfterLoad |
|
System.Func<System.String, Schema.FieldDef, System.Boolean> |
fieldFilter |
|
System.Func<System.String, System.String, System.Boolean> |
amorphousFieldFilter |
|
Returns
Type Parameters
LoadEnumerable<TRow>(ICRUDOperations, Query<TRow>)
Loads rowset with rows cast per Query(T) or empty enum
Declaration
public static IEnumerable<TRow> LoadEnumerable<TRow>(this ICRUDOperations operations, Query<TRow> query)where TRow : Row
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TRow> |
|
Type Parameters
LoadEnumerableAsync<TRow>(ICRUDOperations, Query<TRow>)
Async version - loads rowset with rows cast per Query(T) or empty enum
Declaration
public static Task<IEnumerable<TRow>> LoadEnumerableAsync<TRow>(this ICRUDOperations operations, Query<TRow> query)where TRow : Row
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<TRow>> |
|
Type Parameters
LoadRow<TRow>(ICRUDOperations, Query<TRow>)
Loads one row cast per Query(T) or null
Declaration
public static TRow LoadRow<TRow>(this ICRUDOperations operations, Query<TRow> query)where TRow : Row
Parameters
Returns
Type Parameters
LoadRowAsync<TRow>(ICRUDOperations, Query<TRow>)
Async version - loads one row cast per Query(T) or null
Declaration
public static Task<TRow> LoadRowAsync<TRow>(this ICRUDOperations operations, Query<TRow> query)where TRow : Row
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<TRow> |
|
Type Parameters
OnlyTheseFields(IEnumerable<String>, Boolean)
Converts field names separated by ',' or ';' into a FieldFilterFunction
Declaration
public static FieldFilterFunc OnlyTheseFields(this IEnumerable<string> fields, bool caseSensitive = false)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.String> |
fields |
|
System.Boolean |
caseSensitive |
|
Returns
OnlyTheseFields(String, Boolean)
Converts field names separated by ',' or ';' into a FieldFilterFunction
Declaration
public static FieldFilterFunc OnlyTheseFields(this string fields, bool caseSensitive = false)
Parameters
Type |
Name |
Description |
System.String |
fields |
|
System.Boolean |
caseSensitive |
|
Returns