示例#1
0
 public virtual async Task InitializeAsync()
 {
     try
     {
         _visualStudioContext = await _instanceFactory.GetNewOrUsedInstanceAsync(SharedIntegrationHostFixture.RequiredPackageIds).ConfigureAwait(false);
     }
     catch
     {
         _messageFilter.Dispose();
         throw;
     }
 }
示例#2
0
        public static void ClassCleanup()
        {
            if (_dte != null)
            {
                _dte.Quit();
                _dte = null;
            }

            if (_msgFilter != null)
            {
                _msgFilter.Dispose();
                _msgFilter = null;
            }
        }
示例#3
0
        protected AbstractIntegrationTest(VisualStudioInstanceFactory instanceFactory)
        {
            Assert.Equal(ApartmentState.STA, Thread.CurrentThread.GetApartmentState());

            // Install a COM message filter to handle retry operations when the first attempt fails
            _messageFilter   = RegisterMessageFilter();
            _instanceFactory = instanceFactory;

            try
            {
                Helper.Automation.TransactionTimeout = 20000;
            }
            catch
            {
                _messageFilter.Dispose();
                throw;
            }
        }