OpenMod Docs OpenMod Docs
OpenMod Docs OpenMod Docs
OpenMod .NET Plugin Framework.

Class CommandDataStore

Inheritance
System.Object
CommandDataStore
Implements
ICommandDataStore
IAsyncDisposable
Namespace: OpenMod.Core.Commands
Assembly: OpenMod.Core.dll
Syntax
public class CommandDataStore : object, ICommandDataStore, IAsyncDisposable

Constructors

| Improve this Doc View Source

CommandDataStore(IOpenModDataStoreAccessor, IRuntime, Lazy<ICommandStore>, ILogger<CommandDataStore>)

Declaration
public CommandDataStore(IOpenModDataStoreAccessor dataStoreAccessor, IRuntime runtime, Lazy<ICommandStore> commandStore, ILogger<CommandDataStore> logger)
Parameters
Type Name Description
IOpenModDataStoreAccessor dataStoreAccessor
IRuntime runtime
Lazy<ICommandStore> commandStore
ILogger<CommandDataStore> logger

Fields

| Improve this Doc View Source

CommandsKey

Declaration
public const string CommandsKey = null
Field Value
Type Description
System.String

Methods

| Improve this Doc View Source

DisposeAsync()

Declaration
public ValueTask DisposeAsync()
Returns
Type Description
ValueTask
| Improve this Doc View Source

GetCommandDataAsync<T>(String, String)

Declaration
public Task<T> GetCommandDataAsync<T>(string commandId, string key)
Parameters
Type Name Description
System.String commandId
System.String key
Returns
Type Description
Task<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

GetRegisteredCommandAsync(String)

Declaration
public Task<RegisteredCommandData> GetRegisteredCommandAsync(string commandId)
Parameters
Type Name Description
System.String commandId
Returns
Type Description
Task<RegisteredCommandData>
| Improve this Doc View Source

GetRegisteredCommandsAsync()

Declaration
public Task<RegisteredCommandsData> GetRegisteredCommandsAsync()
Returns
Type Description
Task<RegisteredCommandsData>
| Improve this Doc View Source

SetCommandDataAsync(RegisteredCommandData)

Declaration
public Task SetCommandDataAsync(RegisteredCommandData commandData)
Parameters
Type Name Description
RegisteredCommandData commandData
Returns
Type Description
Task
| Improve this Doc View Source

SetCommandDataAsync<T>(String, String, T)

Declaration
public Task SetCommandDataAsync<T>(string commandId, string key, T value)
Parameters
Type Name Description
System.String commandId
System.String key
T value
Returns
Type Description
Task
Type Parameters
Name Description
T
| Improve this Doc View Source

SetRegisteredCommandsAsync(RegisteredCommandsData)

Declaration
public Task SetRegisteredCommandsAsync(RegisteredCommandsData data)
Parameters
Type Name Description
RegisteredCommandsData data
Returns
Type Description
Task

Implements

ICommandDataStore
IAsyncDisposable

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)