Table of Contents

Class ChoicePolicy

Namespace
The.Entities
Assembly
Instagile.dll

The default IChoicePolicy: reference data offers only active entities and tracks activity, other types are unfiltered. Per-type exceptions are added fluently.

public sealed class ChoicePolicy : IChoicePolicy
Inheritance
ChoicePolicy
Implements
Inherited Members

Properties

Default

public static ChoicePolicy Default { get; }

Property Value

ChoicePolicy

Methods

ActiveOnly<T>()

The filter reference data receives by default.

public static Expression<Func<T, bool>> ActiveOnly<T>() where T : IEntity<T>

Returns

Expression<Func<T, bool>>

Type Parameters

T

HasActivity<T>(bool)

Presents, or hides, the "Active" criterion and activate/deactivate commands for T.

public ChoicePolicy HasActivity<T>(bool tracks = true) where T : IEntity<T>

Parameters

tracks bool

Returns

ChoicePolicy

Type Parameters

T

With<T>(Expression<Func<T, bool>>)

Offers only entities matching filter when T is looked up without explicit choices.

public ChoicePolicy With<T>(Expression<Func<T, bool>> filter) where T : IEntity<T>

Parameters

filter Expression<Func<T, bool>>

Returns

ChoicePolicy

Type Parameters

T

Without<T>()

Offers every entity of T when it is looked up without explicit choices.

public ChoicePolicy Without<T>() where T : IEntity<T>

Returns

ChoicePolicy

Type Parameters

T