/// <summary> /// Merges the existing row data with a new data set, returning the resulting merge. The two existing data sets are not changed by this merge. /// </summary> /// <param name="dictionary">The new data set to merge with</param> /// <returns>Returns a single data set, representing the merge of the two data sets</returns> public DataSetRow Merge(DataSetRow dictionary) { DataSetRow merged = Copy(); dictionary?.ToList().ForEach(p => merged[p.Key] = p.Value); return(merged); }
/// <summary> /// Applies all values within the supplied <see cref="DataSetRow"/> to the current <see cref="DataSetRow"/>, overwriting all keys /// </summary> /// <param name="dictionary">The new data set to apply from</param> public void Apply(DataSetRow dictionary) { dictionary?.ToList().ForEach(p => this[p.Key] = p.Value); }