ResourceHandler Class

ResourceHandler class

This class is responsible for handling resources. It provides methods that allow you to control what will be done with the Resource, as well as what reference will be written to the parent Resource.

public abstract class ResourceHandler

Methods

NameDescription
abstract 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.
virtual HandleResourceAsync(Resource, ResourceHandlingContext, CancellationToken)This method is responsible for handling the resource asynchronously when the document is saved with a SaveAsync method. In it you can save the Resource to the stream or embed it into the parent resource, and then complete the work asynchronously, for example write the saved content to a remote storage.
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