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 : 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
stringThe 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 ParameterCollection Add(ICommandParameter value)
Parameters
value
ICommandParameterThe parameter to add
Returns
AddRange(IEnumerable<ICommandParameter>)
Add parameters to the set
public void AddRange(IEnumerable<ICommandParameter> values)
Parameters
values
IEnumerable<ICommandParameter>The parameters to add
Bool(string)
Returns the ParameterBool instance from parameters with the specified parameterIdentifier
public ParameterBool Bool(string parameterIdentifier)
Parameters
parameterIdentifier
stringThe identifier for the parameter
Returns
- ParameterBool
The ParameterBool with the specified parameter identifier
Enum<TEnum>(string)
Returns the ParameterEnum<TEnum> instance from parameters with the specified parameterIdentifier
public ParameterEnum<TEnum> Enum<TEnum>(string parameterIdentifier) where TEnum : struct
Parameters
parameterIdentifier
stringThe identifier for the parameter
Returns
- ParameterEnum<TEnum>
The ParameterEnum>TEnum> with the specified parameter identifier
Type Parameters
TEnum
GetEnumerator()
Returns an enumerator to iterate through the parameters
public IEnumerator<ICommandParameter> GetEnumerator()
Returns
- IEnumerator<ICommandParameter>
The enumerator
Number(string)
Returns the ParameterInt instance from parameters with the specified parameterIdentifier
public ParameterInt Number(string parameterIdentifier)
Parameters
parameterIdentifier
stringThe identifier for the parameter
Returns
- ParameterInt
The ParameterInt with the specified parameter identifier
Remove(string)
Removes a parameter from the set
public ParameterCollection Remove(string parameterIdentifier)
Parameters
parameterIdentifier
stringThe character(s) used to identify the required parameter on the command line
Returns
- ParameterCollection
True if the parameter was removed
Text(string)
Returns the ParameterText instance from parameters with the specified parameterIdentifier
public ParameterText Text(string parameterIdentifier)
Parameters
parameterIdentifier
stringThe identifier for the parameter
Returns
- ParameterText
The ParameterText with the specified parameter identifier
When(string)
Returns the ParameterDateTime instance from parameters with the specified parameterIdentifier
public ParameterDateTime When(string parameterIdentifier)
Parameters
parameterIdentifier
stringThe identifier for the parameter
Returns
- ParameterDateTime
The ParameterDateTime with the specified parameter identifier