25 references to GetApartmentState
Microsoft.Build (4)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
729if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
438&& (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
Instance\RunningObjectTable.cs (2)
31if (Thread.CurrentThread.GetApartmentState() == ApartmentState.MTA) 60if (Thread.CurrentThread.GetApartmentState() == ApartmentState.MTA)
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Interaction.vb (1)
221If Thread.CurrentThread.GetApartmentState() <> ApartmentState.STA Then
PresentationCore (14)
System\Windows\Input\InputManager.cs (1)
143if(Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
System\Windows\Input\InputProcessorProfiles.cs (1)
63Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Initialize called on MTA thread!");
System\Windows\Input\InputProcessorProfilesLoader.cs (1)
60Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Load called on MTA thread!");
System\Windows\Input\TextServicesContext.cs (1)
47Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "SetDispatcherThreaad on MTA thread");
System\Windows\Media\Effects\BitmapEffect.cs (1)
27if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
System\Windows\OleServicesContext.cs (9)
105if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) 118if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) 131if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) 147if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) 161if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) 189if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) 202if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) 228if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) 258if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
PresentationFramework (3)
System\Windows\Documents\TextServicesHost.cs (1)
62Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "OnRegisterTextStore must be called on STA thread");
System\Windows\Standard\Debug.cs (1)
339if (Thread.CurrentThread.GetApartmentState() != expectedState)
System\Windows\Standard\Verify.cs (1)
41if (Thread.CurrentThread.GetApartmentState() != requiredState)
System.Collections.Concurrent (1)
System\Collections\Concurrent\BlockingCollection.cs (1)
1663((collections.Length == 63) && (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)))
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
506get => GetApartmentState();
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ControlTestBase.cs (1)
71if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)