396 references to Any
AnalyzerRunner (1)
BuildActionTelemetryTable (4)
ConfigurationSchemaGenerator (3)
Microsoft.Analyzers.Extra (3)
Microsoft.AspNetCore.Analyzer.Testing (2)
Microsoft.AspNetCore.App.Analyzers (2)
Microsoft.AspNetCore.Components.Analyzers (3)
Microsoft.AspNetCore.Components.SdkAnalyzers (3)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (18)
Microsoft.CodeAnalysis (16)
Microsoft.CodeAnalysis.CodeStyle (16)
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
Microsoft.CodeAnalysis.CSharp (79)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Features (15)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (9)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (30)
Compilation\GetImportScopesTests.cs (20)
147Assert.True(scopes.Single().Imports.Any(i => i.NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }));
148Assert.True(scopes.Single().Imports.Any(i => i.NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) }));
149Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }));
150Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }));
336Assert.True(scopes.Single().Aliases.Any(a => a is { Name: "S", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) } }));
337Assert.True(scopes.Single().Aliases.Any(a => a is { Name: "M", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) } }));
338Assert.True(scopes.Single().Aliases.Any(a => a.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }));
339Assert.True(scopes.Single().Aliases.Any(a => a.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }));
536Assert.True(scopes.Single().ExternAliases.Any(a => a is { Name: "CORE1", Target: INamespaceSymbol { IsGlobalNamespace: true } }));
537Assert.True(scopes.Single().ExternAliases.Any(a => a is { Name: "CORE2", Target: INamespaceSymbol { IsGlobalNamespace: true } }));
538Assert.True(scopes.Single().ExternAliases.Any(a => a.DeclaringSyntaxReferences.Single().GetSyntax() is ExternAliasDirectiveSyntax { Identifier.Text: "CORE1" }));
539Assert.True(scopes.Single().ExternAliases.Any(a => a.DeclaringSyntaxReferences.Single().GetSyntax() is ExternAliasDirectiveSyntax { Identifier.Text: "CORE2" }));
682Assert.True(scopes.Single().Imports.Any(i => i.NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(System) }));
683Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(System) } }));
684Assert.True(scopes.Single().Imports.Any(i => i.NamespaceOrType is INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: false, Name: nameof(System.IO) }));
685Assert.True(scopes.Single().Imports.Any(i => i.DeclaringSyntaxReference!.GetSyntax() is UsingDirectiveSyntax { Name: QualifiedNameSyntax { Right: IdentifierNameSyntax { Identifier.Text: nameof(System.IO) } } }));
688Assert.True(scopes.Single().Aliases.Any(i => i is { Name: "M", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: true, Name: nameof(Microsoft) } }));
689Assert.True(scopes.Single().Aliases.Any(i => i.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: IdentifierNameSyntax { Identifier.Text: nameof(Microsoft) } }));
690Assert.True(scopes.Single().Aliases.Any(i => i is { Name: "T", Target: INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: false, Name: nameof(System.Threading) } }));
691Assert.True(scopes.Single().Aliases.Any(i => i.DeclaringSyntaxReferences.Single().GetSyntax() is UsingDirectiveSyntax { Name: QualifiedNameSyntax { Right: IdentifierNameSyntax { Identifier.Text: nameof(System.Threading) } } }));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.Features (37)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.InteractiveHost (1)
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (14)
Compilation\GetImportScopesTests.vb (12)
123Assert.True(scopes.Single().Imports.Any(Function(i) IsNamespaceWithName(i.NamespaceOrType, NameOf(System))))
124Assert.True(scopes.Single().Imports.Any(Function(i) IsNamespaceWithName(i.NamespaceOrType, NameOf(Microsoft))))
126Assert.True(scopes.Single().Imports.Any(Function(i) IsSimpleImportsClauseWithName(i.DeclaringSyntaxReference, NameOf(System))))
127Assert.True(scopes.Single().Imports.Any(Function(i) IsSimpleImportsClauseWithName(i.DeclaringSyntaxReference, NameOf(Microsoft))))
276Assert.True(scopes.Single().Aliases.Any(Function(a) IsAliasWithName(a, "S", NameOf(System), inGlobalNamespace:=True)))
277Assert.True(scopes.Single().Aliases.Any(Function(a) IsAliasImportsClauseWithName(a, "S")))
278Assert.True(scopes.Single().Aliases.Any(Function(a) IsAliasWithName(a, "M", NameOf(Microsoft), inGlobalNamespace:=True)))
279Assert.True(scopes.Single().Aliases.Any(Function(a) IsAliasImportsClauseWithName(a, "M")))
409Assert.True(scopes.Single().XmlNamespaces.Any(Function(x) x.XmlNamespace = "http://roslyn"))
411Assert.True(scopes.Single().XmlNamespaces.Any(Function(x) x.DeclaringSyntaxReference.GetSyntax().ToString() = "<xmlns:r1=""http://roslyn"">"))
413Assert.True(scopes.Single().XmlNamespaces.Any(Function(X) X.XmlNamespace = "http://roslyn2"))
415Assert.True(scopes.Single().XmlNamespaces.Any(Function(x) x.DeclaringSyntaxReference.GetSyntax().ToString() = "<xmlns:r2=""http://roslyn2"">"))
Microsoft.CodeAnalysis.Workspaces (34)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Gen.ContextualOptions (3)
Microsoft.Gen.Logging (2)
src\Generators\Shared\ParserUtilities.cs (1)
41.Any(x =>
Microsoft.Gen.Metrics (1)
src\Generators\Shared\ParserUtilities.cs (1)
41.Any(x =>
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\ParserUtilities.cs (1)
41.Any(x =>
Microsoft.Interop.ComInterfaceGenerator (13)
Microsoft.Interop.LibraryImportGenerator (4)
Microsoft.Interop.SourceGeneration (6)
Microsoft.ML.InternalCodeAnalyzer (3)
Microsoft.VisualStudio.LanguageServices (13)
System.Text.Json.SourceGeneration (3)
System.Text.RegularExpressions.Generator (1)
System.Windows.Forms.Analyzers.CSharp (2)
System.Windows.Forms.PrivateSourceGenerators (1)
System.Windows.Forms.PrivateSourceGenerators.Tests (1)