private async Task <bool> UpdateCatalog(List <CatalogItem> catalog) { var request = new UpdateCatalogItemsRequest { CatalogVersion = defaultCatalog, Catalog = catalog }; if (token.IsCancellationRequested) { return(true); } var updateCatalogItemsTask = await PlayFabAdminAPI.UpdateCatalogItemsAsync(request); //updateCatalogItemsTask.Wait(); if (updateCatalogItemsTask.Error != null) { OutputPlayFabError("\tCatalog Upload Error: ", updateCatalogItemsTask.Error); return(false); } LogToFile("\tUploaded Catalog!", ConsoleColor.Green); return(true); }
private static bool UpdateCatalog(List <CatalogItem> catalog) { var request = new UpdateCatalogItemsRequest() { CatalogVersion = defaultCatalog, Catalog = catalog }; var updateCatalogItemsTask = PlayFabAdminAPI.UpdateCatalogItemsAsync(request); updateCatalogItemsTask.Wait(); if (updateCatalogItemsTask.Result.Error != null) { OutputPlayFabError("\tCatalog Upload Error: ", updateCatalogItemsTask.Result.Error); return(false); } LogToFile("\tUploaded Catalog!", ConsoleColor.Green); return(true); }
private async Task <bool> UpdateCatalogAsync(List <CatalogItem> catalog, CancellationToken token) { if (IsCancellationRequest(token)) { return(false); } var request = new UpdateCatalogItemsRequest { CatalogVersion = defaultCatalog, Catalog = catalog }; var updateCatalogItemsTask = await PlayFabAdminAPI.UpdateCatalogItemsAsync(request); if (updateCatalogItemsTask.Error != null) { OutputPlayFabError("\tCatalog Upload Error: ", updateCatalogItemsTask.Error); return(false); } LogToFile("\tUploaded Catalog!"); return(true); }