Class TextConversion
Describes the information about text conversion. A text conversion consists of a table of text values and a corresponding set of raw values to which they equate. If there is no matching pair within the map then the default string/value pair is used.
Inherited Members
Namespace: MAT.AtlasSessionApi
Assembly: MAT.AtlasSessionApi.dll
Syntax
public sealed class TextConversion : Conversion
Constructors
TextConversion(String, String, String, IEnumerable<KeyValuePair<Double, String>>, String)
Initializes a new instance of text conversion.
Declaration
public TextConversion(string identifier, string units, string format, IEnumerable<KeyValuePair<double, string>> lookupTable, string defaultValue = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | identifier | Parameter identifier. |
System.String | units | Unit of the parameter. |
System.String | format | Format to display the data. |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Double, System.String>> | lookupTable | Lookup table for eqvivalent string value. |
System.String | defaultValue | Default string value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Throw the exception if input is null. |
Properties
DefaultValue
Gets the default value of lookup table.
Declaration
public string DefaultValue { get; }
Property Value
Type | Description |
---|---|
System.String |
LookupTable
Gets the lookup table of text conversion.
Declaration
public IReadOnlyDictionary<double, string> LookupTable { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.Double, System.String> |
Methods
Equals(Object)
Are two conversion objects equal?
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Input object. |
Returns
Type | Description |
---|---|
System.Boolean | true if objects are equal else false. |
Overrides
GetHashCode()
Get the hash code for algorithms that need quick checks of object equality.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code number. |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Operators
Equality(TextConversion, TextConversion)
Are two conversions equal?
Declaration
public static bool operator ==(TextConversion left, TextConversion right)
Parameters
Type | Name | Description |
---|---|---|
TextConversion | left | Left text conversion object. |
TextConversion | right | Right text conversion object. |
Returns
Type | Description |
---|---|
System.Boolean | true in case both objects are same else false. |
Inequality(TextConversion, TextConversion)
Are two conversions unequal?
Declaration
public static bool operator !=(TextConversion left, TextConversion right)
Parameters
Type | Name | Description |
---|---|---|
TextConversion | left | Left text conversion object. |
TextConversion | right | Right text conversion object. |
Returns
Type | Description |
---|---|
System.Boolean | true in case both objects are not same else false. |