public async Task <IConfiguration> Read() { var config = new DefaultConfiguration(); await _fileLogic.Load(async stream => { using (var reader = new StreamReader(stream)) { var line = String.Empty; while (!String.IsNullOrEmpty(line = await reader.ReadLineAsync())) { var idx = line.IndexOf('='); if (idx >= 0) { var key = line.Substring(0, idx).Trim(); var value = line.Substring(idx + 1).Trim(); config.Add(key, value); } } } }); return(config); }