src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Utilities/UIThreadHelper.cs
/// <summary>
/// Helper utility to ensure that we are on UI thread. Needs to be called 
/// in every method/propetrty needed UI thread for our protection (to avoid hangs 
/// which are hard to repro and investigate).
/// </summary>
Helper utility to ensure that we are on UI thread. Needs to be called
in every method/propetrty needed UI thread for our protection (to avoid hangs
which are hard to repro and investigate).
Helper utility to ensure that we are on UI thread . Needs to be called in every method / propetrty needed UI thread for our protection ( to avoid hangs which are hard to repro and investigate ) .
public static void VerifyOnUIThread([CallerMemberName] string memberName = "")
        {
            if (!UnitTestHelper.IsRunningUnitTests)
            {
                try
                {
                    ThreadHelper.ThrowIfNotOnUIThread(memberName);
                }
                catch
                {
                    System.Diagnostics.Debug.Fail("Call made on the Non-UI thread by " + memberName);
                    throw;
                }
            }
        }
public static void VerifyOnUIThread ( [ CallerMemberName ] string memberName = " " ) { if ( ! UnitTestHelper . IsRunningUnitTests ) { try { ThreadHelper . ThrowIfNotOnUIThread ( memberName ) ; } catch { System . Diagnostics . Debug . Fail ( " " + memberName ) ; throw ; } } }
Helper utility to ensure that we are on UI thread.
Helper utility to ensure that we are on UI thread .
string
[CallerMemberName]