Share via


ITurnState.GetValue<T>(String, Func<T>) Method

Definition

Get a property value.

public T GetValue<T>(string path, Func<T> defaultValueFactory = default);
abstract member GetValue : string * Func<'T> -> 'T
Public Function GetValue(Of T) (path As String, Optional defaultValueFactory As Func(Of T) = Nothing) As T

Type Parameters

T

Parameters

path
String

The full path to the property: {scope}.{name}. If {scope} is missing the value is a get on Temp.

defaultValueFactory
Func<T>

Defines the default value. Invoked when no value been set for the requested state property. If defaultValueFactory is defined as null in that case, the method returns null.

Returns

T

Remarks

{scope} is always the name of an Name.

Applies to