Class BaseMapper<TElement>
Base mapper.
Inheritance
Implements
Inherited Members
Namespace: SpiceSharpParser.ModelReaders.Netlist.Spice.Mappings
Assembly: SpiceSharpParser.dll
Syntax
public class BaseMapper<TElement> : IMapper<TElement>, IEnumerable<KeyValuePair<string, TElement>>, IEnumerable where TElement : class
Type Parameters
Name | Description |
---|---|
TElement | Type of the element. |
Constructors
| Improve this Doc View SourceBaseMapper()
Initializes a new instance of the BaseMapper<TElement> class.
Declaration
public BaseMapper()
Properties
| Improve this Doc View SourceCount
Gets the count of elements in mapper.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Elements
Gets the mapping key to element.
Declaration
protected Dictionary<string, TElement> Elements { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, TElement> |
Methods
| Improve this Doc View SourceContainsKey(String, Boolean)
Returns a value indicating whether the mapper has a element for key
.
Declaration
public bool ContainsKey(string key, bool caseSensitive)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | A key. |
System.Boolean | caseSensitive | Is key case-sensitive. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the mapper has a element with given |
GetEnumerator()
The get enumerator.
Declaration
public IEnumerator<KeyValuePair<string, TElement>> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, TElement>> | The System.Collections.IEnumerator. |
GetValue(String, Boolean)
Gets the element for given key.
Declaration
public TElement GetValue(string key, bool caseSensitive)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | A key of element. |
System.Boolean | caseSensitive | Is key name case-sensitive. |
Returns
Type | Description |
---|---|
TElement | A reference to the element. |
Map(String, TElement)
Binds key with element.
Declaration
public virtual void Map(string key, TElement element)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of the element. |
TElement | element | Element to add. |
Map(String[], TElement)
Binds the element to the mapper.
Declaration
public virtual void Map(string[] keys, TElement element)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | keys | Keys. |
TElement | element | Element. |
TryGetValue(String, Boolean, out TElement)
Gets the element for given key.
Declaration
public bool TryGetValue(string key, bool caseSensitive, out TElement value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | A key of element. |
System.Boolean | caseSensitive | Is key name case-sensitive. |
TElement | value | A value of element. |
Returns
Type | Description |
---|---|
System.Boolean | A reference to the element. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
The get enumerator.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | The System.Collections.IEnumerator. |