Skip to content

T_Aml_Editor_Plugin_Contracts_RelayCommand_1

AutomationML edited this page Jun 24, 2019 · 1 revision

RelayCommand(T) Class

AutomationML Editor

Class RelayCommand as it was defined in an MSDN Article by Josh Smith. This class is an implementation pattern for a plugin command, which the AutomationML Editor can bind to a plugin Menu. This Implementation provides the UI with the state information, to enabled or disable a command, and with the invocation Method.

Inheritance Hierarchy

System.Object
  Aml.Editor.Plugin.Contracts.RelayCommand(T)
Namespace: Aml.Editor.Plugin.Contracts
Assembly: AML.Editor.PluginContracts (in AML.Editor.PluginContracts.dll) Version: 2.1

Syntax

C#

public class RelayCommand<T> : ICommand

VB

Public Class RelayCommand(Of T)
	Implements ICommand

C++

generic<typename T>
public ref class RelayCommand : ICommand

Type Parameters

 

T
Type of Command Data (this may be the Systemtype 'object')
  The RelayCommand(T) type exposes the following members.

Constructors

 

Name Description
Public method RelayCommand(T)() Initializes a new instance of the RelayCommand(T) class.
Public method RelayCommand(T)(Action(T), Predicate(T)) Creates a new command.
  Back to Top

Properties

 

Name Description
Public property Identifier Gets or sets the identifier for the command, when the command is published by the plugin class, the Identifier can be set as an PluginCommand
  Back to Top

Methods

 

Name Description
Public method CanExecute Defines the method used to determine whether the command in the current state can be performed.
Public method Execute Defines the method that will be called when the command is invoked.
  Back to Top

Events

 

Name Description
Public event CanExecuteChanged Occurs, when property changes are notified, which have an effect on the command execution.
  Back to Top

Fields

 

Name Description
Protected field _canExecute The _can execute
Protected field _execute The _execute
  Back to Top

See Also

Reference

Aml.Editor.Plugin.Contracts Namespace

Clone this wiki locally