diff --git a/Commons.sln b/Commons.sln
index a4f9c80..9fdd33b 100644
--- a/Commons.sln
+++ b/Commons.sln
@@ -23,6 +23,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Version.props = Version.props
EndProjectSection
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "net.adamec.lib.common.core", "net.adamec.lib.common.core\net.adamec.lib.common.core.csproj", "{816D49A1-45D3-41BA-9F6D-7239D467E253}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -41,6 +43,10 @@ Global
{D09F8AE6-47AA-40B7-BFE7-E362B1C970C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D09F8AE6-47AA-40B7-BFE7-E362B1C970C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D09F8AE6-47AA-40B7-BFE7-E362B1C970C7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {816D49A1-45D3-41BA-9F6D-7239D467E253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {816D49A1-45D3-41BA-9F6D-7239D467E253}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {816D49A1-45D3-41BA-9F6D-7239D467E253}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {816D49A1-45D3-41BA-9F6D-7239D467E253}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Version.props b/Version.props
index 2da3e0f..70b6248 100644
--- a/Version.props
+++ b/Version.props
@@ -7,13 +7,13 @@
=======================================================================================
-->
- 1
- 2
- 0
- 538
- 1.2.0
- 1.2.0+538.190122135212.master.2404837
- 2404837
- master
+ 2
+ 0
+ 1
+ 552
+ 2.0.1
+ 2.0.1+552.190707161143.release.eea80db
+ eea80db
+ release
\ No newline at end of file
diff --git a/build.tasks/build.tasks.csproj b/build.tasks/build.tasks.csproj
index e6b63fc..a98d65a 100644
--- a/build.tasks/build.tasks.csproj
+++ b/build.tasks/build.tasks.csproj
@@ -2,6 +2,7 @@
netstandard2.0
+ 7.1
diff --git a/build/build.csproj b/build/build.csproj
index 7a82530..c71eff6 100644
--- a/build/build.csproj
+++ b/build/build.csproj
@@ -4,6 +4,7 @@
netstandard2.0false
+ 7.1
diff --git a/changelog.md b/changelog.md
index 6b255a5..fa6919c 100644
--- a/changelog.md
+++ b/changelog.md
@@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
+## Unreleased ##
+
+## [2.0.1] - 2019-07-07 ##
+### Breaking Changes ###
+Created nuget package `RadCommons.core` containing `BaseDisposable` class, `Configuration` class and logging that are no longer available as source-only packages mainly due to a `public` members and/or limitations of having them as `internal` (problems with inheritance in consuming code). This nuget package is needed by some of the source-only packages.
+
+### Fixed ###
+CommonLogging: Fix in DebugCorr (removed dummy log item)
+BaseDisposable: DisposedManaged and DisposedNative thread safety
+Configuration: removed reference to CommonLogging (was not used at all)
+RadCommons.di.Component: removed reference to CommonLogging (was not used at all), removed reference to itself (fix)
+
+### Changes ###
+AsyncManager: removed reference to (and used of) CommonLogging
+RadCommons.di.Config: removed reference to (and used of) CommonLogging
+RadCommons.di.PostInit: removed reference to (and used of) CommonLogging
+
## [1.2.0] - 2019-01-22 ##
### Added ###
- Added `Disposer` - Keeps the stack of disposable objects, and disposes them when the disposer is being disposed.
@@ -56,6 +73,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Initial release
- NuGet packages are not published yet, they will be published with v1.0.0
+[2.0.1]: https://github.com/adamecr/Commons/compare/v1.2.0...v2.0.1
[1.2.0]: https://github.com/adamecr/Commons/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/adamecr/Commons/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/adamecr/Commons/compare/v0.1.0...v1.0.0
diff --git a/doc/net.adamec.lib.common.core.html b/doc/net.adamec.lib.common.core.html
new file mode 100644
index 0000000..c348b5f
--- /dev/null
+++ b/doc/net.adamec.lib.common.core.html
@@ -0,0 +1,1500 @@
+
+
+
+Documentation
+
+
+
+
+
+
+
+
This is the simple configuration container in case DI with more sophisticated containers is not used The configuration is stored as the key-value dictionary, supporting hierarchy using the dot separator and arrays.The arrays can contain values or another objects. Actually, mixed arrays of values and objects can be stored, but they are not supported for binding.
For example section1.option1 means the option1 available in section1, section1.subSection2.option1 means the option1 available in section1.subSection2. section1.option1[0] means, that the option1 is array of values or objects (sections) within the section1. For arrays, the keys are like OtherSection.SimpleArray[0] or OtherSection.ComplexObjectArray[0].Name
Configuration class provides a singleton instance, however the key functionality is provided via static functions, so no need to touch the Instance at all. The items can be retrieved by key using the Get(string) and Get<TValueType>(string, Configuration.TValueType) methods. The first one returns null when the key is not found, the other one allow to define the default value to be returned, when the item is not found.
The inner class Configuration.ConfigurationBuilder provides the methods to build the configuration from JSON config files, commandline arguments, environment values and/or direct entries. The static method Builder() clears the configuration items and binding cache and creates a new instance of Configuration.ConfigurationBuilder allowing to build a configuration from scratch. The configuration is updated directly during the calls to builder methods, the existing items (keys) are updated, so it's possible to manage the priority of individual sources and the overrides if needed. The method Build() returns the configuration instance, breaking the fluent design of builder methods, however there is no other functionality within the method, so it's more the convention than need to use it at the end of configuration build.
Configuration binding it the way, how to access the configuration using the configuration objects instead of querying the individual items by key. When the method Bind<TOptionsContainer>(string, bool) is used, it creates a new instance of given type and tries to map the public properties with public setter to the keys (using the "dot notation") within the Configuration . It's possible to bind the object to to the root of the configuration to provide the whole configuration at once or bind it to the particular section to provide a configuration sub-tree. In general, the nested objects and both value and object arrays are supported. There are some rules when binding the arrays: The index must start with zero and must be in sequence (the first non-existing index stops the evaluation). The array should not mix the array or values and array of objects. The decision is made at the first item (index=0) whether it's value or object.
The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true. This is useful when the command line arguments are used like flags. For example having the argument -p:SkipStep1 and prefix -p: , the binding a bool property SkipStep1 will set the value of the property to true (doesn't change the configuration item itself). Of course, it's still possible to use the syntax -p:SkipStep1=true or -p:SkipStep1=false even in this case.
As the binding uses the reflection, it's quite expensive operation, so by default, the bound objects are cached (the cache key is the type of bound object, so binding the same type to different sections is not recommended ). It's possible to force the binding using the parameter of Bind<TOptionsContainer>(string, bool) method. In general, the recommended pattern is to Bind<TOptionsContainer>(string, bool) the configuration object after the configuration is built and then Retrieve<TOptionsContainer>() it from the cache when needed.
Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using Retrieve<TOptionsContainer>()
Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned.
Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned.
Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache
Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value.
Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using Retrieve<TOptionsContainer>()
+
public static Configuration.TOptionsContainer Bind<TOptionsContainer>(string sectionName = null, bool allowCached = true) where TOptionsContainer: new()
Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned.
+
public static Configuration.TValueType Get<TValueType>(string key, Configuration.TValueType defaultValue = null)
Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned.
Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache
+
public static Configuration.TOptionsContainer Retrieve<TOptionsContainer>() where TOptionsContainer: new()
+Type parameters
TOptionsContainer
Type of the configuration class to retrieve from cache
Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value.
+
private static bool TryConvertValue(Type targetType, object sourceValue, out object targetValue)
Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated.
The command line arguments have the syntax key=value (for example Key1=Option1 or prefixkey=value (for example -p:Key1=Option1 where -p: is the prefix). When the prefixes are not provided, all command line arguments are added to the configuration. When the prefixes are provided,the prefix is not a part of the key.
The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true, allowing to use the parameters like flags. For example having the argument -p:SkipStep1 and prefix -p: , the binding a bool property SkipStep1 will set the value of the property to true (doesn't change the configuration item itself). Of course, it's still possible to use the syntax -p:SkipStep1=true or -p:SkipStep1=false even in this case.
The name of the environment variable is used as a key to the configuration item. Use the "dot notation" in variable names to support the configuration hierarchy.
Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated.
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property.
Extended logger provides following methods to log with given set of the properties.
try
+ {
+ ...
+ }
+ catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){
+ //newer called as the default return value of ErrorFltr is false
+ }
The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it.
if(value is null) throw logger.Fatal<ArgumentNullException>("Value is null");
When logging an exception using the LoggerExt methods, the event property StackTrace is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using new StackTrace(2, true).ToString() . In other cases when the System.Exception.StackTrace is null or empty, new StackTrace(true).ToString() is used.
LoggerExt also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property CorrelationId . Such methods have the name ending with Corr suffix.
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
Flag whether the exception is to be catch by exception filter
+
Remarks
+
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
Flag whether the exception is to be catch by exception filter
+
Remarks
+
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
Flag whether the exception is to be catch by exception filter
+
Remarks
+
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
diff --git a/doc/net.adamec.lib.common.core.md b/doc/net.adamec.lib.common.core.md
new file mode 100644
index 0000000..7365f4d
--- /dev/null
+++ b/doc/net.adamec.lib.common.core.md
@@ -0,0 +1,3171 @@
+# Documentation #
+## Namespaces ##
+
+ | Name | Summary |
+ | ------ | --------- |
+ | [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x) | |
+ | [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k) | |
+ | [net.adamec.lib.common.core.utils](#n-net.adamec.lib.common.core.utils__1ltknbs) | |
+
+## Types ##
+
+ | Name | Modifier | Kind | Summary |
+ | ------ | ---------- | ------ | --------- |
+ | [BaseDisposable](#t-net.adamec.lib.common.core.utils.basedisposable__mdk3wh) | public abstract | Class | Helper class for implementation of System.IDisposable types |
+ | [CommonLogging](#t-net.adamec.lib.common.core.logging.commonlogging__1x32qka) | public static | Class | [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h) factory |
+ | [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) | public | Class | Singleton holding the application configuration (options) |
+ | [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6) | public | Class | Configuration builder providing the methods for adding the configuration items from individual sources |
+ | [LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix) | public | Class | Extended logger implementing [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h) |
+ | [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h) | public abstract | Interface | Logger interface - wrapper around the NLog.ILogger with some additional methods |
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## net.adamec.lib.common.core.config Namespace ##
+### Classes ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) | public | Singleton holding the application configuration (options) |
+ | [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6) | public | Configuration builder providing the methods for adding the configuration items from individual sources |
+
+
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration Class ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Sources: config\Configuration.cs
+
+
+Singleton holding the application configuration (options)
+
+
+
+```csharp
+public sealed class Configuration
+```
+
+Inheritance: object
+
+
+
+### Remarks ###
+This is the simple configuration container in case DI with more sophisticated containers is not used The configuration is stored as the key-value dictionary, supporting hierarchy using the dot separator and arrays.The arrays can contain values or another objects. Actually, mixed arrays of values and objects can be stored, but they are not supported for binding. For example `section1.option1` means the option1 available in section1, `section1.subSection2.option1` means the option1 available in section1.subSection2. `section1.option1[0]` means, that the option1 is array of values or objects (sections) within the section1. For arrays, the keys are like `OtherSection.SimpleArray[0]` or `OtherSection.ComplexObjectArray[0].Name`
+
+ [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) class provides a singleton instance, however the key functionality is provided via static functions, so no need to touch the [Instance](#p-net.adamec.lib.common.core.config.configuration.instance__svsil0) at all. The items can be retrieved by key using the [Get(string)](#m-net.adamec.lib.common.core.config.configuration.get_system.string___18gsgyv) and [Get<TValueType>(string, Configuration.TValueType)](#m-net.adamec.lib.common.core.config.configuration.get--1_system.string---0___5k6md0) methods. The first one returns null when the key is not found, the other one allow to define the default value to be returned, when the item is not found.
+
+ The inner class [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6) provides the methods to build the configuration from JSON config files, commandline arguments, environment values and/or direct entries. The static method [Builder()](#m-net.adamec.lib.common.core.config.configuration.builder__8hz4rf) clears the configuration items and binding cache and creates a new instance of [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6) allowing to build a configuration from scratch. The configuration is updated directly during the calls to builder methods, the existing items (keys) are updated, so it's possible to manage the priority of individual sources and the overrides if needed. The method [Build()](#m-net.adamec.lib.common.core.config.configuration.configurationbuilder.build__1runkhj) returns the configuration instance, breaking the fluent design of builder methods, however there is no other functionality within the method, so it's more the convention than need to use it at the end of configuration build.
+
+ Configuration binding it the way, how to access the configuration using the configuration objects instead of querying the individual items by key. When the method [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.core.config.configuration.bind--1_system.string-system.boolean___989gee) is used, it creates a new instance of given type and tries to map the public properties with public setter to the keys (using the "dot notation") within the [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) . It's possible to bind the object to to the root of the configuration to provide the whole configuration at once or bind it to the particular section to provide a configuration sub-tree. In general, the nested objects and both value and object arrays are supported. There are some rules when binding the arrays: The index must start with zero and must be in sequence (the first non-existing index stops the evaluation). The array should not mix the array or values and array of objects. The decision is made at the first item (index=0) whether it's value or object.
+
+ The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true. This is useful when the command line arguments are used like flags. For example having the argument `-p:SkipStep1` and prefix `-p:` , the binding a bool property `SkipStep1` will set the value of the property to `true` (doesn't change the configuration item itself). Of course, it's still possible to use the syntax `-p:SkipStep1=true` or `-p:SkipStep1=false` even in this case.
+
+ As the binding uses the reflection, it's quite expensive operation, so by default, the bound objects are cached (the cache key is the type of bound object, so binding the same type to different sections is not recommended ). It's possible to force the binding using the parameter of [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.core.config.configuration.bind--1_system.string-system.boolean___989gee) method. In general, the recommended pattern is to [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.core.config.configuration.bind--1_system.string-system.boolean___989gee) the configuration object after the configuration is built and then [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.core.config.configuration.retrieve--1__12g1h9d) it from the cache when needed.
+
+
+
+
+### Fields ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [bindingsCache](#f-net.adamec.lib.common.core.config.configuration.bindingscache__1l7sa9v) | private | Cache for bindings. Dictionary of type bound as a key and the bound object as value. |
+ | [instance](#f-net.adamec.lib.common.core.config.configuration.instance__1ezti22) | private static | Instance of the [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) created when the singleton is first touched |
+
+
+
+
+### Properties ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [Instance](#p-net.adamec.lib.common.core.config.configuration.instance__svsil0) | public static | Public [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) instance |
+ | [Items](#p-net.adamec.lib.common.core.config.configuration.items__b4jvtt) | private | Configuration items stored as key-value pairs |
+
+
+
+
+### Constructors ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [Configuration()](#m-net.adamec.lib.common.core.config.configuration.-cctor__1ooanmi) | private static | Static constructor |
+ | [Configuration()](#m-net.adamec.lib.common.core.config.configuration.-ctor__doxeb7) | private | Private constructor used to build the singleton instance |
+
+
+
+
+### Methods ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [AddOrUpdateItem(string, object)](#m-net.adamec.lib.common.core.config.configuration.addorupdateitem_system.string-system.object___zdqimv) | private | Add a new configuration item with given value or updates its value if the key already exists. |
+ | [Bind(Type, string)](#m-net.adamec.lib.common.core.config.configuration.bind_system.type-system.string___nirsun) | private static | Creates a new object with given type and binds the configuration to its public properties where possible. |
+ | [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.core.config.configuration.bind--1_system.string-system.boolean___989gee) | public static | Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.core.config.configuration.retrieve--1__12g1h9d) |
+ | [Builder()](#m-net.adamec.lib.common.core.config.configuration.builder__8hz4rf) | public static | Clears the configuration items and binding cache and creates a new instance of [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6) |
+ | [Get(string)](#m-net.adamec.lib.common.core.config.configuration.get_system.string___18gsgyv) | public static | Gets the configuration item by key |
+ | [Get<TValueType>(string, Configuration.TValueType)](#m-net.adamec.lib.common.core.config.configuration.get--1_system.string---0___5k6md0) | public static | Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned. |
+ | [GetSection(string)](#m-net.adamec.lib.common.core.config.configuration.getsection_system.string___1jts3sw) | private static | Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned. |
+ | [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.core.config.configuration.retrieve--1__12g1h9d) | public static | Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache |
+ | [TryConvertValue(Type, object, object)](#m-net.adamec.lib.common.core.config.configuration.tryconvertvalue_system.type-system.object-system.object-___63jecz) | private static | Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value. |
+
+
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.bindingsCache Field ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9)
+Sources: config\Configuration.cs
+
+
+Cache for bindings. Dictionary of type bound as a key and the bound object as value.
+
+
+
+```csharp
+private readonly ConcurrentDictionary bindingsCache
+```
+
+Field value
+
+
+### Remarks ###
+Cache is used to prevent the "expensive" binding operation in case there is no need to refresh the bound configuration object
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.instance Field ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9)
+Sources: config\Configuration.cs
+
+
+Instance of the [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) created when the singleton is first touched
+
+
+
+```csharp
+private static readonly Configuration instance
+```
+
+Field value
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.Bind(Type, string) Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9)
+Sources: config\Configuration.cs
+
+
+Creates a new object with given type and binds the configuration to its public properties where possible.
+
+
+
+```csharp
+private static object Bind(Type type, string sectionName = null)
+```
+
+Method parameters
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.Bind<TOptionsContainer>(string, bool) Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9)
+Sources: config\Configuration.cs
+
+
+Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.core.config.configuration.retrieve--1__12g1h9d)
+
+
+
+```csharp
+public static Configuration.TOptionsContainer Bind(string sectionName = null, bool allowCached = true) where TOptionsContainer: new()
+```
+
+Type parameters
Retrieved configuration item value or null if not found (or the configuration item is null itself)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.Get<TValueType>(string, Configuration.TValueType) Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9)
+Sources: config\Configuration.cs
+
+
+Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned.
+
+
+
+```csharp
+public static Configuration.TValueType Get(string key, Configuration.TValueType defaultValue = null)
+```
+
+Type parameters
Retrieved configuration item value or defaultValue when it can't be retrieved or converted
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.GetSection(string) Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9)
+Sources: config\Configuration.cs
+
+
+Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned.
+
+
+
+```csharp
+private static Dictionary GetSection(string sectionName = null)
+```
+
+Method parameters
The configuration items that belong to the section with sectionName . The keys in returned dictionary are relative to given section!
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.Retrieve<TOptionsContainer>() Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9)
+Sources: config\Configuration.cs
+
+
+Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache
+
+
+
+```csharp
+public static Configuration.TOptionsContainer Retrieve() where TOptionsContainer: new()
+```
+
+Type parameters
TOptionsContainer
Type of the configuration class to retrieve from cache
The instance of TOptionsContainer bound to the configuration or a new instance if not found
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.TryConvertValue(Type, object, object) Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9)
+Sources: config\Configuration.cs
+
+
+Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value.
+
+
+
+```csharp
+private static bool TryConvertValue(Type targetType, object sourceValue, out object targetValue)
+```
+
+Method parameters
The result or conversion. If true, the targetValue can be set to property having targetType
+
+
+### Remarks ###
+The implementation treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true.
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.ConfigurationBuilder Class ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Sources: config\Configuration.cs
+
+
+Configuration builder providing the methods for adding the configuration items from individual sources
+
+
+
+```csharp
+public class Configuration.ConfigurationBuilder
+```
+
+Inheritance: object
+
+
+
+### Methods ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [Add(string, object)](#m-net.adamec.lib.common.core.config.configuration.configurationbuilder.add_system.string-system.object___awv60h) | public | Add a new configuration item with given value or updates its value if the key already exists. |
+ | [AddCommandLineArguments(string[])](#m-net.adamec.lib.common.core.config.configuration.configurationbuilder.addcommandlinearguments_system.string_____hzn4jm) | public | Adds the command line arguments starting with prefixes into the [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) . When a configuration item exists, the value is updated. |
+ | [AddEnvironmentVariables()](#m-net.adamec.lib.common.core.config.configuration.configurationbuilder.addenvironmentvariables__f440e4) | public | Adds all environment variables into the [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) . When a configuration item exists, the value is updated. |
+ | [AddJsonFile(string, bool, bool)](#m-net.adamec.lib.common.core.config.configuration.configurationbuilder.addjsonfile_system.string-system.boolean-system.boolean___slvwrt) | public | Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated. |
+ | [Build()](#m-net.adamec.lib.common.core.config.configuration.configurationbuilder.build__1runkhj) | public | Finishes the configuration building and returns the [Instance](#p-net.adamec.lib.common.core.config.configuration.instance__svsil0) |
+
+
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.ConfigurationBuilder.Add(string, object) Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6)
+Sources: config\Configuration.cs
+
+
+Add a new configuration item with given value or updates its value if the key already exists.
+
+
+
+```csharp
+public Configuration.ConfigurationBuilder Add(string key, object value)
+```
+
+Method parameters
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.ConfigurationBuilder.AddCommandLineArguments(string[]) Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6)
+Sources: config\Configuration.cs
+
+
+Adds the command line arguments starting with prefixes into the [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) . When a configuration item exists, the value is updated.
+
+
+
+```csharp
+public Configuration.ConfigurationBuilder AddCommandLineArguments(params string[] prefixes)
+```
+
+Method parameters
The current [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6)
+
+
+### Remarks ###
+The command line arguments have the syntax `key=value` (for example `Key1=Option1` or `prefixkey=value` (for example `-p:Key1=Option1` where `-p:` is the prefix). When the prefixes are not provided, all command line arguments are added to the configuration. When the prefixes are provided,the prefix is not a part of the key. The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true, allowing to use the parameters like flags. For example having the argument `-p:SkipStep1` and prefix `-p:` , the binding a bool property `SkipStep1` will set the value of the property to `true` (doesn't change the configuration item itself). Of course, it's still possible to use the syntax `-p:SkipStep1=true` or `-p:SkipStep1=false` even in this case.
+
+
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.ConfigurationBuilder.AddEnvironmentVariables() Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6)
+Sources: config\Configuration.cs
+
+
+Adds all environment variables into the [Configuration](#t-net.adamec.lib.common.core.config.configuration__1akk3r9) . When a configuration item exists, the value is updated.
+
+
+
+```csharp
+public Configuration.ConfigurationBuilder AddEnvironmentVariables()
+```
+
+Return value
The current [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6)
+
+
+### Remarks ###
+The name of the environment variable is used as a key to the configuration item. Use the "dot notation" in variable names to support the configuration hierarchy.
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## Configuration.ConfigurationBuilder.AddJsonFile(string, bool, bool) Method ##
+Namespace: [net.adamec.lib.common.core.config](#n-net.adamec.lib.common.core.config__1q6ay5x)
+Assembly: net.adamec.lib.common.core
+Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.core.config.configuration.configurationbuilder__90jrb6)
+Sources: config\Configuration.cs
+
+
+Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated.
+
+
+
+```csharp
+public Configuration.ConfigurationBuilder AddJsonFile(string fileName, bool ignoreNullOrEmptyFileName = false, bool ignoreIfNotExist = false)
+```
+
+Method parameters
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## CommonLogging.CreateLogger(Type) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [CommonLogging](#t-net.adamec.lib.common.core.logging.commonlogging__1x32qka)
+Sources: logging\CommonLogging.cs
+
+
+Creates the logger for given type. The name of the logger will be System.Type.FullName
+
+
+
+```csharp
+public static ILogger CreateLogger(Type type)
+```
+
+Method parameters
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## CommonLogging.CreateLogger<T>() Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [CommonLogging](#t-net.adamec.lib.common.core.logging.commonlogging__1x32qka)
+Sources: logging\CommonLogging.cs
+
+
+Creates the logger for given type. The name of the logger will be System.Type.FullName
+
+
+
+```csharp
+public static ILogger CreateLogger()
+```
+
+Type parameters
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## LoggerExt Class ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Sources: logging\LoggerExt.CorrelationId.cs, logging\LoggerExt.cs, logging\LoggerExt.EventProperties.cs, logging\LoggerExt.ExceptionFilter.cs, logging\LoggerExt.ExceptionPassThrough.cs
+
+
+Extended logger implementing [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h)
+
+
+
+```csharp
+public class LoggerExt : Logger, ILogger
+```
+
+Inheritance: object -> NLog.Logger
+Implements: [net.adamec.lib.common.core.logging.ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h), NLog.ILogger, NLog.ILoggerBase, NLog.ISuppress
+
+
+### Methods ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [CreateException<TException>(string, string, Exception)](#m-net.adamec.lib.common.core.logging.loggerext.createexception--1_system.string-system.string--system.exception___gv82y9) | private static | Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type |
+ | [Debug(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.loggerext.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___12jvdw5) | public | Writes the diagnostic message at the `Debug` level. |
+ | [DebugCorr(string, string)](#m-net.adamec.lib.common.core.logging.loggerext.debugcorr_system.string-system.string___1vciqec) | public | Writes the diagnostic message at the `Debug` level with correlation ID. |
+ | [Error(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___13j0xyo) | public | Writes the diagnostic message at the `Error` level. |
+ | [Error(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.string___gaullw) | public | Writes the diagnostic message at the `Error` level. |
+ | [Error<TException>(string, Exception)](#m-net.adamec.lib.common.core.logging.loggerext.error--1_system.string-system.exception___1b66v34) | public | Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type |
+ | [ErrorCorr(string, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.errorcorr_system.string-system.exception-system.string___glh8ib) | public | Writes the diagnostic message at the `Error` level with correlation ID. |
+ | [ErrorCorr(string, string)](#m-net.adamec.lib.common.core.logging.loggerext.errorcorr_system.string-system.string___1v17zgb) | public | Writes the diagnostic message at the `Error` level with correlation ID. |
+ | [ErrorCorr<TException>(string, LoggerExt.TException, string)](#m-net.adamec.lib.common.core.logging.loggerext.errorcorr--1_system.string---0-system.string___1u206c2) | public | Writes the diagnostic message at the `Error` level and returns the exception of given type |
+ | [ErrorCorr<TException>(string, string, Exception)](#m-net.adamec.lib.common.core.logging.loggerext.errorcorr--1_system.string-system.string-system.exception___1u345km) | public | Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type |
+ | [ErrorFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.core.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___urporj) | public | Writes the diagnostic message at the `Error` level and returns the exception of given type |
+ | [ErrorFltrCorr<TException>(string, LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.core.logging.loggerext.errorfltrcorr--1_system.string---0-system.string-system.boolean___1emqn0t) | public | Writes the diagnostic message at the `Error` level and returns the exception of given type |
+ | [ErrorPassThrough(Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.errorpassthrough_system.exception-system.string___1v1x3rv) | public | Writes the diagnostic message at the `Error` level and returns given exception |
+ | [Fatal(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1jocg2c) | public | Writes the diagnostic message at the `Fatal` level. |
+ | [Fatal(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.loggerext.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___hi7jxo) | public | Writes the diagnostic message at the `Fatal` level. |
+ | [Fatal<TException>(string, Exception)](#m-net.adamec.lib.common.core.logging.loggerext.fatal--1_system.string-system.exception___16xajtw) | public | Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type |
+ | [FatalCorr(string, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.fatalcorr_system.string-system.exception-system.string___hk8lud) | public | Writes the diagnostic message at the `Fatal` level with correlation ID. |
+ | [FatalCorr(string, string)](#m-net.adamec.lib.common.core.logging.loggerext.fatalcorr_system.string-system.string___1by18q9) | public | Writes the diagnostic message at the `Fatal` level with correlation ID. |
+ | [FatalCorr<TException>(string, LoggerExt.TException, string)](#m-net.adamec.lib.common.core.logging.loggerext.fatalcorr--1_system.string---0-system.string___1gzp2nu) | public | Writes the diagnostic message at the `Fatal` level and returns the exception of given type |
+ | [FatalCorr<TException>(string, string, Exception)](#m-net.adamec.lib.common.core.logging.loggerext.fatalcorr--1_system.string-system.string-system.exception___500x9y) | public | Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type |
+ | [FatalFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.core.logging.loggerext.fatalfltr--1_--0-system.string-system.boolean___g4elu9) | public | Writes the diagnostic message at the `Fatal` level and returns catchIt value. |
+ | [FatalFltrCorr<TException>(string, LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.core.logging.loggerext.fatalfltrcorr--1_system.string---0-system.string-system.boolean___k3oapn) | public | Writes the diagnostic message at the `Fatal` level and returns catchIt value. |
+ | [FatalPassThrough(Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.fatalpassthrough_system.exception-system.string___49a9f1) | public | Writes the diagnostic message at the `Fatal` level and returns given exception > |
+ | [Info(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.loggerext.info_system.collections.generic.dictionary_system.string-system.object_-system.string___134z29q) | public | Writes the diagnostic message at the `Info` level. |
+ | [InfoCorr(string, string)](#m-net.adamec.lib.common.core.logging.loggerext.infocorr_system.string-system.string___6odg4h) | public | Writes the diagnostic message at the `Info` level with correlation ID. |
+ | [LogIt(LogLevel, Dictionary<string,object>, string, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.logit_nlog.loglevel-system.collections.generic.dictionary_system.string-system.object_-system.string-system.exception-system.string___7kezy9) | private | Writes the item (message with optional event properties and exception) into the log |
+ | [LogIt(LogLevel, string, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.logit_nlog.loglevel-system.string-system.exception-system.string___c50zo8) | private | Writes the item (message with optional exception) into the log |
+ | [LogIt(LogLevel, string, string, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.logit_nlog.loglevel-system.string-system.string-system.exception-system.string___zz7fm8) | private | Writes the item (message with optional exception) with correlation Id into the log |
+ | [Trace(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.loggerext.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___1s43qmh) | public | Writes the diagnostic message at the `Trace` level. |
+ | [TraceCorr(string, string)](#m-net.adamec.lib.common.core.logging.loggerext.tracecorr_system.string-system.string___19gcjny) | public | Writes the diagnostic message at the `Trace` level with correlation ID |
+ | [Warn(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1l2efzm) | public | Writes the diagnostic message at the `Warn` level. |
+ | [Warn(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___1olzpfm) | public | Writes the diagnostic message at the `Warn` level. |
+ | [WarnCorr(string, Exception, string)](#m-net.adamec.lib.common.core.logging.loggerext.warncorr_system.string-system.exception-system.string___bxfkhp) | public | Writes the diagnostic message at the `Warn` level with correlation ID. |
+ | [WarnCorr(string, string)](#m-net.adamec.lib.common.core.logging.loggerext.warncorr_system.string-system.string___2mtn55) | public | Writes the diagnostic message at the `Warn` level with correlation ID. |
+
+
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## LoggerExt.CreateException<TException>(string, string, Exception) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix)
+Sources: logging\LoggerExt.cs
+
+
+Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
+
+
+
+```csharp
+private static LoggerExt.TException CreateException(string message, out string stackTrace, Exception innerException = null) where TException: Exception
+```
+
+Type parameters
Flag whether the exception is to be catch by exception filter
Implements: [ILogger.ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___jv4zvb)
+
+
+### Example ###
+The following code logs any exception without catching it (function returns false by default)
+```csharp
+ try
+ {
+ ...
+ }
+ catch (Exception e) when (Logger.FatalFltr(e)) {}
+```
+ The following code catch and log the ArgumentException and logs any other exception without catching it.
+```csharp
+ try
+ {
+ ...
+ }
+ catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) {}
+ catch (Exception e) when (Logger.FatalFltr(e)) {}
+```
+
+
+
+### Remarks ###
+This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## LoggerExt.ErrorFltrCorr<TException>(string, LoggerExt.TException, string, bool) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix)
+Sources: logging\LoggerExt.CorrelationId.cs
+
+
+Writes the diagnostic message at the `Error` level and returns the exception of given type
+
+
+
+```csharp
+public bool ErrorFltrCorr(string correlationId, LoggerExt.TException exception, string message = null, bool catchIt = false) where TException: Exception
+```
+
+Type parameters
Flag whether the exception is to be catch by exception filter
Implements: [ILogger.ErrorFltrCorr<TException>(string, ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.errorfltrcorr--1_system.string---0-system.string-system.boolean___cp8skd)
+
+
+### Remarks ###
+This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
+
+### See Also ###
+[ErrorFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.core.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___urporj)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## LoggerExt.ErrorPassThrough(Exception, string) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix)
+Sources: logging\LoggerExt.ExceptionPassThrough.cs
+
+
+Writes the diagnostic message at the `Error` level and returns given exception
+
+
+
+```csharp
+public Exception ErrorPassThrough(Exception exception, string message = null)
+```
+
+Method parameters
Flag whether the exception is to be catch by exception filter
Implements: [ILogger.FatalFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1d7c7n5)
+
+
+### Remarks ###
+This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
+
+### See Also ###
+[ErrorFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.core.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___urporj)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## LoggerExt.FatalFltrCorr<TException>(string, LoggerExt.TException, string, bool) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix)
+Sources: logging\LoggerExt.CorrelationId.cs
+
+
+Writes the diagnostic message at the `Fatal` level and returns catchIt value.
+
+
+
+```csharp
+public bool FatalFltrCorr(string correlationId, LoggerExt.TException exception, string message = null, bool catchIt = false) where TException: Exception
+```
+
+Type parameters
Flag whether the exception is to be catch by exception filter
Implements: [ILogger.FatalFltrCorr<TException>(string, ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.fatalfltrcorr--1_system.string---0-system.string-system.boolean___b4uopf)
+
+
+### Remarks ###
+This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
+
+### See Also ###
+[ErrorFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.core.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___urporj)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## LoggerExt.FatalPassThrough(Exception, string) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix)
+Sources: logging\LoggerExt.ExceptionPassThrough.cs
+
+
+Writes the diagnostic message at the `Fatal` level and returns given exception >
+
+
+
+```csharp
+public Exception FatalPassThrough(Exception exception, string message = null)
+```
+
+Method parameters
Implements: [ILogger.WarnCorr(string, string)](#m-net.adamec.lib.common.core.logging.ilogger.warncorr_system.string-system.string___98ayxl)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## ILogger Interface ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Sources: logging\ILogger.CorrelationId.cs, logging\ILogger.cs, logging\ILogger.EventProperties.cs, logging\ILogger.ExceptionFilter.cs, logging\ILogger.ExceptionPassThrough.cs
+
+
+Logger interface - wrapper around the NLog.ILogger with some additional methods
+
+
+
+```csharp
+public interface ILogger : ILogger
+```
+
+Implemented by: [net.adamec.lib.common.core.logging.LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix)
+Implements: NLog.ILogger, NLog.ILoggerBase, NLog.ISuppress
+
+
+### Remarks ###
+The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property. Extended logger provides following methods to log with given set of the properties.
+
+
+
+
+ - [Trace(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___k7nqox) ,
+ - [Debug(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___1d4086l) ,
+ - [Info(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1w4twda) ,
+ - [Warn(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___13bvxqi) ,
+ - [Error(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___mem0ik) ,
+ - [Fatal(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1xh403w) ,
+ - [Warn(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___15qeutm) ,
+ - [Error(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1b3rh4) and
+ - [Fatal(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1mot8ic)
+
+
+
+
+
+ Sometimes, it's useful to have an exception logging method implemented as the operation returning the exception being logged. The [ErrorPassThrough(Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.errorpassthrough_system.exception-system.string___1ewxalv) and [FatalPassThrough(Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatalpassthrough_system.exception-system.string___5v7ipp) methods will log given exception and return it for further processing.
+```csharp
+ try
+ {
+ ...
+ }
+ catch (Exception ex){
+ if(logger.ErrorPassThrough(ex) is MyException){
+ return null;
+ }else{
+ throw;
+ }
+ }
+```
+ In the example above, the exception is always logged and then the decision/action is taken.
+
+ C# 6 brought the exception filters that don't unwind the stack as the exception is not catch yet when processing the filter. It can also be used for logging the exceptions without actually catching them (when the exception filter returns `false` ). Extended logger provides functions [ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___jv4zvb) and [FatalFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1d7c7n5) for this purpose.
+```csharp
+ try
+ {
+ ...
+ }
+ catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){
+ //newer called as the default return value of ErrorFltr is false
+ }
+```
+ The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it.
+```csharp
+ try
+ {
+ ...
+ }
+ catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) { ... }
+ catch (Exception e) when (Logger.FatalFltr(e)) {}
+```
+
+
+ Logger can also create and exception, log it and return using functions [Error<TException>(string, Exception)](#m-net.adamec.lib.common.core.logging.ilogger.error--1_system.string-system.exception___urvjig) and [Fatal<TException>(string, Exception)](#m-net.adamec.lib.common.core.logging.ilogger.fatal--1_system.string-system.exception___3m9nac)
+```csharp
+ if(value is null) throw logger.Fatal("Value is null");
+```
+
+
+ When logging an exception using the [LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix) methods, the event property `StackTrace` is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using `new StackTrace(2, true).ToString()` . In other cases when the System.Exception.StackTrace is null or empty, `new StackTrace(true).ToString()` is used.
+
+ [LoggerExt](#t-net.adamec.lib.common.core.logging.loggerext__1aeycix) also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property `CorrelationId` . Such methods have the name ending with `Corr` suffix.
+
+
+
+
+### Methods ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [Debug(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___1d4086l) | public abstract | Writes the diagnostic message at the `Debug` level. |
+ | [DebugCorr(string, string)](#m-net.adamec.lib.common.core.logging.ilogger.debugcorr_system.string-system.string___1ni5dj8) | public abstract | Writes the diagnostic message at the `Debug` level with correlation ID. |
+ | [Error(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1b3rh4) | public abstract | Writes the diagnostic message at the `Error` level. |
+ | [Error(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___mem0ik) | public abstract | Writes the diagnostic message at the `Error` level. |
+ | [Error<TException>(string, Exception)](#m-net.adamec.lib.common.core.logging.ilogger.error--1_system.string-system.exception___urvjig) | public abstract | Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type |
+ | [ErrorCorr(string, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.errorcorr_system.string-system.exception-system.string___1all5er) | public abstract | Writes the diagnostic message at the `Error` level with correlation ID. |
+ | [ErrorCorr(string, string)](#m-net.adamec.lib.common.core.logging.ilogger.errorcorr_system.string-system.string___1w7b7or) | public abstract | Writes the diagnostic message at the `Error` level with correlation ID. |
+ | [ErrorCorr<TException>(string, ILogger.TException, string)](#m-net.adamec.lib.common.core.logging.ilogger.errorcorr--1_system.string---0-system.string___15rz22y) | public abstract | Writes the diagnostic message at the `Error` level and returns the exception of given type |
+ | [ErrorCorr<TException>(string, string, Exception)](#m-net.adamec.lib.common.core.logging.ilogger.errorcorr--1_system.string-system.string-system.exception___zycwpy) | public abstract | Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type |
+ | [ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___jv4zvb) | public abstract | Writes the diagnostic message at the `Error` level and returns the exception of given type |
+ | [ErrorFltrCorr<TException>(string, ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.errorfltrcorr--1_system.string---0-system.string-system.boolean___cp8skd) | public abstract | Writes the diagnostic message at the `Error` level and returns the exception of given type |
+ | [ErrorPassThrough(Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.errorpassthrough_system.exception-system.string___1ewxalv) | public abstract | Writes the diagnostic message at the `Error` level and returns given exception |
+ | [Fatal(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1mot8ic) | public abstract | Writes the diagnostic message at the `Fatal` level. |
+ | [Fatal(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1xh403w) | public abstract | Writes the diagnostic message at the `Fatal` level. |
+ | [Fatal<TException>(string, Exception)](#m-net.adamec.lib.common.core.logging.ilogger.fatal--1_system.string-system.exception___3m9nac) | public abstract | Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type |
+ | [FatalCorr(string, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatalcorr_system.string-system.exception-system.string___zugzl9) | public abstract | Writes the diagnostic message at the `Fatal` level with correlation ID. |
+ | [FatalCorr(string, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatalcorr_system.string-system.string___1iiczh5) | public abstract | Writes the diagnostic message at the `Fatal` level with correlation ID. |
+ | [FatalCorr<TException>(string, ILogger.TException, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatalcorr--1_system.string---0-system.string___1h2a4gq) | public abstract | Writes the diagnostic message at the `Fatal` level and returns the exception of given type |
+ | [FatalCorr<TException>(string, string, Exception)](#m-net.adamec.lib.common.core.logging.ilogger.fatalcorr--1_system.string-system.string-system.exception___12e1fry) | public abstract | Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type |
+ | [FatalFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1d7c7n5) | public abstract | Writes the diagnostic message at the `Fatal` level and returns catchIt value. |
+ | [FatalFltrCorr<TException>(string, ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.fatalfltrcorr--1_system.string---0-system.string-system.boolean___b4uopf) | public abstract | Writes the diagnostic message at the `Fatal` level and returns catchIt value. |
+ | [FatalPassThrough(Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.fatalpassthrough_system.exception-system.string___5v7ipp) | public abstract | Writes the diagnostic message at the `Fatal` level and returns given exception |
+ | [Info(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1w4twda) | public abstract | Writes the diagnostic message at the `Info` level. |
+ | [InfoCorr(string, string)](#m-net.adamec.lib.common.core.logging.ilogger.infocorr_system.string-system.string___1h9q83t) | public abstract | Writes the diagnostic message at the `Info` level with correlation ID. |
+ | [Trace(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___k7nqox) | public abstract | Writes the diagnostic message at the `Trace` level. |
+ | [TraceCorr(string, string)](#m-net.adamec.lib.common.core.logging.ilogger.tracecorr_system.string-system.string___14lwu26) | public abstract | Writes the diagnostic message at the `Trace` level with correlation ID. |
+ | [Warn(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___15qeutm) | public abstract | Writes the diagnostic message at the `Warn` level. |
+ | [Warn(Dictionary<string,object>, string)](#m-net.adamec.lib.common.core.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___13bvxqi) | public abstract | Writes the diagnostic message at the `Warn` level. |
+ | [WarnCorr(string, Exception, string)](#m-net.adamec.lib.common.core.logging.ilogger.warncorr_system.string-system.exception-system.string___s8xk3x) | public abstract | Writes the diagnostic message at the `Warn` level with correlation ID. |
+ | [WarnCorr(string, string)](#m-net.adamec.lib.common.core.logging.ilogger.warncorr_system.string-system.string___98ayxl) | public abstract | Writes the diagnostic message at the `Warn` level with correlation ID. |
+
+
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## ILogger.Debug(Dictionary<string,object>, string) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h)
+Sources: logging\ILogger.EventProperties.cs
+
+
+Writes the diagnostic message at the `Debug` level.
+
+
+
+```csharp
+public abstract void Debug(Dictionary eventProperties, [Localizable(false)] string message)
+```
+
+Method parameters
Flag whether the exception is to be catch by exception filter
+
+
+### Example ###
+The following code logs any exception without catching it (function returns false by default)
+```csharp
+ try
+ {
+ ...
+ }
+ catch (Exception e) when (Logger.FatalFltr(e)) {}
+```
+ The following code catch and log the ArgumentException and logs any other exception without catching it.
+```csharp
+ try
+ {
+ ...
+ }
+ catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) {}
+ catch (Exception e) when (Logger.FatalFltr(e)) {}
+```
+
+
+
+### Remarks ###
+This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## ILogger.ErrorFltrCorr<TException>(string, ILogger.TException, string, bool) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h)
+Sources: logging\ILogger.CorrelationId.cs
+
+
+Writes the diagnostic message at the `Error` level and returns the exception of given type
+
+
+
+```csharp
+public abstract bool ErrorFltrCorr(string correlationId, ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
+```
+
+Type parameters
Flag whether the exception is to be catch by exception filter
+
+
+### Remarks ###
+This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
+
+### See Also ###
+[ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___jv4zvb)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## ILogger.ErrorPassThrough(Exception, string) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h)
+Sources: logging\ILogger.ExceptionPassThrough.cs
+
+
+Writes the diagnostic message at the `Error` level and returns given exception
+
+
+
+```csharp
+public abstract Exception ErrorPassThrough(Exception exception, string message = null)
+```
+
+Method parameters
Flag whether the exception is to be catch by exception filter
+
+
+### Remarks ###
+This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
+
+### See Also ###
+[ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___jv4zvb)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## ILogger.FatalFltrCorr<TException>(string, ILogger.TException, string, bool) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h)
+Sources: logging\ILogger.CorrelationId.cs
+
+
+Writes the diagnostic message at the `Fatal` level and returns catchIt value.
+
+
+
+```csharp
+public abstract bool FatalFltrCorr(string correlationId, ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
+```
+
+Type parameters
Flag whether the exception is to be catch by exception filter
+
+
+### Remarks ###
+This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
+
+### See Also ###
+[ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.core.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___jv4zvb)
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## ILogger.FatalPassThrough(Exception, string) Method ##
+Namespace: [net.adamec.lib.common.core.logging](#n-net.adamec.lib.common.core.logging__1s55q1k)
+Assembly: net.adamec.lib.common.core
+Type: [ILogger](#t-net.adamec.lib.common.core.logging.ilogger__pion8h)
+Sources: logging\ILogger.ExceptionPassThrough.cs
+
+
+Writes the diagnostic message at the `Fatal` level and returns given exception
+
+
+
+```csharp
+public abstract Exception FatalPassThrough(Exception exception, string message = null)
+```
+
+Method parameters
+
+
+Go to [namespaces](net.adamec.lib.common.core.md#namespace-list) or [types](net.adamec.lib.common.core.md#type-list)
+
+
+
+
+
+## BaseDisposable.DisposeNative() Method ##
+Namespace: [net.adamec.lib.common.core.utils](#n-net.adamec.lib.common.core.utils__1ltknbs)
+Assembly: net.adamec.lib.common.core
+Type: [BaseDisposable](#t-net.adamec.lib.common.core.utils.basedisposable__mdk3wh)
+Sources: utils\BaseDisposable.cs
+
+
+Dispose of COM objects, Handles, etc. Then set those objects to null.
+
+
+
+```csharp
+protected virtual void DisposeNative()
+```
+
+Return value
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Simple configuration container in case DI with more sophisticated containers is not used. Supports the JSON config files, command line arguments
- and environment variables as sources and their hierarchy/overrides. The configuration can be used as key-value pairs or bound to objects (Source only package).
The runtime "container" for context operations. The context can be both state-less and state-full and it's valid until it's disposed.
The current context is accessible via static property Current.
@@ -165,8 +153,7 @@
The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open, and the file specified by path does not exist. The file must already exist in these modes.
The access requested is not permitted by the operating system for the specified path , such as when access is Write or ReadWrite and the file or directory is set for read-only access. -or- System.IO.FileOptions.Encrypted is specified for options, but file encryption is not supported on the current platform.
path is an empty string (""), contains only white space, or contains one or more invalid characters. -or- path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc. in an NTFS environment.
The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
This is the simple configuration container in case DI with more sophisticated containers is not used The configuration is stored as the key-value dictionary, supporting hierarchy using the dot separator and arrays.The arrays can contain values or another objects. Actually, mixed arrays of values and objects can be stored, but they are not supported for binding.
For example section1.option1 means the option1 available in section1, section1.subSection2.option1 means the option1 available in section1.subSection2. section1.option1[0] means, that the option1 is array of values or objects (sections) within the section1. For arrays, the keys are like OtherSection.SimpleArray[0] or OtherSection.ComplexObjectArray[0].Name
Configuration class provides a singleton instance, however the key functionality is provided via static functions, so no need to touch the Instance at all. The items can be retrieved by key using the Get(string) and Get<TValueType>(string, Configuration.TValueType) methods. The first one returns null when the key is not found, the other one allow to define the default value to be returned, when the item is not found.
The inner class Configuration.ConfigurationBuilder provides the methods to build the configuration from JSON config files, commandline arguments, environment values and/or direct entries. The static method Builder() clears the configuration items and binding cache and creates a new instance of Configuration.ConfigurationBuilder allowing to build a configuration from scratch. The configuration is updated directly during the calls to builder methods, the existing items (keys) are updated, so it's possible to manage the priority of individual sources and the overrides if needed. The method Build() returns the configuration instance, breaking the fluent design of builder methods, however there is no other functionality within the method, so it's more the convention than need to use it at the end of configuration build.
Configuration binding it the way, how to access the configuration using the configuration objects instead of querying the individual items by key. When the method Bind<TOptionsContainer>(string, bool) is used, it creates a new instance of given type and tries to map the public properties with public setter to the keys (using the "dot notation") within the Configuration . It's possible to bind the object to to the root of the configuration to provide the whole configuration at once or bind it to the particular section to provide a configuration sub-tree. In general, the nested objects and both value and object arrays are supported. There are some rules when binding the arrays: The index must start with zero and must be in sequence (the first non-existing index stops the evaluation). The array should not mix the array or values and array of objects. The decision is made at the first item (index=0) whether it's value or object.
The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true. This is useful when the command line arguments are used like flags. For example having the argument -p:SkipStep1 and prefix -p: , the binding a bool property SkipStep1 will set the value of the property to true (doesn't change the configuration item itself). Of course, it's still possible to use the syntax -p:SkipStep1=true or -p:SkipStep1=false even in this case.
As the binding uses the reflection, it's quite expensive operation, so by default, the bound objects are cached (the cache key is the type of bound object, so binding the same type to different sections is not recommended ). It's possible to force the binding using the parameter of Bind<TOptionsContainer>(string, bool) method. In general, the recommended pattern is to Bind<TOptionsContainer>(string, bool) the configuration object after the configuration is built and then Retrieve<TOptionsContainer>() it from the cache when needed.
Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using Retrieve<TOptionsContainer>()
Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned.
Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned.
Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache
Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value.
Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using Retrieve<TOptionsContainer>()
-
public static Configuration.TOptionsContainer Bind<TOptionsContainer>(string sectionName = null, bool allowCached = true) where TOptionsContainer: new()
Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned.
-
public static Configuration.TValueType Get<TValueType>(string key, Configuration.TValueType defaultValue = null)
Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned.
Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache
-
public static Configuration.TOptionsContainer Retrieve<TOptionsContainer>() where TOptionsContainer: new()
-Type parameters
TOptionsContainer
Type of the configuration class to retrieve from cache
Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value.
-
private static bool TryConvertValue(Type targetType, object sourceValue, out object targetValue)
Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated.
The command line arguments have the syntax key=value (for example Key1=Option1 or prefixkey=value (for example -p:Key1=Option1 where -p: is the prefix). When the prefixes are not provided, all command line arguments are added to the configuration. When the prefixes are provided,the prefix is not a part of the key.
The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true, allowing to use the parameters like flags. For example having the argument -p:SkipStep1 and prefix -p: , the binding a bool property SkipStep1 will set the value of the property to true (doesn't change the configuration item itself). Of course, it's still possible to use the syntax -p:SkipStep1=true or -p:SkipStep1=false even in this case.
The name of the environment variable is used as a key to the configuration item. Use the "dot notation" in variable names to support the configuration hierarchy.
Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated.
Scans given assemblies for classes marked with AutoOptionsAttribute and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property.
Extended logger provides following methods to log with given set of the properties.
try
- {
- ...
- }
- catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){
- //newer called as the default return value of ErrorFltr is false
- }
The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it.
if(value is null) throw logger.Fatal<ArgumentNullException>("Value is null");
When logging an exception using the LoggerExt methods, the event property StackTrace is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using new StackTrace(2, true).ToString() . In other cases when the System.Exception.StackTrace is null or empty, new StackTrace(true).ToString() is used.
LoggerExt also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property CorrelationId . Such methods have the name ending with Corr suffix.
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
Flag whether the exception is to be catch by exception filter
-
Remarks
-
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
Flag whether the exception is to be catch by exception filter
-
Remarks
-
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
Flag whether the exception is to be catch by exception filter
-
Remarks
-
This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
The context can be both state-less and state-full and it's valid until it's disposed. The current context is accessible via Current . The contexts are chained, when a new context is created using BeginContext(Context<TState>.TState) , the Current context became the Parent of the new one and the newly created context will be set as the Current one. When the context is disposed, the Current context is set to Parent of disposing context. Context's children are disposed as well during the context disposal. The AddToDisposer(IDisposable) method is to be used in inherited classes whenever they manage any disposable resource to ensure their proper life time (when the State is System.IDisposable , it's added to disposer automatically).
The base implementation just manages the life time, context chain and keeps the state (when provided). Inherit from the Context<TState> to add the context related operations (inherited classes have the access to State ).
Based on the implementation of Guard Scopes by https://github.com/safakgur at https://github.com/safakgur/guard/blob/v1.7.0/src/Guard.Scopes.cs
The scope can be both state-less and state-full and it's valid until it's disposed. The scopes can be nested, when the scope is disposed, the children are disposed as well. There can be multiple child scopes (siblings) living in parallel. The AddToDisposer(IDisposable) method is to be used in inherited classes whenever they manage any disposable resource to ensure the proper life time (when the State is System.IDisposable , it's added to disposer automatically).
The base implementation just manages the life time, child scopes and keeps the state (when provided). Inherit from the Scope<TState> (and IScope<TState> ) to add the scope related operations (inherited classes have the access to State ).
@@ -4539,7 +2963,7 @@
RadCommons.utils.Scope
Dispose any disposable managed objects - all disposables kept in Disposer stack are pop and disposed.
Simple configuration container in case DI with more sophisticated containers is not used. Supports the JSON config files, command line arguments
- and environment variables as sources and their hierarchy/overrides. The configuration can be used as key-value pairs or bound to objects (Source only package).
This is the simple configuration container in case DI with more sophisticated containers is not used The configuration is stored as the key-value dictionary, supporting hierarchy using the dot separator and arrays.The arrays can contain values or another objects. Actually, mixed arrays of values and objects can be stored, but they are not supported for binding.
For example section1.option1 means the option1 available in section1, section1.subSection2.option1 means the option1 available in section1.subSection2. section1.option1[0] means, that the option1 is array of values or objects (sections) within the section1. For arrays, the keys are like OtherSection.SimpleArray[0] or OtherSection.ComplexObjectArray[0].Name
Configuration class provides a singleton instance, however the key functionality is provided via static functions, so no need to touch the Instance at all. The items can be retrieved by key using the Get(string) and Get<TValueType>(string, Configuration.TValueType) methods. The first one returns null when the key is not found, the other one allow to define the default value to be returned, when the item is not found.
The inner class Configuration.ConfigurationBuilder provides the methods to build the configuration from JSON config files, commandline arguments, environment values and/or direct entries. The static method Builder() clears the configuration items and binding cache and creates a new instance of Configuration.ConfigurationBuilder allowing to build a configuration from scratch. The configuration is updated directly during the calls to builder methods, the existing items (keys) are updated, so it's possible to manage the priority of individual sources and the overrides if needed. The method Build() returns the configuration instance, breaking the fluent design of builder methods, however there is no other functionality within the method, so it's more the convention than need to use it at the end of configuration build.
Configuration binding it the way, how to access the configuration using the configuration objects instead of querying the individual items by key. When the method Bind<TOptionsContainer>(string, bool) is used, it creates a new instance of given type and tries to map the public properties with public setter to the keys (using the "dot notation") within the Configuration . It's possible to bind the object to to the root of the configuration to provide the whole configuration at once or bind it to the particular section to provide a configuration sub-tree. In general, the nested objects and both value and object arrays are supported. There are some rules when binding the arrays: The index must start with zero and must be in sequence (the first non-existing index stops the evaluation). The array should not mix the array or values and array of objects. The decision is made at the first item (index=0) whether it's value or object.
The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true. This is useful when the command line arguments are used like flags. For example having the argument -p:SkipStep1 and prefix -p: , the binding a bool property SkipStep1 will set the value of the property to true (doesn't change the configuration item itself). Of course, it's still possible to use the syntax -p:SkipStep1=true or -p:SkipStep1=false even in this case.
As the binding uses the reflection, it's quite expensive operation, so by default, the bound objects are cached (the cache key is the type of bound object, so binding the same type to different sections is not recommended ). It's possible to force the binding using the parameter of Bind<TOptionsContainer>(string, bool) method. In general, the recommended pattern is to Bind<TOptionsContainer>(string, bool) the configuration object after the configuration is built and then Retrieve<TOptionsContainer>() it from the cache when needed.
Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned.
Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using Retrieve<TOptionsContainer>()
Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache
Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned.
Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value.
Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated.
Initializes a new instance of the ComponentAttribute class, marking the decorated class as a component that will be available from the component container, registered as the concrete type or with all implemented interfaces as well if specified.
Initializes a new instance of the ComponentAttribute class, marking the decorated class as a component that will be available from the component container using the specified registerAs type.
Initializes a new instance of the ComponentAttribute class, marking the decorated class as a component that will be available from the component container using the specified registerAs types.
Initializes a new instance of the ComponentAttribute class, marking the decorated class as a component that will be available from the component container using the specified registerAs types.
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
Scans given assemblies for classes marked with AutoOptionsAttribute and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
Scans given assemblies for classes marked with AutoOptionsAttribute and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
Gets the instance of the options (configuration) class from pocoProvider , binds (fills) it to the configuration and registers is as singleton into MS DI.
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
Scans given assemblies for classes marked with AutoOptionsAttribute and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
Scans given assemblies for classes marked with AutoOptionsAttribute and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
Gets the instance of the options (configuration) class from pocoProvider , binds (fills) it to the configuration and registers is as singleton into MS DI.
Allows to run post init method of component. Component must be registered using the Component attribute as singleton in root scope and must register self Parameters of "marked" post init method are resolved from container (throws an exception on failure)
Allows to run post init method of component. Component must be registered using the Component attribute as singleton in root scope and must register self Parameters of "marked" post init method are resolved from container (throws an exception on failure)
RadCommons logging wrapper around NLog with some extended functionality (Source only package).
-
References needed
NLog
-
Remarks
-
The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property.
Extended logger provides following methods to log with given set of the properties.
try
- {
- ...
- }
- catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){
- //newer called as the default return value of ErrorFltr is false
- }
The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it.
if(value is null) throw logger.Fatal<ArgumentNullException>("Value is null");
When logging an exception using the LoggerExt methods, the event property StackTrace is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using new StackTrace(2, true).ToString() . In other cases when the System.Exception.StackTrace is null or empty, new StackTrace(true).ToString() is used.
LoggerExt also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property CorrelationId . Such methods have the name ending with Corr suffix.
RadCommons.utils
Inherit from the Context to add the context related operations (inherited classes have the access to state).
Based on the implementation of Guard Scopes by https://github.com/safakgur.
(Source only package).
The context can be both state-less and state-full and it's valid until it's disposed. The current context is accessible via Current . The contexts are chained, when a new context is created using BeginContext(Context<TState>.TState) , the Current context became the Parent of the new one and the newly created context will be set as the Current one. When the context is disposed, the Current context is set to Parent of disposing context. Context's children are disposed as well during the context disposal. The AddToDisposer(IDisposable) method is to be used in inherited classes whenever they manage any disposable resource to ensure their proper life time (when the State is System.IDisposable , it's added to disposer automatically).
The base implementation just manages the life time, context chain and keeps the state (when provided). Inherit from the Context<TState> to add the context related operations (inherited classes have the access to State ).
Based on the implementation of Guard Scopes by https://github.com/safakgur at https://github.com/safakgur/guard/blob/v1.7.0/src/Guard.Scopes.cs
RadCommons.utils.S
Inherit from the Scope (and IScope)
to add the scope related operations (inherited classes have the access to state).
(Source only package).
-
The scope can be both state-less and state-full and it's valid until it's disposed. The scopes can be nested, when the scope is disposed, the children are disposed as well. There can be multiple child scopes (siblings) living in parallel. The AddToDisposer(IDisposable) method is to be used in inherited classes whenever they manage any disposable resource to ensure the proper life time (when the State is System.IDisposable , it's added to disposer automatically).
The base implementation just manages the life time, child scopes and keeps the state (when provided). Inherit from the Scope<TState> (and IScope<TState> ) to add the scope related operations (inherited classes have the access to State ).
Dispose any disposable managed objects - all disposables kept in Disposer stack are pop and disposed.
diff --git a/doc/net.adamec.lib.common.md b/doc/net.adamec.lib.common.md
index bf53980..dd80071 100644
--- a/doc/net.adamec.lib.common.md
+++ b/doc/net.adamec.lib.common.md
@@ -4,14 +4,12 @@
| Name | Summary |
| ------ | --------- |
| [net.adamec.lib.common.async](#n-net.adamec.lib.common.async__17zxv10) | |
- | [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve) | |
| [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu) | |
| [net.adamec.lib.common.di.config](#n-net.adamec.lib.common.di.config__3709lb) | |
| [net.adamec.lib.common.di.config.exception](#n-net.adamec.lib.common.di.config.exception__15nr03q) | |
| [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v) | |
| [net.adamec.lib.common.di.postinit](#n-net.adamec.lib.common.di.postinit__ylne5f) | |
| [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq) | |
- | [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29) | |
| [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9) | |
## Types ##
@@ -23,11 +21,7 @@
| [AsyncManager.ExclusiveSynchronizationContext](#t-net.adamec.lib.common.async.asyncmanager.exclusivesynchronizationcontext__jzepyu) | private | Class | "Private" synchronization context used to run the async method |
| [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) | public | Class | Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI |
| [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo) | public | Class | Executes an operation on a separate thread with possibility of sync cancel. |
- | [BaseDisposable](#t-net.adamec.lib.common.utils.basedisposable__7s72ps) | public abstract | Class | Helper class for implementation of System.IDisposable types |
- | [CommonLogging](#t-net.adamec.lib.common.logging.commonlogging__1dar5wb) | internal static | Class | [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm) factory |
| [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) | public | Class | Marks the decorated class as a component that will be available from the service locator / component container. |
- | [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) | public | Class | Singleton holding the application configuration (options) |
- | [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj) | public | Class | Configuration builder providing the methods for adding the configuration items from individual sources |
| [ConsoleUtils](#t-net.adamec.lib.common.utils.consoleutils__8nc415) | internal static | Class | Console output helpers |
| [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.component.containerbuilderextensions__lgbl4y) | internal static | Class | Autofac Autofac.ContainerBuilder extensions |
| [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.config.extensions.containerbuilderextensions__tpisv7) | internal static | Class | Autofac Autofac.ContainerBuilder extensions |
@@ -38,7 +32,6 @@
| [FileAsync](#t-net.adamec.lib.common.async.fileasync__158f1hu) | internal static | Class | Asynchronous text/lines file read methods https://stackoverflow.com/a/13168006 |
| [FileUtils](#t-net.adamec.lib.common.utils.fileutils__1bi9r8y) | internal static | Class | File copy utilities |
| [IEnumerableExtensions](#t-net.adamec.lib.common.extensions.ienumerableextensions__1a6urvh) | internal static | Class | System.Collections.Generic.IEnumerable`1 extensions |
- | [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2) | internal | Class | Extended logger implementing [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm) |
| [MarshalExt](#t-net.adamec.lib.common.utils.marshalext__7jyavy) | internal static | Class | Marshaling helper methods |
| [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr) | public | Class | Defines the registration name and type for named registration (component type will be used if null) |
| [PeriodicTask](#t-net.adamec.lib.common.utils.periodictask__1xfynj) | internal static | Class | Helper class allowing to execute periodic (or one time) scheduled action |
@@ -55,7 +48,6 @@
| [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb) | internal static | Class | System.String class extensions |
| [Txt](#t-net.adamec.lib.common.utils.txt__1fch6k9) | public | Class | Text builder |
| [TypeExtensions](#t-net.adamec.lib.common.extensions.typeextensions__63ezc8) | internal static | Class | System.Type extensions |
- | [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm) | internal abstract | Interface | Logger interface - wrapper around the NLog.ILogger with some additional methods |
| [IScope<TState>](#t-net.adamec.lib.common.utils.iscope-1__88aydf) | internal abstract | Interface | Scope interface. |
| [ProcessEventHandler](#t-net.adamec.lib.common.utils.processeventhandler__8h5v6w) | public | Delegate | A ProcessEventHandler is a delegate for process output events. |
| [ComponentAttribute.ImplicitRegistrationTypeEnum](#t-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum__10jaypo) | public | Enum | Kind of the implicit component registration |
@@ -73,7 +65,6 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
| ------ | --------- |
| [RadCommons.async.AsyncManager](#src-only-package--RadCommons.async.AsyncManager) | Helpers for running the async tasks in sync mode and executing sync actions in async mode (Source only package). |
| [RadCommons.async.FileAsync](#src-only-package--RadCommons.async.FileAsync) | Helpers for reading text files in async mode (Source only package). |
- | [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration) | Simple configuration container in case DI with more sophisticated containers is not used. Supports the JSON config files, command line arguments and environment variables as sources and their hierarchy/overrides. The configuration can be used as key-value pairs or bound to objects (Source only package). |
| [RadCommons.di.Component](#src-only-package--RadCommons.di.Component) | RadCommons DI Component - allows to mark and inject the component using the class attributes (Source only package). |
| [RadCommons.di.Config](#src-only-package--RadCommons.di.Config) | RadCommons DI helpers for application configuration (Source only package). |
| [RadCommons.di.PostInit](#src-only-package--RadCommons.di.PostInit) | RadCommons DI PostInit - allows to run post init method of component (Source only package). |
@@ -87,9 +78,7 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
| [RadCommons.extensions.StringExtensions.Paths](#src-only-package--RadCommons.extensions.StringExtensions.Paths) | Path manipulation helpers for strings (Source only package). |
| [RadCommons.extensions.StringExtensions.Whitespace](#src-only-package--RadCommons.extensions.StringExtensions.Whitespace) | Whitespace manipulation helpers for strings (Source only package). |
| [RadCommons.extensions.TypeExtensions.DefaultValue](#src-only-package--RadCommons.extensions.TypeExtensions.DefaultValue) | Provides default value for types (Source only package). |
- | [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging) | RadCommons logging wrapper around NLog with some extended functionality (Source only package). |
| [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel) | Executes an operation on a separate thread with possibility of sync cancel (Source only package). |
- | [RadCommons.utils.BaseDisposable](#src-only-package--RadCommons.utils.BaseDisposable) | Helper class for implementation of IDisposable types (Source only package). |
| [RadCommons.utils.ConsoleUtils](#src-only-package--RadCommons.utils.ConsoleUtils) | Console output utilities (Source only package). |
| [RadCommons.utils.Context](#src-only-package--RadCommons.utils.Context) | The runtime "container" for context operations. The context can be both state-less and state-full and it's valid until it's disposed. The current context is accessible via static property Current. The contexts are chained, when a new context is created using static method BeginContext(), the Current context became the Parent of the new one and the newly created context will be set as the Current one. When the context is disposed, the Current context is set to Parent of disposing context. The base implementation just manages the life time, context chain and keeps the state (when provided). Inherit from the Context to add the context related operations (inherited classes have the access to state). Based on the implementation of Guard Scopes by https://github.com/safakgur. (Source only package). |
| [RadCommons.utils.Disposer](#src-only-package--RadCommons.utils.Disposer) | Keeps the stack of disposable objects, and disposes them when the disposer is being disposed. (Source only package). |
@@ -148,8 +137,7 @@ Inheritance:
-Default exception handler for [RunAsync(Action, Action<System.Exception>)](#m-net.adamec.lib.common.async.asyncmanager.runasync_system.action-system.action_system.exception____s187qk) . Catches and logs all exceptions during the task execution.
+Default exception handler for [RunAsync(Action, Action<System.Exception>)](#m-net.adamec.lib.common.async.asyncmanager.runasync_system.action-system.action_system.exception____s187qk) . Catches all exceptions during the task execution.
@@ -196,31 +184,6 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## AsyncManager.Logger Field ##
-Namespace: [net.adamec.lib.common.async](#n-net.adamec.lib.common.async__17zxv10)
-Assembly: net.adamec.lib.common
-Type: [AsyncManager](#t-net.adamec.lib.common.async.asyncmanager__16s0tm9)
-Sources: async\AsyncManager.cs
-Source-only packages: [RadCommons.async.AsyncManager](#src-only-package--RadCommons.async.AsyncManager)
-
-
-Logger
-
-
-
-```csharp
-private static readonly ILogger Logger
-```
-
-Field value
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
## AsyncManager.RunAsync(Action, Action<System.Exception>) Method ##
Namespace: [net.adamec.lib.common.async](#n-net.adamec.lib.common.async__17zxv10)
Assembly: net.adamec.lib.common
@@ -806,74 +769,62 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## net.adamec.lib.common.config Namespace ##
+## net.adamec.lib.common.di.component Namespace ##
### Classes ###
| Name | Modifier | Summary |
| ------ | ---------- | --------- |
- | [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) | public | Singleton holding the application configuration (options) |
- | [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj) | public | Configuration builder providing the methods for adding the configuration items from individual sources |
+ | [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) | public | Marks the decorated class as a component that will be available from the service locator / component container. |
+ | [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.component.containerbuilderextensions__lgbl4y) | internal static | Autofac Autofac.ContainerBuilder extensions |
+ | [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr) | public | Defines the registration name and type for named registration (component type will be used if null) |
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
+### Enums ###
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [ComponentAttribute.ImplicitRegistrationTypeEnum](#t-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum__10jaypo) | public | Kind of the implicit component registration |
+ | [ComponentAttribute.ScopeEnum](#t-net.adamec.lib.common.di.component.componentattribute.scopeenum__r7ahps) | public | Component scope |
-## Configuration Class ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
-Assembly: net.adamec.lib.common
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
-
-
-Singleton holding the application configuration (options)
-
-
-
-```csharp
-public sealed class Configuration
-```
-
-Inheritance: object
-
-
-
-### Remarks ###
-This is the simple configuration container in case DI with more sophisticated containers is not used The configuration is stored as the key-value dictionary, supporting hierarchy using the dot separator and arrays.The arrays can contain values or another objects. Actually, mixed arrays of values and objects can be stored, but they are not supported for binding. For example `section1.option1` means the option1 available in section1, `section1.subSection2.option1` means the option1 available in section1.subSection2. `section1.option1[0]` means, that the option1 is array of values or objects (sections) within the section1. For arrays, the keys are like `OtherSection.SimpleArray[0]` or `OtherSection.ComplexObjectArray[0].Name`
+Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
- [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) class provides a singleton instance, however the key functionality is provided via static functions, so no need to touch the [Instance](#p-net.adamec.lib.common.config.configuration.instance__131avv7) at all. The items can be retrieved by key using the [Get(string)](#m-net.adamec.lib.common.config.configuration.get_system.string___8ykaxa) and [Get<TValueType>(string, Configuration.TValueType)](#m-net.adamec.lib.common.config.configuration.get--1_system.string---0___1dcpnhz) methods. The first one returns null when the key is not found, the other one allow to define the default value to be returned, when the item is not found.
- The inner class [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj) provides the methods to build the configuration from JSON config files, commandline arguments, environment values and/or direct entries. The static method [Builder()](#m-net.adamec.lib.common.config.configuration.builder__700lxw) clears the configuration items and binding cache and creates a new instance of [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj) allowing to build a configuration from scratch. The configuration is updated directly during the calls to builder methods, the existing items (keys) are updated, so it's possible to manage the priority of individual sources and the overrides if needed. The method [Build()](#m-net.adamec.lib.common.config.configuration.configurationbuilder.build__bwvls6) returns the configuration instance, breaking the fluent design of builder methods, however there is no other functionality within the method, so it's more the convention than need to use it at the end of configuration build.
+
- Configuration binding it the way, how to access the configuration using the configuration objects instead of querying the individual items by key. When the method [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.config.configuration.bind--1_system.string-system.boolean___16p0943) is used, it creates a new instance of given type and tries to map the public properties with public setter to the keys (using the "dot notation") within the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) . It's possible to bind the object to to the root of the configuration to provide the whole configuration at once or bind it to the particular section to provide a configuration sub-tree. In general, the nested objects and both value and object arrays are supported. There are some rules when binding the arrays: The index must start with zero and must be in sequence (the first non-existing index stops the evaluation). The array should not mix the array or values and array of objects. The decision is made at the first item (index=0) whether it's value or object.
- The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true. This is useful when the command line arguments are used like flags. For example having the argument `-p:SkipStep1` and prefix `-p:` , the binding a bool property `SkipStep1` will set the value of the property to `true` (doesn't change the configuration item itself). Of course, it's still possible to use the syntax `-p:SkipStep1=true` or `-p:SkipStep1=false` even in this case.
+## ComponentAttribute Class ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
+Assembly: net.adamec.lib.common
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
- As the binding uses the reflection, it's quite expensive operation, so by default, the bound objects are cached (the cache key is the type of bound object, so binding the same type to different sections is not recommended ). It's possible to force the binding using the parameter of [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.config.configuration.bind--1_system.string-system.boolean___16p0943) method. In general, the recommended pattern is to [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.config.configuration.bind--1_system.string-system.boolean___16p0943) the configuration object after the configuration is built and then [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.config.configuration.retrieve--1__1xuxip8) it from the cache when needed.
+Marks the decorated class as a component that will be available from the service locator / component container.
-### Fields ###
+```csharp
+[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)]
+public class ComponentAttribute : Attribute
+```
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [bindingsCache](#f-net.adamec.lib.common.config.configuration.bindingscache__thj354) | private | Cache for bindings. Dictionary of type bound as a key and the bound object as value. |
- | [instance](#f-net.adamec.lib.common.config.configuration.instance__1aq1w9t) | private static | Instance of the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) created when the singleton is first touched |
+Inheritance: object -> Attribute
+Attributes: System.AttributeUsageAttribute
-
### Properties ###
| Name | Modifier | Summary |
| ------ | ---------- | --------- |
- | [Instance](#p-net.adamec.lib.common.config.configuration.instance__131avv7) | public static | Public [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) instance |
- | [Items](#p-net.adamec.lib.common.config.configuration.items__1i9u236) | private | Configuration items stored as key-value pairs |
+ | [ImplicitRegistrationType](#p-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtype__1mysue9) | public | Flag how to do the implicit registration when no types are explicitly defined |
+ | [RegisterAs](#p-net.adamec.lib.common.di.component.componentattribute.registeras__1m8nlcq) | public | Type to use for the component registration. |
+ | [Scope](#p-net.adamec.lib.common.di.component.componentattribute.scope__1h6i43p) | public | Defines the instance scope |
@@ -882,25 +833,10 @@ This is the simple configuration container in case DI with more sophisticated co
| Name | Modifier | Summary |
| ------ | ---------- | --------- |
- | [Configuration()](#m-net.adamec.lib.common.config.configuration.-cctor__1xl390h) | private static | Static constructor |
- | [Configuration()](#m-net.adamec.lib.common.config.configuration.-ctor__11tp9ak) | private | Private constructor used to build the singleton instance |
-
-
-
-
-### Methods ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [AddOrUpdateItem(string, object)](#m-net.adamec.lib.common.config.configuration.addorupdateitem_system.string-system.object___1atv1og) | private | Add a new configuration item with given value or updates its value if the key already exists. |
- | [Bind(Type, string)](#m-net.adamec.lib.common.config.configuration.bind_system.type-system.string___1b0yb6e) | private static | Creates a new object with given type and binds the configuration to its public properties where possible. |
- | [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.config.configuration.bind--1_system.string-system.boolean___16p0943) | public static | Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.config.configuration.retrieve--1__1xuxip8) |
- | [Builder()](#m-net.adamec.lib.common.config.configuration.builder__700lxw) | public static | Clears the configuration items and binding cache and creates a new instance of [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj) |
- | [Get(string)](#m-net.adamec.lib.common.config.configuration.get_system.string___8ykaxa) | public static | Gets the configuration item by key |
- | [Get<TValueType>(string, Configuration.TValueType)](#m-net.adamec.lib.common.config.configuration.get--1_system.string---0___1dcpnhz) | public static | Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned. |
- | [GetSection(string)](#m-net.adamec.lib.common.config.configuration.getsection_system.string___17z37ez) | private static | Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned. |
- | [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.config.configuration.retrieve--1__1xuxip8) | public static | Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache |
- | [TryConvertValue(Type, object, object)](#m-net.adamec.lib.common.config.configuration.tryconvertvalue_system.type-system.object-system.object-___1f1lwmk) | private static | Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value. |
+ | [ComponentAttribute(ComponentAttribute.ImplicitRegistrationTypeEnum, ComponentAttribute.ScopeEnum)](#m-net.adamec.lib.common.di.component.componentattribute.-ctor_net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum-net.adamec.lib.common.di.component.componentattribute.scopeenum___ex53ua) | public | Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container, registered as the concrete type or with all implemented interfaces as well if specified. |
+ | [ComponentAttribute(Type, ComponentAttribute.ScopeEnum)](#m-net.adamec.lib.common.di.component.componentattribute.-ctor_system.type-net.adamec.lib.common.di.component.componentattribute.scopeenum___1ubqgal) | public | Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs type. |
+ | [ComponentAttribute(Type[], ComponentAttribute.ScopeEnum)](#m-net.adamec.lib.common.di.component.componentattribute.-ctor_system.type__-net.adamec.lib.common.di.component.componentattribute.scopeenum___1rdjiuf) | public | Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs types. |
+ | [ComponentAttribute(Type[], net.adamec.lib.common.di.component.ComponentAttribute.ImplicitRegistrationTypeEnum?, ComponentAttribute.ScopeEnum)](#m-net.adamec.lib.common.di.component.componentattribute.-ctor_system.type__-system.nullable_net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum_-net.adamec.lib.common.di.component.componentattribute.scopeenum___1h4ujev) | private | Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs types. |
@@ -911,27 +847,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.bindingsCache Field ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.ImplicitRegistrationType Property ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Cache for bindings. Dictionary of type bound as a key and the bound object as value.
+Flag how to do the implicit registration when no types are explicitly defined
```csharp
-private readonly ConcurrentDictionary bindingsCache
+public net.adamec.lib.common.di.component.ComponentAttribute.ImplicitRegistrationTypeEnum? ImplicitRegistrationType { get; }
```
-Field value
-
-
-### Remarks ###
-Cache is used to prevent the "expensive" binding operation in case there is no need to refresh the bound configuration object
+Property value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -940,27 +872,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.instance Field ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.RegisterAs Property ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Instance of the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) created when the singleton is first touched
+Type to use for the component registration.
```csharp
-private static readonly Configuration instance
+public Type[] RegisterAs { get; }
```
-Field value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -994,135 +922,127 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.Items Property ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.ComponentAttribute(ComponentAttribute.ImplicitRegistrationTypeEnum, ComponentAttribute.ScopeEnum) Constructor ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Configuration items stored as key-value pairs
+Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container, registered as the concrete type or with all implemented interfaces as well if specified.
```csharp
-private ConcurrentDictionary Items { get; }
+public ComponentAttribute(ComponentAttribute.ImplicitRegistrationTypeEnum implicitRegistrationType = 0, ComponentAttribute.ScopeEnum scope = 0)
```
-Property value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## Configuration.Configuration() Constructor ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.ComponentAttribute(Type, ComponentAttribute.ScopeEnum) Constructor ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Static constructor
+Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs type.
```csharp
-private static Configuration()
+public ComponentAttribute(Type registerAs, ComponentAttribute.ScopeEnum scope = 0)
```
-### Remarks ###
-Explicit static constructor to tell C# compiler not to mark type as beforefieldinit
-
-
+Constructor parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## Configuration.Configuration() Constructor ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.ComponentAttribute(Type[], ComponentAttribute.ScopeEnum) Constructor ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Private constructor used to build the singleton instance
+Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs types.
```csharp
-private Configuration()
+public ComponentAttribute(Type[] registerAs, ComponentAttribute.ScopeEnum scope = 0)
```
+Constructor parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## Configuration.AddOrUpdateItem(string, object) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.ComponentAttribute(Type[], net.adamec.lib.common.di.component.ComponentAttribute.ImplicitRegistrationTypeEnum?, ComponentAttribute.ScopeEnum) Constructor ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Add a new configuration item with given value or updates its value if the key already exists.
+Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs types.
```csharp
-private void AddOrUpdateItem(string key, object value)
+private ComponentAttribute(Type[] registerAs = null, net.adamec.lib.common.di.component.ComponentAttribute.ImplicitRegistrationTypeEnum? implicitRegistrationType = 2, ComponentAttribute.ScopeEnum scope = 0)
```
-Method parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## Configuration.Bind(Type, string) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ContainerBuilderExtensions Class ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Sources: di\component\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Creates a new object with given type and binds the configuration to its public properties where possible.
+Autofac Autofac.ContainerBuilder extensions
```csharp
-private static object Bind(Type type, string sectionName = null)
+internal static class ContainerBuilderExtensions
```
-Method parameters
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [AddServicesWithComponentAttribute(ContainerBuilder, Assembly[])](#m-net.adamec.lib.common.di.component.containerbuilderextensions.addserviceswithcomponentattribute_autofac.containerbuilder-system.reflection.assembly_____5belzz) | public static | Adds classes from the assemblies having the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) into Autofac container builder |
+ | [AddServicesWithComponentAttribute(ContainerBuilder, Type[])](#m-net.adamec.lib.common.di.component.containerbuilderextensions.addserviceswithcomponentattribute_autofac.containerbuilder-system.type_____zsnrga) | public static | Adds classes from array of types having the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) into Autofac container builder |
+ | [GetImplementedInterfaces(Type)](#m-net.adamec.lib.common.di.component.containerbuilderextensions.getimplementedinterfaces_system.type___vb1m0d) | private static | Gets the array of interfaces implemented by given type except the System.IDisposable interface |
+ | [Register<TLimit,TActivatorData,TRegistrationStyle>(IRegistrationBuilder<TLimit,TActivatorData,TRegistrationStyle>, Type, ComponentAttribute)](#m-net.adamec.lib.common.di.component.containerbuilderextensions.register--3_autofac.builder.iregistrationbuilder_--0---1---2_-system.type-net.adamec.lib.common.di.component.componentattribute___9sj1q8) | private static | Registers the type with componentAttribute using the Autofac container builder |
+
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1131,25 +1051,28 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.Bind<TOptionsContainer>(string, bool) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ContainerBuilderExtensions.AddServicesWithComponentAttribute(ContainerBuilder, Assembly[]) Method ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.component.containerbuilderextensions__lgbl4y)
+Sources: di\component\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.config.configuration.retrieve--1__1xuxip8)
+Adds classes from the assemblies having the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) into Autofac container builder
```csharp
-public static Configuration.TOptionsContainer Bind(string sectionName = null, bool allowCached = true) where TOptionsContainer: new()
+public static void AddServicesWithComponentAttribute(this ContainerBuilder builder, params Assembly[] assemblies)
```
-Type parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1158,23 +1081,28 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.Builder() Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ContainerBuilderExtensions.AddServicesWithComponentAttribute(ContainerBuilder, Type[]) Method ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.component.containerbuilderextensions__lgbl4y)
+Sources: di\component\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Clears the configuration items and binding cache and creates a new instance of [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
+Adds classes from array of types having the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) into Autofac container builder
```csharp
-public static Configuration.ConfigurationBuilder Builder()
+public static void AddServicesWithComponentAttribute(this ContainerBuilder builder, params Type[] types)
```
-Return value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1209,25 +1145,29 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.Get<TValueType>(string, Configuration.TValueType) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ContainerBuilderExtensions.Register<TLimit,TActivatorData,TRegistrationStyle>(IRegistrationBuilder<TLimit,TActivatorData,TRegistrationStyle>, Type, ComponentAttribute) Method ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.component.containerbuilderextensions__lgbl4y)
+Sources: di\component\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned.
+Registers the type with componentAttribute using the Autofac container builder
```csharp
-public static Configuration.TValueType Get(string key, Configuration.TValueType defaultValue = null)
+private static void Register(IRegistrationBuilder builder, Type type, ComponentAttribute componentAttribute)
```
-Type parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1236,80 +1176,70 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.GetSection(string) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## NamedComponentRegistrationAttribute Class ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Sources: di\component\NamedComponentRegistrationAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned.
+Defines the registration name and type for named registration (component type will be used if null)
```csharp
-private static Dictionary GetSection(string sectionName = null)
+[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)]
+public class NamedComponentRegistrationAttribute : Attribute
```
-Method parameters
The configuration items that belong to the section with sectionName . The keys in returned dictionary are relative to given section!
+Inheritance: object -> Attribute
+Attributes: System.AttributeUsageAttribute
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
+### Properties ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [Name](#p-net.adamec.lib.common.di.component.namedcomponentregistrationattribute.name__12kb1kq) | public | Registration name |
+ | [Type](#p-net.adamec.lib.common.di.component.namedcomponentregistrationattribute.type__1egg26x) | public | Registrations type for named registration. Component type will be used if null |
-## Configuration.Retrieve<TOptionsContainer>() Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
-Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+### Constructors ###
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [NamedComponentRegistrationAttribute(string)](#m-net.adamec.lib.common.di.component.namedcomponentregistrationattribute.-ctor_system.string___15ni23w) | public | Named registration with component type used |
+ | [NamedComponentRegistrationAttribute(string, Type)](#m-net.adamec.lib.common.di.component.namedcomponentregistrationattribute.-ctor_system.string-system.type___1m420ct) | public | Defines the registration name and type for named registration (component type will be used if null) |
-Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache
+
-
-```csharp
-public static Configuration.TOptionsContainer Retrieve() where TOptionsContainer: new()
-```
-
-Type parameters
TOptionsContainer
Type of the configuration class to retrieve from cache
The instance of TOptionsContainer bound to the configuration or a new instance if not found
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
+Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## Configuration.TryConvertValue(Type, object, object) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## NamedComponentRegistrationAttribute.Name Property ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr)
+Sources: di\component\NamedComponentRegistrationAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value.
+Registration name
```csharp
-private static bool TryConvertValue(Type targetType, object sourceValue, out object targetValue)
+public string Name { get; set; }
```
-Method parameters
The result or conversion. If true, the targetValue can be set to property having targetType
-
-
-### Remarks ###
-The implementation treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true.
+Property value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1318,36 +1248,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.ConfigurationBuilder Class ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## NamedComponentRegistrationAttribute.Type Property ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr)
+Sources: di\component\NamedComponentRegistrationAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Configuration builder providing the methods for adding the configuration items from individual sources
+Registrations type for named registration. Component type will be used if null
```csharp
-public class Configuration.ConfigurationBuilder
+public Type Type { get; set; }
```
-Inheritance: object
-
-
-
-### Methods ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [Add(string, object)](#m-net.adamec.lib.common.config.configuration.configurationbuilder.add_system.string-system.object___t030mu) | public | Add a new configuration item with given value or updates its value if the key already exists. |
- | [AddCommandLineArguments(string[])](#m-net.adamec.lib.common.config.configuration.configurationbuilder.addcommandlinearguments_system.string_____f7vkq1) | public | Adds the command line arguments starting with prefixes into the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) . When a configuration item exists, the value is updated. |
- | [AddEnvironmentVariables()](#m-net.adamec.lib.common.config.configuration.configurationbuilder.addenvironmentvariables__1behrcd) | public | Adds all environment variables into the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) . When a configuration item exists, the value is updated. |
- | [AddJsonFile(string, bool, bool)](#m-net.adamec.lib.common.config.configuration.configurationbuilder.addjsonfile_system.string-system.boolean-system.boolean___fpcrpi) | public | Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated. |
- | [Build()](#m-net.adamec.lib.common.config.configuration.configurationbuilder.build__bwvls6) | public | Finishes the configuration building and returns the [Instance](#p-net.adamec.lib.common.config.configuration.instance__131avv7) |
-
-
+Property value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1356,60 +1273,48 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.ConfigurationBuilder.Add(string, object) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## NamedComponentRegistrationAttribute.NamedComponentRegistrationAttribute(string) Constructor ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr)
+Sources: di\component\NamedComponentRegistrationAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Add a new configuration item with given value or updates its value if the key already exists.
+Named registration with component type used
```csharp
-public Configuration.ConfigurationBuilder Add(string key, object value)
+public NamedComponentRegistrationAttribute(string name)
```
-Method parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## Configuration.ConfigurationBuilder.AddCommandLineArguments(string[]) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## NamedComponentRegistrationAttribute.NamedComponentRegistrationAttribute(string, Type) Constructor ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr)
+Sources: di\component\NamedComponentRegistrationAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Adds the command line arguments starting with prefixes into the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) . When a configuration item exists, the value is updated.
+Defines the registration name and type for named registration (component type will be used if null)
```csharp
-public Configuration.ConfigurationBuilder AddCommandLineArguments(params string[] prefixes)
+public NamedComponentRegistrationAttribute(string name, Type type)
```
-Method parameters
The current [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
-
-
-### Remarks ###
-The command line arguments have the syntax `key=value` (for example `Key1=Option1` or `prefixkey=value` (for example `-p:Key1=Option1` where `-p:` is the prefix). When the prefixes are not provided, all command line arguments are added to the configuration. When the prefixes are provided,the prefix is not a part of the key. The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true, allowing to use the parameters like flags. For example having the argument `-p:SkipStep1` and prefix `-p:` , the binding a bool property `SkipStep1` will set the value of the property to `true` (doesn't change the configuration item itself). Of course, it's still possible to use the syntax `-p:SkipStep1=true` or `-p:SkipStep1=false` even in this case.
-
-
+Constructor parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1418,27 +1323,34 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.ConfigurationBuilder.AddEnvironmentVariables() Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.ImplicitRegistrationTypeEnum Enum ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Adds all environment variables into the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) . When a configuration item exists, the value is updated.
+Kind of the implicit component registration
```csharp
-public Configuration.ConfigurationBuilder AddEnvironmentVariables()
+public enum ComponentAttribute.ImplicitRegistrationTypeEnum: int
```
-Return value
The current [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
+Inheritance: object -> ValueType -> Enum
+Implements: System.IComparable, System.IConvertible, System.IFormattable
-### Remarks ###
-The name of the environment variable is used as a key to the configuration item. Use the "dot notation" in variable names to support the configuration hierarchy.
+### Constants ###
+
+ | Name | Value | Summary |
+ | ------ | ------- | --------- |
+ | [Self](#f-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum.self__qkcsxq) | 0 | Register as self (type) only |
+ | [ImplementedInterfaces](#f-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum.implementedinterfaces__n5lxu0) | 1 | Register as all implemented interfaces |
+ | [SelfAndImplementedInterfaces](#f-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum.selfandimplementedinterfaces__1135ahd) | 2 | Register as self (type) and all implemented interfaces |
+
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1447,28 +1359,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.ConfigurationBuilder.AddJsonFile(string, bool, bool) Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.ImplicitRegistrationTypeEnum.ImplementedInterfaces Constant ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ComponentAttribute.ImplicitRegistrationTypeEnum](#t-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum__10jaypo)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated.
+Register as all implemented interfaces
```csharp
-public Configuration.ConfigurationBuilder AddJsonFile(string fileName, bool ignoreNullOrEmptyFileName = false, bool ignoreIfNotExist = false)
+ ImplementedInterfaces = 1
```
-Method parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1477,23 +1384,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## Configuration.ConfigurationBuilder.Build() Method ##
-Namespace: [net.adamec.lib.common.config](#n-net.adamec.lib.common.config__1nl4uve)
+## ComponentAttribute.ImplicitRegistrationTypeEnum.Self Constant ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
-Sources: config\Configuration.cs
-Source-only packages: [RadCommons.config.Configuration](#src-only-package--RadCommons.config.Configuration)
+Type: [ComponentAttribute.ImplicitRegistrationTypeEnum](#t-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum__10jaypo)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Finishes the configuration building and returns the [Instance](#p-net.adamec.lib.common.config.configuration.instance__131avv7)
+Register as self (type) only
```csharp
-public Configuration Build()
+ Self = 0
```
-Return value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1502,26 +1409,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## net.adamec.lib.common.di.component Namespace ##
-### Classes ###
+## ComponentAttribute.ImplicitRegistrationTypeEnum.SelfAndImplementedInterfaces Constant ##
+Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
+Assembly: net.adamec.lib.common
+Type: [ComponentAttribute.ImplicitRegistrationTypeEnum](#t-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum__10jaypo)
+Sources: di\component\ComponentAttribute.cs
+Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) | public | Marks the decorated class as a component that will be available from the service locator / component container. |
- | [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.component.containerbuilderextensions__lgbl4y) | internal static | Autofac Autofac.ContainerBuilder extensions |
- | [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr) | public | Defines the registration name and type for named registration (component type will be used if null) |
-
+Register as self (type) and all implemented interfaces
-### Enums ###
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [ComponentAttribute.ImplicitRegistrationTypeEnum](#t-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum__10jaypo) | public | Kind of the implicit component registration |
- | [ComponentAttribute.ScopeEnum](#t-net.adamec.lib.common.di.component.componentattribute.scopeenum__r7ahps) | public | Component scope |
+```csharp
+ SelfAndImplementedInterfaces = 2
+```
-
+Field value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1530,46 +1434,36 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ComponentAttribute Class ##
+## ComponentAttribute.ScopeEnum Enum ##
Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
Sources: di\component\ComponentAttribute.cs
Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Marks the decorated class as a component that will be available from the service locator / component container.
+Component scope
```csharp
-[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)]
-public class ComponentAttribute : Attribute
+public enum ComponentAttribute.ScopeEnum: int
```
-Inheritance: object -> Attribute
-Attributes: System.AttributeUsageAttribute
-
-
-
-### Properties ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [ImplicitRegistrationType](#p-net.adamec.lib.common.di.component.componentattribute.implicitregistrationtype__1mysue9) | public | Flag how to do the implicit registration when no types are explicitly defined |
- | [RegisterAs](#p-net.adamec.lib.common.di.component.componentattribute.registeras__1m8nlcq) | public | Type to use for the component registration. |
- | [Scope](#p-net.adamec.lib.common.di.component.componentattribute.scope__1h6i43p) | public | Defines the instance scope |
-
-
+Inheritance: object -> ValueType -> Enum
+Implements: System.IComparable, System.IConvertible, System.IFormattable
-### Constructors ###
+### Constants ###
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [ComponentAttribute(ComponentAttribute.ImplicitRegistrationTypeEnum, ComponentAttribute.ScopeEnum)](#m-net.adamec.lib.common.di.component.componentattribute.-ctor_net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum-net.adamec.lib.common.di.component.componentattribute.scopeenum___ex53ua) | public | Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container, registered as the concrete type or with all implemented interfaces as well if specified. |
- | [ComponentAttribute(Type, ComponentAttribute.ScopeEnum)](#m-net.adamec.lib.common.di.component.componentattribute.-ctor_system.type-net.adamec.lib.common.di.component.componentattribute.scopeenum___1ubqgal) | public | Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs type. |
- | [ComponentAttribute(Type[], ComponentAttribute.ScopeEnum)](#m-net.adamec.lib.common.di.component.componentattribute.-ctor_system.type__-net.adamec.lib.common.di.component.componentattribute.scopeenum___1rdjiuf) | public | Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs types. |
- | [ComponentAttribute(Type[], net.adamec.lib.common.di.component.ComponentAttribute.ImplicitRegistrationTypeEnum?, ComponentAttribute.ScopeEnum)](#m-net.adamec.lib.common.di.component.componentattribute.-ctor_system.type__-system.nullable_net.adamec.lib.common.di.component.componentattribute.implicitregistrationtypeenum_-net.adamec.lib.common.di.component.componentattribute.scopeenum___1h4ujev) | private | Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs types. |
+ | Name | Value | Summary |
+ | ------ | ------- | --------- |
+ | [InstancePerDependency](#f-net.adamec.lib.common.di.component.componentattribute.scopeenum.instanceperdependency__1efcen7) | 0 | Transient scope (instance per dependency) |
+ | [Transient](#f-net.adamec.lib.common.di.component.componentattribute.scopeenum.transient__1f6925u) | 0 | Transient scope (instance per dependency) |
+ | [SingleInstance](#f-net.adamec.lib.common.di.component.componentattribute.scopeenum.singleinstance__st19r1) | 1 | Singleton |
+ | [Singleton](#f-net.adamec.lib.common.di.component.componentattribute.scopeenum.singleton__1p12io5) | 1 | Singleton |
+ | [InstancePerLifetimeScope](#f-net.adamec.lib.common.di.component.componentattribute.scopeenum.instanceperlifetimescope__17fxlux) | 2 | Instance per lifetime scope |
+ | [InstancePerRequest](#f-net.adamec.lib.common.di.component.componentattribute.scopeenum.instanceperrequest__12s64w1) | 3 | Instance per request (scoped) |
+ | [Scoped](#f-net.adamec.lib.common.di.component.componentattribute.scopeenum.scoped__1356nu4) | 3 | Instance per request (scoped) |
@@ -1580,23 +1474,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ComponentAttribute.ImplicitRegistrationType Property ##
+## ComponentAttribute.ScopeEnum.InstancePerDependency Constant ##
Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Type: [ComponentAttribute.ScopeEnum](#t-net.adamec.lib.common.di.component.componentattribute.scopeenum__r7ahps)
Sources: di\component\ComponentAttribute.cs
Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Flag how to do the implicit registration when no types are explicitly defined
+Transient scope (instance per dependency)
```csharp
-public net.adamec.lib.common.di.component.ComponentAttribute.ImplicitRegistrationTypeEnum? ImplicitRegistrationType { get; }
+ InstancePerDependency = 0
```
-Property value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1605,23 +1499,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ComponentAttribute.RegisterAs Property ##
+## ComponentAttribute.ScopeEnum.InstancePerLifetimeScope Constant ##
Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Type: [ComponentAttribute.ScopeEnum](#t-net.adamec.lib.common.di.component.componentattribute.scopeenum__r7ahps)
Sources: di\component\ComponentAttribute.cs
Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Type to use for the component registration.
+Instance per lifetime scope
```csharp
-public Type[] RegisterAs { get; }
+ InstancePerLifetimeScope = 2
```
-Property value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -1655,274 +1549,136 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ComponentAttribute.ComponentAttribute(ComponentAttribute.ImplicitRegistrationTypeEnum, ComponentAttribute.ScopeEnum) Constructor ##
+## ComponentAttribute.ScopeEnum.Scoped Constant ##
Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Type: [ComponentAttribute.ScopeEnum](#t-net.adamec.lib.common.di.component.componentattribute.scopeenum__r7ahps)
Sources: di\component\ComponentAttribute.cs
Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container, registered as the concrete type or with all implemented interfaces as well if specified.
+Instance per request (scoped)
```csharp
-public ComponentAttribute(ComponentAttribute.ImplicitRegistrationTypeEnum implicitRegistrationType = 0, ComponentAttribute.ScopeEnum scope = 0)
+ Scoped = 3
```
-Constructor parameters
+
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## ComponentAttribute.ComponentAttribute(Type, ComponentAttribute.ScopeEnum) Constructor ##
+## ComponentAttribute.ScopeEnum.SingleInstance Constant ##
Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Type: [ComponentAttribute.ScopeEnum](#t-net.adamec.lib.common.di.component.componentattribute.scopeenum__r7ahps)
Sources: di\component\ComponentAttribute.cs
Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs type.
+Singleton
```csharp
-public ComponentAttribute(Type registerAs, ComponentAttribute.ScopeEnum scope = 0)
+ SingleInstance = 1
```
-Constructor parameters
+
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## ComponentAttribute.ComponentAttribute(Type[], ComponentAttribute.ScopeEnum) Constructor ##
+## ComponentAttribute.ScopeEnum.Singleton Constant ##
Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Type: [ComponentAttribute.ScopeEnum](#t-net.adamec.lib.common.di.component.componentattribute.scopeenum__r7ahps)
Sources: di\component\ComponentAttribute.cs
Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs types.
+Singleton
```csharp
-public ComponentAttribute(Type[] registerAs, ComponentAttribute.ScopeEnum scope = 0)
+ Singleton = 1
```
-Constructor parameters
+
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## ComponentAttribute.ComponentAttribute(Type[], net.adamec.lib.common.di.component.ComponentAttribute.ImplicitRegistrationTypeEnum?, ComponentAttribute.ScopeEnum) Constructor ##
+## ComponentAttribute.ScopeEnum.Transient Constant ##
Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
Assembly: net.adamec.lib.common
-Type: [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl)
+Type: [ComponentAttribute.ScopeEnum](#t-net.adamec.lib.common.di.component.componentattribute.scopeenum__r7ahps)
Sources: di\component\ComponentAttribute.cs
Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
-Initializes a new instance of the [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) class, marking the decorated class as a component that will be available from the component container using the specified registerAs types.
+Transient scope (instance per dependency)
```csharp
-private ComponentAttribute(Type[] registerAs = null, net.adamec.lib.common.di.component.ComponentAttribute.ImplicitRegistrationTypeEnum? implicitRegistrationType = 2, ComponentAttribute.ScopeEnum scope = 0)
+ Transient = 0
```
-Constructor parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
+Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## NamedComponentRegistrationAttribute Class ##
-Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
+## AutoOptionsAttribute Class ##
+Namespace: [net.adamec.lib.common.di.config](#n-net.adamec.lib.common.di.config__3709lb)
Assembly: net.adamec.lib.common
-Sources: di\component\NamedComponentRegistrationAttribute.cs
-Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
+Sources: di\config\AutoOptionsAttribute.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Defines the registration name and type for named registration (component type will be used if null)
+Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
```csharp
[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)]
-public class NamedComponentRegistrationAttribute : Attribute
+public class AutoOptionsAttribute : Attribute
```
Inheritance: object -> Attribute
@@ -1934,8 +1690,8 @@ Attributes: NamedComponentRegistrationAttribute.Name Property ##
-Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
+## AutoOptionsAttribute.ConfigSection Property ##
+Namespace: [net.adamec.lib.common.di.config](#n-net.adamec.lib.common.di.config__3709lb)
Assembly: net.adamec.lib.common
-Type: [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr)
-Sources: di\component\NamedComponentRegistrationAttribute.cs
-Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
+Type: [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2)
+Sources: di\config\AutoOptionsAttribute.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Registration name
+Path to the section within appsettings.json
```csharp
-public string Name { get; set; }
+public string ConfigSection { get; }
```
Property value
@@ -1981,3059 +1736,67 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## NamedComponentRegistrationAttribute.Type Property ##
-Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
+## AutoOptionsAttribute.RegisterDirect Property ##
+Namespace: [net.adamec.lib.common.di.config](#n-net.adamec.lib.common.di.config__3709lb)
Assembly: net.adamec.lib.common
-Type: [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr)
-Sources: di\component\NamedComponentRegistrationAttribute.cs
-Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
+Type: [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2)
+Sources: di\config\AutoOptionsAttribute.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Registrations type for named registration. Component type will be used if null
+Flag whether to create and registers the options class instance into MS DI
```csharp
-public Type Type { get; set; }
+public bool RegisterDirect { get; }
```
-Property value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## NamedComponentRegistrationAttribute.NamedComponentRegistrationAttribute(string, Type) Constructor ##
-Namespace: [net.adamec.lib.common.di.component](#n-net.adamec.lib.common.di.component__9w6ndu)
+## AutoOptionsAttribute.AutoOptionsAttribute(string, bool) Constructor ##
+Namespace: [net.adamec.lib.common.di.config](#n-net.adamec.lib.common.di.config__3709lb)
Assembly: net.adamec.lib.common
-Type: [NamedComponentRegistrationAttribute](#t-net.adamec.lib.common.di.component.namedcomponentregistrationattribute__158ujcr)
-Sources: di\component\NamedComponentRegistrationAttribute.cs
-Source-only packages: [RadCommons.di.Component](#src-only-package--RadCommons.di.Component)
+Type: [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2)
+Sources: di\config\AutoOptionsAttribute.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Defines the registration name and type for named registration (component type will be used if null)
+Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
```csharp
-public NamedComponentRegistrationAttribute(string name, Type type)
+public AutoOptionsAttribute(string configSection, bool registerDirect = false)
```
-Constructor parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## net.adamec.lib.common.di.config Namespace ##
-### Classes ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) | public | Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI |
-
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## AutoOptionsAttribute Class ##
-Namespace: [net.adamec.lib.common.di.config](#n-net.adamec.lib.common.di.config__3709lb)
-Assembly: net.adamec.lib.common
-Sources: di\config\AutoOptionsAttribute.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
-
-
-
-```csharp
-[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)]
-public class AutoOptionsAttribute : Attribute
-```
-
-Inheritance: object -> Attribute
-Attributes: System.AttributeUsageAttribute
-
-
-
-### Properties ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [ConfigSection](#p-net.adamec.lib.common.di.config.autooptionsattribute.configsection__zo6f6l) | public | Path to the section within appsettings.json |
- | [RegisterDirect](#p-net.adamec.lib.common.di.config.autooptionsattribute.registerdirect__1s9s1yk) | public | Flag whether to create and registers the options class instance into MS DI |
-
-
-
-
-### Constructors ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [AutoOptionsAttribute(string, bool)](#m-net.adamec.lib.common.di.config.autooptionsattribute.-ctor_system.string-system.boolean___1nw898o) | public | Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI |
-
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## AutoOptionsAttribute.ConfigSection Property ##
-Namespace: [net.adamec.lib.common.di.config](#n-net.adamec.lib.common.di.config__3709lb)
-Assembly: net.adamec.lib.common
-Type: [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2)
-Sources: di\config\AutoOptionsAttribute.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Path to the section within appsettings.json
-
-
-
-```csharp
-public string ConfigSection { get; }
-```
-
-Property value
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## net.adamec.lib.common.di.config.extensions Namespace ##
-### Classes ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.config.extensions.containerbuilderextensions__tpisv7) | internal static | Autofac Autofac.ContainerBuilder extensions |
- | [ServiceCollectionAutoOptionsExtension](#t-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension__1p9fgao) | internal static | Extensions for options (configuration) class automatic binding to appsettings.json |
- | [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv) | internal static | Extensions for options (configuration) class registration into MS DI |
-
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ContainerBuilderExtensions Class ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Sources: di\config\extensions\ContainerBuilderExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Autofac Autofac.ContainerBuilder extensions
-
-
-
-```csharp
-internal static class ContainerBuilderExtensions
-```
-
-Inheritance: object
-
-
-
-### Methods ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [AddAutoOptions(ContainerBuilder, IConfigurationRoot, Assembly[])](#m-net.adamec.lib.common.di.config.extensions.containerbuilderextensions.addautooptions_autofac.containerbuilder-microsoft.extensions.configuration.iconfigurationroot-system.reflection.assembly_____pfqod1) | public static | Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions |
- | [AddAutoOptions(ContainerBuilder, IConfigurationRoot, Type[])](#m-net.adamec.lib.common.di.config.extensions.containerbuilderextensions.addautooptions_autofac.containerbuilder-microsoft.extensions.configuration.iconfigurationroot-system.type_____1fbl63e) | public static | Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions |
- | [AddOptions<TOptions>(ContainerBuilder, IConfigurationRoot, string)](#m-net.adamec.lib.common.di.config.extensions.containerbuilderextensions.addoptions--1_autofac.containerbuilder-microsoft.extensions.configuration.iconfigurationroot-system.string___1b2rpkf) | public static | Creates and registers the singleton of configuration (options) class of given type This is to be used if not registered using the [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) |
-
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ContainerBuilderExtensions.AddAutoOptions(ContainerBuilder, IConfigurationRoot, Assembly[]) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.config.extensions.containerbuilderextensions__tpisv7)
-Sources: di\config\extensions\ContainerBuilderExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
-
-
-
-```csharp
-public static void AddAutoOptions(this ContainerBuilder builder, IConfigurationRoot configuration, params Assembly[] assemblies)
-```
-
-Method parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ContainerBuilderExtensions.AddAutoOptions(ContainerBuilder, IConfigurationRoot, Type[]) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.config.extensions.containerbuilderextensions__tpisv7)
-Sources: di\config\extensions\ContainerBuilderExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
-
-
-
-```csharp
-public static void AddAutoOptions(this ContainerBuilder builder, IConfigurationRoot configuration, params Type[] types)
-```
-
-Method parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ContainerBuilderExtensions.AddOptions<TOptions>(ContainerBuilder, IConfigurationRoot, string) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.config.extensions.containerbuilderextensions__tpisv7)
-Sources: di\config\extensions\ContainerBuilderExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Creates and registers the singleton of configuration (options) class of given type This is to be used if not registered using the [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2)
-
-
-
-```csharp
-public static void AddOptions(this ContainerBuilder builder, IConfigurationRoot configuration, string configSection) where TOptions: new()
-```
-
-Type parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionAutoOptionsExtension Class ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Sources: di\config\extensions\ServiceCollectionAutoOptionsExtension.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Extensions for options (configuration) class automatic binding to appsettings.json
-
-
-
-```csharp
-internal static class ServiceCollectionAutoOptionsExtension
-```
-
-Inheritance: object
-
-
-
-### Fields ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [Logger](#f-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension.logger__1gx9pyg) | private static | |
-
-
-
-
-### Methods ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [ConfigureAutoOptions(IServiceCollection, IConfiguration, Assembly[])](#m-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension.configureautooptions_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfiguration-system.reflection.assembly_____bfjrc2) | public static | Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI |
- | [ConfigureAutoOptions(IServiceCollection, IConfigurationRoot, Assembly[])](#m-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension.configureautooptions_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfigurationroot-system.reflection.assembly_____1kc5g1y) | public static | Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI |
-
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionAutoOptionsExtension.Logger Field ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ServiceCollectionAutoOptionsExtension](#t-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension__1p9fgao)
-Sources: di\config\extensions\ServiceCollectionAutoOptionsExtension.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-
-```csharp
-private static readonly ILogger Logger
-```
-
-Field value
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionAutoOptionsExtension.ConfigureAutoOptions(IServiceCollection, IConfiguration, Assembly[]) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ServiceCollectionAutoOptionsExtension](#t-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension__1p9fgao)
-Sources: di\config\extensions\ServiceCollectionAutoOptionsExtension.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
-
-
-
-```csharp
-public static IServiceCollection ConfigureAutoOptions(this IServiceCollection services, IConfiguration configuration, Assembly[] assemblies)
-```
-
-Method parameters
Can't create the instance of options (configuration) class
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionAutoOptionsExtension.ConfigureAutoOptions(IServiceCollection, IConfigurationRoot, Assembly[]) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ServiceCollectionAutoOptionsExtension](#t-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension__1p9fgao)
-Sources: di\config\extensions\ServiceCollectionAutoOptionsExtension.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
-
-
-
-```csharp
-public static IServiceCollection ConfigureAutoOptions(this IServiceCollection services, IConfigurationRoot configuration, Assembly[] assemblies)
-```
-
-Method parameters
Can't create the instance of options (configuration) class
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionConfigureDirectExtensions Class ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Extensions for options (configuration) class registration into MS DI
-
-
-
-```csharp
-internal static class ServiceCollectionConfigureDirectExtensions
-```
-
-Inheritance: object
-
-
-
-### Methods ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [ConfigureDirect(IServiceCollection, Type, IConfiguration)](#m-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions.configuredirect_microsoft.extensions.dependencyinjection.iservicecollection-system.type-microsoft.extensions.configuration.iconfiguration___1lbalbi) | public static | Creates the instance of the options (configuration) class, binds (fills) it to the configuration and registers is as singleton into MS DI. |
- | [ConfigureDirect<TConfig>(IServiceCollection, IConfiguration)](#m-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions.configuredirect--1_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfiguration___1049ily) | public static | Creates the instance of the options (configuration) class, binds (fills) it to the configuration and registers is as singleton into MS DI. |
- | [ConfigureDirect<TConfig>(IServiceCollection, IConfiguration, Func<TConfig>)](#m-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions.configuredirect--1_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfiguration-system.func_--0____1uka1kl) | public static | Gets the instance of the options (configuration) class from pocoProvider , binds (fills) it to the configuration and registers is as singleton into MS DI. |
- | [ConfigureDirect<TConfig>(IServiceCollection, IConfiguration, ServiceCollectionConfigureDirectExtensions.TConfig)](#m-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions.configuredirect--1_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfiguration---0___18sq65m) | public static | Binds (fills) given instance of the options (configuration) class to configuration and registers is as singleton into MS DI. |
-
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionConfigureDirectExtensions.ConfigureDirect(IServiceCollection, Type, IConfiguration) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv)
-Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Creates the instance of the options (configuration) class, binds (fills) it to the configuration and registers is as singleton into MS DI.
-
-
-
-```csharp
-public static object ConfigureDirect(this IServiceCollection services, Type type, IConfiguration configuration)
-```
-
-Method parameters
Can't create the instance of options (configuration) class
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionConfigureDirectExtensions.ConfigureDirect<TConfig>(IServiceCollection, IConfiguration) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv)
-Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Creates the instance of the options (configuration) class, binds (fills) it to the configuration and registers is as singleton into MS DI.
-
-
-
-```csharp
-public static ServiceCollectionConfigureDirectExtensions.TConfig ConfigureDirect(this IServiceCollection services, IConfiguration configuration) where TConfig: class, new()
-```
-
-Type parameters
TConfig
Type of options (configuration) class to register as singleton
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionConfigureDirectExtensions.ConfigureDirect<TConfig>(IServiceCollection, IConfiguration, Func<TConfig>) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv)
-Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Gets the instance of the options (configuration) class from pocoProvider , binds (fills) it to the configuration and registers is as singleton into MS DI.
-
-
-
-```csharp
-public static ServiceCollectionConfigureDirectExtensions.TConfig ConfigureDirect(this IServiceCollection services, IConfiguration configuration, Func pocoProvider) where TConfig: class
-```
-
-Type parameters
TConfig
Type of options (configuration) class to register as singleton
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ServiceCollectionConfigureDirectExtensions.ConfigureDirect<TConfig>(IServiceCollection, IConfiguration, ServiceCollectionConfigureDirectExtensions.TConfig) Method ##
-Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
-Assembly: net.adamec.lib.common
-Type: [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv)
-Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
-Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-
-
-Binds (fills) given instance of the options (configuration) class to configuration and registers is as singleton into MS DI.
-
-
-
-```csharp
-public static ServiceCollectionConfigureDirectExtensions.TConfig ConfigureDirect(this IServiceCollection services, IConfiguration configuration, ServiceCollectionConfigureDirectExtensions.TConfig config) where TConfig: class
-```
-
-Type parameters
TConfig
Type of options (configuration) class to register as singleton
-
-
-### Remarks ###
-Checks Autofac registry for the services with [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) that register themselves (so the interface registrations are excluded). For such components (services) it tries to find the methods marked with [PostInitAttribute](#t-net.adamec.lib.common.di.postinit.postinitattribute__qimmrl) and execute them. When the method has the parameters, it will try to resolve the from the container
-
-
-### Exceptions ###
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## StringExtensions Class ##
-Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
-Assembly: net.adamec.lib.common
-Sources: extensions\StringExtensionsCase.cs, extensions\StringExtensionsHtml.cs, extensions\StringExtensionsParts.cs, extensions\StringExtensionsPaths.cs, extensions\StringExtensionsWhitespace.cs
-Source-only packages: [RadCommons.extensions.StringExtensions.Case](#src-only-package--RadCommons.extensions.StringExtensions.Case), [RadCommons.extensions.StringExtensions.Html](#src-only-package--RadCommons.extensions.StringExtensions.Html), [RadCommons.extensions.StringExtensions.Parts](#src-only-package--RadCommons.extensions.StringExtensions.Parts), [RadCommons.extensions.StringExtensions.Paths](#src-only-package--RadCommons.extensions.StringExtensions.Paths), [RadCommons.extensions.StringExtensions.Whitespace](#src-only-package--RadCommons.extensions.StringExtensions.Whitespace)
-
-
-System.String class extensions
-
-
-
-```csharp
-internal static class StringExtensions
-```
-
-Inheritance: object
-
-
-
-### Methods ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [AddPath(string, string)](#m-net.adamec.lib.common.extensions.stringextensions.addpath_system.string-system.string___1m9wwnx) | public static | Adds next path segment to string representing path to the file system |
- | [FirstLetterToUpper(string)](#m-net.adamec.lib.common.extensions.stringextensions.firstlettertoupper_system.string___12nwwlc) | public static | Converts the first letter of string to upper case |
- | [HtmlDecode(string)](#m-net.adamec.lib.common.extensions.stringextensions.htmldecode_system.string___kajpem) | public static | HTML decodes the string |
- | [HtmlEncode(string)](#m-net.adamec.lib.common.extensions.stringextensions.htmlencode_system.string___1ozzgea) | public static | HTML encodes the string |
- | [LastPart(string, string)](#m-net.adamec.lib.common.extensions.stringextensions.lastpart_system.string-system.string___t4lkjk) | public static | Returns the part of the string after the last occurence of the separator The result is always trimmed |
- | [SplitByFirstSpace(string, string)](#m-net.adamec.lib.common.extensions.stringextensions.splitbyfirstspace_system.string-system.string-___d5xnpu) | public static | Splits the string by first space and returns the "before" part. The "after" part is provided in output parameter rest Both result and rest are trimmed |
- | [ToCamelCase(string)](#m-net.adamec.lib.common.extensions.stringextensions.tocamelcase_system.string___xq94l0) | public static | Simple CamelCase converter |
- | [TrimAndMergeLines(string)](#m-net.adamec.lib.common.extensions.stringextensions.trimandmergelines_system.string___1371ffr) | public static | "Full" trim of the string - the lines within the string are trimmed and then the lines are merged with the space as a separator (instead of the line break) |
-
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## StringExtensions.AddPath(string, string) Method ##
-Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
-Assembly: net.adamec.lib.common
-Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
-Sources: extensions\StringExtensionsPaths.cs
-Source-only packages: [RadCommons.extensions.StringExtensions.Paths](#src-only-package--RadCommons.extensions.StringExtensions.Paths)
-
-
-Adds next path segment to string representing path to the file system
-
-
-
-```csharp
-public static string AddPath(this string str, string nextSegment)
-```
-
-Method parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## StringExtensions.LastPart(string, string) Method ##
-Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
-Assembly: net.adamec.lib.common
-Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
-Sources: extensions\StringExtensionsParts.cs
-Source-only packages: [RadCommons.extensions.StringExtensions.Parts](#src-only-package--RadCommons.extensions.StringExtensions.Parts)
-
-
-Returns the part of the string after the last occurence of the separator The result is always trimmed
-
-
-
-```csharp
-public static string LastPart(this string input, string separator)
-```
-
-Method parameters
Part of the string after the last occurence of the separator or the input string when no separator detected
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## StringExtensions.SplitByFirstSpace(string, string) Method ##
-Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
-Assembly: net.adamec.lib.common
-Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
-Sources: extensions\StringExtensionsParts.cs
-Source-only packages: [RadCommons.extensions.StringExtensions.Parts](#src-only-package--RadCommons.extensions.StringExtensions.Parts)
-
-
-Splits the string by first space and returns the "before" part. The "after" part is provided in output parameter rest Both result and rest are trimmed
-
-
-
-```csharp
-public static string SplitByFirstSpace(this string input, out string rest)
-```
-
-Method parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## StringExtensions.TrimAndMergeLines(string) Method ##
-Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
-Assembly: net.adamec.lib.common
-Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
-Sources: extensions\StringExtensionsWhitespace.cs
-Source-only packages: [RadCommons.extensions.StringExtensions.Whitespace](#src-only-package--RadCommons.extensions.StringExtensions.Whitespace)
-
-
-"Full" trim of the string - the lines within the string are trimmed and then the lines are merged with the space as a separator (instead of the line break)
-
-
-
-```csharp
-public static string TrimAndMergeLines(this string str)
-```
-
-Method parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## CommonLogging.CreateLogger(Type) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [CommonLogging](#t-net.adamec.lib.common.logging.commonlogging__1dar5wb)
-Sources: logging\CommonLogging.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
-
-Creates the logger for given type. The name of the logger will be System.Type.FullName
-
-
-
-```csharp
-public static ILogger CreateLogger(Type type)
-```
-
-Method parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## CommonLogging.CreateLogger<T>() Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [CommonLogging](#t-net.adamec.lib.common.logging.commonlogging__1dar5wb)
-Sources: logging\CommonLogging.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
-
-Creates the logger for given type. The name of the logger will be System.Type.FullName
-
-
-
-```csharp
-public static ILogger CreateLogger()
-```
-
-Type parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## LoggerExt Class ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Sources: logging\LoggerExt.CorrelationId.cs, logging\LoggerExt.cs, logging\LoggerExt.EventProperties.cs, logging\LoggerExt.ExceptionFilter.cs, logging\LoggerExt.ExceptionPassThrough.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging), [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
-
-Extended logger implementing [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-
-
-
-```csharp
-internal class LoggerExt : Logger, ILogger
-```
-
-Inheritance: object -> NLog.Logger
-Implements: [net.adamec.lib.common.logging.ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm), NLog.ILogger, NLog.ILoggerBase, NLog.ISuppress
-
-
-### Methods ###
-
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [CreateException<TException>(string, string, Exception)](#m-net.adamec.lib.common.logging.loggerext.createexception--1_system.string-system.string--system.exception___1kt7m7i) | private static | Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type |
- | [Debug(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.loggerext.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___by66ma) | public | Writes the diagnostic message at the `Debug` level. |
- | [DebugCorr(string, string)](#m-net.adamec.lib.common.logging.loggerext.debugcorr_system.string-system.string___i119af) | public | Writes the diagnostic message at the `Debug` level with correlation ID. |
- | [Error(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___7fy00h) | public | Writes the diagnostic message at the `Error` level. |
- | [Error(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.loggerext.error_system.collections.generic.dictionary_system.string-system.object_-system.string___u5pc5h) | public | Writes the diagnostic message at the `Error` level. |
- | [Error<TException>(string, Exception)](#m-net.adamec.lib.common.logging.loggerext.error--1_system.string-system.exception___1qowqgx) | public | Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type |
- | [ErrorCorr(string, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.errorcorr_system.string-system.exception-system.string___1tdd1hu) | public | Writes the diagnostic message at the `Error` level with correlation ID. |
- | [ErrorCorr(string, string)](#m-net.adamec.lib.common.logging.loggerext.errorcorr_system.string-system.string___1vt0qk2) | public | Writes the diagnostic message at the `Error` level with correlation ID. |
- | [ErrorCorr<TException>(string, LoggerExt.TException, string)](#m-net.adamec.lib.common.logging.loggerext.errorcorr--1_system.string---0-system.string___bk3vj3) | public | Writes the diagnostic message at the `Error` level and returns the exception of given type |
- | [ErrorCorr<TException>(string, string, Exception)](#m-net.adamec.lib.common.logging.loggerext.errorcorr--1_system.string-system.string-system.exception___4hcjn7) | public | Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type |
- | [ErrorFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___ipfsfa) | public | Writes the diagnostic message at the `Error` level and returns the exception of given type |
- | [ErrorFltrCorr<TException>(string, LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.logging.loggerext.errorfltrcorr--1_system.string---0-system.string-system.boolean___84xqu8) | public | Writes the diagnostic message at the `Error` level and returns the exception of given type |
- | [ErrorPassThrough(Exception, string)](#m-net.adamec.lib.common.logging.loggerext.errorpassthrough_system.exception-system.string___1ey2kd0) | public | Writes the diagnostic message at the `Error` level and returns given exception |
- | [Fatal(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___pw9hcn) | public | Writes the diagnostic message at the `Fatal` level. |
- | [Fatal(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.loggerext.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1ff2uef) | public | Writes the diagnostic message at the `Fatal` level. |
- | [Fatal<TException>(string, Exception)](#m-net.adamec.lib.common.logging.loggerext.fatal--1_system.string-system.exception___1myw0tj) | public | Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type |
- | [FatalCorr(string, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.fatalcorr_system.string-system.exception-system.string___1q1adwi) | public | Writes the diagnostic message at the `Fatal` level with correlation ID. |
- | [FatalCorr(string, string)](#m-net.adamec.lib.common.logging.loggerext.fatalcorr_system.string-system.string___c131ta) | public | Writes the diagnostic message at the `Fatal` level with correlation ID. |
- | [FatalCorr<TException>(string, LoggerExt.TException, string)](#m-net.adamec.lib.common.logging.loggerext.fatalcorr--1_system.string---0-system.string___17i1735) | public | Writes the diagnostic message at the `Fatal` level and returns the exception of given type |
- | [FatalCorr<TException>(string, string, Exception)](#m-net.adamec.lib.common.logging.loggerext.fatalcorr--1_system.string-system.string-system.exception___w1l5gt) | public | Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type |
- | [FatalFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.logging.loggerext.fatalfltr--1_--0-system.string-system.boolean___5rdjqe) | public | Writes the diagnostic message at the `Fatal` level and returns catchIt value. |
- | [FatalFltrCorr<TException>(string, LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.logging.loggerext.fatalfltrcorr--1_system.string---0-system.string-system.boolean___15t2hh0) | public | Writes the diagnostic message at the `Fatal` level and returns catchIt value. |
- | [FatalPassThrough(Exception, string)](#m-net.adamec.lib.common.logging.loggerext.fatalpassthrough_system.exception-system.string___10psm2o) | public | Writes the diagnostic message at the `Fatal` level and returns given exception > |
- | [Info(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.loggerext.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1qxds6b) | public | Writes the diagnostic message at the `Info` level. |
- | [InfoCorr(string, string)](#m-net.adamec.lib.common.logging.loggerext.infocorr_system.string-system.string___3vobha) | public | Writes the diagnostic message at the `Info` level with correlation ID. |
- | [LogIt(LogLevel, Dictionary<string,object>, string, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.collections.generic.dictionary_system.string-system.object_-system.string-system.exception-system.string___vo1jng) | private | Writes the item (message with optional event properties and exception) into the log |
- | [LogIt(LogLevel, string, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.exception-system.string___17r766x) | private | Writes the item (message with optional exception) into the log |
- | [LogIt(LogLevel, string, string, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.logit_nlog.loglevel-system.string-system.string-system.exception-system.string___14n4i77) | private | Writes the item (message with optional exception) with correlation Id into the log |
- | [Trace(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.loggerext.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___1k5wn70) | public | Writes the diagnostic message at the `Trace` level. |
- | [TraceCorr(string, string)](#m-net.adamec.lib.common.logging.loggerext.tracecorr_system.string-system.string___1e218kz) | public | Writes the diagnostic message at the `Trace` level with correlation ID |
- | [Warn(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___8kyvvj) | public | Writes the diagnostic message at the `Warn` level. |
- | [Warn(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.loggerext.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___wuc2dz) | public | Writes the diagnostic message at the `Warn` level. |
- | [WarnCorr(string, Exception, string)](#m-net.adamec.lib.common.logging.loggerext.warncorr_system.string-system.exception-system.string___sfdb1u) | public | Writes the diagnostic message at the `Warn` level with correlation ID. |
- | [WarnCorr(string, string)](#m-net.adamec.lib.common.logging.loggerext.warncorr_system.string-system.string___cfr64e) | public | Writes the diagnostic message at the `Warn` level with correlation ID. |
-
-
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## LoggerExt.CreateException<TException>(string, string, Exception) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2)
-Sources: logging\LoggerExt.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
-
-Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
-
-
-
-```csharp
-private static LoggerExt.TException CreateException(string message, out string stackTrace, Exception innerException = null) where TException: Exception
-```
-
-Type parameters
Flag whether the exception is to be catch by exception filter
Implements: [ILogger.ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm)
-
-
-### Example ###
-The following code logs any exception without catching it (function returns false by default)
-```csharp
- try
- {
- ...
- }
- catch (Exception e) when (Logger.FatalFltr(e)) {}
-```
- The following code catch and log the ArgumentException and logs any other exception without catching it.
-```csharp
- try
- {
- ...
- }
- catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) {}
- catch (Exception e) when (Logger.FatalFltr(e)) {}
-```
-
-
-
-### Remarks ###
-This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## LoggerExt.ErrorFltrCorr<TException>(string, LoggerExt.TException, string, bool) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2)
-Sources: logging\LoggerExt.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
-
-Writes the diagnostic message at the `Error` level and returns the exception of given type
-
-
-
-```csharp
-public bool ErrorFltrCorr(string correlationId, LoggerExt.TException exception, string message = null, bool catchIt = false) where TException: Exception
-```
-
-Type parameters
Flag whether the exception is to be catch by exception filter
Implements: [ILogger.ErrorFltrCorr<TException>(string, ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.errorfltrcorr--1_system.string---0-system.string-system.boolean___1spds2w)
-
-
-### Remarks ###
-This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
-
-
-### See Also ###
-[ErrorFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___ipfsfa)
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## LoggerExt.ErrorPassThrough(Exception, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2)
-Sources: logging\LoggerExt.ExceptionPassThrough.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
-
-Writes the diagnostic message at the `Error` level and returns given exception
-
-
-
-```csharp
-public Exception ErrorPassThrough(Exception exception, string message = null)
-```
-
-Method parameters
Flag whether the exception is to be catch by exception filter
Implements: [ILogger.FatalFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1av7ixa)
-
-
-### Remarks ###
-This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
-
-
-### See Also ###
-[ErrorFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___ipfsfa)
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## LoggerExt.FatalFltrCorr<TException>(string, LoggerExt.TException, string, bool) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2)
-Sources: logging\LoggerExt.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
-
-Writes the diagnostic message at the `Fatal` level and returns catchIt value.
-
-
-
-```csharp
-public bool FatalFltrCorr(string correlationId, LoggerExt.TException exception, string message = null, bool catchIt = false) where TException: Exception
-```
-
-Type parameters
Flag whether the exception is to be catch by exception filter
Implements: [ILogger.FatalFltrCorr<TException>(string, ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.fatalfltrcorr--1_system.string---0-system.string-system.boolean___a9m338)
-
-
-### Remarks ###
-This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
-
-
-### See Also ###
-[ErrorFltr<TException>(LoggerExt.TException, string, bool)](#m-net.adamec.lib.common.logging.loggerext.errorfltr--1_--0-system.string-system.boolean___ipfsfa)
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## LoggerExt.FatalPassThrough(Exception, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2)
-Sources: logging\LoggerExt.ExceptionPassThrough.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
-
-Writes the diagnostic message at the `Fatal` level and returns given exception >
-
-
-
-```csharp
-public Exception FatalPassThrough(Exception exception, string message = null)
-```
-
-Method parameters
+Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-### Remarks ###
-The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property. Extended logger provides following methods to log with given set of the properties.
- - [Trace(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___15kc02k) ,
- - [Debug(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___jxdraq) ,
- - [Info(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1kbhewr) ,
- - [Warn(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___1hy0rp3) ,
- - [Error(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___kfa9gl) ,
- - [Fatal(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1yxmkzz) ,
- - [Warn(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___10z37vj) ,
- - [Error(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1watp5d) and
- - [Fatal(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___175gumn)
-
-
-
+## ServiceCollectionConfigureDirectException Class ##
+Namespace: [net.adamec.lib.common.di.config.exception](#n-net.adamec.lib.common.di.config.exception__15nr03q)
+Assembly: net.adamec.lib.common
+Sources: di\config\exception\ServiceCollectionConfigureDirectException.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
- Sometimes, it's useful to have an exception logging method implemented as the operation returning the exception being logged. The [ErrorPassThrough(Exception, string)](#m-net.adamec.lib.common.logging.ilogger.errorpassthrough_system.exception-system.string___1vc33gk) and [FatalPassThrough(Exception, string)](#m-net.adamec.lib.common.logging.ilogger.fatalpassthrough_system.exception-system.string___1fx8xs8) methods will log given exception and return it for further processing.
-```csharp
- try
- {
- ...
- }
- catch (Exception ex){
- if(logger.ErrorPassThrough(ex) is MyException){
- return null;
- }else{
- throw;
- }
- }
-```
- In the example above, the exception is always logged and then the decision/action is taken.
+Exception thrown by net.adamec.home.control.common.config.exception.ServiceCollectionConfigureDirectExtensions
- C# 6 brought the exception filters that don't unwind the stack as the exception is not catch yet when processing the filter. It can also be used for logging the exceptions without actually catching them (when the exception filter returns `false` ). Extended logger provides functions [ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm) and [FatalFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1av7ixa) for this purpose.
-```csharp
- try
- {
- ...
- }
- catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){
- //newer called as the default return value of ErrorFltr is false
- }
-```
- The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it.
-```csharp
- try
- {
- ...
- }
- catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) { ... }
- catch (Exception e) when (Logger.FatalFltr(e)) {}
-```
- Logger can also create and exception, log it and return using functions [Error<TException>(string, Exception)](#m-net.adamec.lib.common.logging.ilogger.error--1_system.string-system.exception___pmrssh) and [Fatal<TException>(string, Exception)](#m-net.adamec.lib.common.logging.ilogger.fatal--1_system.string-system.exception___x5u73)
```csharp
- if(value is null) throw logger.Fatal("Value is null");
+public class ServiceCollectionConfigureDirectException : Exception
```
-
- When logging an exception using the [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2) methods, the event property `StackTrace` is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using `new StackTrace(2, true).ToString()` . In other cases when the System.Exception.StackTrace is null or empty, `new StackTrace(true).ToString()` is used.
-
- [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2) also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property `CorrelationId` . Such methods have the name ending with `Corr` suffix.
-
-
+Inheritance: object -> System.Exception
+Implements: System.Runtime.Serialization.ISerializable
-### Methods ###
+### Constructors ###
| Name | Modifier | Summary |
| ------ | ---------- | --------- |
- | [Debug(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___jxdraq) | public abstract | Writes the diagnostic message at the `Debug` level. |
- | [DebugCorr(string, string)](#m-net.adamec.lib.common.logging.ilogger.debugcorr_system.string-system.string___aozvfj) | public abstract | Writes the diagnostic message at the `Debug` level with correlation ID. |
- | [Error(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1watp5d) | public abstract | Writes the diagnostic message at the `Error` level. |
- | [Error(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___kfa9gl) | public abstract | Writes the diagnostic message at the `Error` level. |
- | [Error<TException>(string, Exception)](#m-net.adamec.lib.common.logging.ilogger.error--1_system.string-system.exception___pmrssh) | public abstract | Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type |
- | [ErrorCorr(string, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.errorcorr_system.string-system.exception-system.string___1qll13u) | public abstract | Writes the diagnostic message at the `Error` level with correlation ID. |
- | [ErrorCorr(string, string)](#m-net.adamec.lib.common.logging.ilogger.errorcorr_system.string-system.string___coifvu) | public abstract | Writes the diagnostic message at the `Error` level with correlation ID. |
- | [ErrorCorr<TException>(string, ILogger.TException, string)](#m-net.adamec.lib.common.logging.ilogger.errorcorr--1_system.string---0-system.string___eypxkv) | public abstract | Writes the diagnostic message at the `Error` level and returns the exception of given type |
- | [ErrorCorr<TException>(string, string, Exception)](#m-net.adamec.lib.common.logging.ilogger.errorcorr--1_system.string-system.string-system.exception___91akh7) | public abstract | Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type |
- | [ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm) | public abstract | Writes the diagnostic message at the `Error` level and returns the exception of given type |
- | [ErrorFltrCorr<TException>(string, ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.errorfltrcorr--1_system.string---0-system.string-system.boolean___1spds2w) | public abstract | Writes the diagnostic message at the `Error` level and returns the exception of given type |
- | [ErrorPassThrough(Exception, string)](#m-net.adamec.lib.common.logging.ilogger.errorpassthrough_system.exception-system.string___1vc33gk) | public abstract | Writes the diagnostic message at the `Error` level and returns given exception |
- | [Fatal(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___175gumn) | public abstract | Writes the diagnostic message at the `Fatal` level. |
- | [Fatal(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1yxmkzz) | public abstract | Writes the diagnostic message at the `Fatal` level. |
- | [Fatal<TException>(string, Exception)](#m-net.adamec.lib.common.logging.ilogger.fatal--1_system.string-system.exception___x5u73) | public abstract | Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type |
- | [FatalCorr(string, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.fatalcorr_system.string-system.exception-system.string___yt34nm) | public abstract | Writes the diagnostic message at the `Fatal` level with correlation ID. |
- | [FatalCorr(string, string)](#m-net.adamec.lib.common.logging.ilogger.fatalcorr_system.string-system.string___ufcx32) | public abstract | Writes the diagnostic message at the `Fatal` level with correlation ID. |
- | [FatalCorr<TException>(string, ILogger.TException, string)](#m-net.adamec.lib.common.logging.ilogger.fatalcorr--1_system.string---0-system.string___108vdu1) | public abstract | Writes the diagnostic message at the `Fatal` level and returns the exception of given type |
- | [FatalCorr<TException>(string, string, Exception)](#m-net.adamec.lib.common.logging.ilogger.fatalcorr--1_system.string-system.string-system.exception___1hlu7x) | public abstract | Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type |
- | [FatalFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1av7ixa) | public abstract | Writes the diagnostic message at the `Fatal` level and returns catchIt value. |
- | [FatalFltrCorr<TException>(string, ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.fatalfltrcorr--1_system.string---0-system.string-system.boolean___a9m338) | public abstract | Writes the diagnostic message at the `Fatal` level and returns catchIt value. |
- | [FatalPassThrough(Exception, string)](#m-net.adamec.lib.common.logging.ilogger.fatalpassthrough_system.exception-system.string___1fx8xs8) | public abstract | Writes the diagnostic message at the `Fatal` level and returns given exception |
- | [Info(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1kbhewr) | public abstract | Writes the diagnostic message at the `Info` level. |
- | [InfoCorr(string, string)](#m-net.adamec.lib.common.logging.ilogger.infocorr_system.string-system.string___2iypny) | public abstract | Writes the diagnostic message at the `Info` level with correlation ID. |
- | [Trace(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___15kc02k) | public abstract | Writes the diagnostic message at the `Trace` level. |
- | [TraceCorr(string, string)](#m-net.adamec.lib.common.logging.ilogger.tracecorr_system.string-system.string___1bdni2z) | public abstract | Writes the diagnostic message at the `Trace` level with correlation ID. |
- | [Warn(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___10z37vj) | public abstract | Writes the diagnostic message at the `Warn` level. |
- | [Warn(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___1hy0rp3) | public abstract | Writes the diagnostic message at the `Warn` level. |
- | [WarnCorr(string, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.warncorr_system.string-system.exception-system.string___1kh0i9m) | public abstract | Writes the diagnostic message at the `Warn` level with correlation ID. |
- | [WarnCorr(string, string)](#m-net.adamec.lib.common.logging.ilogger.warncorr_system.string-system.string___pr2tiu) | public abstract | Writes the diagnostic message at the `Warn` level with correlation ID. |
+ | [ServiceCollectionConfigureDirectException()](#m-net.adamec.lib.common.di.config.exception.servicecollectionconfiguredirectexception.-ctor__1n8hr1d) | public | Creates [ServiceCollectionConfigureDirectException](#t-net.adamec.lib.common.di.config.exception.servicecollectionconfiguredirectexception__1q7o5xj) |
+ | [ServiceCollectionConfigureDirectException(string)](#m-net.adamec.lib.common.di.config.exception.servicecollectionconfiguredirectexception.-ctor_system.string___1dp1v34) | public | Creates [ServiceCollectionConfigureDirectException](#t-net.adamec.lib.common.di.config.exception.servicecollectionconfiguredirectexception__1q7o5xj) |
+ | [ServiceCollectionConfigureDirectException(string, Exception)](#m-net.adamec.lib.common.di.config.exception.servicecollectionconfiguredirectexception.-ctor_system.string-system.exception___1uv85c8) | public | Creates [ServiceCollectionConfigureDirectException](#t-net.adamec.lib.common.di.config.exception.servicecollectionconfiguredirectexception__1q7o5xj) |
@@ -5253,102 +1945,84 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.Debug(Dictionary<string,object>, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionConfigureDirectException.ServiceCollectionConfigureDirectException() Constructor ##
+Namespace: [net.adamec.lib.common.di.config.exception](#n-net.adamec.lib.common.di.config.exception__15nr03q)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.EventProperties.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ServiceCollectionConfigureDirectException](#t-net.adamec.lib.common.di.config.exception.servicecollectionconfiguredirectexception__1q7o5xj)
+Sources: di\config\exception\ServiceCollectionConfigureDirectException.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Debug` level.
+Creates [ServiceCollectionConfigureDirectException](#t-net.adamec.lib.common.di.config.exception.servicecollectionconfiguredirectexception__1q7o5xj)
```csharp
-public abstract void Debug(Dictionary eventProperties, [Localizable(false)] string message)
+public ServiceCollectionConfigureDirectException()
```
-Method parameters
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5357,51 +2031,34 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.Error<TException>(string, Exception) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ContainerBuilderExtensions Class ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.ExceptionPassThrough.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Sources: di\config\extensions\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Error` level. Creates and returns the exception of given type
+Autofac Autofac.ContainerBuilder extensions
```csharp
-public abstract ILogger.TException Error(string message, Exception innerException = null) where TException: Exception
+internal static class ContainerBuilderExtensions
```
-Type parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
-## ILogger.ErrorCorr(string, Exception, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
-
+Inheritance: object
-Writes the diagnostic message at the `Error` level with correlation ID.
+### Methods ###
-```csharp
-public abstract void ErrorCorr(string correlationId, Exception exception, [Localizable(false)] string message)
-```
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [AddAutoOptions(ContainerBuilder, IConfigurationRoot, Assembly[])](#m-net.adamec.lib.common.di.config.extensions.containerbuilderextensions.addautooptions_autofac.containerbuilder-microsoft.extensions.configuration.iconfigurationroot-system.reflection.assembly_____pfqod1) | public static | Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions |
+ | [AddAutoOptions(ContainerBuilder, IConfigurationRoot, Type[])](#m-net.adamec.lib.common.di.config.extensions.containerbuilderextensions.addautooptions_autofac.containerbuilder-microsoft.extensions.configuration.iconfigurationroot-system.type_____1fbl63e) | public static | Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions |
+ | [AddOptions<TOptions>(ContainerBuilder, IConfigurationRoot, string)](#m-net.adamec.lib.common.di.config.extensions.containerbuilderextensions.addoptions--1_autofac.containerbuilder-microsoft.extensions.configuration.iconfigurationroot-system.string___1b2rpkf) | public static | Creates and registers the singleton of configuration (options) class of given type This is to be used if not registered using the [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) |
-Method parameters
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5410,51 +2067,58 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.ErrorCorr(string, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ContainerBuilderExtensions.AddAutoOptions(ContainerBuilder, IConfigurationRoot, Assembly[]) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.config.extensions.containerbuilderextensions__tpisv7)
+Sources: di\config\extensions\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Error` level with correlation ID.
+Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
```csharp
-public abstract void ErrorCorr(string correlationId, [Localizable(false)] string message)
+public static void AddAutoOptions(this ContainerBuilder builder, IConfigurationRoot configuration, params Assembly[] assemblies)
```
-Method parameters
+
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-## ILogger.ErrorCorr<TException>(string, ILogger.TException, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ContainerBuilderExtensions.AddAutoOptions(ContainerBuilder, IConfigurationRoot, Type[]) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.config.extensions.containerbuilderextensions__tpisv7)
+Sources: di\config\extensions\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Error` level and returns the exception of given type
+Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
```csharp
-public abstract ILogger.TException ErrorCorr(string correlationId, ILogger.TException exception, string message = null) where TException: Exception
+public static void AddAutoOptions(this ContainerBuilder builder, IConfigurationRoot configuration, params Type[] types)
```
-Type parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5463,25 +2127,29 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.ErrorCorr<TException>(string, string, Exception) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ContainerBuilderExtensions.AddOptions<TOptions>(ContainerBuilder, IConfigurationRoot, string) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.config.extensions.containerbuilderextensions__tpisv7)
+Sources: di\config\extensions\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Error` level with correlation ID. Creates and returns the exception of given type
+Creates and registers the singleton of configuration (options) class of given type This is to be used if not registered using the [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2)
```csharp
-public abstract ILogger.TException ErrorCorr(string correlationId, string message, Exception innerException = null) where TException: Exception
+public static void AddOptions(this ContainerBuilder builder, IConfigurationRoot configuration, string configSection) where TOptions: new()
```
-Type parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5490,50 +2158,33 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.ErrorFltr<TException>(ILogger.TException, string, bool) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionAutoOptionsExtension Class ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.ExceptionFilter.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Sources: di\config\extensions\ServiceCollectionAutoOptionsExtension.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Error` level and returns the exception of given type
+Extensions for options (configuration) class automatic binding to appsettings.json
```csharp
-public abstract bool ErrorFltr(ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
+internal static class ServiceCollectionAutoOptionsExtension
```
-Type parameters
Flag whether the exception is to be catch by exception filter
+Inheritance: object
-### Example ###
-The following code logs any exception without catching it (function returns false by default)
-```csharp
- try
- {
- ...
- }
- catch (Exception e) when (Logger.FatalFltr(e)) {}
-```
- The following code catch and log the ArgumentException and logs any other exception without catching it.
-```csharp
- try
- {
- ...
- }
- catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) {}
- catch (Exception e) when (Logger.FatalFltr(e)) {}
-```
+### Methods ###
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [ConfigureAutoOptions(IServiceCollection, IConfiguration, Assembly[])](#m-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension.configureautooptions_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfiguration-system.reflection.assembly_____bfjrc2) | public static | Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI |
+ | [ConfigureAutoOptions(IServiceCollection, IConfigurationRoot, Assembly[])](#m-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension.configureautooptions_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfigurationroot-system.reflection.assembly_____1kc5g1y) | public static | Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI |
-### Remarks ###
-This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5542,33 +2193,28 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.ErrorFltrCorr<TException>(string, ILogger.TException, string, bool) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionAutoOptionsExtension.ConfigureAutoOptions(IServiceCollection, IConfiguration, Assembly[]) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ServiceCollectionAutoOptionsExtension](#t-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension__1p9fgao)
+Sources: di\config\extensions\ServiceCollectionAutoOptionsExtension.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Error` level and returns the exception of given type
+Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
```csharp
-public abstract bool ErrorFltrCorr(string correlationId, ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
+public static IServiceCollection ConfigureAutoOptions(this IServiceCollection services, IConfiguration configuration, Assembly[] assemblies)
```
-Type parameters
Flag whether the exception is to be catch by exception filter
-
-
-### Remarks ###
-This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+Method parameters
Can't create the instance of options (configuration) class
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5577,24 +2223,28 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.ErrorPassThrough(Exception, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionAutoOptionsExtension.ConfigureAutoOptions(IServiceCollection, IConfigurationRoot, Assembly[]) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.ExceptionPassThrough.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ServiceCollectionAutoOptionsExtension](#t-net.adamec.lib.common.di.config.extensions.servicecollectionautooptionsextension__1p9fgao)
+Sources: di\config\extensions\ServiceCollectionAutoOptionsExtension.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Error` level and returns given exception
+Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
```csharp
-public abstract Exception ErrorPassThrough(Exception exception, string message = null)
+public static IServiceCollection ConfigureAutoOptions(this IServiceCollection services, IConfigurationRoot configuration, Assembly[] assemblies)
```
-Method parameters
Can't create the instance of options (configuration) class
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5603,24 +2253,35 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.Fatal(Dictionary<string,object>, Exception, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionConfigureDirectExtensions Class ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.EventProperties.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
+
+
+Extensions for options (configuration) class registration into MS DI
+
+
+
+```csharp
+internal static class ServiceCollectionConfigureDirectExtensions
+```
+Inheritance: object
-Writes the diagnostic message at the `Fatal` level.
+### Methods ###
-```csharp
-public abstract void Fatal(Dictionary eventProperties, Exception exception, [Localizable(false)] string message)
-```
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [ConfigureDirect(IServiceCollection, Type, IConfiguration)](#m-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions.configuredirect_microsoft.extensions.dependencyinjection.iservicecollection-system.type-microsoft.extensions.configuration.iconfiguration___1lbalbi) | public static | Creates the instance of the options (configuration) class, binds (fills) it to the configuration and registers is as singleton into MS DI. |
+ | [ConfigureDirect<TConfig>(IServiceCollection, IConfiguration)](#m-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions.configuredirect--1_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfiguration___1049ily) | public static | Creates the instance of the options (configuration) class, binds (fills) it to the configuration and registers is as singleton into MS DI. |
+ | [ConfigureDirect<TConfig>(IServiceCollection, IConfiguration, Func<TConfig>)](#m-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions.configuredirect--1_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfiguration-system.func_--0____1uka1kl) | public static | Gets the instance of the options (configuration) class from pocoProvider , binds (fills) it to the configuration and registers is as singleton into MS DI. |
+ | [ConfigureDirect<TConfig>(IServiceCollection, IConfiguration, ServiceCollectionConfigureDirectExtensions.TConfig)](#m-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions.configuredirect--1_microsoft.extensions.dependencyinjection.iservicecollection-microsoft.extensions.configuration.iconfiguration---0___18sq65m) | public static | Binds (fills) given instance of the options (configuration) class to configuration and registers is as singleton into MS DI. |
-Method parameters
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5629,24 +2290,28 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.Fatal(Dictionary<string,object>, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionConfigureDirectExtensions.ConfigureDirect(IServiceCollection, Type, IConfiguration) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.EventProperties.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv)
+Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Fatal` level.
+Creates the instance of the options (configuration) class, binds (fills) it to the configuration and registers is as singleton into MS DI.
```csharp
-public abstract void Fatal(Dictionary eventProperties, [Localizable(false)] string message)
+public static object ConfigureDirect(this IServiceCollection services, Type type, IConfiguration configuration)
```
-Method parameters
Can't create the instance of options (configuration) class
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5655,25 +2320,29 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.Fatal<TException>(string, Exception) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionConfigureDirectExtensions.ConfigureDirect<TConfig>(IServiceCollection, IConfiguration) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.ExceptionPassThrough.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv)
+Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Fatal` level. Creates and returns the exception of given type
+Creates the instance of the options (configuration) class, binds (fills) it to the configuration and registers is as singleton into MS DI.
```csharp
-public abstract ILogger.TException Fatal(string message, Exception innerException = null) where TException: Exception
+public static ServiceCollectionConfigureDirectExtensions.TConfig ConfigureDirect(this IServiceCollection services, IConfiguration configuration) where TConfig: class, new()
```
-Type parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5682,24 +2351,29 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.FatalCorr(string, Exception, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionConfigureDirectExtensions.ConfigureDirect<TConfig>(IServiceCollection, IConfiguration, Func<TConfig>) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv)
+Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Fatal` level with correlation ID.
+Gets the instance of the options (configuration) class from pocoProvider , binds (fills) it to the configuration and registers is as singleton into MS DI.
```csharp
-public abstract void FatalCorr(string correlationId, Exception exception, [Localizable(false)] string message)
+public static ServiceCollectionConfigureDirectExtensions.TConfig ConfigureDirect(this IServiceCollection services, IConfiguration configuration, Func pocoProvider) where TConfig: class
```
-Method parameters
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5708,51 +2382,46 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.FatalCorr(string, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ServiceCollectionConfigureDirectExtensions.ConfigureDirect<TConfig>(IServiceCollection, IConfiguration, ServiceCollectionConfigureDirectExtensions.TConfig) Method ##
+Namespace: [net.adamec.lib.common.di.config.extensions](#n-net.adamec.lib.common.di.config.extensions__1bjxl1v)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ServiceCollectionConfigureDirectExtensions](#t-net.adamec.lib.common.di.config.extensions.servicecollectionconfiguredirectextensions__wdwckv)
+Sources: di\config\extensions\ServiceCollectionConfigureDirectExtensions.cs
+Source-only packages: [RadCommons.di.Config](#src-only-package--RadCommons.di.Config)
-Writes the diagnostic message at the `Fatal` level with correlation ID.
+Binds (fills) given instance of the options (configuration) class to configuration and registers is as singleton into MS DI.
```csharp
-public abstract void FatalCorr(string correlationId, [Localizable(false)] string message)
+public static ServiceCollectionConfigureDirectExtensions.TConfig ConfigureDirect(this IServiceCollection services, IConfiguration configuration, ServiceCollectionConfigureDirectExtensions.TConfig config) where TConfig: class
```
-Method parameters
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
+Type parameters
TConfig
Type of options (configuration) class to register as singleton
-## ILogger.FatalCorr<TException>(string, ILogger.TException, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
-Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-Writes the diagnostic message at the `Fatal` level and returns the exception of given type
+
+## net.adamec.lib.common.di.postinit Namespace ##
+### Classes ###
-```csharp
-public abstract ILogger.TException FatalCorr(string correlationId, ILogger.TException exception, string message = null) where TException: Exception
-```
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.postinit.containerbuilderextensions__7mjuw3) | internal static | Autofac Autofac.ContainerBuilder extensions |
+ | [PostInitAttribute](#t-net.adamec.lib.common.di.postinit.postinitattribute__qimmrl) | public | Allows to run post init method of component. Component must be registered using the Component attribute as singleton in root scope and must register self Parameters of "marked" post init method are resolved from container (throws an exception on failure) |
-Type parameters
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5761,25 +2430,33 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.FatalCorr<TException>(string, string, Exception) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ContainerBuilderExtensions Class ##
+Namespace: [net.adamec.lib.common.di.postinit](#n-net.adamec.lib.common.di.postinit__ylne5f)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Sources: di\postinit\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.PostInit](#src-only-package--RadCommons.di.PostInit)
-Writes the diagnostic message at the `Fatal` level with correlation ID. Creates and returns the exception of given type
+Autofac Autofac.ContainerBuilder extensions
```csharp
-public abstract ILogger.TException FatalCorr(string correlationId, string message, Exception innerException = null) where TException: Exception
+internal static class ContainerBuilderExtensions
```
-Type parameters
Flag whether the exception is to be catch by exception filter
+Method parameters
Autofac.ContainerBuilder builder
+Return value
Autofac.ContainerBuilder
Autofac container builder
### Remarks ###
-This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
-
-
-### See Also ###
-[ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm)
+Registers the [ProcessComponentPostInit(IContainer)](#m-net.adamec.lib.common.di.postinit.containerbuilderextensions.processcomponentpostinit_autofac.icontainer___uo3mji) method as a container-built-callback
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5823,33 +2495,32 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.FatalFltrCorr<TException>(string, ILogger.TException, string, bool) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ContainerBuilderExtensions.ProcessComponentPostInit(IContainer) Method ##
+Namespace: [net.adamec.lib.common.di.postinit](#n-net.adamec.lib.common.di.postinit__ylne5f)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.CorrelationId.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ContainerBuilderExtensions](#t-net.adamec.lib.common.di.postinit.containerbuilderextensions__7mjuw3)
+Sources: di\postinit\ContainerBuilderExtensions.cs
+Source-only packages: [RadCommons.di.PostInit](#src-only-package--RadCommons.di.PostInit)
-Writes the diagnostic message at the `Fatal` level and returns catchIt value.
+Executes the components' post init methods
```csharp
-public abstract bool FatalFltrCorr(string correlationId, ILogger.TException exception, string message = null, bool catchIt = false) where TException: Exception
+private static void ProcessComponentPostInit(IContainer container)
```
-Type parameters
### Remarks ###
-This function is intended for catch exception filters. The parameter catchIt defines whether the exception filter will be applied after logging. The exception will be catch when catchIt is true, otherwise the filter is evaluated as false and it will continue with finding the catch clause (in both cases the log entry will be created)
+Checks Autofac registry for the services with [ComponentAttribute](#t-net.adamec.lib.common.di.component.componentattribute__170qqzl) that register themselves (so the interface registrations are excluded). For such components (services) it tries to find the methods marked with [PostInitAttribute](#t-net.adamec.lib.common.di.postinit.postinitattribute__qimmrl) and execute them. When the method has the parameters, it will try to resolve the from the container
-### See Also ###
-[ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm)
+### Exceptions ###
+
Can't resolve the post init method parameter from container or can't get the component instance from container
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5858,24 +2529,25 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.FatalPassThrough(Exception, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## PostInitAttribute Class ##
+Namespace: [net.adamec.lib.common.di.postinit](#n-net.adamec.lib.common.di.postinit__ylne5f)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.ExceptionPassThrough.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Sources: di\postinit\PostInitAttribute.cs
+Source-only packages: [RadCommons.di.PostInit](#src-only-package--RadCommons.di.PostInit)
-Writes the diagnostic message at the `Fatal` level and returns given exception
+Allows to run post init method of component. Component must be registered using the Component attribute as singleton in root scope and must register self Parameters of "marked" post init method are resolved from container (throws an exception on failure)
```csharp
-public abstract Exception FatalPassThrough(Exception exception, string message = null)
+[AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false)]
+public class PostInitAttribute : Attribute
```
-Method parameters
+Inheritance: object
+
+
+
+### Methods ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [AppendBytes(byte[], byte[])](#m-net.adamec.lib.common.extensions.arrayextensions.appendbytes_system.byte__-system.byte_____1lkijjg) | public static | Adds the byte array to the current one and returns resulting array (concatenates two byte arrays into a new one) |
+ | [Fill<T>(ArrayExtensions.T[], ArrayExtensions.T)](#m-net.adamec.lib.common.extensions.arrayextensions.fill--1_--0__---0___6j19g1) | public static | Fills the array or T with defaultValue |
+
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -5936,24 +2611,24 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## ILogger.Trace(Dictionary<string,object>, string) Method ##
-Namespace: [net.adamec.lib.common.logging](#n-net.adamec.lib.common.logging__1g9pm29)
+## ArrayExtensions.AppendBytes(byte[], byte[]) Method ##
+Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
Assembly: net.adamec.lib.common
-Type: [ILogger](#t-net.adamec.lib.common.logging.ilogger__y2ollm)
-Sources: logging\ILogger.EventProperties.cs
-Source-only packages: [RadCommons.logging.CommonLogging](#src-only-package--RadCommons.logging.CommonLogging)
+Type: [ArrayExtensions](#t-net.adamec.lib.common.extensions.arrayextensions__icw7wf)
+Sources: extensions\ArrayExtensionsAppendBytes.cs
+Source-only packages: [RadCommons.extensions.ArrayExtensions.ConcatenateBytes](#src-only-package--RadCommons.extensions.ArrayExtensions.ConcatenateBytes)
-Writes the diagnostic message at the `Trace` level.
+Adds the byte array to the current one and returns resulting array (concatenates two byte arrays into a new one)
```csharp
-public abstract void Trace(Dictionary eventProperties, [Localizable(false)] string message)
+public static byte[] AppendBytes(this byte[] original, byte[] addedBytes)
```
-Method parameters
+
+
+Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [isCancelling](#f-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.iscancelling__14bxgje) | private | Backing field for [IsCancelling](#p-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.iscancelling__1krty8c) |
- | [isRunningInternal](#f-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.isrunninginternal__np6hee) | private | Internal flag whether the worker is running its DoWork action |
- | [lockObject](#f-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.lockobject__slen4g) | private | Lock object |
- | [resetEvent](#f-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.resetevent__7jv5b7) | private | Reset event used to ensure that the work is finished |
-### Properties ###
+## StringExtensions Class ##
+Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
+Assembly: net.adamec.lib.common
+Sources: extensions\StringExtensionsCase.cs, extensions\StringExtensionsHtml.cs, extensions\StringExtensionsParts.cs, extensions\StringExtensionsPaths.cs, extensions\StringExtensionsWhitespace.cs
+Source-only packages: [RadCommons.extensions.StringExtensions.Case](#src-only-package--RadCommons.extensions.StringExtensions.Case), [RadCommons.extensions.StringExtensions.Html](#src-only-package--RadCommons.extensions.StringExtensions.Html), [RadCommons.extensions.StringExtensions.Parts](#src-only-package--RadCommons.extensions.StringExtensions.Parts), [RadCommons.extensions.StringExtensions.Paths](#src-only-package--RadCommons.extensions.StringExtensions.Paths), [RadCommons.extensions.StringExtensions.Whitespace](#src-only-package--RadCommons.extensions.StringExtensions.Whitespace)
- | Name | Modifier | Summary |
- | ------ | ---------- | --------- |
- | [IsCancelling](#p-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.iscancelling__1krty8c) | public | Flag whether the worker is cancelling |
-
+System.String class extensions
+
+
+
+```csharp
+internal static class StringExtensions
+```
+
+Inheritance: object
+
### Methods ###
| Name | Modifier | Summary |
| ------ | ---------- | --------- |
- | [Cancel()](#m-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.cancel__1p5og1v) | public | Requests cancellation of a pending background operation and wait for cancel to complete |
- | [OnDoWork(DoWorkEventArgs)](#m-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.ondowork_system.componentmodel.doworkeventargs___1euewn7) | protected | Raises the System.ComponentModel.BackgroundWorker.DoWork event. |
+ | [AddPath(string, string)](#m-net.adamec.lib.common.extensions.stringextensions.addpath_system.string-system.string___1m9wwnx) | public static | Adds next path segment to string representing path to the file system |
+ | [FirstLetterToUpper(string)](#m-net.adamec.lib.common.extensions.stringextensions.firstlettertoupper_system.string___12nwwlc) | public static | Converts the first letter of string to upper case |
+ | [HtmlDecode(string)](#m-net.adamec.lib.common.extensions.stringextensions.htmldecode_system.string___kajpem) | public static | HTML decodes the string |
+ | [HtmlEncode(string)](#m-net.adamec.lib.common.extensions.stringextensions.htmlencode_system.string___1ozzgea) | public static | HTML encodes the string |
+ | [LastPart(string, string)](#m-net.adamec.lib.common.extensions.stringextensions.lastpart_system.string-system.string___t4lkjk) | public static | Returns the part of the string after the last occurence of the separator The result is always trimmed |
+ | [SplitByFirstSpace(string, string)](#m-net.adamec.lib.common.extensions.stringextensions.splitbyfirstspace_system.string-system.string-___d5xnpu) | public static | Splits the string by first space and returns the "before" part. The "after" part is provided in output parameter rest Both result and rest are trimmed |
+ | [ToCamelCase(string)](#m-net.adamec.lib.common.extensions.stringextensions.tocamelcase_system.string___xq94l0) | public static | Simple CamelCase converter |
+ | [TrimAndMergeLines(string)](#m-net.adamec.lib.common.extensions.stringextensions.trimandmergelines_system.string___1371ffr) | public static | "Full" trim of the string - the lines within the string are trimmed and then the lines are merged with the space as a separator (instead of the line break) |
@@ -6195,23 +2899,24 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BackgroundWorkerWithSyncCancel.isCancelling Field ##
-Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
+## StringExtensions.AddPath(string, string) Method ##
+Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
Assembly: net.adamec.lib.common
-Type: [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo)
-Sources: utils\BackgroundWorkerWithSyncCancel.cs
-Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
+Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
+Sources: extensions\StringExtensionsPaths.cs
+Source-only packages: [RadCommons.extensions.StringExtensions.Paths](#src-only-package--RadCommons.extensions.StringExtensions.Paths)
-Backing field for [IsCancelling](#p-net.adamec.lib.common.utils.backgroundworkerwithsynccancel.iscancelling__1krty8c)
+Adds next path segment to string representing path to the file system
```csharp
-private bool isCancelling
+public static string AddPath(this string str, string nextSegment)
```
-Field value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6220,23 +2925,24 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BackgroundWorkerWithSyncCancel.isRunningInternal Field ##
-Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
+## StringExtensions.FirstLetterToUpper(string) Method ##
+Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
Assembly: net.adamec.lib.common
-Type: [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo)
-Sources: utils\BackgroundWorkerWithSyncCancel.cs
-Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
+Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
+Sources: extensions\StringExtensionsCase.cs
+Source-only packages: [RadCommons.extensions.StringExtensions.Case](#src-only-package--RadCommons.extensions.StringExtensions.Case)
-Internal flag whether the worker is running its DoWork action
+Converts the first letter of string to upper case
```csharp
-private bool isRunningInternal
+public static string FirstLetterToUpper(this string str)
```
-Field value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6270,23 +2977,24 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BackgroundWorkerWithSyncCancel.resetEvent Field ##
-Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
+## StringExtensions.HtmlEncode(string) Method ##
+Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
Assembly: net.adamec.lib.common
-Type: [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo)
-Sources: utils\BackgroundWorkerWithSyncCancel.cs
-Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
+Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
+Sources: extensions\StringExtensionsHtml.cs
+Source-only packages: [RadCommons.extensions.StringExtensions.Html](#src-only-package--RadCommons.extensions.StringExtensions.Html)
-Reset event used to ensure that the work is finished
+HTML encodes the string
```csharp
-private readonly AutoResetEvent resetEvent
+public static string HtmlEncode(this string str)
```
-Field value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6295,23 +3003,24 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BackgroundWorkerWithSyncCancel.IsCancelling Property ##
-Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
+## StringExtensions.LastPart(string, string) Method ##
+Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
Assembly: net.adamec.lib.common
-Type: [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo)
-Sources: utils\BackgroundWorkerWithSyncCancel.cs
-Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
+Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
+Sources: extensions\StringExtensionsParts.cs
+Source-only packages: [RadCommons.extensions.StringExtensions.Parts](#src-only-package--RadCommons.extensions.StringExtensions.Parts)
-Flag whether the worker is cancelling
+Returns the part of the string after the last occurence of the separator The result is always trimmed
```csharp
-public bool IsCancelling { get; }
+public static string LastPart(this string input, string separator)
```
-Property value
Part of the string after the last occurence of the separator or the input string when no separator detected
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6320,23 +3029,24 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BackgroundWorkerWithSyncCancel.Cancel() Method ##
-Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
+## StringExtensions.SplitByFirstSpace(string, string) Method ##
+Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
Assembly: net.adamec.lib.common
-Type: [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo)
-Sources: utils\BackgroundWorkerWithSyncCancel.cs
-Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
+Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
+Sources: extensions\StringExtensionsParts.cs
+Source-only packages: [RadCommons.extensions.StringExtensions.Parts](#src-only-package--RadCommons.extensions.StringExtensions.Parts)
-Requests cancellation of a pending background operation and wait for cancel to complete
+Splits the string by first space and returns the "before" part. The "after" part is provided in output parameter rest Both result and rest are trimmed
```csharp
-public void Cancel()
+public static string SplitByFirstSpace(this string input, out string rest)
```
-Return value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6371,73 +3081,56 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BaseDisposable Class ##
-Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
+## StringExtensions.TrimAndMergeLines(string) Method ##
+Namespace: [net.adamec.lib.common.extensions](#n-net.adamec.lib.common.extensions__1vwuhoq)
Assembly: net.adamec.lib.common
-Sources: utils\BaseDisposable.cs
-Source-only packages: [RadCommons.utils.BaseDisposable](#src-only-package--RadCommons.utils.BaseDisposable)
+Type: [StringExtensions](#t-net.adamec.lib.common.extensions.stringextensions__y7rgbb)
+Sources: extensions\StringExtensionsWhitespace.cs
+Source-only packages: [RadCommons.extensions.StringExtensions.Whitespace](#src-only-package--RadCommons.extensions.StringExtensions.Whitespace)
-Helper class for implementation of System.IDisposable types
+"Full" trim of the string - the lines within the string are trimmed and then the lines are merged with the space as a separator (instead of the line break)
```csharp
-public abstract class BaseDisposable : IDisposable
+public static string TrimAndMergeLines(this string str)
```
-Inheritance: object
-Derived: [net.adamec.lib.common.utils.Context<TState>](#t-net.adamec.lib.common.utils.context-1__15rsz3v), [net.adamec.lib.common.utils.Disposer](#t-net.adamec.lib.common.utils.disposer__1ejr99q), [net.adamec.lib.common.utils.Scope<TState>](#t-net.adamec.lib.common.utils.scope-1__eepqvi)
-Implements: IDisposable
+Method parameters
+
+### Delegates ###
+
+ | Name | Modifier | Summary |
+ | ------ | ---------- | --------- |
+ | [ProcessEventHandler](#t-net.adamec.lib.common.utils.processeventhandler__8h5v6w) | public | A ProcessEventHandler is a delegate for process output events. |
+
+
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6498,56 +3217,54 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BaseDisposable.Disposed Property ##
+## BackgroundWorkerWithSyncCancel Class ##
Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
Assembly: net.adamec.lib.common
-Type: [BaseDisposable](#t-net.adamec.lib.common.utils.basedisposable__7s72ps)
-Sources: utils\BaseDisposable.cs
-Source-only packages: [RadCommons.utils.BaseDisposable](#src-only-package--RadCommons.utils.BaseDisposable)
+Sources: utils\BackgroundWorkerWithSyncCancel.cs
+Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
-Returns
-```csharp
-true
-```
- when the object is fully disposed
+Executes an operation on a separate thread with possibility of sync cancel.
```csharp
-public bool Disposed { get; }
+public class BackgroundWorkerWithSyncCancel : BackgroundWorker
```
-Property value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6585,47 +3298,48 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BaseDisposable.~BaseDisposable() Destructor ##
+## BackgroundWorkerWithSyncCancel.isRunningInternal Field ##
Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
Assembly: net.adamec.lib.common
-Type: [BaseDisposable](#t-net.adamec.lib.common.utils.basedisposable__7s72ps)
-Sources: utils\BaseDisposable.cs
-Source-only packages: [RadCommons.utils.BaseDisposable](#src-only-package--RadCommons.utils.BaseDisposable)
+Type: [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo)
+Sources: utils\BackgroundWorkerWithSyncCancel.cs
+Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
+
+
+Internal flag whether the worker is running its DoWork action
```csharp
- ~BaseDisposable()
+private bool isRunningInternal
```
+Field value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6634,23 +3348,23 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BaseDisposable.Dispose() Method ##
+## BackgroundWorkerWithSyncCancel.resetEvent Field ##
Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
Assembly: net.adamec.lib.common
-Type: [BaseDisposable](#t-net.adamec.lib.common.utils.basedisposable__7s72ps)
-Sources: utils\BaseDisposable.cs
-Source-only packages: [RadCommons.utils.BaseDisposable](#src-only-package--RadCommons.utils.BaseDisposable)
+Type: [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo)
+Sources: utils\BackgroundWorkerWithSyncCancel.cs
+Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
-Dispose the object
+Reset event used to ensure that the work is finished
```csharp
-public void Dispose()
+private readonly AutoResetEvent resetEvent
```
-Return value
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -6685,20 +3398,20 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## BaseDisposable.DisposeManaged() Method ##
+## BackgroundWorkerWithSyncCancel.Cancel() Method ##
Namespace: [net.adamec.lib.common.utils](#n-net.adamec.lib.common.utils__7vdji9)
Assembly: net.adamec.lib.common
-Type: [BaseDisposable](#t-net.adamec.lib.common.utils.basedisposable__7s72ps)
-Sources: utils\BaseDisposable.cs
-Source-only packages: [RadCommons.utils.BaseDisposable](#src-only-package--RadCommons.utils.BaseDisposable)
+Type: [BackgroundWorkerWithSyncCancel](#t-net.adamec.lib.common.utils.backgroundworkerwithsynccancel__1hdlhvo)
+Sources: utils\BackgroundWorkerWithSyncCancel.cs
+Source-only packages: [RadCommons.utils.BackgroundWorkerWithSyncCancel](#src-only-package--RadCommons.utils.BackgroundWorkerWithSyncCancel)
-Dispose any disposable managed fields or properties.
+Requests cancellation of a pending background operation and wait for cancel to complete
```csharp
-protected virtual void DisposeManaged()
+public void Cancel()
```
Return value
Overrides: ComponentModel.BackgroundWorker.OnDoWork
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -7006,7 +3720,7 @@ internal class Context : BaseDisposable where TState: class, new()
```
Type parameters
TState
Type of the state object managed by the context
-Inheritance: object -> [net.adamec.lib.common.utils.BaseDisposable](#t-net.adamec.lib.common.utils.basedisposable__7s72ps)
+Inheritance: object -> net.adamec.lib.common.core.utils.BaseDisposable
Implements: IDisposable
@@ -7381,7 +4095,7 @@ Dispose any disposable managed objects - all disposables kept in [Disposer](#p-n
protected override void DisposeManaged()
```
-Return value
Overrides: utils.BaseDisposable.DisposeManaged
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -7405,7 +4119,7 @@ Keeps the stack of disposable objects, and disposes them when the disposer is be
internal class Disposer : BaseDisposable
```
-Inheritance: object -> [net.adamec.lib.common.utils.BaseDisposable](#t-net.adamec.lib.common.utils.basedisposable__7s72ps)
+Inheritance: object -> net.adamec.lib.common.core.utils.BaseDisposable
Implements: IDisposable
@@ -7532,7 +4246,7 @@ protected override void Dispose(bool disposing)
```
Method parameters
Overrides: utils.BaseDisposable.DisposeManaged
Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
@@ -9942,10 +6656,7 @@ Declaring file: async\AsyncManager.cs
Helpers for running the async tasks in sync mode and executing sync actions in async mode (Source only package).
-Usings
Default exception handler for [RunAsync(Action, Action<System.Exception>)](#m-net.adamec.lib.common.async.asyncmanager.runasync_system.action-system.action_system.exception____s187qk) . Catches and logs all exceptions during the task execution.
Dispatches a synchronous message to a synchronization context. Always throws System.NotSupportedException as it's not supported in [AsyncManager.ExclusiveSynchronizationContext](#t-net.adamec.lib.common.async.asyncmanager.exclusivesynchronizationcontext__jzepyu)
Default exception handler for [RunAsync(Action, Action<System.Exception>)](#m-net.adamec.lib.common.async.asyncmanager.runasync_system.action-system.action_system.exception____s187qk) . Catches all exceptions during the task execution.
Dispatches a synchronous message to a synchronization context. Always throws System.NotSupportedException as it's not supported in [AsyncManager.ExclusiveSynchronizationContext](#t-net.adamec.lib.common.async.asyncmanager.exclusivesynchronizationcontext__jzepyu)
@@ -9978,47 +6689,6 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## RadCommons.config.Configuration Source only package ##
-Tags: RadCommons source-only configuration
-Includes: None
-Declaring file: config\Configuration.cs
-
-
-Simple configuration container in case DI with more sophisticated containers is not used. Supports the JSON config files, command line arguments
- and environment variables as sources and their hierarchy/overrides. The configuration can be used as key-value pairs or bound to objects (Source only package).
-
-
-Usings
-
-
-### Remarks ###
-This is the simple configuration container in case DI with more sophisticated containers is not used The configuration is stored as the key-value dictionary, supporting hierarchy using the dot separator and arrays.The arrays can contain values or another objects. Actually, mixed arrays of values and objects can be stored, but they are not supported for binding. For example `section1.option1` means the option1 available in section1, `section1.subSection2.option1` means the option1 available in section1.subSection2. `section1.option1[0]` means, that the option1 is array of values or objects (sections) within the section1. For arrays, the keys are like `OtherSection.SimpleArray[0]` or `OtherSection.ComplexObjectArray[0].Name`
-
- [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) class provides a singleton instance, however the key functionality is provided via static functions, so no need to touch the [Instance](#p-net.adamec.lib.common.config.configuration.instance__131avv7) at all. The items can be retrieved by key using the [Get(string)](#m-net.adamec.lib.common.config.configuration.get_system.string___8ykaxa) and [Get<TValueType>(string, Configuration.TValueType)](#m-net.adamec.lib.common.config.configuration.get--1_system.string---0___1dcpnhz) methods. The first one returns null when the key is not found, the other one allow to define the default value to be returned, when the item is not found.
-
- The inner class [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj) provides the methods to build the configuration from JSON config files, commandline arguments, environment values and/or direct entries. The static method [Builder()](#m-net.adamec.lib.common.config.configuration.builder__700lxw) clears the configuration items and binding cache and creates a new instance of [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj) allowing to build a configuration from scratch. The configuration is updated directly during the calls to builder methods, the existing items (keys) are updated, so it's possible to manage the priority of individual sources and the overrides if needed. The method [Build()](#m-net.adamec.lib.common.config.configuration.configurationbuilder.build__bwvls6) returns the configuration instance, breaking the fluent design of builder methods, however there is no other functionality within the method, so it's more the convention than need to use it at the end of configuration build.
-
- Configuration binding it the way, how to access the configuration using the configuration objects instead of querying the individual items by key. When the method [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.config.configuration.bind--1_system.string-system.boolean___16p0943) is used, it creates a new instance of given type and tries to map the public properties with public setter to the keys (using the "dot notation") within the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) . It's possible to bind the object to to the root of the configuration to provide the whole configuration at once or bind it to the particular section to provide a configuration sub-tree. In general, the nested objects and both value and object arrays are supported. There are some rules when binding the arrays: The index must start with zero and must be in sequence (the first non-existing index stops the evaluation). The array should not mix the array or values and array of objects. The decision is made at the first item (index=0) whether it's value or object.
-
- The implementation of binding treats the System.Boolean values the special way - if there is no value, but existing key, the value is converted to true. This is useful when the command line arguments are used like flags. For example having the argument `-p:SkipStep1` and prefix `-p:` , the binding a bool property `SkipStep1` will set the value of the property to `true` (doesn't change the configuration item itself). Of course, it's still possible to use the syntax `-p:SkipStep1=true` or `-p:SkipStep1=false` even in this case.
-
- As the binding uses the reflection, it's quite expensive operation, so by default, the bound objects are cached (the cache key is the type of bound object, so binding the same type to different sections is not recommended ). It's possible to force the binding using the parameter of [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.config.configuration.bind--1_system.string-system.boolean___16p0943) method. In general, the recommended pattern is to [Bind<TOptionsContainer>(string, bool)](#m-net.adamec.lib.common.config.configuration.bind--1_system.string-system.boolean___16p0943) the configuration object after the configuration is built and then [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.config.configuration.retrieve--1__1xuxip8) it from the cache when needed.
-
-
-
-
-Package members
Gets the typed configuration item by key . Returns the default value, that can be provided or is default to given TValueType The function tries to convert the value to TValueType using System.Convert.ChangeType(System.Object,System.Type) if the conversion is not successful, the default is returned.
Binds the configuration to given TOptionsContainer type and returns the bound object of such type. The resulting configuration object is stored to the cache and can be later on retrieved using [Retrieve<TOptionsContainer>()](#m-net.adamec.lib.common.config.configuration.retrieve--1__1xuxip8)
Retrieves the configuration object of given TOptionsContainer that has been bound and cached before. The new instance of TOptionsContainer is created when the type not found in cache
Gets the configuration sub-tree that belongs to given section. The keys returned are relative to given section! When the section is not provided, the whole configuration tree is returned.
Tries to convert sourceValue to targetType . The converted values is returned in targetValue out parameter, the result of conversion is the function return value.
Clears the configuration items and binding cache and creates a new instance of [Configuration.ConfigurationBuilder](#t-net.adamec.lib.common.config.configuration.configurationbuilder__13eawwj)
Adds all environment variables into the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) . When a configuration item exists, the value is updated.
Adds the command line arguments starting with prefixes into the [Configuration](#t-net.adamec.lib.common.config.configuration__1md5nwk) . When a configuration item exists, the value is updated.
Loads the configuration items from JSON file, keeping the hierarchy of JSON objects (and arrays) When a configuration item exists, the value is updated.
-
-
-Sources
config\Configuration.cs
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
## RadCommons.di.Component Source only package ##
Tags: RadCommons source-only RadCommons-DI dependency-injection components
Includes: Folder
@@ -10028,9 +6698,6 @@ Declaring file: di\component\_SourceOnlyPackage.cs
RadCommons DI Component - allows to mark and inject the component using the class attributes (Source only package).
-Usings
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
Creates and registers the singleton of configuration (options) class of given type This is to be used if not registered using the [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2)
Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
Gets the instance of the options (configuration) class from pocoProvider , binds (fills) it to the configuration and registers is as singleton into MS DI.
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Class attribute allowing the auto registration of options class into .NET Core configuration framework and optional direct registration of singleton instance into MS DI
Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
Creates and registers the singletons of configuration (options) classes with AutoOptions attribute marked for RegisteredDirect. This is to be used if not registered via MS ServiceCollection extensions
Creates and registers the singleton of configuration (options) class of given type This is to be used if not registered using the [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2)
Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
Scans given assemblies for classes marked with [AutoOptionsAttribute](#t-net.adamec.lib.common.di.config.autooptionsattribute__19ezdz2) and binds them to appsettings.json configuration section defined in attribute. Optionally (if defined in attribute), an instance or the configuration class can be created and registered as singleton into MS DI
Gets the instance of the options (configuration) class from pocoProvider , binds (fills) it to the configuration and registers is as singleton into MS DI.
@@ -10082,13 +6749,13 @@ Declaring file: di\postinit\_SourceOnlyPackage.cs
RadCommons DI PostInit - allows to run post init method of component (Source only package).
-Usings
Allows to run post init method of component. Component must be registered using the Component attribute as singleton in root scope and must register self Parameters of "marked" post init method are resolved from container (throws an exception on failure)
Allows to run post init method of component. Component must be registered using the Component attribute as singleton in root scope and must register self Parameters of "marked" post init method are resolved from container (throws an exception on failure)
Sources
di\postinit\_SourceOnlyPackage.cs
di\postinit\ContainerBuilderExtensions.cs
di\postinit\PostInitAttribute.cs
@@ -10310,100 +6977,6 @@ Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adame
-## RadCommons.logging.CommonLogging Source only package ##
-Tags: RadCommons source-only logging NLog
-Includes: Folder
-Declaring file: logging\_SourceOnlyPackage.cs
-
-
-RadCommons logging wrapper around NLog with some extended functionality (Source only package).
-
-
-References needed
NLog
-
-
-### Remarks ###
-The NLog supports having additional (custom) event properties provided to loggers and optionally rendered to logs. The event properties are represented as key-value dictionary, where key is the unique name of the property. Extended logger provides following methods to log with given set of the properties.
-
-
-
-
- - [Trace(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.trace_system.collections.generic.dictionary_system.string-system.object_-system.string___15kc02k) ,
- - [Debug(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.debug_system.collections.generic.dictionary_system.string-system.object_-system.string___jxdraq) ,
- - [Info(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.info_system.collections.generic.dictionary_system.string-system.object_-system.string___1kbhewr) ,
- - [Warn(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.string___1hy0rp3) ,
- - [Error(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.string___kfa9gl) ,
- - [Fatal(Dictionary<string,object>, string)](#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.string___1yxmkzz) ,
- - [Warn(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.warn_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___10z37vj) ,
- - [Error(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.error_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___1watp5d) and
- - [Fatal(Dictionary<string,object>, Exception, string)](#m-net.adamec.lib.common.logging.ilogger.fatal_system.collections.generic.dictionary_system.string-system.object_-system.exception-system.string___175gumn)
-
-
-
-
-
- Sometimes, it's useful to have an exception logging method implemented as the operation returning the exception being logged. The [ErrorPassThrough(Exception, string)](#m-net.adamec.lib.common.logging.ilogger.errorpassthrough_system.exception-system.string___1vc33gk) and [FatalPassThrough(Exception, string)](#m-net.adamec.lib.common.logging.ilogger.fatalpassthrough_system.exception-system.string___1fx8xs8) methods will log given exception and return it for further processing.
-```csharp
- try
- {
- ...
- }
- catch (Exception ex){
- if(logger.ErrorPassThrough(ex) is MyException){
- return null;
- }else{
- throw;
- }
- }
-```
- In the example above, the exception is always logged and then the decision/action is taken.
-
- C# 6 brought the exception filters that don't unwind the stack as the exception is not catch yet when processing the filter. It can also be used for logging the exceptions without actually catching them (when the exception filter returns `false` ). Extended logger provides functions [ErrorFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.errorfltr--1_--0-system.string-system.boolean___135nosm) and [FatalFltr<TException>(ILogger.TException, string, bool)](#m-net.adamec.lib.common.logging.ilogger.fatalfltr--1_--0-system.string-system.boolean___1av7ixa) for this purpose.
-```csharp
- try
- {
- ...
- }
- catch (Exception ex) when (logger.ErrorFltr(ex,"Error here!"){
- //newer called as the default return value of ErrorFltr is false
- }
-```
- The example above logs but never catch all exceptions. The following code catch and log the ArgumentException and logs any other exception without catching it.
-```csharp
- try
- {
- ...
- }
- catch (ArgumentException e) when (Logger.ErrorFltr(e,catchIt:true)) { ... }
- catch (Exception e) when (Logger.FatalFltr(e)) {}
-```
-
-
- Logger can also create and exception, log it and return using functions [Error<TException>(string, Exception)](#m-net.adamec.lib.common.logging.ilogger.error--1_system.string-system.exception___pmrssh) and [Fatal<TException>(string, Exception)](#m-net.adamec.lib.common.logging.ilogger.fatal--1_system.string-system.exception___x5u73)
-```csharp
- if(value is null) throw logger.Fatal("Value is null");
-```
-
-
- When logging an exception using the [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2) methods, the event property `StackTrace` is set from System.Exception.StackTrace , when the logger creates an exception, the property is set using `new StackTrace(2, true).ToString()` . In other cases when the System.Exception.StackTrace is null or empty, `new StackTrace(true).ToString()` is used.
-
- [LoggerExt](#t-net.adamec.lib.common.logging.loggerext__ac9km2) also provides set of methods for logging with the correlation ID (for example in integration scenarios), where the given correlation ID is set to the event property `CorrelationId` . Such methods have the name ending with `Corr` suffix.
-
-
-
-
-Package members
-
-
-Go to [namespaces](net.adamec.lib.common.md#namespace-list) or [types](net.adamec.lib.common.md#type-list) or [source-only packages](net.adamec.lib.common.md#package-list)
-
-
-
-
-
## RadCommons.utils.ConsoleUtils Source only package ##
Tags: RadCommons source-only console
Includes: None
@@ -10497,7 +7037,10 @@ The runtime "container" for context operations. The context can be both state-l
(Source only package).
-Usings
### Remarks ###
@@ -10531,7 +7074,7 @@ Declaring file: utils\Disposer.cs
Keeps the stack of disposable objects, and disposes them when the disposer is being disposed. (Source only package).
-Usings