DocumentSet.AddCollection Method (AnyUri, IEnumerable<XPathItem>)DocumentSet.AddCollection Method (AnyUri, IEnumerable(Of XPathItem))DocumentSet::AddCollection Method (AnyUri^, IEnumerable<XPathItem^>^)
- XmlPrime 4.1
- Other Versions ▼
Syntax
Public Function AddCollection( _ uri As AnyUri, _ collection As IEnumerable(Of System.Xml.XPath.XPathItem) _ ) As Boolean
public bool AddCollection( AnyUri uri, IEnumerable<System.Xml.XPath.XPathItem> collection )
public: bool AddCollection( AnyUri^ uri, IEnumerable<System.Xml.XPath::XPathItem^>^ collection )
Parameters
- uri
Type: XmlPrime.AnyUriXmlPrime.AnyUriXmlPrime::AnyUri^
The collection URI to associate with collection, or
nulla null reference (Nothingin Visual Basic)nullptrto set the default collection.- collection
Type: System.Collections.Generic.IEnumerable<T>System.Collections.Generic.IEnumerable(Of T)System.Collections.Generic::IEnumerable<T>^
The collection of items to add to the DocumentSetDocumentSetDocumentSet, or
nulla null reference (Nothingin Visual Basic)nullptrif the collection is unavailable.
Return Value
Type: System.BooleanSystem.BooleanSystem::Boolean
trueTruetrue if the collection was added to the DocumentSetDocumentSetDocumentSet;
falseFalsefalse otherwise.
Exceptions
| Exception | Condition |
| ArgumentNullExceptionArgumentNullExceptionArgumentNullException |
uri is null
a null reference (Nothing in Visual Basic)
nullptr.
|
| ArgumentExceptionArgumentExceptionArgumentException |
|
Remarks
If any item in collection is a document node with a document URI that is not empty, then the document should already be added to the document set.
If uri is already in the document set then no change is made and this method returns
falseFalsefalse.
If collection is null
a null reference (Nothing in Visual Basic)
nullptr then during evaluation of an XQuery program, XSL
transformation or XPath expression, fn:doc-available will return false for
uri, and the fn:doc function will raise an FODC0002 error.
