using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyDevCore.Configuration
{
///
///
///
///
public class SubstitutingConfigurationSource : IConfigurationSource
{
///
/// The configuration root
///
private readonly IConfigurationRoot _configurationRoot;
///
/// The constant section
///
private readonly string _variablesSection;
///
/// Initializes a new instance of the class.
///
/// The configuration root.
/// The variables section.
public SubstitutingConfigurationSource(IConfigurationRoot configurationRoot, string variablesSection)
{
_configurationRoot = configurationRoot;
_variablesSection = variablesSection;
}
///
/// Builds the for this source.
///
/// The .
///
/// An
///
public IConfigurationProvider Build(IConfigurationBuilder builder)
{
return new SubstitutingConfigurationProvider(_configurationRoot, _variablesSection);
}
}
}