Class DirectoryOperation
- Namespace
- ZeroInstall.Store.Deployment
- Assembly
- ZeroInstall.Store.dll
Common base class for deployment operations that operate on directories with Manifests.
[MustDisposeResource]
public abstract class DirectoryOperation : StagedOperation, IDisposable
- Inheritance
-
DirectoryOperation
- Implements
- Derived
- Inherited Members
Constructors
DirectoryOperation(string, Manifest, ITaskHandler)
Common base class for deployment operations that operate on directories with Manifests.
protected DirectoryOperation(string path, Manifest manifest, ITaskHandler handler)
Parameters
path
stringThe path of the directory to operate on.
manifest
ManifestThe contents of a <see cref="Manifests.Manifest"/> file describing the directory.
handler
ITaskHandlerA callback object used when the user needs to be asked questions or informed about IO tasks.
Fields
Handler
A callback object used when the user needs to be asked questions or informed about IO tasks.
protected readonly ITaskHandler Handler
Field Value
Manifest
The contents of a Manifest file describing the directory.
protected readonly Manifest Manifest
Field Value
Path
The path of the directory to operate on.
protected readonly string Path
Field Value
Properties
NoRestart
Indicates that applications shut down by the WindowsRestartManager shall not be restarted on Dispose().
public bool NoRestart { get; set; }
Property Value
Methods
Dispose()
Performs a rollback of all changes made by Stage() if Commit() has not been called and completed yet.
public override void Dispose()
Randomize(string)
Appends a random string to a file path.
protected static string Randomize(string path)
Parameters
path
string
Returns
UnlockFiles(IEnumerable<string>)
Uses WindowsRestartManager to close any applications that have open references to the specified files
if possible and removes read-only attributes.
protected void UnlockFiles(IEnumerable<string> files)
Parameters
files
IEnumerable<string>
Remarks
Closed applications will be restarted by Dispose().