private static void RemoveIdentifiableInformation(VstsDefinitionHttpClient client, params JObject[] definitions) { foreach (var definition in definitions) { foreach (JProperty property in client.FindIdentifiableDefinitionProperties(definition)) { property.Remove(); } } }
/// <summary> /// Copy all needed information according to <paramref name="client"/> from /// <paramref name="source"/> to <paramref name="destination"/>. /// </summary> private static void CopyIdentifiableInformation( VstsDefinitionHttpClient client, JObject source, JObject destination) { foreach (JProperty property in client.FindIdentifiableDefinitionProperties(source)) { // Find the parent object of the property in destination and assign value by name. destination.SelectToken(property.Parent.Path)[property.Name] = property.Value; } }