465 references to CurrentThread
Aspire.Dashboard.Components.Tests (7)
UseCultureAttribute.cs (7)
12/// <see cref="Thread.CurrentThread" /> <see cref="CultureInfo.CurrentCulture" /> and 68_originalCulture = Thread.CurrentThread.CurrentCulture; 69_originalUICulture = Thread.CurrentThread.CurrentUICulture; 71Thread.CurrentThread.CurrentCulture = Culture; 72Thread.CurrentThread.CurrentUICulture = UICulture; 85Thread.CurrentThread.CurrentCulture = _originalCulture!; 86Thread.CurrentThread.CurrentUICulture = _originalUICulture!;
Aspire.Microsoft.Data.SqlClient (3)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\ExceptionExtensions.cs (3)
20var originalUICulture = Thread.CurrentThread.CurrentUICulture; 24Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; 29Thread.CurrentThread.CurrentUICulture = originalUICulture;
Aspire.Microsoft.EntityFrameworkCore.SqlServer (3)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\ExceptionExtensions.cs (3)
20var originalUICulture = Thread.CurrentThread.CurrentUICulture; 24Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; 29Thread.CurrentThread.CurrentUICulture = originalUICulture;
Binding.Http.IntegrationTests (2)
OperationContextTests.cs (2)
48int currentThreadId = Thread.CurrentThread.ManagedThreadId; 50Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId);
Binding.Tcp.IntegrationTests (8)
OperationContextAsyncFlowTests.cs (8)
35int currentThreadId = Thread.CurrentThread.ManagedThreadId; 37Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId); 70int currentThreadId = Thread.CurrentThread.ManagedThreadId; 72Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId); 78currentThreadId = Thread.CurrentThread.ManagedThreadId; 80Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId); 161int currentThreadId = Thread.CurrentThread.ManagedThreadId; 163Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId);
dotnet-svcutil.xmlserializer (3)
Microsoft\Tools\ServiceModel\SvcUtil\Tool.cs (3)
96Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture.GetConsoleFallbackUICulture(); 100(System.Console.OutputEncoding.CodePage != Thread.CurrentThread.CurrentUICulture.TextInfo.OEMCodePage)) 102Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
181if (Thread.CurrentThread.CurrentCulture.Parent.Name == "en")
Microsoft.AspNetCore.Components.Tests (25)
Rendering\RendererSynchronizationContextTest.cs (25)
20var thread = Thread.CurrentThread; 28capturedThread = Thread.CurrentThread; 68var thread = Thread.CurrentThread; 89capturedThread = Thread.CurrentThread; 229capturedThread = Thread.CurrentThread; 245Assert.Same(Thread.CurrentThread, capturedThread); 250Assert.Same(Thread.CurrentThread, capturedThread); 296var thread = Thread.CurrentThread; 302capturedThread = Thread.CurrentThread; 405var thread = Thread.CurrentThread; 411capturedThread = Thread.CurrentThread; 424var thread = Thread.CurrentThread; 444capturedThread = Thread.CurrentThread; 497var thread = Thread.CurrentThread; 502return Thread.CurrentThread; 514var thread = Thread.CurrentThread; 535return Thread.CurrentThread; 585var thread = Thread.CurrentThread; 591capturedThread = Thread.CurrentThread; 605var thread = Thread.CurrentThread; 625capturedThread = Thread.CurrentThread; 679var thread = Thread.CurrentThread; 684return Task.FromResult(Thread.CurrentThread); 696var thread = Thread.CurrentThread; 717return Task.FromResult(Thread.CurrentThread);
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHostBuilder.cs (1)
205var currentThread = Thread.CurrentThread;
Microsoft.AspNetCore.DataProtection.Tests (1)
KeyManagement\KeyRingProviderTests.cs (1)
688Thread foregroundThread = Thread.CurrentThread;
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
FormatWeekHelper.cs (1)
21var calendar = Thread.CurrentThread.CurrentCulture.Calendar;
Microsoft.AspNetCore.OutputCaching.Tests (3)
OutputCacheKeyProviderTests.cs (3)
115var culture = Thread.CurrentThread.CurrentCulture; 118Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("fr-FR"); 124Thread.CurrentThread.CurrentCulture = culture;
Microsoft.Build (23)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
1436file.WriteLine("{0}({1})-{2}: {3}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, DateTime.UtcNow.Ticks, message);
BackEnd\Components\RequestBuilder\Lookup.cs (1)
1376_threadIdThatEnteredScope = Thread.CurrentThread.ManagedThreadId;
BackEnd\Components\RequestBuilder\RequestBuilder.cs (4)
723Thread.CurrentThread.Priority = _componentHost.BuildParameters.BuildThreadPriority; 724Thread.CurrentThread.IsBackground = true; 736if (string.IsNullOrEmpty(Thread.CurrentThread.Name)) 738Thread.CurrentThread.Name = threadName;
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
360_yieldThreadId = Thread.CurrentThread.ManagedThreadId; 389ErrorUtilities.VerifyThrow(_yieldThreadId == Thread.CurrentThread.ManagedThreadId, "Cannot call Reacquire() on thread {0} when Yield() was called on thread {1}", Thread.CurrentThread.ManagedThreadId, _yieldThreadId);
BackEnd\Components\Scheduler\Scheduler.cs (2)
2570file.Write("{0}({1})-{2}: ", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, _schedulingData.EventTime.Ticks);
BackEnd\Node\OutOfProcServerNode.cs (2)
368Thread.CurrentThread.CurrentCulture = command.Culture; 369Thread.CurrentThread.CurrentUICulture = command.UICulture;
CommunicationsUtilities.cs (2)
840file.WriteLine("{0} (TID {1}) {2,15} +{3,10}ms: {4}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, now, millisecondsSinceLastLog, message);
Instance\RunningObjectTable.cs (2)
31if (Thread.CurrentThread.GetApartmentState() == ApartmentState.MTA) 60if (Thread.CurrentThread.GetApartmentState() == ApartmentState.MTA)
NodeEndpointOutOfProcBase.cs (1)
295ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
ThreadPoolExtensions.cs (4)
32Thread.CurrentThread.CurrentCulture = culture; 37Thread.CurrentThread.CurrentUICulture = uiCulture; 47Thread.CurrentThread.CurrentCulture = originalThreadCulture; 52Thread.CurrentThread.CurrentUICulture = originalThreadUICulture;
Microsoft.Build.CommandLine.UnitTests (4)
XMake_Tests.cs (4)
886Thread thisThread = Thread.CurrentThread; 918Thread thisThread = Thread.CurrentThread; 953Thread thisThread = Thread.CurrentThread; 1166Assert.Equal(new CultureInfo("en"), Thread.CurrentThread.CurrentUICulture);
Microsoft.Build.Engine.UnitTests (46)
BackEnd\NodeEndpointInProc_Tests.cs (6)
111_dataReceivedContext = new DataReceivedContext(Thread.CurrentThread, packet); 305Assert.Equal(_host.DataReceivedContext.thread.ManagedThreadId, Thread.CurrentThread.ManagedThreadId); 311Assert.Equal(_host.DataReceivedContext.thread.ManagedThreadId, Thread.CurrentThread.ManagedThreadId); 338Assert.NotEqual(_host.DataReceivedContext.thread.ManagedThreadId, Thread.CurrentThread.ManagedThreadId); 348Assert.NotEqual(_host.DataReceivedContext.thread.ManagedThreadId, Thread.CurrentThread.ManagedThreadId); 441_linkStatusTable[endpoint] = new LinkStatusContext(Thread.CurrentThread, status);
BackEnd\TaskHostConfiguration_Tests.cs (30)
46culture: Thread.CurrentThread.CurrentCulture, 47uiCulture: Thread.CurrentThread.CurrentUICulture, 81culture: Thread.CurrentThread.CurrentCulture, 82uiCulture: Thread.CurrentThread.CurrentUICulture, 116culture: Thread.CurrentThread.CurrentCulture, 117uiCulture: Thread.CurrentThread.CurrentUICulture, 188culture: Thread.CurrentThread.CurrentCulture, 189uiCulture: Thread.CurrentThread.CurrentUICulture, 214culture: Thread.CurrentThread.CurrentCulture, 215uiCulture: Thread.CurrentThread.CurrentUICulture, 241culture: Thread.CurrentThread.CurrentCulture, 242uiCulture: Thread.CurrentThread.CurrentUICulture, 273culture: Thread.CurrentThread.CurrentCulture, 274uiCulture: Thread.CurrentThread.CurrentUICulture, 305culture: Thread.CurrentThread.CurrentCulture, 306uiCulture: Thread.CurrentThread.CurrentUICulture, 344culture: Thread.CurrentThread.CurrentCulture, 345uiCulture: Thread.CurrentThread.CurrentUICulture, 441culture: Thread.CurrentThread.CurrentCulture, 442uiCulture: Thread.CurrentThread.CurrentUICulture, 492culture: Thread.CurrentThread.CurrentCulture, 493uiCulture: Thread.CurrentThread.CurrentUICulture, 541culture: Thread.CurrentThread.CurrentCulture, 542uiCulture: Thread.CurrentThread.CurrentUICulture, 589culture: Thread.CurrentThread.CurrentCulture, 590uiCulture: Thread.CurrentThread.CurrentUICulture, 644culture: Thread.CurrentThread.CurrentCulture, 645uiCulture: Thread.CurrentThread.CurrentUICulture, 694culture: Thread.CurrentThread.CurrentCulture, 695uiCulture: Thread.CurrentThread.CurrentUICulture,
Evaluation\Expander_Tests.cs (3)
4971var currentThread = Thread.CurrentThread; 5014var currentThread = Thread.CurrentThread; 5057var currentThread = Thread.CurrentThread;
Evaluation\ExpanderFunction_Tests.cs (1)
262Thread currentThread = Thread.CurrentThread;
FileUtilities_Tests.cs (3)
303var currentCulture = Thread.CurrentThread.CurrentCulture; 306Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR"); // Turkish 314Thread.CurrentThread.CurrentCulture = currentCulture;
TerminalLogger_Tests.cs (3)
55private readonly CultureInfo _originalCulture = Thread.CurrentThread.CurrentCulture; 69Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; 147Thread.CurrentThread.CurrentCulture = _originalCulture;
Microsoft.Build.Framework (1)
BuildEventArgs.cs (1)
91threadId = System.Threading.Thread.CurrentThread.GetHashCode();
Microsoft.Build.Tasks.Core (1)
BootstrapperUtil\Util.cs (1)
77public static CultureInfo DefaultCultureInfo => System.Threading.Thread.CurrentThread.CurrentUICulture;
Microsoft.Build.Utilities.UnitTests (3)
CommandLineBuilder_Tests.cs (3)
62var currentCulture = Thread.CurrentThread.CurrentCulture; 65Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR"); // Turkish 73Thread.CurrentThread.CurrentCulture = currentCulture;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
23if (Thread.CurrentThread.IsThreadPoolThread)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
1864var originalCulture = Thread.CurrentThread.CurrentCulture; 1865Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR", useUserOverride: false); 1868Thread.CurrentThread.CurrentCulture = originalCulture; 2902var currentUICultureName = Thread.CurrentThread.CurrentUICulture.Name;
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (3)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (2)
90if (Thread.CurrentThread.CurrentCulture.Name == SupportedLanguage) 205if (Thread.CurrentThread.CurrentCulture.Name == SupportedLanguage)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
133if (Thread.CurrentThread.CurrentCulture.Name == "en-US")
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\SemanticErrorTests.cs (6)
1695var savedCurrentCulture = Thread.CurrentThread.CurrentCulture; 1696var savedCurrentUICulture = Thread.CurrentThread.CurrentUICulture; 1697Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; 1698Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; 1712Thread.CurrentThread.CurrentCulture = savedCurrentCulture; 1713Thread.CurrentThread.CurrentUICulture = savedCurrentUICulture;
Microsoft.CodeAnalysis.EditorFeatures (2)
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ReferenceCounting.cs (2)
79_thread = Thread.CurrentThread; 83=> Contract.ThrowIfFalse(Thread.CurrentThread == _thread);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Threading\WpfTestRunner.cs (1)
59Debug.Assert(sta.StaThread == Thread.CurrentThread);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Utilities\PatternMatcherTests.cs (3)
404var previousCulture = Thread.CurrentThread.CurrentCulture; 406Thread.CurrentThread.CurrentCulture = turkish; 417Thread.CurrentThread.CurrentCulture = previousCulture;
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
23if (Thread.CurrentThread.IsThreadPoolThread)
Microsoft.CodeAnalysis.Test.Utilities (1)
Assert\UseCultureAttribute.cs (1)
17/// <see cref="Thread.CurrentThread" /> <see cref="CultureInfo.CurrentCulture" /> and
Microsoft.CodeAnalysis.UnitTests (3)
CommonCommandLineParserTests.cs (3)
53CultureInfo saveUICulture = Thread.CurrentThread.CurrentUICulture; 64Thread.CurrentThread.CurrentUICulture = preferred; 81Thread.CurrentThread.CurrentUICulture = saveUICulture;
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
2900Dim currentUICultureName = Thread.CurrentThread.CurrentUICulture.Name
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (9)
CodeGen\AnonymousTypesCodeGenTests.vb (6)
372Dim currCulture = System.Threading.Thread.CurrentThread.CurrentCulture 373System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture 425System.Threading.Thread.CurrentThread.CurrentCulture = currCulture 772Dim currCulture = System.Threading.Thread.CurrentThread.CurrentCulture 773System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture 812System.Threading.Thread.CurrentThread.CurrentCulture = currCulture
Semantics\StaticLocalsSemanticTests.vb (3)
347Dim currCulture = Thread.CurrentThread.CurrentCulture 348Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture 392Thread.CurrentThread.CurrentCulture = currCulture
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (14)
Semantics\BinaryOperators.vb (9)
27Dim currCulture = System.Threading.Thread.CurrentThread.CurrentCulture 28System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US", useUserOverride:=False) 57System.Threading.Thread.CurrentThread.CurrentCulture = currCulture 66Dim currCulture = System.Threading.Thread.CurrentThread.CurrentCulture 67System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US", useUserOverride:=False) 233System.Threading.Thread.CurrentThread.CurrentCulture = currCulture 388Dim currCulture = System.Threading.Thread.CurrentThread.CurrentCulture 389System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US", useUserOverride:=False) 501System.Threading.Thread.CurrentThread.CurrentCulture = currCulture
Semantics\Conversions.vb (3)
3288Dim currCulture = System.Threading.Thread.CurrentThread.CurrentCulture 3289System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US") 3459System.Threading.Thread.CurrentThread.CurrentCulture = currCulture
Semantics\InterpolatedStringTests.vb (2)
560Dim previousCulture = Thread.CurrentThread.CurrentCulture 589Assert.Equal(previousCulture, Thread.CurrentThread.CurrentCulture)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (22)
DocumentationComments\DocCommentTests.vb (6)
12132saveUICulture = Thread.CurrentThread.CurrentUICulture 12133Thread.CurrentThread.CurrentUICulture = preferred 12141Thread.CurrentThread.CurrentUICulture = saveUICulture 12173saveUICulture = Thread.CurrentThread.CurrentUICulture 12174Thread.CurrentThread.CurrentUICulture = preferred 12182Thread.CurrentThread.CurrentUICulture = saveUICulture
SymbolDisplay\ObjectDisplayTests.vb (6)
227Dim originalCulture = CurrentThread.CurrentCulture 229CurrentThread.CurrentCulture = New CultureInfo(1031) ' de-DE 239Assert.Equal("12,5", ObjectDisplay.FormatLiteral(decimalValue, ObjectDisplayOptions.None, CurrentThread.CurrentCulture)) 245Assert.Equal("12,5", ObjectDisplay.FormatLiteral(doubleValue, ObjectDisplayOptions.None, CurrentThread.CurrentCulture)) 251Assert.Equal("12,5", ObjectDisplay.FormatLiteral(singleValue, ObjectDisplayOptions.None, CurrentThread.CurrentCulture)) 254CurrentThread.CurrentCulture = originalCulture
SymbolDisplay\SymbolDisplayTests.vb (10)
3196Dim oldCulture = Thread.CurrentThread.CurrentCulture 3198Thread.CurrentThread.CurrentCulture = CType(oldCulture.Clone(), CultureInfo) 3199Thread.CurrentThread.CurrentCulture.NumberFormat.NegativeSign = "~" 3200Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = "," 3215Thread.CurrentThread.CurrentCulture = oldCulture 3238Dim oldCulture = Thread.CurrentThread.CurrentCulture 3240Thread.CurrentThread.CurrentCulture = CType(oldCulture.Clone(), CultureInfo) 3241Thread.CurrentThread.CurrentCulture.NumberFormat.NegativeSign = "~" 3242Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = "," 3257Thread.CurrentThread.CurrentCulture = oldCulture
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (3)
Scanner\ScannerTests.vb (3)
1805Dim SavedCultureInfo = CurrentThread.CurrentCulture 1807CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("de-DE", False) 1837CurrentThread.CurrentCulture = SavedCultureInfo
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
23if (Thread.CurrentThread.IsThreadPoolThread)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
TestExportJoinableTaskContext.cs (1)
56mainThread = Thread.CurrentThread;
TestExportJoinableTaskContext+DenyExecutionSynchronizationContext.cs (1)
75/// used for checking if <see cref="Thread.CurrentThread"/> matches a known "main thread", and ensures that
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
CodeCleanup\FixIncorrectTokenTests.cs (3)
715var savedCulture = System.Threading.Thread.CurrentThread.CurrentCulture; 719System.Threading.Thread.CurrentThread.CurrentCulture = 729System.Threading.Thread.CurrentThread.CurrentCulture = savedCulture;
CodeCleanup\ReduceTokenTests.cs (7)
1723var savedCulture = System.Threading.Thread.CurrentThread.CurrentCulture; 1727System.Threading.Thread.CurrentThread.CurrentCulture = 1751System.Threading.Thread.CurrentThread.CurrentCulture = savedCulture; 1758var oldCulture = Thread.CurrentThread.CurrentCulture; 1761Thread.CurrentThread.CurrentCulture = (CultureInfo)oldCulture.Clone(); 1762Thread.CurrentThread.CurrentCulture.NumberFormat.NegativeSign = "~"; 1785Thread.CurrentThread.CurrentCulture = oldCulture;
UtilityTest\AsyncLazyTests.cs (2)
71synchronousRequestThread = Thread.CurrentThread; 93asyncContinuationRanSynchronously = currentSynchronousRequestThread != null && currentSynchronousRequestThread == Thread.CurrentThread;
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
47Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Microsoft.DotNet.AsmDiff (2)
Program.cs (2)
94Thread.CurrentThread.CurrentCulture = cultureInfo; 95Thread.CurrentThread.CurrentUICulture = cultureInfo;
Microsoft.Extensions.Diagnostics.Testing.Tests (3)
Logging\FakeLoggerTests.cs (3)
121var oldCulture = Thread.CurrentThread.CurrentCulture; 122Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("fr-CA"); 142Thread.CurrentThread.CurrentCulture = oldCulture;
Microsoft.Extensions.Telemetry.Tests (1)
Enrichment\ProcessLogEnricherTests.cs (1)
63Assert.Equal(Thread.CurrentThread.ManagedThreadId.ToString(CultureInfo.InvariantCulture), enrichedState[ProcessEnricherTagNames.ThreadId]);
Microsoft.Gen.Logging.Generated.Tests (3)
LogMethodTests.cs (3)
829var oldCulture = Thread.CurrentThread.CurrentCulture; 830Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("fr-CA"); 836Thread.CurrentThread.CurrentCulture = oldCulture;
Microsoft.Maui.Graphics (1)
PdfExportContext.cs (1)
22 if ("en-US".Equals(Thread.CurrentThread.CurrentCulture.Name, StringComparison.Ordinal))
Microsoft.Maui.Resizetizer (5)
AsyncTask.cs (5)
59 uiThreadId = Thread.CurrentThread.ManagedThreadId; 108 if (uiThreadId == Thread.CurrentThread.ManagedThreadId) 137 if (uiThreadId == Thread.CurrentThread.ManagedThreadId) 182 if (uiThreadId == Thread.CurrentThread.ManagedThreadId) 216 if (uiThreadId == Thread.CurrentThread.ManagedThreadId)
Microsoft.ML.AutoML.Tests (6)
TunerTests.cs (6)
393var originalCuture = Thread.CurrentThread.CurrentCulture; 395Thread.CurrentThread.CurrentCulture = usCulture; 397Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator.Should().Be("."); 409Thread.CurrentThread.CurrentCulture = frCulture; 410Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator.Should().Be(","); 421Thread.CurrentThread.CurrentCulture = originalCuture;
Microsoft.ML.CodeGenerator.Tests (3)
TrainerGeneratorTests.cs (3)
39var currentCulture = Thread.CurrentThread.CurrentCulture; 40Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE"); 45Thread.CurrentThread.CurrentCulture = currentCulture;
Microsoft.ML.IntegrationTests (1)
IntegrationTestBaseClass.cs (1)
39Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Microsoft.ML.PerformanceTests (1)
Program.cs (1)
20Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Microsoft.ML.SearchSpace.Tests (3)
ParameterTest.cs (3)
126var originalCuture = Thread.CurrentThread.CurrentCulture; 128Thread.CurrentThread.CurrentCulture = culture; 133Thread.CurrentThread.CurrentCulture = originalCuture;
Microsoft.ML.TestFramework (1)
BaseTestClass.cs (1)
47Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Microsoft.ML.Tests (6)
TrainerEstimators\TreeEstimators.cs (3)
777var currentCulture = Thread.CurrentThread.CurrentCulture; 778Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE"); 786Thread.CurrentThread.CurrentCulture = currentCulture;
Transformers\LineParserTests.cs (3)
54var currentCulture = Thread.CurrentThread.CurrentCulture; 55Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE"); 73Thread.CurrentThread.CurrentCulture = currentCulture;
Microsoft.VisualBasic.Core (9)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (1)
136nfi = Threading.Thread.CurrentThread.CurrentCulture.NumberFormat
Microsoft\VisualBasic\CompilerServices\Utils.vb (2)
69Return System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat 77Return System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ANSICodePage
Microsoft\VisualBasic\CompilerServices\VB6File.vb (1)
2112NegativeSign = Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NegativeSign
Microsoft\VisualBasic\DateAndTime.vb (1)
134Return Threading.Thread.CurrentThread.CurrentCulture.Calendar
Microsoft\VisualBasic\Strings.vb (4)
519Return Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToLower(Value) 528Return Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToLower(Value) 1043Return Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToUpper(Value) 1052Return Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToUpper(Value)
Microsoft.VisualBasic.Forms (6)
Microsoft\VisualBasic\ApplicationServices\ApplicationBase.vb (4)
30Return Thread.CurrentThread.CurrentCulture 74Return Thread.CurrentThread.CurrentUICulture 86Thread.CurrentThread.CurrentCulture = New Globalization.CultureInfo(cultureName) 98Thread.CurrentThread.CurrentUICulture = New Globalization.CultureInfo(cultureName)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
111Return String.Format(Thread.CurrentThread.CurrentCulture, resourceKey, args)
Microsoft\VisualBasic\Interaction.vb (1)
221If Thread.CurrentThread.GetApartmentState() <> ApartmentState.STA Then
Microsoft.VisualBasic.Tests (6)
Microsoft\VisualBasic\ApplicationServices\ApplicationBaseTests.cs (6)
13Assert.Equal(Thread.CurrentThread.CurrentCulture, culture); 17Assert.Equal(Thread.CurrentThread.CurrentCulture, app.Culture); 22Thread.CurrentThread.CurrentCulture = culture; 31Assert.Equal(Thread.CurrentThread.CurrentUICulture, culture); 35Assert.Equal(Thread.CurrentThread.CurrentUICulture, app.UICulture); 40Thread.CurrentThread.CurrentUICulture = culture;
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
CodeModel\MethodXML\MethodXMLTests_VBAssignments.vb (2)
869Dim currentThread = Thread.CurrentThread 934Dim currentThread = Thread.CurrentThread
MSBuild (11)
CommunicationsUtilities.cs (2)
840file.WriteLine("{0} (TID {1}) {2,15} +{3,10}ms: {4}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, now, millisecondsSinceLastLog, message);
NodeEndpointOutOfProcBase.cs (1)
295ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
OutOfProcTaskHostNode.cs (2)
919Thread.CurrentThread.CurrentCulture = taskConfiguration.Culture; 920Thread.CurrentThread.CurrentUICulture = taskConfiguration.UICulture;
PerformanceLogEventListener.cs (1)
146s_builder.Append($"[{DateTime.UtcNow.ToString("o")}] Event={eventData.EventSource.Name}/{eventData.EventName} ProcessID={_processIDStr} ThreadID={System.Threading.Thread.CurrentThread.ManagedThreadId}\t ");
ThreadPoolExtensions.cs (4)
32Thread.CurrentThread.CurrentCulture = culture; 37Thread.CurrentThread.CurrentUICulture = uiCulture; 47Thread.CurrentThread.CurrentCulture = originalThreadCulture; 52Thread.CurrentThread.CurrentUICulture = originalThreadUICulture;
XMake.cs (1)
1906Thread thisThread = Thread.CurrentThread;
MSBuildTaskHost (7)
CommunicationsUtilities.cs (2)
840file.WriteLine("{0} (TID {1}) {2,15} +{3,10}ms: {4}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, now, millisecondsSinceLastLog, message);
NodeEndpointOutOfProcBase.cs (1)
295ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
OutOfProcTaskAppDomainWrapperBase.cs (2)
235staThread.CurrentCulture = Thread.CurrentThread.CurrentCulture; 236staThread.CurrentUICulture = Thread.CurrentThread.CurrentUICulture;
OutOfProcTaskHostNode.cs (2)
919Thread.CurrentThread.CurrentCulture = taskConfiguration.Culture; 920Thread.CurrentThread.CurrentUICulture = taskConfiguration.UICulture;
PresentationCore (20)
System\Windows\Input\InputManager.cs (1)
143if(Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
System\Windows\Input\InputMethod.cs (1)
417Dispatcher dispatcher = Dispatcher.FromThread(Thread.CurrentThread);
System\Windows\Input\InputProcessorProfiles.cs (1)
63Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Initialize called on MTA thread!");
System\Windows\Input\InputProcessorProfilesLoader.cs (1)
57Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Load called on MTA thread!");
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (1)
308Thread.CurrentThread.Name = "DynamicRenderer";
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
1144Thread.CurrentThread.Name = "Stylus Input";
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\Media\HostVisual.cs (3)
136Debug.Assert(target.Dispatcher.Thread == Thread.CurrentThread); 189Debug.Assert(_target.Dispatcher.Thread == Thread.CurrentThread); 322Dispatcher channelDispatcher = Dispatcher.FromThread(Thread.CurrentThread);
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 (24)
Microsoft\Win32\CommonDialog.cs (2)
231if (_thread != Thread.CurrentThread) 319private readonly Thread _thread = Thread.CurrentThread;
MS\Internal\Data\ClrBindingWorker.cs (2)
389if (Dispatcher.Thread == Thread.CurrentThread) 414if (Dispatcher.Thread == Thread.CurrentThread)
System\Windows\Controls\CalendarBlackoutDatesCollection.cs (2)
31this._dispatcherThread = Thread.CurrentThread; 340return Thread.CurrentThread == this._dispatcherThread;
System\Windows\Controls\SelectedDatesCollection.cs (2)
34this._dispatcherThread = Thread.CurrentThread; 470return Thread.CurrentThread == this._dispatcherThread;
System\Windows\Controls\SpellCheck.cs (1)
142new FrameworkPropertyMetadata(Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName == "de" ? SpellingReform.Postreform : SpellingReform.PreAndPostreform,
System\Windows\Controls\WebBrowser.cs (2)
292HRESULT hr = scriptObjectEx.GetIDsOfNames(ref guid, names, 1, Thread.CurrentThread.CurrentCulture.LCID, dispids); 320Thread.CurrentThread.CurrentCulture.LCID,
System\Windows\Data\BindingExpression.cs (1)
2497if (Dispatcher.Thread == Thread.CurrentThread)
System\Windows\Data\BindingExpressionBase.cs (1)
433if (Dispatcher.Thread == Thread.CurrentThread)
System\Windows\Data\BindingGroup.cs (1)
1500if (Dispatcher.Thread == Thread.CurrentThread)
System\Windows\Documents\Speller.cs (1)
51Thread.CurrentThread.CurrentCulture;
System\Windows\Documents\TextServicesHost.cs (3)
62Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "OnRegisterTextStore must be called on STA thread"); 67_thread = Thread.CurrentThread; 373if (_thread == Thread.CurrentThread || System.Environment.OSVersion.Version.Major >= 6)
System\Windows\Documents\TextStore.cs (1)
2418Invariant.Assert(Thread.CurrentThread == _textservicesHost.Dispatcher.Thread, "GrantLock called on bad thread!");
System\Windows\Documents\WinRTSpellerInterop.cs (1)
55_defaultCulture = InputLanguageManager.Current?.CurrentInputLanguage ?? Thread.CurrentThread.CurrentCulture;
System\Windows\Interop\ActiveXHost.cs (1)
86if (Thread.CurrentThread.ApartmentState != ApartmentState.STA)
System\Windows\Standard\Debug.cs (1)
339if (Thread.CurrentThread.GetApartmentState() != expectedState)
System\Windows\Standard\Verify.cs (1)
41if (Thread.CurrentThread.GetApartmentState() != requiredState)
System\Windows\SystemResources.cs (1)
1303Dispatcher dispatcher = isSysColorsOrSettingsChange ? null : Dispatcher.FromThread(System.Threading.Thread.CurrentThread);
ReachFramework (7)
PrintConfig\PTProvider.cs (2)
184this._thread = Thread.CurrentThread; 560if(_thread != Thread.CurrentThread)
PrintConfig\PTUtility.cs (1)
41return _resManager.GetString(key, System.Threading.Thread.CurrentThread.CurrentUICulture);
PrintSystemExceptions\PrintSystemException.cs (4)
222System.Threading.Thread.CurrentThread.CurrentUICulture); 241System.Threading.Thread.CurrentThread.CurrentUICulture); 245exceptionMessage = String.Format(System.Threading.Thread.CurrentThread.CurrentUICulture, 251exceptionMessage = String.Format(System.Threading.Thread.CurrentThread.CurrentUICulture,
System.Collections.Concurrent (1)
System\Collections\Concurrent\BlockingCollection.cs (1)
1663((collections.Length == 63) && (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)))
System.Private.CoreLib (45)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (1)
28Thread currentThread = Thread.CurrentThread;
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (18)
54ExecutionContext? executionContext = Thread.CurrentThread._executionContext; 79return Thread.CurrentThread._executionContext; 100Thread currentThread = Thread.CurrentThread; 115Thread currentThread = Thread.CurrentThread; 127ExecutionContext? executionContext = Thread.CurrentThread._executionContext; 154Thread currentThread = Thread.CurrentThread; 227Thread currentThread = Thread.CurrentThread; 250Debug.Assert(threadPoolThread == Thread.CurrentThread); 301Thread.CurrentThread._executionContext = executionContext; 314Debug.Assert(currentThread == Thread.CurrentThread); 350Debug.Assert(!Thread.IsThreadStartSupported || Thread.CurrentThread.IsThreadPoolThread); // there are no dedicated threadpool threads on runtimes where we can't start threads 351Debug.Assert(Thread.CurrentThread._executionContext == null, "ThreadPool thread not on Default ExecutionContext."); 352Debug.Assert(Thread.CurrentThread._synchronizationContext == null, "ThreadPool thread not on Default SynchronizationContext."); 450ExecutionContext? current = Thread.CurrentThread._executionContext; 464ExecutionContext? current = Thread.CurrentThread._executionContext; 528Thread.CurrentThread._executionContext = 556Debug.Assert(currentThread == Thread.CurrentThread); 567if (Thread.CurrentThread != _thread)
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLock.cs (4)
61bool isLocked = _ownerThread == Thread.CurrentThread; 72Debug.Assert(_ownerThread == Thread.CurrentThread); 82Debug.Assert(_ownerThread != Thread.CurrentThread); 109_ownerThread = Thread.CurrentThread;
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelMonitor.cs (2)
28public bool IsLocked => _ownerThread == Thread.CurrentThread; 71_ownerThread = Thread.CurrentThread;
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.Blocking.cs (2)
34if (!BlockingConfig.IsCooperativeBlockingEnabled || !Thread.CurrentThread.IsThreadPoolThread) 71Debug.Assert(Thread.CurrentThread.IsThreadPoolThread);
src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationContext.cs (2)
16public static SynchronizationContext? Current => Thread.CurrentThread._synchronizationContext; 55public static void SetSynchronizationContext(SynchronizationContext? syncContext) => Thread.CurrentThread._synchronizationContext = syncContext;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
593if (isDefaultScheduler && taskWasPreviouslyQueued && !Thread.CurrentThread.IsThreadPoolThread)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (1)
489(TaskScheduler.InternalCurrent == m_scheduler || Thread.CurrentThread.IsThreadPoolThread);
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (6)
264if (this != CurrentThread) 304if (this != CurrentThread) 322if (this != CurrentThread) 398Debug.Assert(ThreadState.HasFlag(ThreadState.Unstarted) || this == CurrentThread); 411Debug.Assert(this == CurrentThread); 423Debug.Assert(this == CurrentThread);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolCallbackWrapper.cs (1)
12Thread currentThread = Thread.CurrentThread;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (2)
1227Debug.Assert(currentThread == Thread.CurrentThread); 1288currentThread = Thread.CurrentThread;
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
729ExecutionContext.RunFromThreadPoolDispatchLoop(Thread.CurrentThread, context, s_callCallbackInContext, this);
src\System\GC.CoreCLR.cs (1)
313Thread currentThread = Thread.CurrentThread;
src\System\Runtime\ControlledExecution.CoreCLR.cs (1)
55Canceler canceler = new(Thread.CurrentThread);
src\System\Threading\Thread.CoreCLR.cs (2)
460Debug.Assert(this == CurrentThread); 471Debug.Assert(this == CurrentThread);
System.Private.Windows.Core.TestUtilities (8)
XUnit\UseCultureAttribute.cs (7)
15/// Apply this attribute to your test method to replace the <see cref="Thread.CurrentThread" /> 74_originalCulture = Thread.CurrentThread.CurrentCulture; 75_originalUICulture = Thread.CurrentThread.CurrentUICulture; 78Thread.CurrentThread.CurrentCulture = Culture; 79Thread.CurrentThread.CurrentUICulture = UICulture; 98Thread.CurrentThread.CurrentCulture = _originalCulture; 99Thread.CurrentThread.CurrentUICulture = _originalUICulture;
XUnit\UseDefaultXunitCultureAttribute.cs (1)
9/// Apply this attribute to your test method to replace the <see cref="Thread.CurrentThread" />
System.Transactions.Local (5)
System\Transactions\TransactionScope.cs (5)
521if ((_scopeThread != Thread.CurrentThread) && !AsyncFlowEnabled) 907_scopeThread = Thread.CurrentThread; 973if (_scopeThread == Thread.CurrentThread) 990if (_savedCurrentScope._scopeThread != Thread.CurrentThread) 1011if (_scopeThread != Thread.CurrentThread)
System.Windows.Forms (9)
System\Windows\Forms\Application.ComponentThreadContext.cs (1)
404_idleHandler?.Invoke(Thread.CurrentThread, EventArgs.Empty);
System\Windows\Forms\Application.cs (3)
226get => Thread.CurrentThread.CurrentCulture; 227set => Thread.CurrentThread.CurrentCulture = value; 1256=> ThreadContext.FromCurrent()._idleHandler?.Invoke(Thread.CurrentThread, e);
System\Windows\Forms\Application.LightThreadContext.cs (1)
121_idleHandler?.Invoke(Thread.CurrentThread, EventArgs.Empty);
System\Windows\Forms\Application.ThreadContext.cs (3)
243_enterModalHandler(Thread.CurrentThread, EventArgs.Empty); 433_leaveModalHandler(Thread.CurrentThread, EventArgs.Empty); 606_threadExceptionHandler(Thread.CurrentThread, new ThreadExceptionEventArgs(ex));
System\Windows\Forms\WindowsFormsSynchronizationContext.cs (1)
29DestinationThread = Thread.CurrentThread;
System.Windows.Forms.Analyzers.CSharp.Tests (2)
FontConverterTests.cs (1)
66Thread.CurrentThread.CurrentCulture = culture;
Generators\ApplicationConfigurationGenerator\ApplicationConfigurationInitializeBuilderTests.cs (1)
153Thread.CurrentThread.CurrentCulture = culture;
System.Windows.Forms.Analyzers.Tests (1)
Analyzers\AppManifestAnalyzer\FontDescriptorTests.cs (1)
68Thread.CurrentThread.CurrentCulture = new CultureInfo(cultureName);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\MaskDescriptor.cs (1)
41public virtual CultureInfo Culture => Thread.CurrentThread.CurrentCulture;
System.Windows.Forms.Design.Tests (7)
System\Windows\Forms\Design\MaskDescriptorTests.cs (7)
14_originalCulture = Thread.CurrentThread.CurrentCulture; 19Thread.CurrentThread.CurrentCulture = _originalCulture; 62Thread.CurrentThread.CurrentCulture = newCulture; 131Thread.CurrentThread.CurrentCulture = new(culture1); 136Thread.CurrentThread.CurrentCulture = _originalCulture; 140Thread.CurrentThread.CurrentCulture = new(culture2); 156Thread.CurrentThread.CurrentCulture = _originalCulture;
System.Windows.Forms.IntegrationTests.Common (2)
TestHelpers.cs (2)
400Thread.CurrentThread.CurrentCulture = cultureInfo; 401Thread.CurrentThread.CurrentUICulture = cultureInfo;
System.Windows.Forms.Tests (22)
System\Windows\Forms\ApplicationTests.cs (3)
20Assert.Same(Thread.CurrentThread.CurrentCulture, Application.CurrentCulture); 52Assert.Same(value, Thread.CurrentThread.CurrentCulture); 59Assert.Same(value, Thread.CurrentThread.CurrentCulture);
System\Windows\Forms\KeysConverterTests.cs (13)
43CultureInfo originalUICulture = Thread.CurrentThread.CurrentUICulture; 47Thread.CurrentThread.CurrentUICulture = culture; 55Thread.CurrentThread.CurrentUICulture = originalUICulture; 108CultureInfo originalUICulture = Thread.CurrentThread.CurrentUICulture; 111Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(cultureName); 114object resultWithUICulture = converter.ConvertTo(context: null, culture: Thread.CurrentThread.CurrentUICulture, keys, typeof(Enum[])); 121Thread.CurrentThread.CurrentUICulture = originalUICulture; 141CultureInfo originalCulture = Thread.CurrentThread.CurrentCulture; 142CultureInfo originalUICulture = Thread.CurrentThread.CurrentUICulture; 145Thread.CurrentThread.CurrentCulture = cultureName is not null ? CultureInfo.GetCultureInfo(cultureName) : originalCulture; 146Thread.CurrentThread.CurrentUICulture = uiCultureName is not null ? CultureInfo.GetCultureInfo(uiCultureName) : originalUICulture; 170Thread.CurrentThread.CurrentCulture = originalCulture; 171Thread.CurrentThread.CurrentUICulture = originalUICulture;
System\Windows\Forms\ToolStripMenuItemTests.cs (6)
151CultureInfo uiCulture = Thread.CurrentThread.CurrentUICulture; 152CultureInfo curCulture = Thread.CurrentThread.CurrentCulture; 154Thread.CurrentThread.CurrentUICulture = threadUICulture; 155Thread.CurrentThread.CurrentCulture = threadCulture; 160Thread.CurrentThread.CurrentUICulture = uiCulture; 161Thread.CurrentThread.CurrentCulture = curCulture;
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ControlTestBase.cs (1)
71if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)
WindowsBase.Tests (3)
System\Windows\Threading\DispatcherTests.cs (3)
21Assert.Same(Thread.CurrentThread, dispatcher.Thread); 33Dispatcher dispatcher = Dispatcher.FromThread(Thread.CurrentThread); 40Assert.Same(Thread.CurrentThread, dispatcher.Thread);
WinFormsControlsTest (4)
Program.cs (4)
8Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown); 9Thread.CurrentThread.SetApartmentState(ApartmentState.STA); 17Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;