-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Range<T> XML docs #63
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First part.
присутствия -> включённости Co-authored-by: Konstantin Dyachenko <konard@me.com>
Co-authored-by: Konstantin Dyachenko <konard@me.com>
Co-authored-by: Konstantin Dyachenko <konard@me.com>
Co-authored-by: Konstantin Dyachenko <konard@me.com>
…nimum` and `maximum`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More changes required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we also have to change code here at the same time.
/// <para>Returns maximum value of the range.</para> | ||
/// <para>Возвращает максимальное значение диапазона.</para> | ||
/// <para>A read-only field that represents a maximum value of the range.</para> | ||
/// <para>оле для чтения, которое представляет максимальное значение диапазона.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>оле для чтения, которое представляет максимальное значение диапазона.</para> | |
/// <para>Поле для чтения, которое представляет максимальное значение диапазона.</para> |
/// <para>Initializes a new instance of the Range class.</para> | ||
/// <para>Инициализирует новый экземпляр класса Range.</para> | ||
/// <para>Initializes a new instance of the <see cref="Range{T}"/> structure with a single specified value as minimum and maximum values.</para> | ||
/// <para>Инициализирует новый экземпляр структуры <see cref="Range{T}"/> с одним указанным значением в качестве минимального и максимального значений.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>Инициализирует новый экземпляр структуры <see cref="Range{T}"/> с одним указанным значением в качестве минимального и максимального значений.</para> | |
/// <para>Инициализирует новый экземпляр структуры <see cref="Range{T}"/> с одним значением для <see cref="Minimum"/> и <see cref="Maximum"/>.</para> |
/// </summary> | ||
public readonly T Maximum; | ||
|
||
/// <summary> | ||
/// <para>Initializes a new instance of the Range class.</para> | ||
/// <para>Инициализирует новый экземпляр класса Range.</para> | ||
/// <para>Initializes a new instance of the <see cref="Range{T}"/> structure with a single specified value as minimum and maximum values.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>Initializes a new instance of the <see cref="Range{T}"/> structure with a single specified value as minimum and maximum values.</para> | |
/// <para>Initializes a new instance of the <see cref="Range{T}"/> structure with a single value for <see cref="Minimum"/> and <see cref="Maximum"/>.</para> |
/// </summary> | ||
/// <param name="minimumAndMaximum"><para>Single value for both Minimum and Maximum fields.</para><para>Одно значение для полей Minimum и Maximum.</para></param> | ||
/// <param name="minimumAndMaximum"> | ||
/// <para>A single value for the both <see cref="Minimum"/> and <see cref="Maximum"/>.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>A single value for the both <see cref="Minimum"/> and <see cref="Maximum"/>.</para> | |
/// <para>A single value for <see cref="Minimum"/> and <see cref="Maximum"/>.</para> |
@@ -43,12 +46,21 @@ public Range(T minimumAndMaximum) | |||
} | |||
|
|||
/// <summary> | |||
/// <para>Initializes a new instance of the Range class.</para> | |||
/// <para>Инициализирует новый экземпляр класса Range.</para> | |||
/// <para>Initializes a new instance of the <see cref="Range{T}"/> structure with the specified minimum and maximum values.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>Initializes a new instance of the <see cref="Range{T}"/> structure with the specified minimum and maximum values.</para> | |
/// <para>Initializes a new instance of the <see cref="Range{T}"/> structure using specified <paramref name="minimum"/> and <paramref name="maximum"/>.</para> |
/// <para>Значение для проверки его присутствия в структуре <see cref="Range{T}"/>.</para> | ||
/// </param> | ||
/// <returns> | ||
/// <para>A <see cref="Boolean"/> value that determines whether the <see cref="Range{T}"/> struct contains the <paramref name="value"/>.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>A <see cref="Boolean"/> value that determines whether the <see cref="Range{T}"/> struct contains the <paramref name="value"/>.</para> | |
/// <para>A <see cref="Boolean"/> value that determines whether this <see cref="Range{T}"/> instance includes the <paramref name="value"/>.</para> |
/// <returns> | ||
/// <para>A <see cref="Boolean"/> value that determines whether the <see cref="Range{T}"/> struct contains the <paramref name="value"/>.</para> | ||
/// <para>Значение типа <see cref="Boolean"/>, определяющее, содержится ли <paramref name="value"/> в структуре <see cref="Range{T}"/>.</para> | ||
/// </returns> | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public bool Contains(T value) => _comparer.Compare(Minimum, value) <= 0 && _comparer.Compare(Maximum, value) >= 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public bool Contains(T value) => _comparer.Compare(Minimum, value) <= 0 && _comparer.Compare(Maximum, value) >= 0; | |
public bool Includes(T value) => _comparer.Compare(Minimum, value) <= 0 && _comparer.Compare(Maximum, value) >= 0; |
Note: this a breaking change. We should also ensure to use include instead of contain for Ranges everywhere. This is because word include is used with Range much more frequently.
/// </param> | ||
/// <returns> | ||
/// <para>A <see cref="Boolean"/> value that determines whether the <see cref="Range{T}"/> struct contains the <paramref name="value"/>.</para> | ||
/// <para>Значение типа <see cref="Boolean"/>, определяющее, содержится ли <paramref name="value"/> в структуре <see cref="Range{T}"/>.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>Значение типа <see cref="Boolean"/>, определяющее, содержится ли <paramref name="value"/> в структуре <see cref="Range{T}"/>.</para> | |
/// <para>Значение типа <see cref="Boolean"/>, определяющее, включено ли <paramref name="value"/> в этот экземпляр <see cref="Range{T}"/>.</para> |
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public override string ToString() => $"[{Minimum}..{Maximum}]"; | ||
|
||
/// <summary> | ||
/// <para>Determines if the provided value is inside the range.</para> | ||
/// <para>Определяет, находится ли указанное значение внутри диапазона.</para> | ||
/// <para>Determines whether the current <see cref="Range{T}"/> struct contains the <paramref name="value"/>.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>Determines whether the current <see cref="Range{T}"/> struct contains the <paramref name="value"/>.</para> | |
/// <para>Determines whether this <see cref="Range{T}"/> instance includes <paramref name="value"/>.</para> |
/// <para>Determines if the provided value is inside the range.</para> | ||
/// <para>Определяет, находится ли указанное значение внутри диапазона.</para> | ||
/// <para>Determines whether the current <see cref="Range{T}"/> struct contains the <paramref name="value"/>.</para> | ||
/// <para>Определяет, содержится ли <paramref name="value"/> в текущей структуре <see cref="Range{T}"/>.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <para>Определяет, содержится ли <paramref name="value"/> в текущей структуре <see cref="Range{T}"/>.</para> | |
/// <para>Определяет, включено ли <paramref name="value"/> в этот экземпляр <see cref="Range{T}"/>.</para> |
No description provided.