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, ExtensiblePropertyDescriptor<T>.LazyDefaultFactory)
Gets a value for the property from the container
Declaration
public T GetValueFrom([ValidatedNotNull] IExtensiblePropertyContainer container, ExtensiblePropertyDescriptor<T>.LazyDefaultFactory lazyDefaultFactory)
Parameters
public T GetValueFrom([ValidatedNotNull] IExtensiblePropertyContainer container, ExtensiblePropertyDescriptor<T>.LazyDefaultFactory lazyDefaultFactory)
IExtensiblePropertyContainer | container | container |
ExtensiblePropertyDescriptor.LazyDefaultFactory<> | 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