GetUserResourcesNoThrow() public méthode

public GetUserResourcesNoThrow ( bool useWellKnownUrl ) : Task
useWellKnownUrl bool
Résultat Task
 private static async Task<ServerResources> GetUserResources (CalDavDataAccess calDavDataAccess, CardDavDataAccess cardDavDataAccess)
 {
   var calDavResources = await calDavDataAccess.GetUserResourcesNoThrow (true);
   if (calDavResources.CalendarResources.Count == 0 && calDavResources.TaskListResources.Count == 0)
     calDavResources = await calDavDataAccess.GetUserResourcesNoThrow (false);
   var foundAddressBooks = await cardDavDataAccess.GetUserAddressBooksNoThrow (true);
   if (foundAddressBooks.Count == 0)
     foundAddressBooks = await cardDavDataAccess.GetUserAddressBooksNoThrow (false);
   return new ServerResources (calDavResources.CalendarResources, foundAddressBooks, calDavResources.TaskListResources);
 }
    public async Task<ServerResources> GetServerResources (NetworkSettingsViewModel networkSettings, GeneralOptions generalOptions)
    {
      var trimmedUrl = CalenderUrl.Trim();
      var url = new Uri (trimmedUrl.EndsWith ("/") ? trimmedUrl : trimmedUrl + "/");

      var webDavClient = CreateWebDavClient (networkSettings, generalOptions);
      var calDavDataAccess = new CalDavDataAccess (url, webDavClient);
      var foundResources = await calDavDataAccess.GetUserResourcesNoThrow (false);

      var foundAddressBooks = new[] { new AddressBookData (new Uri ("googleApi://defaultAddressBook"), "Default AddressBook") };

      var service = await GoogleHttpClientFactory.LoginToGoogleTasksService (EmailAddress, SynchronizerFactory.CreateProxy (networkSettings.CreateProxyOptions()));
      var taskLists = await service.Tasklists.List().ExecuteAsync();
      var taskListsData = taskLists?.Items.Select (i => new TaskListData (i.Id, i.Title)).ToArray() ?? new TaskListData[] { };

      return new ServerResources (foundResources.CalendarResources, foundAddressBooks, taskListsData);
    }