Class ParameterCollection
A ordered collection of parameters.
Inherited Members
Namespace: SpiceSharpParser.Models.Netlist.Spice.Objects
Assembly: SpiceSharpParser.dll
Syntax
public class ParameterCollection : SpiceObject, IEnumerable<Parameter>, IEnumerable
Constructors
| Improve this Doc View SourceParameterCollection()
Initializes a new instance of the ParameterCollection class.
Declaration
public ParameterCollection()
ParameterCollection(List<Parameter>)
Initializes a new instance of the ParameterCollection class.
Declaration
public ParameterCollection(List<Parameter> values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<Parameter> | values |
Properties
| Improve this Doc View SourceCount
Gets the count of parameters in the collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Gets the parameter at specified index.
Declaration
public Parameter this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of parameter. |
Property Value
Type | Description |
---|---|
Parameter | A reference to parameter. |
LineInfo
Declaration
public override SpiceLineInfo LineInfo { get; }
Property Value
Type | Description |
---|---|
SpiceLineInfo |
Overrides
| Improve this Doc View SourceValues
Gets the values of parameters.
Declaration
protected List<Parameter> Values { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Parameter> |
Methods
| Improve this Doc View SourceAdd(Parameter)
Adds parameter to the collection.
Declaration
public void Add(Parameter parameter)
Parameters
Type | Name | Description |
---|---|---|
Parameter | parameter | A parameter to add. |
Clear()
Clears the collection.
Declaration
public void Clear()
Clone()
Creates a new clone of the collection.
Declaration
public override SpiceObject Clone()
Returns
Type | Description |
---|---|
SpiceObject | A new collection of parameters. |
Overrides
| Improve this Doc View SourceGet(Int32)
Gets the string from parameter in the collection. Throws an exception if parameter is not SingleParameter.
Declaration
public Parameter Get(int parameterIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | parameterIndex | An index of parameter. |
Returns
Type | Description |
---|---|
Parameter | A string from parameter. |
GetEnumerator()
Gets an enumerator of parameters in collection.
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | A new enumerator. |
IndexOf(Parameter)
Declaration
public int IndexOf(Parameter parameter)
Parameters
Type | Name | Description |
---|---|---|
Parameter | parameter |
Returns
Type | Description |
---|---|
System.Int32 |
Insert(Int32, Parameter)
Inserts a parameter at the specified index in the collection.
Declaration
public void Insert(int index, Parameter parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | An index. |
Parameter | parameter | A parameter to insert. |
IsValueString(Int32)
Gets the value string from parameter in the collection. Throws an exception if parameter is not a value type parameter.
Declaration
public bool IsValueString(int parameterIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | parameterIndex | An index of parameter. |
Returns
Type | Description |
---|---|
System.Boolean | A value from parameter. |
Merge(ParameterCollection)
Merges a collection to the current collection.
Declaration
public void Merge(ParameterCollection collection)
Parameters
Type | Name | Description |
---|---|---|
ParameterCollection | collection | A collection to merge. |
Remove(Parameter)
Removes the parameter at the specified index.
Declaration
public void Remove(Parameter parameter)
Parameters
Type | Name | Description |
---|---|---|
Parameter | parameter | Parameter to remove. |
RemoveAt(Int32)
Removes the parameter at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | An index of parameter to remove. |
Set(ParameterCollection)
Set parameters from a collection to the current collection.
Declaration
public void Set(ParameterCollection collection)
Parameters
Type | Name | Description |
---|---|---|
ParameterCollection | collection | A collection to merge. |
Skip(Int32)
Creates a clone of the current collection without first 'count' elements.
Declaration
public ParameterCollection Skip(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | Number of parameters to skip. |
Returns
Type | Description |
---|---|
ParameterCollection | A new collection of parameters. |
Take(Int32)
Creates a clone of the current collection with first 'count' elements.
Declaration
public ParameterCollection Take(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | Number of parameters to take. |
Returns
Type | Description |
---|---|
ParameterCollection | A new collection of parameters. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable<Parameter>.GetEnumerator()
Gets typed enumerator of parameters in collection.
Declaration
IEnumerator<Parameter> IEnumerable<Parameter>.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<Parameter> | A new enumerator. |