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);
Remarks
Make sure the element that contains the table on which you perform the operation is active and the column exists. If not, no exception will be thrown.
Exceptions
- ArgumentNullException
primaryKey
is null.
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);
Remarks
Make sure the element that contains the table on which you perform the operation is active and the column exists. If not, no exception will be thrown.
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
Remarks
Make sure the element that contains the table on which you perform the operation is active and the column exists. If not, no exception will be thrown.
Exceptions
- ArgumentNullException
key
,expectedChanges
is null.- TimeoutException
Expected change took too long.
- FormatException
One of the provided parameters is missing data.