484 references to Empty
AnalyzerRunner (1)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (1)
ILLink.RoslynAnalyzer (1)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.Build (5)
Microsoft.Build.Framework (1)
Microsoft.Build.Tasks.Core (1)
Microsoft.Build.Utilities.Core (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.CodeStyle (28)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (7)
36/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
117return CreateWithMessage(descriptor, location, notificationOption, analyzerOptions, additionalLocations, ImmutableDictionary<string, string?>.Empty, message);
119var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty
129ImmutableDictionary<string, string?>.Empty);
190var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty
216properties ??= ImmutableDictionary<string, string?>.Empty;
251/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
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 (19)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
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 (6)
1508var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "true"));
1516analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "TRUE"));
1522analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "false"));
1528analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "auto"));
3711var diagnostics = diagnosticsMap.TryGetValue(tree1, out var value) ? value : ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>.Empty;
4195.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add(AnalyzerWithDisabledRules.Rule.Id, ReportDiagnostic.Warn))
Diagnostics\GetDiagnosticsTests.cs (4)
558var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("dotnet_analyzer_diagnostic.severity", "none"));
560ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions),
604var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add(options.Value.key, options.Value.value));
606ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions),
Microsoft.CodeAnalysis.CSharp.Features (25)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
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 (4)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Microsoft.CodeAnalysis.Features (50)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (7)
36/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
117return CreateWithMessage(descriptor, location, notificationOption, analyzerOptions, additionalLocations, ImmutableDictionary<string, string?>.Empty, message);
119var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty
129ImmutableDictionary<string, string?>.Empty);
190var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty
216properties ??= ImmutableDictionary<string, string?>.Empty;
251/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
Microsoft.CodeAnalysis.Features.UnitTests (10)
Microsoft.CodeAnalysis.LanguageServer (6)
Microsoft.CodeAnalysis.LanguageServer.Protocol (23)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
Microsoft.CodeAnalysis.Remote.ServiceHub (7)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Scripting.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic (6)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (4)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces (54)
Diagnostics\DiagnosticAnalysisResult.cs (7)
101syntaxLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
102semanticLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
103nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
148syntaxLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
150nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
285semanticLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
286nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
Workspace\Solution\SolutionState.cs (5)
48public ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions { get; } = ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty;
54internal ImmutableDictionary<string, int> ProjectCountByLanguage { get; } = ImmutableDictionary<string, int>.Empty;
61private ImmutableDictionary<string, ImmutableArray<DocumentId>> _lazyFilePathToRelatedDocumentIds = ImmutableDictionary<string, ImmutableArray<DocumentId>>.Empty.WithComparers(FilePathComparer);
118projectCountByLanguage: ImmutableDictionary<string, int>.Empty,
119idToProjectStateMap: ImmutableDictionary<ProjectId, ProjectState>.Empty,
Microsoft.CodeAnalysis.Workspaces.Desktop (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
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 (19)
Microsoft.VisualStudio.LanguageServices.DevKit (5)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
MSBuild (1)
Roslyn.VisualStudio.Next.UnitTests (8)
RunTests (3)
System.Collections.Immutable (10)
System\Collections\Immutable\ImmutableDictionary.cs (8)
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);
77return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer).AddRange(items);
91return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(items);
148return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer)
240return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(source);
System.Windows.Forms.Analyzers.CSharp.Tests (8)