Table of Contents

Class ConfigKeyPriority

Namespace
MonkeyLoader.Configuration
Assembly
MonkeyLoader.dll

Implements a priority component for IDefiningConfigKeys.

public sealed class ConfigKeyPriority : IConfigKeyPriority, IConfigKeyComponent<IDefiningConfigKey>, IComponent<IDefiningConfigKey>, IPrioritizable
Inheritance
ConfigKeyPriority
Implements
Inherited Members

Constructors

ConfigKeyPriority(int)

Creates a new priority component with the given priority value.
Without this component, IDefiningConfigKeys have a priority of 0.

public ConfigKeyPriority(int priority)

Parameters

priority int

The priority value to use. Use the HarmonyLib.Priority values as a base. Higher comes first.

Remarks

Use the HarmonyLib.Priority values as a base. Higher comes first.

Properties

Priority

Gets the priority of this item. Use an agreed standard as a base.

public int Priority { get; }

Property Value

int

An interger used to sort the prioritizable items.
Higher comes first with the default comparer.

Methods

Initialize(IDefiningConfigKey)

Initializes this component when it's added to an entity's component list.
This may throw a InvalidOperationException when the state of the given entity is invalid for this component.

public void Initialize(IDefiningConfigKey entity)

Parameters

entity IDefiningConfigKey

The entity this component was added to.

Exceptions

InvalidOperationException

When the state of the given entity is invalid.