Class PortfolioFieldValueCollection
Custom field values attached to a portfolio file or folder.
Inherited Members
Namespace: DRIT.Pdf.EmbeddedFiles
Assembly: DRIT.Pdf.dll
Syntax
public sealed class PortfolioFieldValueCollection : IEnumerable<KeyValuePair<string, string>>, IEnumerable
Properties
Count
Gets the number of field values in this collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Add(string, string)
Adds or updates a field value.
Declaration
public void Add(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The field key. |
| string | value | The field value. Null values are treated as empty string. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when key is null or empty. |
GetEnumerator()
Returns an enumerator for iterating over field values.
Declaration
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<KeyValuePair<string, string>> |
TryGet(string, out string?)
Attempts to get a field value by key.
Declaration
public bool TryGet(string key, out string? value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The field key. |
| string | value | The value if found, or null. |
Returns
| Type | Description |
|---|---|
| bool | True if the field was found; false otherwise. |