Class ResourceHandler
Namespace: Aspose.Html.Saving.ResourceHandlers
Assembly: Aspose.HTML.dll (25.2.0)
This class is responsible for handling resources. It provides methods that allow you to control what will be done with the Aspose.Html.Saving.Resource, as well as what reference will be written to the parent Aspose.Html.Saving.Resource.
[ComVisible(true)]
public abstract class ResourceHandler
Inheritance
Derived
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
ResourceHandler()
protected ResourceHandler()
Methods
HandleResource(Resource, ResourceHandlingContext)
This method is responsible for handling the resource. In it you can save the Aspose.Html.Saving.Resource to the stream or embed it into the parent resource.
public abstract void HandleResource(Resource resource, ResourceHandlingContext context)
Parameters
resource
Resource
The Aspose.Html.Saving.Resource which will be handled.
context
ResourceHandlingContext
Resource handling context.
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.
public virtual string HandleResourceReference(Resource resource, ResourceHandlingContext context)
Parameters
resource
Resource
The Aspose.Html.Saving.Resource which will be handled.
context
ResourceHandlingContext
Resource handling context.
Returns
A string that will be written to the parent resource and which represents a reference to the resource that is currently being handled.
Exceptions
Raised if Aspose.Html.Saving.Resource.OutputUrl is null and Aspose.Html.Saving.Resource.Status is Aspose.Html.Saving.ResourceStatus.Saved. Aspose.Html.Saving.Resource.OutputUrl should be specified for saved resource because otherwise it is impossible to specify the correct reference in the resources referencing this one.