private NameValueCollection GetModifiedProperties(WorkItemProperties propertyUpdate) { var modifiedProperties = new NameValueCollection(_properties); foreach (var key in propertyUpdate.AllKeys) { var newValue = propertyUpdate[key]; if (string.IsNullOrEmpty(newValue)) { modifiedProperties.Remove(key); } else { modifiedProperties[key] = newValue; } } return(modifiedProperties); }
public WorkItem UpdateProperties(WorkItemProperties properties) { var modifiedProperties = GetModifiedProperties(properties); return(new WorkItem(Id, Path, Classes, Status, Parent, _ordinal, modifiedProperties, Timestamp, LastMoved)); }