Skip to content

MetadataKey

Static class · Namespace OMX.ModAPI · Assembly OMX.ModAPI.Shared.dll

public static class MetadataKey

The grammar shared by metadata keys and custom-event names: owner:name, where the owner is the resource id that may write the key or emit the event. Ordinal and case-sensitive.

public const int MaxLength = 97;
public const int MaxNameLength = 64;
public const int MaxOwnerLength = 32;
public static bool IsValid(string? key);

Parameters

  • key string?

Returns bool

public static bool IsValidOwner(string? owner);

Whether owner alone is valid as a resource id / key owner.

Parameters

  • owner string?

Returns bool

public static string Owner(string key);

The owner part of a valid key.

Parameters

  • key string

Returns string

public static string? Validate(string? key);

Null when the key is a valid owner:name, otherwise the reason it is not.

Parameters

  • key string?

Returns string?