Table of Contents

Class ParameterCollection

Namespace
TechnologySolutions.Rfid.AsciiProtocol.Parameters
Assembly
TechnologySolutions.Rfid.AsciiProtocol.Core.dll

Groups a collection of ICommandParameters into a set to be used as a single IParameterActions

public class ParameterCollection : IParameterAction, IEnumerable<ICommandParameter>, IEnumerable
Inheritance
ParameterCollection
Implements
Derived
Inherited Members
Extension Methods

Constructors

ParameterCollection()

Initializes a new instance of the ParameterCollection class

public ParameterCollection()

Properties

this[string]

Gets the ICommandParameter with the specified identifier

public ICommandParameter this[string parameterIdentifier] { get; }

Parameters

parameterIdentifier string

The character(s) used to identify the required parameter on the command line

Property Value

ICommandParameter

The requested parameter

Methods

Add(ICommandParameter)

Adds a parameter to the set

public void Add(ICommandParameter value)

Parameters

value ICommandParameter

The parameter to add

AddRange(IEnumerable<ICommandParameter>)

Add parameters to the set

public void AddRange(IEnumerable<ICommandParameter> values)

Parameters

values IEnumerable<ICommandParameter>

The parameters to add

AppendToCommandLine(StringBuilder)

Appends the parameters to the command line as required

public void AppendToCommandLine(StringBuilder line)

Parameters

line StringBuilder

The builder for the command line

Remarks

Most parameters have a not specified value which if set do not get output to the command line

GetEnumerator()

Returns an enumerator to iterate through the parameters

public IEnumerator<ICommandParameter> GetEnumerator()

Returns

IEnumerator<ICommandParameter>

The enumerator

ParseParameter(string)

Returns true if parameter is successfully parsed as a parameter value

public bool ParseParameter(string parameter)

Parameters

parameter string

The parameter to parse

Returns

bool

True if a parameter was matched and parsed successfully. False otherwise

Exceptions

ArgumentOutOfRangeException

If the value is outside the permitted range

FormatException

If the parameter is not in the expected format

Remove(string)

Removes a parameter from the set

public bool Remove(string parameterIdentifier)

Parameters

parameterIdentifier string

The character(s) used to identify the required parameter on the command line

Returns

bool

True if the parameter was removed

Reset()

Resets the parameters to their reset values

public void Reset()