protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            //Global.Package = this;

            // When initialized asynchronously, the current thread may be a background thread at this point.
            // Do any initialization that requires the UI thread after switching to the UI thread.
            await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            PreviewWindowCommand.Initialize(this);
        }
Exemple #2
0
        //Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
        //{
        //    if (args.Name.StartsWith("DocPrevGen"))
        //        return Assembly.Load(DocPreview.Resources.Resource1.DocPrevGen);
        //    else
        //        return null;
        //}

        #region Package Members

        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            PreviewWindowCommand.Initialize(this);
            base.Initialize();
        }