SDL.TridionVSRazorExtension.Command.ItemContextDeleteCommand.ItemContextDeleteCommand C# (CSharp) Method

ItemContextDeleteCommand() private method

Initializes a new instance of the ItemContextDeleteCommand class. Adds our command handlers for menu (commands must exist in the command table file)
private ItemContextDeleteCommand ( Package package ) : System
package Package Owner package, not null.
return System
        private ItemContextDeleteCommand(Package package)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            this._package = package;

            OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            if (commandService != null)
            {
                var menuCommandID = new CommandID(CommandSet, CommandId);
                var menuItem = new OleMenuCommand(MenuItemCallback, null, BeforeQueryStatus, menuCommandID);
                commandService.AddCommand(menuItem);
            }
        }