Show / Hide Table of Contents

Class SubcircuitRules

A wrapper for handling rules with subcircuits.

Inheritance
object
ParameterSet
ParameterSetCollection
SubcircuitRules
Implements
IRules
IParameterSetCollection
IParameterSet
IEnumerable<IRule>
IEnumerable
Inherited Members
ParameterSetCollection.SetParameter<P>(string, P)
ParameterSetCollection.TrySetParameter<P>(string, P)
ParameterSetCollection.GetProperty<P>(string)
ParameterSetCollection.TryGetProperty<P>(string, out P)
ParameterSetCollection.CreateParameterSetter<P>(string)
ParameterSetCollection.CreatePropertyGetter<P>(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 parent or parameters is null.

TypeNotFoundException

Thrown if parent does not define a ComponentRuleParameters.

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
ParameterSetCollection.ParameterSets

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
ParameterSetCollection.GetParameterSet<P>()
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

true if the parameter set was found; otherwise, false.

Type Parameters
Name Description
P

The parameter set type.

Overrides
ParameterSetCollection.TryGetParameterSet<P>(out P)

Implements

IRules
IParameterSetCollection
IParameterSet
IEnumerable<T>
IEnumerable

Extension Methods

Utility.ThrowIfNull<T>(T, string)
Documentation.ParameterValues<T>(IParameterSet, bool)
Documentation.Parameters(IParameterSet)
Documentation.ParameterValues<T>(IParameterSetCollection, bool)
Documentation.Parameters(IParameterSetCollection)
Utility.ThrowIfEmpty<T>(IEnumerable<T>, string)

See Also

IRules
In this article
Back to top Generated by DocFX