forked from micahosborne/UnityMVVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ICommand.cs
38 lines (32 loc) · 1.37 KB
/
ICommand.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//---------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//---------------------------------------------------------------------------
// Adapted for Unity
#if !NETFX_CORE
namespace System.Windows.Input
{
///<summary>
/// An interface that allows an application author to define a method to be invoked.
///</summary>
public interface ICommand
{
/// <summary>
/// Raised when the ability of the command to execute has changed.
/// </summary>
event EventHandler CanExecuteChanged;
/// <summary>
/// Returns whether the command can be executed.
/// </summary>
/// <param name="parameter">A parameter that may be used in executing the command. This parameter may be ignored by some implementations.</param>
/// <returns>true if the command can be executed with the given parameter and current state. false otherwise.</returns>
bool CanExecute(object parameter);
/// <summary>
/// Defines the method that should be executed when the command is executed.
/// </summary>
/// <param name="parameter">A parameter that may be used in executing the command. This parameter may be ignored by some implementations.</param>
void Execute(object parameter);
}
}
#endif