Class DeploymentUtilities
- Namespace
- The.Management
- Assembly
- Instagile.dll
public static class DeploymentUtilities
- Inheritance
-
DeploymentUtilities
- Inherited Members
Methods
ReconcileTargetDirectoryAsync(Deployment, IEnumerable<string>, string, HttpClient, Uri, ILogger, CancellationToken)
Deletes files and directories from targetDirectory that don't match the contents of sourceFiles, then looks for matching existing files from existingDirectories, then copies them into place while downloading and extracting any remaining files from the update server.
public static Task ReconcileTargetDirectoryAsync(Deployment sourceFiles, IEnumerable<string> existingDirectories, string targetDirectory, HttpClient httpClient, Uri baseAddress, ILogger logger, CancellationToken cancellationToken)
Parameters
sourceFilesDeploymentexistingDirectoriesIEnumerable<string>targetDirectorystringhttpClientHttpClientbaseAddressUriloggerILoggercancellationTokenCancellationToken
Returns
Remarks
Warning: everything in targetDirectory can be recursively deleted by this method. Make sure the path is correct.
Exceptions
- ArgumentException
Thrown when
targetDirectoryis empty or is a path root.
ReplaceFiles(string, string)
Delete the entire contents of targetDirectory and then recursively copy the contents of sourceDirectory to targetDirectory.
public static void ReplaceFiles(string sourceDirectory, string targetDirectory)
Parameters
WaitForExitAsync(Process, ILogger, CancellationToken)
Returns a task that completes when source has exited.
public static Task WaitForExitAsync(Process source, ILogger logger, CancellationToken cancellationToken)
Parameters
sourceProcessloggerILoggercancellationTokenCancellationToken