Class JsonExtensions
Extension methods for registering a Tenduke.Core.Config.Json.JsonConfigurationProvider configuration provider with TendukeConfigurationBuilder.
public static class JsonExtensions
- Inheritance
-
JsonExtensions
- Inherited Members
Methods
AddJsonFile(AsyncTendukeConfigurationBuilder, string)
Adds an IConfigurationProvider that reads configuration items from a JSON file.
public static AsyncTendukeConfigurationBuilder AddJsonFile(this AsyncTendukeConfigurationBuilder builder, string filePath)
Parameters
builder
AsyncTendukeConfigurationBuilderThe AsyncTendukeConfigurationBuilder to add to.
filePath
stringName and path of file to add.
Returns
Exceptions
- ArgumentNullException
TendukeConfigurationBuilder or
filePath
wasnull
.- FileNotFoundException
filePath
was not found.
AddJsonFile(TendukeConfigurationBuilder, string)
Adds an IConfigurationProvider that reads configuration items from a JSON file.
public static TendukeConfigurationBuilder AddJsonFile(this TendukeConfigurationBuilder builder, string filePath)
Parameters
builder
TendukeConfigurationBuilderThe TendukeConfigurationBuilder to add to.
filePath
stringName and path of file to add.
Returns
Exceptions
- ArgumentNullException
TendukeConfigurationBuilder or
filePath
wasnull
.- FileNotFoundException
filePath
was not found.