From f0439742c7e108acc8fc827daca3f1599e624628 Mon Sep 17 00:00:00 2001 From: adams85 <31276480+adams85@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:10:56 +0200 Subject: [PATCH] XML documentation review Co-authored-by: Peter Csajtai --- src/ConfigCatClient/Models/Condition.cs | 3 +- src/ConfigCatClient/Models/Config.cs | 2 +- .../Models/PercentageOption.cs | 2 +- .../Models/PrerequisiteFlagComparator.cs | 6 +-- .../Models/PrerequisiteFlagCondition.cs | 5 +- src/ConfigCatClient/Models/Segment.cs | 2 +- .../Models/SegmentComparator.cs | 6 +-- .../Models/SegmentCondition.cs | 2 +- .../Models/SettingValueContainer.cs | 3 +- src/ConfigCatClient/Models/TargetingRule.cs | 5 +- src/ConfigCatClient/Models/UserComparator.cs | 54 +++++++++---------- src/ConfigCatClient/Models/UserCondition.cs | 6 ++- 12 files changed, 51 insertions(+), 45 deletions(-) diff --git a/src/ConfigCatClient/Models/Condition.cs b/src/ConfigCatClient/Models/Condition.cs index 3f5a2f24..ce3ef21c 100644 --- a/src/ConfigCatClient/Models/Condition.cs +++ b/src/ConfigCatClient/Models/Condition.cs @@ -1,7 +1,8 @@ namespace ConfigCat.Client; /// -/// Base interface for conditions. +/// Represents a condition. +/// Can be one of the following types: , or . /// public interface ICondition { } diff --git a/src/ConfigCatClient/Models/Config.cs b/src/ConfigCatClient/Models/Config.cs index 595dd9b1..98f19491 100644 --- a/src/ConfigCatClient/Models/Config.cs +++ b/src/ConfigCatClient/Models/Config.cs @@ -14,7 +14,7 @@ namespace ConfigCat.Client; /// -/// ConfigCat config. +/// Details of a ConfigCat config. /// public interface IConfig { diff --git a/src/ConfigCatClient/Models/PercentageOption.cs b/src/ConfigCatClient/Models/PercentageOption.cs index 0ef1d579..986f7426 100644 --- a/src/ConfigCatClient/Models/PercentageOption.cs +++ b/src/ConfigCatClient/Models/PercentageOption.cs @@ -10,7 +10,7 @@ namespace ConfigCat.Client; /// -/// Percentage option. +/// Represents a percentage option. /// public interface IPercentageOption : ISettingValueContainer { diff --git a/src/ConfigCatClient/Models/PrerequisiteFlagComparator.cs b/src/ConfigCatClient/Models/PrerequisiteFlagComparator.cs index c0694e30..2414e97d 100644 --- a/src/ConfigCatClient/Models/PrerequisiteFlagComparator.cs +++ b/src/ConfigCatClient/Models/PrerequisiteFlagComparator.cs @@ -1,17 +1,17 @@ namespace ConfigCat.Client; /// -/// Prerequisite flag condition operator. +/// Prerequisite flag comparison operator used during the evaluation process. /// public enum PrerequisiteFlagComparator : byte { /// - /// EQUALS - Is the evaluated value of the specified prerequisite flag equal to the comparison value? + /// EQUALS - It matches when the evaluated value of the specified prerequisite flag is equal to the comparison value. /// Equals = 0, /// - /// NOT EQUALS - Is the evaluated value of the specified prerequisite flag not equal to the comparison value? + /// NOT EQUALS - It matches when the evaluated value of the specified prerequisite flag is not equal to the comparison value. /// NotEquals = 1 } diff --git a/src/ConfigCatClient/Models/PrerequisiteFlagCondition.cs b/src/ConfigCatClient/Models/PrerequisiteFlagCondition.cs index 7ab4515e..059cf721 100644 --- a/src/ConfigCatClient/Models/PrerequisiteFlagCondition.cs +++ b/src/ConfigCatClient/Models/PrerequisiteFlagCondition.cs @@ -11,7 +11,7 @@ namespace ConfigCat.Client; /// -/// Prerequisite flag condition. +/// Describes a condition that is based on a prerequisite flag. /// public interface IPrerequisiteFlagCondition : ICondition { @@ -26,7 +26,8 @@ public interface IPrerequisiteFlagCondition : ICondition PrerequisiteFlagComparator Comparator { get; } /// - /// The value that the evaluated value of the prerequisite flag is compared to. Can be a value of the following types: , , or . + /// The value that the evaluated value of the prerequisite flag is compared to. + /// Can be a value of the following types: , , or . /// object ComparisonValue { get; } } diff --git a/src/ConfigCatClient/Models/Segment.cs b/src/ConfigCatClient/Models/Segment.cs index 9d5a9ce0..081c62e0 100644 --- a/src/ConfigCatClient/Models/Segment.cs +++ b/src/ConfigCatClient/Models/Segment.cs @@ -14,7 +14,7 @@ namespace ConfigCat.Client; /// -/// Segment. +/// Describes a segment. /// public interface ISegment { diff --git a/src/ConfigCatClient/Models/SegmentComparator.cs b/src/ConfigCatClient/Models/SegmentComparator.cs index 48c95f26..561cbe41 100644 --- a/src/ConfigCatClient/Models/SegmentComparator.cs +++ b/src/ConfigCatClient/Models/SegmentComparator.cs @@ -1,17 +1,17 @@ namespace ConfigCat.Client; /// -/// Segment condition operator. +/// Segment comparison operator used during the evaluation process. /// public enum SegmentComparator : byte { /// - /// IS IN SEGMENT - Does the conditions of the specified segment evaluate to true? + /// IS IN SEGMENT - It matches when the conditions of the specified segment are evaluated to true. /// IsIn, /// - /// IS NOT IN SEGMENT - Does the conditions of the specified segment evaluate to false? + /// IS NOT IN SEGMENT - It matches when the conditions of the specified segment are evaluated to false. /// IsNotIn, } diff --git a/src/ConfigCatClient/Models/SegmentCondition.cs b/src/ConfigCatClient/Models/SegmentCondition.cs index 5cd61ed2..95ab69e3 100644 --- a/src/ConfigCatClient/Models/SegmentCondition.cs +++ b/src/ConfigCatClient/Models/SegmentCondition.cs @@ -11,7 +11,7 @@ namespace ConfigCat.Client; /// -/// Segment condition. +/// Describes a condition that is based on a segment. /// public interface ISegmentCondition : ICondition { diff --git a/src/ConfigCatClient/Models/SettingValueContainer.cs b/src/ConfigCatClient/Models/SettingValueContainer.cs index 6eada59c..278bd6af 100644 --- a/src/ConfigCatClient/Models/SettingValueContainer.cs +++ b/src/ConfigCatClient/Models/SettingValueContainer.cs @@ -12,7 +12,8 @@ namespace ConfigCat.Client; public interface ISettingValueContainer { /// - /// Setting value. Can be a value of the following types: , , or . + /// Setting value. + /// Can be a value of the following types: , , or . /// object Value { get; } diff --git a/src/ConfigCatClient/Models/TargetingRule.cs b/src/ConfigCatClient/Models/TargetingRule.cs index b72146a9..6cb3ccbb 100644 --- a/src/ConfigCatClient/Models/TargetingRule.cs +++ b/src/ConfigCatClient/Models/TargetingRule.cs @@ -14,12 +14,13 @@ namespace ConfigCat.Client; /// -/// Targeting rule. +/// Describes a targeting rule. /// public interface ITargetingRule { /// - /// The list of conditions (where there is a logical AND relation between the items). + /// The list of conditions that are combined with the AND logical operator. + /// Items can be one of the following types: , or . /// IReadOnlyList Conditions { get; } diff --git a/src/ConfigCatClient/Models/UserComparator.cs b/src/ConfigCatClient/Models/UserComparator.cs index cdc05f9d..6e48ad17 100644 --- a/src/ConfigCatClient/Models/UserComparator.cs +++ b/src/ConfigCatClient/Models/UserComparator.cs @@ -1,137 +1,137 @@ namespace ConfigCat.Client; /// -/// User condition operator. +/// User Object attribute comparison operator used during the evaluation process. /// public enum UserComparator : byte { /// - /// CONTAINS ANY OF - Does the comparison attribute contain any of the comparison values as a substring? + /// CONTAINS ANY OF - It matches when the comparison attribute contains any comparison values as a substring. /// Contains = 2, /// - /// NOT CONTAINS ANY OF - Does the comparison attribute not contain any of the comparison values as a substring? + /// NOT CONTAINS ANY OF - It matches when the comparison attribute does not contain any comparison values as a substring. /// NotContains = 3, /// - /// IS ONE OF (semver) - Is the comparison attribute interpreted as a semantic version equal to any of the comparison values? + /// IS ONE OF (semver) - It matches when the comparison attribute interpreted as a semantic version is equal to any of the comparison values. /// SemVerOneOf = 4, /// - /// IS NOT ONE OF (semver) - Is the comparison attribute interpreted as a semantic version not equal to any of the comparison values? + /// IS NOT ONE OF (semver) - It matches when the comparison attribute interpreted as a semantic version is not equal to any of the comparison values. /// SemVerNotOneOf = 5, /// - /// < (semver) - Is the comparison attribute interpreted as a semantic version less than the comparison value? + /// < (semver) - It matches when the comparison attribute interpreted as a semantic version is less than the comparison value. /// SemVerLessThan = 6, /// - /// <= (semver) - Is the comparison attribute interpreted as a semantic version less than or equal to the comparison value? + /// <= (semver) - It matches when the comparison attribute interpreted as a semantic version is less than or equal to the comparison value. /// SemVerLessThanEqual = 7, /// - /// > (semver) - Is the comparison attribute interpreted as a semantic version greater than the comparison value? + /// > (semver) - It matches when the comparison attribute interpreted as a semantic version is greater than the comparison value. /// SemVerGreaterThan = 8, /// - /// >= (semver) - Is the comparison attribute interpreted as a semantic version greater than or equal to the comparison value? + /// >= (semver) - It matches when the comparison attribute interpreted as a semantic version is greater than or equal to the comparison value. /// SemVerGreaterThanEqual = 9, /// - /// = (number) - Is the comparison attribute interpreted as a decimal number equal to the comparison value? + /// = (number) - It matches when the comparison attribute interpreted as a decimal number is equal to the comparison value. /// NumberEqual = 10, /// - /// != (number) - Is the comparison attribute interpreted as a decimal number not equal to the comparison value? + /// != (number) - It matches when the comparison attribute interpreted as a decimal number is not equal to the comparison value. /// NumberNotEqual = 11, /// - /// < (number) - Is the comparison attribute interpreted as a decimal number less than the comparison value? + /// < (number) - It matches when the comparison attribute interpreted as a decimal number is less than the comparison value. /// NumberLessThan = 12, /// - /// <= (number) - Is the comparison attribute interpreted as a decimal number less than or equal to the comparison value? + /// <= (number) - It matches when the comparison attribute interpreted as a decimal number is less than or equal to the comparison value. /// NumberLessThanEqual = 13, /// - /// > (number) - Is the comparison attribute interpreted as a decimal number greater than the comparison value? + /// > (number) - It matches when the comparison attribute interpreted as a decimal number is greater than the comparison value. /// NumberGreaterThan = 14, /// - /// >= (number) - Is the comparison attribute interpreted as a decimal number greater than or equal to the comparison value? + /// >= (number) - It matches when the comparison attribute interpreted as a decimal number is greater than or equal to the comparison value. /// NumberGreaterThanEqual = 15, /// - /// IS ONE OF (hashed) - Is the comparison attribute equal to any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values)? + /// IS ONE OF (hashed) - It matches when the comparison attribute is equal to any of the comparison values (where the comparison is performed using the SHA256 hashes of the values). /// SensitiveOneOf = 16, /// - /// IS NOT ONE OF (hashed) - Is the comparison attribute not equal to any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values)? + /// IS NOT ONE OF (hashed) - It matches when the comparison attribute is not equal to any of the comparison values (where the comparison is performed using the SHA256 hashes of the values). /// SensitiveNotOneOf = 17, /// - /// BEFORE (UTC datetime) - Is the comparison attribute interpreted as the seconds elapsed since Unix Epoch less than the comparison value? + /// BEFORE (UTC datetime) - It matches when the comparison attribute interpreted as the seconds elapsed since Unix Epoch is less than the comparison value. /// DateTimeBefore = 18, /// - /// AFTER (UTC datetime) - Is the comparison attribute interpreted as the seconds elapsed since Unix Epoch greater than the comparison value? + /// AFTER (UTC datetime) - It matches when the comparison attribute interpreted as the seconds elapsed since Unix Epoch is greater than the comparison value. /// DateTimeAfter = 19, /// - /// EQUALS (hashed) - Is the comparison attribute equal to the comparison value (where the comparison is performed using the salted SHA256 hashes of the values)? + /// EQUALS (hashed) - It matches when the comparison attribute is equal to the comparison value (where the comparison is performed using the SHA256 hashes of the values). /// SensitiveTextEquals = 20, /// - /// NOT EQUALS (hashed) - Is the comparison attribute not equal to the comparison value (where the comparison is performed using the salted SHA256 hashes of the values)? + /// NOT EQUALS (hashed) - It matches when the comparison attribute is not equal to the comparison value (where the comparison is performed using the SHA256 hashes of the values). /// SensitiveTextNotEquals = 21, /// - /// STARTS WITH ANY OF (hashed) - Does the comparison attribute start with any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values)? + /// STARTS WITH ANY OF (hashed) - It matches when the comparison attribute starts with any of the comparison values (where the comparison is performed using the SHA256 hashes of the values). /// SensitiveTextStartsWith = 22, /// - /// NOT STARTS WITH ANY OF (hashed) - Does the comparison attribute not start with any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values)? + /// NOT STARTS WITH ANY OF (hashed) - It matches when the comparison attribute does not start with any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values). /// SensitiveTextNotStartsWith = 23, /// - /// ENDS WITH ANY OF (hashed) - Does the comparison attribute end with any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values)? + /// ENDS WITH ANY OF (hashed) - It matches when the comparison attribute ends with any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values). /// SensitiveTextEndsWith = 24, /// - /// NOT ENDS WITH ANY OF (hashed) - Does the comparison attribute not end with any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values)? + /// NOT ENDS WITH ANY OF (hashed) - It matches when the comparison attribute does not end with any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values). /// SensitiveTextNotEndsWith = 25, /// - /// ARRAY CONTAINS ANY OF (hashed) - Does the comparison attribute interpreted as a comma-separated list contain any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values)? + /// ARRAY CONTAINS ANY OF (hashed) - It matches when the comparison attribute interpreted as a comma-separated list contains any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values). /// SensitiveArrayContains = 26, /// - /// ARRAY NOT CONTAINS ANY OF (hashed) - Does the comparison attribute interpreted as a comma-separated list not contain any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values)? + /// ARRAY NOT CONTAINS ANY OF (hashed) - It matches when the comparison attribute interpreted as a comma-separated list does not contain any of the comparison values (where the comparison is performed using the salted SHA256 hashes of the values). /// SensitiveArrayNotContains = 27, } diff --git a/src/ConfigCatClient/Models/UserCondition.cs b/src/ConfigCatClient/Models/UserCondition.cs index 9467ca95..f90d10f5 100644 --- a/src/ConfigCatClient/Models/UserCondition.cs +++ b/src/ConfigCatClient/Models/UserCondition.cs @@ -2,6 +2,7 @@ using System.Collections.ObjectModel; using ConfigCat.Client.Utils; using ConfigCat.Client.Evaluation; +using System.Collections.Generic; #if USE_NEWTONSOFT_JSON using Newtonsoft.Json; @@ -12,7 +13,7 @@ namespace ConfigCat.Client; /// -/// User condition. +/// Describes a condition that is based on a User Object attribute. /// public interface IUserCondition : ICondition { @@ -27,7 +28,8 @@ public interface IUserCondition : ICondition UserComparator Comparator { get; } /// - /// The value that the attribute is compared to. Can be a value of the following types: (including a semantic version), or , where T is . + /// The value that the User Object attribute is compared to. + /// Can be a value of the following types: (including a semantic version), or where T is . /// object ComparisonValue { get; } }