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

Class CommandContext

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

Constructors

| Improve this Doc View Source

CommandContext(ICommandRegistration, ILifetimeScope, ICommandContext)

Declaration
public CommandContext(ICommandRegistration command, ILifetimeScope scope, ICommandContext parent)
Parameters
Type Name Description
ICommandRegistration command
ILifetimeScope scope
ICommandContext parent
| Improve this Doc View Source

CommandContext(ICommandRegistration, ICommandActor, String, String, ICollection<String>, ILifetimeScope)

Declaration
public CommandContext(ICommandRegistration command, ICommandActor actor, string alias, string prefix, ICollection<string> args, ILifetimeScope scope)
Parameters
Type Name Description
ICommandRegistration command
ICommandActor actor
System.String alias
System.String prefix
ICollection<System.String> args
ILifetimeScope scope

Properties

| Improve this Doc View Source

Actor

Declaration
public ICommandActor Actor { get; set; }
Property Value
Type Description
ICommandActor
| Improve this Doc View Source

ChildContext

Declaration
public ICommandContext ChildContext { get; set; }
Property Value
Type Description
ICommandContext
| Improve this Doc View Source

CommandAlias

Declaration
public string CommandAlias { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CommandPrefix

Declaration
public string CommandPrefix { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CommandRegistration

Declaration
public ICommandRegistration CommandRegistration { get; set; }
Property Value
Type Description
ICommandRegistration
| Improve this Doc View Source

Data

Declaration
public Dictionary<string, object> Data { get; }
Property Value
Type Description
Dictionary<System.String, System.Object>
| Improve this Doc View Source

Exception

Declaration
public Exception? Exception { get; set; }
Property Value
Type Description
System.Nullable<Exception>
| Improve this Doc View Source

LifetimeScope

Declaration
public ILifetimeScope LifetimeScope { get; }
Property Value
Type Description
ILifetimeScope
| Improve this Doc View Source

Parameters

Declaration
public ICommandParameters Parameters { get; }
Property Value
Type Description
ICommandParameters
| Improve this Doc View Source

ParentContext

Declaration
public ICommandContext ParentContext { get; set; }
Property Value
Type Description
ICommandContext
| Improve this Doc View Source

RootContext

Declaration
public ICommandContext RootContext { get; set; }
Property Value
Type Description
ICommandContext
| Improve this Doc View Source

ServiceProvider

Declaration
public IServiceProvider ServiceProvider { get; }
Property Value
Type Description
IServiceProvider

Methods

| Improve this Doc View Source

DisposeAsync()

Declaration
public ValueTask DisposeAsync()
Returns
Type Description
ValueTask

Implements

ICommandContext
IAsyncDisposable

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)