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
parameterIDmsStandaloneParameter<T?>The parameter.
defaultValueTThe value to return if the HasValue property returns
false.
Returns
- T
The parameter value.
Type Parameters
TThe type of the standalone parameter value.
Remarks
Make sure the element on which you perform the operation is active. If it is stopped, an ElementNotFoundException will be thrown.
Exceptions
- ArgumentNullException
parameteris null.- ParameterNotFoundException
The parameter was not found.
- 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
parameterIDmsStandaloneParameter<T?>The parameter.
Returns
- T
The parameter value.
Type Parameters
TThe type of the standalone parameter value.
Remarks
Make sure the element on which you perform the operation is active. If it is stopped, an ElementNotFoundException will be thrown.
Exceptions
- ArgumentNullException
parameteris null.- ParameterNotFoundException
The parameter was not found.
- ElementNotFoundException
The element was not found in the DataMiner System.