ForExternalResources

ForExternalResources(CreatePageStream, CreateResourceStream, CreateResourceUrl)

Initializes an instance of the HtmlViewOptions class for rendering into HTML with external resources.

public static HtmlViewOptions ForExternalResources(CreatePageStream createPageStream, 
    CreateResourceStream createResourceStream, CreateResourceUrl createResourceUrl)
Parameter Type Description
createPageStream CreatePageStream The method that instantiates stream used to write output page data.
createResourceStream CreateResourceStream The method that releases stream created by createPageStream method.
createResourceUrl CreateResourceUrl The method that creates URL for HTML resource.

Return Value

New instance of the HtmlViewOptions class for rendering into HTML with external resources.

Exceptions

exception condition
ArgumentNullException Thrown when createPageStream is null.
ArgumentNullException Thrown when createResourceStream is null.
ArgumentNullException Thrown when createResourceUrl is null.

Remarks

For the code example, see the documentation.

See Also


ForExternalResources(CreatePageStream, CreateResourceStream, CreateResourceUrl, ReleasePageStream, ReleaseResourceStream)

Initializes an instance of the HtmlViewOptions class for rendering into HTML with external resources.

public static HtmlViewOptions ForExternalResources(CreatePageStream createPageStream, 
    CreateResourceStream createResourceStream, CreateResourceUrl createResourceUrl, 
    ReleasePageStream releasePageStream, ReleaseResourceStream releaseResourceStream)
Parameter Type Description
createPageStream CreatePageStream The method that instantiates stream used to write output page data.
createResourceStream CreateResourceStream The method that instantiates stream used to write output HTML resource data.
createResourceUrl CreateResourceUrl The method that creates URL for HTML resource.
releasePageStream ReleasePageStream The method that releases stream created by method assigned to delegate that passed to createPageStream parameter.
releaseResourceStream ReleaseResourceStream The method that releases stream created by method assigned to delegate that passed to createResourceStream parameter.

Return Value

New instance of the HtmlViewOptions class for rendering into HTML with external resources.

Exceptions

exception condition
ArgumentNullException Thrown when createPageStream is null.
ArgumentNullException Thrown when createResourceStream is null.
ArgumentNullException Thrown when createResourceUrl is null.
ArgumentNullException Thrown when releasePageStream is null.
ArgumentNullException Thrown when releaseResourceStream is null.

Remarks

For the code example, see the documentation.

See Also


ForExternalResources(IPageStreamFactory, IResourceStreamFactory)

Initializes an instance of the HtmlViewOptions class for rendering into HTML with external resources.

public static HtmlViewOptions ForExternalResources(IPageStreamFactory pageStreamFactory, 
    IResourceStreamFactory resourceStreamFactory)
Parameter Type Description
pageStreamFactory IPageStreamFactory The factory which implements methods for creating and releasing output page stream.
resourceStreamFactory IResourceStreamFactory The factory which implements methods that are required for creating resource URL, instantiating and releasing output HTML resource stream.

Return Value

New instance of the HtmlViewOptions class for rendering into HTML with external resources.

Exceptions

exception condition
ArgumentNullException Thrown when pageStreamFactory is null.
ArgumentNullException Thrown when resourceStreamFactory is null.

Remarks

For the code example, see the documentation.

See Also


ForExternalResources()

Initializes an instance of the HtmlViewOptions class.

public static HtmlViewOptions ForExternalResources()

Remarks

This constructor initializes an instance of the HtmlViewOptions

  • with “p_{0}.html” as file path format for the output HTML files
  • with “p_{0}_{1}” as file path format for the output HTML-resource files
  • with “p_{0}_{1}” as URL format for HTML-resources

The output files will be placed into current working directory of the application.

For the code example, see the documentation.

See Also


ForExternalResources(string, string, string)

Initializes an instance of the HtmlViewOptions class.

public static HtmlViewOptions ForExternalResources(string filePathFormat, 
    string resourceFilePathFormat, string resourceUrlFormat)
Parameter Type Description
filePathFormat String The file path format e.g. ‘page_{0}.html’.
resourceFilePathFormat String The resource file path format e.g. ‘page_{0}/resource_{1}’.
resourceUrlFormat String The resource URL format e.g. ‘page_{0}/resource_{1}’.

Exceptions

exception condition
ArgumentException Thrown when filePathFormat is null or empty.
ArgumentException Thrown when resourceFilePathFormat is null or empty.
ArgumentException Thrown when resourceUrlFormat is null or empty.

Remarks

For the code example, see the documentation.

See Also