Metadataclass

A simple class for storing and retrieving metadata values.

objectMetadata
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public class Sandbox.Metadata

Constructors1

Showing 1 constructors

Methods3

Showing 3 methods

public T GetValueOrDefault(string key, T defaultValue = null)PUBLIC

Get the a value. If it's missing or the wrong type then use the default value.

ParameterTypeDescription
keystring
defaultValue = nullT
Returns:T

public void SetValue(string key, object value)PUBLIC

Set a value with the specified key.

ParameterTypeDescription
keystring
valueobject
Returns:void

public bool TryGetValue(string key, T outValue)PUBLIC

Try to get a value of the specified type.

ParameterTypeDescription
keystring
outValueT
Returns:bool

On this page