DocumentSet.TryGetDocument MethodDocumentSet.TryGetDocument MethodDocumentSet::TryGetDocument Method

Gets the document with the specified URI from the DocumentSetDocumentSetDocumentSet.

Syntax

Public Function TryGetDocument( _
    uri As AnyUri, _
    <Out>document As ByRef IResolvedDocument _
) As Boolean
public bool TryGetDocument(
    AnyUri uri,
    out IResolvedDocument document
)
public:
bool TryGetDocument(
    AnyUri^ uri, 
    [Out] IResolvedDocument^% document
)
 

Parameters

uri

Type: XmlPrime.AnyUriXmlPrime.AnyUriXmlPrime::AnyUri^

The URI of the document to retrieve.

document

Type: out XmlPrime.IResolvedDocumentByRef XmlPrime.IResolvedDocumentXmlPrime::IResolvedDocument^%

When this method returns, contains the document at the specified URI, if it is cached in the DocumentSetDocumentSetDocumentSet; otherwise null a null reference (Nothing in Visual Basic) nullptr. This is also set to null a null reference (Nothing in Visual Basic) nullptr if the URI is marked as unavailable.

Return Value

Type: System.BooleanSystem.BooleanSystem::Boolean

trueTruetrue if the DocumentSetDocumentSetDocumentSet contains the specified document, or the URI is marked as unavailable; otherwise falseFalsefalse.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionuri is null a null reference (Nothing in Visual Basic) nullptr.
ArgumentExceptionArgumentExceptionArgumentExceptionuri is not an absolute URI.