DocumentSet.TryGetCollection MethodDocumentSet.TryGetCollection MethodDocumentSet::TryGetCollection Method

Gets the collection with the specified URI from the DocumentSetDocumentSetDocumentSet.

Syntax

Public Function TryGetCollection( _
    uri As AnyUri, _
    <Out>collection As ByRef System.Xml.XPath.IXPathNavigable[] _
) As Boolean
public bool TryGetCollection(
    AnyUri uri,
    out System.Xml.XPath.IXPathNavigable[] collection
)
public:
bool TryGetCollection(
    AnyUri^ uri, 
    [Out] array<System.Xml.XPath::IXPathNavigable^>% collection
)
 

Parameters

uri

Type: XmlPrime.AnyUriXmlPrime.AnyUriXmlPrime::AnyUri^

The URI of the collection to retrieve, or null a null reference (Nothing in Visual Basic) nullptr to retrieve the default collection.

collection

Type: out System.Xml.XPath.IXPathNavigable[]ByRef System.Xml.XPath.IXPathNavigable()array<System.Xml.XPath::IXPathNavigable^>^%

When this method returns, contains the collection 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 collection, 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.