nosinovacao / name-sdk

A dependencies management library designed to expose and access dependencies information.
BSD 3-Clause "New" or "Revised" License
14 stars 4 forks source link

Add support for IConfigurationProvider in NAME.AspNetCore #33

Closed Symbianx closed 6 years ago

Symbianx commented 6 years ago

With Asp.Net Core, the standard behaviour for managing settings is with the use of the IConfigurationProvider.

The dependencies.json should support a new connectionstring Locator IConfigurationProvider which takes accepts the key element containing the name of the setting as described in the microsoft documentation (i.e. section:subsection:key).

The IConfigurationProvider class is in the Microsoft.Extensions.Configuration.Abstractions nuget package, since we don't want to add this dependency in the main NAME package we need to add an extension point in the DependenciesReader.ReadDependencies method that allows the caller to inject custom IConnectionStringProviders.

Furthermore NAMEAspNetCoreConfiguration should optionally take in the IConfigurationProvider and use the new extension point.

suvl commented 6 years ago

LGTM