From d9dfea8ef55de0d07d0159a4752a34b5cda557e8 Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Fri, 17 Jan 2020 22:43:11 +0100 Subject: [PATCH] Add remarks and better summary on SetVariesBy extension methods --- src/Umbraco.Core/ContentVariationExtensions.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/ContentVariationExtensions.cs b/src/Umbraco.Core/ContentVariationExtensions.cs index 4a918ca70d..7cec5df27f 100644 --- a/src/Umbraco.Core/ContentVariationExtensions.cs +++ b/src/Umbraco.Core/ContentVariationExtensions.cs @@ -305,6 +305,9 @@ namespace Umbraco.Core /// The content type. /// The variation to set or remove. /// If set to true sets the variation; otherwise, removes the variation. + /// + /// This method does not support setting the variation to nothing. + /// public static void SetVariesBy(this IContentTypeBase contentType, ContentVariation variation, bool value = true) => contentType.Variations = contentType.Variations.SetVariesBy(variation, value); /// @@ -313,17 +316,23 @@ namespace Umbraco.Core /// The property type. /// The variation to set or remove. /// If set to true sets the variation; otherwise, removes the variation. + /// + /// This method does not support setting the variation to nothing. + /// public static void SetVariesBy(this PropertyType propertyType, ContentVariation variation, bool value = true) => propertyType.Variations = propertyType.Variations.SetVariesBy(variation, value); /// - /// Sets or removes the variation depending on the specified value. + /// Returns the variations with the variation set or removed depending on the specified value. /// /// The existing variations. /// The variation to set or remove. /// If set to true sets the variation; otherwise, removes the variation. /// - /// The variations with the specified variation set or removed. + /// The variations with the variation set or removed. /// + /// + /// This method does not support setting the variation to nothing. + /// public static ContentVariation SetVariesBy(this ContentVariation variations, ContentVariation variation, bool value = true) { return value