Class StaticDefaultValueMetadata<T>
Defines default value of a specific PropertyKey as a parameter value.
public class StaticDefaultValueMetadata<T> : DefaultValueMetadata<T>
Type Parameters
T
- Inheritance
-
StaticDefaultValueMetadata<T>
- Inherited Members
Constructors
StaticDefaultValueMetadata(T, bool)
Initializes a new instance of the StaticDefaultValueMetadata<T> class.
public StaticDefaultValueMetadata(T defaultValue, bool keepDefaultValue = false)
Parameters
defaultValue
TThe default value.
keepDefaultValue
boolif set to
true
[keep default value].
Properties
KeepValue
Gets a value indicating whether this value is kept.
public override bool KeepValue { get; }
Property Value
- bool
true
if this value is kept; otherwise,false
.
Methods
GetDefaultValueT(ref PropertyContainer)
Gets the default value of an external property, and specify if this default value should be kept. It could be usefull with properties with default values depending of its container, especially if they are long to generate. An example would be collision data, which should be generated only once.
public override T GetDefaultValueT(ref PropertyContainer obj)
Parameters
obj
PropertyContainerThe property container.
Returns
- T
The default value.