UnregisterCommand() public method

A method to delete a command.
public UnregisterCommand ( string commandKey ) : void
commandKey string
return void
示例#1
0
        /// <summary>
        /// Provides loading for the wpf module exports.
        /// </summary>
        public override void Load()
        {
            this.AppKernel.Bind<ICommandFactory>().ToMethod(x =>
            {
                var newCmdFactory = new CommandFactory();

                newCmdFactory.UnregisterCommand(WpfExitCommandKey);
                newCmdFactory.RegisterCommand(WpfExitCommandKey, WpfProviderMethod);

                return newCmdFactory;
            });
        }