Table of Contents

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

container ISectionContainer

The ISectionContainer instance.

sectionName string

The name of the section.

fieldName string

The name of the field.

cache DomCache

The 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

T

The type of the field value.

Exceptions

ArgumentNullException

Thrown when container or cache is null.

ArgumentException

Thrown when sectionName or fieldName is null or whitespace.