Show / Hide Table of Contents

Class BaseMapper<TElement>

Base mapper.

Inheritance
System.Object
BaseMapper<TElement>
ControlMapper
EntityGeneratorMapper
ExporterMapper
ModelGeneratorMapper
WaveformMapper
Implements
IMapper<TElement>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, TElement>>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 Source

BaseMapper()

Initializes a new instance of the BaseMapper<TElement> class.

Declaration
public BaseMapper()

Properties

| Improve this Doc View Source

Count

Gets the count of elements in mapper.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

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 Source

ContainsKey(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 key.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

IEnumerable.GetEnumerator()

The get enumerator.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

The System.Collections.IEnumerator.

Implements

IMapper<TElement>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX