Table of Contents

Class RequiresDataContainerAttribute

Namespace
FishMMO.Server.Core
Assembly
FishMMO.Server.dll

Declares that a ServerBehaviour requires a specific RuntimeDataContainer type. The container will be automatically instantiated and registered before the behaviour is initialized. Multiple systems can declare the same container type, and only one instance will be created.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public sealed class RequiresDataContainerAttribute : Attribute
Inheritance
RequiresDataContainerAttribute
Inherited Members

Constructors

RequiresDataContainerAttribute(Type)

Initializes a new instance of the RequiresDataContainerAttribute class.

public RequiresDataContainerAttribute(Type containerType)

Parameters

containerType Type

The concrete RuntimeDataContainer type required by this behaviour.

Properties

ContainerType

The concrete RuntimeDataContainer type required by this behaviour. Must be a non-abstract class with a parameterless constructor.

public Type ContainerType { get; }

Property Value

Type

InitializationPriority

Optional: Priority order for container initialization (lower = earlier). Defaults to 0. Use this when containers have dependencies on other containers. If multiple systems declare the same container with different priorities, the first encountered priority wins.

public int InitializationPriority { get; set; }

Property Value

int