Exemplo n.º 1
0
        static public VsWaitLoop TryCreate(string text)
        {
            VsWaitLoop waitLoop = new VsWaitLoop(text);
            if (waitLoop._messagePump == null)
                return null;

            return waitLoop;
        }
Exemplo n.º 2
0
        static public VsWaitLoop TryCreate(string text)
        {
            VsWaitLoop waitLoop = new VsWaitLoop(text);

            if (waitLoop._messagePump == null)
            {
                return(null);
            }

            return(waitLoop);
        }
Exemplo n.º 3
0
 public HostWaitLoop(string message)
 {
     try
     {
         _vsWaitLoop = VSImpl.VsWaitLoop.TryCreate(message);
     }
     catch (FileNotFoundException)
     {
         // Visual Studio is not installed on this box
     }
 }
Exemplo n.º 4
0
 public HostWaitLoop(string message)
 {
     try
     {
         _vsWaitLoop = VSImpl.VsWaitLoop.TryCreate(message);
     }
     catch (FileNotFoundException)
     {
         // Visual Studio is not installed on this box
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// Waits on the specified handle. This method should be called only once.
        /// </summary>
        /// <param name="launchCompleteHandle">[Required] handle to wait on</param>
        /// <param name="cancellationSource">[Required] Object to signal cancellation if cancellation is requested</param>
        /// <returns>true if we were able to successfully wait, false if we failed to wait and should fall back to the CLR provided wait function</returns>
        /// <exception cref="FileNotFoundException">Thrown by the JIT if Visual Studio is not installed</exception>
        public void Wait(WaitHandle launchCompleteHandle, CancellationTokenSource cancellationSource)
        {
            if (_vsWaitLoop != null)
            {
                _vsWaitLoop.Wait(launchCompleteHandle, cancellationSource);

                lock (_progressLock)
                {
                    _vsWaitLoop = null;
                }
            }
            else
            {
                launchCompleteHandle.WaitOne(); // For glass, fall back to waiting using the .NET Framework APIs
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Waits on the specified handle. This method should be called only once.
        /// </summary>
        /// <param name="launchCompleteHandle">[Required] handle to wait on</param>
        /// <param name="cancellationSource">[Required] Object to signal cancellation if cancellation is requested</param>
        /// <returns>true if we were able to successfully wait, false if we failed to wait and should fall back to the CLR provided wait function</returns>
        /// <exception cref="FileNotFoundException">Thrown by the JIT if Visual Studio is not installed</exception>
        public void Wait(WaitHandle launchCompleteHandle, CancellationTokenSource cancellationSource)
        {
            if (_vsWaitLoop != null)
            {
                _vsWaitLoop.Wait(launchCompleteHandle, cancellationSource);

                lock (_progressLock)
                {
                    _vsWaitLoop = null;
                }
            }
            else
            {
                launchCompleteHandle.WaitOne(); // For glass, fall back to waiting using the .NET Framework APIs
            }
        }