diff --git a/windows/CodePushUtils.cs b/windows/CodePushUtils.cs index 23b2e60..89964ff 100644 --- a/windows/CodePushUtils.cs +++ b/windows/CodePushUtils.cs @@ -10,7 +10,7 @@ namespace CodePush.ReactNative { internal class CodePushUtils { - internal async static Task GetJObjectFromFile(StorageFile file) + internal async static Task GetJObjectFromFileAsync(StorageFile file) { string jsonString = await FileIO.ReadTextAsync(file); if (jsonString.Length == 0) diff --git a/windows/FileUtils.cs b/windows/FileUtils.cs index ec7313b..3543999 100644 --- a/windows/FileUtils.cs +++ b/windows/FileUtils.cs @@ -6,7 +6,7 @@ namespace CodePush.ReactNative { internal class FileUtils { - internal async static Task MergeFolders(StorageFolder source, StorageFolder target) + internal async static Task MergeFoldersAsync(StorageFolder source, StorageFolder target) { foreach (StorageFile sourceFile in await source.GetFilesAsync()) { @@ -16,7 +16,7 @@ namespace CodePush.ReactNative foreach (StorageFolder sourceDirectory in await source.GetFoldersAsync()) { StorageFolder nextTargetSubDir = await target.CreateFolderAsync(sourceDirectory.Name, CreationCollisionOption.OpenIfExists); - await MergeFolders(sourceDirectory, nextTargetSubDir); + await MergeFoldersAsync(sourceDirectory, nextTargetSubDir); } } } diff --git a/windows/UpdateManager.cs b/windows/UpdateManager.cs index 069289b..a72c043 100644 --- a/windows/UpdateManager.cs +++ b/windows/UpdateManager.cs @@ -67,16 +67,16 @@ namespace CodePush.ReactNative throw new InvalidDataException("Received a diff update, but there is no current version to diff against."); } - await UpdateUtils.CopyNecessaryFilesFromCurrentPackage(diffManifestFile, currentPackageFolder, newUpdateFolder); + await UpdateUtils.CopyNecessaryFilesFromCurrentPackageAsync(diffManifestFile, currentPackageFolder, newUpdateFolder); await diffManifestFile.DeleteAsync(); } - await FileUtils.MergeFolders(unzippedFolder, newUpdateFolder); + await FileUtils.MergeFoldersAsync(unzippedFolder, newUpdateFolder); await unzippedFolder.DeleteAsync(); // For zip updates, we need to find the relative path to the jsBundle and save it in the // metadata so that we can find and run it easily the next time. - string relativeBundlePath = await UpdateUtils.FindJSBundleInUpdateContents(newUpdateFolder, expectedBundleFileName); + string relativeBundlePath = await UpdateUtils.FindJSBundleInUpdateContentsAsync(newUpdateFolder, expectedBundleFileName); if (relativeBundlePath == null) { throw new InvalidDataException("Update is invalid - A JS bundle file named \"" + expectedBundleFileName + "\" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary."); @@ -149,7 +149,7 @@ namespace CodePush.ReactNative try { StorageFile packageFile = await packageFolder.GetFileAsync(CodePushConstants.PackageFileName); - return await CodePushUtils.GetJObjectFromFile(packageFile); + return await CodePushUtils.GetJObjectFromFileAsync(packageFile); } catch (IOException) { @@ -258,7 +258,7 @@ namespace CodePush.ReactNative private async Task GetCurrentPackageInfoAsync() { StorageFile statusFile = await GetStatusFileAsync(); - return await CodePushUtils.GetJObjectFromFile(statusFile); + return await CodePushUtils.GetJObjectFromFileAsync(statusFile); } private async Task GetDownloadFileAsync() diff --git a/windows/UpdateUtils.cs b/windows/UpdateUtils.cs index 026febf..35bf446 100644 --- a/windows/UpdateUtils.cs +++ b/windows/UpdateUtils.cs @@ -8,10 +8,10 @@ namespace CodePush.ReactNative { internal class UpdateUtils { - internal async static Task CopyNecessaryFilesFromCurrentPackage(StorageFile diffManifestFile, StorageFolder currentPackageFolder, StorageFolder newPackageFolder) + internal async static Task CopyNecessaryFilesFromCurrentPackageAsync(StorageFile diffManifestFile, StorageFolder currentPackageFolder, StorageFolder newPackageFolder) { - await FileUtils.MergeFolders(currentPackageFolder, newPackageFolder); - JObject diffManifest = await CodePushUtils.GetJObjectFromFile(diffManifestFile); + await FileUtils.MergeFoldersAsync(currentPackageFolder, newPackageFolder); + JObject diffManifest = await CodePushUtils.GetJObjectFromFileAsync(diffManifestFile); var deletedFiles = (JArray)diffManifest["deletedFiles"]; foreach (string fileNameToDelete in deletedFiles) { @@ -20,7 +20,7 @@ namespace CodePush.ReactNative } } - internal async static Task FindJSBundleInUpdateContents(StorageFolder updateFolder, string expectedFileName) + internal async static Task FindJSBundleInUpdateContentsAsync(StorageFolder updateFolder, string expectedFileName) { foreach (StorageFile file in await updateFolder.GetFilesAsync()) { @@ -33,7 +33,7 @@ namespace CodePush.ReactNative foreach (StorageFolder folder in await updateFolder.GetFoldersAsync()) { - string mainBundlePathInSubFolder = await FindJSBundleInUpdateContents(folder, expectedFileName); + string mainBundlePathInSubFolder = await FindJSBundleInUpdateContentsAsync(folder, expectedFileName); if (mainBundlePathInSubFolder != null) { return Path.Combine(folder.Name, mainBundlePathInSubFolder);