//
//
//
//
// $Revision: 1965 $
//
using System;
namespace ICSharpCode.Core
{
///
/// Abstract implementation of the interface.
///
public abstract class AbstractCommand : ICommand
{
object owner = null;
///
/// Returns the owner of the command.
///
public virtual object Owner {
get {
return owner;
}
set {
owner = value;
OnOwnerChanged(EventArgs.Empty);
}
}
///
/// Invokes the command.
///
public abstract void Run();
protected virtual void OnOwnerChanged(EventArgs e)
{
if (OwnerChanged != null) {
OwnerChanged(this, e);
}
}
public event EventHandler OwnerChanged;
}
}