Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    StaticDefaultValueMetadata<T> Class

    Namespace: Stride.Core
    Assembly: Stride.Core.dll

    Defines default value of a specific PropertyKey as a parameter value.

    System.Object → PropertyKeyMetadata → DefaultValueMetadata → DefaultValueMetadata<T> → StaticDefaultValueMetadata<T>
    Derived from StaticDefaultValueMetadata<T>:

    public class StaticDefaultValueMetadata<T> : DefaultValueMetadata<T>
    Type Parameters
    Name Description
    T
    Name Description
    Constructors
    StaticDefaultValueMetadata(T, Boolean)

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

    Properties
    KeepValue

    Gets a value indicating whether this value is kept.

    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.

    | Improve this Doc View Source

    Constructors


    StaticDefaultValueMetadata(T, Boolean)

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

    public StaticDefaultValueMetadata(T defaultValue, bool keepDefaultValue = false)
    Parameters
    Type Name Description
    T defaultValue

    The default value.

    System.Boolean keepDefaultValue

    if set to true [keep default value].

    | Improve this Doc View Source

    Properties


    KeepValue

    Gets a value indicating whether this value is kept.

    public override bool KeepValue { get; }
    Property Value
    Type Description
    System.Boolean

    true if this value is kept; otherwise, false.

    Overrides
    DefaultValueMetadata.KeepValue
    | Improve this Doc View Source

    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
    Type Name Description
    PropertyContainer obj

    The property container.

    Returns
    Type Description
    T

    The default value.

    Overrides
    Stride.Core.DefaultValueMetadata<T>.GetDefaultValueT(Stride.Core.PropertyContainer)

    Inherited Members

    DefaultValueMetadata<T>.GetDefaultValue(PropertyContainer)
    DefaultValueMetadata.PropertyUpdateCallback
    DefaultValueMetadata.Static<T>(T, Boolean)
    DefaultValueMetadata.Delegate<T>(DelegateDefaultValueMetadata.DefaultValueCallback<>)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation