3 instantiations of Builder
System.Collections.Immutable (3)
707 references to Builder
Aspire.Dashboard (2)
Aspire.Hosting (9)
ConfigurationSchemaGenerator (1)
dotnet (3)
dotnet-format (12)
GenerateDocumentationAndConfigFiles (16)
ILAssembler (21)
ILCompiler.Compiler (8)
ILCompiler.ReadyToRun (2)
illink (5)
ILLink.CodeFixProvider (1)
ILLink.RoslynAnalyzer (17)
Microsoft.AspNetCore.Analyzers (4)
Microsoft.AspNetCore.App.Analyzers (12)
Microsoft.AspNetCore.Components.Endpoints (6)
Microsoft.AspNetCore.Http.Extensions (6)
Microsoft.AspNetCore.OpenApi.SourceGenerators (6)
Microsoft.AspNetCore.Razor.Utilities.Shared (160)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ImmutableArrayExtensions.cs (120)
19public static void SetCapacityIfLarger<T>(this ImmutableArray<T>.Builder builder, int newCapacity)
27public static void InsertRange<T>(this ImmutableArray<T>.Builder builder, int index, ReadOnlySpan<T> items)
1260/// <see cref="ImmutableArray{T}.Builder"/> and clears the collection.
1263/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be cleared.</param>
1266/// <see cref="ImmutableArray{T}.Builder"/>.
1272public static ImmutableArray<T> ToImmutableAndClear<T>(this ImmutableArray<T>.Builder builder)
1290/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1293/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1296/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1298public static ImmutableArray<T> ToImmutableOrdered<T>(this ImmutableArray<T>.Builder builder)
1307/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1310/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1314/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1316public static ImmutableArray<T> ToImmutableOrdered<T>(this ImmutableArray<T>.Builder builder, IComparer<T> comparer)
1325/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1328/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1332/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order.
1334public static ImmutableArray<T> ToImmutableOrdered<T>(this ImmutableArray<T>.Builder builder, Comparison<T> comparison)
1343/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1346/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1349/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1351public static ImmutableArray<T> ToImmutableOrderedDescending<T>(this ImmutableArray<T>.Builder builder)
1360/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1363/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1367/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1369public static ImmutableArray<T> ToImmutableOrderedDescending<T>(this ImmutableArray<T>.Builder builder, IComparer<T> comparer)
1378/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1381/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1385/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order.
1387public static ImmutableArray<T> ToImmutableOrderedDescending<T>(this ImmutableArray<T>.Builder builder, Comparison<T> comparison)
1396/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order according to a key.
1400/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1406this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector)
1415/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order according to a key.
1419/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1426this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer)
1435/// <see cref="ImmutableArray{T}.Builder"/> sorted in ascending order according to a key.
1439/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1446this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison)
1455/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order according to a key.
1459/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1465this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector)
1474/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order according to a key.
1478/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1485this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer)
1494/// <see cref="ImmutableArray{T}.Builder"/> sorted in descending order according to a key.
1498/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1505this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison)
1513/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1517/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1519/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1523/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1524/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1528public static ImmutableArray<T> ToImmutableOrderedAndClear<T>(this ImmutableArray<T>.Builder builder)
1536/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1540/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1543/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1547/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1548/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1552public static ImmutableArray<T> ToImmutableOrderedAndClear<T>(this ImmutableArray<T>.Builder builder, IComparer<T> comparer)
1560/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1564/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1567/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1571/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1572/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1576public static ImmutableArray<T> ToImmutableOrderedAndClear<T>(this ImmutableArray<T>.Builder builder, Comparison<T> comparison)
1584/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1588/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1590/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1594/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1595/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1599public static ImmutableArray<T> ToImmutableOrderedDescendingAndClear<T>(this ImmutableArray<T>.Builder builder)
1607/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1611/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1614/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1618/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1619/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1623public static ImmutableArray<T> ToImmutableOrderedDescendingAndClear<T>(this ImmutableArray<T>.Builder builder, IComparer<T> comparer)
1631/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1635/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1638/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1642/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1643/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1647public static ImmutableArray<T> ToImmutableOrderedDescendingAndClear<T>(this ImmutableArray<T>.Builder builder, Comparison<T> comparison)
1655/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1661/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1664/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1668/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1669/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1674this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector)
1682/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1688/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1692/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1696/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1697/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1702this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer)
1710/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1716/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1720/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1724/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1725/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1730this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison)
1738/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1744/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1747/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1751/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1752/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1757this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector)
1765/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1771/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1775/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1779/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1780/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1785this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer)
1793/// Returns the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1799/// <param name="builder">The <see cref="ImmutableArray{T}.Builder"/> whose contents will be sorted.</param>
1803/// An immutable array that contains the current contents of this <see cref="ImmutableArray{T}.Builder"/>
1807/// If <see cref="ImmutableArray{T}.Builder.Capacity">Capacity</see> equals
1808/// <see cref="ImmutableArray{T}.Builder.Count">Count</see>, the internal array will be extracted as an
1813this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison)
Microsoft.Build (6)
Microsoft.Build.Tasks.Git (3)
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.CodeStyle (13)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.Features (16)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Microsoft.CodeAnalysis.Extensions.Package (1)
Microsoft.CodeAnalysis.Features (30)
Microsoft.CodeAnalysis.Razor.Compiler (33)
Microsoft.CodeAnalysis.Rebuild (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (17)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Microsoft.CodeAnalysis.Workspaces (24)
Microsoft.CodeAnalysis.Workspaces.MSBuild (5)
Microsoft.Diagnostics.DataContractReader.Contracts (5)
Microsoft.Diagnostics.DataContractReader.Legacy (2)
Microsoft.DotNet.Cli.CommandLine (1)
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.DotNet.ProjectTools (9)
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Interop.ComInterfaceGenerator (21)
ComMethodInfo.cs (9)
63var methods = ImmutableArray.CreateBuilder<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>();
139ImmutableArray<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>.Builder methods,
244ImmutableArray<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>.Builder methods,
319ImmutableArray<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>.Builder methods,
346ImmutableArray<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>.Builder methods,
383var builder = ImmutableArray.CreateBuilder<AttributeInfo>(attributes.Length);
573ImmutableArray<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>.Builder methods,
598ImmutableArray<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>.Builder methods,
619ImmutableArray<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>.Builder methods,
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator (2)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (20)
Microsoft.ML.Transforms (2)
Microsoft.NET.HostModel (2)
Roslyn.Diagnostics.Analyzers (17)
Roslyn.Diagnostics.CSharp.Analyzers (2)
rzc (1)
System.Collections.Immutable (24)
System.Reflection.Metadata (24)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions.Generator (3)