![]() | CopyFileManager Class |
Namespace: Novacta.Transactions.IO
The CopyFileManager type exposes the following members.
Name | Description | |
---|---|---|
![]() | CopyFileManager |
Initializes a new instance of the CopyFileManager class.
|
Name | Description | |
---|---|---|
![]() | CanOverwrite |
Gets a value indicating whether this
CreateFileManager is
authorized to overwrite the managed file.
(Inherited from CreateFileManager.) |
![]() | FileAlreadyExists |
Gets a value indicating whether the managed file already exists
at the time of transaction preparation.
(Inherited from CreateFileManager.) |
![]() | ManagedFileStream |
Provides the stream for the managed file.
(Inherited from FileManager.) |
Name | Description | |
---|---|---|
![]() | Commit |
Notifies an enlisted object that a transaction is being committed.
(Inherited from FileManager.) |
![]() | Dispose |
Performs application-defined tasks associated with freeing,
releasing, or resetting unmanaged resources.
(Inherited from FileManager.) |
![]() | EnlistVolatile |
Enlists this instance as a volatile resource
manager using the specified enlistment
options.
(Inherited from FileManager.) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InDoubt |
Notifies an enlisted object that the status of a transaction is
in doubt.
(Inherited from FileManager.) |
![]() | Prepare |
Notifies an enlisted object that a transaction is being prepared
for commitment.
(Inherited from FileManager.) |
![]() | Rollback |
Notifies an enlisted object that a transaction is being rolled
back (aborted).
(Inherited from FileManager.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
A CopyFileManager instance can be created with or without the ability of overwriting the managed destination file. This ability is signaled be the value returned by its property CanOverwrite. When an instance is notified that a transaction is being prepared for commitment, it checks if a file having the specified path already exists. In such case, if CanOverwrite returns false, the operation cannot be executed and the transaction is forced to roll back. This also happens if the manager cannot read the content of the source file.