Gorgon
Show / Hide Table of Contents

Interface IEditorCommand<T>

An command used to carry out an operation.

Namespace: Gorgon.Editor.UI
Assembly: Gorgon.Editor.API.dll
Syntax
public interface IEditorCommand<in T>
Type Parameters
Name Description
T

The type of data to pass to the command.

Remarks

Commands are used to perform actions on a view model. They work similarly to events in that they are usually called in response to a UI action like a button click.

Methods

| Edit this page View Source

CanExecute(T)

Function to determine if a command can be executed or not.

Declaration
bool CanExecute(T args)
Parameters
Type Name Description
T args

The arguments to check.

Returns
Type Description
bool

true if the command can be executed, false if not.

| Edit this page View Source

Execute(T)

Function to execute the command.

Declaration
void Execute(T args)
Parameters
Type Name Description
T args

The arguments to pass to the command.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author