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

Class CommandBase

Inheritance
System.Object
CommandBase
Command
UnityEngineCommand
Implements
ICommand
Namespace: OpenMod.Core.Commands
Assembly: OpenMod.Core.dll
Syntax
public abstract class CommandBase : object, ICommand

Constructors

| Improve this Doc View Source

CommandBase(IServiceProvider)

Declaration
protected CommandBase(IServiceProvider serviceProvider)
Parameters
Type Name Description
IServiceProvider serviceProvider

Properties

| Improve this Doc View Source

Context

Declaration
public ICommandContext Context { get; }
Property Value
Type Description
ICommandContext

Methods

| Improve this Doc View Source

CheckPermissionAsync(String)

Declaration
public virtual Task<PermissionGrantResult> CheckPermissionAsync(string permission)
Parameters
Type Name Description
System.String permission
Returns
Type Description
Task<PermissionGrantResult>
| Improve this Doc View Source

ExecuteAsync()

Declaration
public abstract Task ExecuteAsync()
Returns
Type Description
Task
| Improve this Doc View Source

PrintAsync(String)

Declaration
public virtual Task PrintAsync(string message)
Parameters
Type Name Description
System.String message
Returns
Type Description
Task
| Improve this Doc View Source

PrintAsync(String, Color)

Declaration
public virtual Task PrintAsync(string message, Color color)
Parameters
Type Name Description
System.String message
Color color
Returns
Type Description
Task

Implements

ICommand

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)