PdfPortfolioFolderCollection Class
Represents a collection of a PdfPortfolioFolders contained in the Folders (root folders) or some Folders.
public sealed class PdfPortfolioFolderCollection : PdfCollection<PdfPortfolioFolder>, IList, ICollection, IList<PdfPortfolioFolder>, ICollection<PdfPortfolioFolder>, IEnumerable<PdfPortfolioFolder>, IEnumerable
Public NotInheritable Class PdfPortfolioFolderCollection
Inherits PdfCollection(Of PdfPortfolioFolder)
Implements IList, ICollection, IList(Of PdfPortfolioFolder), ICollection(Of PdfPortfolioFolder), IEnumerable(Of PdfPortfolioFolder), IEnumerable
- Inheritance:
- System.ObjectPdfPortfolioFolderCollection
Implements
Remarks
This collection is implemented as singly linked list and therefore methods that use random access (index) or modify the collection are an O(n) operations, where n is PdfPortfolioFolderCollection count.
Methods
Add(String, Boolean)
Adds a new PdfPortfolioFolder with the files and folders copied from the file system folder specified by the folderPath
to the PdfPortfolio (root folder) or parent PdfPortfolioFolder.
public PdfPortfolioFolder Add(string folderPath, bool recursive = true)
Public Function Add(folderPath As String, recursive As Boolean = True) As PdfPortfolioFolder
Parameters
folderPath
- System.String
The location of the file system folder whose files and folders are copied to a newly added PdfPortfolioFolder. This value is also used to resolve the Name of a newly added PdfPortfolioFolder.
recursive
- System.Boolean
If set to true then all files and subfolders contained under the folderPath
are copied.
Returns
A newly created PdfPortfolioFolder with the files and folders copied from the file system folder specified by the folderPath
added to the PdfPortfolio (root folder) or parent PdfPortfolioFolder.
Exceptions
- System.ArgumentNullException
folderPath
is null or System.String.Empty.
- System.ArgumentException
The folder with folderPath
either doesn't exist or an error occurred while trying to determine if the specified folder exists or a PdfPortfolioFolder with the same name already exists in this PdfPortfolioFolder or a PdfFileSpecification with the same key already exists in the EmbeddedFiles.
- System.NotSupportedException
The parent PdfPortfolioFolder is not in the PDF portfolio.
AddEmpty(String)
Adds a new empty PdfPortfolioFolder to the PdfPortfolio (root folder) or parent PdfPortfolioFolder.
public PdfPortfolioFolder AddEmpty(string portfolioFolderName)
Public Function AddEmpty(portfolioFolderName As String) As PdfPortfolioFolder
Parameters
portfolioFolderName
- System.String
The name of a newly added PdfPortfolioFolder.
Returns
A newly created empty PdfPortfolioFolder with the specified name added to the PdfPortfolio (root folder) or parent PdfPortfolioFolder.
Exceptions
- System.ArgumentNullException
portfolioFolderName
is null or System.String.Empty.
- System.ArgumentException
A PdfPortfolioFolder with the same name already exists in this PdfPortfolioFolder.
- System.NotSupportedException
The parent PdfPortfolioFolder is not in the PDF portfolio.
GetEnumerator()
Returns an enumerator that iterates through the PdfPortfolioFolderCollection.
public PdfPortfolioFolderCollection.Enumerator GetEnumerator()
Public Function GetEnumerator As PdfPortfolioFolderCollection.Enumerator
Returns
Inherited Properties
Count | Gets the number of elements contained in the PdfCollection. (Inherited from PdfCollection) |
Metadata | (Optional; PDF 1.4) A metadata stream containing metadata for the component. (Inherited from PdfObject) |
Inherited Methods
Clear() | Removes all elements from the PdfCollection. (Inherited from PdfCollection) |
RemoveAt(System.Int32) | Removes the element at the specified index of the PdfCollection. (Inherited from PdfCollection) |