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
primaryKeystringThe primary key of the row.
valueTThe 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
primaryKeyis 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
keystringThe key of the row.
keyTypeKeyTypeThe key type.
valueTThe value to set.
timeoutTimeSpanThe maximum time to wait on the expected change.
expectedChangesExpectedChangesOne 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,expectedChangesis null.- TimeoutException
Expected change took too long.
- FormatException
One of the provided parameters is missing data.