Resource Class

Resource class

This class describes a resource and provides methods for processing it.

public class Resource

Properties

NameDescription
MimeType { get; }Returns the !:Html.MimeType of this resource. Can be null if the resource was not found.
OriginalReference { get; }Returns a string containing the original reference to this resource.
OriginalUrl { get; }Returns a URL indicating where this resource was located.
OutputUrl { get; set; }Gets or sets the URL indicating where the resource will be located after processing.
Status { get; }Returns the current status of the resource.

Methods

NameDescription
Embed(ResourceHandlingContext)Embeds this resource within its parent by encoding it as Base64. The encoding result will be written to OutputUrl.
Save(Stream, ResourceHandlingContext)Saves the resource to the provided stream.
WithOutputUrl(Url)Specifies the new URL indicating where the resource will be located after processing.

See Also