Document Collection
A document collection extends Collection and adds additional behaviors specific to document collections.
public class CdmDocumentCollection extends CdmCollection<CdmDocumentDefinition>
Constructors
Name | Description |
---|---|
CdmDocumentCollection(CdmCorpusContext, CdmFolderDefinition) ctx: The corpus context. owner: The folder that contains this collection. |
Initializes a new instance of the CdmDocumentCollection class. |
Methods
Name | Description | Return Type |
---|---|---|
Add(CdmDocumentDefinition) document: The document to add to the collection. append(...) in Python, push(...) in TypeScript. |
Adds the specified document to the collection. Returns the document that was added to the collection. | CdmDocumentDefinition |
Add(CdmDocumentDefinition, string) document: The document to add to the collection. documentName: The name of the document. append(...) in Python, push(...) in TypeScript. |
Adds the specified document to the collection and sets its name to be the specified name. Returns the document that was added to the collection. | CdmDocumentDefinition |
Add(string, bool) name: The name of the document to add to the collection. simpleRef [optional]: This parameter is unused. It's kept just for consistency with other Common Data Model collections. append(...) in Python, push(...) in TypeScript. |
Creates a document with the specified name and adds it to the collection. Returns the document that was added to the collection. | CdmDocumentDefinition |
AddRange(IEnumerable<CdmDocumentDefinition>) documents: The list of documents to add. addAll(...) in Java, extend(...) in Python, concat(...) in TypeScript. |
Adds the elements of the specified list of documents to the collection. | void |
Insert(int, CdmDocumentDefinition) index: The index to insert the document at. document: The document to add to the collection. add(...) in Java. |
Inserts the document into the collection at the specified index. | void |
Remove(CdmDocumentDefinition) document: The document to remove from the collection. |
Removes the specified document from the collection. Returns true if the operation is successful, false otherwise. | bool |
Remove(string) name: The name of the document to remove from the collection. |
Removes the document with the specified name from the collection. Returns true if the operation is successful, false otherwise. | bool |
RemoveAt(int) index: The index of the document to remove. |
Removes the document at the specified index from the collection. | void |
Clear() | Empties the collection. | void |
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru