3 instantiations of Builder
System.Collections.Immutable (3)
914 references to Builder
Analyzer.Utilities.UnitTests (1)
AnalyzerRunner (1)
Aspire.Dashboard (2)
Aspire.Hosting (9)
ConfigurationSchemaGenerator (1)
DemoConsole (1)
GenerateDocumentationAndConfigFiles (16)
illink (5)
ILLink.CodeFixProvider (1)
ILLink.RoslynAnalyzer (17)
Metrics (18)
Metrics.Legacy (18)
Microsoft.AspNetCore.Analyzers (4)
Microsoft.AspNetCore.Analyzers.Test (1)
Microsoft.AspNetCore.App.Analyzers (12)
Microsoft.AspNetCore.Components.Endpoints (6)
Microsoft.AspNetCore.Http.Extensions (6)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
Microsoft.AspNetCore.OpenApi.SourceGenerators (6)
Microsoft.AspNetCore.Razor.Language.UnitTests (1)
Microsoft.AspNetCore.Razor.Test.Common (6)
Microsoft.AspNetCore.Razor.Test.Common.Tooling (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (159)
ImmutableArrayExtensions.cs (120)
26public static void SetCapacityIfLarger<T>(this ImmutableArray<T>.Builder builder, int newCapacity)
34public static void InsertRange<T>(this ImmutableArray<T>.Builder builder, int index, ReadOnlySpan<T> items)
1267/// <see cref="ImmutableArray{T}.Builder"/> and clears the collection.
1270/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be cleared.</param>
1273/// <see cref="ImmutableArray{T}.Builder"/>.
1279public static ImmutableArray<T> ToImmutableAndClear<T>(this ImmutableArray<T>.Builder builder)
1297/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1300/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1303/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1305public static ImmutableArray<T> ToImmutableOrdered<T>(this ImmutableArray<T>.Builder builder)
1314/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1317/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1321/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1323public static ImmutableArray<T> ToImmutableOrdered<T>(this ImmutableArray<T>.Builder builder, IComparer<T> comparer)
1332/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1335/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1339/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1341public static ImmutableArray<T> ToImmutableOrdered<T>(this ImmutableArray<T>.Builder builder, Comparison<T> comparison)
1350/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1353/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1356/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1358public static ImmutableArray<T> ToImmutableOrderedDescending<T>(this ImmutableArray<T>.Builder builder)
1367/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1370/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1374/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1376public static ImmutableArray<T> ToImmutableOrderedDescending<T>(this ImmutableArray<T>.Builder builder, IComparer<T> comparer)
1385/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1388/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1392/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1394public static ImmutableArray<T> ToImmutableOrderedDescending<T>(this ImmutableArray<T>.Builder builder, Comparison<T> comparison)
1403/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order according to a key.
1407/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1413this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector)
1422/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order according to a key.
1426/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1433this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer)
1442/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order according to a key.
1446/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1453this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison)
1462/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order according to a key.
1466/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1472this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector)
1481/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order according to a key.
1485/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1492this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer)
1501/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order according to a key.
1505/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1512this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison)
1520/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1524/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1526/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1530/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1531/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1535public static ImmutableArray<T> ToImmutableOrderedAndClear<T>(this ImmutableArray<T>.Builder builder)
1543/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1547/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1550/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1554/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1555/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1559public static ImmutableArray<T> ToImmutableOrderedAndClear<T>(this ImmutableArray<T>.Builder builder, IComparer<T> comparer)
1567/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1571/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1574/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1578/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1579/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1583public static ImmutableArray<T> ToImmutableOrderedAndClear<T>(this ImmutableArray<T>.Builder builder, Comparison<T> comparison)
1591/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1595/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1597/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1601/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1602/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1606public static ImmutableArray<T> ToImmutableOrderedDescendingAndClear<T>(this ImmutableArray<T>.Builder builder)
1614/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1618/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1621/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1625/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1626/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1630public static ImmutableArray<T> ToImmutableOrderedDescendingAndClear<T>(this ImmutableArray<T>.Builder builder, IComparer<T> comparer)
1638/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1642/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1645/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1649/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1650/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1654public static ImmutableArray<T> ToImmutableOrderedDescendingAndClear<T>(this ImmutableArray<T>.Builder builder, Comparison<T> comparison)
1662/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1668/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1671/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1675/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1676/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1681this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector)
1689/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1695/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1699/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1703/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1704/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1709this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer)
1717/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1723/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1727/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1731/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1732/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1737this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison)
1745/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1751/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1754/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1758/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1759/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1764this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector)
1772/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1778/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1782/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1786/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1787/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1792this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer)
1800/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1806/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1810/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1814/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1815/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1820this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison)
Microsoft.AspNetCore.Razor.Utilities.Shared.UnitTests (28)
Microsoft.Build (6)
Microsoft.CodeAnalysis (65)
DiagnosticAnalyzer\AnalysisResultBuilder.cs (27)
37private Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localSemanticDiagnosticsOpt = null;
38private Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localSyntaxDiagnosticsOpt = null;
39private Dictionary<AdditionalText, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localAdditionalFileDiagnosticsOpt = null;
40private Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? _nonLocalDiagnosticsOpt = null;
332ref Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? lazyLocalDiagnostics)
340lazyLocalDiagnostics = lazyLocalDiagnostics ?? new Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>();
350Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? allDiagnostics;
353allDiagnostics = new Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>();
357ImmutableArray<Diagnostic>.Builder? analyzerDiagnostics;
375_nonLocalDiagnosticsOpt = _nonLocalDiagnosticsOpt ?? new Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>();
377ImmutableArray<Diagnostic>.Builder? currentDiagnostics;
387private static void UpdateDiagnosticsCore_NoLock(ImmutableArray<Diagnostic>.Builder currentDiagnostics, IEnumerable<Diagnostic> diagnostics, bool overwrite)
414var builder = ImmutableArray.CreateBuilder<Diagnostic>();
443Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? lazyLocalDiagnostics,
445ImmutableArray<Diagnostic>.Builder builder)
458Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics,
460ImmutableArray<Diagnostic>.Builder builder)
464Dictionary<AdditionalText, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics,
466ImmutableArray<Diagnostic>.Builder builder)
470Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics,
473ImmutableArray<Diagnostic>.Builder builder)
476Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? diagnosticsForTree;
484Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder> diagnostics,
486ImmutableArray<Diagnostic>.Builder builder)
492ImmutableArray<Diagnostic>.Builder? diagnosticsByAnalyzer;
536Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnosticsOpt)
578Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? nonLocalDiagnosticsOpt)
Microsoft.CodeAnalysis.Analyzers (21)
Microsoft.CodeAnalysis.AnalyzerUtilities (19)
Microsoft.CodeAnalysis.BannedApiAnalyzers (17)
Microsoft.CodeAnalysis.CodeStyle (13)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.Collections.Package (1)
Microsoft.CodeAnalysis.CSharp (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (16)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Microsoft.CodeAnalysis.Debugging.Package (1)
Microsoft.CodeAnalysis.EditorFeatures (3)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (12)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
Microsoft.CodeAnalysis.Extensions.Package (1)
Microsoft.CodeAnalysis.ExternalAccess.Extensions (1)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Microsoft.CodeAnalysis.Features (30)
Microsoft.CodeAnalysis.InteractiveHost (2)
Microsoft.CodeAnalysis.LanguageServer (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (17)
Microsoft.CodeAnalysis.PooledObjects.Package (1)
Microsoft.CodeAnalysis.PublicApiAnalyzers (17)
Microsoft.CodeAnalysis.Razor.Compiler (35)
Microsoft.CodeAnalysis.Razor.Workspaces (19)
Microsoft.CodeAnalysis.Rebuild (3)
Microsoft.CodeAnalysis.Remote.Razor (1)
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (17)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.Threading.Package (1)
Microsoft.CodeAnalysis.UnitTests (8)
Microsoft.CodeAnalysis.Workspaces (24)
Microsoft.CodeAnalysis.Workspaces.MSBuild (5)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Extensions.Validation.ValidationsGenerator (4)
Microsoft.Interop.ComInterfaceGenerator (13)
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator (2)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (18)
Microsoft.ML.Transforms (2)
Microsoft.VisualStudio.LanguageServices (34)
Library\ObjectBrowser\AbstractListItemFactory.cs (16)
174var builder = ImmutableArray.CreateBuilder<ObjectListItem>(symbols.Length);
186ImmutableArray<ObjectListItem>.Builder builder)
213var symbolBuilder = ImmutableArray.CreateBuilder<INamedTypeSymbol>();
255var builder = ImmutableArray.CreateBuilder<ObjectListItem>();
296var builder = ImmutableArray.CreateBuilder<ObjectListItem>();
319var symbolBuilder = ImmutableArray.CreateBuilder<ISymbol>(members.Length);
334var symbolBuilder = ImmutableArray.CreateBuilder<ISymbol>();
405public void CollectNamespaceListItems(IAssemblySymbol assemblySymbol, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
449var builder = ImmutableArray.CreateBuilder<ObjectListItem>();
551var builder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(typeMembers.Length);
592var projectListItemBuilder = ImmutableArray.CreateBuilder<ObjectListItem>();
593var referenceListItemBuilder = ImmutableArray.CreateBuilder<ObjectListItem>();
666var builder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(typeMembers.Length);
705var finalBuilder = ImmutableArray.CreateBuilder<ObjectListItem>();
743public void CollectTypeListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
775public void CollectMemberListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_ListItems.cs (3)
14internal void CollectMemberListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
17internal void CollectNamespaceListItems(IAssemblySymbol assemblySymbol, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
20internal void CollectTypeListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.Razor (1)
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (2)
Microsoft.VisualStudioCode.RazorExtension (1)
Microsoft.VisualStudioCode.RazorExtension.UnitTests (2)
Mvc.Analyzers.Test (1)
Roslyn.Diagnostics.Analyzers (17)
Roslyn.Diagnostics.CSharp.Analyzers (2)
RunTests (1)
System.Collections.Immutable (24)
System.Reflection.Metadata (24)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions.Generator (3)
Test.Utilities (15)
Text.Analyzers (17)