Table of Contents

Interface ITagRegistry<TTagSet>

Namespace
Vintagestory.API.Datastructures
Assembly
VintagestoryAPI.dll
public interface ITagRegistry<TTagSet>

Type Parameters

TTagSet
Extension Methods

Properties

debugName

string debugName { get; }

Property Value

string

logger

ILogger logger { get; }

Property Value

ILogger

Methods

CreateTagSet(IEnumerable<string>)

Create the corresponding TTagSet in its native representation that has the provided tag marked as active.

TTagSet CreateTagSet(IEnumerable<string> tags)

Parameters

tags IEnumerable<string>

Returns

TTagSet

Remarks

Will fully consume the iterator even if an exception is thrown.

Exceptions

TagRegistryException

If any of the requested tags cannot be found.

CreateTagSet(params ReadOnlySpan<string>)

Create the corresponding TTagSet in its native representation that has the provided tag marked as active.

TTagSet CreateTagSet(params ReadOnlySpan<string> tags)

Parameters

tags ReadOnlySpan<string>

Returns

TTagSet

Exceptions

TagRegistryException

If any of the requested tags cannot be found.

LogIssue(string, TagRegistryError, params ReadOnlySpan<string>)

void LogIssue(string debugLocation, TagRegistryError error, params ReadOnlySpan<string> tags)

Parameters

debugLocation string
error TagRegistryError
tags ReadOnlySpan<string>

Register(IEnumerable<string>)

void Register(IEnumerable<string> tags)

Parameters

tags IEnumerable<string>

Remarks

Will still register tags and consume the iterator until it is at capacity.

Exceptions

TagRegistryException

If the registry is full or locked.

Register(params ReadOnlySpan<string>)

void Register(params ReadOnlySpan<string> tags)

Parameters

tags ReadOnlySpan<string>

Remarks

Will still register tags until it is at capacity.

Exceptions

TagRegistryException

If the registry is full or locked.

RegisterAndCreateTagSet(IEnumerable<string>)

Create the corresponding TTagSet in its native representation that has the provided tag marked as active.

TTagSet RegisterAndCreateTagSet(IEnumerable<string> tags)

Parameters

tags IEnumerable<string>

Returns

TTagSet

Remarks

Will fully consume the iterator even if an exception is thrown.

Exceptions

TagRegistryException

If any of the the requested tags cannot be found and the registry is full or locked.

RegisterAndCreateTagSet(params ReadOnlySpan<string>)

Create the corresponding TTagSet in its native representation that has the provided tag marked as active.

TTagSet RegisterAndCreateTagSet(params ReadOnlySpan<string> tags)

Parameters

tags ReadOnlySpan<string>

Returns

TTagSet

Exceptions

TagRegistryException

If any of the the requested tags cannot be found and the registry is full or locked.

SlowEnumerateTagNames(TTagSet)

IEnumerable<string> SlowEnumerateTagNames(TTagSet set)

Parameters

set TTagSet

Returns

IEnumerable<string>

TryCreateTagSet(out TTagSet, IEnumerable<string>)

Create the corresponding TTagSet in its native representation that has the provided enumerable of tags marked as active.

TagRegistryError TryCreateTagSet(out TTagSet set, IEnumerable<string> tags)

Parameters

set TTagSet
tags IEnumerable<string>

Returns

TagRegistryError

Remarks

Will return an error if at least one of the tags does not exist in the registry. Will still consume the iterator and the set will still be populated with the remaining found tags.

TryCreateTagSet(out TTagSet, params ReadOnlySpan<string>)

Create the corresponding TTagSet in its native representation that has the provided span of tags marked as active.

TagRegistryError TryCreateTagSet(out TTagSet set, params ReadOnlySpan<string> tags)

Parameters

set TTagSet
tags ReadOnlySpan<string>

Returns

TagRegistryError

Remarks

Will return an error if at least one of the tags does not exist in the registry. The set will still be populated with the remaining found tags.

TryCreateTagSetAndLogIssues(out TTagSet, IEnumerable<string>)

