• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class PortfolioFieldCollection

Dictionary-like collection of portfolio schema fields.

Inheritance
object
PortfolioFieldCollection
Implements
IEnumerable<KeyValuePair<string, PortfolioField>>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf.EmbeddedFiles
Assembly: DRIT.Pdf.dll
Syntax
public sealed class PortfolioFieldCollection : IEnumerable<KeyValuePair<string, PortfolioField>>, IEnumerable

Properties

Count

Gets the number of fields in this collection.

Declaration
public int Count { get; }
Property Value
Type Description
int

this[string]

Gets the field with the specified key.

Declaration
public PortfolioField this[string key] { get; }
Parameters
Type Name Description
string key

The field key.

Property Value
Type Description
PortfolioField

Methods

Add(PortfolioFieldDataType, string)

Adds a new field with the specified data type and key.

Declaration
public KeyValuePair<string, PortfolioField> Add(PortfolioFieldDataType dataType, string key)
Parameters
Type Name Description
PortfolioFieldDataType dataType

The data type for the field.

string key

The field key (must be unique).

Returns
Type Description
KeyValuePair<string, PortfolioField>

A key-value pair containing the key and the created field.

Exceptions
Type Condition
ArgumentException

Thrown when key is null, empty, or already exists.

GetEnumerator()

Returns an enumerator for iterating over fields.

Declaration
public IEnumerator<KeyValuePair<string, PortfolioField>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<string, PortfolioField>>

TryGetValue(string, out PortfolioField)

Attempts to get a field by key.

Declaration
public bool TryGetValue(string key, out PortfolioField field)
Parameters
Type Name Description
string key

The field key.

PortfolioField field

The field if found, or null.

Returns
Type Description
bool

True if the field was found; false otherwise.

Implements

IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX