214 references to TryRemove
aspire (4)
Backchannel\AuxiliaryBackchannelMonitor.cs (4)
234connectionsForHash.TryRemove(removedFile, out var connection)) 241_connectionsByHash.TryRemove(hash, out _); 419connectionsForHash.TryRemove(socketPath, out var conn)) 426_connectionsByHash.TryRemove(hash, out _);
Aspire.Cli.Tests (2)
TestServices\TestAuxiliaryBackchannelMonitor.cs (2)
109connectionsDict.TryRemove(socketPath, out _); 112_connectionsByHash.TryRemove(hash, out _);
Aspire.Dashboard (7)
Components\Dialogs\ManageDataDialog.razor.cs (1)
188_resourceByName.TryRemove(resource.Name, out _);
Components\Pages\ConsoleLogs.razor.cs (3)
819_consoleLogsSubscriptions.TryRemove(subscription.Resource.Name, out _); 858var removed = _resourceByName.TryRemove(resource.Name, out _); 862if (_consoleLogsSubscriptions.TryRemove(resource.Name, out var subscription))
Components\Pages\Resources.razor.cs (1)
335var removed = _resourceByName.TryRemove(resource.Name, out _);
Model\ResourceOutgoingPeerResolver.cs (1)
69var removed = _resourceByName.TryRemove(resource.Name, out _);
Otlp\Storage\TelemetryRepository.cs (1)
869if (_resources.TryRemove(resourceKey, out _))
Aspire.Hosting (3)
Dcp\DcpExecutor.cs (2)
435if (_logStreams.TryRemove(entry.ResourceName, out var logStream)) 508if (_logStreams.TryRemove(resource.Metadata.Name, out var logStream))
Utils\FileSystemService.cs (1)
83_allocatedItems.TryRemove(path, out _);
Aspire.Hosting.RemoteHost (2)
Ats\HandleRegistry.cs (1)
136return _handles.TryRemove(handleId, out _);
CancellationTokenRegistry.cs (1)
94if (_sources.TryRemove(tokenId, out var cts))
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
123this.Cache.TryRemove((entry.Key.TraceId, entry.Key.SpanId), out _);
dotnet (2)
Commands\Test\MTP\CtrlCCancellationManager.cs (1)
80_processes.TryRemove(process, out _);
Commands\Test\MTP\Terminal\TestNodeResultsState.cs (1)
46_testNodeProgressStates.TryRemove(key, out _);
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\InternalBufferManager.cs (1)
277_buffersPooled.TryRemove(returnValue.GetHashCode(), out dummy);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (1)
256s_tokenCache.TryRemove(args.Item1, out ignored);
GenerateDocumentationAndConfigFiles (4)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
89public bool Remove(T item) => _dictionary.TryRemove(item, out _);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
25=> _map?.TryRemove(pairIndex, out _) ?? false;
Microsoft.AspNetCore.Components.Server (5)
Circuits\CircuitRegistry.cs (3)
135var result = ConnectedCircuits.TryRemove(circuitId, out circuitHost); 361var removeResult = ConnectedCircuits.TryRemove(circuitId, out _); 390ConnectedCircuits.TryRemove(circuitId, out _);
Circuits\RemoteJSRuntime.cs (2)
200if (_pendingDotNetToJSStreams.TryRemove(streamId, out var timedOutCancelableStreamReference)) 212if (_pendingDotNetToJSStreams.TryRemove(streamId, out var cancelableStreamReference))
Microsoft.AspNetCore.Components.Testing (3)
Infrastructure\ServerFactory.cs (3)
131if (_readinessSignals.TryRemove(token, out var tcs)) 178_instances.TryRemove(instanceKey, out _); 231_readinessSignals.TryRemove(readyToken, out _);
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionManager.cs (1)
91if (_connections.TryRemove(id, out var connection))
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\DistributedCacheTagHelperService.cs (1)
149_workers.TryRemove(key, out _);
Microsoft.AspNetCore.OutputCaching (2)
DispatcherExtensions.cs (2)
45_workers.TryRemove(key, out _); 84_workers.TryRemove(key, out _);
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
Microsoft.AspNetCore.Server.HttpSys (4)
NativeInterop\DisconnectListener.cs (3)
72_connectionCancellationTokens.TryRemove(connectionId, out _); 102_connectionCancellationTokens.TryRemove(connectionId, out _); 111_connectionCancellationTokens.TryRemove(connectionId, out _);
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.Server.IIS (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.Server.Kestrel.Core (6)
Internal\Infrastructure\ConnectionManager.cs (2)
56if (!_connectionReferences.TryRemove(id, out var reference)) 77else if (_connectionReferences.TryRemove(kvp.Key, out reference))
Internal\Infrastructure\TransportConnectionManager.cs (2)
37if (!_connectionReferences.TryRemove(id, out _)) 49if (!_connectionReferences.TryRemove(id, out _))
Internal\PinnedBlockMemoryPoolFactory.cs (1)
35((ConcurrentDictionary<PinnedBlockMemoryPool, nuint>)state!).TryRemove(self, out _);
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (1)
TlsEventPump.cs (1)
237_connections.TryRemove(fd, out _);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
447_handlers.TryRemove(methodName, out _);
Microsoft.AspNetCore.SignalR.Core (6)
HubConnectionStore.cs (1)
54_connections.TryRemove(connection.ConnectionId, out _);
Internal\DefaultHubDispatcher.cs (2)
504connection.ActiveRequestCancellationSources.TryRemove(hubMethodInvocationMessage.InvocationId!, out _); 683connection.ActiveRequestCancellationSources.TryRemove(invocationId, out _);
Internal\HubGroupList.cs (1)
34if (connections.TryRemove(connectionId, out var _) && connections.IsEmpty)
src\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (1)
77_pendingInvocations.TryRemove(invocationId, out var item);
StreamTracker.cs (1)
86if (!_lookup.TryRemove(message.InvocationId!, out var registration))
Microsoft.AspNetCore.SignalR.StackExchangeRedis (5)
Internal\AckHandler.cs (3)
38if (_acks.TryRemove(id, out var ack)) 58if (_acks.TryRemove(pair.Key, out var ack)) 76if (_acks.TryRemove(pair.Key, out var ack))
Internal\RedisSubscriptionManager.cs (1)
57_subscriptions.TryRemove(id, out _);
src\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (1)
77_pendingInvocations.TryRemove(invocationId, out var item);
Microsoft.Build (14)
BackEnd\Components\Caching\ResultsCache.cs (1)
230_resultsByConfiguration.TryRemove(configurationId, out BuildResult removedResult);
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
305_nodeContexts.TryRemove(nodeId, out _);
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
209_nodeContexts.TryRemove(nodeId, out _);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (3)
703_nodeIdToPacketHandlerStack.TryRemove(nodeId, out _); 887if (_nodeIdToNodeKey.TryRemove(nodeId, out TaskHostNodeKey nodeKey)) 889_nodeContexts.TryRemove(nodeKey, out _);
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (1)
686Assumed.True(_projectFileMap.TryRemove(projectBuildEventContext.ProjectContextId, out _), $"ContextID {projectBuildEventContext.ProjectContextId} for project {projectFile} should be in the ID-to-file mapping!");
BackEnd\Components\SdkResolution\CachingSdkResolverService.cs (1)
28_cache.TryRemove(submissionId, out _);
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
102_resolverStateBySubmission.TryRemove(submissionId, out _);
BackEnd\Shared\BuildResult.cs (1)
572_ = _resultsByTarget!.TryRemove(target, out _);
Evaluation\ProjectRootElementCache.cs (1)
283_fileLoadLocks.TryRemove(projectFile, out _);
Evaluation\SimpleProjectRootElementCache.cs (1)
126_cache.TryRemove(projectRootElement.FullPath, out _);
Graph\GraphBuilder.cs (1)
749Assumed.True(ReferenceItems.TryRemove(key, out _), "All requested keys should exist");
src\msbuild\src\Shared\RegisteredTaskObjectCacheBase.cs (1)
84dict?.TryRemove(key, out obj);
Microsoft.Build.Tasks.Core (1)
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
729CompiledAssemblyCache.TryRemove(taskInfo, out _);
Microsoft.CodeAnalysis (6)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1709PerSymbolAnalyzerActionsCache.TryRemove((namespaceOrType, analyzer), out _);
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
1691if (!_analyzerExecutionTimeMap.TryRemove(analyzer, out var executionTime)) 1737_lazyControlFlowGraphMap.TryRemove(root, out _);
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (1)
82_semanticModelsMap.TryRemove(tree, out _);
InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
Microsoft.CodeAnalysis.Analyzers (5)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (1)
868if (localizableStringsMap.TryRemove(namedType, out var localizableFieldsWithOriginalArguments))
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
89public bool Remove(T item) => _dictionary.TryRemove(item, out _);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
25=> _map?.TryRemove(pairIndex, out _) ?? false;
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
89public bool Remove(T item) => _dictionary.TryRemove(item, out _);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
25=> _map?.TryRemove(pairIndex, out _) ?? false;
Microsoft.CodeAnalysis.CodeStyle (4)
src\roslyn\src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
120if (member is IFieldSymbol field && fieldStateMap.TryRemove(field.OriginalDefinition, out var value))
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
25=> _map?.TryRemove(pairIndex, out _) ?? false;
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Source\SourceAssemblySymbol.cs (1)
2652_unassignedFieldsMap.TryRemove(field, out _);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
198_namedTypeToAnalyzer.TryRemove(_namedType, out _);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
198_namedTypeToAnalyzer.TryRemove(_namedType, out _);
Microsoft.CodeAnalysis.Extensions.Package (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
Microsoft.CodeAnalysis.Features (3)
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
165_documentToLastReportedInformation.TryRemove(docId, out _);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
287if (_generatedFilenameToInformation.TryRemove(fileInfo.TemporaryFilePath, out var documentIdInfo))
src\roslyn\src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
120if (member is IFieldSymbol field && fieldStateMap.TryRemove(field.OriginalDefinition, out var value))
Microsoft.CodeAnalysis.NetAnalyzers (11)
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUnusedPrivateFields.cs (1)
110maybeUnreferencedPrivateFields.TryRemove(field, out _);
Microsoft.NetCore.Analyzers\Performance\PreferReadOnlySpanOverSpan.cs (1)
96candidateParameters.TryRemove(parameter, out _);
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.Collector.cs (7)
610source.VirtualDispatchFields.TryRemove(field, out var value); 623source.VirtualDispatchProperties.TryRemove(property, out var value); 638source.VirtualDispatchParameters.TryRemove(parameter, out var value); 652source.FieldAssignments.TryRemove(field, out var value); 665source.PropertyAssignments.TryRemove(property, out var value); 680source.ParameterAssignments.TryRemove(parameter, out var value); 694source.MethodReturns.TryRemove(method, out var value);
Microsoft.NetCore.Analyzers\Runtime\ProvideCorrectArgumentsToFormattingMethods.cs (1)
402_map.TryRemove(method, out _);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
88public bool Remove(T item) => _dictionary.TryRemove(item, out _);
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
89public bool Remove(T item) => _dictionary.TryRemove(item, out _);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
25=> _map?.TryRemove(pairIndex, out _) ?? false;
Microsoft.CodeAnalysis.Workspaces (6)
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
215_projectIdToInfo.TryRemove(projectId, out _); 229_peReferenceToInfo.TryRemove(reference, out _);
Remote\RemoteServiceCallbackDispatcher.cs (1)
25Contract.ThrowIfTrue(callbackInstances?.TryRemove(Id, out _) == false);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
25=> _map?.TryRemove(pairIndex, out _) ?? false;
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Rpc\RpcClient.cs (2)
73Contract.ThrowIfFalse(_outstandingRequests.TryRemove(response.Id, out var completionSourceAndExpectedType), $"We got a response for request ID {response.Id} but that was already completed."); 183_outstandingRequests.TryRemove(requestId, out _);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
MSBuild\Logging\MSBuildDiagnosticLogger.cs (1)
38=> _logsBySubmissionId.TryRemove(submissionId, out _);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
Microsoft.Diagnostics.DataContractReader.Legacy (1)
MetaDataImportImpl.cs (1)
119if (_cdacEnumHandles.TryRemove(hEnum, out _))
Microsoft.Diagnostics.NETCore.Client (1)
ReversedServer\ReversedDiagnosticsServer.cs (1)
218if (_streamCollections.TryRemove(runtimeCookie, out HandleableCollection<Stream> streamCollection))
Microsoft.Extensions.AI (2)
ChatRouting\OrderedFailoverChatClient.cs (2)
93_ = _requestStates.TryRemove(context, out _); 108_ = _requestStates.TryRemove(context, out _);
Microsoft.Extensions.AI.Evaluation.Reporting (2)
ResponseCachingChatClient.cs (2)
102if (_stopWatches.TryRemove(key, out Stopwatch? stopwatch)) 127if (_stopWatches.TryRemove(key, out Stopwatch? stopwatch))
Microsoft.Extensions.AI.Tests (1)
TestInMemoryCacheStorage.cs (1)
33=> _storage.TryRemove(key, out _);
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.StampedeState.cs (1)
104_ = _currentOperations.TryRemove(key, out _);
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
827=> key is string s ? _stringEntries.TryRemove(s, out entry) : _nonStringEntries.TryRemove(key, out entry);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
ManualHealthCheckTracker.cs (1)
24_ = _checks.TryRemove(checkToRemove, out _);
Microsoft.Extensions.Diagnostics.Testing (1)
Logging\FakeLogger.cs (1)
91public void ControlLevel(LogLevel logLevel, bool enabled) => _ = enabled ? _disabledLevels.TryRemove(logLevel, out _) : _disabledLevels.TryAdd(logLevel, false);
Microsoft.Extensions.FileProviders.Physical (4)
PhysicalFilesWatcher.cs (4)
427if (tokens.TryRemove(entry.Key, out ChangeTokenInfo matchInfo)) 527if (_filePathTokenLookup.TryRemove(path, out ChangeTokenInfo matchInfo)) 542_wildcardTokenLookup.TryRemove(wildCardEntry.Key, out matchInfo)) 850if (!changeTokens.TryRemove(token, out _))
Microsoft.Extensions.Http (1)
DefaultHttpClientFactory.cs (1)
199bool removed = _activeHandlers.TryRemove(active.Name, out Lazy<ActiveHandlerTrackingEntry>? found);
Microsoft.Extensions.Options (1)
OptionsCache.cs (1)
113_cache.TryRemove(name ?? Options.DefaultName, out _);
Microsoft.Extensions.ServiceDiscovery (2)
Http\HttpServiceEndpointResolver.cs (1)
141if (resolver.CanExpire() && _resolvers.TryRemove(name, out var _))
ServiceEndpointResolver.cs (1)
150if (resolver.CanExpire() && _resolvers.TryRemove(name, out var _))
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
parent\parent\Shared\FxPolyfills\ConcurrentDictionary.cs (2)
32dictionary.TryRemove(key, out _); 37if (dictionary.TryRemove(pair.Key, out var existing) && !EqualityComparer<TValue>.Default.Equals(existing, pair.Value))
Microsoft.JSInterop (4)
JSRuntime.cs (4)
189_pendingTasks.TryRemove(taskId, out _); 190if (_cancellationRegistrations.TryRemove(taskId, out var registration)) 287if (!_pendingTasks.TryRemove(taskId, out var pendingCall)) 384internal void ReleaseObjectReference(long dotNetObjectId) => _trackedRefsById.TryRemove(dotNetObjectId, out _);
Microsoft.Maui (2)
Handlers\HybridWebView\HybridWebViewTaskManager.cs (2)
31 if (_asyncTaskCallbacks.TryRemove(taskId, out var callback)) 39 if (_asyncTaskCallbacks.TryRemove(taskId, out var callback))
Microsoft.Maui.Controls (3)
AnimationExtensions.cs (3)
79 s_tweeners.TryRemove(id, out _); 99 s_tweeners.TryRemove(id, out _); 108 if (s_tweeners.TryRemove(tickerId, out Animation animation))
Microsoft.ML.Core (1)
Data\ProgressReporter.cs (1)
154_subChannels.TryRemove(id, out channel);
Microsoft.NET.StringTools (1)
WeakStringCache.Concurrent.cs (1)
149if (!entry.Value.IsUsed && _weakHandlesByHashCode.TryRemove(entry.Key, out StringWeakHandle? removedHandle))
Microsoft.VisualStudio.TestPlatform.Common (2)
DataCollection\DataCollectionAttachmentManager.cs (2)
155_attachmentTasks.TryRemove(dataCollectionContext, out _); 156AttachmentSets.TryRemove(dataCollectionContext, out _);
Microsoft.VisualStudio.TestPlatform.ObjectModel (2)
TestObject.cs (2)
82_store.TryRemove(kvp.Key, out _); 170_store.TryRemove(property, out _);
MSBuild (7)
OutOfProcTaskHostNode.cs (6)
973if (kvp.Value.PendingCallbackRequests.TryRemove(callbackPacket.RequestId, out TaskCompletionSource<INodePacket> tcsFromContext)) 980if (_pendingCallbackRequests.TryRemove(callbackPacket.RequestId, out TaskCompletionSource<INodePacket> tcs)) 1052pendingRequests.TryRemove(requestId, out _); 1136if (_taskContexts.TryRemove(taskId, out var context)) 1437if (_pendingCallbackRequests.TryRemove(kvp.Key, out TaskCompletionSource<INodePacket> tcs)) 1447if (contextKvp.Value.PendingCallbackRequests.TryRemove(reqKvp.Key, out TaskCompletionSource<INodePacket> ctxTcs))
src\msbuild\src\Shared\RegisteredTaskObjectCacheBase.cs (1)
84dict?.TryRemove(key, out obj);
MSBuild.Coordinator (1)
CoordinatorServer.cs (1)
96_ = clientTask.ContinueWith(_ => clientTasks.TryRemove(clientTask, out byte _), TaskScheduler.Default);
NuGet.Credentials (1)
CredentialService.cs (1)
206_providerCredentialCache.TryRemove(key, out _);
NuGet.Protocol (6)
PackagesFolder\NuGetv3LocalRepository.cs (1)
272_cache.TryRemove(packageId, out _);
Plugins\MessageDispatcher.cs (2)
666if (_inboundRequestContexts.TryRemove(requestId, out var requestContext)) 674if (_outboundRequestContexts.TryRemove(requestId, out var requestContext))
Plugins\PluginFactory.cs (1)
391if (_plugins.TryRemove(plugin.FilePath, out Lazy<Task<IPlugin>>? lazyTask))
Plugins\PluginManager.cs (1)
403_pluginUtilities.TryRemove(plugin.Id, out _);
Plugins\RequestHandlers.cs (1)
88return _handlers.TryRemove(method, out _);
Roslyn.Diagnostics.Analyzers (4)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
105return _dictionary.TryRemove(value, out _);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
127_outstanding.TryRemove(obj, out _);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
89public bool Remove(T item) => _dictionary.TryRemove(item, out _);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
25=> _map?.TryRemove(pairIndex, out _) ?? false;
System.Data.Common (1)
System\Data\Common\DbProviderFactories.cs (1)
135return !string.IsNullOrWhiteSpace(providerInvariantName) && _registeredFactories.TryRemove(providerInvariantName, out _);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\AggregationManager.cs (1)
335_instrumentStates.TryRemove(instrument, out _);
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
403if (_wdToWatch.TryRemove(watch.WatchDescriptor, out _))
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
528_pools.TryRemove(entry.Key, out _);
System.Net.Http.WinHttpHandler (2)
System\Net\Http\WinHttpHandler.cs (2)
1731bool result = _cachedCertificates.TryRemove(key, out _); 1755_cachedCertificates.TryRemove(kvPair.Key, out _);
System.Net.Quic (1)
src\runtime\src\libraries\Common\src\System\Net\SafeHandleCache.cs (1)
140bool removed = _cache.TryRemove(key, out _);
System.Net.Security (3)
src\runtime\src\libraries\Common\src\System\Net\SafeHandleCache.cs (1)
140bool removed = _cache.TryRemove(key, out _);
System\Net\Security\SslSessionsCache.cs (2)
228s_cachedCreds.TryRemove(toRemoveAttempt[i].Key, out _); 240s_cachedCreds.TryRemove(toRemoveAttempt[i].Key, out _);
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (2)
1565bool IDictionary<TKey, TValue>.Remove(TKey key) => TryRemove(key, out _); 1763TryRemove(tkey, out _);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\DataContract.cs (1)
959s_typeToIDCache.TryRemove(runtimeTypeHandle.Value, out _);
System.Private.Windows.Core.TestUtilities (1)
NoAssertContext.cs (1)
75if (s_suppressedThreads.TryRemove(currentThread, out int count))
System.ServiceModel.Primitives (2)
Internals\System\Runtime\InternalBufferManager.cs (1)
275_buffersPooled.TryRemove(returnValue.GetHashCode(), out dummy);
Internals\System\Runtime\TimeoutHelper.cs (1)
267s_tokenCache.TryRemove(args.Item1, out ignored);
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.Cache.cs (1)
71_cache.TryRemove(kvp.Key, out _);
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Regex.Cache.cs (2)
120s_cacheDictionary.TryRemove(s_cacheList[i].Key, out _); 274s_cacheDictionary.TryRemove(s_cacheList[minListIndex].Key, out _);
System.Windows.Forms (4)
System\Windows\Forms\Rendering\Animation\AnimationManager.cs (4)
62_ = _renderer.TryRemove(renderer, out _); 117_ = manager._renderer.TryRemove(animationRenderer, out _); 124&& manager._renderer.TryRemove(animatedControlRenderer, out AnimationRendererItem? renderItem)) 213_ = _renderer.TryRemove(item.Renderer, out _);
System.Xaml (1)
System\Xaml\XamlSchemaContext.cs (1)
862_xmlnsInfoForDynamicAssemblies.TryRemove(weakRefKey, out _);
vstest.console (1)
Internal\ConsoleLogger.cs (1)
536LeafTestResults.TryRemove(parentExecutionId, out _);
vstest.console.arm64 (1)
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
536LeafTestResults.TryRemove(parentExecutionId, out _);