DocumentSet.TryGetResource MethodDocumentSet.TryGetResource MethodDocumentSet::TryGetResource Method

Gets the resource with the specified URI from the DocumentSetDocumentSetDocumentSet.

Syntax

Public Function TryGetResource( _
    uri As AnyUri, _
    <Out>resource As ByRef IResolvedResource _
) As Boolean
public bool TryGetResource(
    AnyUri uri,
    out IResolvedResource resource
)
public:
bool TryGetResource(
    AnyUri^ uri, 
    [Out] IResolvedResource^% resource
)
 

Parameters

uri

Type: XmlPrime.AnyUriXmlPrime.AnyUriXmlPrime::AnyUri^

The URI of the resource to retrieve.

resource

Type: out XmlPrime.IResolvedResourceByRef XmlPrime.IResolvedResourceXmlPrime::IResolvedResource^%

When this method returns, contains the unparsed text of the resource 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 resource, or the URI is marked as unavailable; otherwise falseFalsefalse.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionuri is null a null reference (Nothing in Visual Basic) nullptr.
ArgumentExceptionArgumentExceptionArgumentException uri is not an absolute URI, or uri contains a fragment identifier.