Method SetFieldValue
- Namespace
- Skyline.DataMiner.Utils.DOM.Extensions
- Assembly
- Skyline.DataMiner.Utils.DOM.dll
SetFieldValue<T>(ISectionContainer, string, string, T, DomCache)
Sets the value of a field within a section by name.
public static void SetFieldValue<T>(this ISectionContainer container, string sectionName, string fieldName, T value, DomCache cache)
Parameters
containerISectionContainerThe ISectionContainer instance.
sectionNamestringThe name of the section.
fieldNamestringThe name of the field.
valueTThe value to set for the field.
cacheDomCacheThe DomCache instance.
Type Parameters
TThe type of the field value.
Exceptions
- ArgumentNullException
Thrown when
container,cache, orvalueis null.- ArgumentException
Thrown when
sectionNameorfieldNameis null or whitespace.