Exemplo n.º 1
0
        public UserConfigModel LoadConfiguration(string filePath)
        {
            if (!File.Exists(filePath))
            {
                throw new ArgumentException("Failed to load Configuration\n" + nameof(filePath) + " - Does not exist");
            }

            UserConfigDataModel dataModel = _fileSystem.LoadUserConfig(filePath);
            var model = _mapper.Map <UserConfigModel>(dataModel);

            return(model);
        }
 public bool SaveUserConfig(string filename, UserConfigDataModel userConfig)
 {
     return(SaveConfig(filename, userConfig));
 }