Skip to content

Instantly share code, notes, and snippets.

@tugcearar
Created July 6, 2019 16:20
Show Gist options
  • Save tugcearar/97c0936ce5954084b1715b18a423d7ee to your computer and use it in GitHub Desktop.
Save tugcearar/97c0936ce5954084b1715b18a423d7ee to your computer and use it in GitHub Desktop.
//
// Summary:
// Defines a command.
public interface ICommand
{
//
// Summary:
// Occurs when changes occur that affect whether or not the command should execute.
event EventHandler CanExecuteChanged;
//
// Summary:
// Defines the method that determines whether the command can execute in its current
// state.
//
// Parameters:
// parameter:
// Data used by the command. If the command does not require data to be passed,
// this object can be set to null.
//
// Returns:
// true if this command can be executed; otherwise, false.
bool CanExecute(object parameter);
//
// Summary:
// Defines the method to be called when the command is invoked.
//
// Parameters:
// parameter:
// Data used by the command. If the command does not require data to be passed,
// this object can be set to null.
void Execute(object parameter);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment