public DeltaPatchAction(DirectoryPatcher directoryPatcher, string subPath, string patchSubPath, long patchSize, string hash) { DirectoryPatcher = directoryPatcher; SubPath = subPath; PatchSubPath = patchSubPath; Hash = hash; PatchSize = patchSize; }
public FullReplaceAction(DirectoryPatcher directoryPatcher, string subPath, string patchSubPath, bool needsBackup, long patchSize, string hash) { DirectoryPatcher = directoryPatcher; SubPath = subPath; PatchSubPath = patchSubPath; NeedsBackup = needsBackup; Hash = hash; PatchSize = patchSize; }
public async Task ApplyPatchFromFilesystem(string patchPath, string targetPath, string applicationDirPath, IProgress <DirectoryPatcherProgressReport> progress, CancellationToken cancellationToken, string instructionsHash) { var backupPath = CreateBackupPath(applicationDirPath); var tempPath = CreateTempPath(applicationDirPath); var patchSource = new FileSystemPatchSource(patchPath); var patcher = new DirectoryPatcher(new XdeltaPatcher(XdeltaPatchSystemFactory.Preferred), targetPath, backupPath, tempPath, patchSource); await patcher.ApplyPatchAsync(progress, cancellationToken, instructionsHash); }
public async Task ApplyPatchFromWebDownloadTask(UpdateServerEntry baseUrl, string targetPath, string applicationDirPath, IProgress <DirectoryPatcherProgressReport> progress, CancellationToken cancellationToken, string instructionsHash) { UpdateServer = baseUrl; var backupPath = CreateBackupPath(applicationDirPath); var downloadPath = CreateDownloadPath(applicationDirPath); var tempPath = CreateTempPath(applicationDirPath); using (var patchSource = new WebPatchSource(this, downloadPath)) { var patcher = new DirectoryPatcher(new XdeltaPatcher(XdeltaPatchSystemFactory.Preferred), targetPath, backupPath, tempPath, patchSource); await patcher.ApplyPatchAsync(progress, cancellationToken, instructionsHash); DirectoryEx.DeleteContents(downloadPath); DirectoryEx.DeleteContents(tempPath); // delete backup? } }
public RemoveAction(DirectoryPatcher directoryPatcher, string subPath, bool needsBackup) { DirectoryPatcher = directoryPatcher; SubPath = subPath; NeedsBackup = needsBackup; }
public ModifiedTimeReplaceAction(DirectoryPatcher directoryPatcher, string subPath, DateTime lastWriteTime) { DirectoryPatcher = directoryPatcher; SubPath = subPath; LastWriteTime = lastWriteTime; }