Create the corresponding TTagSet in its native representation that has the provided enumerable of tags marked as active.

TagRegistryError TryCreateTagSetAndLogIssues(out TTagSet set, IEnumerable<string> tags)

Parameters

set TTagSet
tags IEnumerable<string>

Returns

TagRegistryError

Remarks

Will return an error if at least one of the tags does not exist in the registry. Will still consume the iterator and the set will still be populated with the remaining found tags.

TryCreateTagSetAndLogIssues(out TTagSet, params ReadOnlySpan<string>)

Create the corresponding TTagSet in its native representation that has the provided span of tags marked as active.

TagRegistryError TryCreateTagSetAndLogIssues(out TTagSet set, params ReadOnlySpan<string> tags)

Parameters

set TTagSet
tags ReadOnlySpan<string>

Returns

TagRegistryError

Remarks

Will return an error if at least one of the tags does not exist in the registry. The set will still be populated with the remaining found tags.

TryRegister(IEnumerable<string>)

TagRegistryError TryRegister(IEnumerable<string> tags)

Parameters

tags IEnumerable<string>

Returns

TagRegistryError

Remarks

Will return an error if at capacity or locked. Will still consume the iterator and register tags until it is at capacity.

TryRegister(params ReadOnlySpan<string>)

TagRegistryError TryRegister(params ReadOnlySpan<string> tags)

Parameters

tags ReadOnlySpan<string>

Returns

TagRegistryError

Remarks

Will return an error if at capacity or locked. Will still register tags until it is at capacity.

TryRegisterAndCreateTagSet(out TTagSet, IEnumerable<string>)

TagRegistryError TryRegisterAndCreateTagSet(out TTagSet set, IEnumerable<string> tags)

Parameters

set TTagSet
tags IEnumerable<string>

Returns

TagRegistryError

Remarks

Will return an error if at capacity or locked. Will still consume the iterator completely and register tags until it is at capacity. The returned set will be missing the tags that could not be registered in that case.

TryRegisterAndCreateTagSet(out TTagSet, params ReadOnlySpan<string>)

TagRegistryError TryRegisterAndCreateTagSet(out TTagSet set, params ReadOnlySpan<string> tags)

Parameters

set TTagSet
tags ReadOnlySpan<string>

Returns

TagRegistryError

Remarks

Will return an error if at capacity or locked. Will still register tags until it is at capacity. The returned set will be missing the tags that could not be registered in that case.

TryRegisterAndCreateTagSetAndLogIssues(out TTagSet, IEnumerable<string>)

TagRegistryError TryRegisterAndCreateTagSetAndLogIssues(out TTagSet set, IEnumerable<string> tags)

Parameters

set TTagSet
tags IEnumerable<string>

Returns

TagRegistryError

Remarks

Will return an error if at capacity or locked. Will still consume the iterator completely and register tags until it is at capacity. The returned set will be missing the tags that could not be registered in that case.

TryRegisterAndCreateTagSetAndLogIssues(out TTagSet, params ReadOnlySpan<string>)

TagRegistryError TryRegisterAndCreateTagSetAndLogIssues(out TTagSet set, params ReadOnlySpan<string> tags)

Parameters

set TTagSet
tags ReadOnlySpan<string>

Returns

TagRegistryError

Remarks

Will return an error if at capacity or locked. Will still register tags until it is at capacity. The returned set will be missing the tags that could not be registered in that case.

TryRegisterAndLogIssues(IEnumerable<string>)

TagRegistryError TryRegisterAndLogIssues(IEnumerable<string> tags)

Parameters

tags IEnumerable<string>

Returns

TagRegistryError

Remarks

Will return an error if at capacity or locked. Will still consume the iterator and register tags until it is at capacity.

TryRegisterAndLogIssues(params ReadOnlySpan<string>)

TagRegistryError TryRegisterAndLogIssues(params ReadOnlySpan<string> tags)

Parameters

tags ReadOnlySpan<string>

Returns

TagRegistryError

Remarks

Will return an error if at capacity or locked. Will still register tags until it is at capacity.