Class ChoicePolicy
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
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
tracksbool
Returns
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
filterExpression<Func<T, bool>>
Returns
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
Type Parameters
T