Table of Contents

Interface IGenericDataHolder

Namespace
MLEM.Misc
Assembly
MLEM.dll

Represents an object that can hold generic key-value based data. A lot of MLEM components extend this class to allow for users to add additional data to them easily.

public interface IGenericDataHolder

Methods

GetDataKeys()

Returns all of the generic data that this object stores.

IEnumerable<string> GetDataKeys()

Returns

IEnumerable<string>

The generic data on this object

GetData<T>(string)

Returns a piece of generic data of the given type on this object.

T GetData<T>(string key)

Parameters

key string

The key that the data is stored by

Returns

T

The data, or default if it doesn't exist

Type Parameters

T

The type of the data stored

SetData<T>(string, T)

Store a piece of generic data on this object.

void SetData<T>(string key, T data)

Parameters

key string

The key to store the data by

data T

The data to store in the object

Type Parameters

T