Class DatabaseScramblingContext
- Namespace
- The.Components
- Assembly
- Instagile.dll
public sealed class DatabaseScramblingContext
- Inheritance
-
DatabaseScramblingContext
- Inherited Members
Fields
DocumentsEnabled
public readonly bool DocumentsEnabled
Field Value
Scrambler
Provides data scrambling functions
public readonly IScrambler Scrambler
Field Value
Methods
CopyFileAsync(FileProperty, FileProperty, CancellationToken)
Copy the contents of source into target. If the file has already been copied during the current scrambling run, it will be referenced again rather than being duplicated.
public Task CopyFileAsync(FileProperty source, FileProperty target, CancellationToken cancellationToken)
Parameters
sourceFilePropertyA file attribute in the unscrambled database.
targetFilePropertyA file attribute in the scrambled database.
cancellationTokenCancellationTokenA cancellation token.
Returns
Remarks
Automatically creates appropriate access rules in the target database.
CopyImageAsync(ImageProperty, ImageProperty, CancellationToken)
Copy the contents of source into target. If the image has already been copied during the current scrambling run, it will be referenced again rather than being duplicated.
public Task CopyImageAsync(ImageProperty source, ImageProperty target, CancellationToken cancellationToken)
Parameters
sourceImagePropertyAn image attribute in the unscrambled database.
targetImagePropertyAn image attribute in the scrambled database.
cancellationTokenCancellationTokenA cancellation token.
Returns
Remarks
Automatically creates appropriate access rules in the target database.
GetOrCreatePlaceholderFileAsync(string, string, CancellationToken)
Try to get a placeholder file with the given MIME type
public Task<FileDocument?> GetOrCreatePlaceholderFileAsync(string extension, string mimeType, CancellationToken cancellationToken)
Parameters
extensionstringmimeTypestringcancellationTokenCancellationToken
Returns
Remarks
May return null if creating documents is not possible.
GetOrCreatePlaceholderImageAsync(string, string, CancellationToken)
Try to get a placeholder image with the given MIME type
public Task<ImageDocument?> GetOrCreatePlaceholderImageAsync(string extension, string mimeType, CancellationToken cancellationToken)
Parameters
extensionstringmimeTypestringcancellationTokenCancellationToken
Returns
Remarks
May return null if creating documents is not possible.