PdfPortfolioFieldDictionary Class
Represents a collection of PdfPortfolioFields. Each PdfPortfolioField has a PdfName key chosen by the conforming writer, which shall be used to associate a field with data in a PortfolioFieldValues or a PortfolioFieldValues.
public sealed class PdfPortfolioFieldDictionary : PdfCollection<KeyValuePair<PdfName, PdfPortfolioField>>, IList, ICollection, IList<KeyValuePair<PdfName, PdfPortfolioField>>, ICollection<KeyValuePair<PdfName, PdfPortfolioField>>, IEnumerable<KeyValuePair<PdfName, PdfPortfolioField>>, IEnumerable
Public NotInheritable Class PdfPortfolioFieldDictionary
Inherits PdfCollection(Of KeyValuePair(Of PdfName, PdfPortfolioField))
Implements IList, ICollection, IList(Of KeyValuePair(Of PdfName, PdfPortfolioField)), ICollection(Of KeyValuePair(Of PdfName, PdfPortfolioField)), IEnumerable(Of KeyValuePair(Of PdfName, PdfPortfolioField)), IEnumerable
- Inheritance:
- System.ObjectPdfPortfolioFieldDictionary
Implements
Properties
Item[PdfName]
Gets or sets the PdfPortfolioField associated with the specified PdfName key.
public PdfPortfolioField this[PdfName key] { get; set; }
Public Property Item(key As PdfName) As PdfPortfolioField
Parameters
key
- PdfName
The PdfName key of the PdfPortfolioField to get or set.
Property Value
The PdfPortfolioField associated with the specified PdfName key. If the specified key is not found, a get operation returns null. A set operation overrides existing or adds a new entry with the specified PdfName key and PdfPortfolioField.
Exceptions
- System.ArgumentNullException
key
or value is null.
- System.ArgumentException
key
name is 'Type' which is reserved.
Methods
Add(PdfPortfolioFieldDataType, String)
Adds a new PdfPortfolioField with the specified data type and name to the PdfPortfolioFieldDictionary.
Use the returned PdfName key to populate PortfolioFieldValues and PortfolioFieldValues and use the returned PdfPortfolioField value to customize it further.
public KeyValuePair<PdfName, PdfPortfolioField> Add(PdfPortfolioFieldDataType dataType, string name)
Public Function Add(dataType As PdfPortfolioFieldDataType, name As String) As KeyValuePair(Of PdfName, PdfPortfolioField)
Parameters
dataType
- PdfPortfolioFieldDataType
The data type of PdfPortfolioFieldValue or PdfFileSpecification and PdfPortfolioFolder related property that a newly added PdfPortfolioField describes.
name
- System.String
The textual name of a newly added PdfPortfolioField that shall be presented to the user by the conforming reader. This value is also used to resolve a key in the PdfPortfolioFieldDictionary of a newly added PdfPortfolioField.
Returns
- System.Collections.Generic.KeyValuePair<PdfName, PdfPortfolioField>
A newly created PdfPortfolioField with the specified data type and name added to the PdfPortfolioFieldDictionary under the returned key.
Exceptions
- System.ArgumentNullException
name
is null or System.String.Empty.
- System.ArgumentException
A PdfPortfolioField with the same key already exists in the PdfPortfolioFieldDictionary or a key name is 'Type' which is reserved.
Contains(PdfName)
Determines whether the PdfPortfolioFieldDictionary contains the PdfPortfolioField with the specified PdfName key.
Parameters
key
- PdfName
The PdfName key to locate in the PdfPortfolioFieldDictionary.
Returns
- System.Boolean
true if the PdfPortfolioFieldDictionary contains the PdfPortfolioField with the specified PdfName key; otherwise, false.
Exceptions
- System.ArgumentNullException
key
is null.
GetEnumerator()
Returns an enumerator that iterates through the PdfPortfolioFieldDictionary.
public PdfPortfolioFieldDictionary.Enumerator GetEnumerator()
Public Function GetEnumerator As PdfPortfolioFieldDictionary.Enumerator
Returns
Remove(PdfName)
Removes the PdfPortfolioField with the specified key from the PdfPortfolioFieldDictionary.
Parameters
key
- PdfName
The key of the PdfPortfolioField to remove.
Returns
- System.Boolean
true if the key is found and the PdfPortfolioField removed; otherwise, false. This method returns false if key is not found in the PdfPortfolioFieldDictionary.
Exceptions
- System.ArgumentNullException
key
is null.
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) |