/// <summary> /// Initializes a new instance of the <see cref="SolutionExplorerMenuCommand"/> class. /// Adds our command handlers for menu (commands must exist in the command table file) /// </summary> /// <param name="package">Owner package, not null.</param> private SolutionExplorerMenuCommand(Package package, IBacktestObserver backtestObserver) { if (package == null) { throw new ArgumentNullException(nameof(package)); } _backtestObserver = backtestObserver; _package = package as QuantConnectPackage; _dte2 = _serviceProvider.GetService(typeof(SDTE)) as DTE2; _authenticationCommand = new AuthenticationCommand(); var commandService = _serviceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (commandService != null) { RegisterSendForBacktesting(commandService); RegisterSaveToQuantConnect(commandService); } }
/// <summary> /// Initializes the singleton instance of the command. /// </summary> /// <param name="package">Owner package, not null.</param> public static void Initialize(Package package, IBacktestObserver backtestObserver) { Instance = new SolutionExplorerMenuCommand(package, backtestObserver); }