Convert to new Core 3.0 using declarations

This commit is contained in:
Robert McRackan 2019-10-08 08:54:12 -04:00
parent b0fec23a51
commit 1b6c577044
20 changed files with 324 additions and 381 deletions

View file

@ -11,12 +11,12 @@ namespace LibationWinForm.BookLiberation
{
async Task BackupBookAsync(string productId)
{
LibraryBook libraryBook;
using (var context = LibationContext.Create())
libraryBook = context
.Library
.GetLibrary()
.SingleOrDefault(lb => lb.Book.AudibleProductId == productId);
using var context = LibationContext.Create();
var libraryBook = context
.Library
.GetLibrary()
.SingleOrDefault(lb => lb.Book.AudibleProductId == productId);
if (libraryBook == null)
return;

View file

@ -25,9 +25,8 @@ namespace LibationWinForm
public async Task DoMainWorkAsync()
{
List<FileInfo> jsonFilepaths;
using (var pageRetriever = websiteProcessorControl1.GetPageRetriever())
jsonFilepaths = await DownloadLibrary.DownloadLibraryAsync(pageRetriever).ConfigureAwait(false);
using var pageRetriever = websiteProcessorControl1.GetPageRetriever();
var jsonFilepaths = await DownloadLibrary.DownloadLibraryAsync(pageRetriever).ConfigureAwait(false);
successMessages.Add($"Downloaded {"library page".PluralizeWithCount(jsonFilepaths.Count)}");