protected override void Initialize()
        {
            var dte     = GetService(typeof(DTE)) as DTE2;
            var options = (Options)GetDialogPage(typeof(Options));

            CleanBinAndObjCommand.Initialize(this, dte, options);
            base.Initialize();
        }
        /// <summary>
        ///     Initializes the singleton instance of the command.
        /// </summary>
        /// <param name="package">Owner package, not null.</param>
        /// <param name="dte"></param>
        /// <param name="options">options object</param>
        public static async Task InitializeAsync(AsyncPackage package)
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            var dte = await package.GetServiceAsync <DTE, DTE2>();

            var options = (Options)package.GetDialogPage(typeof(Options));

            Instance = new CleanBinAndObjCommand(package, dte, options);
        }
 /// <summary>
 ///     Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 /// <param name="dte"></param>
 /// <param name="options">options object</param>
 public static void Initialize(Package package, DTE2 dte, Options options)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     Instance = new CleanBinAndObjCommand(package, dte, options);
 }
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            await CleanBinAndObjCommand.InitializeAsync(this);
        }