Table of Contents

Class ModelResultExtensions

Namespace
Motiv
Assembly
Motiv.dll

Extension methods for collections of ModelResult<TModel>.

public static class ModelResultExtensions
Inheritance
ModelResultExtensions
Inherited Members

Methods

AllFalse<TModel>(IEnumerable<ModelResult<TModel>>)

Checks if all model-results in a collection are false.

public static bool AllFalse<TModel>(this IEnumerable<ModelResult<TModel>> results)

Parameters

results IEnumerable<ModelResult<TModel>>

The collection of model-results to check.

Returns

bool

True if all model-results are false, false otherwise.

Type Parameters

TModel

The type of model.

AllTrue<TModel>(IEnumerable<ModelResult<TModel>>)

Checks if all model-results in a collection are true.

public static bool AllTrue<TModel>(this IEnumerable<ModelResult<TModel>> results)

Parameters

results IEnumerable<ModelResult<TModel>>

The collection of model-results to check.

Returns

bool

True if all model-results are true, false otherwise.

Type Parameters

TModel

The type of model.

AnyFalse<TModel>(IEnumerable<ModelResult<TModel>>)

Checks if any model-results in a collection are false.

public static bool AnyFalse<TModel>(this IEnumerable<ModelResult<TModel>> results)

Parameters

results IEnumerable<ModelResult<TModel>>

The collection of model-results to check.

Returns

bool

True if any model-results is false, false otherwise.

Type Parameters

TModel

The type of model.

AnyTrue<TModel>(IEnumerable<ModelResult<TModel>>)

Checks if any model-results in a collection are true.

public static bool AnyTrue<TModel>(this IEnumerable<ModelResult<TModel>> results)

Parameters

results IEnumerable<ModelResult<TModel>>

The collection of model-results to check.

Returns

bool

True if any model-results is true, false otherwise.

Type Parameters

TModel

The type of model.

CountFalse<TModel>(IEnumerable<ModelResult<TModel>>)

Counts the number of model-results in a collection where the result is false.

public static int CountFalse<TModel>(this IEnumerable<ModelResult<TModel>> results)

Parameters

results IEnumerable<ModelResult<TModel>>

The collection of model-results to count.

Returns

int

The count of the model-results where the result is false.

Type Parameters

TModel

The type of model.

CountTrue<TModel>(IEnumerable<ModelResult<TModel>>)

Counts the number of model-results in a collection where the result is true.

public static int CountTrue<TModel>(this IEnumerable<ModelResult<TModel>> results)

Parameters

results IEnumerable<ModelResult<TModel>>

The collection of model-results to count.

Returns

int

The count of the model-results where the result is true.

Type Parameters

TModel

The type of model.

WhereFalse<TModel>(IEnumerable<ModelResult<TModel>>)

Filters a collection of model-results, returning only those where the result is false.

public static IEnumerable<ModelResult<TModel>> WhereFalse<TModel>(this IEnumerable<ModelResult<TModel>> results)

Parameters

results IEnumerable<ModelResult<TModel>>

The collection of model-results to filter.

Returns

IEnumerable<ModelResult<TModel>>

A collection of model-results where the result is false.

Type Parameters

TModel

The type of model.

WhereTrue<TModel>(IEnumerable<ModelResult<TModel>>)

Filters a collection of model-results, returning only those where the result is true.

public static IEnumerable<ModelResult<TModel>> WhereTrue<TModel>(this IEnumerable<ModelResult<TModel>> results)

Parameters

results IEnumerable<ModelResult<TModel>>

The collection of models to filter.

Returns

IEnumerable<ModelResult<TModel>>

A collection of model-results where the result is true.

Type Parameters

TModel

The type of model.