Table of Contents

Class DelegateDefaultValueMetadata<T>

Namespace
Stride.Core
Assembly
Stride.Core.dll

Specifies a delegate to fetch the default value of an PropertyKey.

public class DelegateDefaultValueMetadata<T> : DefaultValueMetadata<T>

Type Parameters

T
Inheritance
DelegateDefaultValueMetadata<T>
Inherited Members

Constructors

DelegateDefaultValueMetadata(DefaultValueCallback)

Initializes a new instance of the DelegateDefaultValueMetadata<T> class.

public DelegateDefaultValueMetadata(DelegateDefaultValueMetadata<T>.DefaultValueCallback callback)

Parameters

callback DelegateDefaultValueMetadata<T>.DefaultValueCallback

The callback.

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 PropertyContainer

The property container.

Returns

T

The default value.