FileSystemResourceHandler.HandleResourceAsync

FileSystemResourceHandler.HandleResourceAsync method

This method is responsible for handling the resource asynchronously when the document is saved with a SaveAsync method. The resource is serialized to memory and written to the file system asynchronously as soon as it has been serialized; the main document is written once the whole document has been serialized.

public override Task HandleResourceAsync(Resource resource, ResourceHandlingContext context, 
    CancellationToken cancellationToken)
ParameterTypeDescription
resourceResourceThe Resource which will be handled.
contextResourceHandlingContextResource handling context.
cancellationTokenCancellationTokenThe cancellation token.

Return Value

A completed task: the files are queued with the save, which writes them and awaits them before it completes.

Exceptions

exceptioncondition
OperationCanceledExceptionOperation was cancelled.

See Also