Skip to content

Commit

Permalink
XML documentation review
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Csajtai <[email protected]>
  • Loading branch information
adams85 and z4kn4fein committed Oct 5, 2023
1 parent 4ed6d34 commit f043974
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 45 deletions.
3 changes: 2 additions & 1 deletion src/ConfigCatClient/Models/Condition.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace ConfigCat.Client;

/// <summary>
/// Base interface for conditions.
/// Represents a condition.
/// Can be one of the following types: <see cref="IUserCondition"/>, <see cref="ISegmentCondition"/> or <see cref="IPrerequisiteFlagCondition"/>.
/// </summary>
public interface ICondition { }

Expand Down
2 changes: 1 addition & 1 deletion src/ConfigCatClient/Models/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace ConfigCat.Client;

/// <summary>
/// ConfigCat config.
/// Details of a ConfigCat config.
/// </summary>
public interface IConfig
{
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigCatClient/Models/PercentageOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace ConfigCat.Client;

/// <summary>
/// Percentage option.
/// Represents a percentage option.
/// </summary>
public interface IPercentageOption : ISettingValueContainer
{
Expand Down
6 changes: 3 additions & 3 deletions src/ConfigCatClient/Models/PrerequisiteFlagComparator.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
namespace ConfigCat.Client;

/// <summary>
/// Prerequisite flag condition operator.
/// Prerequisite flag comparison operator used during the evaluation process.
/// </summary>
public enum PrerequisiteFlagComparator : byte
{
/// <summary>
/// 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.
/// </summary>
Equals = 0,

/// <summary>
/// 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.
/// </summary>
NotEquals = 1
}
5 changes: 3 additions & 2 deletions src/ConfigCatClient/Models/PrerequisiteFlagCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace ConfigCat.Client;

/// <summary>
/// Prerequisite flag condition.
/// Describes a condition that is based on a prerequisite flag.
/// </summary>
public interface IPrerequisiteFlagCondition : ICondition
{
Expand All @@ -26,7 +26,8 @@ public interface IPrerequisiteFlagCondition : ICondition
PrerequisiteFlagComparator Comparator { get; }

/// <summary>
/// The value that the evaluated value of the prerequisite flag is compared to. Can be a value of the following types: <see cref="bool"/>, <see cref="string"/>, <see cref="int"/> or <see cref="double"/>.
/// The value that the evaluated value of the prerequisite flag is compared to.
/// Can be a value of the following types: <see cref="bool"/>, <see cref="string"/>, <see cref="int"/> or <see cref="double"/>.
/// </summary>
object ComparisonValue { get; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigCatClient/Models/Segment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace ConfigCat.Client;

/// <summary>
/// Segment.
/// Describes a segment.
/// </summary>
public interface ISegment
{
Expand Down
6 changes: 3 additions & 3 deletions src/ConfigCatClient/Models/SegmentComparator.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
namespace ConfigCat.Client;

/// <summary>
/// Segment condition operator.
/// Segment comparison operator used during the evaluation process.
/// </summary>
public enum SegmentComparator : byte
{
/// <summary>
/// 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.
/// </summary>
IsIn,

/// <summary>
/// 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.
/// </summary>
IsNotIn,
}
2 changes: 1 addition & 1 deletion src/ConfigCatClient/Models/SegmentCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace ConfigCat.Client;

/// <summary>
/// Segment condition.
/// Describes a condition that is based on a segment.
/// </summary>
public interface ISegmentCondition : ICondition
{
Expand Down
3 changes: 2 additions & 1 deletion src/ConfigCatClient/Models/SettingValueContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ namespace ConfigCat.Client;
public interface ISettingValueContainer
{
/// <summary>
/// Setting value. Can be a value of the following types: <see cref="bool"/>, <see cref="string"/>, <see cref="int"/> or <see cref="double"/>.
/// Setting value.
/// Can be a value of the following types: <see cref="bool"/>, <see cref="string"/>, <see cref="int"/> or <see cref="double"/>.
/// </summary>
object Value { get; }

Expand Down
5 changes: 3 additions & 2 deletions src/ConfigCatClient/Models/TargetingRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
namespace ConfigCat.Client;

/// <summary>
/// Targeting rule.
/// Describes a targeting rule.
/// </summary>
public interface ITargetingRule
{
/// <summary>
/// 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: <see cref="IUserCondition"/>, <see cref="ISegmentCondition"/> or <see cref="IPrerequisiteFlagCondition"/>.
/// </summary>
IReadOnlyList<ICondition> Conditions { get; }

Expand Down
54 changes: 27 additions & 27 deletions src/ConfigCatClient/Models/UserComparator.cs
Original file line number Diff line number Diff line change
@@ -1,137 +1,137 @@
namespace ConfigCat.Client;

/// <summary>
/// User condition operator.
/// User Object attribute comparison operator used during the evaluation process.
/// </summary>
public enum UserComparator : byte
{
/// <summary>
/// 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.
/// </summary>
Contains = 2,

/// <summary>
/// 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.
/// </summary>
NotContains = 3,

/// <summary>
/// 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.
/// </summary>
SemVerOneOf = 4,

/// <summary>
/// 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.
/// </summary>
SemVerNotOneOf = 5,

/// <summary>
/// &lt; (semver) - Is the comparison attribute interpreted as a semantic version less than the comparison value?
/// &lt; (semver) - It matches when the comparison attribute interpreted as a semantic version is less than the comparison value.
/// </summary>
SemVerLessThan = 6,

/// <summary>
/// &lt;= (semver) - Is the comparison attribute interpreted as a semantic version less than or equal to the comparison value?
/// &lt;= (semver) - It matches when the comparison attribute interpreted as a semantic version is less than or equal to the comparison value.
/// </summary>
SemVerLessThanEqual = 7,

/// <summary>
/// &gt; (semver) - Is the comparison attribute interpreted as a semantic version greater than the comparison value?
/// &gt; (semver) - It matches when the comparison attribute interpreted as a semantic version is greater than the comparison value.
/// </summary>
SemVerGreaterThan = 8,

/// <summary>
/// &gt;= (semver) - Is the comparison attribute interpreted as a semantic version greater than or equal to the comparison value?
/// &gt;= (semver) - It matches when the comparison attribute interpreted as a semantic version is greater than or equal to the comparison value.
/// </summary>
SemVerGreaterThanEqual = 9,

/// <summary>
/// = (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.
/// </summary>
NumberEqual = 10,

/// <summary>
/// != (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.
/// </summary>
NumberNotEqual = 11,

/// <summary>
/// &lt; (number) - Is the comparison attribute interpreted as a decimal number less than the comparison value?
/// &lt; (number) - It matches when the comparison attribute interpreted as a decimal number is less than the comparison value.
/// </summary>
NumberLessThan = 12,

/// <summary>
/// &lt;= (number) - Is the comparison attribute interpreted as a decimal number less than or equal to the comparison value?
/// &lt;= (number) - It matches when the comparison attribute interpreted as a decimal number is less than or equal to the comparison value.
/// </summary>
NumberLessThanEqual = 13,

/// <summary>
/// &gt; (number) - Is the comparison attribute interpreted as a decimal number greater than the comparison value?
/// &gt; (number) - It matches when the comparison attribute interpreted as a decimal number is greater than the comparison value.
/// </summary>
NumberGreaterThan = 14,

/// <summary>
/// &gt;= (number) - Is the comparison attribute interpreted as a decimal number greater than or equal to the comparison value?
/// &gt;= (number) - It matches when the comparison attribute interpreted as a decimal number is greater than or equal to the comparison value.
/// </summary>
NumberGreaterThanEqual = 15,

/// <summary>
/// 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).
/// </summary>
SensitiveOneOf = 16,

/// <summary>
/// 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).
/// </summary>
SensitiveNotOneOf = 17,

/// <summary>
/// BEFORE (UTC datetime) - Is the comparison attribute interpreted as the seconds elapsed since <see href="https://en.wikipedia.org/wiki/Unix_time">Unix Epoch</see> less than the comparison value?
/// BEFORE (UTC datetime) - It matches when the comparison attribute interpreted as the seconds elapsed since <see href="https://en.wikipedia.org/wiki/Unix_time">Unix Epoch</see> is less than the comparison value.
/// </summary>
DateTimeBefore = 18,

/// <summary>
/// AFTER (UTC datetime) - Is the comparison attribute interpreted as the seconds elapsed since <see href="https://en.wikipedia.org/wiki/Unix_time">Unix Epoch</see> greater than the comparison value?
/// AFTER (UTC datetime) - It matches when the comparison attribute interpreted as the seconds elapsed since <see href="https://en.wikipedia.org/wiki/Unix_time">Unix Epoch</see> is greater than the comparison value.
/// </summary>
DateTimeAfter = 19,

/// <summary>
/// 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).
/// </summary>
SensitiveTextEquals = 20,

/// <summary>
/// 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).
/// </summary>
SensitiveTextNotEquals = 21,

/// <summary>
/// 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).
/// </summary>
SensitiveTextStartsWith = 22,

/// <summary>
/// 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).
/// </summary>
SensitiveTextNotStartsWith = 23,

/// <summary>
/// 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).
/// </summary>
SensitiveTextEndsWith = 24,

/// <summary>
/// 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).
/// </summary>
SensitiveTextNotEndsWith = 25,

/// <summary>
/// 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).
/// </summary>
SensitiveArrayContains = 26,

/// <summary>
/// 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).
/// </summary>
SensitiveArrayNotContains = 27,
}
6 changes: 4 additions & 2 deletions src/ConfigCatClient/Models/UserCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -12,7 +13,7 @@
namespace ConfigCat.Client;

/// <summary>
/// User condition.
/// Describes a condition that is based on a User Object attribute.
/// </summary>
public interface IUserCondition : ICondition
{
Expand All @@ -27,7 +28,8 @@ public interface IUserCondition : ICondition
UserComparator Comparator { get; }

/// <summary>
/// The value that the attribute is compared to. Can be a value of the following types: <see cref="string"/> (including a semantic version), <see cref="double"/> or <see langword="IReadOnlyList{T}" />, where T is <see cref="string"/>.
/// The value that the User Object attribute is compared to.
/// Can be a value of the following types: <see cref="string"/> (including a semantic version), <see cref="double"/> or <see cref="IReadOnlyList{T}" /> where T is <see cref="string"/>.
/// </summary>
object ComparisonValue { get; }
}
Expand Down

0 comments on commit f043974

Please sign in to comment.