public T GetFromFile <T>(string fileName, params string[] subDirs) { fileName = fileName.EndsWith(".yml") ? fileName : $"{fileName}.yml"; var path = new List <string> { _configFolderPath }; path.AddRange(subDirs); var folderPath = Path.Combine(path.ToArray()); var filePath = _folderProvider.GetPathOfFile(folderPath, fileName); var stringData = _fileManager.GetData(filePath); return(_configManager.Deserialize <T>(stringData)); }