Method AddOrUpdateFieldValue
AddOrUpdateFieldValue<T>(ISectionContainer, SectionDefinition, FieldDescriptor, T)
Adds or updates the specified field of the specified section in the specified container to the specified value.
public static void AddOrUpdateFieldValue<T>(this ISectionContainer container, SectionDefinition sectionDefinition, FieldDescriptor fieldDescriptor, T value)
Parameters
container
ISectionContainerThe section container.
sectionDefinition
SectionDefinitionThe section definition.
fieldDescriptor
FieldDescriptorThe field descriptor.
value
TThe value.
Type Parameters
T
The type of the value.
Remarks
The first Section found for the given sectionDefinition
gets value
as its value for fieldDescriptor
. If no Section is found, a new one is created and added.
Exceptions
- ArgumentNullException
container
,sectionDefinition
orfieldDescriptor
is null.