Method GetFieldValue
- Namespace
- Skyline.DataMiner.Utils.DOM.Extensions
- Assembly
- Skyline.DataMiner.Utils.DOM.dll
GetFieldValue<T>(ISectionContainer, string, string, DomCache)
Gets the value of a field within a section by name.
public static T GetFieldValue<T>(this ISectionContainer container, string sectionName, string fieldName, DomCache cache)
Parameters
containerISectionContainerThe ISectionContainer instance.
sectionNamestringThe name of the section.
fieldNamestringThe name of the field.
cacheDomCacheThe DomCache instance.
Returns
- T
The value of the specified field in the specified section, or the default value for the type if not found.
Type Parameters
TThe type of the field value.
Exceptions
- ArgumentNullException
Thrown when
containerorcacheis null.- ArgumentException
Thrown when
sectionNameorfieldNameis null or whitespace.