diff --git a/ZeroLevel.Discovery/ExchangeTransportFactory.cs b/ZeroLevel.Discovery/ExchangeTransportFactory.cs index 568a17c..f46fd78 100644 --- a/ZeroLevel.Discovery/ExchangeTransportFactory.cs +++ b/ZeroLevel.Discovery/ExchangeTransportFactory.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Net; using System.Reflection; using ZeroLevel.Network.Microservices; using ZeroLevel.Services.Network; @@ -16,8 +15,7 @@ namespace ZeroLevel.Microservices private static readonly ConcurrentDictionary _clientInstances = new ConcurrentDictionary(); /// - /// Сканирование указанной сборки для поиска типов реализующих интерфейсы - /// IExchangeServer или IExchangeClient + /// Scanning the specified assembly to find the types that implement the IExchangeServer or IExchangeClient interfaces /// internal static void ScanAndRegisterCustomTransport(Assembly asm) { @@ -41,16 +39,16 @@ namespace ZeroLevel.Microservices } /// - /// Создает сервер для приема сообщений по указанному протоколу + /// Creates a server to receive messages using the specified protocol /// - /// Протокол - /// Сервер + /// Protocol + /// Server internal static ExService GetServer(string protocol) { ExService instance = null; if (protocol.Equals("socket", StringComparison.OrdinalIgnoreCase)) { - instance = new ExService(new ZExSocketObservableServer(new System.Net.IPEndPoint(IPAddress.Any, IPFinder.GetFreeTcpPort()))); + instance = new ExService(new ZExSocketObservableServer(new System.Net.IPEndPoint(IPFinder.GetNonLoopbackAddress(), IPFinder.GetFreeTcpPort()))); } else { @@ -68,11 +66,11 @@ namespace ZeroLevel.Microservices } /// - /// Создает клиента для обращений к серверу по указанному протоколу + /// Creates a client to access the server using the specified protocol /// - /// Протокол - /// Адрес сервера - /// Клиент + /// Protocol + /// Server endpoint + /// Client internal static ExClient GetClient(string protocol, string endpoint) { ExClient instance = null; @@ -85,6 +83,7 @@ namespace ZeroLevel.Microservices return instance; } _clientInstances.TryRemove(cachee_key, out instance); + instance.Dispose(); instance = null; } if (protocol.Equals("socket", StringComparison.OrdinalIgnoreCase)) diff --git a/ZeroLevel.Discovery/obj/Debug/ZeroLevel.Discovery.csproj.CoreCompileInputs.cache b/ZeroLevel.Discovery/obj/Debug/ZeroLevel.Discovery.csproj.CoreCompileInputs.cache index 7a6e9ee..ffd6fd9 100644 --- a/ZeroLevel.Discovery/obj/Debug/ZeroLevel.Discovery.csproj.CoreCompileInputs.cache +++ b/ZeroLevel.Discovery/obj/Debug/ZeroLevel.Discovery.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -02ab5562f7a9f633d41e073aff759527ff59696c +4f0bbfe8ac44b56784f7eeaa3cdef96609d6b97e diff --git a/ZeroLevel.Discovery/obj/Debug/ZeroLevel.Discovery.csprojAssemblyReference.cache b/ZeroLevel.Discovery/obj/Debug/ZeroLevel.Discovery.csprojAssemblyReference.cache index 117c263..dca3baa 100644 Binary files a/ZeroLevel.Discovery/obj/Debug/ZeroLevel.Discovery.csprojAssemblyReference.cache and b/ZeroLevel.Discovery/obj/Debug/ZeroLevel.Discovery.csprojAssemblyReference.cache differ diff --git a/ZeroLevel.Microservices/BaseProxy.cs b/ZeroLevel.Microservices/BaseProxy.cs index 42065e4..5b2d19f 100644 --- a/ZeroLevel.Microservices/BaseProxy.cs +++ b/ZeroLevel.Microservices/BaseProxy.cs @@ -115,11 +115,7 @@ namespace ZeroLevel.ProxyREST } catch (Exception ex) { - var line = string.Format("Сбой запроса ресурса {0} методом {1}. Код ошибки: {2}. Комментарий: {3}", - resource, - method, - statusCode ?? "Uncknown", - reason ?? ex.Message); + var line = $"Resource request failed. [{method}] {resource}. Error code: {(statusCode ?? "Uncknown")}. Comment: {(reason ?? ex.Message)}"; Log.Error(ex, line); throw new InvalidOperationException(line, ex); } diff --git a/ZeroLevel.Microservices/ExServiceHost.cs b/ZeroLevel.Microservices/ExServiceHost.cs index 5500dee..fa8d5b6 100644 --- a/ZeroLevel.Microservices/ExServiceHost.cs +++ b/ZeroLevel.Microservices/ExServiceHost.cs @@ -253,12 +253,12 @@ namespace ZeroLevel.Microservices #region Inboxes /// - /// Регистрация обработчика входящих сообщений + /// Registering an Inbox Handler /// - /// Тип сообщения - /// Транспортный протокол - /// Имя точки приема - /// Обработчик + /// Message type + /// Protocol + /// Inbox name + /// Handler private void RegisterHandler(MetaService meta, string inbox, Action handler) { if (_disposed) return; @@ -273,13 +273,13 @@ namespace ZeroLevel.Microservices } /// - /// Регистрация метода отдающего ответ на входящий запрос + /// Registration method responding to an incoming request /// - /// Тип входного сообщения - /// Тип ответа - /// Транспортный протокол - /// Имя точки приема - /// Обработчик + /// Request message type + /// Response message type + /// Protocol + /// Inbox name + /// Handler private void RegisterReplier(MetaService meta, string inbox, Func handler) { if (_disposed) return; @@ -294,12 +294,12 @@ namespace ZeroLevel.Microservices } /// - /// Регистрация метода отдающего ответ на входящий запрос, не принимающего входящих данных + /// Registration of the method of responding to the incoming request, not receiving incoming data /// - /// Тип ответа - /// Транспортный протокол - /// Имя точки приема - /// Обработчик + /// Response message type + /// Protocol + /// Inbox name + /// Handler private void RegisterReplierWithNoRequestBody(MetaService meta, string inbox, Func handler) { if (_disposed) return; diff --git a/ZeroLevel.Microservices/Exchange.cs b/ZeroLevel.Microservices/Exchange.cs index c64b330..5b4d4e7 100644 --- a/ZeroLevel.Microservices/Exchange.cs +++ b/ZeroLevel.Microservices/Exchange.cs @@ -10,7 +10,7 @@ using ZeroLevel.Services.Network; namespace ZeroLevel.Microservices { /// - /// Обеспечивает обмен данными между сервисами + /// Provides data exchange between services /// public sealed class Exchange : IDisposable @@ -29,7 +29,7 @@ namespace ZeroLevel.Microservices #endregion Ctor /// - /// Регистрация сервиса + /// Registration service /// public IExService RegisterService(IExchangeService service) { @@ -44,11 +44,11 @@ namespace ZeroLevel.Microservices #region Balanced send /// - /// Отправка сообщения сервису + /// Sending a message to the service /// - /// Ключ сервиса - /// Имя точки приема сообщений - /// Сообщение + /// Service key + /// Inbox name + /// Message /// public bool Send(string serviceKey, string inbox, T data) { @@ -262,13 +262,13 @@ namespace ZeroLevel.Microservices #region Broadcast /// - /// Отправка сообщения всем сервисам с указанным ключом в указанный обработчик + /// Sending a message to all services with the specified key to the specified handler /// - /// Тип сообщения - /// Ключ сервиса - /// Имя обработчика - /// Сообщение - /// true - при успешной отправке + /// Message type + /// Service key + /// Inbox name + /// Message + /// true - on successful submission public bool SendBroadcast(string serviceKey, string inbox, T data) { try @@ -296,22 +296,22 @@ namespace ZeroLevel.Microservices } /// - /// Отправка сообщения всем сервисам с указанным ключом, в обработчик по умолчанию + /// Sending a message to all services with the specified key, to the default handler /// - /// Тип сообщения - /// Ключ сервиса - /// Сообщение - /// true - при успешной отправке + /// Message type + /// Service key + /// Message + /// true - on successful submission public bool SendBroadcast(string serviceKey, T data) => SendBroadcast(serviceKey, ZBaseNetwork.DEFAULT_MESSAGE_INBOX, data); /// - /// Отправка сообщения всем сервисам конкретного типа в указанный обработчик + /// Sending a message to all services of a specific type to the specified handler /// - /// Тип сообщения - /// Тип сервиса - /// Имя обработчика - /// Сообщение - /// true - при успешной отправке + /// Message type + /// Service type + /// Inbox name + /// Message + /// true - on successful submission public bool SendBroadcastByType(string serviceType, string inbox, T data) { try @@ -339,23 +339,23 @@ namespace ZeroLevel.Microservices } /// - /// Отправка сообщения всем сервисам конкретного типа, в обработчик по умолчанию + /// Sending a message to all services of a particular type, to the default handler /// - /// Тип сообщения - /// Тип сервиса - /// Сообщение - /// true - при успешной отправке + /// Message type + /// Service type + /// Message + /// true - on successful submission public bool SendBroadcastByType(string serviceType, T data) => SendBroadcastByType(serviceType, ZBaseNetwork.DEFAULT_MESSAGE_INBOX, data); /// - /// Отправка сообщения всем сервисам конкретной группы в указанный обработчик + /// Sending a message to all services of a specific group to the specified handler /// - /// Тип сообщения - /// Группа сервиса - /// Имя обработчика - /// Сообщение - /// true - при успешной отправке + /// Message type + /// Service group + /// Inbox name + /// Message + /// true - on successful submission public bool SendBroadcastByGroup(string serviceGroup, string inbox, T data) { try @@ -383,25 +383,25 @@ namespace ZeroLevel.Microservices } /// - /// Отправка сообщения всем сервисам конкретной группы, в обработчик по умолчанию + /// Sending a message to all services of a specific group in the default handler /// - /// Тип сообщения - /// Группа сервиса - /// Сообщение - /// true - при успешной отправке + /// Message type + /// Service group + /// Messsage + /// true - on successful submission public bool SendBroadcastByGroup(string serviceGroup, T data) => SendBroadcastByGroup(serviceGroup, ZBaseNetwork.DEFAULT_MESSAGE_INBOX, data); /// - /// Широковещательный опрос сервисов по ключу + /// Broadcast polling services by key /// - /// Тип запроса - /// Тип ответа - /// Ключ сервиса - /// Имя обработчика - /// Запрос - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Request message type + /// Response message type + /// Service key + /// Inbox name + /// Request message + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcast(string serviceKey, string inbox, Treq data) { try @@ -417,13 +417,13 @@ namespace ZeroLevel.Microservices } /// - /// Широковещательный опрос сервисов по ключу, без сообщеня запроса + /// Broadcast polling services by key, without message request /// - /// Тип ответа - /// Ключ сервиса - /// Имя обработчика - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Response message type + /// Service key + /// Inbox name + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcast(string serviceKey, string inbox) { try @@ -439,37 +439,37 @@ namespace ZeroLevel.Microservices } /// - /// Широковещательный опрос сервисов по ключу, в обработчик по умолчанию + /// Broadcast polling services by key, to default handler /// - /// Тип запроса - /// Тип ответа - /// Ключ сервиса - /// Запрос - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Request message type + /// Response message type + /// Service key + /// Request message + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcast(string serviceKey, Treq data) => RequestBroadcast(serviceKey, ZBaseNetwork.DEFAULT_REQUEST_INBOX, data); /// - /// Широковещательный опрос сервисов по ключу, без сообщеня запроса, в обработчик по умолчанию + /// Broadcast polling of services by key, without message of request, to default handler /// - /// Тип ответа - /// Ключ сервиса - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Response message type + /// Service key + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcast(string serviceKey) => RequestBroadcast(serviceKey, ZBaseNetwork.DEFAULT_REQUEST_INBOX); /// - /// Широковещательный опрос сервисов по типу сервису + /// Broadcast polling services by type of service /// - /// Тип запроса - /// Тип ответа - /// Тип сервиса - /// Имя обработчика - /// Запрос - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Request message type + /// Response message type + /// Service type + /// Inbox name + /// Request message + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcastByType(string serviceType, string inbox, Treq data) { try @@ -485,13 +485,13 @@ namespace ZeroLevel.Microservices } /// - /// Широковещательный опрос сервисов по типу сервису, без сообщеня запроса + /// Broadcast polling of services by type of service, without a request message /// - /// Тип ответа - /// Тип сервиса - /// Имя обработчика - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Response message type + /// Service type + /// Inbox name + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcastByType(string serviceType, string inbox) { try @@ -507,37 +507,37 @@ namespace ZeroLevel.Microservices } /// - /// Широковещательный опрос сервисов по типу сервису, в обработчик по умолчанию + /// Broadcast polling services by type of service, in the default handler /// - /// Тип запроса - /// Тип ответа - /// Тип сервиса - /// Запрос - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Request message type + /// Response message type + /// Service type + /// Request message + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcastByType(string serviceType, Treq data) => RequestBroadcastByType(serviceType, ZBaseNetwork.DEFAULT_REQUEST_INBOX, data); /// - /// Широковещательный опрос сервисов по типу, без сообщеня запроса, в обработчик по умолчанию + /// Broadcast polling services by type, without message request, in the default handler /// - /// Тип ответа - /// Тип сервиса - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Response message type + /// Service type + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcastByType(string serviceType) => RequestBroadcastByType(serviceType, ZBaseNetwork.DEFAULT_REQUEST_INBOX); /// - /// Широковещательный опрос сервисов по группе сервисов + /// Broadcast polling services for a group of services /// - /// Тип запроса - /// Тип ответа - /// Группа сервиса - /// Имя обработчика - /// Запрос - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Request message type + /// Response message type + /// Service group + /// Inbox name + /// Request message + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcastByGroup(string serviceGroup, string inbox, Treq data) { try @@ -553,13 +553,13 @@ namespace ZeroLevel.Microservices } /// - /// Широковещательный опрос сервисов по группе сервисов, без сообщения запроса + /// Broadcast polling services for a group of services, without prompting /// - /// Тип ответа - /// Группа сервиса - /// Имя обработчика - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Response message type + /// Service group + /// Inbox name + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcastByGroup(string serviceGroup, string inbox) { try @@ -575,24 +575,24 @@ namespace ZeroLevel.Microservices } /// - /// Широковещательный опрос сервисов по группе сервисов в обработчик по умолчанию + /// Broadcast polling services by service group to default handler /// - /// Тип запроса - /// Тип ответа - /// Группа сервиса - /// Запрос - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Request message type + /// Response message type + /// Service group + /// Request message + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcastByGroup(string serviceGroup, Treq data) => RequestBroadcastByGroup(serviceGroup, ZBaseNetwork.DEFAULT_REQUEST_INBOX, data); /// - /// Широковещательный опрос сервисов по группе сервисов, без сообщения запроса, в обработчик по умолчанию + ///Broadcast polling services for a group of services, without sending a request, to the default handler /// - /// Тип ответа - /// Группа сервиса - /// Обработчик ответа - /// true - в случае успешной рассылки + /// Response message type + /// Service group + /// Response handler + /// true - in case of successful mailing public IEnumerable RequestBroadcastByGroup(string serviceGroup) => RequestBroadcastByGroup(serviceGroup, ZBaseNetwork.DEFAULT_REQUEST_INBOX); diff --git a/ZeroLevel.Microservices/ExchangeTransportFactory.cs b/ZeroLevel.Microservices/ExchangeTransportFactory.cs index 4ecdbb7..f46fd78 100644 --- a/ZeroLevel.Microservices/ExchangeTransportFactory.cs +++ b/ZeroLevel.Microservices/ExchangeTransportFactory.cs @@ -15,8 +15,7 @@ namespace ZeroLevel.Microservices private static readonly ConcurrentDictionary _clientInstances = new ConcurrentDictionary(); /// - /// Сканирование указанной сборки для поиска типов реализующих интерфейсы - /// IExchangeServer или IExchangeClient + /// Scanning the specified assembly to find the types that implement the IExchangeServer or IExchangeClient interfaces /// internal static void ScanAndRegisterCustomTransport(Assembly asm) { @@ -40,10 +39,10 @@ namespace ZeroLevel.Microservices } /// - /// Создает сервер для приема сообщений по указанному протоколу + /// Creates a server to receive messages using the specified protocol /// - /// Протокол - /// Сервер + /// Protocol + /// Server internal static ExService GetServer(string protocol) { ExService instance = null; @@ -67,11 +66,11 @@ namespace ZeroLevel.Microservices } /// - /// Создает клиента для обращений к серверу по указанному протоколу + /// Creates a client to access the server using the specified protocol /// - /// Протокол - /// Адрес сервера - /// Клиент + /// Protocol + /// Server endpoint + /// Client internal static ExClient GetClient(string protocol, string endpoint) { ExClient instance = null; diff --git a/ZeroLevel.Microservices/WebApiDiscoveryClient.cs b/ZeroLevel.Microservices/WebApiDiscoveryClient.cs index e8e08c7..5c5f440 100644 --- a/ZeroLevel.Microservices/WebApiDiscoveryClient.cs +++ b/ZeroLevel.Microservices/WebApiDiscoveryClient.cs @@ -28,7 +28,6 @@ namespace ZeroLevel.Microservices #endregion WebAPI - // Таблица по ключам private readonly ConcurrentDictionary> _tableByKey = new ConcurrentDictionary>(); diff --git a/ZeroLevel.Microservices/obj/Debug/ZeroLevel.Microservices.csproj.CoreCompileInputs.cache b/ZeroLevel.Microservices/obj/Debug/ZeroLevel.Microservices.csproj.CoreCompileInputs.cache index d40012b..104314d 100644 --- a/ZeroLevel.Microservices/obj/Debug/ZeroLevel.Microservices.csproj.CoreCompileInputs.cache +++ b/ZeroLevel.Microservices/obj/Debug/ZeroLevel.Microservices.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -1a68033c72e3e719a45c8165f48f4effb88b5e68 +48781ba1f58e845d50aedda0cbff5881dfe0563f diff --git a/ZeroLevel.Microservices/obj/Debug/ZeroLevel.Microservices.csprojAssemblyReference.cache b/ZeroLevel.Microservices/obj/Debug/ZeroLevel.Microservices.csprojAssemblyReference.cache index 63d7bd7..581de84 100644 Binary files a/ZeroLevel.Microservices/obj/Debug/ZeroLevel.Microservices.csprojAssemblyReference.cache and b/ZeroLevel.Microservices/obj/Debug/ZeroLevel.Microservices.csprojAssemblyReference.cache differ diff --git a/ZeroLevel/Services/Config/BaseConfiguration.cs b/ZeroLevel/Services/Config/BaseConfiguration.cs index 8e3c1a5..a3346b1 100644 --- a/ZeroLevel/Services/Config/BaseConfiguration.cs +++ b/ZeroLevel/Services/Config/BaseConfiguration.cs @@ -92,20 +92,20 @@ namespace ZeroLevel.Services.Config #region Get /// - /// Получение списка значение соотвествующих указанному ключу + /// Getting a list of the value corresponding to the specified key /// - /// Ключ - /// Список значений + /// Key + /// Values list public IEnumerable Items(string key) { return this[key]; } /// - /// Получение первого значения для указанного ключа + /// Getting the first value for the specified key /// - /// Ключ - /// Первое значение, или null если ключ есть, но нет значений, или KeyNotFoundException если нет ключа + /// Key + /// The first value, or null if the key is, but there are no values, or KeyNotFoundException if there is no key public string First(string key) { IList result; @@ -135,11 +135,11 @@ namespace ZeroLevel.Services.Config } /// - /// Получение первого значения для указанного ключа, с попыткой преобразования в указанный тип + /// Getting the first value for the specified key, with an attempt to convert to the specified type /// - /// Ожидаемый тип - /// Ключ - /// Первое значение, или default(T) если ключ есть, но нет значений, или KeyNotFoundException если нет ключа + /// Expected type + /// Key + /// The first value, or default (T) if there is a key but no values, or KeyNotFoundException if there is no key public T First(string key) { IList result; @@ -153,11 +153,11 @@ namespace ZeroLevel.Services.Config } /// - /// Получение первого значения для указанного ключа, или значения по умолчанию + /// First value, or Default value if no value or key /// - /// Ключ - /// Значение по умолчанию - /// Первое значение, или значение по умолчанию если нет значений или ключа + /// Key + /// Default value + /// First value, or Default value if no value or key public string FirstOrDefault(string key, string defaultValue) { IList result; @@ -170,11 +170,11 @@ namespace ZeroLevel.Services.Config } /// - /// Получение первого значения для указанного ключа, или значения по умолчанию, с попыткой преобразования в указанный тип + /// Getting the first value for the specified key, or defaults, with an attempt to convert to the specified type /// - /// Ожидаемый тип - /// Ключ - /// Первое значение, или default(T) если нет значений или ключа + /// Expected type + /// Key + /// The first value, or default (T) if there are no values or a key public T FirstOrDefault(string key) { IList result; @@ -187,12 +187,12 @@ namespace ZeroLevel.Services.Config } /// - /// Получение первого значения для указанного ключа, или значения по умолчанию, с попыткой преобразования в указанный тип + /// Getting the first value for the specified key, or defaults, with an attempt to convert to the specified type /// - /// Ожидаемый тип - /// Ключ - /// Значение по умолчанию - /// Первое значение, или значение по умолчанию если нет значений или ключа + /// Expected type + /// Key + /// Default value + /// First value, or Default value if no value or key public T FirstOrDefault(string key, T defaultValue) { IList result; @@ -205,10 +205,10 @@ namespace ZeroLevel.Services.Config } /// - /// Проверка наличия ключа и непустого списка связанных с ним значений + /// Check for the presence of a key and a non-empty list of values associated with it /// - /// Ключ - /// true - если существует ключ и есть хотя бы одно значение + /// Key + /// true - if a key exists and there is at least one value public bool Contains(string key) { key = GetKey(key); @@ -216,7 +216,7 @@ namespace ZeroLevel.Services.Config } /// - /// Проверка наличия одного из ключей + /// Check for one of the keys /// public bool Contains(params string[] keys) { @@ -226,11 +226,8 @@ namespace ZeroLevel.Services.Config } /// - /// Проверка наличия ключа и связанного с ним значения + /// Check for the presence of a key and its associated value /// - /// - /// - /// public bool ContainsValue(string key, string value) { IList result; @@ -242,10 +239,10 @@ namespace ZeroLevel.Services.Config } /// - /// Количество значений связанных с указанным ключом + /// The number of values associated with the specified key /// - /// Ключ - /// Количество значений + /// Key + /// Number of values public int Count(string key) { key = GetKey(key); diff --git a/ZeroLevel/Services/Config/Configuration.cs b/ZeroLevel/Services/Config/Configuration.cs index 024f343..68eaa12 100644 --- a/ZeroLevel/Services/Config/Configuration.cs +++ b/ZeroLevel/Services/Config/Configuration.cs @@ -125,48 +125,48 @@ namespace ZeroLevel #region Read configuration /// - /// Создание конфигурации из секции AppSettings файла app.config или web.config + /// Creating a configuration from the AppSettings section of the app.config or web.config file /// - /// Конфигурация + /// Configuration public static IConfiguration ReadFromApplicationConfig() { return new ApplicationConfigReader().ReadConfiguration(); } /// - /// Создание конфигурации из секции AppSettings файла app.config или web.config, дополняется секцией 'ConnectionStrings' + /// Creating a configuration from the AppSettings section of the app.config file or web.config, is supplemented by the 'ConnectionStrings' section /// - /// Конфигурация + /// Configuration public static IConfigurationSet ReadSetFromApplicationConfig() { return new ApplicationConfigReader().ReadConfigurationSet(); } /// - /// Создание конфигурации из секции AppSettings файла app.config или web.config + /// Creating a configuration from the AppSettings section of the app.config or web.config file /// - /// Конфигурация + /// Configuration public static IConfiguration ReadFromApplicationConfig(string configFilePath) { return new ApplicationConfigReader(configFilePath).ReadConfiguration(); } /// - /// Создание конфигурации из секции AppSettings файла app.config или web.config, дополняется секцией 'ConnectionStrings' + /// Creating a configuration from the AppSettings section of the app.config file or web.config, is supplemented by the 'ConnectionStrings' section /// - /// Конфигурация + /// Configuration public static IConfigurationSet ReadSetFromApplicationConfig(string configFilePath) { return new ApplicationConfigReader(configFilePath).ReadConfigurationSet(); } /// - /// Создание конфигурации из ini файла + /// Create configuration from ini file /// - /// Путь к ini-файлу - /// Конфигурация + /// Path to the ini file + /// Configuration public static IConfiguration ReadFromIniFile(string path) { return new IniFileReader(path).ReadConfiguration(); } /// - /// Создание конфигурации из ini файла, с учетом секций + /// Creating a configuration from an ini file, including sections /// - /// Путь к ini-файлу - /// Конфигурация + /// Path to the ini file + /// Configuration public static IConfigurationSet ReadSetFromIniFile(string path) { return new IniFileReader(path).ReadConfigurationSet(); } /// - /// Создание конфигурации из параметров командной строки + /// Creating configuration from command line parameters /// - /// Параметры командной строки - /// Конфигурация + /// Command line parameters + /// Configuration public static IConfiguration ReadFromCommandLine(string[] args) { return new CommandLineReader(args).ReadConfiguration(); } public static IConfigurationSet ReadBinary(IBinaryReader reader) @@ -179,17 +179,17 @@ namespace ZeroLevel #region Write configuration /// - /// Запись простой конфигурации в ini-файл + /// Write a simple configuration to the ini file /// - /// Конфигурация - /// Путь к ini-файлу + /// Configuration + /// Path to the ini file public static void WriteToIniFile(IConfiguration configuration, string path) { new IniFileWriter(path).WriteConfiguration(configuration); } /// - /// Запись полной конфигурации в ini-файл + /// Write the complete configuration to the ini-file /// - /// Конфигурация - /// Путь к ini-файлу + /// Configuration + /// Path to the ini file public static void WriteSetToIniFile(IConfigurationSet configuration, string path) { new IniFileWriter(path).WriteConfigurationSet(configuration); } #endregion Write configuration diff --git a/ZeroLevel/Services/Config/IConfigurationSet.cs b/ZeroLevel/Services/Config/IConfigurationSet.cs index a197f58..7270ad9 100644 --- a/ZeroLevel/Services/Config/IConfigurationSet.cs +++ b/ZeroLevel/Services/Config/IConfigurationSet.cs @@ -51,8 +51,8 @@ namespace ZeroLevel /// /// Get configuration section by name /// - /// Название секции - /// Секция с данными + /// Section name + /// Data section IConfiguration GetSection(string sectionName); /// @@ -79,7 +79,7 @@ namespace ZeroLevel /// /// Remove a prohibition on changing configurations /// - /// false - если запрет снят + /// false - if the prohibition is removed bool UnfreezeConfiguration(); /// diff --git a/ZeroLevel/Services/Config/Implementation/IniFileReader.cs b/ZeroLevel/Services/Config/Implementation/IniFileReader.cs index 0b7fc9d..e5bda86 100644 --- a/ZeroLevel/Services/Config/Implementation/IniFileReader.cs +++ b/ZeroLevel/Services/Config/Implementation/IniFileReader.cs @@ -5,7 +5,7 @@ using System.IO; namespace ZeroLevel.Services.Config.Implementation { /// - /// Чтение конфигурации из ini файла + /// Reading configuration from ini file /// internal sealed class IniFileReader : IConfigurationReader diff --git a/ZeroLevel/Services/DOM/DSL/Tokens/TElementToken.cs b/ZeroLevel/Services/DOM/DSL/Tokens/TElementToken.cs index cceabab..84cec01 100644 --- a/ZeroLevel/Services/DOM/DSL/Tokens/TElementToken.cs +++ b/ZeroLevel/Services/DOM/DSL/Tokens/TElementToken.cs @@ -7,7 +7,7 @@ TToken { /// - /// Имя элемента + /// Element name /// public string ElementName; diff --git a/ZeroLevel/Services/Extensions/FPCommon.cs b/ZeroLevel/Services/Extensions/FPCommon.cs index b651861..421f7d4 100644 --- a/ZeroLevel/Services/Extensions/FPCommon.cs +++ b/ZeroLevel/Services/Extensions/FPCommon.cs @@ -15,7 +15,7 @@ namespace ZeroLevel.Services.Extensions */ /// - /// Каррирование + /// Currying /// public static Func> Curry(this Func f) { @@ -28,7 +28,7 @@ namespace ZeroLevel.Services.Extensions */ /// - /// Частичное исполнение + /// Partial currying /// public static Func Partial(this Func f, A a) { diff --git a/ZeroLevel/Services/FileSystem/FileArchive.cs b/ZeroLevel/Services/FileSystem/FileArchive.cs index d962d76..bd40eff 100644 --- a/ZeroLevel/Services/FileSystem/FileArchive.cs +++ b/ZeroLevel/Services/FileSystem/FileArchive.cs @@ -159,7 +159,7 @@ namespace ZeroLevel.Services.FileSystem } /// - /// Файловый архив + /// File archive /// public sealed class FileArchive : IDisposable @@ -457,7 +457,7 @@ namespace ZeroLevel.Services.FileSystem } /// - /// Сохранение данных в бинарном виде в архив + /// Saving data in binary form in the archive /// /// Data /// Archive file name (HH_mm_ss_fff_counter.{ext} by default) diff --git a/ZeroLevel/Services/Impersonation/Impersonation.cs b/ZeroLevel/Services/Impersonation/Impersonation.cs index 97671a1..63137ef 100644 --- a/ZeroLevel/Services/Impersonation/Impersonation.cs +++ b/ZeroLevel/Services/Impersonation/Impersonation.cs @@ -81,12 +81,12 @@ namespace ZeroLevel.Services.Impersonation } /// - /// Вход от имени указанного пользователя с указанием способа авторизации + /// Login on behalf of the specified user with the authorization method /// - /// Имя пользователя - /// Домен - /// Пароль - /// Тип авторизации + /// Login + /// Domain + /// Password + /// Authorization Type public void ImpersonateByUser(String userName, String domain, String password, ImpersonationNativeMethods.LogonType logonType) { MySafeTokenHandle token; @@ -101,9 +101,9 @@ namespace ZeroLevel.Services.Impersonation } /// - /// Копирование прав указанного процесса + /// Copying the rights of the specified process /// - /// Имя процесса + /// Process name public void ImpersonateByProcess(string ProcessName) { Process[] myProcesses = Process.GetProcesses(); diff --git a/ZeroLevel/Services/Network/Contract/IExService.cs b/ZeroLevel/Services/Network/Contract/IExService.cs index aa30824..c0ffe7d 100644 --- a/ZeroLevel/Services/Network/Contract/IExService.cs +++ b/ZeroLevel/Services/Network/Contract/IExService.cs @@ -10,11 +10,11 @@ namespace ZeroLevel.Services.Network void RegisterInbox(string inbox, Action handler); - void RegisterInbox(string inbox, Func handдer); + void RegisterInbox(string inbox, Func handler); /// /// Replier without request /// - void RegisterInbox(string inbox, Func handдer); + void RegisterInbox(string inbox, Func handler); } } \ No newline at end of file diff --git a/ZeroLevel/Services/Network/Services/ExRouter.cs b/ZeroLevel/Services/Network/Services/ExRouter.cs index e2aadfd..8485913 100644 --- a/ZeroLevel/Services/Network/Services/ExRouter.cs +++ b/ZeroLevel/Services/Network/Services/ExRouter.cs @@ -19,13 +19,13 @@ namespace ZeroLevel.Services.Network.Services /// private static Invoker CreateCompiledExpression(MethodInfo method) { - var targetArg = Expression.Parameter(typeof(object)); // Цель на которой происходит вызов - var argsArg = Expression.Parameter(typeof(object[])); // Аргументы метода + var targetArg = Expression.Parameter(typeof(object)); // Target + var argsArg = Expression.Parameter(typeof(object[])); // Method's args var parameters = method.GetParameters(); Expression body = Expression.Call( method.IsStatic ? null - : Expression.Convert(targetArg, method.DeclaringType), // тип в котором объявлен метод + : Expression.Convert(targetArg, method.DeclaringType), // Method's type method, parameters.Select((p, i) => Expression.Convert(Expression.ArrayIndex(argsArg, Expression.Constant(i)), p.ParameterType))); diff --git a/ZeroLevel/Services/Reflection/StringToTypeConverter.cs b/ZeroLevel/Services/Reflection/StringToTypeConverter.cs index 0c17ad8..8f38139 100644 --- a/ZeroLevel/Services/Reflection/StringToTypeConverter.cs +++ b/ZeroLevel/Services/Reflection/StringToTypeConverter.cs @@ -8,7 +8,7 @@ namespace ZeroLevel.Services.Reflection #region TypeHelpers /// - /// Сonverting a string to a type, if there is a corresponding converter for the type, in the absence of a converter, the default state for the specified type is returned + /// Converting a string to a type, if there is a corresponding converter for the type, in the absence of a converter, the default state for the specified type is returned /// public static object TryConvert(string input, Type to) { diff --git a/ZeroLevel/Services/Shedulling/AsyncShedullerImpl.cs b/ZeroLevel/Services/Shedulling/AsyncShedullerImpl.cs index eb59901..d7475d2 100644 --- a/ZeroLevel/Services/Shedulling/AsyncShedullerImpl.cs +++ b/ZeroLevel/Services/Shedulling/AsyncShedullerImpl.cs @@ -84,7 +84,7 @@ namespace ZeroLevel.Services.Shedulling /// Performs an action once per period, while the date is recalculated from the function transferred each time the task is recreated. /// /// The function to calculate the next date - /// Действие + /// Action /// Task ID public long RemindAsyncEveryNonlinearDate(Func nextEventDateCalcFunction, Func callback,