21 instantiations of ConcurrentStack
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\Converters\CollectionAdapters\ConcurrentStackBufferAdapter.cs (1)
10public static ConcurrentStack<TElement> CreateBuffer() => new();
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Binding\FormDataMapperTests.cs (1)
801var expected = new ConcurrentStack<int>(new[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 });
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ConcurrentStackBufferAdapter.cs (1)
10public static ConcurrentStack<TElement> CreateBuffer() => new();
Microsoft.Build (3)
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
122_targetsToBuild = new ConcurrentStack<TargetEntry>();
Evaluation\ConditionEvaluator.cs (1)
250var expressionPool = cachedExpressionTreesForCurrentOptions.GetOrAdd(condition, _ => new ConcurrentStack<GenericExpressionNode>());
FileMatcher.cs (1)
2569var listOfFiles = new ConcurrentStack<List<string>>();
Microsoft.Build.Tasks.Core (1)
FileMatcher.cs (1)
2569var listOfFiles = new ConcurrentStack<List<string>>();
Microsoft.Build.Utilities.Core (1)
FileMatcher.cs (1)
2569var listOfFiles = new ConcurrentStack<List<string>>();
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
48private static readonly ObjectPool<ConcurrentStack<AnalysisResult>> s_analysisResultPool = new(() => new());
Microsoft.CodeAnalysis.CSharp (2)
Compiler\ClsComplianceChecker.cs (1)
56_compilerTasks = new ConcurrentStack<Task>();
Compiler\MethodCompiler.cs (1)
155methodCompiler._compilerTasks = new ConcurrentStack<Task>();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ObjectFormatterTests.cs (1)
711var obj = new ConcurrentStack<object>();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\CompilationAPITests.cs (2)
534var stack = new ConcurrentStack<MetadataReference> { }; 861var stack = new ConcurrentStack<SyntaxTree> { };
Microsoft.CodeAnalysis.VisualBasic (4)
Compilation\ClsComplianceChecker.vb (1)
51Me._compilerTasks = New ConcurrentStack(Of Task)()
Compilation\MethodCompiler.vb (1)
109_compilerTasks = New ConcurrentStack(Of Task)()
Symbols\Source\SourceModuleSymbol.vb (2)
607Dim tasks As ConcurrentStack(Of Task) = If(ContainingSourceAssembly.DeclaringCompilation.Options.ConcurrentBuild, New ConcurrentStack(Of Task)(), Nothing) 687New ConcurrentStack(Of Task)(), Nothing)
System.Data.Odbc (2)
Common\System\Data\ProviderBase\DbConnectionPool.cs (2)
108private readonly ConcurrentStack<DbConnectionInternal> _stackOld = new ConcurrentStack<DbConnectionInternal>(); 109private readonly ConcurrentStack<DbConnectionInternal> _stackNew = new ConcurrentStack<DbConnectionInternal>();
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (1)
18private readonly ConcurrentStack<HttpConnection> _http11Connections = new();
124 references to ConcurrentStack
Microsoft.AspNetCore.Components.Endpoints (11)
FormMapping\Converters\CollectionAdapters\ConcurrentStackBufferAdapter.cs (7)
8internal sealed class ConcurrentStackBufferAdapter<TElement> : ICollectionBufferAdapter<ConcurrentStack<TElement>, ConcurrentStack<TElement>, TElement> 10public static ConcurrentStack<TElement> CreateBuffer() => new(); 12public static ConcurrentStack<TElement> Add(ref ConcurrentStack<TElement> buffer, TElement element) 18public static ConcurrentStack<TElement> ToResult(ConcurrentStack<TElement> buffer) => buffer;
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (4)
52var _ when type == (typeof(ConcurrentStack<TElement>)) => true, 143var _ when type.IsAssignableTo(typeof(ConcurrentStack<TElement>)) => 144new CollectionConverter<ConcurrentStack<TElement>, ConcurrentStackBufferAdapter<TElement>, ConcurrentStack<TElement>, TElement>(elementTypeConverter),
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Binding\FormDataMapperTests.cs (3)
801var expected = new ConcurrentStack<int>(new[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }); 802CanDeserialize_Collection<ConcurrentStack<int>, ConcurrentStack<int>, int>(expected);
Microsoft.AspNetCore.Http.Extensions (11)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ConcurrentStackBufferAdapter.cs (7)
8internal sealed class ConcurrentStackBufferAdapter<TElement> : ICollectionBufferAdapter<ConcurrentStack<TElement>, ConcurrentStack<TElement>, TElement> 10public static ConcurrentStack<TElement> CreateBuffer() => new(); 12public static ConcurrentStack<TElement> Add(ref ConcurrentStack<TElement> buffer, TElement element) 18public static ConcurrentStack<TElement> ToResult(ConcurrentStack<TElement> buffer) => buffer;
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (4)
52var _ when type == (typeof(ConcurrentStack<TElement>)) => true, 143var _ when type.IsAssignableTo(typeof(ConcurrentStack<TElement>)) => 144new CollectionConverter<ConcurrentStack<TElement>, ConcurrentStackBufferAdapter<TElement>, ConcurrentStack<TElement>, TElement>(elementTypeConverter),
Microsoft.Build (14)
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
51private ConcurrentStack<TargetEntry> _targetsToBuild;
Collections\ConcurrentStackExtensions.cs (2)
20public static T Peek<T>(this ConcurrentStack<T> stack) where T : class 30public static T Pop<T>(this ConcurrentStack<T> stack) where T : class
Evaluation\ConditionEvaluator.cs (9)
143private readonly ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>> _conditionPools; 148public ExpressionTreeForCurrentOptionsWithSize(ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>> conditionPools) 154public ConcurrentStack<GenericExpressionNode> GetOrAdd(string condition, Func<string, ConcurrentStack<GenericExpressionNode>> addFunc) 156if (!_conditionPools.TryGetValue(condition, out var stack)) 245_ => new ExpressionTreeForCurrentOptionsWithSize(new ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>>(StringComparer.Ordinal))); 250var expressionPool = cachedExpressionTreesForCurrentOptions.GetOrAdd(condition, _ => new ConcurrentStack<GenericExpressionNode>()); 321new ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>>(StringComparer.Ordinal)), 328new ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>>(StringComparer.Ordinal));
FileMatcher.cs (2)
813ConcurrentStack<List<string>> listOfFiles, 2569var listOfFiles = new ConcurrentStack<List<string>>();
Microsoft.Build.Tasks.Core (2)
FileMatcher.cs (2)
813ConcurrentStack<List<string>> listOfFiles, 2569var listOfFiles = new ConcurrentStack<List<string>>();
Microsoft.Build.Utilities.Core (2)
FileMatcher.cs (2)
813ConcurrentStack<List<string>> listOfFiles, 2569var listOfFiles = new ConcurrentStack<List<string>>();
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (3)
48private static readonly ObjectPool<ConcurrentStack<AnalysisResult>> s_analysisResultPool = new(() => new()); 330ConcurrentStack<AnalysisResult> analysisResults) 534ConcurrentStack<AnalysisResult> analysisResults,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
249public static void ClearAndFree<T>(this ObjectPool<ConcurrentStack<T>> pool, ConcurrentStack<T> stack)
Microsoft.CodeAnalysis.CSharp (4)
Compiler\ClsComplianceChecker.cs (2)
35private readonly ConcurrentStack<Task> _compilerTasks; 176var tasks = _compilerTasks;
Compiler\MethodCompiler.cs (2)
58private ConcurrentStack<Task> _compilerTasks; 329var tasks = _compilerTasks;
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ObjectFormatterTests.cs (1)
711var obj = new ConcurrentStack<object>();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\CompilationAPITests.cs (2)
534var stack = new ConcurrentStack<MetadataReference> { }; 861var stack = new ConcurrentStack<SyntaxTree> { };
Microsoft.CodeAnalysis.Features (3)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (3)
48private static readonly ObjectPool<ConcurrentStack<AnalysisResult>> s_analysisResultPool = new(() => new()); 330ConcurrentStack<AnalysisResult> analysisResults) 534ConcurrentStack<AnalysisResult> analysisResults,
Microsoft.CodeAnalysis.VisualBasic (8)
Compilation\ClsComplianceChecker.vb (2)
38Private ReadOnly _compilerTasks As ConcurrentStack(Of Task) 81Dim tasks As ConcurrentStack(Of Task) = Me._compilerTasks
Compilation\MethodCompiler.vb (2)
54Private ReadOnly _compilerTasks As ConcurrentStack(Of Task) 339Dim tasks As ConcurrentStack(Of Task) = Me._compilerTasks
Symbols\Source\SourceModuleSymbol.vb (4)
607Dim tasks As ConcurrentStack(Of Task) = If(ContainingSourceAssembly.DeclaringCompilation.Options.ConcurrentBuild, New ConcurrentStack(Of Task)(), Nothing) 686Dim tasks As ConcurrentStack(Of Task) = If(ContainingSourceAssembly.DeclaringCompilation.Options.ConcurrentBuild, 726Private Sub VisitAllSourceTypesAndNamespaces(visitor As Action(Of NamespaceOrTypeSymbol), tasks As ConcurrentStack(Of Task), cancellationToken As CancellationToken) 731Private Sub VisitTypesAndNamespacesWithin(ns As NamespaceOrTypeSymbol, visitor As Action(Of NamespaceOrTypeSymbol), tasks As ConcurrentStack(Of Task), cancellationToken As CancellationToken)
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
249public static void ClearAndFree<T>(this ObjectPool<ConcurrentStack<T>> pool, ConcurrentStack<T> stack)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
249public static void ClearAndFree<T>(this ObjectPool<ConcurrentStack<T>> pool, ConcurrentStack<T> stack)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
79[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Concurrent.ConcurrentStack<>))]
netstandard (1)
netstandard.cs (1)
97[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Concurrent.ConcurrentStack<>))]
System.Collections.Concurrent (43)
System\Collections\Concurrent\ConcurrentStack.cs (43)
34/// All public and protected members of <see cref="ConcurrentStack{T}"/> are thread-safe and may be used 64/// Initializes a new instance of the <see cref="ConcurrentStack{T}"/> 72/// Initializes a new instance of the <see cref="ConcurrentStack{T}"/> 76/// cref="ConcurrentStack{T}"/>.</param> 106/// Gets a value that indicates whether the <see cref="ConcurrentStack{T}"/> is empty. 108/// <value>true if the <see cref="ConcurrentStack{T}"/> is empty; otherwise, false.</value> 126/// Gets the number of elements contained in the <see cref="ConcurrentStack{T}"/>. 128/// <value>The number of elements contained in the <see cref="ConcurrentStack{T}"/>.</value> 164/// with the SyncRoot; otherwise, false. For <see cref="ConcurrentStack{T}"/>, this property always 189/// Removes all objects from the <see cref="ConcurrentStack{T}"/>. 207/// <see cref="ConcurrentStack{T}"/>. The <see cref="System.Array"/> must 237/// Copies the <see cref="ConcurrentStack{T}"/> elements to an existing one-dimensional <see 242/// <see cref="ConcurrentStack{T}"/>. The <see cref="System.Array"/> must have zero-based 252/// -or- The number of elements in the source <see cref="ConcurrentStack{T}"/> is greater than the 268/// Inserts an object at the top of the <see cref="ConcurrentStack{T}"/>. 270/// <param name="item">The object to push onto the <see cref="ConcurrentStack{T}"/>. The value can be 292/// Inserts multiple objects at the top of the <see cref="ConcurrentStack{T}"/> atomically. 294/// <param name="items">The objects to push onto the <see cref="ConcurrentStack{T}"/>.</param> 312/// Inserts multiple objects at the top of the <see cref="ConcurrentStack{T}"/> atomically. 314/// <param name="items">The objects to push onto the <see cref="ConcurrentStack{T}"/>.</param> 316/// inserting elements onto the top of the <see cref="ConcurrentStack{T}"/>.</param> 318/// cref="ConcurrentStack{T}"/>.</param> 415/// <remarks>For <see cref="ConcurrentStack{T}"/>, this operation 416/// will always insert the object onto the top of the <see cref="ConcurrentStack{T}"/> 425/// Attempts to return an object from the top of the <see cref="ConcurrentStack{T}"/> 429/// the top of the <see cref="System.Collections.Concurrent.ConcurrentStack{T}"/> or an 450/// Attempts to pop and return the object at the top of the <see cref="ConcurrentStack{T}"/>. 457/// cref="ConcurrentStack{T}"/> 479/// Attempts to pop and return multiple objects from the top of the <see cref="ConcurrentStack{T}"/> 484/// cref="ConcurrentStack{T}"/> will be added. 487/// cref="ConcurrentStack{T}"/> and inserted in 506/// Attempts to pop and return multiple objects from the top of the <see cref="ConcurrentStack{T}"/> 511/// cref="ConcurrentStack{T}"/> will be added. 514/// inserting elements from the top of the <see cref="ConcurrentStack{T}"/>.</param> 516/// cref="ConcurrentStack{T}"/> and inserted into <paramref name="items"/>.</param> 518/// the <see cref="ConcurrentStack{T}"/> and inserted in <paramref name="items"/>.</returns> 579/// the <see cref="ConcurrentStack{T}"/>.</returns> 666/// <remarks>For <see cref="ConcurrentStack{T}"/>, this operation will attempt to pope the object at 667/// the top of the <see cref="ConcurrentStack{T}"/>. 675/// Copies the items stored in the <see cref="ConcurrentStack{T}"/> to a new array. 678/// cref="ConcurrentStack{T}"/>.</returns> 715/// Returns an enumerator that iterates through the <see cref="ConcurrentStack{T}"/>. 717/// <returns>An enumerator for the <see cref="ConcurrentStack{T}"/>.</returns>
System.Data.Odbc (2)
Common\System\Data\ProviderBase\DbConnectionPool.cs (2)
108private readonly ConcurrentStack<DbConnectionInternal> _stackOld = new ConcurrentStack<DbConnectionInternal>(); 109private readonly ConcurrentStack<DbConnectionInternal> _stackNew = new ConcurrentStack<DbConnectionInternal>();
System.Net.Http (2)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (2)
18private readonly ConcurrentStack<HttpConnection> _http11Connections = new(); 425private static void ScavengeHttp11ConnectionStack(HttpConnectionPool pool, ConcurrentStack<HttpConnection> connections, ref List<HttpConnectionBase>? toDispose, long nowTicks, TimeSpan pooledConnectionLifetime, TimeSpan pooledConnectionIdleTimeout)
System.Text.Json (4)
System\Text\Json\Serialization\Converters\Collection\ConcurrentStackOfTConverter.cs (1)
10where TCollection : ConcurrentStack<TElement>
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (1)
130else if ((actualTypeToConvert = typeToConvert.GetCompatibleGenericBaseClass(typeof(ConcurrentStack<>))) != null)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (2)
275/// Creates serialization metadata for types assignable to <see cref="ConcurrentStack{T}"/>. 286where TCollection : ConcurrentStack<TElement>
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
61public INamedTypeSymbol? ConcurrentStackType => GetOrResolveType(typeof(ConcurrentStack<>), ref _ConcurrentStackType);