Beispiel #1
0
        public T Map <T>(string sectionName = null)
        {
            var strategy = _strategyManager.GetStrategyFor <T>();
            var section  = string.IsNullOrWhiteSpace(sectionName)
                ? _sectionProvider.GetSection <T>(strategy) : _sectionProvider.GetSection <T>(sectionName);

            return((T)Map(typeof(T), section, strategy));
        }
        public T Map <T>(string sectionName = null, string configFilePath = null)
        {
            var strategy = _strategyManager.GetStrategyFor <T>();
            var section  = string.IsNullOrWhiteSpace(sectionName)
                ? _sectionProvider.GetSection <T>(strategy, configFilePath)
                : _sectionProvider.GetSection <T>(sectionName, configFilePath);

            return((T)Map(typeof(T), (XElement)section, strategy));
        }