Class PrintToken
Represents identifier and parameters with optional values.
Inheritance
System.Object
PrintToken
Assembly: NineDigit.eKasa.dll
Syntax
public abstract class PrintToken : Object
Constructors
PrintToken(String)
Declaration
protected PrintToken(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
PrintToken(String, IReadOnlyDictionary<String, String>)
Declaration
protected PrintToken(string id, IReadOnlyDictionary<string, string> parameters)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.String> |
parameters |
|
Fields
TokenDelimiter
Declaration
public const char TokenDelimiter = '\u001a'
Field Value
Type |
Description |
System.Char |
|
Properties
Item[String]
Declaration
protected string this[string key] { get; }
Parameters
Type |
Name |
Description |
System.String |
key |
|
Property Value
Type |
Description |
System.String |
|
Exceptions
Type |
Condition |
System.Collections.Generic.KeyNotFoundException |
The property is retrieved and key is not found.
|
Methods
ContainsKey(String)
Gets whether token contains specified parameter key.
Declaration
protected bool ContainsKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
GetIntValueOrDefault(String)
Gets the value associated with specified key
.
If key is not found, or value associated with given key is not integer, null
value is returned.
Declaration
protected Nullable<int> GetIntValueOrDefault(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Nullable<System.Int32> |
|
GetValueOrDefault(String)
Gets the value associated with specified key
.
If key is not found, null
value is returned.
Declaration
protected string GetValueOrDefault(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
TryGetEnumValue<TEnum>(String)
Gets enum value associated with specified key
.
If enum value can be parsed, true
is returned. false
otherwise.
Declaration
protected Nullable<TEnum> TryGetEnumValue<TEnum>(string key)
where TEnum : struct, ValueType
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Nullable<TEnum> |
|
Type Parameters
TryGetValue(String, out String)
Gets the value associated with specified key
.
Declaration
protected bool TryGetValue(string key, out string value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.String |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryParse(String, out PrintToken)
Declaration
public static bool TryParse(string data, out PrintToken token)
Parameters
Type |
Name |
Description |
System.String |
data |
|
PrintToken |
token |
|
Returns
Type |
Description |
System.Boolean |
|