diff --git a/MBS.Framework/Context.cs b/MBS.Framework/Context.cs index 415bda1..0976dd4 100644 --- a/MBS.Framework/Context.cs +++ b/MBS.Framework/Context.cs @@ -80,6 +80,12 @@ namespace MBS.Framework } private Dictionary> _CommandEventHandlers = new Dictionary>(); + /// + /// Attachs an event handler for the command with the ID specified by . + /// + /// true, if command event handler was attached, false otherwise. + /// The ID of the for which to attach an event handler. + /// The event handler to invoke when the is executed. public bool AttachCommandEventHandler(string commandID, EventHandler handler) { // handle command event handlers attached without a Command instance @@ -94,6 +100,13 @@ namespace MBS.Framework } return false; } + /// + /// Executes the command (i.e., calls all attached s for the ) with + /// the given , passing in the given parameters in an instance of . + /// + /// true, if command was executed, false otherwise. + /// Command identifier. + /// Named parameters. public bool ExecuteCommand(string commandID, KeyValuePair[] namedParameters = null) { if (_CommandEventHandlers.ContainsKey(commandID))