diff --git a/csharp/Platform.Exceptions/Ensure.cs b/csharp/Platform.Exceptions/Ensure.cs
index 295e1fe..536c85d 100644
--- a/csharp/Platform.Exceptions/Ensure.cs
+++ b/csharp/Platform.Exceptions/Ensure.cs
@@ -4,19 +4,16 @@ namespace Platform.Exceptions
{
///
/// Contains two extensible classes instances that can be supplemented with static helper methods by using the extension mechanism. These methods ensure the contract compliance.
- /// Содержит два экземпляра расширяемых класса, которые можно дополнять статическими вспомогательными методами путём использования механизма расширений. Эти методы занимаются гарантированием соответствия контракту.
///
public static class Ensure
{
///
/// Gets an instance of the extension root class that contains helper methods to guarantee compliance with the contract.
- /// Возвращает экземпляр класса корня-расширения, который содержит вспомогательные методы для гарантирования соответствия контракту.
///
public static readonly EnsureAlwaysExtensionRoot Always = new EnsureAlwaysExtensionRoot();
///
/// Gets an instance of the extension root class that contains helper methods to guarantee compliance with the contract, but are executed only during debugging.
- /// Возвращает экземпляр класса корня-расширения, который содержит вспомогательные методы для гарантирования соответствия контракту, но выполняются только во время отладки.
///
public static readonly EnsureOnDebugExtensionRoot OnDebug = new EnsureOnDebugExtensionRoot();
}
diff --git a/csharp/Platform.Exceptions/EnsureExtensions.cs b/csharp/Platform.Exceptions/EnsureExtensions.cs
index 83501a6..c387d4d 100644
--- a/csharp/Platform.Exceptions/EnsureExtensions.cs
+++ b/csharp/Platform.Exceptions/EnsureExtensions.cs
@@ -9,7 +9,6 @@ namespace Platform.Exceptions
{
///
/// Provides a set of extension methods for and objects.
- /// Предоставляет набор методов расширения для объектов и .
///
public static class EnsureExtensions
{
@@ -17,13 +16,12 @@ public static class EnsureExtensions
///
/// Ensures that argument is not null. This check is performed regardless of the build configuration.
- /// Гарантирует, что аргумент не нулевой. Эта проверка выполняется внезависимости от конфигурации сборки.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// The argument's name.Имя аргумента.
- /// The message of the thrown exception.Сообщение выбрасываемого исключения.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// The argument's name.
+ /// The message of the thrown exception.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ArgumentNotNull(this EnsureAlwaysExtensionRoot root, TArgument argument, string argumentName, string message)
where TArgument : class
@@ -36,35 +34,32 @@ public static void ArgumentNotNull(this EnsureAlwaysExtensionRoot roo
///
/// Ensures that argument is not null. This check is performed regardless of the build configuration.
- /// Гарантирует, что аргумент не нулевой. Эта проверка выполняется внезависимости от конфигурации сборки.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// The argument's name.Имя аргумента.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// The argument's name.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ArgumentNotNull(this EnsureAlwaysExtensionRoot root, TArgument argument, string argumentName) where TArgument : class => ArgumentNotNull(root, argument, argumentName, $"Argument {argumentName} is null.");
///
/// Ensures that argument is not null. This check is performed regardless of the build configuration.
- /// Гарантирует, что аргумент не нулевой. Эта проверка выполняется внезависимости от конфигурации сборки.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ArgumentNotNull(this EnsureAlwaysExtensionRoot root, TArgument argument) where TArgument : class => ArgumentNotNull(root, argument, null);
///
/// Ensures that the argument meets the criteria. This check is performed regardless of the build configuration.
- /// Гарантирует, что аргумент соответствует критерию. Эта проверка выполняется внезависимости от конфигурации сборки.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// A predicate that determines whether the argument meets a criterion.Предикат определяющий, соответствует ли аргумент критерию.
- /// The argument's name.Имя аргумента.
- /// The message of the thrown exception.Сообщение выбрасываемого исключения.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// A predicate that determines whether the argument meets a criterion.
+ /// The argument's name.
+ /// The message of the thrown exception.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ArgumentMeetsCriteria(this EnsureAlwaysExtensionRoot root, TArgument argument, Predicate predicate, string argumentName, string message)
{
@@ -76,24 +71,22 @@ public static void ArgumentMeetsCriteria(this EnsureAlwaysExtensionRo
///
/// Ensures that the argument meets the criteria. This check is performed regardless of the build configuration.
- /// Гарантирует, что аргумент соответствует критерию. Эта проверка выполняется внезависимости от конфигурации сборки.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// A predicate that determines whether the argument meets a criterion.Предикат определяющий, соответствует ли аргумент критерию.
- /// The argument's name.Имя аргумента.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// A predicate that determines whether the argument meets a criterion.
+ /// The argument's name.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ArgumentMeetsCriteria(this EnsureAlwaysExtensionRoot root, TArgument argument, Predicate predicate, string argumentName) => ArgumentMeetsCriteria(root, argument, predicate, argumentName, $"Argument {argumentName} does not meet the criteria.");
///
/// Ensures that the argument meets the criteria. This check is performed regardless of the build configuration.
- /// Гарантирует, что аргумент соответствует критерию. Эта проверка выполняется внезависимости от конфигурации сборки.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// A predicate that determines whether the argument meets a criterion.Предикат определяющий, соответствует ли аргумент критерию.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// A predicate that determines whether the argument meets a criterion.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ArgumentMeetsCriteria(this EnsureAlwaysExtensionRoot root, TArgument argument, Predicate predicate) => ArgumentMeetsCriteria(root, argument, predicate, null);
@@ -103,70 +96,64 @@ public static void ArgumentMeetsCriteria(this EnsureAlwaysExtensionRo
///
/// Ensures that argument is not null. This check is performed only for DEBUG build configuration.
- /// Гарантирует, что аргумент не нулевой. Эта проверка выполняется только для конфигурации сборки DEBUG.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// The argument's name.Имя аргумента.
- /// The message of the thrown exception.Сообщение выбрасываемого исключения.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// The argument's name.
+ /// The message of the thrown exception.
[Conditional("DEBUG")]
public static void ArgumentNotNull(this EnsureOnDebugExtensionRoot root, TArgument argument, string argumentName, string message) where TArgument : class => Ensure.Always.ArgumentNotNull(argument, argumentName, message);
///
/// Ensures that argument is not null. This check is performed only for DEBUG build configuration.
- /// Гарантирует, что аргумент не нулевой. Эта проверка выполняется только для конфигурации сборки DEBUG.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// The argument's name.Имя аргумента.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// The argument's name.
[Conditional("DEBUG")]
public static void ArgumentNotNull(this EnsureOnDebugExtensionRoot root, TArgument argument, string argumentName) where TArgument : class => Ensure.Always.ArgumentNotNull(argument, argumentName);
///
/// Ensures that argument is not null. This check is performed only for DEBUG build configuration.
- /// Гарантирует, что аргумент не нулевой. Эта проверка выполняется только для конфигурации сборки DEBUG.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
[Conditional("DEBUG")]
public static void ArgumentNotNull(this EnsureOnDebugExtensionRoot root, TArgument argument) where TArgument : class => Ensure.Always.ArgumentNotNull(argument);
///
/// Ensures that the argument meets the criteria. This check is performed only for DEBUG build configuration.
- /// Гарантирует, что аргумент соответствует критерию. Эта проверка выполняется только для конфигурации сборки DEBUG.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// A predicate that determines whether the argument meets a criterion.Предикат определяющий, соответствует ли аргумент критерию.
- /// The argument's name.Имя аргумента.
- /// The message of the thrown exception.Сообщение выбрасываемого исключения.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// A predicate that determines whether the argument meets a criterion.
+ /// The argument's name.
+ /// The message of the thrown exception.
[Conditional("DEBUG")]
public static void ArgumentMeetsCriteria(this EnsureOnDebugExtensionRoot root, TArgument argument, Predicate predicate, string argumentName, string message) => Ensure.Always.ArgumentMeetsCriteria(argument, predicate, argumentName, message);
///
/// Ensures that the argument meets the criteria. This check is performed only for DEBUG build configuration.
- /// Гарантирует, что аргумент соответствует критерию. Эта проверка выполняется только для конфигурации сборки DEBUG.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// A predicate that determines whether the argument meets a criterion.Предикат определяющий, соответствует ли аргумент критерию.
- /// The argument's name.Имя аргумента.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// A predicate that determines whether the argument meets a criterion.
+ /// The argument's name.
[Conditional("DEBUG")]
public static void ArgumentMeetsCriteria(this EnsureOnDebugExtensionRoot root, TArgument argument, Predicate predicate, string argumentName) => Ensure.Always.ArgumentMeetsCriteria(argument, predicate, argumentName);
///
/// Ensures that the argument meets the criteria. This check is performed only for DEBUG build configuration.
- /// Гарантирует, что аргумент соответствует критерию. Эта проверка выполняется только для конфигурации сборки DEBUG.
- ///
- /// Type of argument.Тип аргумента.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// The argument.Аргумент.
- /// A predicate that determines whether the argument meets a criterion.Предикат определяющий, соответствует ли аргумент критерию.
+ /// ///
+ /// Type of argument.
+ /// The extension root to which this method is bound.
+ /// The argument.
+ /// A predicate that determines whether the argument meets a criterion.
[Conditional("DEBUG")]
public static void ArgumentMeetsCriteria(this EnsureOnDebugExtensionRoot root, TArgument argument, Predicate predicate) => Ensure.Always.ArgumentMeetsCriteria(argument, predicate);
diff --git a/csharp/Platform.Exceptions/ExceptionExtensions.cs b/csharp/Platform.Exceptions/ExceptionExtensions.cs
index 0694252..6c75733 100644
--- a/csharp/Platform.Exceptions/ExceptionExtensions.cs
+++ b/csharp/Platform.Exceptions/ExceptionExtensions.cs
@@ -5,35 +5,30 @@ namespace Platform.Exceptions
{
///
/// Provides a set of extension methods for objects.
- /// Предоставляет набор методов расширения для объектов .
///
public static class ExceptionExtensions
{
///
/// Represents the separator used within the process of generating a representation string () to separate different inner exceptions from each other. This field is constant.
- /// Представляет разделитель, используемый внутри процесса формирования строки-представления () для разделения различных внутренних исключений друг от друга. Это поле является константой.
///
public static readonly string ExceptionContentsSeparator = "---";
///
/// Represents a string returned from in the event of an unsuccessful attempt to format an exception. This field is a constant.
- /// Представляет строку выдаваемую из в случае неудачной попытки форматирования исключения. Это поле является константой.
///
public static readonly string ExceptionStringBuildingFailed = "Unable to format exception.";
///
/// Ignores the exception, notifying the class about it.
- /// Игнорирует исключение, уведомляя об этом класс .
///
///
public static void Ignore(this Exception exception) => IgnoredExceptions.RaiseExceptionIgnoredEvent(exception);
///
/// Returns a string that represents the specified exception with all its inner exceptions.
- /// Возвращает строку, которая представляет указанное исключение со всеми его внутренними исключениями.
///
- /// The exception that will be represented as a string.Исключение, которое будет представленно в виде строки.
- /// A string that represents the specified exception with all its inner exceptions.Cтроку, которая представляет указанное исключение со всеми его внутренними исключениями.
+ /// The exception that will be represented as a string.
+ /// A string that represents the specified exception with all its inner exceptions.
public static string ToStringWithAllInnerExceptions(this Exception exception)
{
try
diff --git a/csharp/Platform.Exceptions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs b/csharp/Platform.Exceptions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs
index fa2ddcd..b5ab2fc 100644
--- a/csharp/Platform.Exceptions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs
+++ b/csharp/Platform.Exceptions/ExtensionRoots/EnsureAlwaysExtensionRoot.cs
@@ -2,7 +2,6 @@ namespace Platform.Exceptions.ExtensionRoots
{
///
/// Represents the extension root class for Ensure.Always.
- /// Представляет класс корень-расширения для Ensure.Always.
///
public class EnsureAlwaysExtensionRoot
{
diff --git a/csharp/Platform.Exceptions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs b/csharp/Platform.Exceptions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs
index 73dabae..1e8206a 100644
--- a/csharp/Platform.Exceptions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs
+++ b/csharp/Platform.Exceptions/ExtensionRoots/EnsureOnDebugExtensionRoot.cs
@@ -2,7 +2,6 @@ namespace Platform.Exceptions.ExtensionRoots
{
///
/// Represents the extension root class for Ensure.OnDebug.
- /// Представляет класс корень-расширения для Ensure.OnDebug.
///
public class EnsureOnDebugExtensionRoot
{
diff --git a/csharp/Platform.Exceptions/ExtensionRoots/ThrowExtensionRoot.cs b/csharp/Platform.Exceptions/ExtensionRoots/ThrowExtensionRoot.cs
index 93960f9..14ed844 100644
--- a/csharp/Platform.Exceptions/ExtensionRoots/ThrowExtensionRoot.cs
+++ b/csharp/Platform.Exceptions/ExtensionRoots/ThrowExtensionRoot.cs
@@ -2,7 +2,6 @@ namespace Platform.Exceptions.ExtensionRoots
{
///
/// Represents the extension root class for Throw.A.
- /// Представляет класс корень-расширения для Throw.A.
///
public class ThrowExtensionRoot
{
diff --git a/csharp/Platform.Exceptions/IgnoredExceptions.cs b/csharp/Platform.Exceptions/IgnoredExceptions.cs
index 8ff0c77..27910f4 100644
--- a/csharp/Platform.Exceptions/IgnoredExceptions.cs
+++ b/csharp/Platform.Exceptions/IgnoredExceptions.cs
@@ -5,8 +5,7 @@
namespace Platform.Exceptions
{
///
- /// Сontains a mechanism for notifying about the occurrence of ignored exceptions, as well as a mechanism for their collection.
- /// Содержит механизм уведомления о возникновении игнорируемых исключений, а так же механизм их сбора.
+ /// Contains a mechanism for notifying about the occurrence of ignored exceptions, as well as a mechanism for their collection.
///
public static class IgnoredExceptions
{
@@ -14,30 +13,25 @@ public static class IgnoredExceptions
///
/// An event that is raised every time an exception has been ignored.
- /// Событие, которое генерируется каждый раз, когда исключение было проигнорировано.
///
public static event EventHandler ExceptionIgnored = OnExceptionIgnored;
///
/// Gets an immutable collection with all collected exceptions that were ignored.
- /// Возвращает неизменяемую коллекцию со всеми собранными исключениями которые были проигнорированы.
///
public static IReadOnlyCollection CollectedExceptions => _exceptionsBag;
///
/// Gets or sets a value that determines whether to collect ignored exceptions into CollectedExceptions.
- /// Возвращает или устанавливает значение, определяющие нужно ли собирать игнорируемые исключения в CollectedExceptions.
///
public static bool CollectExceptions { get; set; }
///
/// Raises an exception ignored event.
- /// Генерирует событие игнорирования исключения.
///
- /// The ignored exception.Игнорируемое исключение.
+ /// The ignored exception.
///
/// It is recommended to call this method in cases where you have a catch block, but you do not do anything with exception in it.
- /// Рекомендуется вызывать этот метод в тех случаях, когда у вас есть catch блок, но вы ничего не делаете в нём с исключением.
///
public static void RaiseExceptionIgnoredEvent(Exception exception) => ExceptionIgnored.Invoke(null, exception);
private static void OnExceptionIgnored(object sender, Exception exception)
diff --git a/csharp/Platform.Exceptions/Throw.cs b/csharp/Platform.Exceptions/Throw.cs
index 91ad93c..8a88393 100644
--- a/csharp/Platform.Exceptions/Throw.cs
+++ b/csharp/Platform.Exceptions/Throw.cs
@@ -4,13 +4,11 @@ namespace Platform.Exceptions
{
///
/// Contains an instance of an extensible class that can be supplemented with static helper methods by using the extension mechanism. These methods throw exceptions.
- /// Содержит экземпляр расширяемого класса, который можно дополнять статическими вспомогательными методами путём использования механизма расширений. Эти методы занимаются выбрасыванием исключений.
///
public static class Throw
{
///
/// Gets an instance of the extension root class that contains helper methods for throwing exceptions.
- /// Возвращает экземпляр класса корня-расширения, который содержит вспомогательные методы для выбрасывания исключений.
///
public static readonly ThrowExtensionRoot A = new ThrowExtensionRoot();
}
diff --git a/csharp/Platform.Exceptions/ThrowExtensions.cs b/csharp/Platform.Exceptions/ThrowExtensions.cs
index c824d61..85e1ced 100644
--- a/csharp/Platform.Exceptions/ThrowExtensions.cs
+++ b/csharp/Platform.Exceptions/ThrowExtensions.cs
@@ -8,43 +8,38 @@ namespace Platform.Exceptions
{
///
/// Provides a set of extension methods for objects.
- /// Предоставляет набор методов расширения для объектов .
///
public static class ThrowExtensions
{
///
/// Throws a new .
- /// Выбрасывает новое .
///
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
+ /// The extension root to which this method is bound.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void NotSupportedException(this ThrowExtensionRoot root) => throw new NotSupportedException();
///
/// Throws a new , while returning a value of type.
- /// Выбрасывает новое , вовращая при этом значение типа .
///
- /// The type of returned value.Тип возвращаемого значения.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// A value of type.Значение типа .
+ /// The type of returned value.
+ /// The extension root to which this method is bound.
+ /// A value of type.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static TReturn NotSupportedExceptionAndReturn(this ThrowExtensionRoot root) => throw new NotSupportedException();
///
/// Throws a new .
- /// Выбрасывает новое .
///
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
+ /// The extension root to which this method is bound.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void NotImplementedException(this ThrowExtensionRoot root) => throw new NotImplementedException();
///
/// Throws a new , while returning a value of type.
- /// Выбрасывает новое , вовращая при этом значение типа .
///
- /// The type of returned value.Тип возвращаемого значения.
- /// The extension root to which this method is bound.Корень-расширения, к которому привязан этот метод.
- /// A value of type.Значение типа .
+ /// The type of returned value.
+ /// The extension root to which this method is bound.
+ /// A value of type.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static TReturn NotImplementedExceptionAndReturn(this ThrowExtensionRoot root) => throw new NotImplementedException();
}