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
containerISectionContainerThe section container.
sectionDefinitionSectionDefinitionThe section definition.
fieldDescriptorFieldDescriptorThe field descriptor.
valueTThe value.
Type Parameters
TThe 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,sectionDefinitionorfieldDescriptoris null.