Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ComponentBase Class

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

    Base class for a framework component.

    System.Object → DisposeBase → ComponentBase
    Derived from ComponentBase: AudioEngine SoundBase SoundInstance Entity EntityManager Scene UILibrary UIPage GameBase GameSystemBase GameWindow GraphicsDeviceManager BatchBase<TDrawInfo> BatchBase<TDrawInfo>.DeviceResourceContext Effect FastTextRenderer GeometricMeshData<T> GeometricPrimitive<T> GraphicsAdapter GraphicsDevice GraphicsFactory GraphicsOutput GraphicsPresenter GraphicsResourceAllocator GraphicsResourceBase GraphicsResourceFactoryBase PrimitiveQuad ResourceGroupAllocator SpriteFont InputManager ShaderGeneratorContext RenderContext RenderDrawContext RendererCoreBase RenderFeature RenderSystem StreamableResource ElementRenderer

    [DataContract]
    public abstract class ComponentBase : DisposeBase, IDisposable, IComponent, IReferencable, ICollectorHolder
    Name Description
    Constructors
    ComponentBase()

    Initializes a new instance of the ComponentBase class.

    ComponentBase(String)

    Initializes a new instance of the ComponentBase class.

    Fields
    Tags

    Gets the attached properties to this component.

    Properties
    Name

    Gets or sets the name of this component.

    Methods
    Destroy()

    Disposes of object resources.

    OnNameChanged()

    Called when Name property was changed.

    ToString()
    Explicit Interface Implementations
    ICollectorHolder.Collector
    | Improve this Doc View Source

    Constructors


    ComponentBase()

    Initializes a new instance of the ComponentBase class.

    protected ComponentBase()

    ComponentBase(String)

    Initializes a new instance of the ComponentBase class.

    protected ComponentBase(string name)
    Parameters
    Type Name Description
    System.String name

    The name attached to this component

    | Improve this Doc View Source

    Fields


    Tags

    Gets the attached properties to this component.

    public PropertyContainer Tags
    Field Value
    Type Description
    PropertyContainer
    | Improve this Doc View Source

    Properties


    Name

    Gets or sets the name of this component.

    public virtual string Name { get; set; }
    Property Value
    Type Description
    System.String

    The name.

    | Improve this Doc View Source

    Methods


    Destroy()

    Disposes of object resources.

    protected override void Destroy()
    Overrides
    DisposeBase.Destroy()

    OnNameChanged()

    Called when Name property was changed.

    protected virtual void OnNameChanged()

    ToString()

    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()
    | Improve this Doc View Source

    Explicit Interface Implementations


    ICollectorHolder.Collector

    ObjectCollector ICollectorHolder.Collector { get; }
    Returns
    Type Description
    ObjectCollector

    Inherited Members

    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

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

    Back to top

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