374 references to Increment
Aspire.Cli.Tests (2)
Commands\AgentMcpCommandTests.cs (2)
460Interlocked.Increment(ref notificationCount); 515Interlocked.Increment(ref getResourceSnapshotsCallCount);
Aspire.Dashboard (3)
Components\Controls\Chart\PlotlyChart.razor.cs (1)
36public string ChartDivId { get; } = $"plotly-chart-container-{Interlocked.Increment(ref s_nextChartId)}";
Components\Pages\ConsoleLogs.razor.cs (1)
36private readonly int _subscriptionId = Interlocked.Increment(ref s_subscriptionId);
Otlp\Storage\Subscription.cs (1)
19private readonly int _subscriptionId = Interlocked.Increment(ref s_subscriptionId);
Aspire.Hosting (1)
InteractionService.cs (1)
527InteractionId = Interlocked.Increment(ref s_nextInteractionId);
Aspire.Hosting.RemoteHost (4)
CancellationTokenRegistry.cs (2)
29var id = $"ct_{Interlocked.Increment(ref _counter)}"; 51var id = $"ct_{Interlocked.Increment(ref _counter)}";
JsonRpcServer.cs (2)
104Interlocked.Increment(ref _activeClientCount); 163Interlocked.Increment(ref _activeClientCount);
Aspire.Hosting.Tests (25)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (2)
145Interlocked.Increment(ref callCount); 185Interlocked.Increment(ref callCount);
Dcp\DcpExecutorTests.cs (1)
221Interlocked.Increment(ref callCount);
Dcp\TestKubernetesService.cs (1)
78svc.Status.EffectivePort = svc.Spec.Port ?? Interlocked.Increment(ref _nextPort);
DistributedApplicationTests.cs (4)
252Interlocked.Increment(ref explicitStartEventCount); 260Interlocked.Increment(ref normalEventCount); 311Interlocked.Increment(ref eventCount); 359Interlocked.Increment(ref eventCount);
Eventing\DistributedApplicationBuilderEventingTests.cs (8)
27Interlocked.Increment(ref hitCount); 33Interlocked.Increment(ref hitCount); 58Interlocked.Increment(ref hitCount); 65Interlocked.Increment(ref hitCount); 91Interlocked.Increment(ref hitCount); 98Interlocked.Increment(ref hitCount); 125Interlocked.Increment(ref hitCount); 132Interlocked.Increment(ref hitCount);
Health\ResourceHealthCheckServiceTests.cs (4)
369Interlocked.Increment(ref hitCount); 408Interlocked.Increment(ref hitCount); 465Interlocked.Increment(ref healthCheckHits); 477Interlocked.Increment(ref eventHits);
RequiredCommandAnnotationTests.cs (2)
324Interlocked.Increment(ref callbackCount); 331Interlocked.Increment(ref callbackCount);
ResourceCommandServiceTests.cs (1)
265var count = Interlocked.Increment(ref callCount);
Utils\PeriodicRestartAsyncEnumerableTests.cs (2)
73Interlocked.Increment(ref s_totalEnumerablesRun); 74Interlocked.Increment(ref s_activeRunningEnumerables);
Binding.ReliableSession.IntegrationTests (6)
NetHttpBindingTests.cs (3)
121Interlocked.Increment(ref callCount); 207Interlocked.Increment(ref httpRequestCount); 377Interlocked.Increment(ref httpRequestCount);
WSHttpBindingTests.cs (3)
121Interlocked.Increment(ref callCount); 207Interlocked.Increment(ref httpRequestCount); 377Interlocked.Increment(ref httpRequestCount);
Client.ChannelLayer.IntegrationTests (2)
DuplexChannelShapeTests.4.0.0.cs (2)
206Interlocked.Increment(ref Counter); 227Interlocked.Increment(ref Counter);
dotnet (4)
Commands\Test\MTP\Terminal\TerminalTestReporter.cs (4)
154var assemblyRun = new TestProgressState(Interlocked.Increment(ref _counter), assembly, targetFramework, architecture, sw, _isDiscovery); 840Interlocked.Increment(ref _handshakeFailuresCount); 1058asm.TestNodeResultsState ??= new(Interlocked.Increment(ref _counter)); 1060Interlocked.Increment(ref _counter), instanceId, testNodeUid, displayName, CreateStopwatch());
dotnet-svcutil-lib (12)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchema.cs (1)
547_schemaId = Interlocked.Increment(ref s_globalIdCounter);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LifetimeManager.cs (3)
112Interlocked.Increment(ref _busyWaiterCount); 145Interlocked.Increment(ref _busyWaiterCount); 210Interlocked.Increment(ref _busyWaiterCount);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (2)
1139Interlocked.Increment(ref _activityCount); 2254if (Interlocked.Increment(ref _waitCount) == 2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\ServiceModelActivity.cs (1)
342newStopCount = Interlocked.Increment(ref _stopCount);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (1)
792if (Interlocked.Increment(ref _waitCount) == 2)
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceChannelManager.cs (4)
140Interlocked.Increment(ref _activityWaiterCount); 177Interlocked.Increment(ref _activityWaiterCount); 216Interlocked.Increment(ref _activityWaiterCount); 297Interlocked.Increment(ref _activityWaiterCount);
GenerateDocumentationAndConfigFiles (5)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
476return Interlocked.Increment(ref StringTable.s_sharedRandom);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
21_ordinal = Interlocked.Increment(ref s_lastOrdinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (1)
154=> Interlocked.Increment(ref s_lastUniqueBlockId);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
46var id = Interlocked.Increment(ref _globalId);
ILCompiler.Compiler (1)
Compiler\DependencyAnalysis\ArrayOfEmbeddedPointersNode.cs (1)
47return System.Threading.Interlocked.Increment(ref _nextId);
ILCompiler.DependencyAnalysisFramework (3)
EventSourceLogStrategy.cs (3)
77nodeIndex = Interlocked.Increment(ref ObjectIndex); 86GraphId = Interlocked.Increment(ref s_GraphIds); 88RootIndex = Interlocked.Increment(ref ObjectIndex);
ILCompiler.ReadyToRun (3)
Compiler\DependencyAnalysis\ArrayOfEmbeddedPointersNode.cs (1)
53return System.Threading.Interlocked.Increment(ref _nextId);
Compiler\ReadyToRunCodegenCompilation.cs (1)
897if (Interlocked.Increment(ref _finishedThreadCount) == _parallelism)
TypeSystem\Mutable\MutableModule.Sorting.cs (1)
16int _index = Interlocked.Increment(ref s_globalIndex);
ILCompiler.TypeSystem (2)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\LockFreeReaderHashtable.cs (2)
472if (Interlocked.Increment(ref _reserve) >= hashTableLocal.Length - 1) 504Interlocked.Increment(ref _count);
Microsoft.AspNetCore.HeaderParsing (1)
HeaderRegistry.cs (1)
47var pos = Interlocked.Increment(ref _current);
Microsoft.AspNetCore.Http (1)
src\aspnetcore\src\Shared\CancellationTokenSourcePool.cs (1)
27if (Interlocked.Increment(ref _count) > MaxQueueSize || !cts.TryReset())
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\OrderedEndpointsSequenceProvider.cs (1)
18return Interlocked.Increment(ref _current);
Routing\ControllerActionEndpointDataSourceIdProvider.cs (1)
12return Interlocked.Increment(ref _nextId);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageActionEndpointDataSourceIdProvider.cs (1)
12return Interlocked.Increment(ref _nextId);
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http2\Http2Connection.cs (2)
1348if (IsEnhanceYourCalmLimitEnabled && Interlocked.Increment(ref _enhanceYourCalmCount) > EnhanceYourCalmTickWindowCount * EnhanceYourCalmMaximumCount) 1874Interlocked.Increment(ref _clientActiveStreamCount);
src\aspnetcore\src\Shared\CancellationTokenSourcePool.cs (1)
27if (Interlocked.Increment(ref _count) > MaxQueueSize || !cts.TryReset())
Microsoft.Build (11)
BackEnd\BuildManager\BuildManager.cs (3)
1773return Interlocked.Increment(ref s_nextBuildId); 2447int newId = Interlocked.Increment(ref s_nextBuildRequestConfigurationId); 2454newId = Interlocked.Increment(ref s_nextBuildRequestConfigurationId);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
720int communicationNodeId = Interlocked.Increment(ref _nextNodeId);
BackEnd\Components\Logging\BuildErrorTelemetryTracker.cs (1)
66int newCount = System.Threading.Interlocked.Increment(ref _errorCounts[categoryIndex]);
BackEnd\Components\Logging\LoggingService.cs (2)
438return Interlocked.Increment(ref _nextTargetId); 450return Interlocked.Increment(ref _nextTaskId);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1588Interlocked.Increment(ref _availableThreads);
Construction\ProjectRootElement.cs (1)
2158Version = Interlocked.Increment(ref s_globalVersionCounter);
Evaluation\ConditionEvaluator.cs (1)
158Interlocked.Increment(ref _mOptimisticSize);
Instance\TaskRegistry.cs (1)
709Interlocked.Increment(ref _nextRegistrationOrderId),
Microsoft.CodeAnalysis (5)
Compilation\Compilation.cs (1)
1850Interlocked.Increment(ref _eventQueueEnqueuePendingCount);
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
216var shadowDirName = OriginalDirectoryMap.GetOrAdd(originalDirName, _ => Interlocked.Increment(ref _directoryCount)).ToString(System.Globalization.CultureInfo.InvariantCulture);
InternalUtilities\StringTable.cs (1)
476return Interlocked.Increment(ref StringTable.s_sharedRandom);
Operations\ControlFlowGraphBuilder.CaptureIdDispenser.cs (1)
17return Interlocked.Increment(ref _captureId);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
Microsoft.CodeAnalysis.Analyzers (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
476return Interlocked.Increment(ref StringTable.s_sharedRandom);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
456Interlocked.Increment(ref _completionRefCount);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
21_ordinal = Interlocked.Increment(ref s_lastOrdinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (1)
154=> Interlocked.Increment(ref s_lastUniqueBlockId);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
46var id = Interlocked.Increment(ref _globalId);
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
476return Interlocked.Increment(ref StringTable.s_sharedRandom);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
456Interlocked.Increment(ref _completionRefCount);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
21_ordinal = Interlocked.Increment(ref s_lastOrdinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (1)
154=> Interlocked.Increment(ref s_lastUniqueBlockId);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
46var id = Interlocked.Increment(ref _globalId);
Microsoft.CodeAnalysis.CodeStyle (5)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
476return Interlocked.Increment(ref StringTable.s_sharedRandom);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
456Interlocked.Increment(ref _completionRefCount);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (1)
154=> Interlocked.Increment(ref s_lastUniqueBlockId);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
46var id = Interlocked.Increment(ref _globalId);
Microsoft.CodeAnalysis.CSharp (6)
BoundTree\UnboundLambda.cs (1)
610Interlocked.Increment(ref data.LambdaBindingCount);
Parser\SlidingTextWindow.cs (2)
416Interlocked.Increment(ref GetTextOutsideWindowCount); 422Interlocked.Increment(ref GetTextInsideWindowCount);
Symbols\FunctionTypeSymbol.cs (1)
91Interlocked.Increment(ref data.InferredDelegateCount);
Symbols\MetadataOrSourceAssemblySymbol.cs (1)
102Interlocked.Increment(ref _cachedSpecialTypes);
Symbols\Synthesized\SynthesizedLocal.cs (1)
203private readonly int _sequence = System.Threading.Interlocked.Increment(ref _nextSequence);
Microsoft.CodeAnalysis.Extensions.Package (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
Microsoft.CodeAnalysis.Features (6)
Diagnostics\IDiagnosticsRefresher.cs (1)
48Interlocked.Increment(ref _globalStateVersion);
EditAndContinue\DebuggingSession.cs (1)
532var updateId = new UpdateId(Id, Interlocked.Increment(ref _updateOrdinal));
EditAndContinue\EditAndContinueService.cs (1)
162var sessionId = new DebuggingSessionId(Interlocked.Increment(ref s_debuggingSessionId));
EditAndContinue\SolutionSnapshotRegistry.cs (1)
40var id = new SolutionSnapshotId(Interlocked.Increment(ref s_solutionSnapshotId));
EditAndContinue\TraceLog.cs (1)
153var index = Interlocked.Increment(ref _currentLine);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerProgressReporter.cs (1)
69if (start ? (Interlocked.Increment(ref referenceCount) == 1) : (Interlocked.Decrement(ref referenceCount) == 0))
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
476return Interlocked.Increment(ref StringTable.s_sharedRandom);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
456Interlocked.Increment(ref _completionRefCount);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
21_ordinal = Interlocked.Increment(ref s_lastOrdinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (1)
154=> Interlocked.Increment(ref s_lastUniqueBlockId);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
46var id = Interlocked.Increment(ref _globalId);
Microsoft.CodeAnalysis.Scripting (2)
ScriptBuilder.cs (2)
64_assemblyNamePrefix = s_globalAssemblyNamePrefix + "#" + Interlocked.Increment(ref s_engineIdDispenser).ToString(); 70int id = Interlocked.Increment(ref _submissionIdDispenser);
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\MetadataOrSourceAssemblySymbol.vb (1)
86Interlocked.Increment(_cachedSpecialTypes)
Symbols\PEOrSourceOrMergedNamespaceSymbol.vb (1)
94Dim cnt = Interlocked.Increment(Me._extQueryCnt)
Microsoft.CodeAnalysis.Workspaces (16)
Log\CorrelationIdFactory.cs (1)
14=> Interlocked.Increment(ref s_globalId);
Log\CountLogAggregator.cs (1)
53Interlocked.Increment(ref _count);
Log\RoslynEventSource.LogBlock.cs (1)
104=> Interlocked.Increment(ref s_lastUniqueBlockId);
Log\WorkspaceStructureLogger.cs (1)
271compilation, _ => new StrongBox<int>(Interlocked.Increment(ref _nextCompilationId)));
Remote\RemoteServiceCallbackDispatcher.cs (1)
39var callbackId = new RemoteServiceCallbackId(Interlocked.Increment(ref _callbackId));
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
216var shadowDirName = OriginalDirectoryMap.GetOrAdd(originalDirName, _ => Interlocked.Increment(ref _directoryCount)).ToString(System.Globalization.CultureInfo.InvariantCulture);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
476return Interlocked.Increment(ref StringTable.s_sharedRandom);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (1)
154=> Interlocked.Increment(ref s_lastUniqueBlockId);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
46var id = Interlocked.Increment(ref _globalId);
Workspace\Solution\DocumentState_LinkedFileReuse.cs (5)
192Interlocked.Increment(ref s_tryReuseSyntaxTree); 202Interlocked.Increment(ref s_couldReuseBecauseOfEqualPPNames); 209Interlocked.Increment(ref s_couldReuseBecauseOfNoDirectives); 218Interlocked.Increment(ref s_couldReuseBecauseOfNoPPDirectives); 228Interlocked.Increment(ref s_couldNotReuse);
Workspace\Solution\VersionStamp.cs (1)
187var globalVersion = Interlocked.Increment(ref VersionStamp.s_globalVersion);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildProjectLoader.cs (1)
359var suffix = Interlocked.Increment(ref _suffix);
Rpc\RpcClient.cs (1)
149requestId = Interlocked.Increment(ref _nextRequestId);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Rpc\RpcServer.cs (1)
58var nextIndex = Interlocked.Increment(ref _nextRpcTargetIndex);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\BinderEquivalence.cs (1)
41var count = Interlocked.Increment(ref cachedBinderCount);
Microsoft.Diagnostics.NETCore.Client (1)
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (1)
1469Interlocked.Increment(ref s_routerInstanceCount);
Microsoft.DotNet.HotReload.Watch (5)
Aspire\AspireServiceFactory.cs (2)
112var sessionId = Interlocked.Increment(ref _sessionIdDispenser).ToString(CultureInfo.InvariantCulture); 119Interlocked.Increment(ref _pendingSessionInitializationCount);
Context\EnvironmentOptions.cs (1)
92? $"{Path.Combine(WorkingDirectory, options.BinaryLogPath)[..^".binlog".Length]}-dotnet-watch.{operationName}.{Path.GetFileName(projectPath)}.{Interlocked.Increment(ref _uniqueLogId)}.binlog"
HotReload\CompilationHandler.cs (1)
1031=> ReportSolutionFilesAsync(newSolution, Interlocked.Increment(ref _solutionUpdateId), operationDisplayName, cancellationToken);
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\BrowserConnection.cs (1)
34Id = Interlocked.Increment(ref s_lastId);
Microsoft.Extensions.AI.Integration.Tests (3)
CallCountingChatClient.cs (2)
22Interlocked.Increment(ref _callCount); 29Interlocked.Increment(ref _callCount);
CallCountingEmbeddingGenerator.cs (1)
23Interlocked.Increment(ref _callCount);
Microsoft.Extensions.AI.Tests (5)
ChatCompletion\FunctionInvokingChatClientTests.cs (5)
284Interlocked.Increment(ref activeCount); 3522if (Interlocked.Increment(ref callCount) == 1) 3538if (Interlocked.Increment(ref callCount) == 1) 3594if (Interlocked.Increment(ref callCount) == 1) 3605if (Interlocked.Increment(ref callCount) == 1)
Microsoft.Extensions.AsyncState (1)
AsyncState.cs (1)
49return new AsyncStateToken(Interlocked.Increment(ref _contextCount) - 1);
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.Debug.cs (1)
46_ = Interlocked.Increment(ref _outstandingBufferCount);
Microsoft.Extensions.Caching.Hybrid.Tests (27)
L2Tests.cs (12)
167Interlocked.Increment(ref ProtectedOpCount); 174Interlocked.Increment(ref ProtectedOpCount); 181Interlocked.Increment(ref ProtectedOpCount); 195Interlocked.Increment(ref ProtectedOpCount); 219Interlocked.Increment(ref ProtectedOpCount); 226Interlocked.Increment(ref ProtectedOpCount); 233Interlocked.Increment(ref ProtectedOpCount); 240Interlocked.Increment(ref ProtectedOpCount); 247Interlocked.Increment(ref ProtectedOpCount); 254Interlocked.Increment(ref ProtectedOpCount); 261Interlocked.Increment(ref ProtectedOpCount); 268Interlocked.Increment(ref ProtectedOpCount);
RedisTests.cs (1)
77Interlocked.Increment(ref count);
SizeTests.cs (6)
170Interlocked.Increment(ref actualRunCount); 236Interlocked.Increment(ref actualRunCount); 290Interlocked.Increment(ref _readCount); 302Interlocked.Increment(ref _writeCount); 333Interlocked.Increment(ref _readCount); 345Interlocked.Increment(ref _writeCount);
StampedeTests.cs (8)
101using var reg = ct.Register(() => Interlocked.Increment(ref cancelCount)); 107Interlocked.Increment(ref executeCount); 137using var reg = ct.Register(() => Interlocked.Increment(ref cancelCount)); 143Interlocked.Increment(ref executeCount); 190using var reg = ct.Register(() => Interlocked.Increment(ref cancelCount)); 198Interlocked.Increment(ref executeCount); 268using var reg = ct.Register(() => Interlocked.Increment(ref cancelCount)); 276Interlocked.Increment(ref executeCount);
Microsoft.Extensions.Compliance.Testing (2)
FakeRedactor.cs (1)
83var order = Interlocked.Increment(ref _redactedSoFar);
FakeRedactorProvider.cs (1)
37var order = Interlocked.Increment(ref _redactorsRequestedSoFar);
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\DynamicServiceProviderEngine.cs (1)
30if (Interlocked.Increment(ref callCount) == 2)
Microsoft.Extensions.Diagnostics.Testing (1)
Logging\FakeLogCollector.cs (1)
65_ = Interlocked.Increment(ref _recordCollectionVersion);
Microsoft.Extensions.Diagnostics.Testing.Tests (1)
Logging\FakeLogCollectorTests.LogEnumeration.cs (1)
111if (Interlocked.Increment(ref moveNextCounter) == 2)
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalFilesWatcher.cs (2)
213Interlocked.Increment(ref _subdirectoryRequiringTokenCount); 257Interlocked.Increment(ref _subdirectoryRequiringTokenCount);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Latency\Internal\HttpMockProvider.cs (1)
49Interlocked.Increment(ref OnEventInvoked);
Microsoft.Extensions.Logging.Abstractions (1)
FormattedLogValues.cs (1)
48Interlocked.Increment(ref s_count);
Microsoft.Extensions.Logging.EventSource (2)
EventSourceLogger.cs (1)
177int id = Interlocked.Increment(ref _activityIds);
EventSourceLoggerProvider.cs (1)
42_factoryID = Interlocked.Increment(ref _globalFactoryID);
Microsoft.Extensions.ObjectPool (1)
DefaultObjectPool.cs (1)
86if (Interlocked.Increment(ref _numItems) <= _maxCapacity)
Microsoft.Extensions.Telemetry (1)
Latency\Internal\CheckpointTracker.cs (1)
69var p = Interlocked.Increment(ref _numCheckpoints);
Microsoft.Maui (1)
Handlers\HybridWebView\HybridWebViewTaskManager.cs (1)
16 var taskId = Interlocked.Increment(ref _lastTaskId);
Microsoft.Maui.Controls (5)
DataTemplate.cs (3)
20 _id = Interlocked.Increment(ref idCounter); 29 _id = Interlocked.Increment(ref idCounter); 36 _id = Interlocked.Increment(ref idCounter);
NavigationPage\NavigationPage.cs (1)
633 Interlocked.Increment(ref _waitingCount);
Shell\ShellNavigatingEventArgs.cs (1)
64 var currentCount = Interlocked.Increment(ref _deferralCount);
Microsoft.Maui.Controls.Foldable (1)
DualScreenInfo.cs (1)
103 ProcessHingeAngleSubscriberCount(Interlocked.Increment(ref subscriberCount));
Microsoft.ML.Core (2)
Data\ProgressReporter.cs (1)
147var newId = Interlocked.Increment(ref _maxSubId);
Utilities\ObjectPool.cs (1)
54Interlocked.Increment(ref _numCreated);
Microsoft.ML.Data (2)
DataLoadSave\Text\TextLoaderParser.cs (1)
1498if (Interlocked.Increment(ref _mismatchCount) == 1)
Prediction\Calibrator.cs (1)
1384_random = new System.Random(System.Threading.Interlocked.Increment(ref _randSeed) - 1);
Microsoft.ML.FastTree (1)
Utils\Timer.cs (1)
241Interlocked.Increment(ref _state.NumCalls[(int)_event]);
Microsoft.ML.Tests (1)
CachingTests.cs (1)
30get { Interlocked.Increment(ref AccessCount); return _features; }
Microsoft.ML.TimeSeries (3)
SequentialAnomalyDetectionTransformBase.cs (1)
408if (Interlocked.Increment(ref _parent.StateRefCount) > 1)
SequentialForecastingTransformBase.cs (1)
257if (Interlocked.Increment(ref _parent.StateRefCount) > 1)
SrCnnTransformBase.cs (1)
251if (Interlocked.Increment(ref _parent.StateRefCount) > 1)
Microsoft.NET.Sdk.Razor.Tasks (1)
src\sdk\src\RazorSdk\Tool\Client.cs (1)
142var id = Interlocked.Increment(ref counter);
Microsoft.NET.StringTools (1)
WeakStringCache.Concurrent.cs (1)
105Interlocked.Increment(ref _count);
Microsoft.TemplateEngine.Edge (1)
BuiltInManagedProvider\GlobalSettings.cs (1)
182if (Interlocked.Increment(ref _waitingInstances) > 1)
Microsoft.TestPlatform.CrossPlatEngine (1)
Client\Parallel\ParallelProxyExecutionManager.cs (1)
446Interlocked.Increment(ref _runStartedClients);
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
BlameCollector.cs (1)
484Interlocked.Increment(ref _testEndCount);
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (4)
HtmlLogger.cs (4)
231Interlocked.Increment(ref _totalTests); 235Interlocked.Increment(ref _failedTests); 238Interlocked.Increment(ref _passedTests); 241Interlocked.Increment(ref _skippedTests);
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (3)
TrxLogger.cs (3)
306Interlocked.Increment(ref _totalTestCount); 310Interlocked.Increment(ref _failedTestCount); 314Interlocked.Increment(ref _passedTestCount);
MSBuild (5)
OutOfProcTaskHostNode.cs (5)
1002int requestId = Interlocked.Increment(ref _nextCallbackRequestId); 1046Interlocked.Increment(ref _blockedTaskCount); 1057Interlocked.Increment(ref _activeTaskCount); 1094int taskId = Interlocked.Increment(ref _nextLocalTaskId); 1388Interlocked.Increment(ref _activeTaskCount);
NuGet.Common (1)
KeyedLock.cs (1)
119Interlocked.Increment(ref lockState.Count);
PresentationCore (2)
System\Windows\Media\MediaContext.cs (1)
2015uint renderID = (uint)Interlocked.Increment(ref _contextRenderID);
System\Windows\Media\SafeMILHandleMemoryPressure.cs (1)
29Interlocked.Increment(ref _refCount);
PresentationFramework (5)
MS\Internal\Data\DataBindEngine.cs (1)
427if (Interlocked.Increment(ref _cleanupRequests) == 1)
MS\Internal\Utility\MonitorWrapper.cs (1)
22Interlocked.Increment(ref _enterCount);
System\Windows\Documents\WpfPayload.cs (1)
315int newWpfPayoutCount = Interlocked.Increment(ref _wpfPayloadCount);
System\Windows\FrameworkElementFactory.cs (1)
1146Interlocked.Increment(ref AutoGenChildNamePostfix);
System\Windows\StyleHelper.cs (1)
5331Interlocked.Increment(ref lastChildIndex);
Roslyn.Diagnostics.Analyzers (6)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
476return Interlocked.Increment(ref StringTable.s_sharedRandom);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
47Interlocked.Increment(ref s_activeTrackers);
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
456Interlocked.Increment(ref _completionRefCount);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
21_ordinal = Interlocked.Increment(ref s_lastOrdinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (1)
154=> Interlocked.Increment(ref s_lastUniqueBlockId);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
46var id = Interlocked.Increment(ref _globalId);
rzc (2)
Client.cs (1)
142var id = Interlocked.Increment(ref counter);
ConnectionHost.cs (1)
23var id = Interlocked.Increment(ref counter);
ScenarioTests.Common.Tests (1)
ScenarioTestTypes.cs (1)
216Interlocked.Increment(ref _operationCount);
Shared.Tests (1)
Pools\PoolTests.cs (1)
25SequenceNum = Interlocked.Increment(ref _fooSequenceNum);
System.Collections.Concurrent (2)
System\Collections\Concurrent\PartitionerStatic.cs (2)
643Interlocked.Increment(ref _activeCopiers); 897Interlocked.Increment(ref _activePartitionCount.Value);
System.Collections.Immutable (1)
System\Collections\Immutable\SecureObjectPool.cs (1)
33result = Interlocked.Increment(ref s_poolUserIdCounter);
System.ComponentModel.TypeConverter (3)
System\ComponentModel\TypeDescriptor.cs (3)
1296int ci = System.Threading.Interlocked.Increment(ref s_collisionIndex) - 1; 2385Interlocked.Increment(ref s_metadataVersion); 2447Interlocked.Increment(ref s_metadataVersion);
System.Composition.Hosting (1)
System\Composition\Hosting\Core\LifetimeContext.cs (1)
51return Interlocked.Increment(ref s_nextSharingId);
System.Data.Common (11)
System\Data\Common\DataAdapter.cs (1)
31internal readonly int _objectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System\Data\Common\DbConnectionStringBuilder.cs (1)
39internal readonly int _objectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System\Data\DataColumn.cs (1)
75private readonly int _objectID = Interlocked.Increment(ref s_objectTypeCount);
System\Data\DataRelation.cs (1)
71private readonly int _objectID = Interlocked.Increment(ref s_objectTypeCount);
System\Data\DataRelationCollection.cs (1)
30private readonly int _objectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System\Data\DataRow.cs (1)
40internal readonly int _objectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System\Data\DataSet.cs (1)
74private readonly int _objectID = Interlocked.Increment(ref s_objectTypeCount);
System\Data\DataTable.cs (1)
159private readonly int _objectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System\Data\DataTableCollection.cs (1)
31private readonly int _objectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System\Data\DataView.cs (1)
95private readonly int _objectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System\Data\Selection.cs (1)
86private readonly int _objectID = Interlocked.Increment(ref s_objectTypeCount);
System.Data.Odbc (4)
Common\System\Data\ProviderBase\DbConnectionInternal.cs (1)
23int activateCount = Interlocked.Increment(ref _activateCount);
Common\System\Data\ProviderBase\DbConnectionPool.cs (1)
721Interlocked.Increment(ref _waitCount);
System\Data\Odbc\OdbcCommand.cs (1)
24internal readonly int ObjectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System\Data\Odbc\OdbcDataReader.cs (1)
48internal readonly int ObjectID = System.Threading.Interlocked.Increment(ref s_objectTypeCount);
System.Data.OleDb (2)
System\Data\ProviderBase\DbConnectionInternal.cs (1)
19int activateCount = Interlocked.Increment(ref _activateCount);
System\Data\ProviderBase\DbConnectionPool.cs (1)
1100Interlocked.Increment(ref _waitCount);
System.Diagnostics.DiagnosticSource (4)
System\Diagnostics\Activity.cs (1)
1358ret = AppendSuffix(Parent.Id, Interlocked.Increment(ref Parent._currentChildId).ToString(), '.');
System\Diagnostics\Metrics\InstrumentState.cs (1)
30ID = Interlocked.Increment(ref s_idCounter);
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
583Interlocked.Increment(ref _sharedSessionRefCount);
System\Diagnostics\RateLimiter.cs (1)
64return Interlocked.Increment(ref _currentOperationCount) <= _maxOperationsPerSecond;
System.Diagnostics.PerformanceCounter (1)
System\Diagnostics\PerformanceData\CounterSet.cs (1)
261Interlocked.Increment(ref _provider._counterSet);
System.IO.Compression (1)
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (1)
167Interlocked.Increment(ref _asyncOperations);
System.Linq.Expressions (3)
System\Dynamic\Utils\DelegateHelpers.cs (1)
206int thunkIndex = Interlocked.Increment(ref s_ThunksCreated);
System\Linq\Expressions\Compiler\AssemblyGen.cs (1)
49int index = Interlocked.Increment(ref _index);
System\Linq\Expressions\Compiler\LambdaCompiler.cs (1)
73int lambdaMethodIndex = Interlocked.Increment(ref s_lambdaMethodIndex);
System.Linq.Parallel (3)
System\Linq\Parallel\QueryOperators\Unary\DefaultIfEmptyQueryOperator.cs (1)
190Interlocked.Increment(ref _sharedEmptyCount.Value);
System\Linq\Parallel\QueryOperators\Unary\SingleQueryOperator.cs (1)
157Interlocked.Increment(ref _totalElementCount.Value);
System\Linq\Parallel\Utils\PLINQETWProvider.cs (1)
42return Interlocked.Increment(ref s_queryId);
System.Management (1)
System\Management\WmiEventSink.cs (1)
99hash = Threading.Interlocked.Increment(ref s_hash);
System.Net.Http.WinHttpHandler (5)
System\Net\Http\WinHttpRequestState.cs (5)
38Interlocked.Increment(ref s_dbg_allocated); 47Interlocked.Increment(ref s_dbg_pin); 74Interlocked.Increment(ref s_dbg_clearSendRequestState); 192Interlocked.Increment(ref s_dbg_callDispose); 221Interlocked.Increment(ref s_dbg_operationHandleFree);
System.Net.HttpListener (2)
src\runtime\src\libraries\Common\src\System\Net\LazyAsyncResult.cs (2)
295if ((_intCompleted & ~HighBit) == 0 && (Interlocked.Increment(ref _intCompleted) & ~HighBit) == 1) 474if ((_intCompleted & ~HighBit) == 0 && (Interlocked.Increment(ref _intCompleted) & ~HighBit) == 1)
System.Net.Mail (2)
System\Net\CloseableStream.cs (1)
26if (Interlocked.Increment(ref _closed) == 1)
System\Net\Mime\MimeMultiPart.cs (1)
61int b = Interlocked.Increment(ref s_boundary) - 1;
System.Net.Quic (2)
System\Net\Quic\QuicListener.cs (2)
186Interlocked.Increment(ref _pendingConnectionsCapacity); 335Interlocked.Increment(ref _pendingConnectionsCapacity);
System.Net.Requests (3)
src\runtime\src\libraries\Common\src\System\Net\LazyAsyncResult.cs (2)
295if ((_intCompleted & ~HighBit) == 0 && (Interlocked.Increment(ref _intCompleted) & ~HighBit) == 1) 474if ((_intCompleted & ~HighBit) == 0 && (Interlocked.Increment(ref _intCompleted) & ~HighBit) == 1)
System\Net\FileWebRequest.cs (1)
297if (Interlocked.Increment(ref _aborted) == 1)
System.Net.Security (1)
src\runtime\src\libraries\Common\src\System\Net\Security\SSPIHandleCache.cs (1)
28int index = Interlocked.Increment(ref s_current) & MaxCacheSize;
System.Net.Sockets (2)
System\Net\Sockets\SocketAsyncEngine.Unix.cs (1)
112int engineIndex = Math.Abs(Interlocked.Increment(ref s_allocateFromEngine) % s_engines.Length);
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
953int count = Interlocked.Increment(ref _count);
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
92if (Interlocked.Increment(ref _callNesting) > 1)
System.Net.WebSockets (2)
System\Net\WebSockets\AsyncMutex.cs (2)
152Interlocked.Increment(ref m._gate); 193int gate = Interlocked.Increment(ref _gate);
System.Private.CoreLib (13)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\LockFreeReaderHashtable.cs (2)
472if (Interlocked.Increment(ref _reserve) >= hashTableLocal.Length - 1) 504Interlocked.Increment(ref _count);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\LockFreeReaderHashtableOfPointers.cs (2)
423if (Interlocked.Increment(ref _reserve) >= hashTableLocal.Length - 1) 454Interlocked.Increment(ref _count);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\NameInfo.cs (1)
42this.identity = Interlocked.Increment(ref lastIdentity);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelSpinWaiter.cs (1)
24int spinningThreadCount = Interlocked.Increment(ref _spinningThreadCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelThreadBlocker.cs (1)
181Interlocked.Increment(ref *_pState);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (2)
1030Interlocked.Increment(ref props.m_completionCountdown); 1314newId = Interlocked.Increment(ref s_taskIdCounter);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (1)
359newId = Interlocked.Increment(ref s_taskSchedulerIdCounter);
System\Runtime\CompilerServices\ClassConstructorRunner.cs (1)
343Interlocked.Increment(ref resultArray[resultIndex]._refCount);
System\Threading\Thread.NativeAot.cs (2)
103Interlocked.Increment(ref s_foregroundRunningCount); 471Interlocked.Increment(ref s_foregroundRunningCount);
System.Private.Xml (1)
System\Xml\Schema\XmlSchema.cs (1)
391_schemaId = Interlocked.Increment(ref s_globalIdCounter);
System.Private.Xml.Linq (1)
System\Xml\Linq\XHashtable.cs (1)
286newEntry = Interlocked.Increment(ref _numEntries);
System.Reflection.DispatchProxy (1)
System\Reflection\DispatchProxyGenerator.cs (1)
218int nextId = Interlocked.Increment(ref _typeId);
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\HandleCollector.cs (1)
57Interlocked.Increment(ref _handleCount);
System.Security.Cryptography (1)
System\Security\Cryptography\ConcurrencyBlock.cs (1)
14int count = Interlocked.Increment(ref block._count);
System.ServiceModel.Primitives (13)
Internals\System\Runtime\IOThreadScheduler.cs (1)
324int gateSnapshot = Interlocked.Increment(ref _gate);
System\ServiceModel\Channels\LifetimeManager.cs (3)
113Interlocked.Increment(ref _busyWaiterCount); 153Interlocked.Increment(ref _busyWaiterCount); 186Interlocked.Increment(ref _busyWaiterCount);
System\ServiceModel\Channels\RequestChannel.cs (1)
199Interlocked.Increment(ref _outstandRequestCloseCount);
System\ServiceModel\Channels\ServiceChannel.cs (2)
1154Interlocked.Increment(ref _activityCount); 2318if (Interlocked.Increment(ref _waitCount) == 2)
System\ServiceModel\Diagnostics\ServiceModelActivity.cs (1)
306newStopCount = Interlocked.Increment(ref _stopCount);
System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (1)
793if (Interlocked.Increment(ref _waitCount) == 2)
System\ServiceModel\ServiceChannelManager.cs (4)
79Interlocked.Increment(ref _activityWaiterCount); 113Interlocked.Increment(ref _activityWaiterCount); 149Interlocked.Increment(ref _activityWaiterCount); 224Interlocked.Increment(ref _activityWaiterCount);
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.WriteHelpers.cs (1)
383if (Interlocked.Increment(ref _serializationCount) == MinSerializationsSampleSize)
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (1)
52string typenumString = ((uint)Interlocked.Increment(ref s_typeCount)).ToString();
System\Text\RegularExpressions\RegexLWCGCompiler.cs (1)
47uint regexNum = (uint)Interlocked.Increment(ref s_regexCount);
System.Threading.Tasks.Parallel (7)
System\Threading\Tasks\Parallel.cs (5)
222forkJoinContextID = Interlocked.Increment(ref s_forkJoinContextID); 267int myIndex = Interlocked.Increment(ref actionIndex); // = index to use + 1 287myIndex = Interlocked.Increment(ref actionIndex); 967forkJoinContextID = Interlocked.Increment(ref s_forkJoinContextID); 2534forkJoinContextID = Interlocked.Increment(ref s_forkJoinContextID);
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
571Interlocked.Increment(ref _completionRefCount);
System\Threading\Tasks\ParallelRangeManager.cs (1)
293int nInitialRange = (Interlocked.Increment(ref _nCurrentIndexRangeToAssign) - 1) % _indexRanges.Length;
System.Transactions.Local (8)
System\Transactions\Enlistment.cs (1)
211string.Create(CultureInfo.InvariantCulture, $"{InternalTransaction.InstanceIdentifier}{Interlocked.Increment(ref InternalTransaction._nextHash)}"),
System\Transactions\Oletx\OletxTransaction.cs (2)
585Interlocked.Increment(ref _undecidedEnlistmentCount); 1086=> Interlocked.Increment(ref _undisposedOletxTransactionCount);
System\Transactions\Transaction.cs (2)
269_cloneId = Interlocked.Increment(ref _internalTransaction._cloneCount); 283_cloneId = Interlocked.Increment(ref _internalTransaction._cloneCount);
System\Transactions\TransactionTable.cs (3)
63readerIndex = Interlocked.Increment(ref _readersIn); 103Interlocked.Increment(ref _readersOut); 617int currentIndex = Interlocked.Increment(ref _index);
System.Windows.Forms (1)
System\Windows\Forms\Screen.cs (1)
337Interlocked.Increment(ref s_desktopChangedCount);
System.Windows.Forms.Primitives (1)
System\Windows\Forms\RefCountedCache.CacheEntry.cs (1)
28public void AddRef() => Interlocked.Increment(ref _refCount);
UnitTests.Common (1)
TestTypes.cs (1)
293Interlocked.Increment(ref _operationCount);