Class SubcircuitRules
A wrapper for handling rules with subcircuits.
Inherited Members
Namespace: SpiceSharp.Components.Subcircuits
Assembly: SpiceSharp.dll
Syntax
public class SubcircuitRules : ParameterSetCollection, IRules, IParameterSetCollection, IParameterSet, IEnumerable<IRule>, IEnumerable
Constructors
SubcircuitRules(IRules, ComponentRuleParameters)
Initializes a new instance of the SubcircuitRules class.
Declaration
public SubcircuitRules(IRules parent, ComponentRuleParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
IRules | parent | The parent. |
ComponentRuleParameters | parameters | The parameters. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
TypeNotFoundException | Thrown if |
Properties
ParameterSets
Gets all the parameter sets of this instance.
Declaration
public override IEnumerable<IParameterSet> ParameterSets { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IParameterSet> | The parameter sets. |
Overrides
ViolationCount
Gets the number of rule violations.
Declaration
public int ViolationCount { get; }
Property Value
Type | Description |
---|---|
int | The number of rule violations. |
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 IEnumerator<IRule> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<IRule> | An enumerator that can be used to iterate through the collection. |
GetParameterSet<P>()
Gets the parameter set of the specified type.
Declaration
public override P GetParameterSet<P>() where P : IParameterSet, ICloneable<P>
Returns
Type | Description |
---|---|
P | The parameter set. |
Type Parameters
Name | Description |
---|---|
P | The parameter set type. |
Overrides
Exceptions
Type | Condition |
---|---|
TypeNotFoundException | Thrown if the parameter set could not be found. |
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 void Reset()
TryGetParameterSet<P>(out P)
Tries to get the parameter set of the specified type.
Declaration
public override bool TryGetParameterSet<P>(out P value) where P : IParameterSet, ICloneable<P>
Parameters
Type | Name | Description |
---|---|---|
P | value | The parameter set. |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
P | The parameter set type. |