private CloudExplorerCommand ( Microsoft.VisualStudio.Shell.Package package ) : GoogleCloudExtension.Analytics | ||
package | Microsoft.VisualStudio.Shell.Package | Owner package, not null. |
리턴 | 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);
}
}