Table of Contents

Class SpecExtensions

Namespace
Motiv
Assembly
Motiv.dll

Provides extension methods for predicates. These methods convert predicates into propositions.

public static class SpecExtensions
Inheritance
SpecExtensions
Inherited Members

Methods

AndAlsoTogether<TModel, TMetadata>(IEnumerable<SpecBase<TModel, TMetadata>>)

Combines a collection of propositions using the conditional AND operator (i.e. &&).

public static SpecBase<TModel, TMetadata> AndAlsoTogether<TModel, TMetadata>(this IEnumerable<SpecBase<TModel, TMetadata>> propositions)

Parameters

propositions IEnumerable<SpecBase<TModel, TMetadata>>

the propositions to apply the AND operator to.

Returns

SpecBase<TModel, TMetadata>

A single specification that represents the conitional AND of all the input boolean results.

Type Parameters

TModel

The type of the model.

TMetadata

The type of the metadata.

AndTogether<TModel, TMetadata>(IEnumerable<SpecBase<TModel, TMetadata>>)

Combines a collection of propositions using the logical AND operator (i.e. &)..

public static SpecBase<TModel, TMetadata> AndTogether<TModel, TMetadata>(this IEnumerable<SpecBase<TModel, TMetadata>> propositions)

Parameters

propositions IEnumerable<SpecBase<TModel, TMetadata>>

the propositions to apply the AND operator to.

Returns

SpecBase<TModel, TMetadata>

A single specification that represents the logical AND of all the input propositions.

Type Parameters

TModel

The type of the model.

TMetadata

The type of the metadata.

OrElseTogether<TModel, TMetadata>(IEnumerable<SpecBase<TModel, TMetadata>>)

Combines a collection of propositions using the conditional OR operator (i.e. ||).

public static SpecBase<TModel, TMetadata> OrElseTogether<TModel, TMetadata>(this IEnumerable<SpecBase<TModel, TMetadata>> propositions)

Parameters

propositions IEnumerable<SpecBase<TModel, TMetadata>>

The propositions to apply the OR operator to.

Returns

SpecBase<TModel, TMetadata>

A single specification that represents the conditional OR of all the input propositions.

Type Parameters

TModel

The type of the model.

TMetadata

The type of the metadata.

OrTogether<TModel, TMetadata>(IEnumerable<SpecBase<TModel, TMetadata>>)

Combines a collection of propositions using the logical OR operator (i.e. |).

public static SpecBase<TModel, TMetadata> OrTogether<TModel, TMetadata>(this IEnumerable<SpecBase<TModel, TMetadata>> propositions)

Parameters

propositions IEnumerable<SpecBase<TModel, TMetadata>>

The propositions to apply the OR operator to

Returns

SpecBase<TModel, TMetadata>

A single specification that represents the logical OR of all the input propositions.

Type Parameters

TModel

The type of the model.

TMetadata

The type of the metadata.