diff --git a/csharp/Platform.Incrementers/Incrementer.cs b/csharp/Platform.Incrementers/Incrementer.cs index 14cc035..3dffcb9 100644 --- a/csharp/Platform.Incrementers/Incrementer.cs +++ b/csharp/Platform.Incrementers/Incrementer.cs @@ -4,24 +4,24 @@ namespace Platform.Incrementers { + /// + /// Represents the incrementer that maintains an internal counter. + /// Представляет инкрементер, который поддерживает внутренний счетчик. + /// /// /// Must be class, not struct (in order to persist access to Result field value). /// public class Incrementer : IIncrementer { /// - /// - /// The result. - /// - /// + /// The internal result value that stores the current counter. + /// Внутреннее значение результата, которое хранит текущий счетчик. /// protected ulong _result; /// - /// - /// Gets the result value. - /// - /// + /// Gets the current result value. + /// Получает текущее значение результата. /// public ulong Result { @@ -30,32 +30,26 @@ public ulong Result } /// - /// - /// Initializes a new instance. - /// - /// + /// Initializes a new instance with the specified initial value. + /// Инициализирует новый экземпляр с указанным начальным значением. /// /// - /// A initial value. - /// + /// The initial value for the counter. + /// Начальное значение для счетчика. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Incrementer(ulong initialValue) => _result = initialValue; /// - /// - /// Initializes a new instance. - /// - /// + /// Initializes a new instance with zero initial value. + /// Инициализирует новый экземпляр с нулевым начальным значением. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Incrementer() { } /// - /// - /// Increments this instance. - /// - /// + /// Increments the internal counter by one. + /// Увеличивает внутренний счетчик на единицу. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Increment() => _result++; diff --git a/csharp/Platform.Incrementers/Incrementer[TValue, TDecision].cs b/csharp/Platform.Incrementers/Incrementer[TValue, TDecision].cs index eb73300..b27c9d6 100644 --- a/csharp/Platform.Incrementers/Incrementer[TValue, TDecision].cs +++ b/csharp/Platform.Incrementers/Incrementer[TValue, TDecision].cs @@ -6,64 +6,60 @@ namespace Platform.Incrementers { /// - /// - /// Represents the incrementer. - /// - /// + /// Represents the incrementer that can increment and return a specific decision value. + /// Представляет инкрементер, который может увеличивать счетчик и возвращать определенное значение решения. /// + /// The type of value used in increment operations. + /// The type of decision value returned by increment operations. /// public class Incrementer : Incrementer { + /// + /// The decision value that is returned by increment operations. + /// Значение решения, которое возвращается операциями инкремента. + /// private readonly TDecision _trueValue; /// - /// - /// Initializes a new instance. - /// - /// + /// Initializes a new instance with the specified initial and decision values. + /// Инициализирует новый экземпляр с указанными начальным значением и значением решения. /// /// - /// A initial value. - /// + /// The initial value for the counter. + /// Начальное значение для счетчика. /// /// - /// A true value. - /// + /// The decision value to return from increment operations. + /// Значение решения, возвращаемое из операций инкремента. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Incrementer(ulong initialValue, TDecision trueValue) : base(initialValue) => _trueValue = trueValue; /// - /// - /// Initializes a new instance. - /// - /// + /// Initializes a new instance with the specified decision value and zero initial value. + /// Инициализирует новый экземпляр с указанным значением решения и нулевым начальным значением. /// /// - /// A true value. - /// + /// The decision value to return from increment operations. + /// Значение решения, возвращаемое из операций инкремента. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Incrementer(TDecision trueValue) => _trueValue = trueValue; /// - /// - /// Initializes a new instance. - /// - /// + /// Initializes a new instance with default values. + /// Инициализирует новый экземпляр со значениями по умолчанию. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Incrementer() { } /// - /// - /// Increments the and return true. - /// - /// + /// Increments the counter and returns the decision value. + /// Увеличивает счетчик и возвращает значение решения. /// /// - /// The true value. - /// + /// The decision value. + /// Значение решения. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public TDecision IncrementAndReturnTrue() @@ -73,18 +69,16 @@ public TDecision IncrementAndReturnTrue() } /// - /// - /// Increments the and return true using the specified value. - /// - /// + /// Increments the counter and returns the decision value using the specified value. + /// Увеличивает счетчик и возвращает значение решения, используя указанное значение. /// /// - /// The value. - /// + /// The value used in the increment operation. + /// Значение, используемое в операции инкремента. /// /// - /// The true value. - /// + /// The decision value. + /// Значение решения. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public TDecision IncrementAndReturnTrue(TValue value) diff --git a/csharp/Platform.Incrementers/Incrementer[TValue].cs b/csharp/Platform.Incrementers/Incrementer[TValue].cs index 09fa7d6..0d847c3 100644 --- a/csharp/Platform.Incrementers/Incrementer[TValue].cs +++ b/csharp/Platform.Incrementers/Incrementer[TValue].cs @@ -5,32 +5,27 @@ namespace Platform.Incrementers { /// - /// - /// Represents the incrementer. - /// - /// + /// Represents the incrementer that returns boolean decisions from increment operations. + /// Представляет инкрементер, который возвращает логические решения из операций инкремента. /// - /// + /// The type of value used in increment operations. + /// public class Incrementer : Incrementer { /// - /// - /// Initializes a new instance. - /// - /// + /// Initializes a new instance with the specified initial value. + /// Инициализирует новый экземпляр с указанным начальным значением. /// /// - /// A initial value. - /// + /// The initial value for the counter. + /// Начальное значение для счетчика. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Incrementer(ulong initialValue) : base(initialValue, true) { } /// - /// - /// Initializes a new instance. - /// - /// + /// Initializes a new instance with zero initial value and true as decision value. + /// Инициализирует новый экземпляр с нулевым начальным значением и true как значение решения. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Incrementer() : base(true) { }