721 references to Empty
AnalyzerRunner (1)
Aspire.Dashboard (2)
Aspire.Dashboard.Components.Tests (2)
Aspire.Dashboard.Tests (1)
GenerateDocumentationAndConfigFiles (17)
ILLink.RoslynAnalyzer (1)
Metrics (10)
Metrics.Legacy (10)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.CodeAnalysis (35)
SourceGeneration\GeneratorState.cs (9)
26ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty,
27ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty,
28ImmutableDictionary<string, object>.Empty,
41ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty,
42ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty,
43ImmutableDictionary<string, object>.Empty,
100ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty,
101ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty,
102ImmutableDictionary<string, object>.Empty,
Microsoft.CodeAnalysis.Analyzers (22)
Microsoft.CodeAnalysis.Analyzers.UnitTests (2)
Microsoft.CodeAnalysis.AnalyzerUtilities (28)
Microsoft.CodeAnalysis.BannedApiAnalyzers (18)
Microsoft.CodeAnalysis.CodeStyle (28)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (7)
35/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
116return CreateWithMessage(descriptor, location, notificationOption, analyzerOptions, additionalLocations, ImmutableDictionary<string, string?>.Empty, message);
118var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty
128ImmutableDictionary<string, string?>.Empty);
189var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty
215properties ??= ImmutableDictionary<string, string?>.Empty;
250/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
Microsoft.CodeAnalysis.CSharp (26)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (10)
195return ImmutableDictionary<string, AliasAndUsingDirective>.Empty;
356var globalAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty;
380UsingAliasesMap = mergedAliases ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty,
522return GetUsingsAndDiagnostics(declaringSymbol, declarationSyntax, basesBeingResolved).UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty;
527return (_lazyGlobalUsings ?? GetGlobalUsingsAndDiagnostics(declaringSymbol, (CSharpSyntaxNode)declarationSyntax.GetSyntax(), basesBeingResolved)).UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty;
599Debug.Assert((calculated.UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty).SetEquals(result.UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty));
624var globalUsingAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty;
1122UsingAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty,
1139Imports.Create(UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty,
Microsoft.CodeAnalysis.CSharp.CodeStyle (22)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (22)
Attributes\AttributeTests_WellKnownAttributes.cs (6)
8807verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Warn)),
8813verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Error)),
8819verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Hidden)),
8825verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Suppress)));
8828verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS0618", ReportDiagnostic.Error)),
8834verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS0618", ReportDiagnostic.Suppress)),
Diagnostics\DiagnosticAnalyzerTests.cs (10)
1509var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "true"));
1517analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "TRUE"));
1523analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "false"));
1529analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "auto"));
3712var diagnostics = diagnosticsMap.TryGetValue(tree1, out var value) ? value : ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>.Empty;
4196.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add(AnalyzerWithDisabledRules.Rule.Id, ReportDiagnostic.Warn))
4594ImmutableDictionary<object, AnalyzerConfigOptions>.Empty,
4596ImmutableDictionary<string, string>.Empty));
4618ImmutableDictionary<object, AnalyzerConfigOptions>.Empty,
4620ImmutableDictionary<string, string>.Empty));
Diagnostics\GetDiagnosticsTests.cs (6)
683var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("dotnet_analyzer_diagnostic.severity", "none"));
685ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions),
729var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add(options.Value.key, options.Value.value));
731ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions),
1629ImmutableDictionary<object, AnalyzerConfigOptions>.Empty,
1630new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty)));
Microsoft.CodeAnalysis.CSharp.Features (28)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Microsoft.CodeAnalysis.EditorFeatures (5)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
Diagnostics\DiagnosticDataTests.cs (5)
133properties: ImmutableDictionary<string, string>.Empty,
166properties: ImmutableDictionary<string, string>.Empty,
201properties: ImmutableDictionary<string, string>.Empty,
251properties: ImmutableDictionary<string, string>.Empty,
299properties: ImmutableDictionary<string, string>.Empty,
Microsoft.CodeAnalysis.ExternalAccess.Debugger (1)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
Microsoft.CodeAnalysis.ExternalAccess.HotReload.UnitTests (8)
HotReloadServiceTests.cs (8)
66var result = await hotReload.GetUpdatesAsync(solution, runningProjects: ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo>.Empty, CancellationToken.None);
80result = await hotReload.GetUpdatesAsync(solution, runningProjects: ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo>.Empty, CancellationToken.None);
92var runningProjects = ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo>.Empty
196var runningProjects = ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo>.Empty
241var result = await hotReload.GetUpdatesAsync(solution, ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo>.Empty, CancellationToken.None);
287var result = await hotReload.GetUpdatesAsync(solution, ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo>.Empty, CancellationToken.None);
323var result = await hotReload.GetUpdatesAsync(solution, runningProjects: ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo>.Empty, CancellationToken.None);
376var result = await hotReload.GetUpdatesAsync(solution, ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo>.Empty, CancellationToken.None);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Microsoft.CodeAnalysis.Features (78)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (7)
35/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
116return CreateWithMessage(descriptor, location, notificationOption, analyzerOptions, additionalLocations, ImmutableDictionary<string, string?>.Empty, message);
118var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty
128ImmutableDictionary<string, string?>.Empty);
189var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty
215properties ??= ImmutableDictionary<string, string?>.Empty;
250/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
Microsoft.CodeAnalysis.Features.UnitTests (18)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (6)
2538var runningProjects = ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty
2579var runningProjects = ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty
3648var runningProjects = ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty
5500var result1 = await encService.EmitSolutionUpdateAsync(sessionId, solution1, runningProjects: ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty, s_noActiveSpans, CancellationToken.None);
5507var result2 = await encService.EmitSolutionUpdateAsync(sessionId, solution2, runningProjects: ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty, s_noActiveSpans, CancellationToken.None);
5530await Assert.ThrowsAsync<ObjectDisposedException>(async () => await debuggingSession.EmitSolutionUpdateAsync(solution, runningProjects: ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty, s_noActiveSpans, CancellationToken.None));
Microsoft.CodeAnalysis.LanguageServer (6)
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (17)
Microsoft.CodeAnalysis.PublicApiAnalyzers (20)
DeclarePublicApiAnalyzer.Impl.cs (9)
300reportDiagnosticAtLocations(GetDiagnostic(ShouldAnnotatePublicApiFilesRule, ShouldAnnotateInternalApiFilesRule), ImmutableDictionary<string, string?>.Empty);
321ImmutableDictionary<string, string?> propertyBag = ImmutableDictionary<string, string?>.Empty;
358reportDiagnosticAtLocations(diagnostic, ImmutableDictionary<string, string?>.Empty, errorMessageName, diagnostic.HelpLinkUri);
371reportDiagnosticAtLocations(diagnostic, ImmutableDictionary<string, string?>.Empty, errorMessageName, diagnostic.HelpLinkUri);
383reportDiagnosticAtLocations(diagnostic, ImmutableDictionary<string, string?>.Empty, errorMessageName, diagnostic.HelpLinkUri);
416ImmutableDictionary<string, string?> propertyBag = ImmutableDictionary<string, string?>.Empty
428ImmutableDictionary<string, string?> propertyBag = ImmutableDictionary<string, string?>.Empty
448reportDiagnosticAtLocations(GetDiagnostic(ObliviousPublicApiRule, ObliviousInternalApiRule), ImmutableDictionary<string, string?>.Empty, errorMessageName);
766ImmutableDictionary<string, string?> propertyBag = ImmutableDictionary<string, string?>.Empty.Add(ApiNamePropertyBagKey, pair.Value.Text);
Microsoft.CodeAnalysis.Remote.ServiceHub (6)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (11)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Scripting.UnitTests (2)
Microsoft.CodeAnalysis.SemanticSearch.Extensions (1)
Microsoft.CodeAnalysis.VisualBasic (6)
Microsoft.CodeAnalysis.Workspaces (50)
Diagnostics\DiagnosticAnalysisResult.cs (5)
70syntaxLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
71semanticLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
72nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
151semanticLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
152nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
Workspace\Solution\ProjectDependencyGraph.cs (5)
69ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty,
71ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty,
72ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty,
83transitiveReferencesMap: ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty,
84reverseTransitiveReferencesMap: ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty,
Microsoft.CodeAnalysis.Workspaces.Desktop (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
Microsoft.Interop.ComInterfaceGenerator (2)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.SourceGeneration (5)
Microsoft.ML.Core (6)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.VisualStudio.LanguageServices (20)
Microsoft.VisualStudio.LanguageServices.DevKit (5)
Microsoft.VisualStudio.LanguageServices.Implementation (4)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Roslyn.Diagnostics.Analyzers (17)
Roslyn.Diagnostics.CSharp.Analyzers (3)
Roslyn.VisualStudio.Next.UnitTests (10)
RunTests (3)
System.Collections.Immutable (12)
System\Collections\Immutable\ImmutableDictionary.cs (10)
23return ImmutableDictionary<TKey, TValue>.Empty;
37return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer);
52return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer);
64return ImmutableDictionary<TKey, TValue>.Empty.AddRange(items);
83return ImmutableDictionary<TKey, TValue>.Empty.AddRange(items, ImmutableDictionary<TKey, TValue>.KeyCollisionBehavior.SetValue);
96return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer).AddRange(items);
117return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer).AddRange(items, ImmutableDictionary<TKey, TValue>.KeyCollisionBehavior.SetValue);
131return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(items);
188return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer)
280return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(source);
System.Windows.Forms.Analyzers.CSharp.Tests (8)
Test.Utilities (10)
Text.Analyzers (17)