Method GetValueByCase
- Namespace
- Skyline.DataMiner.DataSources.OpenConfig.Gnmi.Utils
- Assembly
- Skyline.DataMiner.DataSources.OpenConfig.Gnmi.dll
GetValueByCase(TypedValue, bool)
Given a gNMI TypedValue, will return the appropriate object type with the parsed value.
public static ParsedTypedValue GetValueByCase(TypedValue typedValue, bool isConvertBoolToInt)
Parameters
typedValue
TypedValueThe value to parse.
isConvertBoolToInt
boolIndicates if a bool value needs to be converted into an int.
Returns
- ParsedTypedValue
The value contained in an appropriate type: string, bool, double, long, ulong, byte[], or object when null.
Exceptions
- ArgumentException
When the underlying type is not recognized, this exception will throw what type is detected.