Table of Contents

Class FieldDefinitionCollection

Namespace
Examine
Assembly
Examine.Core.dll

Manages the mappings between a field name and it's index type

public class FieldDefinitionCollection : ReadOnlyFieldDefinitionCollection, IEnumerable<FieldDefinition>, IEnumerable
Inheritance
FieldDefinitionCollection
Implements
Inherited Members

Constructors

FieldDefinitionCollection()

Initializes a new instance of the object class.

public FieldDefinitionCollection()

FieldDefinitionCollection(params FieldDefinition[])

public FieldDefinitionCollection(params FieldDefinition[] definitions)

Parameters

definitions FieldDefinition[]

Methods

AddOrUpdate(FieldDefinition)

Replace any definition with the specified one, if one doesn't exist then it is added

public void AddOrUpdate(FieldDefinition definition)

Parameters

definition FieldDefinition

GetOrAdd(string, Func<string, FieldDefinition>)

Adds a key/value pair to the ConcurrentDictionary<TKey, TValue> by using the specified function if the key does not already exist, or returns the existing value if the key exists.

public FieldDefinition GetOrAdd(string fieldName, Func<string, FieldDefinition> add)

Parameters

fieldName string
add Func<string, FieldDefinition>

Returns

FieldDefinition

Exceptions

ArgumentNullException

fieldName or add is null

OverflowException

The dictionary already contains the maximum number of elements (MaxValue)

TryAdd(FieldDefinition)

Attempts to add the specified key and value to the ConcurrentDictionary<TKey, TValue>.

public bool TryAdd(FieldDefinition definition)

Parameters

definition FieldDefinition

Returns

bool

True if the key/value pair was added to the ConcurrentDictionary<TKey, TValue> successfully; false if the key already exists.

Exceptions

ArgumentNullException

definition.Name is null

OverflowException

The dictionary already contains the maximum number of elements (MaxValue)