Class ContentRegistry<T>

Namespace
FTK2.ModAPI.Registries
Assembly
FTK2.ModAPI.dll
public sealed class ContentRegistry<T> : IReadOnlyRegistry<T>

Type Parameters

T
Inheritance
ContentRegistry<T>
Implements
Inherited Members

Constructors

ContentRegistry(Func<T, string?>)

public ContentRegistry(Func<T, string?> validate)

Parameters

validate Func<T, string>

Properties

Entries

public IReadOnlyList<RegistryEntry<T>> Entries { get; }

Property Value

IReadOnlyList<RegistryEntry<T>>

Methods

TryGet(string, out RegistryEntry<T>?)

public bool TryGet(string id, out RegistryEntry<T>? entry)

Parameters

id string
entry RegistryEntry<T>

Returns

bool

TryRegister(string, string, T, out string?)

public bool TryRegister(string owner, string id, T definition, out string? error)

Parameters

owner string
id string
definition T
error string

Returns

bool