ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
DocumentLoader Class
DocumentLoader Methods
CacheDocument Method
DiscardCachedDocuments Method
GetCachedDocument Method
LoadDocument Method
LoadDocumentAsync Method

# DocumentLoaderLoadDocument Method

Loads a document.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public virtual Document LoadDocument(
    	DocumentSettings settings,
    	DocumentInfo? sourceInfo,
    	string specifier,
    	DocumentCategory category,
    	DocumentContextCallback contextCallback
    )

    Public Overridable Function LoadDocument (
    	settings As DocumentSettings,
    	sourceInfo As DocumentInfo?,
    	specifier As String,
    	category As DocumentCategory,
    	contextCallback As DocumentContextCallback
    ) As Document

    public:
    virtual Document^ LoadDocument(
    	DocumentSettings^ settings,
    	Nullable<DocumentInfo> sourceInfo,
    	String^ specifier,
    	DocumentCategory^ category,
    	DocumentContextCallback^ contextCallback
    )

    abstract LoadDocument :
            settings : DocumentSettings *
            sourceInfo : Nullable<DocumentInfo> *
            specifier : string *
            category : DocumentCategory *
            contextCallback : DocumentContextCallback -> Document
    override LoadDocument :
            settings : DocumentSettings *
            sourceInfo : Nullable<DocumentInfo> *
            specifier : string *
            category : DocumentCategory *
            contextCallback : DocumentContextCallback -> Document

#### Parameters

settings DocumentSettings
  Document access settings for the operation.
sourceInfo Nullable DocumentInfo
  An optional structure containing meta-information for the requesting document.
specifier String
  A string specifying the document to be loaded.
category DocumentCategory
  An optional category for the requested document.
contextCallback DocumentContextCallback
  An optional context callback for the requested document.

#### Return Value

Document
A Document instance that represents the loaded document.
Remarks
A loaded document must have an absolute URI. Once a load operation has completed successfully, subsequent requests that resolve to the same URI are expected to return the same Document reference, although loaders are not required to manage document caches of unlimited size.
See Also

#### Reference

DocumentLoader Class
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft