Quickstarts.TestData.UpdateProcessedValues C# (CSharp) 메소드

UpdateProcessedValues() 공개 메소드

Adds or updates a values in the specified processed dataset.
public UpdateProcessedValues ( ProcessedDataSetType dataset ) : void
dataset ProcessedDataSetType
리턴 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);
        }