4887 references to OfType
ApiExplorerWebSite (1)
ApplicationModelWebSite (1)
Aspire.Hosting (17)
Aspire.Hosting.Azure (3)
Aspire.Hosting.Azure.AppContainers (1)
Aspire.Hosting.Azure.EventHubs (1)
Aspire.Hosting.Azure.Functions (3)
Aspire.Hosting.Azure.PostgreSQL (3)
Aspire.Hosting.Azure.Redis (1)
Aspire.Hosting.Azure.Sql (2)
Aspire.Hosting.Azure.Tests (39)
Aspire.Hosting.Containers.Tests (20)
ContainerResourceBuilderTests.cs (10)
17Assert.Equal("redis-stack", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image);
25Assert.Equal("redis-stack", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image);
26Assert.Equal("1.0.0", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag);
37Assert.Equal("new-image", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image);
38Assert.Equal("latest", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag);
49Assert.Equal("new-image", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Last().Image);
50Assert.Equal("latest", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Last().Tag);
58Assert.Equal("7.1", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag);
66Assert.Equal("myregistry.azurecr.io", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Registry);
74Assert.Equal("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().SHA256);
Aspire.Hosting.Dapr (4)
Aspire.Hosting.Dapr.Tests (8)
Aspire.Hosting.Elasticsearch.Tests (7)
Aspire.Hosting.Garnet.Tests (11)
Aspire.Hosting.Kafka (2)
Aspire.Hosting.Kafka.Tests (8)
Aspire.Hosting.Keycloak.Tests (6)
Aspire.Hosting.Milvus.Tests (7)
Aspire.Hosting.MongoDB.Tests (14)
Aspire.Hosting.MySql (2)
Aspire.Hosting.MySql.Tests (11)
Aspire.Hosting.Nats.Tests (10)
Aspire.Hosting.Oracle.Tests (9)
Aspire.Hosting.PostgreSQL (5)
Aspire.Hosting.PostgreSQL.Tests (17)
Aspire.Hosting.Qdrant.Tests (10)
Aspire.Hosting.RabbitMQ (1)
Aspire.Hosting.RabbitMQ.Tests (7)
Aspire.Hosting.Redis (5)
Aspire.Hosting.Redis.Tests (21)
Aspire.Hosting.SqlServer.Tests (5)
Aspire.Hosting.Testing.Tests (1)
Aspire.Hosting.Tests (78)
Aspire.Hosting.Valkey.Tests (11)
Aspire.Playground.Tests (4)
AuthSamples.FunctionalTests (1)
BasicWebSite (3)
BoundTreeGenerator (15)
CdkSample.AppHost (7)
CSharpSyntaxGenerator (7)
CustomResources.AppHost (1)
dotnet-dev-certs (7)
dotnet-svcutil-lib (4)
HealthChecksSandbox.AppHost (1)
IIS.FunctionalTests (1)
IISExpress.FunctionalTests (1)
illink (2)
InMemory.FunctionalTests (8)
IntegrationTestsWebsite (1)
IOperationGenerator (8)
Microsoft.Analyzers.Extra (7)
Microsoft.Analyzers.Extra.Tests (4)
Microsoft.Analyzers.Local (3)
Microsoft.AspNetCore.Analyzers (1)
Microsoft.AspNetCore.Analyzers.Test (37)
Microsoft.AspNetCore.App.Analyzers (9)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Authentication.Test (2)
Microsoft.AspNetCore.Authorization (3)
Microsoft.AspNetCore.Authorization.Test (6)
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Components.Analyzers (1)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Web.Tests (3)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Components.WebView.Test (1)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (7)
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (8)
Microsoft.AspNetCore.Grpc.Swagger (2)
Microsoft.AspNetCore.Hosting.Tests (1)
Microsoft.AspNetCore.Http.Extensions (9)
Microsoft.AspNetCore.Http.Extensions.Tests (36)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.AspNetCore.Http.Results.Tests (22)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (1)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.InternalTesting (10)
Microsoft.AspNetCore.InternalTesting.Tests (1)
Microsoft.AspNetCore.Mvc (2)
Microsoft.AspNetCore.Mvc.Abstractions (7)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
Microsoft.AspNetCore.Mvc.ApiExplorer (15)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (28)
Microsoft.AspNetCore.Mvc.Core (52)
Microsoft.AspNetCore.Mvc.Core.Test (70)
Routing\ControllerActionEndpointDataSourceTest.cs (11)
91endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
104endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
173endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
188endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
260endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
273endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
342endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
357endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
436endpoints.OfType<RouteEndpoint>().Where(e => !SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
453endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
526endpoints.OfType<RouteEndpoint>().Where(e => SupportsLinkGeneration(e)).OrderBy(e => e.RoutePattern.RawText),
Microsoft.AspNetCore.Mvc.Cors (8)
Microsoft.AspNetCore.Mvc.DataAnnotations (11)
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
Microsoft.AspNetCore.Mvc.IntegrationTests (4)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.Razor (4)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
Microsoft.AspNetCore.Mvc.Razor.Test (1)
Microsoft.AspNetCore.Mvc.RazorPages (10)
Microsoft.AspNetCore.Mvc.RazorPages.Test (6)
Microsoft.AspNetCore.Mvc.Test (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (4)
Microsoft.AspNetCore.OpenApi (22)
Microsoft.AspNetCore.OpenApi.Tests (3)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.Routing (3)
Microsoft.AspNetCore.Routing.Tests (9)
Microsoft.AspNetCore.Server.IISIntegration.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Core (10)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
Microsoft.AspNetCore.StaticAssets (2)
Microsoft.AspNetCore.Testing.Tests (1)
Microsoft.AspNetCore.Tests (5)
Microsoft.Build (8)
Microsoft.Build.Engine.OM.UnitTests (26)
Microsoft.Build.Engine.UnitTests (50)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
Microsoft.Build.Tasks.Core (5)
Microsoft.Build.UnitTests.Shared (2)
Microsoft.Build.Utilities.Core (1)
Microsoft.Cci.Extensions (18)
Microsoft.CodeAnalysis (5)
Microsoft.CodeAnalysis.CodeStyle (23)
Microsoft.CodeAnalysis.CodeStyle.Fixes (11)
Microsoft.CodeAnalysis.CSharp (10)
Microsoft.CodeAnalysis.CSharp.CodeStyle (24)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (25)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (15)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (359)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (36)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (692)
Semantics\OutVarTests.cs (95)
178Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
386Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
423Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
461Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
499Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
537Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
575Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
622Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
659Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
697Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
737Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
776Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
816Assert.False(compilation.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Any());
833return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == name);
838return tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>()
854return tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>()
860return tree.GetRoot().DescendantNodes().OfType<DiscardDesignationSyntax>();
865return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken);
870return tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>()
1078var typeofExpression = decl.Ancestors().OfType<TypeOfExpressionSyntax>().FirstOrDefault();
1277if ((forStatement = decl.Ancestors().OfType<ForStatementSyntax>().FirstOrDefault()) != null &&
1279forStatement.Statement.DescendantNodes().OfType<ForStatementSyntax>().Any(f => f.Condition == null))
1284var containingStatement = decl.Ancestors().OfType<StatementSyntax>().FirstOrDefault();
1302reference.Ancestors().OfType<DoStatementSyntax>().Join(
1303decl.Ancestors().OfType<DoStatementSyntax>(), d => d, d => d, (d1, d2) => true).Any())))
5313var node = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().First();
5583var node = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single();
9702var d = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "d").Single();
10269var d = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(id => id.Identifier.ValueText == "d").Single();
11077var node = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().First();
11335var node = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single();
17749var x2Decl = tree.GetRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Single();
18444var initializer = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single();
20658Assert.Equal(1, compilation.SyntaxTrees[0].GetRoot().DescendantNodesAndSelf().OfType<DeclarationExpressionSyntax>().Count());
20954Assert.True(decl.Ancestors().OfType<VariableDeclaratorSyntax>().First().ArgumentList.Contains(decl));
20958=> Assert.Empty(decl.Ancestors().OfType<VariableDeclaratorSyntax>());
21370var e = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "e").Single();
32232var b = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single());
32272var b = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single());
32312var a = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "a").Single());
32385var bDecl = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single();
32483var x1Decl = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>()
32506var one = node0.DescendantNodes().OfType<LiteralExpressionSyntax>().Single();
32521var x1Decl = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>()
32755var declarator = decl.Ancestors().OfType<VariableDeclaratorSyntax>().FirstOrDefault();
33506var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "x").Single();
33694var z1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "z1").First();
34329var method = syntaxTree.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().ElementAt(i + 2);
34330var rankSpecifierOld = method.DescendantNodes().OfType<ArrayRankSpecifierSyntax>().Single();
34543var method = syntaxTree.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().ElementAt(i + 2);
34544var rankSpecifierOld = method.DescendantNodes().OfType<ArrayRankSpecifierSyntax>().Single();
35179var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35218var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35262var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35293var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35332var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35364var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35400var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35439var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35469var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35506var varType = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "var").Single();
35664var statementBefore = identifierBefore.Ancestors().OfType<StatementSyntax>().First();
35668var identifierAfter = statementAfter.DescendantNodes().OfType<IdentifierNameSyntax>().Single(id => id.Identifier.ValueText == "G");
35697var foreachStatement = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single();
35852var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single();
35898var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single();
35982var initializerSyntax = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single();
36001var blockBodySyntax = tree.GetRoot().DescendantNodes().OfType<BlockSyntax>().First();
36026var expressionBodySyntax = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().First();
36049var declarationSyntax = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().First();
36122var expressionBodySyntax = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().First();
36146var blockBodySyntax = tree.GetRoot().DescendantNodes().OfType<BlockSyntax>().First();
36170var propertyExpressionBodySyntax = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().ElementAt(1);
36175var declarationSyntax = tree.GetRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single();
36230var node3 = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().First();
36323var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test3").Last();
36363var method = tree2.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().First();
36366var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
36371Assert.True(model.TryGetSpeculativeSemanticModel(method.Body.SpanStart + 1, method.DescendantNodes().OfType<AttributeSyntax>().Single(), out speculativeModel));
36409var method = tree2.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().First();
36412var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Skip(1).First();
36416Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single()));
36449var method = tree2.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().First();
36452var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
36457var equalsValue = method.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single();
36491var method = tree2.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().First();
36494var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
36498Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single()));
36526var method = tree2.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().First();
36529var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
36534var equalsValue = method.DescendantNodes().OfType<ParameterSyntax>().Single()
36535.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single();
36564var method = tree2.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().First();
36567var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
36571Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single()));
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Features (79)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (18)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (96)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1313)
Semantics\TopLevelStatementsTests.cs (90)
34var methods = type.GetMembers().OfType<SynthesizedSimpleProgramEntryPointSymbol>();
194var localRef = unit1.DescendantNodes().OfType<IdentifierNameSyntax>().First();
235var localDecl = unit1.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single();
257foreach (var globalStatement in tree1.GetRoot().DescendantNodes().OfType<GlobalStatementSyntax>())
319var localRef = unit1.DescendantNodes().OfType<IdentifierNameSyntax>().Single();
358var localDecl = unit2.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single();
408foreach (var globalStatement in tree1.GetRoot().DescendantNodes().OfType<GlobalStatementSyntax>())
481var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
492var localFuncRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local").Single();
497Assert.DoesNotContain(declSymbol, model1.AnalyzeDataFlow(localDecl.Ancestors().OfType<StatementSyntax>().First()).DataFlowsOut);
500var localRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").Single();
533var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
540var localRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").ToArray();
573var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
584var localFuncRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local").Single();
589Assert.Contains(declSymbol, model1.AnalyzeDataFlow(localDecl.Ancestors().OfType<StatementSyntax>().First()).DataFlowsOut);
591var localRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").Single();
698var declarator = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
699var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "s").Single();
871var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single());
873Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single()).Symbol);
877var symbol2 = model2.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single());
879Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single()).Symbol);
985var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().First());
987Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").First()).Symbol);
989var symbol2 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Skip(1).Single());
991Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Skip(1).Single()).Symbol);
1040var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().First());
1042Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").Single()).Symbol);
1407var nameRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single();
1425nameRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single();
1520var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "c").Single();
1592foreach (var id in tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>())
1598foreach (var id in tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>())
1685var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().First();
1706var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray();
1858var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
1882var nameRefs = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray();
2084var localDecl = tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single();
2100var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray();
2248var localDecl = tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single();
2266var nameRefs = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray();
2426var labelDecl = tree1.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single();
2446var nameRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test").ToArray();
2919var nameRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "alias1" && !id.Parent.IsKind(SyntaxKind.NameEquals)).Single();
2924nameRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "alias2").Single();
2925model1.GetDiagnostics(nameRef.Ancestors().OfType<StatementSyntax>().First().Span).Verify(
2941nameRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "alias2" && !id.Parent.IsKind(SyntaxKind.NameEquals)).Single();
2946nameRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "alias1").Single();
2947model2.GetDiagnostics(nameRef.Ancestors().OfType<StatementSyntax>().First().Span).Verify(
3941var nameRefs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").ToArray();
4090var nameRefs = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").ToArray();
4215var declarator = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single();
4216var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local").Single();
4510var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single());
4512Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Single()).Symbol);
4516var symbol2 = model2.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().First());
4518Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Single()).Symbol);
4574var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().First());
4576Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").First()).Symbol);
4578var symbol2 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Skip(1).First());
4580Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Skip(1).Single()).Symbol);
4623var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().First());
4625Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").Single()).Symbol);
4893var declarator = tree.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single();
4894var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "label1").Single();
4950var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single());
4952Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "label1").Single()).Symbol);
4956var symbol2 = model2.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single());
4959Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "label1").Single()).Symbol);
4978var declarator = tree.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single();
4979var reference = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").Single();
6030var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().First();
6034var localRefs = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").ToArray();
6046localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(1);
6086var localFunctions = syntaxTree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().ToList();
6160.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single())
6232var invocation = syntaxTree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
6276var localDecl = syntaxTree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
6277var localRef = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single();
6316var localDecl = syntaxTree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
6317var localRef = syntaxTree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single();
6366var localDecl = syntaxTree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
6368var localRef = syntaxTree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single();
8578var invocations = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().ToArray();
8651var id = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single();
8673var id = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "ar").Single();
8695var id = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "ar").Single();
9677var identifier = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().First(id => id.Identifier.Text == "var");
9681Assert.Equal(OperationKind.Literal, model.GetOperation(tree.GetRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single()).Kind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (697)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (74)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (10)
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.Features (33)
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
Microsoft.CodeAnalysis.Test.Utilities (11)
Microsoft.CodeAnalysis.UnitTests (7)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces (31)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (15)
Microsoft.CodeAnalysis.Workspaces.UnitTests (38)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.AsmDiff (5)
Microsoft.DotNet.GenFacades (2)
Microsoft.DotNet.SignCheckLibrary (3)
Microsoft.DotNet.SourceBuild.Tasks (1)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Microsoft.DotNet.VersionTools (12)
Microsoft.DotNet.XliffTasks (1)
Microsoft.DotNet.XUnitExtensions (1)
Microsoft.Extensions.AI (6)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Integration.Tests (2)
Microsoft.Extensions.AI.Ollama (1)
Microsoft.Extensions.AI.OpenAI.Tests (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
Microsoft.Extensions.Http.Resilience.Tests (2)
Microsoft.Gen.ContextualOptions (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (9)
Microsoft.Gen.Metrics (1)
Microsoft.Interop.ComInterfaceGenerator (2)
Microsoft.Interop.SourceGeneration (1)
Microsoft.Maui (2)
Microsoft.Maui.Controls (8)
Microsoft.Maui.Controls.BindingSourceGen (1)
Microsoft.Maui.Controls.Build.Tasks (2)
Microsoft.Maui.Controls.Compatibility (4)
Microsoft.ML.AutoML (5)
Microsoft.TestUtilities (2)
Microsoft.VisualStudio.LanguageServices (15)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Mvc.Api.Analyzers.Test (3)
Mvc.RoutingWebSite (1)
PresentationBuildTasks (1)
Roslyn.VisualStudio.DiagnosticsWindow (4)
RoutingSandbox (1)
RoutingWebSite (1)
Stress.AppHost (1)
System.Collections.Immutable (1)
System.ComponentModel.Annotations (3)
System.ComponentModel.Composition (3)
System.Composition.TypedParts (5)
System.Private.Windows.Core.TestUtilities (1)
System.Security.Cryptography.Pkcs (1)
System.Text.RegularExpressions.Generator (3)
System.Windows.Forms.Analyzers.CodeFixes.CSharp (4)
System.Windows.Forms.Design (5)
System.Windows.Forms.Design.Tests (8)
System.Windows.Forms.Tests (11)
Templates.Blazor.Tests (7)
Templates.Blazor.WebAssembly.Auth.Tests (7)
Templates.Blazor.WebAssembly.Tests (7)
Templates.Mvc.Tests (7)
Templates.Tests (7)
TestProject.AppHost (2)
XmlFormattersWebSite (2)
Xunit.NetCore.Extensions (3)