Method GetValueFrom
GetValueFrom(IExtensiblePropertyContainer)
Gets a value for the property from the container
Declaration
public T GetValueFrom(IExtensiblePropertyContainer container)
Parameters
public T GetValueFrom(IExtensiblePropertyContainer container)
IExtensiblePropertyContainer | container | container |
Returns
T | Value retrieved from the property or the default value of type |
GetValueFrom(IExtensiblePropertyContainer, T)
Gets a value for the property from the container
Declaration
public T GetValueFrom(IExtensiblePropertyContainer container, T defaultValue)
Parameters
public T GetValueFrom(IExtensiblePropertyContainer container, T defaultValue)
IExtensiblePropertyContainer | container | container |
T | defaultValue | default value if the value is not yet present as an extended property |
Returns
T | Value retrieved from the property or |
Remarks
If the value didn't exist a new value with defaultValue
is added to the container
GetValueFrom(IExtensiblePropertyContainer, Func<T>)
Gets a value for the property from the container
Declaration
public T GetValueFrom([ValidatedNotNull] IExtensiblePropertyContainer container, Func<T> lazyDefaultFactory)
Parameters
public T GetValueFrom([ValidatedNotNull] IExtensiblePropertyContainer container, Func<T> lazyDefaultFactory)
IExtensiblePropertyContainer | container | container |
Func<T> | lazyDefaultFactory | default value factory delegate to create the default value if the value is not yet present as an extended property |
Returns
T | Value retrieved from the property or default value created by |
Remarks
If the value didn't exist a new value created by calling with lazyDefaultFactory
is added to the container