Method SetValue
- Namespace
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Assembly
- Skyline.DataMiner.Core.DataMinerSystem.Common.dll
SetValue(string, T)
Sets the value of a cell in a table.
void SetValue(string primaryKey, T value)
Parameters
primaryKey
stringThe primary key of the row.
value
TThe value to set.
Examples
IDms myDms = protocol.GetDms();
IDmsElement element = myDms.GetElement(new DmsElementId(346, 100));
var table = element.GetTable(1000);
var column = table.GetColumn<double?>(1004);
column.SetValue("PK 1", 10.0);
Exceptions
- ArgumentNullException
primaryKey
is null.- ElementNotFoundException
The element was not found in the DataMiner System.
- ElementStoppedException
The element is stopped.
SetValue(string, KeyType, T)
Sets the value of a cell in a table.
void SetValue(string key, KeyType keyType, T value)
Parameters
Examples
IDms myDms = protocol.GetDms();
IDmsElement element = myDms.GetElement(new DmsElementId(346, 100));
var table = element.GetTable(1000);
var column = table.GetColumn<double?>(1004);
column.SetValue("PK 1", KeyType.PrimaryKey, 10.0);
Exceptions
- ElementNotFoundException
The element was not found in the DataMiner System.
- ElementStoppedException
The element is stopped.
SetValue(string, KeyType, T, TimeSpan, ExpectedChanges)
Sets the value of a cell in a table and waits on specified expected changes.
void SetValue(string key, KeyType keyType, T value, TimeSpan timeout, ExpectedChanges expectedChanges)
Parameters
key
stringThe key of the row.
keyType
KeyTypeThe key type.
value
TThe value to set.
timeout
TimeSpanThe maximum time to wait on the expected change.
expectedChanges
ExpectedChangesOne or more expected changes. Can be CellValue or ParamValue
Exceptions
- ArgumentNullException
key
,expectedChanges
is null.- ElementNotFoundException
The element was not found in the DataMiner System.
- ElementStoppedException
The element is stopped.
- TimeoutException
Expected change took too long.
- FormatException
One of the provided parameters is missing data.