GoogleCloudExtension.CloudExplorer.CloudExplorerCommand.CloudExplorerCommand C# (CSharp) Méthode

CloudExplorerCommand() private méthode

Initializes a new instance of the CloudExplorerCommand class. Adds our command handlers for menu (commands must exist in the command table file)
private CloudExplorerCommand ( Microsoft.VisualStudio.Shell.Package package ) : GoogleCloudExtension.Analytics
package Microsoft.VisualStudio.Shell.Package Owner package, not null.
Résultat GoogleCloudExtension.Analytics
        private CloudExplorerCommand(Package package)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            _package = package;

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