FileSystemResourceHandler Class

FileSystemResourceHandler class

This class is an implementation of the ResourceHandler class designed to save resources to the local file system.

public class FileSystemResourceHandler : ResourceHandler

Constructors

NameDescription
FileSystemResourceHandler(string)Initializes a new instance of the FileSystemResourceHandler class.
FileSystemResourceHandler(Url)Initializes a new instance of the FileSystemResourceHandler class.

Methods

NameDescription
override HandleResource(Resource, ResourceHandlingContext)This method is responsible for handling the resource. In it you can save the Resource to the stream or embed it into the parent resource.
override HandleResourceAsync(Resource, ResourceHandlingContext, CancellationToken)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.
virtual HandleResourceReference(Resource, ResourceHandlingContext)This method is responsible for handling the resource reference. In this method, you can set what the reference to the resource being handled will look like.

See Also