2 instantiations of ImmutableStack
System.Collections.Immutable (2)
System\Collections\Immutable\ImmutableStack_1.cs (2)
27private static readonly ImmutableStack<T> s_EmptyField = new ImmutableStack<T>(); 141return new ImmutableStack<T>(value, this);
145 references to ImmutableStack
Metrics (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
Metrics.Legacy (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
Microsoft.AspNetCore.Components.Endpoints (7)
FormMapping\Converters\CollectionAdapters\ImmutableStackBufferAdapter.cs (4)
10: ArrayPoolBufferAdapter<ImmutableStack<TElement>, ImmutableStackBufferAdapter<TElement>.ImmutableStackFactory, TElement> 12internal class ImmutableStackFactory : ICollectionFactory<ImmutableStack<TElement>, TElement> 14public static ImmutableStack<TElement> ToResultCore(TElement[] buffer, int size) 26ImmutableStack<TElement>,
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (3)
61var _ when type == (typeof(ImmutableStack<TElement>)) => true, 159var _ when type.IsAssignableTo(typeof(ImmutableStack<TElement>)) => 160new CollectionConverter<ImmutableStack<TElement>, ImmutableStackBufferAdapter<TElement>, ImmutableStackBufferAdapter<TElement>.PooledBuffer, TElement>(elementTypeConverter),
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Binding\FormDataMapperTests.cs (5)
849var expected = ImmutableStack.CreateRange(new[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }); 850CanDeserialize_Collection<ImmutableStack<int>, ImmutableStack<int>, int>(expected); 881var expected = ImmutableStack.CreateRange(new[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }); 882CanDeserialize_Collection<IImmutableStack<int>, ImmutableStack<int>, int>(expected);
Microsoft.AspNetCore.Http.Extensions (7)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableStackBufferAdapter.cs (4)
10: ArrayPoolBufferAdapter<ImmutableStack<TElement>, ImmutableStackBufferAdapter<TElement>.ImmutableStackFactory, TElement> 12internal class ImmutableStackFactory : ICollectionFactory<ImmutableStack<TElement>, TElement> 14public static ImmutableStack<TElement> ToResultCore(TElement[] buffer, int size) 26ImmutableStack<TElement>,
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (3)
61var _ when type == (typeof(ImmutableStack<TElement>)) => true, 159var _ when type.IsAssignableTo(typeof(ImmutableStack<TElement>)) => 160new CollectionConverter<ImmutableStack<TElement>, ImmutableStackBufferAdapter<TElement>, ImmutableStackBufferAdapter<TElement>.PooledBuffer, TElement>(elementTypeConverter),
Microsoft.CodeAnalysis.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
Microsoft.CodeAnalysis.AnalyzerUtilities (30)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AbstractLocation.cs (11)
23/// 2. Location for the implicit 'this' or 'Me' instance being analyzed (<see cref="CreateThisOrMeLocation(INamedTypeSymbol, ImmutableStack{IOperation})"/>). 24/// 3. Location created for certain symbols which do not have a declaration in executable code, i.e. no <see cref="IOperation"/> for declaration (such as parameter symbols, member symbols, etc. - <see cref="CreateSymbolLocation(ISymbol, ImmutableStack{IOperation})"/>/>). 26/// See <see cref="CreateFlowCaptureLocation(InterproceduralCaptureId, ITypeSymbol, ImmutableStack{IOperation})"/> 35private AbstractLocation(IOperation? creation, ImmutableStack<IOperation>? creationCallStack, AnalysisEntity? analysisEntity, ISymbol? symbol, InterproceduralCaptureId? captureId, ITypeSymbol? locationType, bool isSpecialSingleton) 40CreationCallStack = creationCallStack ?? ImmutableStack<IOperation>.Empty; 48private static AbstractLocation Create(IOperation? creation, ImmutableStack<IOperation>? creationCallStack, AnalysisEntity? analysisEntity, ISymbol? symbol, InterproceduralCaptureId? captureId, ITypeSymbol? locationType) 58internal static AbstractLocation CreateAllocationLocation(IOperation creation, ITypeSymbol locationType, ImmutableStack<IOperation>? callStack) 62public static AbstractLocation CreateThisOrMeLocation(INamedTypeSymbol namedTypeSymbol, ImmutableStack<IOperation>? creationCallStack) 64public static AbstractLocation CreateSymbolLocation(ISymbol symbol, ImmutableStack<IOperation>? creationCallStack) 66public static AbstractLocation CreateFlowCaptureLocation(InterproceduralCaptureId captureId, ITypeSymbol locationType, ImmutableStack<IOperation>? creationCallStack) 70public ImmutableStack<IOperation> CreationCallStack { get; }
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (6)
38private readonly ImmutableStack<IOperation>? _interproceduralCallStack; 40private readonly Func<ISymbol, ImmutableStack<IOperation>?> _getInterproceduralCallStackForOwningSymbol; 51ImmutableStack<IOperation>? interproceduralCallStack, 54Func<ISymbol, ImmutableStack<IOperation>?> getInterproceduralCallStackForOwningSymbol) 531ImmutableStack<IOperation>? interproceduralCallStackForSymbolDeclaration; 539interproceduralCallStackForSymbolDeclaration = ImmutableStack<IOperation>.Empty;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
3564private ImmutableStack<IOperation>? GetInterproceduralCallStackForOwningSymbol(ISymbol forOwningSymbol)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\InterproceduralAnalysisData.cs (4)
36ImmutableStack<IOperation> callStack, 41Func<ISymbol, ImmutableStack<IOperation>?> getInterproceduralCallStackForOwningSymbol) 63public ImmutableStack<IOperation> CallStack { get; } 68public Func<ISymbol, ImmutableStack<IOperation>?> GetInterproceduralCallStackForOwningSymbol { get; }
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\ThrownExceptionInfo.cs (6)
19ImmutableStack<IOperation>? interproceduralCallStack, 26InterproceduralCallStack = interproceduralCallStack ?? ImmutableStack<IOperation>.Empty; 30internal static ThrownExceptionInfo Create(BasicBlock block, INamedTypeSymbol exceptionType, ImmutableStack<IOperation>? interproceduralCallStack) 35internal static ThrownExceptionInfo CreateDefaultInfoForExceptionsPathAnalysis(BasicBlock block, WellKnownTypeProvider wellKnownTypeProvider, ImmutableStack<IOperation>? interproceduralCallStack) 68internal ThrownExceptionInfo With(BasicBlock block, ImmutableStack<IOperation>? interproceduralCallStack) 90internal ImmutableStack<IOperation> InterproceduralCallStack { get; }
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
Microsoft.CodeAnalysis.CSharp (3)
Parser\Blender.cs (2)
19private readonly ImmutableStack<TextChangeRange> _changes; 86ImmutableStack<TextChangeRange> changes,
Parser\Blender.Reader.cs (1)
19private ImmutableStack<TextChangeRange> _changes;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
62nameof(ImmutableStack<int>),
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
62nameof(ImmutableStack<int>),
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
Microsoft.CodeAnalysis.VisualBasic (8)
Scanner\Directives.vb (8)
270Private ReadOnly _conditionals As ImmutableStack(Of ConditionalState) 271Private ReadOnly _regionDirectives As ImmutableStack(Of RegionDirectiveTriviaSyntax) 282conditionals As ImmutableStack(Of ConditionalState), 283regionDirectives As ImmutableStack(Of RegionDirectiveTriviaSyntax), 306Friend ReadOnly Property ConditionalStack As ImmutableStack(Of ConditionalState) 312Private Function WithConditionals(conditionals As ImmutableStack(Of ConditionalState)) As PreprocessorState 316Friend ReadOnly Property RegionDirectiveStack As ImmutableStack(Of RegionDirectiveTriviaSyntax) 328Private Function WithRegions(regions As ImmutableStack(Of RegionDirectiveTriviaSyntax)) As PreprocessorState
Microsoft.DotNet.Helix.Sdk (4)
LoggerExtensions.cs (4)
17private static readonly AsyncLocal<ImmutableStack<string>> s_localCategoryStack = new AsyncLocal<ImmutableStack<string>>(); 19private static ImmutableStack<string> CategoryStack 21get => s_localCategoryStack.Value ?? ImmutableStack<string>.Empty;
Roslyn.Diagnostics.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
System.Collections.Immutable (60)
System\Collections\Immutable\ImmutableInterlocked.cs (8)
537public static bool TryPop<T>(ref ImmutableStack<T> location, [MaybeNullWhen(false)] out T value) 539ImmutableStack<T> priorCollection = Volatile.Read(ref location); 551ImmutableStack<T> updatedCollection = priorCollection.Pop(out value); 552ImmutableStack<T> interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection); 566public static void Push<T>(ref ImmutableStack<T> location, T value) 568ImmutableStack<T> priorCollection = Volatile.Read(ref location); 574ImmutableStack<T> updatedCollection = priorCollection.Push(value); 575ImmutableStack<T> interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
System\Collections\Immutable\ImmutableQueue.cs (6)
55ImmutableStack<T> forwards = ImmutableStack.Create(e.Current); 56ImmutableStack<T> backwards = ImmutableStack<T>.Empty; 93ImmutableStack<T> forwards = ImmutableStack<T>.Empty; 100return new ImmutableQueue<T>(forwards: forwards, backwards: ImmutableStack<T>.Empty);
System\Collections\Immutable\ImmutableQueue_1.cs (11)
28private static readonly ImmutableQueue<T> s_EmptyField = new ImmutableQueue<T>(ImmutableStack<T>.Empty, ImmutableStack<T>.Empty); 33private readonly ImmutableStack<T> _backwards; 38private readonly ImmutableStack<T> _forwards; 43private ImmutableStack<T>? _backwardsReversed; 50internal ImmutableQueue(ImmutableStack<T> forwards, ImmutableStack<T> backwards) 107private ImmutableStack<T> BackwardsReversed 160return new ImmutableQueue<T>(ImmutableStack.Create(value), ImmutableStack<T>.Empty); 192ImmutableStack<T> f = _forwards.Pop(); 203return new ImmutableQueue<T>(this.BackwardsReversed, ImmutableStack<T>.Empty);
System\Collections\Immutable\ImmutableQueue_1.Enumerator.cs (4)
25private ImmutableStack<T>? _remainingForwardsStack; 31private ImmutableStack<T>? _remainingBackwardsStack; 114private ImmutableStack<T>? _remainingForwardsStack; 120private ImmutableStack<T>? _remainingBackwardsStack;
System\Collections\Immutable\ImmutableStack.cs (12)
10/// A set of initialization methods for instances of <see cref="ImmutableStack{T}"/>. 19public static ImmutableStack<T> Create<T>() 21return ImmutableStack<T>.Empty; 30public static ImmutableStack<T> Create<T>(T item) 32return ImmutableStack<T>.Empty.Push(item); 41public static ImmutableStack<T> CreateRange<T>(IEnumerable<T> items) 45ImmutableStack<T> stack = ImmutableStack<T>.Empty; 60public static ImmutableStack<T> Create<T>(params T[] items) 73public static ImmutableStack<T> Create<T>(params ReadOnlySpan<T> items) 75ImmutableStack<T> stack = ImmutableStack<T>.Empty;
System\Collections\Immutable\ImmutableStack_1.cs (13)
27private static readonly ImmutableStack<T> s_EmptyField = new ImmutableStack<T>(); 37private readonly ImmutableStack<T>? _tail; 40/// Initializes a new instance of the <see cref="ImmutableStack{T}"/> class 48/// Initializes a new instance of the <see cref="ImmutableStack{T}"/> class. 52private ImmutableStack(T head, ImmutableStack<T> tail) 63public static ImmutableStack<T> Empty 75public ImmutableStack<T> Clear() 139public ImmutableStack<T> Push(T value) 159public ImmutableStack<T> Pop() 177public ImmutableStack<T> Pop(out T value) 232internal ImmutableStack<T> Reverse() 234ImmutableStack<T> r = this.Clear(); 235for (ImmutableStack<T> f = this; !f.IsEmpty; f = f.Pop())
System\Collections\Immutable\ImmutableStack_1.Enumerator.cs (6)
20private readonly ImmutableStack<T> _originalStack; 25private ImmutableStack<T>? _remainingStack; 31internal Enumerator(ImmutableStack<T> stack) 84private readonly ImmutableStack<T> _originalStack; 89private ImmutableStack<T>? _remainingStack; 100internal EnumeratorObject(ImmutableStack<T> stack)
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
91public INamedTypeSymbol? ImmutableStackType => GetOrResolveType(typeof(ImmutableStack<>), ref _ImmutableStackType);
Test.Utilities (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)
Text.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
38internal static int Combine<T>(ImmutableStack<T> stack) 45internal static void Combine<T>(ImmutableStack<T> stack, ref RoslynHashCode hashCode)