Quickstarts.TestData.UpdateProcessedValues C# (CSharp) Method

UpdateProcessedValues() public method

Adds or updates a values in the specified processed dataset.
public UpdateProcessedValues ( ProcessedDataSetType dataset ) : void
dataset ProcessedDataSetType
return void
        public void UpdateProcessedValues(ProcessedDataSetType dataset, params DataValue[] newValues)
        {
            SortedDictionary<DateTime,DataValue> existingValues = ToDataValues(dataset.Values);

            if (newValues != null)
            {
                foreach (DataValue newValue in newValues)
                {
                    existingValues[newValue.SourceTimestamp] = newValue;
                }
            }

            dataset.Values = ToValueTypes(existingValues);
        }