using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;

using ServiceInterfaces;

namespace UI
{
    public class ApplicationSettings : ISettings
    {
        public string GetSetting(string key)
        {
            if(!ConfigurationManager.AppSettings.AllKeys.Contains(key))
            {
                throw new ApplicationException(string.Format("Nie znaleziono klucza: {0}", key));
            }
            return ConfigurationManager.AppSettings[key];
        }
    }
}
