Пример #1
0
 public async Task AddFeedAsync(string name, PodcastFeed feed)
 {
     _inMemory.Add(name, feed);
     using (var writer = File.AppendText(Path))
     {
         await writer.WriteLineAsync($"{name}{Seperator}{feed.Url.ToString()}");
     }
 }
Пример #2
0
        public Task <PodcastFeed> GetFeedAsync(string name)
        {
            PodcastFeed feed = null;

            if (_inMemory.ContainsKey(name))
            {
                feed = _inMemory[name];
            }

            return(Task.FromResult(feed));
        }