C# Class Nexus.Client.Commands.CommandBindingBase

The base class for command bindings.
Inheritance: ICommandBinding
Datei anzeigen Open project: NexusMods/NexusModManager-4.5

Public Methods

Method Description
Execute ( ) : void

Executes the command.

Unbind ( ) : void

Disposes of the binding.

After this method is called, the binding between the trigger and command should no longer exist. In other words, activating the trigger should no longer execute the command.

Protected Methods

Method Description
CommandBindingBase ( object p_objTrigger, ICommand p_cmdCommand ) : System

A simple constructor that initializes the object with the given values.

OnCommandPropertyChanged ( PropertyChangedEventArgs e ) : void

Alters properties on the Trigger in response to property changes on the command.

Private Methods

Method Description
CommandPropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Handles the INotifyPropertyChanged.PropertyChanged event of the command.

Method Details

CommandBindingBase() protected method

A simple constructor that initializes the object with the given values.
protected CommandBindingBase ( object p_objTrigger, ICommand p_cmdCommand ) : System
p_objTrigger object The object that can trigger the command.
p_cmdCommand ICommand The command that can be triggered.
return System

Execute() public abstract method

Executes the command.
public abstract Execute ( ) : void
return void

OnCommandPropertyChanged() protected method

Alters properties on the Trigger in response to property changes on the command.
protected OnCommandPropertyChanged ( PropertyChangedEventArgs e ) : void
e System.ComponentModel.PropertyChangedEventArgs A describing the changed property.
return void

Unbind() public abstract method

Disposes of the binding.
After this method is called, the binding between the trigger and command should no longer exist. In other words, activating the trigger should no longer execute the command.
public abstract Unbind ( ) : void
return void