Class BaseRules
A base rule provider implementation.
Inherited Members
Namespace: SpiceSharp.Validation
Assembly: SpiceSharp.dll
Syntax
public abstract class BaseRules : ParameterSetCollection, IRules, IParameterSetCollection, IParameterSet, IEnumerable<IRule>, IEnumerable
Properties
ViolationCount
Gets the number of rules that are violated.
Declaration
public int ViolationCount { get; }
Property Value
Type | Description |
---|---|
int | The number of violated rules. |
Violations
Gets the violated rules.
Declaration
public IEnumerable<IRuleViolation> Violations { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IRuleViolation> | The violated rules. |
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public abstract IEnumerator<IRule> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<IRule> | An enumerator that can be used to iterate through the collection. |
GetRules<R>()
Gets all rules of the specified type.
Declaration
public IEnumerable<R> GetRules<R>() where R : IRule
Returns
Type | Description |
---|---|
IEnumerable<R> | The rules of the specified type. |
Type Parameters
Name | Description |
---|---|
R | The rule type. |
Reset()
Resets all the rules.
Declaration
public virtual void Reset()