Table of Contents

Method GetValueOrDefault

Namespace
Skyline.DataMiner.Core.DataMinerSystem.Common
Assembly
Skyline.DataMiner.Core.DataMinerSystem.Common.dll

GetValueOrDefault<T>(IDmsStandaloneParameter<T?>, T)

Gets the parameter value or the specified default value.

public static T GetValueOrDefault<T>(this IDmsStandaloneParameter<T?> parameter, T defaultValue) where T : struct

Parameters

parameter IDmsStandaloneParameter<T?>

The parameter.

defaultValue T

The value to return if the HasValue property returns false.

Returns

T

The parameter value.

Type Parameters

T

The type of the standalone parameter value.

Exceptions

ArgumentNullException

parameter is null.

ParameterNotFoundException

The parameter was not found.

ElementStoppedException

The element is stopped.

ElementNotFoundException

The element was not found in the DataMiner System.

GetValueOrDefault<T>(IDmsStandaloneParameter<T?>)

Gets the parameter value or the specified default value.

public static T GetValueOrDefault<T>(this IDmsStandaloneParameter<T?> parameter) where T : struct

Parameters

parameter IDmsStandaloneParameter<T?>

The parameter.

Returns

T

The parameter value.

Type Parameters

T

The type of the standalone parameter value.

Exceptions

ArgumentNullException

parameter is null.

ParameterNotFoundException

The parameter was not found.

ElementStoppedException

The element is stopped.

ElementNotFoundException

The element was not found in the DataMiner System.