6980 references to Single
Aspire.Dashboard (2)
Components\Controls\Chart\MetricTable.razor.cs (1)
171var trace = traces.Single();
Model\Otlp\ApplicationsSelectHelpers.cs (1)
54var app = replicas.Single();
Aspire.Dashboard.Components.Tests (1)
Layout\MainLayoutTests.cs (1)
35message = messageService.AllMessages.Single();
Aspire.Dashboard.Tests (29)
ChannelExtensionsTests.cs (3)
92Assert.Equal(["a", "b", "c"], read1.Single()); 97Assert.Equal(["d", "e", "f"], read2.Single()); 136Assert.Equal(["a", "b", "c"], read1.Single());
Integration\OtlpCorsHttpServiceTests.cs (9)
64Assert.Equal("http://localhost:8000", responseMessage1.Headers.GetValues("Access-Control-Allow-Origin").Single()); 65Assert.Equal("POST", responseMessage1.Headers.GetValues("Access-Control-Allow-Methods").Single()); 66Assert.Equal("X-Requested-With", responseMessage1.Headers.GetValues("Access-Control-Allow-Headers").Single()); 78Assert.Equal("http://localhost:8001", responseMessage2.Headers.GetValues("Access-Control-Allow-Origin").Single()); 79Assert.Equal("POST", responseMessage2.Headers.GetValues("Access-Control-Allow-Methods").Single()); 80Assert.Equal("X-Requested-With", responseMessage2.Headers.GetValues("Access-Control-Allow-Headers").Single()); 133Assert.Equal("*", responseMessage.Headers.GetValues("Access-Control-Allow-Origin").Single()); 134Assert.Equal("POST", responseMessage.Headers.GetValues("Access-Control-Allow-Methods").Single()); 135Assert.Equal("x-requested-with,x-custom,Content-Type", responseMessage.Headers.GetValues("Access-Control-Allow-Headers").Single());
Integration\OtlpHttpServiceTests.cs (5)
53Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 179Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 294Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 323Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 352Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single());
Integration\ServerRetryHelper.cs (1)
20return BindPortsWithRetry(ports => retryFunc(ports.Single()), logger, portCount: 1);
Integration\StartupTests.cs (2)
412Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 697Assert.NotEmpty(response.Headers.GetValues(HeaderNames.ContentSecurityPolicy).Single());
TelemetryRepositoryTests\MetricsTests.cs (9)
179var dimensionAttributes = instrument.Dimensions.Single().Attributes; 275var dimensionAttributes = instrument.Dimensions.Single().Attributes; 392var instrument = applications.Single().GetInstrument("test-meter", "test", s_testTime.AddMinutes(1), s_testTime.AddMinutes(1.5)); 597Assert.Equal(KeyValuePair.Create("key-1", "value-1"), d.Attributes.Single()); 598Assert.Equal(1, ((MetricValue<long>)d.Values.Single()).Value); 602Assert.Equal(KeyValuePair.Create("key-1", "value-2"), d.Attributes.Single()); 603Assert.Equal(2, ((MetricValue<long>)d.Values.Single()).Value); 607Assert.Equal(KeyValuePair.Create("key-1", "value-3"), d.Attributes.Single()); 608Assert.Equal(3, ((MetricValue<long>)d.Values.Single()).Value);
Aspire.EndToEnd.Tests (1)
tests\Shared\WorkloadTesting\TemplateCustomHive.cs (1)
97return packages.Single();
Aspire.Hosting (2)
Dashboard\DashboardServiceHost.cs (1)
211_resourceServiceUri.SetResult(addressFeature.Addresses.Single());
Publishing\ManifestPublishingContext.cs (1)
301if (container.TryGetAnnotationsOfType<DockerfileBuildAnnotation>(out var annotations) && annotations.Single() is { } annotation)
Aspire.Hosting.Azure.Tests (13)
AzureBicepResourceTests.cs (8)
1882var sa = infrastructure.GetProvisionableResources().OfType<StorageAccount>().Single(); 2040var sa = infrastructure.GetProvisionableResources().OfType<StorageAccount>().Single(); 2199var sa = infrastructure.GetProvisionableResources().OfType<StorageAccount>().Single(); 2357var sa = infrastructure.GetProvisionableResources().OfType<StorageAccount>().Single(); 2517var search = infrastructure.GetProvisionableResources().OfType<SearchService>().Single(); 2643var account = infrastructure.GetProvisionableResources().OfType<CognitiveServicesAccount>().Single(); 2784var vault = r.GetProvisionableResources().OfType<KeyVaultService>().Single(); 2794var vault = r.GetProvisionableResources().OfType<KeyVaultService>().Single();
AzureResourceExtensionsTests.cs (4)
33var volumeAnnotation = storage.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 59var volumeAnnotation = storage.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 85var volumeAnnotation = storage.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 111var volumeAnnotation = storage.Resource.Annotations.OfType<ContainerMountAnnotation>().Single();
AzureWebPubSubExtensionsTests.cs (1)
32realHub = infrastructure.GetProvisionableResources().OfType<WebPubSubHub>().Single();
Aspire.Hosting.Containers.Tests (8)
ContainerResourceBuilderTests.cs (8)
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); 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.Garnet.Tests (2)
AddGarnetTests.cs (2)
130var volumeAnnotation = garnet.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 155var volumeAnnotation = garnet.Resource.Annotations.OfType<ContainerMountAnnotation>().Single();
Aspire.Hosting.Kafka.Tests (3)
AddKafkaTests.cs (3)
123var volumeAnnotation = kafka.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 141var volumeAnnotation = kafka.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 176var kafkaUiEndpoint = kafkaUiResource.Annotations.OfType<EndpointAnnotation>().Single();
Aspire.Hosting.Keycloak.Tests (3)
KeycloakResourceBuilderTests.cs (3)
53var volumeAnnotation = keycloak.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 68var volumeAnnotation = keycloak.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 99var containerAnnotation = keycloak.Resource.Annotations.OfType<ContainerMountAnnotation>().Single();
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
127var singleInstance = mySqlInstances.Single();
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
261var volume = container.Annotations.OfType<ContainerMountAnnotation>().Single(); 279var volume = myAdmin.Annotations.OfType<ContainerMountAnnotation>().Single();
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
295var adminResource = builder.ApplicationBuilder.Resources.OfType<PgWebContainerResource>().Single();
Aspire.Hosting.PostgreSQL.Tests (4)
AddPostgresTests.cs (4)
381var volume = container.Annotations.OfType<ContainerMountAnnotation>().Single(); 436var imageAnnotation = container.Annotations.OfType<ContainerImageAnnotation>().Single(); 464var volume = pgadmin.Annotations.OfType<ContainerMountAnnotation>().Single(); 511var volume = pgadmin.Annotations.OfType<ContainerMountAnnotation>().Single();
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
185var redisInsightResource = builder.ApplicationBuilder.Resources.OfType<RedisInsightResource>().Single();
Aspire.Hosting.Redis.Tests (4)
AddRedisTests.cs (2)
269var volumeAnnotation = redis.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 294var volumeAnnotation = redis.Resource.Annotations.OfType<ContainerMountAnnotation>().Single();
RedisFunctionalTests.cs (2)
212Assert.NotEqual(secondRunDatabases.Single().Id, firstRunDatabases.Single().Id);
Aspire.Hosting.Tests (10)
Dashboard\DashboardLifecycleHookTests.cs (1)
49await resourceNotificationService.PublishUpdateAsync(model.Resources.Single(), s => s).DefaultTimeout();
Dcp\ApplicationExecutorTests.cs (2)
487var logLine = watchLogsEnumerator.Current.Single(); 498logLine = watchLogsEnumerator.Current.Single();
SlimTestProgramTests.cs (2)
56var endpoint = projectBuilders.Resource.Annotations.OfType<EndpointAnnotation>().Single(); 74var endpoint = projectBuilders.Resource.Annotations.OfType<EndpointAnnotation>().Single();
Utils\WithAnnotationTests.cs (2)
44var firstAnnotation = redis.Resource.Annotations.OfType<DummyAnnotation>().Single(); 48var secondAnnotation = redis.Resource.Annotations.OfType<DummyAnnotation>().Single();
WithEndpointTests.cs (3)
30.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single(); 47.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single(); 82.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
Aspire.Hosting.Valkey.Tests (2)
AddValkeyTests.cs (2)
130var volumeAnnotation = valkey.Resource.Annotations.OfType<ContainerMountAnnotation>().Single(); 155var volumeAnnotation = valkey.Resource.Annotations.OfType<ContainerMountAnnotation>().Single();
Aspire.Playground.Tests (3)
ProjectSpecificTests.cs (3)
19var appHostPath = Directory.GetFiles(AppContext.BaseDirectory, "WithDockerfile.AppHost.dll").Single(); 36var appHostPath = Directory.GetFiles(AppContext.BaseDirectory, "KafkaBasic.AppHost.dll").Single(); 63var appHostPath = Directory.GetFiles(AppContext.BaseDirectory, "AzureFunctionsEndToEnd.AppHost.dll").Single();
Aspire.StackExchange.Redis.Tests (6)
AspireRedisExtensionsTests.cs (6)
373Assert.Empty(connection1.GetServers().Single().Keys()); 374Assert.Single(connection2.GetServers().Single().Keys()); 375Assert.Empty(connection3.GetServers().Single().Keys()); 380Assert.Empty(connection1.GetServers().Single().Keys()); 381Assert.Single(connection2.GetServers().Single().Keys()); 382Assert.Single(connection3.GetServers().Single().Keys());
Aspire.Workload.Tests (1)
tests\Shared\WorkloadTesting\TemplateCustomHive.cs (1)
97return packages.Single();
BasicWebSite (1)
Controllers\MonitorController.cs (1)
16_counterService = providers.OfType<ActionDescriptorCreationCounter>().Single();
BoundTreeGenerator (1)
BoundNodeClassWriter.cs (1)
816return fieldsWithName.Single();
CdkSample.AppHost (4)
Program.cs (4)
19var account = infrastructure.GetProvisionableResources().OfType<StorageAccount>().Single(); 32var keyVault = infrastructure.GetProvisionableResources().OfType<KeyVaultService>().Single(); 87var logAnalyticsWorkspace = infrastructure.GetProvisionableResources().OfType<OperationalInsightsWorkspace>().Single(); 97var appInsights = infrastructure.GetProvisionableResources().OfType<ApplicationInsightsComponent>().Single();
csc (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
600return hashAttributes.Single().Hash;
CSharpSyntaxGenerator (2)
SourceWriter.cs (2)
948var (field, index) = relevantNodes.Single(); 994var (field, index) = relevantNodes.Single();
CustomEncryptorSample (1)
CustomXmlDecryptor.cs (1)
24return new XElement(encryptedElement.Elements().Single());
Diagnostics.EFCore.FunctionalTests (1)
Helpers\StringHelpers.cs (1)
16var method = strings.GetDeclaredMethods(stringName).Single();
dotnet-dev-certs (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
154.Single()
dotnet-openapi (1)
ProjectExtensions.cs (1)
14var item = project.AddItem(tagName, include).Single();
IdeBenchmarks (2)
SQLitePersistentStorageBenchmark.cs (2)
72_document = _workspace.CurrentSolution.Projects.Single().Documents.Single();
IIS.FunctionalTests (18)
Http2TrailersResetTests.cs (8)
76Assert.Equal("TrailerValue", response.TrailingHeaders.GetValues("TrailerName").Single()); 89Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 104Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 122Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 138Assert.Equal("TrailerName", response.Headers.Trailer.Single()); 141Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 167Assert.Equal("TrailerValue", response.TrailingHeaders.GetValues("TrailerName").Single()); 184Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single());
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
49=> from v in TestVariants.Select(v => v.Single())
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (2)
157var eventElementWithOpCode = eventElement.Descendants(nameSpace + "RenderingInfo").Single().Descendants(nameSpace + "Opcode").Single();
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
210return Directory.GetFiles(logFolderPath).Single();
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (1)
106.Single()
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (4)
132Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); 150Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); 213Assert.Equal(body, response.Headers.GetValues("BodyAsString").Single()); 592Assert.Equal("MyServer/7.8", response.Headers.Server.Single().Product.ToString());
src\Servers\IIS\IIS\test\IIS.Shared.FunctionalTests\StdOutRedirectionTests.cs (1)
104var fileInDirectory = Directory.GetFiles(LogFolderPath).Single();
IIS.LongTests (11)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
210return Directory.GetFiles(logFolderPath).Single();
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
552.Single()
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
390.Single() 578element => element.Descendants("aspNetCore").Single().SetAttributeValue("processPath", "") 583element => element.Descendants("aspNetCore").Single().SetAttributeValue("hostingModel", "asdf") 588element => element.Descendants("aspNetCore").Single().GetOrAdd("environmentVariables").GetOrAdd("add") 1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName); 1334.Single() 1361.Single() 1366.Single() 1408.Single()
IIS.NewHandler.FunctionalTests (11)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
210return Directory.GetFiles(logFolderPath).Single();
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
552.Single()
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
390.Single() 578element => element.Descendants("aspNetCore").Single().SetAttributeValue("processPath", "") 583element => element.Descendants("aspNetCore").Single().SetAttributeValue("hostingModel", "asdf") 588element => element.Descendants("aspNetCore").Single().GetOrAdd("environmentVariables").GetOrAdd("add") 1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName); 1334.Single() 1361.Single() 1366.Single() 1408.Single()
IIS.NewShim.FunctionalTests (11)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
210return Directory.GetFiles(logFolderPath).Single();
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
552.Single()
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
390.Single() 578element => element.Descendants("aspNetCore").Single().SetAttributeValue("processPath", "") 583element => element.Descendants("aspNetCore").Single().SetAttributeValue("hostingModel", "asdf") 588element => element.Descendants("aspNetCore").Single().GetOrAdd("environmentVariables").GetOrAdd("add") 1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName); 1334.Single() 1361.Single() 1366.Single() 1408.Single()
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
210return Directory.GetFiles(logFolderPath).Single();
IISExpress.FunctionalTests (20)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
49=> from v in TestVariants.Select(v => v.Single())
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (2)
157var eventElementWithOpCode = eventElement.Descendants(nameSpace + "RenderingInfo").Single().Descendants(nameSpace + "Opcode").Single();
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
210return Directory.GetFiles(logFolderPath).Single();
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (1)
106.Single()
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (4)
132Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); 150Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); 213Assert.Equal(body, response.Headers.GetValues("BodyAsString").Single()); 592Assert.Equal("MyServer/7.8", response.Headers.Server.Single().Product.ToString());
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
552.Single()
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
390.Single() 578element => element.Descendants("aspNetCore").Single().SetAttributeValue("processPath", "") 583element => element.Descendants("aspNetCore").Single().SetAttributeValue("hostingModel", "asdf") 588element => element.Descendants("aspNetCore").Single().GetOrAdd("environmentVariables").GetOrAdd("add") 1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName); 1334.Single() 1361.Single() 1366.Single() 1408.Single()
UpgradeFeatureDetectionTests.cs (1)
68.Single()
illink (2)
ILLink.RoslynAnalyzer (1)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\ValueExtensions.cs (1)
57 return values.Single ();
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (2)
870intermedCert.Extensions.OfType<X509SubjectKeyIdentifierExtension>().Single(); 935intermediateAuthority = intermediateAuthorities.Single();
Interop.FunctionalTests (11)
Http2\Http2RequestTests.cs (3)
191Assert.Equal("abc", response.Headers.GetValues("test").Single()); 192Assert.Equal(longValue, response.Headers.GetValues(longKey).Single()); 286Assert.Equal("value!", trailers.GetValues("test-trailer").Single());
Http3\Http3RequestTests.cs (1)
1387var value = response.TrailingHeaders.GetValues($"trailer-{i}").Single();
HttpClientHttp2InteropTests.cs (7)
537Assert.Equal("TestTrailer", response.Headers.Trailer.Single()); 539Assert.Equal("TestValue", response.TrailingHeaders.GetValues("TestTrailer").Single()); 569Assert.Equal("TestTrailer", response.Headers.Trailer.Single()); 576Assert.Equal("TestValue", response.TrailingHeaders.GetValues("TestTrailer").Single()); 684Assert.Equal("TestTrailer", response.Headers.Trailer.Single()); 688Assert.Equal("TestValue", response.TrailingHeaders.GetValues("TestTrailer").Single()); 1113Assert.Equal(oneKbString + i, response.Headers.GetValues("header" + i).Single());
InteropWebsite (2)
TestServiceImpl.cs (2)
111var entry = echoInitialList.Single(); 118context.ResponseTrailers.Add(echoTrailingList.Single());
IOperationGenerator (2)
IOperationClassWriter.cs (2)
658return node.OperationKind.Entries.Where(e => e.EditorBrowsable != false).Single().Name; 710orderedProperties.Add(publicIOperationProps.Single());
Microsoft.Analyzers.Extra.Tests (2)
Resources\RoslynTestUtils.cs (2)
362var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution; 456var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Analyzers.Local.Tests (2)
Resources\RoslynTestUtils.cs (2)
363var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution; 457var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.AspNetCore.Analyzer.Testing (1)
DiagnosticProject.cs (1)
67var testProject = solution.ProjectIds.Single();
Microsoft.AspNetCore.Analyzers.Test (9)
CompilationFeatureDetectorTest.cs (3)
35var type = (INamedTypeSymbol)compilation.GetSymbolsWithName("StartupWithNoFeatures").Single(); 75var type = (INamedTypeSymbol)compilation.GetSymbolsWithName("StartupWithMapHub").Single(); 115var type = (INamedTypeSymbol)compilation.GetSymbolsWithName("StartupWithMapBlazorHub").Single();
StartupFactsTest.cs (6)
118var type = (INamedTypeSymbol)compilation.GetSymbolsWithName(source).Single(); 143var type = (INamedTypeSymbol)compilation.GetSymbolsWithName(source).Single(); 166var type = (INamedTypeSymbol)compilation.GetSymbolsWithName(source).Single(); 188var type = (INamedTypeSymbol)compilation.GetSymbolsWithName(source).Single(); 210var type = (INamedTypeSymbol)compilation.GetSymbolsWithName(source).Single(); 227var type = (INamedTypeSymbol)compilation.GetSymbolsWithName(source).Single();
Microsoft.AspNetCore.App.Analyzers.Test (2)
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (2)
43select method).Single(); 53select method).Single();
Microsoft.AspNetCore.Authentication.Test (25)
CookieTests.cs (4)
53Assert.StartsWith("http://example.com/login", responded.Single()); 65Assert.StartsWith("http://example.com/denied", responded.Single()); 77Assert.StartsWith("/", responded.Single()); 89Assert.StartsWith("http://example.com/Account/Login", responded.Single());
FacebookTests.cs (1)
442var nonceCookie = transaction.SetCookie.Single();
GoogleTests.cs (1)
1075var nonceCookie = transaction.SetCookie.Single();
MicrosoftAccountTests.cs (1)
342var nonceCookie = transaction.SetCookie.Single();
OpenIdConnect\OpenIdConnectChallengeTests.cs (3)
391Assert.Equal("Oolong", res.Headers.GetValues("tea").Single()); 440var nonceCookie = challengeCookies.Where(cookie => cookie.Name.StartsWith(OpenIdConnectDefaults.CookieNoncePrefix, StringComparison.Ordinal)).Single(); 448var correlationCookie = challengeCookies.Where(cookie => cookie.Name.StartsWith(".AspNetCore.Correlation.", StringComparison.Ordinal)).Single();
OpenIdConnect\OpenIdConnectEventTests.cs (1)
1018Assert.True(StringSegment.IsNullOrEmpty(parsedValues.Single().Value));
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (1)
1018Assert.True(StringSegment.IsNullOrEmpty(parsedValues.Single().Value));
OpenIdConnect\TestSettings.cs (2)
61formInputs = forms.Single() 99formInputs = forms.Single()
TwitterTests.cs (3)
215var setCookieValue = setCookieValues.Single(); 265var setCookieValue = setCookieValues.Single(); 372var setCookieValue = setCookieValues.Single();
WsFederation\WsFederationTest.cs (4)
194var cookie = response.Headers.GetValues(HeaderNames.SetCookie).Single(); 196Assert.Equal("OnRemoteSignOut", response.Headers.GetValues("EventHeader").Single()); 334var identity = context.Principal.Identities.Single(); 429var identity = context.User.Identities.Single();
WsFederation\WsFederationTest_Handler.cs (4)
192var cookie = response.Headers.GetValues(HeaderNames.SetCookie).Single(); 194Assert.Equal("OnRemoteSignOut", response.Headers.GetValues("EventHeader").Single()); 330var identity = context.Principal.Identities.Single(); 425var identity = context.User.Identities.Single();
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\CodeFixVerifier.Helper.cs (1)
29var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.AspNetCore.Components.Authorization.Tests (55)
AuthorizeRouteViewTest.cs (21)
61var batch = _renderer.Batches.Single(); 62var layoutDiff = batch.GetComponentDiffs<TestLayout>().Single(); 73var pageDiff = batch.GetComponentDiffs<TestPageRequiringAuthorization>().Single(); 98var batch = _renderer.Batches.Single(); 99var layoutDiff = batch.GetComponentDiffs<TestLayout>().Single(); 110var pageDiff = batch.GetComponentDiffs<TestPageRequiringAuthorization>().Single(); 136var batch = _renderer.Batches.Single(); 137var layoutDiff = batch.GetComponentDiffs<TestLayout>().Single(); 165var batch = _renderer.Batches.Single(); 166var layoutDiff = batch.GetComponentDiffs<TestLayout>().Single(); 193var batch = _renderer.Batches.Single(); 194var layoutDiff = batch.GetComponentDiffs<TestLayout>().Single(); 221var batch = _renderer.Batches.Single(); 222var layoutDiff = batch.GetComponentDiffs<TestLayout>().Single(); 234batch = _renderer.Batches.Skip(1).Single(); 235var nonEmptyDiff = batch.DiffsInOrder.Where(d => d.Edits.Any()).Single(); 265var batch = _renderer.Batches.Single(); 266var layoutDiff = batch.GetComponentDiffs<TestLayout>().Single(); 284var batch = _renderer.Batches.Single(); 313var batch = _renderer.Batches.Single(); 353var diff = batch2.DiffsInOrder.Where(d => d.Edits.Any()).Single();
AuthorizeViewTest.cs (24)
37var diff = renderer.Batches.Single().GetComponentDiffs<AuthorizeView>().Single(); 66var diff = renderer.Batches.Single().GetComponentDiffs<AuthorizeView>().Single(); 71renderer.Batches.Single().ReferenceFrames[edit.ReferenceFrameIndex], 100var diff = renderer.Batches.Single().GetComponentDiffs<AuthorizeView>().Single(); 130var diff = renderer.Batches.Single().GetComponentDiffs<AuthorizeView>().Single(); 135renderer.Batches.Single().ReferenceFrames[edit.ReferenceFrameIndex], 166var diff = renderer.Batches.Single().GetComponentDiffs<AuthorizeView>().Single(); 171renderer.Batches.Single().ReferenceFrames[edit.ReferenceFrameIndex], 201var authorizeViewComponentId = renderer.Batches.Single() 202.GetComponentFrames<AuthorizeView>().Single().ComponentId; 213var diff = batch.DiffsByComponentId[authorizeViewComponentId].Single(); 266var batch1 = renderer.Batches.Single(); 267var authorizeViewComponentId = batch1.GetComponentFrames<AuthorizeView>().Single().ComponentId; 268var diff1 = batch1.DiffsByComponentId[authorizeViewComponentId].Single(); 280var diff2 = batch2.DiffsByComponentId[authorizeViewComponentId].Single(); 367var batch1 = renderer.Batches.Single(); 368var authorizeViewComponentId = batch1.GetComponentFrames<AuthorizeView>().Single().ComponentId; 369var diff1 = batch1.DiffsByComponentId[authorizeViewComponentId].Single(); 387var diff2 = batch2.DiffsByComponentId[authorizeViewComponentId].Single();
CascadingAuthenticationStateTest.cs (10)
52var batch = renderer.Batches.Single(); 53var receiveAuthStateId = batch.GetComponentFrames<ReceiveAuthStateComponent>().Single().ComponentId; 54var receiveAuthStateDiff = batch.DiffsByComponentId[receiveAuthStateId].Single(); 85var batch1 = renderer.Batches.Single(); 86var receiveAuthStateFrame = batch1.GetComponentFrames<ReceiveAuthStateComponent>().Single(); 89var receiveAuthStateDiff1 = batch1.DiffsByComponentId[receiveAuthStateId].Single(); 107var receiveAuthStateDiff2 = batch2.DiffsByComponentId[receiveAuthStateId].Single(); 133var receiveAuthStateId = renderer.Batches.Single() 134.GetComponentFrames<ReceiveAuthStateComponent>().Single().ComponentId; 143var receiveAuthStateDiff = batch.DiffsByComponentId[receiveAuthStateId].Single();
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
49var frameLocation = locationsForName.Single();
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (1)
240var endpoints = endpointBuilder.DataSources.Single().Endpoints;
EndpointHtmlRendererTest.cs (2)
1135Assert.Equal("WebAssemblyPrerendered", parameterValues.Single().ToString()); 1148Assert.Equal("WebAssembly", parameterValues.Single().ToString());
RazorComponentEndpointFactoryTest.cs (1)
149builder => builder.Metadata.Remove(builder.Metadata.OfType<AuthorizeAttribute>().Single())
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\CodeFixVerifier.Helper.cs (1)
29var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.AspNetCore.Components.Server.Tests (11)
Circuits\CircuitHostTest.cs (3)
284var aex = Assert.IsType<AggregateException>(reportedErrors.Single().ExceptionObject); 285Assert.Same(ex, aex.InnerExceptions.Single()); 286Assert.False(reportedErrors.Single().IsTerminating);
Circuits\RevalidatingServerAuthenticationStateProviderTest.cs (2)
158var firstRevalidationCall = provider.RevalidationCallLog.Single(); 200var firstRevalidationCall = provider.RevalidationCallLog.Single();
ProtectedBrowserStorageTest.cs (6)
34var invocation = jsRuntime.Invocations.Single(); 60var invocation = jsRuntime.Invocations.Single(); 84var invocation = jsRuntime.Invocations.Single(); 115var invocation = jsRuntime.Invocations.Single(); 142var invocation = jsRuntime.Invocations.Single(); 251var invocation = jsRuntime.Invocations.Single();
Microsoft.AspNetCore.Components.Tests (178)
CascadingParameterTest.cs (31)
34var batch = renderer.Batches.Single(); 36var nestedComponentDiff = batch.DiffsByComponentId[nestedComponentId].Single(); 74var firstBatch = renderer.Batches.Single(); 85var nestedComponentDiff = secondBatch.DiffsByComponentId[nestedComponentId].Single(); 120var firstBatch = renderer.Batches.Single(); 131var nestedComponentDiff = secondBatch.DiffsByComponentId[nestedComponentId].Single(); 165var firstBatch = renderer.Batches.Single(); 215var firstBatch = renderer.Batches.Single(); 274var firstBatch = renderer.Batches.Single(); 279var nestedComponentDiff = firstBatch.DiffsByComponentId[nestedComponentId].Single(); 375var firstBatch = renderer.Batches.Single(); 416var batch = renderer.Batches.Single(); 419var nestedComponentDiff1 = batch.DiffsByComponentId[nestedComponentId1].Single(); 420var nestedComponentDiff2 = batch.DiffsByComponentId[nestedComponentId2].Single(); 466var batch = renderer.Batches.Skip(1).Single(); 467var diff = batch.DiffsByComponentId[componentId].Single(); 502var batch = renderer.Batches.Single(); 503var diff = batch.DiffsByComponentId[componentId].Single(); 539var batch = renderer.Batches.Single(); 541var nestedComponentDiff = batch.DiffsByComponentId[nestedComponentId].Single(); 584var firstBatch = renderer.Batches.Single(); 585var diff = firstBatch.DiffsByComponentId[componentId].Single(); 602var diff2 = secondBatch.DiffsByComponentId[componentId].Single(); 618var diff3 = thirdBatch.DiffsByComponentId[componentId].Single(); 654var firstBatch = renderer.Batches.Single(); 655var diff = firstBatch.DiffsByComponentId[componentId].Single(); 670var diff2 = secondBatch.DiffsByComponentId[componentId].Single(); 680var nestedComponentDiff = secondBatch.DiffsByComponentId[nestedComponentId].Single(); 744var firstBatch = renderer.Batches.Single(); 752Assert.Collection(firstBatch.GetComponentDiffs<SingleDeliveryParameterConsumerComponent>().Single().Edits, 766var nestedComponentDiff = secondBatch.DiffsByComponentId[nestedComponentId].Single();
DynamicComponentTest.cs (2)
59var batch = renderer.Batches.Single(); 90var batch = renderer.Batches.Single();
LayoutViewTest.cs (7)
68var batch = _renderer.Batches.Single(); 75var rootLayoutComponentId = batch.GetComponentFrames<RootLayout>().Single().ComponentId; 98var batch = _renderer.Batches.Single(); 105var rootLayoutComponentId = batch.GetComponentFrames<RootLayout>().Single().ComponentId; 130var batch = _renderer.Batches.Single(); 137var rootLayoutComponentId = batch.GetComponentFrames<RootLayout>().Single().ComponentId; 146var nestedLayoutComponentId = batch.GetComponentFrames<NestedLayout>().Single().ComponentId;
RendererTest.cs (123)
45var batch = renderer.Batches.Single(); 46var diff = batch.DiffsByComponentId[componentId].Single(); 73var batch = renderer.Batches.Single(); 77var nestedComponentDiff = batch.DiffsByComponentId[nestedComponentId].Single(); 106var batch = renderer.Batches.Single(); 107var firstDiff = batch.DiffsByComponentId[componentId].Single(); 119var secondBatch = renderer.Batches.Skip(1).Single(); 120var secondDiff = secondBatch.DiffsByComponentId[componentId].Single(); 142var nestedComponentFrame = renderer.Batches.Single() 152var firstDiff = batch.DiffsByComponentId[nestedComponentId].Single(); 165var secondDiff = secondBatch.DiffsByComponentId[nestedComponentId].Single(); 195var diff = create.DiffsByComponentId[componentId].Single(); 210var updateDiff = update.DiffsByComponentId[componentId].Single(); 288var batch = renderer.Batches.Single(); 289var diff = batch.DiffsByComponentId[componentId].Single(); 304var batch2 = renderer.Batches.Skip(1).Single(); 305var diff2 = batch2.DiffsByComponentId[componentId].Single(); 553var eventHandlerId = renderer.Batches.Single() 583var eventHandlerId = renderer.Batches.Single() 611var eventHandlerId = renderer.Batches.Single() 634var eventHandlerId = renderer.Batches.Single() 657var eventHandlerId = renderer.Batches.Single() 680var eventHandlerId = renderer.Batches.Single() 706var eventHandlerId = renderer.Batches.Single() 737var eventHandlerId = renderer.Batches.Single() 766var eventHandlerId = renderer.Batches.Single() 797var nestedComponentFrame = renderer.Batches.Single() 844var eventHandlerId = renderer.Batches.Single() 887var eventHandlerId = renderer.Batches.Single() 930var eventHandlerId = renderer.Batches.Single() 969var nestedComponentFrame = renderer.Batches.Single() 2010var renderer1Batch = renderer1.Batches.Single(); 2011var renderer1Diff = renderer1Batch.DiffsByComponentId[renderer1ComponentId].Single(); 2020var renderer2Batch = renderer2.Batches.Single(); 2021var renderer2Diff = renderer2Batch.DiffsByComponentId[renderer2ComponentId].Single(); 2047var nestedComponentFrame = renderer.Batches.Single() 2058var diff = batch.DiffsByComponentId[rootComponentId].Single(); 2088var originalComponentFrame = renderer.Batches.Single() 2124var childComponentId = renderer.Batches.Single() 2132var diff = renderer.Batches[1].DiffsByComponentId[childComponentId].Single(); 2162var childComponentId = renderer.Batches.Single() 2170var diff = renderer.Batches[1].DiffsByComponentId[childComponentId].Single(); 2202var childComponentId = renderer.Batches.Single() 2237var batch = renderer.Batches.Single(); 2238var rootComponentDiff = batch.DiffsByComponentId[rootComponentId].Single(); 2246.Single().Component; 2639var batch = renderer.Batches.Single(); 2640var rootComponentDiff = batch.DiffsByComponentId[rootComponentId].Single(); 2645.Single(); 2647var childComponentDiff = batch.DiffsByComponentId[childComponentFrame.ComponentId].Single(); 2682var origEventHandlerId = renderer.Batches.Single() 2724var origEventHandlerId = renderer.Batches.Single() 2766var batch = renderer.Batches.Single(); 2767var rootComponentDiff = batch.DiffsByComponentId[rootComponentId].Single(); 2772.Single(); 2774var childComponentDiff = batch.DiffsByComponentId[childComponentFrame.ComponentId].Single(); 2810var origEventHandlerId = renderer.Batches.Single() 2858var origBatchReferenceFrames = renderer.Batches.Single().ReferenceFrames; 2944var batch1 = renderer.Batches.Single(); 2945var edit1 = batch1.DiffsByComponentId[componentId].Single().Edits.Single(); 2953var batch2 = renderer.Batches.Skip(1).Single(); 2954var edit2 = batch2.DiffsByComponentId[componentId].Single().Edits.Single(); 2980var batch = renderer.Batches.Single(); 3004var diff2edit = diff2.Edits.Single(); 3012var diff3edit = diff3.Edits.Single(); 3050var childComponentId = renderer.Batches.Single() 3053.Single() 3055var origEventHandlerId = renderer.Batches.Single() 3067var newBatch = renderer.Batches.Skip(1).Single(); 3070Assert.Collection(newBatch.DiffsByComponentId[componentId].Single().Edits, 3088var checkboxChangeEventHandlerId = renderer.Batches.Single() 3099var latestDiff = latestBatch.DiffsInOrder.Single(); 3130var checkboxChangeEventHandlerId = renderer.Batches.Single() 3169var checkboxChangeEventHandlerId = renderer.Batches.Single() 3209var checkboxChangeEventHandlerId = renderer.Batches.Single() 3249var checkboxChangeEventHandlerId = renderer.Batches.Single() 3292var latestBatch = renderer.Batches.Skip(1).Single(); 3293var latestDiff = latestBatch.DiffsInOrder.Single(); 3419var batch1 = renderer.Batches.Single(); 3420var parentComponentEdits1 = batch1.DiffsByComponentId[parentComponentId].Single().Edits; 3434var batch2 = renderer.Batches.Skip(1).Single(); 3505var eventHandlerId = renderer.Batches.Single() 4218var batch = renderer.Batches.Single(); 4333var eventHandlerId = renderer.Batches.Single() 4355Assert.Collection(batch2.DiffsInOrder.Single().Edits.ToArray(), edit => 4381var eventHandlerId = renderer.Batches.Single() 4407Assert.Collection(latestBatch.DiffsInOrder.Single().Edits.ToArray(), edit => 4561var batch = renderer.Batches.Single(); 4562var errorThrowingComponentId = batch.GetComponentFrames<ErrorThrowingComponent>().Single().ComponentId; 4569Assert.Equal(errorThrowingComponentId, batch.DisposedComponentIDs.Single()); 4589var errorBoundaries = renderer.Batches.Single().GetComponentFrames<TestErrorBoundary>() 4591var errorThrowingComponentId = renderer.Batches.Single() 4592.GetComponentFrames<ErrorThrowingComponent>().Single().ComponentId; 4605Assert.Equal(errorThrowingComponentId, renderer.Batches[1].DisposedComponentIDs.Single()); 4626var errorBoundaries = renderer.Batches.Single().GetComponentFrames<TestErrorBoundary>() 4628var errorThrowingComponentId = renderer.Batches.Single() 4629.GetComponentFrames<ErrorThrowingComponent>().Single().ComponentId; 4645Assert.Equal(errorThrowingComponentId, renderer.Batches[2].DisposedComponentIDs.Single()); 4664var errorBoundaries = renderer.Batches.Single().GetComponentFrames<TestErrorBoundary>() 4666var errorThrowingComponentId = renderer.Batches.Single() 4667.GetComponentFrames<ErrorThrowingComponent>().Single().ComponentId; 4668var eventHandlerId = renderer.Batches.Single().ReferenceFrames 4683Assert.Equal(errorThrowingComponentId, renderer.Batches[1].DisposedComponentIDs.Single()); 4703var errorBoundaries = renderer.Batches.Single().GetComponentFrames<TestErrorBoundary>() 4705var errorThrowingComponentId = renderer.Batches.Single() 4706.GetComponentFrames<ErrorThrowingComponent>().Single().ComponentId; 4707var eventHandlerId = renderer.Batches.Single().ReferenceFrames 4727Assert.Equal(errorThrowingComponentId, renderer.Batches[1].DisposedComponentIDs.Single()); 4752var errorBoundaries = renderer.Batches.Single().GetComponentFrames<TestErrorBoundary>() 4754var errorThrowingComponentId = renderer.Batches.Single() 4755.GetComponentFrames<ErrorThrowingComponent>().Single().ComponentId; 4756var eventHandlerId = renderer.Batches.Single().ReferenceFrames 4803.GetComponentFrames<DisposableComponent>().Single(); 4805.GetComponentFrames<AsyncDisposableComponent>().Single(); 4877.GetComponentFrames<DisposableComponent>().Single(); 4919.GetComponentFrames<DisposableComponent>().Single(); 4921.GetComponentFrames<AsyncDisposableComponent>().Single(); 5083var batch = renderer.Batches.Single(); 5085var resolvedComponent = (MessageComponent)componentFrames.Single().Component; 5108var batch = renderer.Batches.Single(); 5110var resolvedComponent = (MessageComponent)componentFrames.Single().Component;
Rendering\RenderTreeBuilderTest.cs (1)
150var frame = builder.GetFrames().AsEnumerable().Single();
RenderTreeDiffBuilderTest.cs (7)
217var oldComponent = GetComponents<CaptureSetParametersComponent>(oldTree).Single(); 278var newComponent = GetComponents(newTree).Single(); 310var newComponent = GetComponents(newTree).Single(); 358var oldComponent = GetComponents(oldTree).Single(); 370var newComponent = GetComponents(newTree).Single(); 1566var diff = renderBatch.UpdatedComponents.AsEnumerable().Single(); 1602AssertEdit(rootComponentDiff.Edits.Single(), RenderTreeEditType.PrependFrame, 0);
RouteViewTest.cs (7)
61var batch = _renderer.Batches.Single(); 69var layoutViewComponentId = batch.GetComponentFrames<LayoutView>().Single().ComponentId; 76var testLayoutComponentId = batch.GetComponentFrames<TestLayout>().Single().ComponentId; 86var pageComponentId = batch.GetComponentFrames<ComponentWithLayout>().Single().ComponentId; 111var batch = _renderer.Batches.Single(); 134var batch = _renderer.Batches.Single(); 158var batch = _renderer.Batches.Single();
Microsoft.AspNetCore.Components.Web.Tests (31)
Forms\EditFormTest.cs (8)
113var editFormComponentId = _testRenderer.Batches.Single() 114.GetComponentFrames<EditForm>().Single().ComponentId; 144var editFormComponentId = _testRenderer.Batches.Single() 145.GetComponentFrames<EditForm>().Single().ComponentId; 194var editFormComponentId = _testRenderer.Batches.Single() 195.GetComponentFrames<EditForm>().Single().ComponentId; 212.Single(); 218return FindEditFormComponent(_testRenderer.Batches.Single());
Forms\InputBaseTest.cs (16)
296var receivedParsedValue = valueChangedArgs.Single(); 331var receivedParsedValue = valueChangedArgs.Single(); 380var batch1 = renderer.Batches.Single(); 381var componentFrame1 = batch1.GetComponentFrames<TestInputComponent<string>>().Single(); 393var batch2 = renderer.Batches.Skip(1).Single(); 394Assert.Equal(inputComponentId, batch2.DiffsByComponentId.Keys.Single()); 414var component = renderer.Batches.Single().GetComponentFrames<TestInputComponent<string>>().Single().Component; 448var batch1 = renderer.Batches.Single(); 449var componentFrame1 = batch1.GetComponentFrames<TestInputComponent<string>>().Single(); 483var batch1 = renderer.Batches.Single(); 484var componentFrame1 = batch1.GetComponentFrames<TestInputComponent<string>>().Single(); 511var batch1 = renderer.Batches.Single(); 512var componentFrame1 = batch1.GetComponentFrames<TestInputComponent<string>>().Single(); 524var batch2 = renderer.Batches.Skip(1).Single(); 525Assert.Equal(inputComponentId, batch2.DiffsByComponentId.Keys.Single());
Forms\InputNumberTest.cs (2)
100var batch = _testRenderer.Batches.Single(); 101return batch.GetComponentFrames<TestInputNumberComponent>().Single().ComponentId;
Forms\InputRadioTest.cs (1)
116return FindInputRadioComponents(testRenderer.Batches.Single());
Forms\InputRenderer.cs (2)
17return FindComponent<TComponent>(testRenderer.Batches.Single()); 25.Single();
Forms\Mapping\SupplyParameterFromFormTest.cs (2)
50var formComponentState = renderer.Batches.Single() 51.GetComponentFrames<FormParametersComponentWithName>().Single()
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
309var devToolsUrlWithProxy = GetDevToolsUrlWithProxy(matchingTabs.Single());
Microsoft.AspNetCore.Components.WebView.Test (1)
StaticContentProviderTests.cs (1)
65.Single();
Microsoft.AspNetCore.DataProtection (4)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorDeserializer.cs (1)
43Secret masterKey = ((string)element.Elements("masterKey").Single()).ToSecret();
KeyManagement\XmlKeyManager.cs (1)
580var unencryptedInputToDeserializer = descriptorElement.Elements().Single().DecryptElement(_activator);
XmlEncryption\NullXmlDecryptor.cs (1)
31return new XElement(encryptedElement.Elements().Single());
XmlEncryption\XmlEncryptionExtensions.cs (1)
52var decryptedElement = decryptorInstance.Decrypt(clonedElementWhichRequiresDecryption.Elements().Single());
Microsoft.AspNetCore.DataProtection.Tests (5)
Repositories\FileSystemXmlRepositoryTests.cs (2)
76var fileInfo = fileInfos.Single(); // only one file should've been created 106var fileInfo = fileInfos.Single(); // only one file should've been created
Repositories\RegistryXmlRepositoryTests.cs (2)
64var valueName = valueNames.Single(); // only one value should've been created 95var valueName = valueNames.Single(); // only one value should've been created
XmlEncryption\XmlEncryptionExtensionsTests.cs (1)
226XmlAssert.Equal("<theElement />", retVal.Descendants().Single());
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
154.Single()
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (1)
CertificateManagerTests.cs (1)
84enhancedKeyUsage.EnhancedKeyUsages.OfType<Oid>().Single() is Oid keyUsage &&
Microsoft.AspNetCore.Diagnostics.Tests (5)
ExceptionHandlerMiddlewareTest.cs (5)
215var meter = meterFactory.Meters.Single(); 238var meter = meterFactory.Meters.Single(); 260var meter = meterFactory.Meters.Single(); 285var meter = meterFactory.Meters.Single(); 436var meter = meterFactory.Meters.Single();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (8)
JsonTranscodingServiceMethodProviderTests.cs (8)
30Assert.Equal("GET", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 46Assert.Equal("HEAD", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 61Assert.Equal("GET", getMethodModel.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 66Assert.Equal("DELETE", additionalMethodModel.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 81Assert.Equal("POST", startFrameImport.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 85Assert.Equal("POST", getFrameImport.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 157Assert.Equal("GET", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 277return endpointRouteBuilder.DataSources.Single().Endpoints;
Microsoft.AspNetCore.HeaderParsing.Tests (2)
ParserTests.cs (2)
305Assert.Equal(200, result.Ranges.Single().From); 306Assert.Equal(1000, result.Ranges.Single().To);
Microsoft.AspNetCore.Hosting.Tests (6)
GenericWebHostBuilderTests.cs (2)
64Assert.Equal("TEST_URL", server.Addresses.Single()); 88Assert.Equal("TEST_URL", server.Addresses.Single());
HostingMetricsTests.cs (3)
26var meter = meterFactory.Meters.Single(); 127var meter = meterFactory.Meters.Single(); 160var meter = meterFactory.Meters.Single();
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (1)
339var file = contents.Single();
Microsoft.AspNetCore.Http.Connections.Tests (5)
HttpConnectionDispatcherTests.cs (5)
3252var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single(); 3315var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single(); 3414var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single(); 3464var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single(); 3538var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single();
Microsoft.AspNetCore.Http.Extensions (1)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (1)
74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single();
Microsoft.AspNetCore.Http.Extensions.Tests (19)
RequestDelegateFactoryTests.cs (2)
1055httpContext.Items.Add("service", myServices.Single()); 1089httpContext.Items.Add("service", myServices.Single());
RequestDelegateGenerator\RequestDelegateCreationTests.Metadata.cs (17)
33var metadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single(); 35Assert.Equal("text/plain", metadata.ContentTypes.Single()); 49var metadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single(); 51Assert.Equal("application/json", metadata.ContentTypes.Single()); 79var metadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single(); 81Assert.Equal("text/plain", metadata.ContentTypes.Single()); 93var metadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single(); 95Assert.Equal("text/plain", metadata.ContentTypes.Single()); 107var metadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single(); 109Assert.Equal("text/plain", metadata.ContentTypes.Single()); 121var metadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single(); 123Assert.Equal("text/plain", metadata.ContentTypes.Single()); 136var metadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single(); 138Assert.Equal("application/problem+json", metadata.ContentTypes.Single()); 167var metadata = endpoint.Metadata.OfType<CustomMetadata>().Single(); 179var responseMetadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single(); 193var responseMetadata = endpoint.Metadata.OfType<IProducesResponseTypeMetadata>().Single();
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\EndpointParameter.cs (1)
478var targetConstructor = constructors.Single();
Microsoft.AspNetCore.Http.Results (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
87var range = NormalizeRange(ranges.Single(), length);
Microsoft.AspNetCore.Http.Tests (1)
RequestCookiesCollectionTests.cs (1)
71Assert.Equal(c.ToString(), cookies.Single().Value);
Microsoft.AspNetCore.HttpsPolicy.Tests (8)
HstsMiddlewareTests.cs (5)
213var message = logMessages.Single(); 268var message = logMessages.Single(); 323var message = logMessages.Single(); 370var message = logMessages.Single(); 416var message = logMessages.Single();
HttpsRedirectionMiddlewareTests.cs (3)
60var message = logMessages.Single(); 116var message = logMessages.Single(); 172var message = logMessages.Single();
Microsoft.AspNetCore.Identity.FunctionalTests (5)
ManagementTests.cs (5)
172Assert.NotNull(principals[1].Identities.Single().Claims.Single(c => c.Type == ClaimTypes.AuthenticationMethod).Value); 367var expectedPrincipalClaim = expectedPrincipal.Identities.Single().Claims.Single(c => c.Type == claimType).Value; 368var actualPrincipalClaim = actualPrincipal.Identities.Single().Claims.Single(c => c.Type == claimType).Value; 374var expectedPrincipalClaim = expectedPrincipal.Identities.Single().Claims.Single(c => c.Type == claimType).Value; 375var actualPrincipalClaim = actualPrincipal.Identities.Single().Claims.Single(c => c.Type == claimType).Value;
Microsoft.AspNetCore.InternalTesting.Tests (2)
LoggedTestXunitTests.cs (2)
140Assert.Equal(TestSink.Writes.Single(), context); 149Assert.Equal(TestSink.Scopes.Single(), context);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (52)
DefaultApiDescriptionProviderTest.cs (17)
1544var parameterDescriptor = action.Parameters.Single(); 1575var parameterDescriptor = action.Parameters.Single(); 1594var parameterDescriptor = action.Parameters.Single(); 1613var parameterDescriptor = action.Parameters.Single(); 1632var parameterDescriptor = action.Parameters.Single(); 1651var parameterDescriptor = action.Parameters.Single(); 1670var parameterDescriptor = action.Parameters.Single(); 1689var parameterDescriptor = action.Parameters.Single(); 1708var parameterDescriptor = action.Parameters.Single(); 1732var parameterDescriptor = action.Parameters.Single(); 1763var parameterDescriptor = action.Parameters.Single(); 1795var parameterDescriptor = action.Parameters.Single(); 1826var parameterDescriptor = action.Parameters.Single(); 1854var parameterDescriptor = action.Parameters.Single(); 1941var parameterDescriptor = action.Parameters.Single(); 1966var parameterDescriptor = action.Parameters.Single(); 1988var parameterDescriptor = action.Parameters.Single();
EndpointMetadataApiDescriptionProviderTest.cs (35)
838var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 863var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 888var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 914var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 964var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1001var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1035var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1048var bodyParameterDescription = parameterDescriptions.Single(); 1064var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1094var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1107var bodyParameterDescription = parameterDescriptions.Single(); 1114var defaultRequestFormat = requestFormats.Single(); 1126var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1139var bodyParameterDescription = parameterDescriptions.Single(); 1146var defaultRequestFormat = requestFormats.Single(); 1158var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1171var bodyParameterDescription = parameterDescriptions.Single(); 1178var defaultRequestFormat = requestFormats.Single(); 1190var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1199var bodyParameterDescription = parameterDescriptions.Single(); 1206var defaultRequestFormat = requestFormats.Single(); 1219var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1228var bodyParameterDescription = parameterDescriptions.Single(); 1235var defaultRequestFormat = requestFormats.Single(); 1248var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1257var bodyParameterDescription = parameterDescriptions.Single(); 1264var defaultRequestFormat = requestFormats.Single(); 1336var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1345var bodyParameterDescription = parameterDescriptions.Single(); 1351var defaultRequestFormat = requestFormats.Single(); 1365var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1405var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1434var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1465var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single(); 1499var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single();
Microsoft.AspNetCore.Mvc.Core (2)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (1)
74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single();
src\Shared\RangeHelper\RangeHelper.cs (1)
87var range = NormalizeRange(ranges.Single(), length);
Microsoft.AspNetCore.Mvc.Core.Test (44)
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (3)
81Assert.Equal("application", descriptors.Single().Properties["test"]); 107Assert.Equal("controller", descriptors.Single().Properties["test"]); 134Assert.Equal("action", descriptors.Single().Properties["test"]);
ApplicationModels\ControllerActionDescriptorProviderTests.cs (11)
326Assert.Equal(httpMethod, httpMethodAttribute.HttpMethods.Single(), ignoreCase: true); 329Assert.Equal(httpMethod, lastHttpMethodMetadata.HttpMethods.Single(), ignoreCase: true); 546a => a.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.Single() == "PUT"); 553a => a.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.Single() == "POST"); 585a => a.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.Single() == "POST"); 592a => a.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.Single() == "PUT"); 1165var parameterInfo = actionModel.ActionMethod.GetParameters().Single();
Controllers\ControllerBinderDelegateProviderTest.cs (2)
419controllerContext.ModelState["memberName"].Errors.Single().ErrorMessage); 515controllerContext.ModelState["memberName"].Errors.Single().ErrorMessage);
Formatters\SystemTextJsonInputFormatterTest.cs (2)
157var modelError = formatterContext.ModelState[modelStateKey].Errors.Single(); 179var modelError = formatterContext.ModelState["$"].Errors.Single();
Infrastructure\ControllerActionInvokerTest.cs (1)
1664ParameterInfo = method.GetParameters().Where(p => p.Name == kvp.Key).Single(),
ModelBinding\Binders\BodyModelBinderTests.cs (1)
155Assert.Equal("Customized error message", entry.Value.Errors.Single().ErrorMessage);
ModelBinding\Metadata\DefaultModelMetadataTest.cs (12)
1331var constructor = modelType.GetConstructors().Single(); 1332var parameter = constructor.GetParameters().Single(); 1375var constructor = modelType.GetConstructors().Single(); 1376var parameter = constructor.GetParameters().Single(); 1420var constructor = modelType.GetConstructors().Single(); 1421var parameter = constructor.GetParameters().Single(); 1465var constructor = modelType.GetConstructors().Single(); 1466var parameter = constructor.GetParameters().Single(); 1510var constructor = modelType.GetConstructors().Single(); 1511var parameter = constructor.GetParameters().Single(); 1555var constructor = modelType.GetConstructors().Single(); 1556var parameter = constructor.GetParameters().Single();
ModelBinding\ParameterBinderTest.cs (12)
79Assert.Equal("myParam", actionContext.ModelState.Single().Key); 82actionContext.ModelState.Single().Value.Errors.Single().ErrorMessage); 117Assert.Equal("myParam", actionContext.ModelState.Single().Key); 120actionContext.ModelState.Single().Value.Errors.Single().ErrorMessage); 255Assert.Equal("myParam", actionContext.ModelState.Single().Key); 258actionContext.ModelState.Single().Value.Errors.Single().ErrorMessage); 296Assert.Equal("myParam", actionContext.ModelState.Single().Key); 299actionContext.ModelState.Single().Value.Errors.Single().ErrorMessage);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (8)
DataAnnotationsMetadataProviderTest.cs (4)
1388var parameter = method.GetParameters().Where(p => p.Name == "defaultValueParameter").Single(); 1409var parameter = method.GetParameters().Where(p => p.Name == "nonNullableParameter").Single(); 1653var parameter = method.GetParameters().Where(p => p.Name == "nonNullableParameter").Single(); 1670var parameter = method.GetParameters().Where(p => p.Name == "nullableParameter").Single();
DataAnnotationsModelValidatorProviderTest.cs (1)
75var validatorItem = providerContext.Results.Single();
DataAnnotationsModelValidatorTest.cs (3)
178var validationResult = result.Single(); 233var validationResult = result.Single(); 390var validationResult = result.Single();
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
InputValidationTests.cs (1)
91prop => ((JArray)prop.Value).Single().Value<string>());
RoutingTestsBase.cs (4)
1077Assert.Equal("/api/Company/5", result.ExpectedUrls.Single()); 1095Assert.Equal("/api/Company/5", result.ExpectedUrls.Single()); 1117Assert.Equal("/api/Company/5/Employees", result.ExpectedUrls.Single()); 1135Assert.Equal("/api/Company/5/Departments", result.ExpectedUrls.Single());
Microsoft.AspNetCore.Mvc.IntegrationTests (8)
ActionParametersIntegrationTest.cs (5)
798var message = entry.Errors.Single().ErrorMessage; 838var message = entry.Errors.Single().ErrorMessage; 843message = entry.Errors.Single().ErrorMessage; 883var message = entry.Errors.Single().ErrorMessage; 888message = entry.Errors.Single().ErrorMessage;
BindPropertyIntegrationTest.cs (1)
295var message = testContext.ModelState[propertyName].Errors.Single().ErrorMessage;
NullableReferenceTypeIntegrationTest.cs (1)
167var parameterInfo = method.GetParameters().Single();
TryValidateModelIntegrationTest.cs (1)
170AssertErrorEquals("Property", modelStateErrors.Single().Value);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
NewtonsoftJsonInputFormatterTest.cs (3)
250var modelError = formatterContext.ModelState[modelStateKey].Errors.Single(); 305var modelError = formatterContext.ModelState[string.Empty].Errors.Single(); 338var modelError = formatterContext.ModelState[string.Empty].Errors.Single();
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
329var item = loader.LoadItems(assembly).Single();
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ExpressionHelper.cs (1)
151InsertIndexerInvocationText(builder, methodExpression.Arguments.Single(), expression);
ViewComponents\DefaultViewComponentSelector.cs (1)
88return matches.Single();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
CookieTempDataProviderTest.cs (1)
285var cookie = responseCookies.Single();
Microsoft.AspNetCore.OpenApi (3)
Extensions\ApiDescriptionExtensions.cs (1)
111bodyParameter = bodyParameters.Single();
Services\OpenApiDocumentService.cs (1)
521var description = parameter.Single();
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (1)
74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single();
Microsoft.AspNetCore.OpenApi.Tests (4)
Extensions\OpenApiRouteHandlerBuilderExtensionTests.cs (1)
198Summary = $"| Local Summary | 200 Status Response Content-Type: {operation.Responses["200"].Content.Keys.Single()}"
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (1)
59Assert.Equal("application/json+problem", response.Value.Content.Keys.Single());
Services\OpenApiDocumentServiceTestsBase.cs (1)
116var endpointDataSource = builder.DataSources.OfType<EndpointDataSource>().Single();
Transformers\SchemaTransformerTests.cs (1)
167var operation = Assert.Single(document.Paths.Values).Operations.Values.Single();
Microsoft.AspNetCore.RateLimiting.Tests (5)
RateLimitingMetricsTests.cs (5)
34var meter = meterFactory.Meters.Single(); 80var meter = meterFactory.Meters.Single(); 139var meter = meterFactory.Meters.Single(); 194var meter = meterFactory.Meters.Single(); 269var meter = meterFactory.Meters.Single();
Microsoft.AspNetCore.RequestDecompression.Tests (4)
DefaultRequestDecompressionProviderTests.cs (4)
44AssertLog(logMessages.Single(), LogLevel.Debug, 69AssertLog(logMessages.Single(), LogLevel.Trace, 96AssertLog(logMessages.Single(), 124AssertLog(logMessages.Single(), LogLevel.Debug,
Microsoft.AspNetCore.ResponseCompression.Tests (5)
ResponseCompressionMiddlewareTest.cs (5)
54AssertLog(logMessages.Single(), LogLevel.Debug, "No response compression available, the Accept-Encoding header is missing or invalid."); 121AssertLog(logMessages.Single(), LogLevel.Debug, "No response compression available, the Accept-Encoding header is missing or invalid."); 488AssertLog(logMessages.Skip(1).Single(), LogLevel.Debug, "No response compression available for HTTPS requests. See ResponseCompressionOptions.EnableForHttps."); 551AssertLog(logMessages.Skip(1).Single(), LogLevel.Debug, "No response compression available for HTTPS requests. See ResponseCompressionOptions.EnableForHttps."); 610AssertLog(logMessages.Skip(1).Single(), LogLevel.Debug, "No response compression available for HTTPS requests. See ResponseCompressionOptions.EnableForHttps.");
Microsoft.AspNetCore.Routing.Tests (11)
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (2)
420Assert.Equal("BUILDER", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 447var endpoint = ds.Endpoints.Single();
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (1)
89Assert.Equal("BUILDER", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()!.HttpMethods.Single());
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (1)
29Assert.Equal("contoso.com:8080", hostMetadata.Hosts.Single());
EndpointNameAddressSchemeTest.cs (1)
81Assert.Same(endpoint1, match.Value.Single());
Matching\HttpMethodMatcherPolicyTest.cs (2)
310Assert.Equal(Http405EndpointDisplayName, e.Endpoints.Single().DisplayName); 354Assert.Equal(Http405EndpointDisplayName, e.Endpoints.Single().DisplayName);
RoutingMetricsTests.cs (4)
36var meter = meterFactory.Meters.Single(); 70var meter = meterFactory.Meters.Single(); 97var meter = meterFactory.Meters.Single(); 121var meter = meterFactory.Meters.Single();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (10)
ResponseHeaderTests.cs (1)
133Assert.Equal("Dašta", header.Single());
ResponseTrailersTests.cs (9)
93Assert.Equal("TrailerValue", response.TrailingHeaders.GetValues("TrailerName").Single()); 112Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 140Assert.Equal(body.Length.ToString(CultureInfo.InvariantCulture), response.Content.Headers.GetValues(HeaderNames.ContentLength).Single()); 168Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 191Assert.Equal("TrailerName", response.Headers.Trailer.Single()); 194Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 217Assert.Equal("TrailerName", response.Headers.Trailer.Single()); 239Assert.Equal("TrailerValue", response.TrailingHeaders.GetValues("TrailerName").Single()); 262Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single());
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
156.Single();
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (12)
IISDeployer.cs (2)
139.Single() 254var appPool = serverManager.ApplicationPools.Single();
IISDeployerBase.cs (2)
113.Single() 128.Single()
IISDeploymentParameterExtensions.cs (6)
32.Single() 36.Single() 47.Single() 51.Single() 211var aspNetCoreElement = config.Descendants("aspNetCore").Single(); 221var aspNetCoreElement = config.Descendants("aspNetCore").Single();
WebConfigHelpers.cs (2)
16.Single() 28.Single()
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
154.Single()
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (2)
870intermedCert.Extensions.OfType<X509SubjectKeyIdentifierExtension>().Single(); 935intermediateAuthority = intermediateAuthorities.Single();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
InMemoryTransportBenchmark.cs (2)
62_connection = transportFactory.Connections.Values.Single().Single();
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
KestrelConfigurationLoaderTests.cs (1)
376var configProvider = configRoot.Providers.Single();
Microsoft.AspNetCore.Session.Tests (2)
SessionTests.cs (2)
879var sessionLogMessage = sink.Writes.Where(message => message.LoggerName.Equals(typeof(DistributedSession).FullName, StringComparison.Ordinal)).Single(); 884var sessionMiddlewareLogMessage = sink.Writes.Where(message => message.LoggerName.Equals(typeof(SessionMiddleware).FullName, StringComparison.Ordinal)).Single();
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (1)
74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single();
Microsoft.AspNetCore.SignalR.Core (2)
Internal\TypedClientBuilder.cs (1)
21private static readonly ConstructorInfo ObjectConstructor = typeof(object).GetConstructors().Single();
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (1)
74var awaiterResultType = possibleFSharpAsyncType.GetGenericArguments().Single();
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\InProcessTestServer.cs (1)
129_url = _host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single();
Microsoft.AspNetCore.StaticAssets (3)
Development\StaticAssetDevelopmentRuntimeHandler.cs (2)
32var asset = builder.Metadata.OfType<StaticAssetDescriptor>().Single(); 97var assetDescriptor = endpoint.Metadata.OfType<StaticAssetDescriptor>().Single();
src\Shared\RangeHelper\RangeHelper.cs (1)
87var range = NormalizeRange(ranges.Single(), length);
Microsoft.AspNetCore.StaticFiles (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
87var range = NormalizeRange(ranges.Single(), length);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
87var range = NormalizeRange(ranges.Single(), length);
Microsoft.AspNetCore.TestHost.Tests (4)
ClientHandlerTests.cs (2)
253Assert.Equal("Value!", kvp.Value.Single()); 258Assert.Equal("Value!", kvp.Value.Single());
TestClientTests.cs (2)
438Assert.Equal("true", response.Headers.GetValues("test-header").Single()); 485Assert.Equal("true", response.Headers.GetValues("test-header").Single());
Microsoft.AspNetCore.Testing.Tests (2)
FakeCertificateFactoryTests.cs (1)
23Assert.False(certificate.Extensions.OfType<X509EnhancedKeyUsageExtension>().Single().Critical);
FakesExtensionsTests.cs (1)
229Assert.StartsWith("https://localhost", hostMock.Object.GetListenUris().Single().AbsoluteUri);
Microsoft.Build (1)
Graph\GraphBuilder.cs (1)
264ProjectGraphEntryPoint solutionEntryPoint = entryPoints.Single();
Microsoft.Build.BuildCheck.UnitTests (1)
EditorConfig_Tests.cs (1)
890Assert.Equal("my_prop", properties.Keys.Single());
Microsoft.Build.Engine.OM.UnitTests (12)
Definition\ProjectItem_Tests.cs (4)
1999var projectItem = project.Items.Single(); 2001Assert.Same(projectItem, project.GetItemsByEvaluatedInclude(projectItem.EvaluatedInclude).Single()); 2005projectItem = project.Items.Single(); 2007Assert.Same(projectItem, project.GetItemsByEvaluatedInclude(projectItem.EvaluatedInclude).Single());
Definition\ProjectMetadata_Tests.cs (2)
494ProjectItem item = project.GetItems("None").Single(); 514metadata).Single();
Instance\ProjectInstance_Tests.cs (6)
429var projBInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "bItem.cs").Single(); 430var projAInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "aItem.cs").Single(); 471var projBInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "bItem.cs").Single(); 472var projAInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "aItem.cs").Single(); 513var projAInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "aItem.cs").Single(); 514var projBInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("CompileB", "aItem.cs").Single();
Microsoft.Build.Engine.UnitTests (10)
BackEnd\DebugUtils_tests.cs (1)
36var exceptionFile = exceptionFiles.Except(exceptionFilesBefore).Single();
BackEnd\SdkResolverService_Tests.cs (3)
355result.ItemsToAdd.Keys.Single().ShouldBe("ItemNameFromSdkResolver"); 356result.ItemsToAdd.Values.Single().ItemSpec.ShouldBe("ItemValueFromSdkResolver"); 357var metadata = result.ItemsToAdd.Values.Single().Metadata;
Construction\SolutionFilter_Tests.cs (1)
135graphFromSolution.ProjectNodes.Single().ProjectInstance.ProjectFileLocation.LocationString.ShouldBe(simpleProject.Path);
EscapingInProjects_Tests.cs (2)
834ProjectItem item = project.GetItems("None").Single(); 849}).Single();
Evaluation\SdkResultEvaluation_Tests.cs (3)
225ValidateItemFromResolver(items.Single()); 325ValidateItemFromResolver(items.Single()); 404ValidateItemFromResolver(itemsFromBody.Single());
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
600return hashAttributes.Single().Hash;
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (12)
TargetTests.cs (12)
168var item = items.Single(); 172var metadata = item.Metadata.Single(); 201var item = items.Single(); 205var metadata = item.Metadata.Single(); 230var item = items.Single(); 234var metadata = item.Metadata.Single(); 262var item = items.Single(); 304var item = items.Single(); 344var item = items.Single(); 379var item = items.Single(); 835Assert.Equal(expectedLastBuildWithSkipAnalyzers, items.Single().EvaluatedInclude); 844var item = items.Single();
Microsoft.Cci.Extensions (4)
Extensions\CSharp\CSharpCciExtensions.cs (3)
750TType[] array = new TType[argumentArray.Sizes.Single()]; 817if (attribute != null && attribute.Arguments.Single() is IMetadataCreateArray createArray) 819names = new string[createArray.Sizes.Single()];
Extensions\MemberExtensions.cs (1)
138var singleArgument = attribute.Arguments.Single() as IMetadataConstant;
Microsoft.CodeAnalysis (3)
Collections\TemporaryArrayExtensions.cs (1)
66=> new[] { 0, 0 }.Single();
CommandLine\SarifV2ErrorLogger.cs (1)
335(descriptorInfo.EffectiveSeverities.Count != 1 || descriptorInfo.EffectiveSeverities.Single() != defaultSeverity);
PEWriter\PeWriter.cs (1)
325.Single();
Microsoft.CodeAnalysis.CodeStyle (3)
src\Compilers\Core\Portable\Collections\TemporaryArrayExtensions.cs (1)
66=> new[] { 0, 0 }.Single();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
525AnalyzeDelegateInvocation(targets.Single());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
214_lazyReplacedExpression = (TExpressionSyntax)_lazySemanticRootOfReplacedExpression.GetAnnotatedNodesAndTokens(annotation).Single().AsNode()!;
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
165if (GetValueFromNameAttribute(paramNameAttributesForNode.Single()) == name)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
923referencedSymbols.Single().Locations.IsEmpty();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
56var newTokenLine = newDocument.Text.Lines.GetLineFromPosition(newRoot.GetAnnotatedTokens(annotation).Single().SpanStart);
Microsoft.CodeAnalysis.CSharp (8)
Binder\Imports.cs (1)
142expandedNamespace = expandedNamespace.GetMembers(nameParts[i]).OfType<NamespaceSymbol>().Single();
BoundTree\LengthBasedStringSwitchData.cs (1)
192? group.Single().label
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
210fileIndexOrIndicesArgument = fileIndices.Single();
Lowering\SyntheticBoundNodeFactory.cs (1)
260receiverOpt.Type.GetMembers(propertySym.Name).OfType<PropertySymbol>().Single() == propertySym);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListConstructor.cs (1)
30var field = ContainingType.GetFieldsToEmit().Single();
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
67ContainingType.GetMembersUnordered().OfType<SynthesizedRecordObjEquals>().Single(),
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
105MethodSymbol? baseEquals = ContainingType.GetMembersUnordered().OfType<SynthesizedRecordBaseEquals>().Single().OverriddenMethod;
Symbols\Synthesized\Records\SynthesizedRecordInequalityOperator.cs (1)
41F.CloseMethod(F.Block(F.Return(F.Not(F.Call(receiver: null, ContainingType.GetMembers(WellKnownMemberNames.EqualityOperatorName).OfType<SynthesizedRecordEqualityOperator>().Single(),
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
1186var expression = arguments.Single().Expression;
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
65var newInfo = speculativeModel.GetTypeInfo(dummyStatement.GetAnnotatedNodes(s_annotation).Single());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (2)
90var text = pair.Value.GetTextChanges(GetTextSpan(pair.Key)).Single().NewText ?? ""; 146var text = triviaData.GetTextChanges(GetTextSpan(pair)).Single().NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
204var newDeclarationTypeNode = newTree.GetRoot(cancellationToken).GetAnnotatedNodes(annotation).Single();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
53classOrStructKeyword = tokens.Single();
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
125varDecl.Variables.Single().Identifier.Parent!,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (1)
45newContextNode = (TContextNode)newRoot.GetAnnotatedNodes(s_annotation).Single();
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
305var tree = comp.SyntaxTrees.Single();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
587var annotatedOpenBraceToken = root.GetAnnotatedTokens(s_openBracePositionAnnotation).Single();
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (4)
47var newNodeAfterInsertion = newRoot.GetAnnotatedNodes(s_replacementNodeAnnotation).Single(); 57var nextCaretPosition = formattedNewRoot.GetAnnotatedTokens(s_openBracePositionAnnotation).Single().Span.End; 78var newNodeAfterInsertion = newRoot.GetAnnotatedNodes(s_replacementNodeAnnotation).Single(); 354var nextCaretPosition = formattedNewRoot.GetAnnotatedTokens(s_openBracePositionAnnotation).Single().Span.End;
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
317.GetAnnotatedNodesAndTokens(s_plusEqualsTokenAnnotation).Single().AsToken()
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (187)
ChangeSignature\RemoveParametersTests.cs (1)
382var textView = workspace.Documents.Single().GetTextView();
CodeActions\ApplyChangesOperationTests.cs (11)
79var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 84var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2")); 111var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 116var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2")); 143var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 148var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 174var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 179var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 206var document1 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program1")); 211var document2 = solution.Projects.Single().Documents.Single(d => d.FilePath!.Contains("Program2")); 251var action = refactorings.Single();
CodeActions\PreviewExceptionTests.cs (1)
113var action = codeActions.Single();
CodeActions\PreviewTests.cs (1)
99var action = refactorings.Single();
CodeGeneration\SyntaxGeneratorTests.cs (4)
36var document = solution.Projects.Single().Documents.Single(); 70var document = solution.Projects.Single().Documents.Single();
CommentSelection\CSharpCommentSelectionTests.cs (2)
151textView.Selection.Select(new SnapshotSpan(snapshot, spans.Single()), isReversed: false); 152textView.Caret.MoveTo(new SnapshotPoint(snapshot, spans.Single().End));
CompleteStatement\CSharpCompleteStatementCommandHandlerTests.cs (1)
4684=> workspace.ExportProvider.GetExportedValues<ICommandHandler>().OfType<CompleteStatementCommandHandler>().Single();
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (1)
43""", SourceCodeKind.Regular)).Single();
Completion\CompletionProviders\ObjectInitializerCompletionProviderTests.cs (2)
688var hostDocument = workspace.Documents.Single(); 1280var hostDocument = workspace.Documents.Single();
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (4)
3060var testDocument = workspace.Documents.Single(); 3239var origComp = await workspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None); 3244var project = workspace.CurrentSolution.Projects.Single(); 3265var textBuffer = workspace.Documents.Single().GetTextBuffer();
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
92var normalizedWindowsPath = Directory.GetDirectories(windowsRoot, windowsDir.Name).Single();
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (1)
373var testDocument = workspace.Documents.Single();
Completion\CompletionServiceTests.cs (2)
212var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
Debugging\DataTipInfoGetterTests.cs (2)
48var testHostDocument = workspace.Documents.Single(); 51? testHostDocument.SelectedSpans.Single()
Debugging\LocationInfoGetterTests.cs (3)
26var testDocument = workspace.Documents.Single(); 29workspace.CurrentSolution.Projects.Single().Documents.Single(),
Debugging\ProximityExpressionsGetterTests.cs (1)
72var testDocument = workspace.Documents.Single();
DecompiledSource\DecompiledSourceFormattingTests.cs (2)
256var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (18)
63var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); 92var ideEngineDocument = ideEngineWorkspace.CurrentSolution.Projects.Single().Documents.Single(); 105var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result; 137analyzer.ThrowOn(typeof(DiagnosticAnalyzer).GetProperties().Single().Name); 145analyzer.ThrowOn(typeof(DiagnosticAnalyzer).GetProperties().Single().Name); 164var additionalDocId = DocumentId.CreateNewId(workspace.CurrentSolution.Projects.Single().Id); 174var sourceDocument = workspace.CurrentSolution.Projects.Single().Documents.Single(); 204var ideEngineDocument = workspace.CurrentSolution.Projects.Single().Documents.Single(); 260var ideEngineDocument = ideEngineWorkspace.CurrentSolution.Projects.Single().Documents.Single(); 279var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result; 338var compilerEngineCompilation = (CSharpCompilation)(await compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None)); 786var project = workspace.CurrentSolution.Projects.Single(); 804var document = project.Documents.Single();
EditAndContinue\ActiveStatementTrackingServiceTests.cs (1)
64var project = solution.Projects.Single();
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (2)
54var documentId = solution.Projects.Single().State.AnalyzerConfigDocumentStates.Ids.First(); 364var editorconfig = solution.Projects.SelectMany(p => p.AnalyzerConfigDocuments.Where(a => a.FilePath == EditorconfigPath)).Single();
EncapsulateField\EncapsulateFieldCommandHandlerTests.cs (1)
209var textView = workspace.Documents.Single().GetTextView();
ExtractInterface\ExtractInterfaceTests.cs (1)
1456var textView = workspace.Documents.Single().GetTextView();
ExtractMethod\ExtractMethodBase.cs (6)
38var textSpan = testDocument.SelectedSpans.Single(); 48var testDocument = workspace.Documents.Single(); 70var testDocument = workspace.Documents.Single(); 82var testDocument = workspace.Documents.Single(); 128var validator = new CSharpSelectionValidator(semanticDocument, testDocument.SelectedSpans.Single(), localFunction: false); 164var testDocument = workspace.Documents.Single();
ExtractMethod\ExtractMethodTests.cs (1)
11241var textView = workspace.Documents.Single().GetTextView();
ExtractMethod\MiscTests.cs (1)
130var testDocument = workspace.Documents.Single();
FixInterpolatedVerbatimString\FixInterpolatedVerbatimStringCommandHandlerTests.cs (6)
28var document = workspace.Documents.Single(); 30view.SetSelection(document.SelectedSpans.Single().ToSnapshotSpan(view.TextBuffer.CurrentSnapshot)); 36var view = workspace.Documents.Single().GetTextView(); 62var view = workspace.Documents.Single().GetTextView(); 80var originalView = workspace.Documents.Single().GetTextView(); 85var view = workspace.Documents.Single().GetTextView();
Formatting\CodeCleanupTests.cs (4)
792var project = workspace.CurrentSolution.Projects.Single(); 811var hostdoc = workspace.Documents.Single(); 828var hostdoc = workspace.Documents.Single(); 910var hostdoc = workspace.Documents.Single();
Formatting\FormattingEngineTests.cs (4)
437var subjectDocument = workspace.Documents.Single(); 440var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); 2917var subjectDocument = workspace.Documents.Single();
Formatting\Indentation\SmartIndenterTests.cs (2)
3460var subjectDocument = workspace.Documents.Single(); 3467provider.TextSpan = subjectDocument.SelectedSpans.Single();
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (2)
3374var subjectDocument = workspace.Documents.Single(); 3408var testDocument = workspace.Documents.Single();
Interactive\NavigateTo\InteractiveNavigateToTests.cs (17)
96var item = (await _aggregator.GetItemsAsync("Method")).Single(); 135var item = (await _aggregator.GetItemsAsync("Bar")).Single(); 250var item = (await _aggregator.GetItemsAsync("R")).Single(); 267var item = (await _aggregator.GetItemsAsync("ba")).Single(); 284var item = (await _aggregator.GetItemsAsync("string")).Single(); 296var item = (await _aggregator.GetItemsAsync("this")).Single(); 308var item = (await _aggregator.GetItemsAsync("CEH")).Single(); 325var item = (await _aggregator.GetItemsAsync("B")).Single(); 342var item = (await _aggregator.GetItemsAsync("DS")).Single(); 361var item = (await _aggregator.GetItemsAsync("DS")).Single(); 450var item = (await _aggregator.GetItemsAsync("Bar")).Single(); 496var item = (await _aggregator.GetItemsAsync("IG")).Single(); 532var item = (await _aggregator.GetItemsAsync("sqr")).Single(); 620var descriptionItem = descriptionItems.Single(i => i.Category.Single().Text == label); 621Assert.Equal(value, descriptionItem.Details.Single().Text); 624assertDescription("File:", w.Documents.Single().Name); 703var item = (await _aggregator.GetItemsAsync("G_K_W")).Single();
MoveToNamespace\MoveToNamespaceTests.cs (1)
1413var testDocument = workspace.Projects.Single(p => p.Name == "Proj1").Documents.Single();
NavigateTo\NavigateToTests.cs (36)
184var item = (await _aggregator.GetItemsAsync("Method")).Single(); 221var item = (await _aggregator.GetItemsAsync("Bar")).Single(); 330var item = (await _aggregator.GetItemsAsync("R")).Single(); 346var item = (await _aggregator.GetItemsAsync("b")).Single(); 362var item = (await _aggregator.GetItemsAsync("ba")).Single(); 393var item = (await _aggregator.GetItemsAsync("string")).Single(); 397item = (await _aggregator.GetItemsAsync("@string")).Single(); 428var item = (await _aggregator.GetItemsAsync("b")).Single(); 444var item = (await _aggregator.GetItemsAsync("ba")).Single(); 455var item = (await _aggregator.GetItemsAsync("this")).Single(); 466var item = (await _aggregator.GetItemsAsync("CEH")).Single(); 482var item = (await _aggregator.GetItemsAsync("B")).Single(); 498var item = (await _aggregator.GetItemsAsync("DS")).Single(); 514var item = (await _aggregator.GetItemsAsync("static")).Single(); 518item = (await _aggregator.GetItemsAsync("@static")).Single(); 536var item = (await _aggregator.GetItemsAsync("DS")).Single(); 634var item = (await _aggregator.GetItemsAsync("Bar")).Single(); 652var item = (await _aggregator.GetItemsAsync("Bar")).Single(); 696var item = (await _aggregator.GetItemsAsync("IG")).Single(); 711var item = (await _aggregator.GetItemsAsync("Goo")).Single(); 726var item = (await _aggregator.GetItemsAsync("Goo")).Single(); 741var item = (await _aggregator.GetItemsAsync("Goo")).Single(); 759var item = (await _aggregator.GetItemsAsync("Bar")).Single(); 783var item = (await _aggregator.GetItemsAsync("Goo")).Single(); 807var item = (await _aggregator.GetItemsAsync("Bar")).Single(); 841var item = (await _aggregator.GetItemsAsync("sqr")).Single(); 857var item = (await _aggregator.GetItemsAsync("itemArray")).Single(); 908var item = (await _aggregator.GetItemsAsync("M")).Single(); 964var item = (await _aggregator.GetItemsAsync("M")).Single(); 1010var descriptionItem = descriptionItems.Single(i => i.Category.Single().Text == label); 1011Assert.Equal(value, descriptionItem.Details.Single().Text); 1014assertDescription("File:", w.Documents.Single().Name); 1088var item = (await _aggregator.GetItemsAsync("G_K_W")).Single(); 1351var item = (await _aggregator.GetItemsAsync("ToEror")).Single(); 1370var item = (await _aggregator.GetItemsAsync("ToError")).Single(); 1660var item = (await _aggregator.GetItemsAsync("Method")).Single();
Organizing\OrganizeTypeDeclarationTests.cs (1)
1182var textView = workspace.Documents.Single().GetTextView();
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
172var provider = workspace.ExportProvider.GetExportedValues<IMetadataAsSourceFileProvider>().OfType<PdbSourceDocumentMetadataAsSourceFileProvider>().Single();
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (1)
215var testDocument = workspace.Documents.Single();
QuickInfo\SyntacticQuickInfoSourceTests.cs (1)
602var testDocument = workspace.Documents.Single();
Rename\CSharpInlineRenameServiceTests.cs (1)
63var documentId = workspace.Documents.Single().Id;
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
61var document = workspace.Documents.Single();
SymbolKey\SymbolKeyCompilationsTests.cs (9)
130var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 157var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 185var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 229var indexer1 = type.GetMembers().Where(m => m.MetadataName == "I.Item").Single() as IPropertySymbol; 230var indexer2 = type.GetMembers().Where(m => m.MetadataName == "I<T>.Item").Single() as IPropertySymbol; 463var namespace1 = comp1.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 466var namespace2 = comp2.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 571var namespace1 = comp1.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol; 574var namespace2 = comp2.SourceModule.GlobalNamespace.GetMembers("NS").Single() as INamespaceSymbol;
SymbolKey\SymbolKeyTests.cs (9)
44var project = solution.Projects.Single(); 47var type = compilation.GlobalNamespace.GetMembers("C1").Single(); 79var project = solution.Projects.Single(); 118var project = solution.Projects.Single(); 122var type = compilation.GlobalNamespace.GetMembers("C").Single().GetMembers("Inner").Single(); 164var project = solution.Projects.Single(); 169var method = type.GetMembers("GetValue").OfType<IMethodSymbol>().Single(); 292var tree = bodyCompilation.SyntaxTrees.Single(); 296var varDecl = root.DescendantNodesAndSelf().OfType<VariableDeclaratorSyntax>().Single();
Workspaces\WorkspaceTests_EditorFeatures.cs (20)
394Assert.Empty(workspace.CurrentSolution.Projects.Single().Documents); 415var classC = compilation.SourceModule.GlobalNamespace.GetMembers("C").Single(); 705var doc = solution.Projects.Single().Documents.First(); 862var document = workspace.Documents.Single(); 1053var project = workspace.CurrentSolution.Projects.Single(); 1077var project = workspace.CurrentSolution.Projects.Single(); 1109var project = workspace.CurrentSolution.Projects.Single(); 1142var project = workspace.CurrentSolution.Projects.Single(); 1178Assert.Equal(additionalDoc.Id, openDocumentIds.Single()); 1207Assert.Equal(analyzerConfigDoc.Id, openDocumentIds.Single()); 1232var project = workspace.CurrentSolution.Projects.Single(); 1255Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1268var project = workspace.CurrentSolution.Projects.Single(); 1291Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1306var project = workspace.CurrentSolution.Projects.Single(); 1316project = workspace.CurrentSolution.Projects.Single(); 1321Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1334var project = workspace.CurrentSolution.Projects.Single(); 1344project = workspace.CurrentSolution.Projects.Single(); 1349Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (159)
CodeGen\CodeGenAsyncMainTests.cs (1)
721var main = metadataReader.MethodDefinitions.Where(mh => getMethodName(mh) == "<Main>").Single();
CodeGen\CodeGenAwaitForeachTests.cs (31)
936var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 1661var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 1721var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 1865var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 1902var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 1942var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 1979var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 2013var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 2969var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3034var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3119var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3237var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3292var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3350var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3546var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3594var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3715var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 4239var loop = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 4462var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 4536var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 4646var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachVariableStatementSyntax>().Single(); 4745var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachVariableStatementSyntax>().Single(); 5049var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 5130var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 5356var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 6439var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9107var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9183var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9261var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9322var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9393var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachVariableStatementSyntax>().Single();
CodeGen\CodeGenCheckedTests.cs (3)
2915var xNode = tree.GetRoot().DescendantNodes().OfType<CheckedExpressionSyntax>().Single().Expression; 2922var checkedNode = tree.GetRoot().DescendantNodes().OfType<CheckedExpressionSyntax>().Single(); 2947var xNode = tree.GetRoot().DescendantNodes().OfType<CheckedExpressionSyntax>().Single().Expression;
CodeGen\CodeGenDeconstructTests.cs (13)
101var right = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 1111var deconstruction = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 1469var xy = nodes.OfType<TupleExpressionSyntax>().Single(); 1474var ab = nodes.OfType<DeclarationExpressionSyntax>().Single(); 3635return tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == name).Single(); 3650return GetReferences(tree, name).Single(); 4042var deconstructionForeach = tree.GetRoot().DescendantNodes().OfType<ForEachVariableStatementSyntax>().Single(); 4405var collection = tree.GetRoot().DescendantNodes().OfType<ForEachVariableStatementSyntax>().Single().Expression; 5472var firstX1 = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "x1").Single(); 8358var node = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Single(); 8584var tree = compilation.SyntaxTrees.Single(); 8585var node = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Single(); 8628var tree = compilation.SyntaxTrees.Single();
CodeGen\CodeGenForEachTests.cs (1)
1758var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single();
CodeGen\CodeGenFunctionPointersTests.cs (12)
3114var addressOf = syntaxTree.GetRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 3410var declarator = syntaxTree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 3457var declarator = syntaxTree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 4115var variableDeclaratorSyntax = syntaxTree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 4922.Single(), 7415var lambda = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 7573var functionPointerSyntax = tree.GetRoot().DescendantNodes().OfType<FunctionPointerTypeSyntax>().Single(); 7593functionPointerSyntax = tree.GetRoot().DescendantNodes().OfType<FunctionPointerTypeSyntax>().Single(); 7642var functionPointerSyntax = tree.GetRoot().DescendantNodes().OfType<FunctionPointerTypeSyntax>().Single(); 7662functionPointerSyntax = tree.GetRoot().DescendantNodes().OfType<FunctionPointerTypeSyntax>().Single(); 7729var functionPointerSyntax = tree.GetRoot().DescendantNodes().OfType<FunctionPointerTypeSyntax>().Single(); 7747functionPointerSyntax = tree.GetRoot().DescendantNodes().OfType<FunctionPointerTypeSyntax>().Single();
CodeGen\CodeGenLocalFunctionTests.cs (9)
146var localFunction = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 147var creation = localFunction.DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 5246var attrs3 = localFn3.GetParameters().Single().GetAttributes(); 5745var syntaxTree = comp.SyntaxTrees.Single(); 5749.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single()) 5820var syntaxTree = comp.SyntaxTrees.Single(); 5824.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single()) 5895var syntaxTree = comp.SyntaxTrees.Single(); 6162var localFunctionSyntax = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single();
CodeGen\CodeGenOperators.cs (4)
5406var tree = result.Compilation.SyntaxTrees.Single(); 5409ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single())); 5699ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single())); 5735ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single()));
CodeGen\CodeGenRefLocalTests.cs (3)
4036var refVar = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single(); 4073var refVar = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single(); 4107var refInt = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single();
CodeGen\CodeGenTupleEqualityTests.cs (10)
713var equals = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 769var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 854var equals = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 902var equals = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 951var equals = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 3278var comparison = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 3684var comparison = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 3808var comparison = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 3911var comparison = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 4036var comparison = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single();
CodeGen\CodeGenTupleTest.cs (62)
1610var node = nodes.OfType<TupleExpressionSyntax>().Single(); 3466var node = nodes.OfType<TupleExpressionSyntax>().Single(); 3637var node = nodes.OfType<TupleExpressionSyntax>().Single(); 4024var result = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "result").Single(); 6311INamedTypeSymbol vbType = (INamedTypeSymbol)vbComp.GlobalNamespace.GetMembers("C").Single(); 6328var vbType = (ITypeSymbol)vbComp.GlobalNamespace.GetMembers("C").Single(); 6581ITypeSymbol vbType = (ITypeSymbol)vbComp.GlobalNamespace.GetMembers("C").Single(); 8292var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8331var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8378var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8407var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8436var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8484var node = nodes.OfType<ParenthesizedExpressionSyntax>().Single().Parent; 8491node = nodes.OfType<ParenthesizedExpressionSyntax>().Single(); 8518var node = nodes.OfType<ParenthesizedExpressionSyntax>().Single().Parent; 8525node = nodes.OfType<ParenthesizedExpressionSyntax>().Single(); 8551var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8580var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8627var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8662var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8691var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8720var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8758var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8805var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8843var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8894var node = nodes.OfType<TupleExpressionSyntax>().Single(); 8941var node = nodes.OfType<TupleExpressionSyntax>().Single(); 9014var node = nodes.OfType<TupleExpressionSyntax>().Single(); 9071var node = nodes.OfType<TupleExpressionSyntax>().Single(); 12695var m1Tuple = model.LookupSymbols(node.SpanStart, name: "v1").OfType<ILocalSymbol>().Single().Type.GetSymbol<NamedTypeSymbol>(); 12696var m2Tuple = model.LookupSymbols(node.SpanStart, name: "v2").OfType<ILocalSymbol>().Single().Type.GetSymbol<NamedTypeSymbol>(); 12697var m6Tuple = model.LookupSymbols(node.SpanStart, name: "v6").OfType<ILocalSymbol>().Single().Type.GetSymbol<NamedTypeSymbol>(); 13974var nameofNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "nameof").Single(); 13975var nameofArg = ((InvocationExpressionSyntax)nameofNode.Parent).ArgumentList.Arguments.Single().Expression; 14245var m1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M1").Single(); 14261var m2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M2").Single(); 14306var m3 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M3").Single(); 14324var m4 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M4").Single(); 14331var m5 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M5").Single(); 14338var m6 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M6").Single(); 14430var tree = comp.SyntaxTrees.Single(); 14433var e1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "E1").Single(); 14447var m5 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "M5").Single(); 14454var v1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "v1").Single(); 14464var v2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "v2").Single(); 16540var node = nodes.OfType<TupleExpressionSyntax>().Single(); 17240var n5 = nodes.OfType<LambdaExpressionSyntax>().Single(); 17301var n5 = nodes.OfType<LambdaExpressionSyntax>().Single(); 17436var x1 = nodes.OfType<VariableDeclaratorSyntax>().Single(); 24196var type = tree.GetRoot().DescendantNodes().OfType<TupleTypeSyntax>().Single(); 24269var xSymbol = model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single()); 24332var xSymbol = model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single()); 25703var tuple = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 25774var tuple = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 25839var tuple = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 25911var tuple = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 26224var node = nodes.OfType<TupleExpressionSyntax>().Single(); 26295var doSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 26328var doSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 26361var doSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 26394var doSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 27567var literal = tree.GetRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single();
CodeGen\DestructorTests.cs (1)
800Single();
CodeGen\ForeachTest.cs (1)
1687var decl = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single();
CodeGen\ObjectAndCollectionInitializerTests.cs (2)
1105var tree = comp.SyntaxTrees.Single(); 3589var node = tree.GetRoot().DescendantNodes().OfType<Syntax.ObjectCreationExpressionSyntax>().Single();
Emit\CompilationEmitTests.cs (6)
4019var module = assembly.Modules.Single(); 4055var module = assembly.Modules.Single(); 4085var module = assembly.Modules.Single(); 4116var module = assembly.Modules.Single(); 4147var module = assembly.Modules.Single(); 4178var module = assembly.Modules.Single();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
CodeGen\IndexAndRangeTests.cs (1)
624var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single();
Emit\EditAndContinue\EditAndContinueTests.cs (2)
6182var newTypeDefHandle = reader.TypeDefinitions.Single(); 6188var attribute = reader.GetCustomAttribute(reader.CustomAttributes.Single());
Emit\NumericIntPtrTests.cs (3)
6009var expr = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 6245var expr = tree.GetRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 8126var expr = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2768)
Attributes\AttributeTests.cs (3)
813var interpolationSyntax = root.DescendantNodes().OfType<InterpolationSyntax>().Single(); 7578var attrArgSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AttributeArgumentSyntax>().Single(); 11645var thirdArgument = tree.GetRoot().DescendantNodes().OfType<AttributeArgumentSyntax>().Skip(2).Single();
Attributes\AttributeTests_Dynamic.cs (1)
529var dynamicAttribute = synthesizedDynamicAttributes.Single();
Attributes\AttributeTests_NativeInteger.cs (1)
792var interfaceImpl = reader.GetInterfaceImplementation(typeDef.GetInterfaceImplementations().Single());
Attributes\AttributeTests_Nullable.cs (5)
1135var interfaceImpl = reader.GetInterfaceImplementation(typeDef.GetInterfaceImplementations().Single()); 1138interfaceImpl = reader.GetInterfaceImplementation(typeDef.GetInterfaceImplementations().Single()); 1186var interfaceImpl = reader.GetInterfaceImplementation(typeDef.GetInterfaceImplementations().Single()); 1190interfaceImpl = reader.GetInterfaceImplementation(typeDef.GetInterfaceImplementations().Single()); 4861var interfaceImpl = reader.GetInterfaceImplementation(typeDef.GetInterfaceImplementations().Single());
Attributes\AttributeTests_Synthesized.cs (3)
127var pid = (NamedTypeSymbol)comp.GlobalNamespace.GetMembers().Where(s => s.Name.StartsWith("<PrivateImplementationDetails>", StringComparison.Ordinal)).Single(); 148var s = (NamedTypeSymbol)comp.GlobalNamespace.GetMembers("S").Single(); 149var bufferType = (NamedTypeSymbol)s.GetMembers().Where(t => t.Name == "<C>e__FixedBuffer").Single();
Attributes\AttributeTests_Tuples.cs (4)
627var tupleAttr = synthesizedTupleElementNamesAttr.Single(); 878var attr = reader.GetCustomAttribute(attributes.Single()); 971var interfaceImpl = reader.GetInterfaceImplementation(interfaceImpls.Single()); 975var attr = reader.GetCustomAttribute(attributes.Single());
Attributes\AttributeTests_WellKnownAttributes.cs (4)
5765var tree = compilation.SyntaxTrees.Single(); 5768var localFunctionSyntax = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 9550var syntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 9599var syntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
Diagnostics\DiagnosticAnalyzerTests.cs (3)
3682var field1 = tree1.GetRoot().DescendantNodes().OfType<FieldDeclarationSyntax>().Single().Declaration.Variables.Single().Identifier; 4152var baseListNode = root.DescendantNodes().OfType<BaseListSyntax>().Single();
Diagnostics\GetDiagnosticsTests.cs (2)
522Assert.False(effectiveDiagnostics.Single().IsSuppressed); 606ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions),
FieldKeywordTests.cs (4)
10490var previousAccessor = tree.GetRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single(); 10493var modifiedAccessor = modifiedTree.GetRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single(); 10495var expr = modifiedAccessor.DescendantNodes().OfType<FieldExpressionSyntax>().Single(); 10529var expr = modifiedAccessor.DescendantNodes().OfType<FieldExpressionSyntax>().Single();
FirstClassSpanTests.cs (1)
2823var arg = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression;
FlowAnalysis\FlowTests.cs (1)
5842var property = declarations.Select(d => model.GetDeclaredSymbol(d)).Where(p => p.ContainingSymbol.Name == "Program").Single();
FlowAnalysis\IterationJumpYieldStatementTests.cs (1)
914var foreachNode = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single();
FlowAnalysis\RegionAnalysisTests.cs (13)
2537var fieldDataFlowAnalysis = dataFlowAnalysisResults.Skip(1).Single(); 4526var stmt1 = tree.GetCompilationUnitRoot().DescendantNodesAndSelf().OfType<StatementSyntax>().Where(n => n.ToString() == "IntPtr p;").Single(); 5536var node = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 5580var node = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 5619var tree = comp.SyntaxTrees.Single(); 5623var node = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 6217var invocation = tree.GetCompilationUnitRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 6228var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 7909var stmt = tree.GetCompilationUnitRoot().DescendantNodesAndSelf().OfType<ForEachStatementSyntax>().Single().Statement; 8099var expr = tree.GetRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 8127var expr = tree.GetRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 14121var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 14144var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single();
OverloadResolutionPriorityTests.cs (3)
444var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 700var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 808var creation = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single();
RefReadonlyParameterTests.cs (5)
1525var local = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 7102var docComment = tree.GetCompilationUnitRoot().DescendantTrivia().Select(trivia => trivia.GetStructure()).OfType<DocumentationCommentTriviaSyntax>().Single(); 7103var cref = docComment.DescendantNodes().OfType<XmlCrefAttributeSyntax>().Select(attr => attr.Cref).Single(); 7130var docComment = tree.GetCompilationUnitRoot().DescendantTrivia().Select(trivia => trivia.GetStructure()).OfType<DocumentationCommentTriviaSyntax>().Single(); 7131var cref = docComment.DescendantNodes().OfType<XmlCrefAttributeSyntax>().Select(attr => attr.Cref).Single();
RefStructInterfacesTests.cs (107)
6628var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 6765var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 6881var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 7013var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 7142var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 7472var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 7575var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 7662var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 7765var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 7881var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 8075var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 8175var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 8268var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 8368var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 8441var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 8443var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 8547var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 8647var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 8931var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 9018var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9135var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 9222var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9331var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 9386var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9499var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 9586var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9714var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 9810var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 9935var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 10019var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 10150var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 10246var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 10347var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 10349var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 10442var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 10444var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 10542var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 10629var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 10739var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 10826var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 10979var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 11198var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 11294var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 11422var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 11506var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 11606var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 11701var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 12148var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 12416var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 12661var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 12924var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 13191var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 13453var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 14151var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 14258var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 14492var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 14599var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 14854var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 15205var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 15309var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 15553var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 15657var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 15732var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 15734var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 15987var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 16095var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 16758var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 16760var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 16823var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 16825var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 16888var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 16890var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 16972var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 16974var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 17060var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17062var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 17153var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17155var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 17250var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17252var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 17334var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17336var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 17655var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17762var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 17852var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 17959var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 18075var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 18275var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 18379var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 18476var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 18580var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 18652var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 18654var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 18760var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 18864var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 19128var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 19199var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 19299var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 19370var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 19472var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 19527var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 19624var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Main").Single(); 19695var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 19863var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 19966var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test").Single(); 19968var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 21238var lambda = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single();
Semantics\CollectionExpressionTests.cs (9)
14383var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 28840var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 28912var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 29202var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 32304var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 32310var element = collection.Elements.Single(); 32399var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 32441var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 32486var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Single();
Semantics\InlineArrayTests.cs (8)
2359var c = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "c").Single(); 2394var c = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "c").Single(); 2428var c = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "c").Single(); 8835var m3 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "M3").Single().Parent; 9203var m3 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "M3").Single(); 18583var f = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single().Expression; 18909var f = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single().Expression; 19246var collection = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single().Expression;
Semantics\OutVarTests.cs (1225)
821return GetReferences(tree, name).Single(); 844return GetDeclarations(tree, name).Single(); 849return GetOutVarDeclarations(tree, name).Single(); 2952var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 3204var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 3205var x3Ref = GetReferences(tree, "x3").Single(); 3208var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 3209var x4Ref = GetReferences(tree, "x4").Single(); 3213var x5Ref = GetReferences(tree, "x5").Single(); 3225var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 3306var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 3307var x3Ref = GetReferences(tree, "x3").Single(); 3310var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 3311var x4Ref = GetReferences(tree, "x4").Single(); 3315var x5Ref = GetReferences(tree, "x5").Single(); 3327var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 3464bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, initializer, out model); 3505bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, initializer, out model); 3646var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 3649var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 3650var x4Ref = GetReferences(tree, "x4").Single(); 3655var x5Ref = GetReferences(tree, "x5").Single(); 3660var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 3661var x6Ref = GetReferences(tree, "x6").Single(); 3664var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 3665var x7Ref = GetReferences(tree, "x7").Single(); 3668var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 3669var x8Ref = GetReferences(tree, "x8").Single(); 3672var x9Decl = GetOutVarDeclarations(tree, "x9").Single(); 3673var x9Ref = GetReferences(tree, "x9").Single(); 3867var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 3872var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 3877var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 3883var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 3888var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 3894var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 3912var y12Ref = GetReferences(tree, "y12").Single(); 3964var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 3965var x1Ref = GetReferences(tree, "x1").Single(); 4004bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 4009var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 4276var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 4277var x3Ref = GetReferences(tree, "x3").Single(); 4280var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 4281var x4Ref = GetReferences(tree, "x4").Single(); 4285var x5Ref = GetReferences(tree, "x5").Single(); 4297var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 4304var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 4305var x11Ref = GetReferences(tree, "x11").Single(); 4501var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 4502var x3Ref = GetReferences(tree, "x3").Single(); 4506var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 4507var x4Ref = GetReferences(tree, "x4").Single(); 4511var x5Ref = GetReferences(tree, "x5").Single(); 4523var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 4530var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 4536var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 4542var x13Decl = GetOutVarDeclarations(tree, "x13").Single(); 4543var x13Ref = GetReferences(tree, "x13").Single(); 4678var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 4679var x3Ref = GetReferences(tree, "x3").Single(); 4682var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 4683var x4Ref = GetReferences(tree, "x4").Single(); 4687var x5Ref = GetReferences(tree, "x5").Single(); 4699var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 4706var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 4707var x11Ref = GetReferences(tree, "x11").Single(); 4927var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 4928var x2Ref = GetReferences(tree, "x2").Single(); 4931var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 4932var x3Ref = GetReferences(tree, "x3").Single(); 4935var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 4942var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 4957var x9Decl = GetOutVarDeclarations(tree, "x9").Single(); 4958var x9Ref = GetReferences(tree, "x9").Single(); 4961var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 4962var x10Ref = GetReferences(tree, "x10").Single(); 4965var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 4970var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 5110bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 5115var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 5183var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 5184var x3Ref = GetReferences(tree, "x3").Single(); 5187var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 5188var x4Ref = GetReferences(tree, "x4").Single(); 5192var x5Ref = GetReferences(tree, "x5").Single(); 5204var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 5211var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 5216var x9Decl = GetOutVarDeclarations(tree, "x9").Single(); 5286var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 5287var x3Ref = GetReferences(tree, "x3").Single(); 5290var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 5291var x4Ref = GetReferences(tree, "x4").Single(); 5295var x5Ref = GetReferences(tree, "x5").Single(); 5307var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 5413var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 5414var x3Ref = GetReferences(tree, "x3").Single(); 5417var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 5418var x4Ref = GetReferences(tree, "x4").Single(); 5422var x5Ref = GetReferences(tree, "x5").Single(); 5434var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 5515var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 5516var x3Ref = GetReferences(tree, "x3").Single(); 5519var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 5520var x4Ref = GetReferences(tree, "x4").Single(); 5523var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 5532var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 5533var x6Ref = GetReferences(tree, "x6").Single(); 5579var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 5580var x1Ref = GetReferences(tree, "x1").Single(); 5583var node = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 5711var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 5712var x1Ref = GetReferences(tree, "x1").Single(); 5912var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 5917var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 5922var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 5928var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 5933var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 5939var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 5957var y12Ref = GetReferences(tree, "y12").Single(); 6053var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 6060var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 6065var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 6330var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 6335var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 6340var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 6346var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 6351var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 6357var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 6375var y12Ref = GetReferences(tree, "y12").Single(); 6565var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 6570var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 6575var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 6581var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 6586var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 6592var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 6610var y12Ref = GetReferences(tree, "y12").Single(); 6821var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 6827var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 6833var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 6840var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 6846var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 6852var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 6873var y12Ref = GetReferences(tree, "y12").Single(); 7067var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 7072var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 7077var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 7083var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 7088var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 7094var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 7112var y12Ref = GetReferences(tree, "y12").Single(); 7305var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 7310var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 7315var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 7321var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 7326var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 7332var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 7350var y12Ref = GetReferences(tree, "y12").Single(); 7627var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 7628var x1Ref = GetReferences(tree, "x1").Single(); 7632var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 7633var x2Ref = GetReferences(tree, "x2").Single(); 7636var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 7637var x3Ref = GetReferences(tree, "x3").Single(); 7640var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 7641var x4Ref = GetReferences(tree, "x4").Single(); 7645var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 7646var x5Ref = GetReferences(tree, "x5").Single(); 7649var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 7650var x6Ref = GetReferences(tree, "x6").Single(); 7653var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 7654var x7Ref = GetReferences(tree, "x7").Single(); 7719var x15Decl = GetOutVarDeclarations(tree, "x15").Single(); 7776var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 7836var x0Decl = GetOutVarDeclarations(tree, "x0").Single(); 7841var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 7846var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 7898var x0Decl = GetOutVarDeclarations(tree, "x0").Single(); 7903var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 7908var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 8390var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 8395var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 8400var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 8406var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 8411var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 8417var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 8435var y12Ref = GetReferences(tree, "y12").Single(); 8445var x15Decl = GetOutVarDeclarations(tree, "x15").Single(); 8490var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 8662var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 8667var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 8672var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 8678var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 8685var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 8686var x5Ref = GetReferences(tree, "x5").Single(); 8689var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 8694var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 8700var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 8717var y12Ref = GetReferences(tree, "y12").Single(); 8764var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 8765var x1Ref = GetReferences(tree, "x1").Single(); 8804bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 8809var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9164var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 9165var x3Ref = GetReferences(tree, "x3").Single(); 9168var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 9169var x4Ref = GetReferences(tree, "x4").Single(); 9173var x5Ref = GetReferences(tree, "x5").Single(); 9185var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 9194var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 9213var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 9220var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 9266var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9267var x1Ref = GetReferences(tree, "x1").Single(); 9337var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9338var x1Ref = GetReferences(tree, "x1").Single(); 9341var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 9348var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 9349var x6Ref = GetReferences(tree, "x6").Single(); 9352var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 9358var x14Ref = GetReferences(tree, "x14").Single(); 9430var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9431var x1Ref = GetReferences(tree, "x1").Single(); 9434var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 9441var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 9442var x6Ref = GetReferences(tree, "x6").Single(); 9445var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 9451var x14Ref = GetReferences(tree, "x14").Single(); 9510var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9517var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 9586var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9598var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 9603var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 9643bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 9648var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9696var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9702var d = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "d").Single(); 9893var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9894var x1Ref = GetReferences(tree, "x1").Single(); 9897var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 9904var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 9905var x6Ref = GetReferences(tree, "x6").Single(); 9908var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 9914var x14Ref = GetReferences(tree, "x14").Single(); 9988var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 9989var x1Ref = GetReferences(tree, "x1").Single(); 9992var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 9999var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 10000var x6Ref = GetReferences(tree, "x6").Single(); 10003var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 10009var x14Ref = GetReferences(tree, "x14").Single(); 10070var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 10077var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 10151var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 10166var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 10171var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 10211bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 10216var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 10263var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 10269var d = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(id => id.Identifier.ValueText == "d").Single(); 10723var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 10728var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 10733var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 10741var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 10746var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 10752var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 10769var y12Ref = GetReferences(tree, "y12").Single(); 10820var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 10821var x1Ref = GetReferences(tree, "x1").Single(); 10860bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 10865var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 11049var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 11050var x3Ref = GetReferences(tree, "x3").Single(); 11053var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 11054var x4Ref = GetReferences(tree, "x4").Single(); 11058var x5Ref = GetReferences(tree, "x5").Single(); 11070var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 11186var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 11187var x3Ref = GetReferences(tree, "x3").Single(); 11190var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 11191var x4Ref = GetReferences(tree, "x4").Single(); 11195var x5Ref = GetReferences(tree, "x5").Single(); 11207var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 11268var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 11269var x3Ref = GetReferences(tree, "x3").Single(); 11272var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 11273var x4Ref = GetReferences(tree, "x4").Single(); 11277var x5Ref = GetReferences(tree, "x5").Single(); 11289var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 11335var node = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 11430var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 11431var x1Ref = GetReferences(tree, "x1").Single(); 11718var y1Decl = GetOutVarDeclarations(tree, "y1").Single(); 11723var y2Decl = GetOutVarDeclarations(tree, "y2").Single(); 11728var z2Decl = GetOutVarDeclarations(tree, "z2").Single(); 11735var y3Decl = GetOutVarDeclarations(tree, "y3").Single(); 11740var z3Decl = GetOutVarDeclarations(tree, "z3").Single(); 11747var y4Decl = GetOutVarDeclarations(tree, "y4").Single(); 11752var z4Decl = GetOutVarDeclarations(tree, "z4").Single(); 11757var u4Decl = GetOutVarDeclarations(tree, "u4").Single(); 11765var v4Decl = GetOutVarDeclarations(tree, "v4").Single(); 11773var y5Decl = GetOutVarDeclarations(tree, "y5").Single(); 11778var z5Decl = GetOutVarDeclarations(tree, "z5").Single(); 11783var u5Decl = GetOutVarDeclarations(tree, "u5").Single(); 11791var v5Decl = GetOutVarDeclarations(tree, "v5").Single(); 11799var y6Decl = GetOutVarDeclarations(tree, "y6").Single(); 11804var z6Decl = GetOutVarDeclarations(tree, "z6").Single(); 11811var y7Decl = GetOutVarDeclarations(tree, "y7").Single(); 11816var z7Decl = GetOutVarDeclarations(tree, "z7").Single(); 11824var u7Decl = GetOutVarDeclarations(tree, "u7").Single(); 11832var y8Decl = GetOutVarDeclarations(tree, "y8").Single(); 11837var z8Decl = GetOutVarDeclarations(tree, "z8").Single(); 11843var y9Decl = GetOutVarDeclarations(tree, "y9").Single(); 11848var z9Decl = GetOutVarDeclarations(tree, "z9").Single(); 11855var u9Decl = GetOutVarDeclarations(tree, "u9").Single(); 11862var y10Decl = GetOutVarDeclarations(tree, "y10").Single(); 11868var y11Decl = GetOutVarDeclarations(tree, "y11").Single(); 11975var y4Decl = GetOutVarDeclarations(tree, "y4").Single(); 11980var z4Decl = GetOutVarDeclarations(tree, "z4").Single(); 11985var u4Decl = GetOutVarDeclarations(tree, "u4").Single(); 11993var v4Decl = GetOutVarDeclarations(tree, "v4").Single(); 12001var y5Decl = GetOutVarDeclarations(tree, "y5").Single(); 12006var z5Decl = GetOutVarDeclarations(tree, "z5").Single(); 12011var u5Decl = GetOutVarDeclarations(tree, "u5").Single(); 12019var v5Decl = GetOutVarDeclarations(tree, "v5").Single(); 12130var yDecl = GetOutVarDeclarations(tree, id).Single(); 12159var y13Decl = GetOutVarDeclarations(tree, "y13").Single(); 12426var yDecl = GetOutVarDeclarations(tree, id).Single(); 12427var yRef = GetReferences(tree, id).Single(); 12502var yDecl = GetOutVarDeclarations(tree, id).Single(); 12503var yRef = GetReferences(tree, id).Single(); 12664var yDecl = GetOutVarDeclarations(tree, id).Single(); 12782var y1Ref = GetReferences(tree, "y1").Single(); 12792var y3Decl = GetOutVarDeclarations(tree, "y3").Single(); 12793var y3Ref = GetReferences(tree, "y3").Single(); 12796var y4Decl = GetOutVarDeclarations(tree, "y4").Single(); 12797var y4Ref = GetReferences(tree, "y4").Single(); 12871var yDecl = GetOutVarDeclarations(tree, id).Single(); 12872var yRef = GetReferences(tree, id).Single(); 12923var yDecl = GetOutVarDeclarations(tree, "y1").Single(); 12924var yRef = GetReferences(tree, "y1").Single(); 12965var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 12966var x1Ref = GetReferences(tree, "x1").Single(); 13212var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 13213var x2Ref = GetReferences(tree, "x2").Single(); 13216var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 13217var x3Ref = GetReferences(tree, "x3").Single(); 13220var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 13227var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 13239var x9Decl = GetOutVarDeclarations(tree, "x9").Single(); 13240var x9Ref = GetReferences(tree, "x9").Single(); 13243var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 13244var x10Ref = GetReferences(tree, "x10").Single(); 13247var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 13252var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 13340bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 13345var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 13608var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 13613var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 13621var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 13626var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 13631var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 13699var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 13700var x1Ref = GetReferences(tree, "x1").Single(); 13739bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 13744var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 14139var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 14144var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 14149var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 14156var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 14172var x9Decl = GetOutVarDeclarations(tree, "x9").Single(); 14181var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 14189var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 14945var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 14954var x13Decl = GetOutVarDeclarations(tree, "x13").Single(); 14961var x14Decl = GetOutVarDeclarations(tree, "x14").Single(); 14970var x16Decl = GetOutVarDeclarations(tree, "x16").Single(); 14979var x17Decl = GetOutVarDeclarations(tree, "x17").Single(); 15133var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 15134var x2Ref = GetReferences(tree, "x2").Single(); 15137var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 15138var x3Ref = GetReferences(tree, "x3").Single(); 15141var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 15148var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 15160var x9Decl = GetOutVarDeclarations(tree, "x9").Single(); 15161var x9Ref = GetReferences(tree, "x9").Single(); 15164var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 15165var x10Ref = GetReferences(tree, "x10").Single(); 15168var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 15173var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 15260bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 15265var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 15533var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 15538var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 15543var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 15549var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 15554var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 15560var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 15573var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 15574var x10Ref = GetReferences(tree, "x10").Single(); 15582var y12Ref = GetReferences(tree, "y12").Single(); 15746var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 15751var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 15756var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 15762var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 15767var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 15773var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 15786var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 15787var x10Ref = GetReferences(tree, "x10").Single(); 15795var y12Ref = GetReferences(tree, "y12").Single(); 15959var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 15964var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 15969var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 15975var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 15980var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 15986var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 15999var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 16000var x10Ref = GetReferences(tree, "x10").Single(); 16008var y12Ref = GetReferences(tree, "y12").Single(); 16074var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 16081var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 16161var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 16173var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 16178var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 16402var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 16407var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 16412var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 16418var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 16423var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 16429var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 16447var y12Ref = GetReferences(tree, "y12").Single(); 16498var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 16499var x1Ref = GetReferences(tree, "x1").Single(); 16538bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 16543var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 16970var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 16971var x2Ref = GetReferences(tree, "x2").Single(); 16974var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 16975var x3Ref = GetReferences(tree, "x3").Single(); 16978var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 16985var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 17000var x9Decl = GetOutVarDeclarations(tree, "x9").Single(); 17001var x9Ref = GetReferences(tree, "x9").Single(); 17004var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 17009var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 17054var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 17055var x1Ref = GetReferences(tree, "x1").Single(); 17097bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 17102var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 17397var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 17398var x2Ref = GetReferences(tree, "x2").Single(); 17401var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 17402var x3Ref = GetReferences(tree, "x3").Single(); 17405var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 17412var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 17427var x9Decl = GetOutVarDeclarations(tree, "x9").Single(); 17428var x9Ref = GetReferences(tree, "x9").Single(); 17431var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 17432var x10Ref = GetReferences(tree, "x10").Single(); 17435var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 17440var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 17533bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 17538var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 17749var x2Decl = tree.GetRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Single(); 18444var initializer = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 19332var varRef = GetReferences(tree, "var").Skip(1).Single(); 20359var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 20365var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 20371var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 20377var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 20920var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 20921var x1Ref = GetReferences(tree, "x1").Single(); 20925var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 20933var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 20934var x6Ref = GetReferences(tree, "x6").Single(); 20938var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 20945var x14Ref = GetReferences(tree, "x14").Single(); 21039var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 21047var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 21055var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 21134var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 21148var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 21154var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 21238var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 21252var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 21258var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 21299bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 21304var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 21363var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 21370var e = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "e").Single(); 21413var y1Decl = GetOutVarDeclarations(tree, "y1").Single(); 21647var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 21653var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 21659var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 21666var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 21672var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 21679var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 21699var y12Ref = GetReferences(tree, "y12").Single(); 21820var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 21825var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 21826var x7Ref = GetReferences(tree, "x7").Single(); 22014var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 22020var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 22026var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 22033var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 22039var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 22046var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 22061var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 22062var x10Ref = GetReferences(tree, "x10").Single(); 22071var y12Ref = GetReferences(tree, "y12").Single(); 22141var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 22149var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 22239var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 22253var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 22259var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 22427var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 22433var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 22439var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 22446var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 22452var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 22459var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 22479var y12Ref = GetReferences(tree, "y12").Single(); 22582var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 22590var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 22596var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 22661var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 22662var x3Ref = GetReferences(tree, "x3").Single(); 22666var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 22667var x4Ref = GetReferences(tree, "x4").Single(); 22672var x5Ref = GetReferences(tree, "x5").Single(); 22686var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 22784var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 22785var x3Ref = GetReferences(tree, "x3").Single(); 22789var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 22790var x4Ref = GetReferences(tree, "x4").Single(); 22795var x5Ref = GetReferences(tree, "x5").Single(); 22809var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 22866var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 22867var x3Ref = GetReferences(tree, "x3").Single(); 22871var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 22872var x4Ref = GetReferences(tree, "x4").Single(); 22877var x5Ref = GetReferences(tree, "x5").Single(); 22891var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 22950var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 22951var x3Ref = GetReferences(tree, "x3").Single(); 22955var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 22956var x4Ref = GetReferences(tree, "x4").Single(); 22961var x5Ref = GetReferences(tree, "x5").Single(); 22975var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 23017var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 23396var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 23444var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 23449var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 23450var x2Ref = GetReferences(tree, "x2").Single(); 23453var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 23454var x3Ref = GetReferences(tree, "x3").Single(); 23477var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 23482var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 23483var x2Ref = GetReferences(tree, "x2").Single(); 23486var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 23487var x3Ref = GetReferences(tree, "x3").Single(); 23528var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 23672var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 23677var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 23682var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 23688var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 23693var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 23699var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 23717var y12Ref = GetReferences(tree, "y12").Single(); 23770var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 23775var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 23780var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 23786var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 23791var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 23797var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 23815var y12Ref = GetReferences(tree, "y12").Single(); 23868var x0Decl = GetOutVarDeclarations(tree, "x0").Single(); 23873var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 23878var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 24010var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 24015var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 24020var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 24026var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 24031var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 24037var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 24055var y12Ref = GetReferences(tree, "y12").Single(); 24065var x15Decl = GetOutVarDeclarations(tree, "x15").Single(); 24114var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 24119var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 24124var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 24130var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 24135var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 24141var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 24159var y12Ref = GetReferences(tree, "y12").Single(); 24169var x15Decl = GetOutVarDeclarations(tree, "x15").Single(); 24209var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 24297var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 24298var x3Ref = GetReferences(tree, "x3").Single(); 24301var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 24302var x4Ref = GetReferences(tree, "x4").Single(); 24306var x5Ref = GetReferences(tree, "x5").Single(); 24318var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 24327var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 24346var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 24353var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 24403var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 24404var x3Ref = GetReferences(tree, "x3").Single(); 24407var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 24408var x4Ref = GetReferences(tree, "x4").Single(); 24412var x5Ref = GetReferences(tree, "x5").Single(); 24424var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 24433var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 24452var x11Decl = GetOutVarDeclarations(tree, "x11").Single(); 24459var x12Decl = GetOutVarDeclarations(tree, "x12").Single(); 24496var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 24497var x1Ref = GetReferences(tree, "x1").Single(); 24527var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 24528var x1Ref = GetReferences(tree, "x1").Single(); 24729var y1Decl = GetOutVarDeclarations(tree, "y1").Single(); 24734var y2Decl = GetOutVarDeclarations(tree, "y2").Single(); 24739var z2Decl = GetOutVarDeclarations(tree, "z2").Single(); 24746var y3Decl = GetOutVarDeclarations(tree, "y3").Single(); 24751var z3Decl = GetOutVarDeclarations(tree, "z3").Single(); 24758var y4Decl = GetOutVarDeclarations(tree, "y4").Single(); 24763var z4Decl = GetOutVarDeclarations(tree, "z4").Single(); 24768var u4Decl = GetOutVarDeclarations(tree, "u4").Single(); 24776var v4Decl = GetOutVarDeclarations(tree, "v4").Single(); 24784var y5Decl = GetOutVarDeclarations(tree, "y5").Single(); 24789var z5Decl = GetOutVarDeclarations(tree, "z5").Single(); 24794var u5Decl = GetOutVarDeclarations(tree, "u5").Single(); 24802var v5Decl = GetOutVarDeclarations(tree, "v5").Single(); 24810var y6Decl = GetOutVarDeclarations(tree, "y6").Single(); 24815var z6Decl = GetOutVarDeclarations(tree, "z6").Single(); 24822var y7Decl = GetOutVarDeclarations(tree, "y7").Single(); 24827var z7Decl = GetOutVarDeclarations(tree, "z7").Single(); 24835var u7Decl = GetOutVarDeclarations(tree, "u7").Single(); 24843var y8Decl = GetOutVarDeclarations(tree, "y8").Single(); 24848var z8Decl = GetOutVarDeclarations(tree, "z8").Single(); 24854var y9Decl = GetOutVarDeclarations(tree, "y9").Single(); 24859var z9Decl = GetOutVarDeclarations(tree, "z9").Single(); 24866var u9Decl = GetOutVarDeclarations(tree, "u9").Single(); 24873var y10Decl = GetOutVarDeclarations(tree, "y10").Single(); 24879var y11Decl = GetOutVarDeclarations(tree, "y11").Single(); 24988var y1Decl = GetOutVarDeclarations(tree, "y1").Single(); 24993var y2Decl = GetOutVarDeclarations(tree, "y2").Single(); 24998var z2Decl = GetOutVarDeclarations(tree, "z2").Single(); 25005var y3Decl = GetOutVarDeclarations(tree, "y3").Single(); 25010var z3Decl = GetOutVarDeclarations(tree, "z3").Single(); 25017var y4Decl = GetOutVarDeclarations(tree, "y4").Single(); 25022var z4Decl = GetOutVarDeclarations(tree, "z4").Single(); 25027var u4Decl = GetOutVarDeclarations(tree, "u4").Single(); 25035var v4Decl = GetOutVarDeclarations(tree, "v4").Single(); 25043var y5Decl = GetOutVarDeclarations(tree, "y5").Single(); 25048var z5Decl = GetOutVarDeclarations(tree, "z5").Single(); 25053var u5Decl = GetOutVarDeclarations(tree, "u5").Single(); 25061var v5Decl = GetOutVarDeclarations(tree, "v5").Single(); 25069var y6Decl = GetOutVarDeclarations(tree, "y6").Single(); 25074var z6Decl = GetOutVarDeclarations(tree, "z6").Single(); 25081var y7Decl = GetOutVarDeclarations(tree, "y7").Single(); 25086var z7Decl = GetOutVarDeclarations(tree, "z7").Single(); 25094var u7Decl = GetOutVarDeclarations(tree, "u7").Single(); 25102var y8Decl = GetOutVarDeclarations(tree, "y8").Single(); 25107var z8Decl = GetOutVarDeclarations(tree, "z8").Single(); 25113var y9Decl = GetOutVarDeclarations(tree, "y9").Single(); 25118var z9Decl = GetOutVarDeclarations(tree, "z9").Single(); 25125var u9Decl = GetOutVarDeclarations(tree, "u9").Single(); 25132var y10Decl = GetOutVarDeclarations(tree, "y10").Single(); 25138var y11Decl = GetOutVarDeclarations(tree, "y11").Single(); 25179var yDecl = GetOutVarDeclarations(tree, "y1").Single(); 25180var yRef = GetReferences(tree, "y1").Single(); 25292var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25297var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 25302var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 25308var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 25313var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 25319var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 25332var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 25333var x10Ref = GetReferences(tree, "x10").Single(); 25341var y12Ref = GetReferences(tree, "y12").Single(); 25391var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25396var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 25401var x4Decl = GetOutVarDeclarations(tree, "x4").Single(); 25407var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 25412var x7Decl = GetOutVarDeclarations(tree, "x7").Single(); 25418var x8Decl = GetOutVarDeclarations(tree, "x8").Single(); 25431var x10Decl = GetOutVarDeclarations(tree, "x10").Single(); 25432var x10Ref = GetReferences(tree, "x10").Single(); 25440var y12Ref = GetReferences(tree, "y12").Single(); 25570var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25575var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 25576var x2Ref = GetReferences(tree, "x2").Single(); 25579var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 25580var x3Ref = GetReferences(tree, "x3").Single(); 25584var x4Ref = GetReferences(tree, "x4").Single(); 25614var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25619var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 25620var x2Ref = GetReferences(tree, "x2").Single(); 25624var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 25625var x3Ref = GetReferences(tree, "x3").Single(); 25629var x4Ref = GetReferences(tree, "x4").Single(); 25695var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25700var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 25701var x2Ref = GetReferences(tree, "x2").Single(); 25704var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 25705var x3Ref = GetReferences(tree, "x3").Single(); 25709var x4Ref = GetReferences(tree, "x4").Single(); 25739var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25744var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 25745var x2Ref = GetReferences(tree, "x2").Single(); 25749var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 25750var x3Ref = GetReferences(tree, "x3").Single(); 25754var x4Ref = GetReferences(tree, "x4").Single(); 25794var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25875var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25880var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 25881var x2Ref = GetReferences(tree, "x2").Single(); 25884var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 25885var x3Ref = GetReferences(tree, "x3").Single(); 25889var x4Ref = GetReferences(tree, "x4").Single(); 25935var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 25940var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 25941var x2Ref = GetReferences(tree, "x2").Single(); 25945var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 25946var x3Ref = GetReferences(tree, "x3").Single(); 25950var x4Ref = GetReferences(tree, "x4").Single(); 26032var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26037var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26038var x2Ref = GetReferences(tree, "x2").Single(); 26041var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26042var x3Ref = GetReferences(tree, "x3").Single(); 26046var x4Ref = GetReferences(tree, "x4").Single(); 26089var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26094var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26095var x2Ref = GetReferences(tree, "x2").Single(); 26099var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26100var x3Ref = GetReferences(tree, "x3").Single(); 26104var x4Ref = GetReferences(tree, "x4").Single(); 26285var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26290var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26291var x2Ref = GetReferences(tree, "x2").Single(); 26294var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26295var x3Ref = GetReferences(tree, "x3").Single(); 26299var x4Ref = GetReferences(tree, "x4").Single(); 26332var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26337var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26338var x2Ref = GetReferences(tree, "x2").Single(); 26342var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26343var x3Ref = GetReferences(tree, "x3").Single(); 26347var x4Ref = GetReferences(tree, "x4").Single(); 26427var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26433var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26434var x2Ref = GetReferences(tree, "x2").Single(); 26437var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26438var x3Ref = GetReferences(tree, "x3").Single(); 26442var x4Ref = GetReferences(tree, "x4").Single(); 26475var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26480var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26481var x2Ref = GetReferences(tree, "x2").Single(); 26485var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26486var x3Ref = GetReferences(tree, "x3").Single(); 26490var x4Ref = GetReferences(tree, "x4").Single(); 26559var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26564var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26565var x2Ref = GetReferences(tree, "x2").Single(); 26568var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26569var x3Ref = GetReferences(tree, "x3").Single(); 26573var x4Ref = GetReferences(tree, "x4").Single(); 26619var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26624var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26625var x2Ref = GetReferences(tree, "x2").Single(); 26629var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26630var x3Ref = GetReferences(tree, "x3").Single(); 26634var x4Ref = GetReferences(tree, "x4").Single(); 26703var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26708var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26709var x2Ref = GetReferences(tree, "x2").Single(); 26712var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26713var x3Ref = GetReferences(tree, "x3").Single(); 26717var x4Ref = GetReferences(tree, "x4").Single(); 26763var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26768var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26769var x2Ref = GetReferences(tree, "x2").Single(); 26773var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26774var x3Ref = GetReferences(tree, "x3").Single(); 26778var x4Ref = GetReferences(tree, "x4").Single(); 26824var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26894var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26899var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26900var x2Ref = GetReferences(tree, "x2").Single(); 26903var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26904var x3Ref = GetReferences(tree, "x3").Single(); 26908var x4Ref = GetReferences(tree, "x4").Single(); 26938var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 26943var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 26944var x2Ref = GetReferences(tree, "x2").Single(); 26948var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 26949var x3Ref = GetReferences(tree, "x3").Single(); 26953var x4Ref = GetReferences(tree, "x4").Single(); 27024var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27030var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27031var x2Ref = GetReferences(tree, "x2").Single(); 27034var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27035var x3Ref = GetReferences(tree, "x3").Single(); 27039var x4Ref = GetReferences(tree, "x4").Single(); 27069var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27074var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27075var x2Ref = GetReferences(tree, "x2").Single(); 27079var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27080var x3Ref = GetReferences(tree, "x3").Single(); 27084var x4Ref = GetReferences(tree, "x4").Single(); 27161var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27166var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27167var x2Ref = GetReferences(tree, "x2").Single(); 27170var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27171var x3Ref = GetReferences(tree, "x3").Single(); 27175var x4Ref = GetReferences(tree, "x4").Single(); 27215var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27220var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27221var x2Ref = GetReferences(tree, "x2").Single(); 27225var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27226var x3Ref = GetReferences(tree, "x3").Single(); 27230var x4Ref = GetReferences(tree, "x4").Single(); 27314var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27319var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27320var x2Ref = GetReferences(tree, "x2").Single(); 27323var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27324var x3Ref = GetReferences(tree, "x3").Single(); 27328var x4Ref = GetReferences(tree, "x4").Single(); 27368var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27373var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27374var x2Ref = GetReferences(tree, "x2").Single(); 27378var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27379var x3Ref = GetReferences(tree, "x3").Single(); 27383var x4Ref = GetReferences(tree, "x4").Single(); 27514var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27521var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27522var x2Ref = GetReferences(tree, "x2").Single(); 27526var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27527var x3Ref = GetReferences(tree, "x3").Single(); 27532var x4Ref = GetReferences(tree, "x4").Single(); 27587var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27594var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27595var x2Ref = GetReferences(tree, "x2").Single(); 27599var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27600var x3Ref = GetReferences(tree, "x3").Single(); 27605var x4Ref = GetReferences(tree, "x4").Single(); 27691var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27698var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27699var x2Ref = GetReferences(tree, "x2").Single(); 27703var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27704var x3Ref = GetReferences(tree, "x3").Single(); 27709var x4Ref = GetReferences(tree, "x4").Single(); 27764var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27771var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27772var x2Ref = GetReferences(tree, "x2").Single(); 27776var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27777var x3Ref = GetReferences(tree, "x3").Single(); 27782var x4Ref = GetReferences(tree, "x4").Single(); 27904var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27911var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27912var x2Ref = GetReferences(tree, "x2").Single(); 27916var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27917var x3Ref = GetReferences(tree, "x3").Single(); 27922var x4Ref = GetReferences(tree, "x4").Single(); 27977var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 27984var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 27985var x2Ref = GetReferences(tree, "x2").Single(); 27989var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 27990var x3Ref = GetReferences(tree, "x3").Single(); 27995var x4Ref = GetReferences(tree, "x4").Single(); 28082var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28089var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28090var x2Ref = GetReferences(tree, "x2").Single(); 28094var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28095var x3Ref = GetReferences(tree, "x3").Single(); 28100var x4Ref = GetReferences(tree, "x4").Single(); 28155var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28162var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28163var x2Ref = GetReferences(tree, "x2").Single(); 28167var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28168var x3Ref = GetReferences(tree, "x3").Single(); 28173var x4Ref = GetReferences(tree, "x4").Single(); 28303var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28308var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28309var x2Ref = GetReferences(tree, "x2").Single(); 28312var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28313var x3Ref = GetReferences(tree, "x3").Single(); 28317var x4Ref = GetReferences(tree, "x4").Single(); 28357var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28362var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28363var x2Ref = GetReferences(tree, "x2").Single(); 28367var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28368var x3Ref = GetReferences(tree, "x3").Single(); 28372var x4Ref = GetReferences(tree, "x4").Single(); 28454var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28459var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28460var x2Ref = GetReferences(tree, "x2").Single(); 28463var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28464var x3Ref = GetReferences(tree, "x3").Single(); 28468var x4Ref = GetReferences(tree, "x4").Single(); 28508var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28513var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28514var x2Ref = GetReferences(tree, "x2").Single(); 28518var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28519var x3Ref = GetReferences(tree, "x3").Single(); 28523var x4Ref = GetReferences(tree, "x4").Single(); 28707var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28712var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28713var x2Ref = GetReferences(tree, "x2").Single(); 28716var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28717var x3Ref = GetReferences(tree, "x3").Single(); 28721var x4Ref = GetReferences(tree, "x4").Single(); 28726var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 28731var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 28768var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28773var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28774var x2Ref = GetReferences(tree, "x2").Single(); 28778var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28779var x3Ref = GetReferences(tree, "x3").Single(); 28783var x4Ref = GetReferences(tree, "x4").Single(); 28788var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 28794var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 28875var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28880var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28881var x2Ref = GetReferences(tree, "x2").Single(); 28884var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28885var x3Ref = GetReferences(tree, "x3").Single(); 28889var x4Ref = GetReferences(tree, "x4").Single(); 28931var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 28936var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 28937var x2Ref = GetReferences(tree, "x2").Single(); 28941var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 28942var x3Ref = GetReferences(tree, "x3").Single(); 28946var x4Ref = GetReferences(tree, "x4").Single(); 29026var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29031var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29032var x2Ref = GetReferences(tree, "x2").Single(); 29035var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29036var x3Ref = GetReferences(tree, "x3").Single(); 29040var x4Ref = GetReferences(tree, "x4").Single(); 29082var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29087var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29088var x2Ref = GetReferences(tree, "x2").Single(); 29092var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29093var x3Ref = GetReferences(tree, "x3").Single(); 29097var x4Ref = GetReferences(tree, "x4").Single(); 29147var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29233var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29238var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29239var x2Ref = GetReferences(tree, "x2").Single(); 29242var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29243var x3Ref = GetReferences(tree, "x3").Single(); 29247var x4Ref = GetReferences(tree, "x4").Single(); 29252var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 29300var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29305var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29306var x2Ref = GetReferences(tree, "x2").Single(); 29310var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29311var x3Ref = GetReferences(tree, "x3").Single(); 29315var x4Ref = GetReferences(tree, "x4").Single(); 29320var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 29409var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29414var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29415var x2Ref = GetReferences(tree, "x2").Single(); 29418var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29419var x3Ref = GetReferences(tree, "x3").Single(); 29423var x4Ref = GetReferences(tree, "x4").Single(); 29428var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 29476var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29481var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29482var x2Ref = GetReferences(tree, "x2").Single(); 29486var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29487var x3Ref = GetReferences(tree, "x3").Single(); 29491var x4Ref = GetReferences(tree, "x4").Single(); 29496var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 29549var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29598var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29599var x1Ref = GetReferences(tree, "x1").Single(); 29696var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29701var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29702var x2Ref = GetReferences(tree, "x2").Single(); 29705var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29706var x3Ref = GetReferences(tree, "x3").Single(); 29710var x4Ref = GetReferences(tree, "x4").Single(); 29715var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 29720var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 29772var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29777var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29778var x2Ref = GetReferences(tree, "x2").Single(); 29782var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29783var x3Ref = GetReferences(tree, "x3").Single(); 29787var x4Ref = GetReferences(tree, "x4").Single(); 29792var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 29793var x5Ref = GetReferences(tree, "x5").Single(); 29797var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 29798var x6Ref = GetReferences(tree, "x6").Single(); 29897var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29902var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29903var x2Ref = GetReferences(tree, "x2").Single(); 29906var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29907var x3Ref = GetReferences(tree, "x3").Single(); 29911var x4Ref = GetReferences(tree, "x4").Single(); 29916var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 29921var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 29973var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 29978var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 29979var x2Ref = GetReferences(tree, "x2").Single(); 29983var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 29984var x3Ref = GetReferences(tree, "x3").Single(); 29988var x4Ref = GetReferences(tree, "x4").Single(); 29993var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 29994var x5Ref = GetReferences(tree, "x5").Single(); 29998var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 29999var x6Ref = GetReferences(tree, "x6").Single(); 30051var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30137var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30142var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30143var x2Ref = GetReferences(tree, "x2").Single(); 30146var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 30147var x3Ref = GetReferences(tree, "x3").Single(); 30151var x4Ref = GetReferences(tree, "x4").Single(); 30156var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 30157var x5Ref = GetReferences(tree, "x5").Single(); 30160var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 30161var x6Ref = GetReferences(tree, "x6").Single(); 30198var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30203var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30204var x2Ref = GetReferences(tree, "x2").Single(); 30208var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 30209var x3Ref = GetReferences(tree, "x3").Single(); 30213var x4Ref = GetReferences(tree, "x4").Single(); 30218var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 30219var x5Ref = GetReferences(tree, "x5").Single(); 30223var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 30224var x6Ref = GetReferences(tree, "x6").Single(); 30309var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30314var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30315var x2Ref = GetReferences(tree, "x2").Single(); 30318var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 30319var x3Ref = GetReferences(tree, "x3").Single(); 30323var x4Ref = GetReferences(tree, "x4").Single(); 30328var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 30329var x5Ref = GetReferences(tree, "x5").Single(); 30332var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 30333var x6Ref = GetReferences(tree, "x6").Single(); 30370var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30375var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30376var x2Ref = GetReferences(tree, "x2").Single(); 30380var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 30381var x3Ref = GetReferences(tree, "x3").Single(); 30385var x4Ref = GetReferences(tree, "x4").Single(); 30390var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 30391var x5Ref = GetReferences(tree, "x5").Single(); 30395var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 30396var x6Ref = GetReferences(tree, "x6").Single(); 30434var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30489var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30533var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30577var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30618var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30619var x1Ref = GetReferences(tree, "x1").Single(); 30622var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30623var x2Ref = GetReferences(tree, "x2").Single(); 30698var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30703var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30704var x2Ref = GetReferences(tree, "x2").Single(); 30707var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 30708var x3Ref = GetReferences(tree, "x3").Single(); 30712var x4Ref = GetReferences(tree, "x4").Single(); 30717var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 30718var x5Ref = GetReferences(tree, "x5").Single(); 30767var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30774var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30775var x2Ref = GetReferences(tree, "x2").Single(); 30779var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 30780var x3Ref = GetReferences(tree, "x3").Single(); 30785var x4Ref = GetReferences(tree, "x4").Single(); 30791var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 30792var x5Ref = GetReferences(tree, "x5").Single(); 30869var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30874var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30875var x2Ref = GetReferences(tree, "x2").Single(); 30878var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 30879var x3Ref = GetReferences(tree, "x3").Single(); 30883var x4Ref = GetReferences(tree, "x4").Single(); 30888var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 30889var x5Ref = GetReferences(tree, "x5").Single(); 30938var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 30945var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 30946var x2Ref = GetReferences(tree, "x2").Single(); 30950var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 30951var x3Ref = GetReferences(tree, "x3").Single(); 30956var x4Ref = GetReferences(tree, "x4").Single(); 30962var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 30963var x5Ref = GetReferences(tree, "x5").Single(); 31002var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31057var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31101var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31145var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31229var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31234var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 31235var x2Ref = GetReferences(tree, "x2").Single(); 31238var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 31239var x3Ref = GetReferences(tree, "x3").Single(); 31243var x4Ref = GetReferences(tree, "x4").Single(); 31248var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 31249var x5Ref = GetReferences(tree, "x5").Single(); 31252var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 31253var x6Ref = GetReferences(tree, "x6").Single(); 31288var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31295var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 31296var x2Ref = GetReferences(tree, "x2").Single(); 31300var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 31301var x3Ref = GetReferences(tree, "x3").Single(); 31306var x4Ref = GetReferences(tree, "x4").Single(); 31312var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 31313var x5Ref = GetReferences(tree, "x5").Single(); 31317var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 31318var x6Ref = GetReferences(tree, "x6").Single(); 31402var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31407var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 31408var x2Ref = GetReferences(tree, "x2").Single(); 31411var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 31412var x3Ref = GetReferences(tree, "x3").Single(); 31416var x4Ref = GetReferences(tree, "x4").Single(); 31421var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 31422var x5Ref = GetReferences(tree, "x5").Single(); 31425var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 31426var x6Ref = GetReferences(tree, "x6").Single(); 31461var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31468var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 31469var x2Ref = GetReferences(tree, "x2").Single(); 31473var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 31474var x3Ref = GetReferences(tree, "x3").Single(); 31479var x4Ref = GetReferences(tree, "x4").Single(); 31485var x5Decl = GetOutVarDeclarations(tree, "x5").Single(); 31486var x5Ref = GetReferences(tree, "x5").Single(); 31490var x6Decl = GetOutVarDeclarations(tree, "x6").Single(); 31491var x6Ref = GetReferences(tree, "x6").Single(); 31530var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31585var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31629var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31673var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31714var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31715var x1Ref = GetReferences(tree, "x1").Single(); 31718var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 31719var x2Ref = GetReferences(tree, "x2").Single(); 31768var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31802var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31855var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31895var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31945var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 31979var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32035var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32075var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32120var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32123var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 32164var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32167var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 32198var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32232var b = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single()); 32241var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32272var b = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single()); 32281var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32312var a = (IFieldSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "a").Single()); 32321var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32329x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32367var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32383x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32385var bDecl = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == "b").Single(); 32436var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32506var one = node0.DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 32549var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32577var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32605var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32631var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32668var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32704var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 32975var tree = comp.Compilation.SyntaxTrees.Single(); 33135var discard1 = GetDiscardDesignations(tree).Single(); 33506var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "x").Single(); 34272var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 34273var x1Ref = GetReferences(tree, "x1").Single(); 34277var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 34278var x2Ref = GetReferences(tree, "x2").Single(); 34330var rankSpecifierOld = method.DescendantNodes().OfType<ArrayRankSpecifierSyntax>().Single(); 34399var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 34404var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 34409var x3Decl = GetOutVarDeclarations(tree, "x3").Single(); 34490var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 34495var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 34544var rankSpecifierOld = method.DescendantNodes().OfType<ArrayRankSpecifierSyntax>().Single(); 34597var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 34602var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 34718var x1Decl = GetOutVarDeclarations(tree, "x1").Single(); 34723var x2Decl = GetOutVarDeclarations(tree, "x2").Single(); 34728var x3Decl = GetOutVarDeclarations(tree, "x3").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(); 35662var identifierBefore = GetReferences(tree, "G").Single(); 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(); 36175var declarationSyntax = tree.GetRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single(); 36366var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 36371Assert.True(model.TryGetSpeculativeSemanticModel(method.Body.SpanStart + 1, method.DescendantNodes().OfType<AttributeSyntax>().Single(), out speculativeModel)); 36416Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single())); 36452var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 36457var equalsValue = method.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 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())); 36529var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 36534var equalsValue = method.DescendantNodes().OfType<ParameterSyntax>().Single() 36535.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 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()));
Semantics\ParamsCollectionTests.cs (12)
2757var parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2791parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2955var parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2986parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 3596var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 3886var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Test1").Single(); 5893var f1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F1").Single(); 5895var f2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F2").Single(); 5975var f1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F1").Single(); 5977var f2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "F2").Single(); 9072var parameterDecl = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Where(p => p.Identifier.ValueText == "paramsParameter").Single(); 12533var node = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single();
Semantics\PatternMatchingTestBase.cs (2)
32return GetPatternDeclarations(tree, v).Single(); 57return GetReferences(tree, name).Single();
Semantics\PatternMatchingTests.cs (20)
780var x1Ref = GetReferences(tree, "x1").Single(); 848var yDecl = GetPatternDeclarations(tree, id).Single(); 849var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).Single(); 893var yRef = GetReferences(tree, "y1").Single(); 2181var x0Decl = GetPatternDeclarations(tree, "x0").Single(); 2186var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2191var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2237var x0Decl = GetPatternDeclarations(tree, "x0").Single(); 2242var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2247var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3445var declaration = tree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 3446var o1 = GetReferences(tree, "o1").Single(); 3480var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3481var x1Ref = GetReferences(tree, "x1").Single(); 3485var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3486var x2Ref = GetReferences(tree, "x2").Single(); 4250var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4251var x2Ref = GetReferences(tree, "x2").Single(); 11410var syntax = tree.GetRoot().DescendantNodes().OfType<BlockSyntax>().Single(); 11467var syntax = tree.GetRoot().DescendantNodes().OfType<BlockSyntax>().Single();
Semantics\PatternMatchingTests_Global.cs (609)
79var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 84var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 85var x2Ref = GetReferences(tree, "x2").Single(); 88var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 89var x3Ref = GetReferences(tree, "x3").Single(); 93var x4Ref = GetReferences(tree, "x4").Single(); 123var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 128var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 129var x2Ref = GetReferences(tree, "x2").Single(); 133var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 134var x3Ref = GetReferences(tree, "x3").Single(); 138var x4Ref = GetReferences(tree, "x4").Single(); 201var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 206var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 207var x2Ref = GetReferences(tree, "x2").Single(); 210var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 211var x3Ref = GetReferences(tree, "x3").Single(); 215var x4Ref = GetReferences(tree, "x4").Single(); 245var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 250var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 251var x2Ref = GetReferences(tree, "x2").Single(); 255var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 256var x3Ref = GetReferences(tree, "x3").Single(); 260var x4Ref = GetReferences(tree, "x4").Single(); 295var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 371var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 376var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 377var x2Ref = GetReferences(tree, "x2").Single(); 380var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 381var x3Ref = GetReferences(tree, "x3").Single(); 385var x4Ref = GetReferences(tree, "x4").Single(); 431var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 436var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 437var x2Ref = GetReferences(tree, "x2").Single(); 441var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 442var x3Ref = GetReferences(tree, "x3").Single(); 446var x4Ref = GetReferences(tree, "x4").Single(); 523var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 528var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 529var x2Ref = GetReferences(tree, "x2").Single(); 532var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 533var x3Ref = GetReferences(tree, "x3").Single(); 537var x4Ref = GetReferences(tree, "x4").Single(); 580var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 585var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 586var x2Ref = GetReferences(tree, "x2").Single(); 590var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 591var x3Ref = GetReferences(tree, "x3").Single(); 595var x4Ref = GetReferences(tree, "x4").Single(); 760var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 765var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 766var x2Ref = GetReferences(tree, "x2").Single(); 769var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 770var x3Ref = GetReferences(tree, "x3").Single(); 774var x4Ref = GetReferences(tree, "x4").Single(); 807var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 812var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 813var x2Ref = GetReferences(tree, "x2").Single(); 817var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 818var x3Ref = GetReferences(tree, "x3").Single(); 822var x4Ref = GetReferences(tree, "x4").Single(); 897var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 903var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 904var x2Ref = GetReferences(tree, "x2").Single(); 907var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 908var x3Ref = GetReferences(tree, "x3").Single(); 912var x4Ref = GetReferences(tree, "x4").Single(); 945var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 950var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 951var x2Ref = GetReferences(tree, "x2").Single(); 955var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 956var x3Ref = GetReferences(tree, "x3").Single(); 960var x4Ref = GetReferences(tree, "x4").Single(); 1024var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1029var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1030var x2Ref = GetReferences(tree, "x2").Single(); 1033var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1034var x3Ref = GetReferences(tree, "x3").Single(); 1038var x4Ref = GetReferences(tree, "x4").Single(); 1077var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1082var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1083var x2Ref = GetReferences(tree, "x2").Single(); 1087var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1088var x3Ref = GetReferences(tree, "x3").Single(); 1092var x4Ref = GetReferences(tree, "x4").Single(); 1156var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1161var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1162var x2Ref = GetReferences(tree, "x2").Single(); 1165var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1166var x3Ref = GetReferences(tree, "x3").Single(); 1170var x4Ref = GetReferences(tree, "x4").Single(); 1209var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1214var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1215var x2Ref = GetReferences(tree, "x2").Single(); 1219var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1220var x3Ref = GetReferences(tree, "x3").Single(); 1224var x4Ref = GetReferences(tree, "x4").Single(); 1265var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1330var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1335var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1336var x2Ref = GetReferences(tree, "x2").Single(); 1339var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1340var x3Ref = GetReferences(tree, "x3").Single(); 1344var x4Ref = GetReferences(tree, "x4").Single(); 1374var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1379var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1380var x2Ref = GetReferences(tree, "x2").Single(); 1384var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1385var x3Ref = GetReferences(tree, "x3").Single(); 1389var x4Ref = GetReferences(tree, "x4").Single(); 1455var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1461var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1462var x2Ref = GetReferences(tree, "x2").Single(); 1465var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1466var x3Ref = GetReferences(tree, "x3").Single(); 1470var x4Ref = GetReferences(tree, "x4").Single(); 1500var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1505var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1506var x2Ref = GetReferences(tree, "x2").Single(); 1510var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1511var x3Ref = GetReferences(tree, "x3").Single(); 1515var x4Ref = GetReferences(tree, "x4").Single(); 1587var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1592var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1593var x2Ref = GetReferences(tree, "x2").Single(); 1596var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1597var x3Ref = GetReferences(tree, "x3").Single(); 1601var x4Ref = GetReferences(tree, "x4").Single(); 1641var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1646var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1647var x2Ref = GetReferences(tree, "x2").Single(); 1651var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1652var x3Ref = GetReferences(tree, "x3").Single(); 1656var x4Ref = GetReferences(tree, "x4").Single(); 1735var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1740var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1741var x2Ref = GetReferences(tree, "x2").Single(); 1744var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1745var x3Ref = GetReferences(tree, "x3").Single(); 1749var x4Ref = GetReferences(tree, "x4").Single(); 1789var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1794var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1795var x2Ref = GetReferences(tree, "x2").Single(); 1799var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1800var x3Ref = GetReferences(tree, "x3").Single(); 1804var x4Ref = GetReferences(tree, "x4").Single(); 1927var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1934var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1935var x2Ref = GetReferences(tree, "x2").Single(); 1939var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1940var x3Ref = GetReferences(tree, "x3").Single(); 1945var x4Ref = GetReferences(tree, "x4").Single(); 1997var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2004var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2005var x2Ref = GetReferences(tree, "x2").Single(); 2009var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2010var x3Ref = GetReferences(tree, "x3").Single(); 2015var x4Ref = GetReferences(tree, "x4").Single(); 2098var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2105var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2106var x2Ref = GetReferences(tree, "x2").Single(); 2110var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2111var x3Ref = GetReferences(tree, "x3").Single(); 2116var x4Ref = GetReferences(tree, "x4").Single(); 2168var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2175var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2176var x2Ref = GetReferences(tree, "x2").Single(); 2180var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2181var x3Ref = GetReferences(tree, "x3").Single(); 2186var x4Ref = GetReferences(tree, "x4").Single(); 2301var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2308var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2309var x2Ref = GetReferences(tree, "x2").Single(); 2313var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2314var x3Ref = GetReferences(tree, "x3").Single(); 2319var x4Ref = GetReferences(tree, "x4").Single(); 2371var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2378var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2379var x2Ref = GetReferences(tree, "x2").Single(); 2383var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2384var x3Ref = GetReferences(tree, "x3").Single(); 2389var x4Ref = GetReferences(tree, "x4").Single(); 2473var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2480var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2481var x2Ref = GetReferences(tree, "x2").Single(); 2485var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2486var x3Ref = GetReferences(tree, "x3").Single(); 2491var x4Ref = GetReferences(tree, "x4").Single(); 2543var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2550var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2551var x2Ref = GetReferences(tree, "x2").Single(); 2555var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2556var x3Ref = GetReferences(tree, "x3").Single(); 2561var x4Ref = GetReferences(tree, "x4").Single(); 2682var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2687var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2688var x2Ref = GetReferences(tree, "x2").Single(); 2691var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2692var x3Ref = GetReferences(tree, "x3").Single(); 2696var x4Ref = GetReferences(tree, "x4").Single(); 2736var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2741var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2742var x2Ref = GetReferences(tree, "x2").Single(); 2746var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2747var x3Ref = GetReferences(tree, "x3").Single(); 2751var x4Ref = GetReferences(tree, "x4").Single(); 2828var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2833var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2834var x2Ref = GetReferences(tree, "x2").Single(); 2837var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2838var x3Ref = GetReferences(tree, "x3").Single(); 2842var x4Ref = GetReferences(tree, "x4").Single(); 2882var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 2887var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 2888var x2Ref = GetReferences(tree, "x2").Single(); 2892var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2893var x3Ref = GetReferences(tree, "x3").Single(); 2897var x4Ref = GetReferences(tree, "x4").Single(); 3071var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3076var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3077var x2Ref = GetReferences(tree, "x2").Single(); 3080var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3081var x3Ref = GetReferences(tree, "x3").Single(); 3085var x4Ref = GetReferences(tree, "x4").Single(); 3090var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 3091var x5Ref = GetReferences(tree, "x5").Single(); 3094var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 3095var x6Ref = GetReferences(tree, "x6").Single(); 3130var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3135var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3136var x2Ref = GetReferences(tree, "x2").Single(); 3140var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3141var x3Ref = GetReferences(tree, "x3").Single(); 3145var x4Ref = GetReferences(tree, "x4").Single(); 3150var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 3151var x5Ref = GetReferences(tree, "x5").Single(); 3155var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 3156var x6Ref = GetReferences(tree, "x6").Single(); 3230var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3235var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3236var x2Ref = GetReferences(tree, "x2").Single(); 3239var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3240var x3Ref = GetReferences(tree, "x3").Single(); 3244var x4Ref = GetReferences(tree, "x4").Single(); 3286var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3291var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3292var x2Ref = GetReferences(tree, "x2").Single(); 3296var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3297var x3Ref = GetReferences(tree, "x3").Single(); 3301var x4Ref = GetReferences(tree, "x4").Single(); 3376var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3381var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3382var x2Ref = GetReferences(tree, "x2").Single(); 3385var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3386var x3Ref = GetReferences(tree, "x3").Single(); 3390var x4Ref = GetReferences(tree, "x4").Single(); 3432var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3437var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3438var x2Ref = GetReferences(tree, "x2").Single(); 3442var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3443var x3Ref = GetReferences(tree, "x3").Single(); 3447var x4Ref = GetReferences(tree, "x4").Single(); 3492var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3573var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3578var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3579var x2Ref = GetReferences(tree, "x2").Single(); 3582var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3583var x3Ref = GetReferences(tree, "x3").Single(); 3587var x4Ref = GetReferences(tree, "x4").Single(); 3592var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 3640var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3645var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3646var x2Ref = GetReferences(tree, "x2").Single(); 3650var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3651var x3Ref = GetReferences(tree, "x3").Single(); 3655var x4Ref = GetReferences(tree, "x4").Single(); 3660var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 3744var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3749var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3750var x2Ref = GetReferences(tree, "x2").Single(); 3753var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3754var x3Ref = GetReferences(tree, "x3").Single(); 3758var x4Ref = GetReferences(tree, "x4").Single(); 3763var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 3811var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3816var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3817var x2Ref = GetReferences(tree, "x2").Single(); 3821var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3822var x3Ref = GetReferences(tree, "x3").Single(); 3826var x4Ref = GetReferences(tree, "x4").Single(); 3831var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 3875var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3969var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 3974var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 3975var x2Ref = GetReferences(tree, "x2").Single(); 3978var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3979var x3Ref = GetReferences(tree, "x3").Single(); 3983var x4Ref = GetReferences(tree, "x4").Single(); 3988var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 3993var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 4045var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4050var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4051var x2Ref = GetReferences(tree, "x2").Single(); 4055var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4056var x3Ref = GetReferences(tree, "x3").Single(); 4060var x4Ref = GetReferences(tree, "x4").Single(); 4065var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4071var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 4167var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4172var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4173var x2Ref = GetReferences(tree, "x2").Single(); 4176var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4177var x3Ref = GetReferences(tree, "x3").Single(); 4181var x4Ref = GetReferences(tree, "x4").Single(); 4186var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4191var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 4243var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4248var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4249var x2Ref = GetReferences(tree, "x2").Single(); 4253var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4254var x3Ref = GetReferences(tree, "x3").Single(); 4258var x4Ref = GetReferences(tree, "x4").Single(); 4263var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4269var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 4314var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4395var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4400var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4401var x2Ref = GetReferences(tree, "x2").Single(); 4404var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4405var x3Ref = GetReferences(tree, "x3").Single(); 4409var x4Ref = GetReferences(tree, "x4").Single(); 4414var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4415var x5Ref = GetReferences(tree, "x5").Single(); 4418var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 4419var x6Ref = GetReferences(tree, "x6").Single(); 4456var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4461var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4462var x2Ref = GetReferences(tree, "x2").Single(); 4466var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4467var x3Ref = GetReferences(tree, "x3").Single(); 4471var x4Ref = GetReferences(tree, "x4").Single(); 4476var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4477var x5Ref = GetReferences(tree, "x5").Single(); 4481var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 4482var x6Ref = GetReferences(tree, "x6").Single(); 4562var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4567var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4568var x2Ref = GetReferences(tree, "x2").Single(); 4571var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4572var x3Ref = GetReferences(tree, "x3").Single(); 4576var x4Ref = GetReferences(tree, "x4").Single(); 4581var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4582var x5Ref = GetReferences(tree, "x5").Single(); 4585var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 4586var x6Ref = GetReferences(tree, "x6").Single(); 4623var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4628var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4629var x2Ref = GetReferences(tree, "x2").Single(); 4633var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4634var x3Ref = GetReferences(tree, "x3").Single(); 4638var x4Ref = GetReferences(tree, "x4").Single(); 4643var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4644var x5Ref = GetReferences(tree, "x5").Single(); 4648var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 4649var x6Ref = GetReferences(tree, "x6").Single(); 4678var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4724var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4763var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4802var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4834var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4835var x1Ref = GetReferences(tree, "x1").Single(); 4838var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4839var x2Ref = GetReferences(tree, "x2").Single(); 4909var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4914var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4915var x2Ref = GetReferences(tree, "x2").Single(); 4918var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4919var x3Ref = GetReferences(tree, "x3").Single(); 4923var x4Ref = GetReferences(tree, "x4").Single(); 4928var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4929var x5Ref = GetReferences(tree, "x5").Single(); 4978var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 4985var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4986var x2Ref = GetReferences(tree, "x2").Single(); 4990var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4991var x3Ref = GetReferences(tree, "x3").Single(); 4996var x4Ref = GetReferences(tree, "x4").Single(); 5002var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 5003var x5Ref = GetReferences(tree, "x5").Single(); 5075var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5080var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5081var x2Ref = GetReferences(tree, "x2").Single(); 5084var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 5085var x3Ref = GetReferences(tree, "x3").Single(); 5089var x4Ref = GetReferences(tree, "x4").Single(); 5094var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 5095var x5Ref = GetReferences(tree, "x5").Single(); 5144var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5151var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5152var x2Ref = GetReferences(tree, "x2").Single(); 5156var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 5157var x3Ref = GetReferences(tree, "x3").Single(); 5162var x4Ref = GetReferences(tree, "x4").Single(); 5168var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 5169var x5Ref = GetReferences(tree, "x5").Single(); 5199var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5245var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5284var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5323var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5402var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5407var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5408var x2Ref = GetReferences(tree, "x2").Single(); 5411var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 5412var x3Ref = GetReferences(tree, "x3").Single(); 5416var x4Ref = GetReferences(tree, "x4").Single(); 5421var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 5422var x5Ref = GetReferences(tree, "x5").Single(); 5425var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 5426var x6Ref = GetReferences(tree, "x6").Single(); 5478var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5485var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5486var x2Ref = GetReferences(tree, "x2").Single(); 5490var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 5491var x3Ref = GetReferences(tree, "x3").Single(); 5496var x4Ref = GetReferences(tree, "x4").Single(); 5502var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 5503var x5Ref = GetReferences(tree, "x5").Single(); 5507var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 5508var x6Ref = GetReferences(tree, "x6").Single(); 5587var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5592var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5593var x2Ref = GetReferences(tree, "x2").Single(); 5596var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 5597var x3Ref = GetReferences(tree, "x3").Single(); 5601var x4Ref = GetReferences(tree, "x4").Single(); 5606var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 5607var x5Ref = GetReferences(tree, "x5").Single(); 5610var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 5611var x6Ref = GetReferences(tree, "x6").Single(); 5663var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5670var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5671var x2Ref = GetReferences(tree, "x2").Single(); 5675var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 5676var x3Ref = GetReferences(tree, "x3").Single(); 5681var x4Ref = GetReferences(tree, "x4").Single(); 5687var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 5688var x5Ref = GetReferences(tree, "x5").Single(); 5692var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 5693var x6Ref = GetReferences(tree, "x6").Single(); 5728var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5779var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5818var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5857var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5894var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5895var x1Ref = GetReferences(tree, "x1").Single(); 5898var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5899var x2Ref = GetReferences(tree, "x2").Single(); 5940var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5978var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6028var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6065var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6112var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6144var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6198var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6236var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6271var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6300var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6322var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6351var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6375var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6398var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6687var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6730var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6735var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 6736var x2Ref = GetReferences(tree, "x2").Single(); 6739var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 6740var x3Ref = GetReferences(tree, "x3").Single(); 6763var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6768var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 6769var x2Ref = GetReferences(tree, "x2").Single(); 6772var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 6773var x3Ref = GetReferences(tree, "x3").Single(); 6805var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6943var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6948var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 6953var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 6959var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 6964var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 6970var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 6988var y12Ref = GetReferences(tree, "y12").Single(); 7041var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7046var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 7051var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7057var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 7062var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7068var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7086var y12Ref = GetReferences(tree, "y12").Single(); 7133var x0Decl = GetPatternDeclarations(tree, "x0").Single(); 7138var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7143var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 7260var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7265var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 7270var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7276var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 7281var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7287var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7305var y12Ref = GetReferences(tree, "y12").Single(); 7315var x15Decl = GetPatternDeclarations(tree, "x15").Single(); 7364var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7369var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 7374var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7380var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 7385var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7391var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7409var y12Ref = GetReferences(tree, "y12").Single(); 7419var x15Decl = GetPatternDeclarations(tree, "x15").Single(); 7453var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7529var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 7530var x3Ref = GetReferences(tree, "x3").Single(); 7533var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7534var x4Ref = GetReferences(tree, "x4").Single(); 7538var x5Ref = GetReferences(tree, "x5").Single(); 7550var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7559var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7578var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 7585var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 7623var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 7624var x3Ref = GetReferences(tree, "x3").Single(); 7627var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7628var x4Ref = GetReferences(tree, "x4").Single(); 7632var x5Ref = GetReferences(tree, "x5").Single(); 7644var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7653var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7672var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 7679var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 7710var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7711var x1Ref = GetReferences(tree, "x1").Single(); 7735var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7736var x1Ref = GetReferences(tree, "x1").Single(); 7931var y1Decl = GetPatternDeclarations(tree, "y1").Single(); 7936var y2Decl = GetPatternDeclarations(tree, "y2").Single(); 7941var z2Decl = GetPatternDeclarations(tree, "z2").Single(); 7948var y3Decl = GetPatternDeclarations(tree, "y3").Single(); 7953var z3Decl = GetPatternDeclarations(tree, "z3").Single(); 7960var y4Decl = GetPatternDeclarations(tree, "y4").Single(); 7965var z4Decl = GetPatternDeclarations(tree, "z4").Single(); 7970var u4Decl = GetPatternDeclarations(tree, "u4").Single(); 7978var v4Decl = GetPatternDeclarations(tree, "v4").Single(); 7986var y5Decl = GetPatternDeclarations(tree, "y5").Single(); 7991var z5Decl = GetPatternDeclarations(tree, "z5").Single(); 7996var u5Decl = GetPatternDeclarations(tree, "u5").Single(); 8004var v5Decl = GetPatternDeclarations(tree, "v5").Single(); 8012var y6Decl = GetPatternDeclarations(tree, "y6").Single(); 8017var z6Decl = GetPatternDeclarations(tree, "z6").Single(); 8024var y7Decl = GetPatternDeclarations(tree, "y7").Single(); 8029var z7Decl = GetPatternDeclarations(tree, "z7").Single(); 8037var u7Decl = GetPatternDeclarations(tree, "u7").Single(); 8045var y8Decl = GetPatternDeclarations(tree, "y8").Single(); 8050var z8Decl = GetPatternDeclarations(tree, "z8").Single(); 8056var y9Decl = GetPatternDeclarations(tree, "y9").Single(); 8061var z9Decl = GetPatternDeclarations(tree, "z9").Single(); 8068var u9Decl = GetPatternDeclarations(tree, "u9").Single(); 8075var y10Decl = GetPatternDeclarations(tree, "y10").Single(); 8081var y11Decl = GetPatternDeclarations(tree, "y11").Single(); 8190var y1Decl = GetPatternDeclarations(tree, "y1").Single(); 8195var y2Decl = GetPatternDeclarations(tree, "y2").Single(); 8200var z2Decl = GetPatternDeclarations(tree, "z2").Single(); 8207var y3Decl = GetPatternDeclarations(tree, "y3").Single(); 8212var z3Decl = GetPatternDeclarations(tree, "z3").Single(); 8219var y4Decl = GetPatternDeclarations(tree, "y4").Single(); 8224var z4Decl = GetPatternDeclarations(tree, "z4").Single(); 8229var u4Decl = GetPatternDeclarations(tree, "u4").Single(); 8237var v4Decl = GetPatternDeclarations(tree, "v4").Single(); 8245var y5Decl = GetPatternDeclarations(tree, "y5").Single(); 8250var z5Decl = GetPatternDeclarations(tree, "z5").Single(); 8255var u5Decl = GetPatternDeclarations(tree, "u5").Single(); 8263var v5Decl = GetPatternDeclarations(tree, "v5").Single(); 8271var y6Decl = GetPatternDeclarations(tree, "y6").Single(); 8276var z6Decl = GetPatternDeclarations(tree, "z6").Single(); 8283var y7Decl = GetPatternDeclarations(tree, "y7").Single(); 8288var z7Decl = GetPatternDeclarations(tree, "z7").Single(); 8296var u7Decl = GetPatternDeclarations(tree, "u7").Single(); 8304var y8Decl = GetPatternDeclarations(tree, "y8").Single(); 8309var z8Decl = GetPatternDeclarations(tree, "z8").Single(); 8315var y9Decl = GetPatternDeclarations(tree, "y9").Single(); 8320var z9Decl = GetPatternDeclarations(tree, "z9").Single(); 8327var u9Decl = GetPatternDeclarations(tree, "u9").Single(); 8334var y10Decl = GetPatternDeclarations(tree, "y10").Single(); 8340var y11Decl = GetPatternDeclarations(tree, "y11").Single(); 8375var yDecl = GetPatternDeclarations(tree, "y1").Single(); 8376var yRef = GetReferences(tree, "y1").Single(); 8482var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 8487var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 8492var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 8498var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 8503var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 8509var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 8522var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 8523var x10Ref = GetReferences(tree, "x10").Single(); 8531var y12Ref = GetReferences(tree, "y12").Single(); 8581var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 8586var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 8591var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 8597var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 8602var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 8608var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 8621var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 8622var x10Ref = GetReferences(tree, "x10").Single(); 8630var y12Ref = GetReferences(tree, "y12").Single();
Semantics\PatternMatchingTests_Scope.cs (558)
213var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 214var x2Ref = GetReferences(tree, "x2").Single(); 217var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 218var x3Ref = GetReferences(tree, "x3").Single(); 221var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 228var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 243var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 244var x9Ref = GetReferences(tree, "x9").Single(); 247var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 248var x10Ref = GetReferences(tree, "x10").Single(); 251var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 256var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 373var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 374var x1Ref = GetReferences(tree, "x1").Single(); 408GetReferences(tree, "SpeculateHere").Single().SpanStart, 414var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 598var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 599var x2Ref = GetReferences(tree, "x2").Single(); 602var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 603var x3Ref = GetReferences(tree, "x3").Single(); 606var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 613var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 625var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 626var x9Ref = GetReferences(tree, "x9").Single(); 629var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 630var x10Ref = GetReferences(tree, "x10").Single(); 633var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 638var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 678var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 679var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 713tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "SpeculateHere").Single().SpanStart, 719var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 868var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 869var x2Ref = GetReferences(tree, "x2").Single(); 872var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 873var x3Ref = GetReferences(tree, "x3").Single(); 876var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 883var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 895var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 896var x9Ref = GetReferences(tree, "x9").Single(); 899var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 900var x10Ref = GetReferences(tree, "x10").Single(); 903var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 908var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 947var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 948var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 982tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "SpeculateHere").Single().SpanStart, 988var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 1158var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1163var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 1168var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1174var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 1181var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 1182var x5Ref = GetReferences(tree, "x5").Single(); 1185var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 1190var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 1196var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 1213var y12Ref = GetReferences(tree, "y12").Single(); 1251var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1252var x1Ref = GetReferences(tree, "x1").Single(); 1286GetReferences(tree, "SpeculateHere").Single().SpanStart, 1292var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1521var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 1522var x3Ref = GetReferences(tree, "x3").Single(); 1525var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 1526var x4Ref = GetReferences(tree, "x4").Single(); 1530var x5Ref = GetReferences(tree, "x5").Single(); 1542var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 1551var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 1570var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 1577var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 1821var y1Decl = GetPatternDeclarations(tree, "y1").Single(); 1826var y2Decl = GetPatternDeclarations(tree, "y2").Single(); 1831var z2Decl = GetPatternDeclarations(tree, "z2").Single(); 1838var y3Decl = GetPatternDeclarations(tree, "y3").Single(); 1843var z3Decl = GetPatternDeclarations(tree, "z3").Single(); 1850var y4Decl = GetPatternDeclarations(tree, "y4").Single(); 1855var z4Decl = GetPatternDeclarations(tree, "z4").Single(); 1860var u4Decl = GetPatternDeclarations(tree, "u4").Single(); 1868var v4Decl = GetPatternDeclarations(tree, "v4").Single(); 1876var y5Decl = GetPatternDeclarations(tree, "y5").Single(); 1881var z5Decl = GetPatternDeclarations(tree, "z5").Single(); 1886var u5Decl = GetPatternDeclarations(tree, "u5").Single(); 1894var v5Decl = GetPatternDeclarations(tree, "v5").Single(); 1902var y6Decl = GetPatternDeclarations(tree, "y6").Single(); 1907var z6Decl = GetPatternDeclarations(tree, "z6").Single(); 1914var y7Decl = GetPatternDeclarations(tree, "y7").Single(); 1919var z7Decl = GetPatternDeclarations(tree, "z7").Single(); 1927var u7Decl = GetPatternDeclarations(tree, "u7").Single(); 1935var y8Decl = GetPatternDeclarations(tree, "y8").Single(); 1940var z8Decl = GetPatternDeclarations(tree, "z8").Single(); 1946var y9Decl = GetPatternDeclarations(tree, "y9").Single(); 1951var z9Decl = GetPatternDeclarations(tree, "z9").Single(); 1958var u9Decl = GetPatternDeclarations(tree, "u9").Single(); 1965var y10Decl = GetPatternDeclarations(tree, "y10").Single(); 1971var y11Decl = GetPatternDeclarations(tree, "y11").Single(); 2072var y4Decl = GetPatternDeclarations(tree, "y4").Single(); 2077var z4Decl = GetPatternDeclarations(tree, "z4").Single(); 2082var u4Decl = GetPatternDeclarations(tree, "u4").Single(); 2090var v4Decl = GetPatternDeclarations(tree, "v4").Single(); 2098var y5Decl = GetPatternDeclarations(tree, "y5").Single(); 2103var z5Decl = GetPatternDeclarations(tree, "z5").Single(); 2108var u5Decl = GetPatternDeclarations(tree, "u5").Single(); 2116var v5Decl = GetPatternDeclarations(tree, "v5").Single(); 2221var yDecl = GetPatternDeclarations(tree, id).Single(); 2485var yDecl = GetPatternDeclarations(tree, id).Single(); 2486var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).Single(); 2555var yDecl = GetPatternDeclarations(tree, id).Single(); 2556var yRef = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(name => name.Identifier.ValueText == id).Single(); 2711var yDecl = GetPatternDeclarations(tree, id).Single(); 2987var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 2988var x3Ref = GetReferences(tree, "x3").Single(); 2991var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 2992var x4Ref = GetReferences(tree, "x4").Single(); 2996var x5Ref = GetReferences(tree, "x5").Single(); 3008var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3015var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 3021var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 3027var x13Decl = GetPatternDeclarations(tree, "x13").Single(); 3028var x13Ref = GetReferences(tree, "x13").Single(); 3156var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3157var x3Ref = GetReferences(tree, "x3").Single(); 3160var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3161var x4Ref = GetReferences(tree, "x4").Single(); 3165var x5Ref = GetReferences(tree, "x5").Single(); 3177var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3184var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 3185var x11Ref = GetReferences(tree, "x11").Single(); 3271var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3272var x3Ref = GetReferences(tree, "x3").Single(); 3275var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3276var x4Ref = GetReferences(tree, "x4").Single(); 3280var x5Ref = GetReferences(tree, "x5").Single(); 3292var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3299var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 3300var x11Ref = GetReferences(tree, "x11").Single(); 3360var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3361var x3Ref = GetReferences(tree, "x3").Single(); 3364var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3365var x4Ref = GetReferences(tree, "x4").Single(); 3369var x5Ref = GetReferences(tree, "x5").Single(); 3381var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3388var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 3393var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 3448var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3449var x3Ref = GetReferences(tree, "x3").Single(); 3452var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3453var x4Ref = GetReferences(tree, "x4").Single(); 3457var x5Ref = GetReferences(tree, "x5").Single(); 3469var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3535var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3536var x3Ref = GetReferences(tree, "x3").Single(); 3539var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3540var x4Ref = GetReferences(tree, "x4").Single(); 3544var x5Ref = GetReferences(tree, "x5").Single(); 3556var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3611var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3612var x3Ref = GetReferences(tree, "x3").Single(); 3615var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3616var x4Ref = GetReferences(tree, "x4").Single(); 3620var x5Ref = GetReferences(tree, "x5").Single(); 3632var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3708var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3709var x3Ref = GetReferences(tree, "x3").Single(); 3712var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3713var x4Ref = GetReferences(tree, "x4").Single(); 3717var x5Ref = GetReferences(tree, "x5").Single(); 3729var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3799var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3800var x3Ref = GetReferences(tree, "x3").Single(); 3803var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3804var x4Ref = GetReferences(tree, "x4").Single(); 3808var x5Ref = GetReferences(tree, "x5").Single(); 3820var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3889var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3890var x3Ref = GetReferences(tree, "x3").Single(); 3893var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3894var x4Ref = GetReferences(tree, "x4").Single(); 3898var x5Ref = GetReferences(tree, "x5").Single(); 3910var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 3981var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 3982var x3Ref = GetReferences(tree, "x3").Single(); 3985var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 3986var x4Ref = GetReferences(tree, "x4").Single(); 3990var x5Ref = GetReferences(tree, "x5").Single(); 4002var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 4077var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4078var x3Ref = GetReferences(tree, "x3").Single(); 4081var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 4082var x4Ref = GetReferences(tree, "x4").Single(); 4086var x5Ref = GetReferences(tree, "x5").Single(); 4098var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 4223var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4226var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 4227var x4Ref = GetReferences(tree, "x4").Single(); 4232var x5Ref = GetReferences(tree, "x5").Single(); 4514var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4519var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4524var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 4531var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4547var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 4556var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 4564var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 4914var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 4919var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 4924var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 4931var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 4947var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 4956var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 4964var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 5214var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5219var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 5227var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 5232var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 5237var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 5307var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5308var x1Ref = GetReferences(tree, "x1").Single(); 5342GetReferences(tree, "SpeculateHere").Single().SpanStart, 5348var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5502var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5507var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5512var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 5518var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 5523var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 5529var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 5542var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 5543var x10Ref = GetReferences(tree, "x10").Single(); 5551var y12Ref = GetReferences(tree, "y12").Single(); 5709var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5714var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5719var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 5725var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 5730var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 5736var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 5749var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 5750var x10Ref = GetReferences(tree, "x10").Single(); 5758var y12Ref = GetReferences(tree, "y12").Single(); 5916var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 5921var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 5926var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 5932var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 5937var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 5943var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 5956var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 5957var x10Ref = GetReferences(tree, "x10").Single(); 5965var y12Ref = GetReferences(tree, "y12").Single(); 6025var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6032var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 6106var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6118var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 6123var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 6189var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6190var x1Ref = GetReferences(tree, "x1").Single(); 6193var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 6200var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 6201var x6Ref = GetReferences(tree, "x6").Single(); 6204var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 6210var x14Ref = GetReferences(tree, "x14").Single(); 6276var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6277var x1Ref = GetReferences(tree, "x1").Single(); 6280var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 6287var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 6288var x6Ref = GetReferences(tree, "x6").Single(); 6291var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 6297var x14Ref = GetReferences(tree, "x14").Single(); 6350var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6357var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 6420var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6432var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 6437var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 6472GetReferences(tree, "SpeculateHere").Single().SpanStart, 6478var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6520var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6521var x1Ref = GetReferences(tree, "x1").Single(); 6525var d = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "d").Single(); 6590var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 6591var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 6594var x4Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x4").Single(); 6601var x6Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x6").Single(); 6602var x6Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x6").Single(); 6605var x8Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x8").Single(); 6611var x14Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x14").Single(); 6679var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 6680var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 6683var x4Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x4").Single(); 6690var x6Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x6").Single(); 6691var x6Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x6").Single(); 6694var x8Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x8").Single(); 6700var x14Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x14").Single(); 6845var x3Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x3").Single(); 6850var x4Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x4").Single(); 6884bool success = model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "SpeculateHere").Single().SpanStart, statement, out model); 6889var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 6930var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 6936var d = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(id => id.Identifier.ValueText == "d").Single(); 7087var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7092var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 7097var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7103var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 7108var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7114var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7132var y12Ref = GetReferences(tree, "y12").Single(); 7177var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7178var x1Ref = GetReferences(tree, "x1").Single(); 7212GetReferences(tree, "SpeculateHere").Single().SpanStart, 7218var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7409var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7414var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 7419var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7425var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 7430var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7436var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7454var y12Ref = GetReferences(tree, "y12").Single(); 7500var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7501var x1Ref = GetReferences(tree, "x1").Single(); 7535GetReferences(tree, "SpeculateHere").Single().SpanStart, 7541var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7724var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7729var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 7734var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7740var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 7745var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7751var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7769var y12Ref = GetReferences(tree, "y12").Single(); 7953var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 7958var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 7963var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 7969var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 7974var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 7980var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 7998var y12Ref = GetReferences(tree, "y12").Single(); 8203var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 8209var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 8215var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 8222var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 8228var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 8234var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 8255var y12Ref = GetReferences(tree, "y12").Single(); 8443var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 8448var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 8453var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 8459var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 8464var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 8470var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 8488var y12Ref = GetReferences(tree, "y12").Single(); 8675var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 8680var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 8685var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 8691var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 8696var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 8702var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 8720var y12Ref = GetReferences(tree, "y12").Single(); 8991var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 8992var x1Ref = GetReferences(tree, "x1").Single(); 8996var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 8997var x2Ref = GetReferences(tree, "x2").Single(); 9000var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 9001var x3Ref = GetReferences(tree, "x3").Single(); 9004var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 9005var x4Ref = GetReferences(tree, "x4").Single(); 9009var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 9010var x5Ref = GetReferences(tree, "x5").Single(); 9013var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 9014var x6Ref = GetReferences(tree, "x6").Single(); 9017var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 9018var x7Ref = GetReferences(tree, "x7").Single(); 9083var x15Decl = GetPatternDeclarations(tree, "x15").Single(); 9134var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 9306var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 9311var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 9316var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 9322var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 9327var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 9333var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 9351var y12Ref = GetReferences(tree, "y12").Single(); 9361var x15Decl = GetPatternDeclarations(tree, "x15").Single(); 9515var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 9520var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 9525var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 9533var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 9538var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 9544var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 9561var y12Ref = GetReferences(tree, "y12").Single(); 9606var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 9607var x1Ref = GetReferences(tree, "x1").Single(); 9641GetReferences(tree, "SpeculateHere").Single().SpanStart, 9647var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 9801var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 9806var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 9811var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 9817var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 9822var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 9828var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 9846var y12Ref = GetReferences(tree, "y12").Single(); 9930var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 9937var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 9942var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 10086var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 10087var x2Ref = GetReferences(tree, "x2").Single(); 10090var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 10091var x3Ref = GetReferences(tree, "x3").Single(); 10094var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 10101var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 10116var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 10117var x9Ref = GetReferences(tree, "x9").Single(); 10120var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 10125var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 10166var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 10167var x1Ref = GetReferences(tree, "x1").Single(); 10204GetReferences(tree, "SpeculateHere").Single().SpanStart, 10210var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 10368var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 10373var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 10379var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 10384var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 10390var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 10415var x15Decl = GetPatternDeclarations(tree, "x15").Single(); 10597var x2Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x2").Single(); 10598var x2Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x2").Single(); 10601var x3Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x3").Single(); 10602var x3Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x3").Single(); 10605var x4Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x4").Single(); 10612var x5Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x5").Single(); 10627var x9Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x9").Single(); 10628var x9Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x9").Single(); 10631var x10Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x10").Single(); 10632var x10Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x10").Single(); 10635var x11Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x11").Single(); 10640var x12Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x12").Single(); 10685var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 10686var x1Ref = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x1").Single(); 10720tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "SpeculateHere").Single().SpanStart, 10726var x1Decl = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(p => p.Identifier.ValueText == "x1").Single(); 11011var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 11016var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 11021var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 11028var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 11044var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 11053var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 11061var x12Decl = GetPatternDeclarations(tree, "x12").Single(); 11132var yRef = GetReferences(tree, "y1").Single(); 11180var yRef = GetReferences(tree, "y1").Single(); 11230var yRef = GetReferences(tree, "y1").Single(); 11273var yRef = GetReferences(tree, "y1").Single(); 11316var yRef = GetReferences(tree, "y1").Single(); 11362var yRef = GetReferences(tree, "y1").Single(); 11405var yRef = GetReferences(tree, "y1").Single(); 11450var yRef = GetReferences(tree, "y1").Single(); 11453var zRef = GetReferences(tree, "z1").Single(); 11496var xRef = GetReferences(tree, "x1").Single(); 11499var yRef = GetReferences(tree, "y1").Single(); 11502var zRef = GetReferences(tree, "z1").Single(); 11548var xRef = GetReferences(tree, "x1").Single(); 11611var xRef = GetReferences(tree, "x1").Single(); 11614var yRef = GetReferences(tree, "y1").Single(); 11666var y1Ref = GetReferences(tree, "y1").Single(); 11669var z0Ref = GetReferences(tree, "z0").Single(); 11672var z1Ref = GetReferences(tree, "z1").Single(); 11726var y1Ref = GetReferences(tree, "y1").Single(); 11729var z0Ref = GetReferences(tree, "z0").Single(); 11732var z1Ref = GetReferences(tree, "z1").Single(); 11735var z2Ref = GetReferences(tree, "z2").Single(); 11807var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 11808var x1Ref = GetReferences(tree, "x1").Single(); 11812var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 11820var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 11821var x6Ref = GetReferences(tree, "x6").Single(); 11825var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 11832var x14Ref = GetReferences(tree, "x14").Single(); 11904var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 11912var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 11920var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 11993var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 12007var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 12013var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 12091var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 12105var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 12111var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 12146bool success = model.TryGetSpeculativeSemanticModel(GetReferences(tree, "SpeculateHere").Single().SpanStart, statement, out model); 12151var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 12204var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 12211var e = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(id => id.Identifier.ValueText == "e").Single(); 12248var y1Decl = GetPatternDeclarations(tree, "y1").Single(); 12477var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 12483var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 12489var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 12496var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 12502var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 12509var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 12529var y12Ref = GetReferences(tree, "y12").Single(); 12644var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 12651var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 12652var x7Ref = GetReferences(tree, "x7").Single(); 12835var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 12841var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 12847var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 12854var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 12860var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 12867var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 12882var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 12883var x10Ref = GetReferences(tree, "x10").Single(); 12892var y12Ref = GetReferences(tree, "y12").Single(); 12956var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 12964var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 13048var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 13062var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 13068var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 13230var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 13236var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 13242var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 13249var x6Decl = GetPatternDeclarations(tree, "x6").Single(); 13255var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 13262var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 13282var y12Ref = GetReferences(tree, "y12").Single(); 13373var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 13381var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 13387var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 13447var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 13448var x3Ref = GetReferences(tree, "x3").Single(); 13452var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 13453var x4Ref = GetReferences(tree, "x4").Single(); 13458var x5Ref = GetReferences(tree, "x5").Single(); 13472var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 13535var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 13536var x3Ref = GetReferences(tree, "x3").Single(); 13540var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 13541var x4Ref = GetReferences(tree, "x4").Single(); 13546var x5Ref = GetReferences(tree, "x5").Single(); 13560var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 13612var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 13613var x3Ref = GetReferences(tree, "x3").Single(); 13617var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 13618var x4Ref = GetReferences(tree, "x4").Single(); 13623var x5Ref = GetReferences(tree, "x5").Single(); 13637var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 13691var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 13692var x3Ref = GetReferences(tree, "x3").Single(); 13696var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 13697var x4Ref = GetReferences(tree, "x4").Single(); 13702var x5Ref = GetReferences(tree, "x5").Single(); 13716var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 13758var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 13788var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 13822var designation = GetPatternDeclarations(tree).Single(); 14028var x2Decl = GetPatternDeclarations(tree, "x2").Single(); 14029var x2Ref = GetReferences(tree, "x2").Single(); 14032var x3Decl = GetPatternDeclarations(tree, "x3").Single(); 14033var x3Ref = GetReferences(tree, "x3").Single(); 14036var x4Decl = GetPatternDeclarations(tree, "x4").Single(); 14043var x5Decl = GetPatternDeclarations(tree, "x5").Single(); 14058var x7Decl = GetPatternDeclarations(tree, "x7").Single(); 14059var x7Ref = GetReferences(tree, "x7").Single(); 14062var x8Decl = GetPatternDeclarations(tree, "x8").Single(); 14063var x8Ref = GetReferences(tree, "x8").Single(); 14066var x9Decl = GetPatternDeclarations(tree, "x9").Single(); 14071var x10Decl = GetPatternDeclarations(tree, "x10").Single(); 14076var x11Decl = GetPatternDeclarations(tree, "x11").Single(); 14078var x11Decl2 = GetVariableDeclarations(tree, "x11").Single();
Semantics\PatternMatchingTests2.cs (2)
2020var returnStatement = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single(); 2061var returnStatement = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single();
Semantics\PatternMatchingTests3.cs (1)
1611var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single();
Semantics\PatternMatchingTests4.cs (11)
4017var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchStatementSyntax>().Single(); 4086var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchStatementSyntax>().Single(); 4159var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchStatementSyntax>().Single(); 4231var @is = tree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 4275var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchExpressionSyntax>().Single(); 4322var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchExpressionSyntax>().Single(); 4404var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchExpressionSyntax>().Single(); 4486var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchExpressionSyntax>().Single(); 4568var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchExpressionSyntax>().Single(); 4650var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchExpressionSyntax>().Single(); 4734var @switch = tree.GetRoot().DescendantNodes().OfType<SwitchExpressionSyntax>().Single();
Semantics\PatternMatchingTests5.cs (5)
427var isPattern = tree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 564var isPattern = tree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 795var isPattern = tree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 841var isPattern = tree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 895var isPattern = tree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single();
Semantics\PatternSwitchTests.cs (10)
1515var sRef = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "s").Single(); 1517var iRef = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "i").Single(); 1519var s2Ref = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "s2").Single(); 1521var i2Ref = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.ToString() == "i2").Single(); 1898var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1899var x1Ref = GetReferences(tree, "x1").Single(); 1933var x1Decl = GetPatternDeclarations(tree, "x1").Single(); 1934var x1Ref = GetReferences(tree, "x1").Single(); 3255.Single(); 3286.Single();
Semantics\PrimaryConstructorTests.cs (110)
134Assert.Equal(MethodKind.Constructor, members.Cast<MethodSymbol>().Single().MethodKind); 961var outVarSyntax = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Single(); 1085var baseWithargs = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single(); 1194var baseWithargs = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 2118var baseWithargs = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single(); 2173Assert.False(model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, 2217Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single().ArgumentList.OpenParenToken.SpanStart, 2221var baseWithargs = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 2300var baseWithargs = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single(); 2325Assert.False(model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, 2356Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single().ArgumentList.OpenParenToken.SpanStart, 2360var baseWithargs = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 2489var baseWithoutParens = tree.GetRoot().DescendantNodes().OfType<SimpleBaseTypeSyntax>().Single(); 2652var typeDeclaration = tree.GetRoot().DescendantNodes().OfType<TypeDeclarationSyntax>().Single(); 6090var doc = tree.GetRoot().DescendantTrivia().Select(trivia => trivia.GetStructure()).OfType<DocumentationCommentTriviaSyntax>().Single(); 6091var x = doc.DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 6832var xReference = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single().ArgumentList.Arguments[0].Expression; 6858var mCall = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single().ArgumentList.Arguments[0].Expression; 6859var attrApplication = tree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single(); 6860var mDefinition = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 7794var p1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "p1").Single(); 7837var capturedParameters = comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters(); 8702Assert.Empty(((CSharpCompilation)verifier.Compilation).GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9885Assert.Empty(comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9945Assert.Equal(1, comp.GetTypeByMetadataName("C2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 9946Assert.Empty(comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9998Assert.Empty(comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 9999Assert.Equal(1, comp.GetTypeByMetadataName("C2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 10000Assert.Equal(1, comp.GetTypeByMetadataName("C3").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 10001Assert.Equal(2, comp.GetTypeByMetadataName("C4").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 10020Assert.Equal(1, comp.GetTypeByMetadataName("C3").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 10047Assert.Equal(2, comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 10149Assert.Equal(1, comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 10192Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10227Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10270Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10308Assert.NotEmpty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10339Assert.NotEmpty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10379Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10415Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10451Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10490Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10529Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10565Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10601Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10640Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10679Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10718Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10754Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10790Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10830Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10877Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10921Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 10961Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11004Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11051Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11093Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11138Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11173Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11203Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11238Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11268Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11303Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11334Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11370Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11401Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11444Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11483Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11522Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11562Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11605Assert.Empty(comp.GetTypeByMetadataName("Color+C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11795Assert.Equal(isStatic, comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().IsEmpty()); 11839Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11840Assert.Empty(comp.GetTypeByMetadataName("S2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11841Assert.NotEmpty(comp.GetTypeByMetadataName("S3").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11913Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11949Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 11992Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 12040Assert.Equal("System.String P1", comp1.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Single().Key.ToTestDisplayString()); 12041Assert.Equal("System.Int32 p2", comp1.GetTypeByMetadataName("C2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Single().Key.ToTestDisplayString()); 12042Assert.Equal(2, comp1.GetTypeByMetadataName("C3").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters().Count); 12072Assert.Empty(comp2.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 12073Assert.Empty(comp2.GetTypeByMetadataName("C2").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 12113Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 12157Assert.Empty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 12203Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 14619Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 14815Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 15016Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 15242Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 15553Assert.All(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetBackingFields(), f => Assert.True(f.IsReadOnly)); 16378Assert.NotEmpty(comp.GetTypeByMetadataName("S1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 19754Assert.Single(comp.GetTypeByMetadataName("C1").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 19772var indexer = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 20209Assert.Empty(comp.GetTypeByMetadataName("C").InstanceConstructors.OfType<SynthesizedPrimaryConstructor>().Single().GetCapturedParameters()); 20598var typeDeclaration = tree.GetRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Single(); 20603var namedType = symbols.OfType<INamedTypeSymbol>().Single(); 20604var primaryConstructor = symbols.OfType<IMethodSymbol>().Single(); 20637var namedType1 = symbols1.OfType<INamedTypeSymbol>().Single(); 20638var primaryConstructor1 = symbols1.OfType<IMethodSymbol>().Single(); 20647var namedType2 = symbols2.OfType<INamedTypeSymbol>().Single(); 20681var namedType1 = symbols1.OfType<INamedTypeSymbol>().Single(); 20682var primaryConstructor1 = symbols1.OfType<IMethodSymbol>().Single(); 20691var namedType2 = symbols2.OfType<INamedTypeSymbol>().Single(); 20728var namedType1 = symbols1.OfType<INamedTypeSymbol>().Single(); 20736var namedType2 = symbols2.OfType<INamedTypeSymbol>().Single(); 20737var primaryConstructor2 = symbols2.OfType<IMethodSymbol>().Single(); 20778var namedType1 = symbols1.OfType<INamedTypeSymbol>().Single(); 20779var primaryConstructor1 = symbols1.OfType<IMethodSymbol>().Single(); 20788var namedType2 = symbols2.OfType<INamedTypeSymbol>().Single();
Semantics\RecordTests.cs (25)
282var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 448var parameterSyntax = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single(); 454var initializerSyntax = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 480var outVarSyntax = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Single(); 8603var withExpr = root.DescendantNodes().OfType<WithExpressionSyntax>().Single(); 8630var main = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 8717var withExpr = root.DescendantNodes().OfType<WithExpressionSyntax>().Single(); 8735var main = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 8878var withExpr2 = root.DescendantNodes().OfType<WithExpressionSyntax>().Skip(1).Single(); 21157var baseWithargs = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single(); 21268var baseWithargs = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 22230var baseWithargs = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single(); 22285Assert.False(model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, 22329Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single().ArgumentList.OpenParenToken.SpanStart, 22333var baseWithargs = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 22412var baseWithargs = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single(); 22437Assert.False(model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, 22468Assert.Equal(TypeInfo.None, model.GetSpeculativeTypeInfo(tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single().ArgumentList.OpenParenToken.SpanStart, 22472var baseWithargs = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 24654var recordDeclaration = tree.GetRoot().DescendantNodes().OfType<RecordDeclarationSyntax>().Single(); 28187var x = doc.DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 30371var xReference = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single().ArgumentList.Arguments[0].Expression; 30395var mCall = tree.GetRoot().DescendantNodes().OfType<PrimaryConstructorBaseTypeSyntax>().Single().ArgumentList.Arguments[0].Expression; 30396var attrApplication = tree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single(); 30397var mDefinition = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (2)
EndToEndTests.cs (2)
491var node = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 865var isPattern = tree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Features (22)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
268var newClosingPoint = newRoot.GetAnnotatedTokens(s_closingBraceFormatAnnotation).Single().SpanStart + 1;
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
256.Single()
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
238var container = root.GetAnnotatedNodes(ContainerAnnotation).Single();
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
262var selectExpression = invocationExpression.ArgumentList.Arguments.Single().Expression;
ConvertLinq\ConvertForEachToLinqQuery\DefaultConverter.cs (2)
68identifiers.Single(), 70IdentifierName(identifiers.Single()),
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
386var constructor = (ConstructorDeclarationSyntax)formattedRoot.GetAnnotatedNodes(constructorAnnotation).Single();
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
53var firstGlobalStatement = newRoot.Members.OfType<GlobalStatementSyntax>().Single();
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
286return _statementsOrMemberOrAccessorToInsert.Cast<StatementSyntax>().Single();
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
172newEnclosingStatement = updatedRoot.GetAnnotatedNodesAndTokens(enclosingStatementAnnotation).Single().AsNode();
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
324var statement = innermostStatements.Single();
Snippets\AbstractCSharpForLoopSnippetProvider.cs (2)
94var incrementor = forStatement.Incrementors.Single(); 96var variableDeclarator = declaration!.Variables.Single();
Snippets\CSharpConstructorSnippetProvider.cs (1)
46precedingModifiers.Count == 1 && precedingModifiers.Single() == SyntaxKind.StaticKeyword))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
1186var expression = arguments.Single().Expression;
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
65var newInfo = speculativeModel.GetTypeInfo(dummyStatement.GetAnnotatedNodes(s_annotation).Single());
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (2)
115var fileScopedNamespace = (FileScopedNamespaceDeclarationSyntax)root.GetAnnotatedNodes(annotation).Single(); 201var blockScopedNamespace = (NamespaceDeclarationSyntax)root.GetAnnotatedNodes(annotation).Single();
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
53classOrStructKeyword = tokens.Single();
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
125varDecl.Variables.Single().Identifier.Parent!,
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
253var currentDeclaration = currentRoot.GetCurrentNodes(declaration).Single();
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
179var currentNode = root.GetAnnotatedNodes(s_referenceAnnotation).Single();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (37)
Diagnostics\Suppression\SuppressionTests.cs (4)
759var compilationOptions = solution.Projects.Single().CompilationOptions; 762var updatedSolution = solution.WithProjectCompilationOptions(solution.ProjectIds.Single(), compilationOptions); 1001var compilationOptions = solution.Projects.Single().CompilationOptions; 1004var updatedSolution = solution.WithProjectCompilationOptions(solution.ProjectIds.Single(), compilationOptions);
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (28)
302var oldProject = oldSolution.Projects.Single(); 303var oldDocument = oldProject.Documents.Single(); 369var oldProject = oldSolution.Projects.Single(); 370var oldDocument = oldProject.Documents.Single(); 396var oldProject = oldSolution.Projects.Single(); 397var oldDocument = oldProject.Documents.Single(); 430var oldProject = oldSolution.Projects.Single(); 431var oldDocument = oldProject.Documents.Single(); 466var oldProject = oldSolution.Projects.Single(); 467var oldDocument = oldProject.Documents.Single(); 512var oldProject = oldSolution.Projects.Single(); 513var oldDocument = oldProject.Documents.Single(); 544var oldProject = oldSolution.Projects.Single(); 545var oldDocument = oldProject.Documents.Single(); 581var oldProject = oldSolution.Projects.Single(); 582var oldDocument = oldProject.Documents.Single(); 620var oldProject = oldSolution.Projects.Single(); 621var oldDocument = oldProject.Documents.Single(); 663var oldProject = oldSolution.Projects.Single(); 667var newProject = newSolution.Projects.Single(); 683Assert.Empty(result.Single().RudeEdits); 709var oldProject = oldSolution.Projects.Single(); 713var newProject = newSolution.Projects.Single(); 729Assert.Empty(result.Single().RudeEdits); 742var oldProject = oldSolution.Projects.Single(); 745var newProject = newSolution.Projects.Single(); 797var oldProject = oldSolution.Projects.Single(); 798var documentId = oldProject.Documents.Single().Id;
EditAndContinue\SyntaxUtilitiesTests.cs (3)
193DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 196DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 199DescendantNodes().OfType<AnonymousFunctionExpressionSyntax>().Single();
SemanticSearch\CSharpSemanticSearchServiceTests.cs (2)
180var exception = exceptions.Single(); 238var exception = exceptions.Single();
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (74)
IOperation\IOperationTests.cs (7)
181var m = comp.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType<BlockSyntax>().Single(); 311var op = (IForLoopOperation)comp.GetSemanticModel(tree).GetOperation(tree.GetRoot().DescendantNodes().OfType<ForStatementSyntax>().Single()); 379var op = (IForEachLoopOperation)comp.GetSemanticModel(tree).GetOperation(tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single()); 509var statement = tree.GetRoot().DescendantNodes().OfType<StatementSyntax>().Single(); 588var literal = root.DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 589var methodDeclSyntax = literal.Ancestors().OfType<MethodDeclarationSyntax>().Single(); 667var catchBlock = syntaxTree.GetRoot().DescendantNodes().OfType<CatchClauseSyntax>().Single();
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (7)
409var variableDeclaration = syntaxTree.GetRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Single(); 410var lambdaSyntax = (LambdaExpressionSyntax)variableDeclaration.Declaration.Variables.Single().Initializer.Value; 489var variableDeclaration = syntaxTree.GetRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Single(); 490var lambdaSyntax = (LambdaExpressionSyntax)variableDeclaration.Declaration.Variables.Single().Initializer.Value; 847var graphM = ControlFlowGraph.Create((IMethodBodyOperation)semanticModel.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single())); 877return graph.Blocks.SelectMany(b => b.Operations.SelectMany(o => o.DescendantsAndSelf())).OfType<IFlowAnonymousFunctionOperation>().Single(); 902var graphM = ControlFlowGraph.Create((IMethodBodyOperation)semanticModel.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single()));
IOperation\IOperationTests_IArgument.cs (1)
4096var conversion = operation.Descendants().OfType<IConversionOperation>().Single();
IOperation\IOperationTests_ICoalesceAssignmentOperation.cs (1)
253var m = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single();
IOperation\IOperationTests_ICoalesceOperation.cs (11)
36var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 147var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 262var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 377var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 493var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 606var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 721var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 837var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 951var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 1053var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 1168var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single();
IOperation\IOperationTests_ICompoundAssignmentOperation.cs (1)
87var outSymbol = implicitSymbols.Where(sym => sym != inSymbol).Single();
IOperation\IOperationTests_IConstructorBodyOperation.cs (14)
40var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 67var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 123var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 189var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 257var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 323var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 398var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 487var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 514var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 589var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 1072var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 1092var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 1125var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 1163var node1 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Skip(1).Single();
IOperation\IOperationTests_IFieldReferenceExpression.cs (3)
707var classDecl = root.DescendantNodes().OfType<ClassDeclarationSyntax>().Single(); 711var methodDecl = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 713var fieldReferenceOperation = methodBlockOperation.Descendants().OfType<IFieldReferenceOperation>().Single();
IOperation\IOperationTests_IFixedStatement.cs (1)
693var expr = tree.GetRoot().DescendantNodes().OfType<ConditionalExpressionSyntax>().Single();
IOperation\IOperationTests_IMethodBodyOperation.cs (23)
35var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 56var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 109var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 171var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 243var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 285var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 333var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 400var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 562var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 581var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 613var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 657var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 704var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 723var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 755var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 799var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 846var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 865var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 897var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 938var node1 = tree.GetRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Single(); 978var node1 = tree.GetRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single(); 1000var node1 = tree.GetRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single(); 1124var node1 = tree.GetRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single();
IOperation\IOperationTests_IObjectCreationExpression.cs (5)
782var m1 = comp.SyntaxTrees[0].GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 1069var main = comp.SyntaxTrees[0].GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 1295var m1 = comp.SyntaxTrees[0].GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 1574var main = comp.SyntaxTrees[0].GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 2276var m = comp.SyntaxTrees[0].GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (6)
InteractiveSessionReferencesTests.cs (2)
153var m = s1.GetCompilation().Assembly.Modules.Single(); 155var missingB = m.ReferencedAssemblySymbols.Single(a => a.Name == "libA").Modules.Single().ReferencedAssemblySymbols.Single(a => a.Name == "libB");
InteractiveSessionTests.cs (3)
280var dllImport = (DllImportAttribute)m.GetCustomAttributes(typeof(DllImportAttribute), inherit: false).Single(); 507return c.GlobalNamespace.GetMembers(name).Single() as INamedTypeSymbol; 1179var tree = compilation.SyntaxTrees.Single();
ObjectFormatterTests.cs (1)
885var constructor = typeof(object).GetTypeInfo().DeclaredConstructors.Single();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (781)
Semantics\AccessCheckTests.cs (16)
740INamedTypeSymbol classA = globalNS.GetMembers("A").Single() as INamedTypeSymbol; 743IAliasSymbol aliasA = model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Where(u => u.Alias != null).Single()) as IAliasSymbol; 744INamedTypeSymbol classADerived = globalNS.GetMembers("ADerived").Single() as INamedTypeSymbol; 745INamedTypeSymbol classADerived2 = globalNS.GetMembers("ADerived2").Single() as INamedTypeSymbol; 746INamedTypeSymbol classB = globalNS.GetMembers("B").Single() as INamedTypeSymbol; 860INamedTypeSymbol classOther = otherGlobalNS.GetMembers("Other").Single() as INamedTypeSymbol; 897IAliasSymbol SomeAlias = model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Where(u => u.Alias != null).Single()); 901INamedTypeSymbol Outer = globalNS.GetMembers("Outer").Single() as INamedTypeSymbol; 908INamedTypeSymbol Other = globalNS.GetMembers("Other").Single() as INamedTypeSymbol; 909INamedTypeSymbol Private = globalNS.GetMembers("Private").Single() as INamedTypeSymbol; 911IMethodSymbol IntegerPlus = model.GetSymbolInfo(tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single()).Symbol as IMethodSymbol; 912INamedTypeSymbol Derived = globalNS.GetMembers("Derived").Single() as INamedTypeSymbol; 959var classC = compilation.GlobalNamespace.GetMembers("C").OfType<INamedTypeSymbol>().Single(); 960var classQ = compilation.GlobalNamespace.GetMembers("Q").OfType<INamedTypeSymbol>().Single(); 969var c2 = ((Compilation)c).GlobalNamespace.GetMembers("C").OfType<INamedTypeSymbol>().Single(); 973classQ = ((Compilation)c).GlobalNamespace.GetMembers("Q").OfType<INamedTypeSymbol>().Single();
Semantics\AnonymousFunctionTests.cs (6)
983var anonymousMethodSyntax = root.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 984var simpleLambdaSyntax = root.DescendantNodes().OfType<SimpleLambdaExpressionSyntax>().Single(); 985var parenthesizedLambdaSyntax = root.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 1017var anonymousMethodSyntax = root.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 1018var simpleLambdaSyntax = root.DescendantNodes().OfType<SimpleLambdaExpressionSyntax>().Single(); 1019var parenthesizedLambdaSyntax = root.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single();
Semantics\BindingAsyncTests.cs (2)
58var simple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<SimpleLambdaExpressionSyntax>().Single(); 87var del = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single();
Semantics\BindingTests.cs (18)
2365var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.ThisExpression)).Cast<ThisExpressionSyntax>().Single(); 2384var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.ThisExpression)).Cast<ThisExpressionSyntax>().Single(); 2888var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.SimpleLambdaExpression)).Single(); 2889var param = node.ChildNodes().Where(n => n.IsKind(SyntaxKind.Parameter)).Single(); 2925var lambda = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.SimpleLambdaExpression)).Single(); 2927var param = lambda.ChildNodes().Where(n => n.IsKind(SyntaxKind.Parameter)).Single(); 2967var lambda = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.SimpleLambdaExpression)).Single(); 2969var param = lambda.ChildNodes().Where(n => n.IsKind(SyntaxKind.Parameter)).Single(); 3037var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Use").Single().Parent; 3051var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "AuthenticateAsync").Single().Parent; 3117var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Use").Single().Parent; 3131var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "AuthenticateAsync").Single().Parent; 3190var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Use").Single().Parent; 3205var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "AuthenticateAsync").Single().Parent; 3275var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Use").Single().Parent; 3290var node = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "AuthenticateAsync").Single().Parent; 3380var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "MathMin").Single().Parent; 3732var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "E").Single().Parent;
Semantics\ColorColorTests.cs (8)
1882var node1 = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 1892var node2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.Text == "E" && (n.Parent is EqualsValueClauseSyntax)).Single(); 1939var node1 = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 1949var node2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.Text == "E" && (n.Parent is EqualsValueClauseSyntax)).Single(); 1996var node1 = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 2006var node2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.Text == "E" && (n.Parent is EqualsValueClauseSyntax)).Single(); 2046var node1 = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 2055var node2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.Text == "E" && (n.Parent is EqualsValueClauseSyntax)).Single();
Semantics\ConditionalOperatorTests.cs (3)
1346var memberBinding = tree.GetRoot().DescendantNodes().OfType<MemberBindingExpressionSyntax>().Single(); 1400var memberBinding = tree.GetRoot().DescendantNodes().OfType<MemberBindingExpressionSyntax>().Single(); 1447var memberBinding = tree.GetRoot().DescendantNodes().OfType<MemberBindingExpressionSyntax>().Single();
Semantics\ConstantTests.cs (1)
3521var initializer = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer.Value;
Semantics\DeconstructionTests.cs (17)
4176Assert.Same(x1, model.GetSymbolInfo(refs.Where(r => r.Identifier.ValueText == "x1").Single()).Symbol); 4181Assert.Same(x2, model.GetSymbolInfo(refs.Where(r => r.Identifier.ValueText == "x2").Single()).Symbol); 4314var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 4445var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 4579var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 4942var declaration = tree.GetCompilationUnitRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 4988var declaration = tree.GetCompilationUnitRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 5046var declaration = tree.GetCompilationUnitRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 5709var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 5819var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 5925var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 5986var mainCall = tree.GetRoot().DescendantNodes().OfType<ExpressionSyntax>().Where(n => n.ToString() == "Main()").Single(); 6029var mainCall = tree.GetRoot().DescendantNodes().OfType<ExpressionSyntax>().Where(n => n.ToString() == "Main()").Single(); 6069var mainCall = tree.GetRoot().DescendantNodes().OfType<ExpressionSyntax>().Where(n => n.ToString() == "Main()").Single(); 6111var two = tree.GetRoot().DescendantNodes().OfType<ExpressionSyntax>().Where(n => n.ToString() == "2").Single(); 6151var mainCall = tree.GetRoot().DescendantNodes().OfType<ExpressionSyntax>().Where(n => n.ToString() == "Main()").Single(); 6554var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single();
Semantics\DelegateTypeTests.cs (31)
749var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 795var expr = ((CastExpressionSyntax)tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value).Expression; 895var expr = tree.GetRoot().DescendantNodes().OfType<AnonymousFunctionExpressionSyntax>().Single(); 938var expr = ((CastExpressionSyntax)tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value).Expression; 996var expr = tree.GetRoot().DescendantNodes().OfType<AnonymousFunctionExpressionSyntax>().Single(); 1036var expr = ((CastExpressionSyntax)tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value).Expression; 1211var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1247var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1332var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1372var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1415var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1459var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1554var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1634var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1684var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1734var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1784var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1834var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1884var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1934var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 1980var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 2028var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 8028var expr = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer!.Value; 8051var expr = tree.GetRoot().DescendantNodes().OfType<AnonymousFunctionExpressionSyntax>().Single(); 12110var syntax = syntaxTree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 14700var syntax = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 14745var expr = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 19760var declarator = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 19768typeInfo = model.GetTypeInfo(declarator.Initializer!.Value.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single()); 19802var declarator = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 19810typeInfo = model.GetTypeInfo(declarator.Initializer!.Value.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single());
Semantics\DynamicTests.cs (163)
3857var tree = verifier.Compilation.SyntaxTrees.Single(); 3860var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 3890var tree = verifier.Compilation.SyntaxTrees.Single(); 3893var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 3918var tree = verifier.Compilation.SyntaxTrees.Single(); 3921var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 3946var tree = verifier.Compilation.SyntaxTrees.Single(); 3949var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 3997var tree = verifier.Compilation.SyntaxTrees.Single(); 4000var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "Goo").Single(); 4976var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5059node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5100var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5182node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5223var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5306node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5341var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5382var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5426var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5470var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5514var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5578var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 5616var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 5655var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "e").Single(); 5691var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5732var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5777var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5822var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5867var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 5935var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 5974var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6022var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6031var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6104node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6145var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6154var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6227node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6265var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6274var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6347node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6377var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6382var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6419var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6424var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6466var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6471var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6510var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 6515var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6552var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6571var increment = tree.GetRoot().DescendantNodes().OfType<PostfixUnaryExpressionSyntax>().Single(); 6606var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6671var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6680var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6736node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6780var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6789var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6845node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6890var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6899var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 6956node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6991var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 6996var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7059var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7068var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7118node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7162var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7171var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7230node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7275var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7284var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7346node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7391var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7400var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7463node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7504var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7513var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7581var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7590var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7642node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7686var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7695var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7748node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7792var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7801var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7854node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7895var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7905var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 7967var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 7976var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8029node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8073var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8082var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8135node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8178var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8187var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8239node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8283var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8292var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8348node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8392var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8401var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8457node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8501var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8510var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8566node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8611var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8620var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8677node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8724var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8729var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8793var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8798var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8861var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 8870var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8926var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9016var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9107var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9197var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9253var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9314var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9435var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9555var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9669var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9780var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 9891var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single(); 10014node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10022var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 10092node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10142node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10150var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 10220node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10270node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10278var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 10348node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10424node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10432var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 10500node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10558node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10566var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 10647node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10706node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10714var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 10797node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10976node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 10984var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 11063node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Item1").Single(); 11100var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 11105var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 11184var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 11189var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 11262var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 11267var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 11317var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11370var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11450var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11494var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11535var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11584var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11593var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 11636var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11645var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 11680var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "result").Single(); 11685var elementAccess = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single();
Semantics\ExpressionBodiedMemberTests.cs (17)
426var node = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 475var node = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().Single().Expression; 506var node = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().Single().Expression; 535var node = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().Single().Expression; 540Assert.Contains("P1", model.LookupNames(tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single().Body.Position)); 542var node2 = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single() 544.Single().Left; 575var node = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().Single().Expression; 580Assert.Contains("P1", model.LookupNames(tree.GetRoot().DescendantNodes().OfType<DestructorDeclarationSyntax>().Single().Body.Position)); 582var node2 = tree.GetRoot().DescendantNodes().OfType<DestructorDeclarationSyntax>().Single() 584.Single().Left; 649var node = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().Single().Expression; 680var node = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().Single().Expression; 711var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 742var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 777var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 808var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression;
Semantics\FieldInitializerBindingTests.cs (1)
247var typeSymbol = (SourceNamedTypeSymbol)compilation.GlobalNamespace.GetMembers("C").Single();
Semantics\ForEachTests.cs (5)
2129var loopSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 2885var foreachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3326var loop = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3360var loop = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3421var node = tree.GetRoot().DescendantNodes().Where(n => n.Kind() == SyntaxKind.ForEachStatement).OfType<ForEachStatementSyntax>().Single();
Semantics\FunctionPointerTests.cs (18)
203var parameter = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().First().ArgumentList.Arguments.Single(); 882var variableDeclaratorSyntax = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 942var variableDeclaratorSyntax = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 1615var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 1775var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 1936var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 2054var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 2088var localSyntax = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 3433var isPattern = syntaxTree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 3475var isPattern = syntaxTree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 3582var isPattern = syntaxTree.GetRoot().DescendantNodes().OfType<IsPatternExpressionSyntax>().Single(); 3583var funcPtrTypeSyntax = isPattern.DescendantNodes().OfType<FunctionPointerTypeSyntax>().Single(); 3679.Select(m => m.ParameterList.Parameters.Single().Type!) 3805VariableDeclarationSyntax fieldDeclaration = syntaxTree.GetRoot().DescendantNodes().OfType<FieldDeclarationSyntax>().Single().Declaration; 3806var fieldVariable = fieldDeclaration.Variables.Single(); 3817.Single().DescendantNodes() 3819.Single(); 3821var localVariable = localDeclaration.Variables.Single();
Semantics\GenericConstraintsTests.cs (4)
3140var call = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 3170var call = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 3196var call = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 3225var call = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
Semantics\GlobalUsingDirectiveTests.cs (7)
4243var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 4251node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 4279node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 4287node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 4295node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 4303node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 4315node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single();
Semantics\ImplicitObjectCreationTests.cs (11)
1868var def = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().Single(); 1898var def = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().Single(); 1928var def = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().Single(); 2038var @new = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().Single(); 2045var newObject = nodes.OfType<ObjectCreationExpressionSyntax>().Single(); 2073var @new = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().Single(); 2080var newObject = nodes.OfType<ObjectCreationExpressionSyntax>().Single(); 4157var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 4184var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ExpressionStatementSyntax>().Single(); 4533select (InitializerExpressionSyntax)node).Single().Expressions; 4574var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "aParameter").Single();
Semantics\ImportsTests.cs (1)
25var nonEmpty = GetImports("using System;").Single();
Semantics\IndexAndRangeTests.cs (3)
898var expression = tree.GetRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 918var expression = tree.GetRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 939var expression = tree.GetRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single();
Semantics\InitOnlyMemberTests.cs (4)
2521var invocation = root.DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 3140AccessorDeclarationSyntax accessorDecl = root.DescendantNodes().OfType<AccessorDeclarationSyntax>().Single(); 4143var localFunctionSyntax = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 4148var delegateSyntax = tree.GetRoot().DescendantNodes().OfType<DelegateDeclarationSyntax>().Single();
Semantics\InteractiveUsingTests.cs (5)
85var tree = sub.SyntaxTrees.Single(); 87var syntax = tree.GetRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Single(); 117var syntax = tree.GetRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Single(); 582var tree = comp.SyntaxTrees.Single(); 592var tree = comp.SyntaxTrees.Single();
Semantics\InterceptorsTests.cs (13)
164var invocation = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 1874var invocation = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 5674var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 6811var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7013var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7054var node = sourceTree1.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7100var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7146var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7197var node = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7222var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7309var node = source.GetRoot().DescendantNodes().OfType<MemberBindingExpressionSyntax>().Single(); 7437var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7490var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
Semantics\InterpolationTests.cs (2)
4604?? descendentNodes.OfType<InterpolatedStringExpressionSyntax>().Single(); 4825SyntaxNode syntax = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Single();
Semantics\IteratorTests.cs (2)
609var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 647var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single();
Semantics\LambdaDiscardParametersTests.cs (2)
422var underscore = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(p => p.ToString() == "_").Single(); 482var underscore = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(p => p.ToString() == "_").Single();
Semantics\LambdaTests.cs (40)
842Where(e => e.Kind() == SyntaxKind.AddExpression).Single(); 941var invocation = tree.GetCompilationUnitRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 1178var expr = (ExpressionSyntax)tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single().Body; 1206var expr = (ExpressionSyntax)tree.GetCompilationUnitRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer.Value; 1238var expr = (ExpressionSyntax)tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single().Body; 1513var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 1548var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 1582var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 1614var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "a").Single(); 1979var node1 = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.AnonymousMethodExpression)).Single(); 2120var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2166var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2212var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2258var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2304var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2334var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2361var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2997ExpressionSyntax contentType = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "ContentType").Single(); 3004ExpressionSyntax b = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "b").Single(); 3013ParameterSyntax parameterSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParameterSyntax>().Single(); 3039ExpressionSyntax contentType = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "ContentType").Single(); 3046ExpressionSyntax b = tree.GetCompilationUnitRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "b").Single(); 3054ParameterSyntax parameterSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParameterSyntax>().Single(); 3893var lambda = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3977var a = (IdentifierNameSyntax)tree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single().Name; 3986var m = newTree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 3990a = (IdentifierNameSyntax)newTree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single().Name; 4093var expr = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 5636var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 6822.Single(); 6851.Single(); 8058var lambda = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 8059var equalsValue = lambda.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 8087var newLambda = newMethod.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 8122var constSymbol = model.GetDeclaredSymbol(decls[0].Declaration.Variables.Single()); 8126var defaultValue = decls[1].DescendantNodes().OfType<LambdaExpressionSyntax>().Single() 8127.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single().Value; 8132var lhs = decls[2].DescendantNodes().OfType<EqualsValueClauseSyntax>().Single().Value; 8157var defaultValue = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single() 8158.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single().Value;
Semantics\LocalFunctionTests.cs (43)
349.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 353var x = newTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 405.DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 451var attributeSyntax = tree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single(); 495.Single(); 497var attributeList = localFunction.AttributeLists.Single(); 500var attribute = attributeList.Attributes.Single(); 543.Single(); 545var attributeList = localFunction.AttributeLists.Single(); 548var attribute = attributeList.Attributes.Single(); 807.Single(); 809var attributeList = localFunction.AttributeLists.Single(); 812var attribute = attributeList.Attributes.Single(); 852var localFunction = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 853var parameter = localFunction.ParameterList.Parameters.Single(); 968var localFunction = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 1060var attrSyntax = tree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single(); 1720var x = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Where(v => v.Identifier.ValueText == "x").Single(); 1770.Single(); 1788.Single(); 1845.Single(); 1863.Single(); 4690var designation = descendents.OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == name).Single(); 4726var parameter = descendents.OfType<ParameterSyntax>().Single(); 4731var declarator = descendents.OfType<VariableDeclaratorSyntax>().Where(d => d.Identifier.ValueText == name).Single(); 4962var b2 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "b2").Single(); 4965var b1 = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "b1").Single(); 7360=> SyntaxFactory.ParseCompilationUnit($@"class X {{ {source} void M() {{ }} }}", options: parseOptions).DescendantNodes().OfType<AttributeSyntax>().Single(); 7383return node.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "TParameter").Single(); 7451return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == identifier).Single().SpanStart; 7455=> SyntaxFactory.ParseCompilationUnit($@"{source};", options: parseOptions).DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7458=> SyntaxFactory.ParseCompilationUnit($@"{source};", options: parseOptions).DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 7532=> SyntaxFactory.ParseCompilationUnit($@"class X {{ {source} void M() {{ }} }}", options: parseOptions).DescendantNodes().OfType<AttributeSyntax>().Single(); 7585=> SyntaxFactory.ParseCompilationUnit($@"class X {{ {source} void M() {{ }} }}", options: parseOptions).DescendantNodes().OfType<AttributeSyntax>().Single(); 8742var invocation = tree2.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 8779var nameofExpression = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 8941=> SyntaxFactory.ParseCompilationUnit($@"class X {{ {source} void M() {{ }} }}", options: parseOptions).DescendantNodes().OfType<AttributeSyntax>().Single(); 8964return node.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "parameter").Single(); 9445=> SyntaxFactory.ParseCompilationUnit($@"class X {{ {source} void M() {{ }} }}", options: parseOptions).DescendantNodes().OfType<AttributeSyntax>().Single(); 9555.Single(); 9763=> SyntaxFactory.ParseCompilationUnit($@"class X {{ {source} void M() {{ }} }}", options: parseOptions).DescendantNodes().OfType<AttributeSyntax>().Single(); 10175.Single(); 10385var localFunction = root.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single();
Semantics\LockTests.cs (9)
45var localDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Single(); 46var localSymbol = (ILocalSymbol)model.GetDeclaredSymbol(localDecl.Declaration.Variables.Single()); 50var lockStatement = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LockStatementSyntax>().Single(); 55var memberAccessExpression = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 550var localDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TypeParameterSyntax>().Single(); 604var localDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Single(); 605var symbol = (ILocalSymbol)model.GetDeclaredSymbol(localDecl.Declaration.Variables.Single()); 628var localDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Single(); 629var symbol = (ILocalSymbol)model.GetDeclaredSymbol(localDecl.Declaration.Variables.Single());
Semantics\LookupTests.cs (10)
698Assert.Equal("Goo", names.Single()); 1394var systemNS = (INamespaceSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("System") && sym.Kind == SymbolKind.Namespace).Single(); 1501var node = tree.GetRoot().DescendantNodes().OfType<ExpressionSyntax>().Where(n => n.ToString() == "m.M").Single(); 1524var namespaceX = (INamespaceSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("X") && sym.Kind == SymbolKind.Namespace).Single(); 1533var typeA = (INamedTypeSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("A") && sym.Kind == SymbolKind.NamedType).Single(); 1538var aliasY = (IAliasSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("aliasY") && sym.Kind == SymbolKind.Alias).Single(); 2044var node = tree.GetRoot().DescendantNodes().OfType<ConditionalAccessExpressionSyntax>().Single().Expression; 2074var node = tree.GetRoot().DescendantNodes().OfType<ConditionalAccessExpressionSyntax>().Single().Expression; 2100var node = tree.GetRoot().DescendantNodes().OfType<GenericNameSyntax>().Single(); 2122var node = tree.GetRoot().DescendantNodes().OfType<AttributeSyntax>().Single();
Semantics\MethodTypeInferenceTests.cs (2)
1047var syntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 1077var syntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
Semantics\NameOfTests.cs (12)
977var initializer = tree2.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 992var argument = nameofCalls[index].ArgumentList.Arguments.Single().Expression; 997var argument2 = nameofCalls2[index].ArgumentList.Arguments.Single().Expression; 1049var initializer = tree2.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 1063var argument = nameofCalls[index].ArgumentList.Arguments.Single().Expression; 1068var argument2 = nameofCalls2[index].ArgumentList.Arguments.Single().Expression; 1131var initializer = tree2.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 1149var argument = nameofCalls[index].ArgumentList.Arguments.Single().Expression; 1154var argument2 = nameofCalls2[index].ArgumentList.Arguments.Single().Expression; 1212var initializer = tree2.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 1227var argument = nameofCalls[index].ArgumentList.Arguments.Single().Expression; 1232var argument2 = nameofCalls2[index].ArgumentList.Arguments.Single().Expression;
Semantics\NativeIntegerTests.cs (5)
3636var underlyingType = model.GetDeclaredSymbol(nodes.OfType<ClassDeclarationSyntax>().Single()); 3639var method = model.GetDeclaredSymbol(nodes.OfType<MethodDeclarationSyntax>().Single()); 9495var expr = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 9730var expr = tree.GetRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 12381var expr = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single();
Semantics\NonTrailingNamedArgumentsTests.cs (7)
456var invocation = nodes.OfType<InvocationExpressionSyntax>().Single(); 485var invocation = nodes.OfType<InvocationExpressionSyntax>().Single(); 535var invocation = nodes.OfType<InvocationExpressionSyntax>().Single(); 570var invocation = nodes.OfType<InvocationExpressionSyntax>().Single(); 599var invocation = nodes.OfType<InvocationExpressionSyntax>().Single(); 653var invocation = nodes.OfType<InvocationExpressionSyntax>().Single(); 711var firstInvocation = nodes.OfType<InvocationExpressionSyntax>().Single();
Semantics\NullableContextTests.cs (10)
67var classDeclPosition = syntaxTree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().Single().SpanStart; 68var methodDeclPosition = syntaxTree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single().SpanStart; 102var classDecl1 = syntaxTree1.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().Single().SpanStart; 103var classDecl2 = syntaxTree2.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().Single().SpanStart; 350var syntax = syntaxTree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Skip(1).Single(); 389var syntax = syntaxTree.GetRoot().DescendantNodes().OfType<AttributeArgumentSyntax>().Single(); 580verifyContextState(tree, syntaxNodes.OfType<ClassDeclarationSyntax>().Single(), classDirectives.ExpectedWarningsState, classDirectives.ExpectedAnnotationsState); 581verifyContextState(tree, syntaxNodes.OfType<MethodDeclarationSyntax>().Single(), expectedWarningsStateForMethod, expectedAnnotationsStateForMethod); 1841var syntax = syntaxTree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single().Right; 2228var typeOf = syntaxTree.GetRoot().DescendantNodes().OfType<TypeOfExpressionSyntax>().Single();
Semantics\NullableReferenceTypesTests.cs (63)
1841var suppression = tree.GetRoot().DescendantNodes().OfType<PostfixUnaryExpressionSyntax>().Single(); 2276var suppression = tree.GetRoot().DescendantNodes().OfType<PostfixUnaryExpressionSyntax>().Single(); 2315var suppression = tree.GetRoot().DescendantNodes().OfType<PostfixUnaryExpressionSyntax>().Single(); 2347var suppression = tree.GetRoot().DescendantNodes().OfType<PostfixUnaryExpressionSyntax>().Single(); 2381var suppression = tree.GetRoot().DescendantNodes().OfType<PostfixUnaryExpressionSyntax>().Single(); 3693var lambda = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.SimpleLambdaExpression)).Single(); 3695var param = lambda.ChildNodes().Where(n => n.IsKind(SyntaxKind.Parameter)).Single(); 5169var declaration = syntaxTree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 7769var specifier = tree.GetRoot().DescendantNodes().OfType<ArrayRankSpecifierSyntax>().Single(); 13511var returnStatement = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Skip(1).Single(); 16718var implemented = compilation.GetTypeByMetadataName(typeName[0]).GetMembers().OfType<PropertySymbol>().Single(); 16724var implemented = compilation.GetTypeByMetadataName("IA3").GetMembers().OfType<PropertySymbol>().Single(); 16803var implemented = compilation.GetTypeByMetadataName(typeName[0]).GetMembers().OfType<PropertySymbol>().Single(); 16809var implemented = compilation.GetTypeByMetadataName("IA3").GetMembers().OfType<PropertySymbol>().Single(); 30182var property = copen.GetMembers().OfType<PropertySymbol>().Single(); 30285var property = copen.GetMembers().OfType<PropertySymbol>().Single(); 30797var field = copen.GetMembers().OfType<FieldSymbol>().Single(); 34983var outVar = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 35000var varDecl = tree.GetRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Where(d => d.Declaration.Type.IsVar).Single(); 35001var variable = varDecl.Declaration.Variables.Single(); 40784var field = copen.GetMembers().OfType<FieldSymbol>().Single(); 40970var property = copen.GetMembers().OfType<PropertySymbol>().Single(); 41031var property = copen.GetMembers().OfType<PropertySymbol>().Single(); 44651var property = copen.GetMembers().OfType<PropertySymbol>().Single(); 44888var field = copen.GetMembers().OfType<FieldSymbol>().Single(); 47988var property = copen.GetMembers().OfType<PropertySymbol>().Single(); 48088var field = copen.GetMembers().OfType<FieldSymbol>().Single(); 56082var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56112var invocationNode = tree.GetRoot().DescendantNodes().OfType<ImplicitArrayCreationExpressionSyntax>().Single(); 56145var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56182var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56212var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56246var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56277var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56310var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56344var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56378var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56409var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56442var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56477var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56513var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 56624var invocationNode = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 65894var function2 = tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 113594var decl = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 113625var decl = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 113803var decl = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 114028var decl = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 145375var declaration = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 145416var declaration = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 145456var declaration = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 145494var declaration = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 145532var declaration = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 145636var declaration = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 145675var declaration = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 146298var @foreach = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 146337var @foreach = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 146377var @foreach = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 146416var @foreach = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 146454var ifStatement = root.DescendantNodes().OfType<IfStatementSyntax>().Single(); 146455var cast = ifStatement.DescendantNodes().OfType<CastExpressionSyntax>().Single(); 157629var method1 = model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single()); 158818var local = (ILocalSymbol)model.GetDeclaredSymbol(declaration.Variables.Single()); 160690var stackallocNode = tree.GetRoot().DescendantNodes().OfType<ImplicitStackAllocArrayCreationExpressionSyntax>().Single();
Semantics\NullCoalesceAssignmentTests.cs (5)
38var coalesceAssignment = syntaxRoot.DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 76var coalesceAssignment = syntaxRoot.DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 119var coalesceAssignment = syntaxRoot.DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 158var coalesceAssignment = syntaxRoot.DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 184var defaultLiteral = syntaxRoot.DescendantNodes().OfType<LiteralExpressionSyntax>().Where(expr => expr.IsKind(SyntaxKind.DefaultLiteralExpression)).Single();
Semantics\ObjectAndCollectionInitializerTests.cs (9)
3473select (InitializerExpressionSyntax)node).Single().Expressions; 3521select (InitializerExpressionSyntax)node).Single().Expressions; 3578select (InitializerExpressionSyntax)node).Single().Expressions; 3614select (InitializerExpressionSyntax)node).Single().Expressions; 3651select (InitializerExpressionSyntax)node).Single().Expressions; 3691var objectCreation = root.DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 3741var objectCreation = root.DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 3935var nodes = tree.GetRoot().DescendantNodes().OfType<InitializerExpressionSyntax>().Skip(1).Single().Expressions; 4227var elementAccess = tree.GetRoot().DescendantNodes().OfType<ImplicitElementAccessSyntax>().Single();
Semantics\OperatorTests.cs (3)
2985var negOne = tree.GetRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 6939var syntax = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 11337var negNode = tree.GetRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single();
Semantics\OverloadResolutionTests.cs (9)
7149var callSyntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7259var callSyntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7433var syntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 7474var syntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 9071var callSyntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 9419var callSyntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 11763var expr = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 11812var expr = tree.GetRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 11862var expr = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single();
Semantics\QueryTests.cs (21)
1453var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 1662var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 1722var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 1760var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 2384var selectClause = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.SelectClause)).Single() as SelectClauseSyntax; 2385var fromClause1 = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => (n.IsKind(SyntaxKind.FromClause)) && (n.ToString().Contains("num1"))).Single() as FromClauseSyntax; 2386var fromClause2 = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => (n.IsKind(SyntaxKind.FromClause)) && (n.ToString().Contains("num2"))).Single() as FromClauseSyntax; 2484var selectClause = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.SelectClause)).Single() as SelectClauseSyntax; 2548var selectClause = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.SelectClause)).Single() as SelectClauseSyntax; 2583var orderingClause = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.AscendingOrdering)).Single() as OrderingSyntax; 2716var queryExpr = tree.GetCompilationUnitRoot().DescendantNodes().OfType<QueryExpressionSyntax>().Where(x => x.ToFullString() == "from i in expr1 let ").Single(); 2742var queryExpr = tree.GetCompilationUnitRoot().DescendantNodes().OfType<QueryExpressionSyntax>().Single(); 2897var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "C").Single(); 2930var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "C").Single(); 3380.Single(); 3389.Single(); 3420var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 3464var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Query").Single(); 3511var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Test").Single(); 3550var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "Test2").Single(); 3598var classC = tree.GetCompilationUnitRoot().ChildNodes().OfType<TypeDeclarationSyntax>().Where(t => t.Identifier.ValueText == "QueryExpressionTest").Single();
Semantics\RawInterpolationTests_Handler.cs (2)
2905?? descendentNodes.OfType<InterpolatedStringExpressionSyntax>().Single(); 3126SyntaxNode syntax = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Single();
Semantics\ReadOnlyStructsTests.cs (1)
1190var s1 = (INamedTypeSymbol)comp.GetSymbolsWithName("S1").Single();
Semantics\RecordStructTests.cs (16)
534var creation = tree.GetRoot().DescendantNodes().OfType<AnonymousObjectCreationExpressionSyntax>().Single(); 554var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 574var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 596var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 2307var x = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 2331var x = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 2605var recordDeclaration = tree.GetRoot().DescendantNodes().OfType<RecordDeclarationSyntax>().Single(); 3242var doc = tree.GetRoot().DescendantTrivia().Select(trivia => trivia.GetStructure()).OfType<DocumentationCommentTriviaSyntax>().Single(); 3243var x = doc.DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 5849var parameterSyntax = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single(); 5855var initializerSyntax = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Single(); 5891var outVarSyntax = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Single(); 6925var with = tree.GetRoot().DescendantNodes().OfType<WithExpressionSyntax>().Single(); 7606var with = tree.GetRoot().DescendantNodes().OfType<WithExpressionSyntax>().Single(); 8811var withExpr = tree.GetRoot().DescendantNodes().OfType<WithExpressionSyntax>().Single(); 10787var baseWithoutParens = tree.GetRoot().DescendantNodes().OfType<SimpleBaseTypeSyntax>().Single();
Semantics\RefFieldTests.cs (6)
11128var value = decl.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 11981var expr = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 16591var anonymousMethod = tree.GetRoot().DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 16630var anonymousMethod = tree.GetRoot().DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 24761var value = decl.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 28874var constructorSyntax = tree.GetRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single();
Semantics\RefLocalsAndReturnsTests.cs (7)
4750var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 4778var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 4806var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 4834var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 4862var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 4890var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 4924var assignment = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single();
Semantics\ScriptSemanticsTests.cs (4)
374var goo = global.GetMembers("Goo").Single() as NamespaceSymbol; 1313var x = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 1342x = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 1357x = syntaxTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single();
Semantics\SemanticErrorTests.cs (1)
3252var type1 = comp.SourceModule.GlobalNamespace.GetMembers("MyClass").Single() as NamedTypeSymbol;
Semantics\SuppressAccessibilityChecksTests.cs (7)
54var invocation = semanticModel.SyntaxTree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 72var invocation = semanticModel.SyntaxTree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 87var invocation = semanticModel.SyntaxTree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 96statement.DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single()); 123var expr = (ExpressionSyntax)tree.GetCompilationUnitRoot().DescendantNodes().OfType<SimpleLambdaExpressionSyntax>().Single().Body; 169var invocation = syntaxTree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 215AccessorDeclarationSyntax accessorDecl = root.DescendantNodes().OfType<AccessorDeclarationSyntax>().Single();
Semantics\SyntaxTreeRootTests.cs (1)
108Assert.Equal(tree, tree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().Single().SyntaxTree);
Semantics\SynthesizedStaticConstructorTests.cs (1)
291var typeSymbol = (SourceNamedTypeSymbol)compilation.GlobalNamespace.GetMembers("C").Single();
Semantics\TargetTypedConditionalOperatorTests.cs (2)
668var expr = tree.GetRoot().DescendantNodes().OfType<ConditionalExpressionSyntax>().Single(); 689var expr = tree.GetRoot().DescendantNodes().OfType<ConditionalExpressionSyntax>().Single();
Semantics\TargetTypedDefaultTests.cs (9)
44var def = nodes.OfType<LiteralExpressionSyntax>().Single(); 144var def = nodes.OfType<LiteralExpressionSyntax>().Single(); 837var def = nodes.OfType<LiteralExpressionSyntax>().Single(); 866var def = nodes.OfType<LiteralExpressionSyntax>().Single(); 1257var addition = nodes.OfType<BinaryExpressionSyntax>().Single(); 3055var def = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 3514var def = nodes.OfType<LiteralExpressionSyntax>().Single(); 3524var conversionSyntax = nodes.OfType<CastExpressionSyntax>().Single(); 3575var default1 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single();
Semantics\TopLevelStatementsTests.cs (59)
235var localDecl = unit1.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 319var localRef = unit1.DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 358var localDecl = unit2.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 481var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 492var localFuncRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local").Single(); 500var localRef = tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "i").Single(); 533var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 573var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 584var localFuncRef = tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local").Single(); 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); 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); 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(); 1858var localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 2084var localDecl = tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 2248var localDecl = tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 2426var labelDecl = tree1.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single(); 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(); 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(); 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); 4518Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Single()).Symbol); 4580Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Skip(1).Single()).Symbol); 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(); 6084var syntaxTree = comp.SyntaxTrees.Single(); 6156var syntaxTree = comp.SyntaxTrees.Single(); 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(); 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(); 9681Assert.Equal(OperationKind.Literal, model.GetOperation(tree.GetRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single()).Kind);
Semantics\TryCatchTests.cs (1)
45var catchClause = tree.GetCompilationUnitRoot().DescendantNodes().OfType<CatchClauseSyntax>().Single();
Semantics\UninitializedNonNullableFieldTests.cs (2)
2753Assert.Equal(property.Locations.Single(), actualAdditionalLocations.Single()); 2774Assert.Equal(property.Locations.Single(), actualAdditionalLocations.Single());
Semantics\UnsafeTests.cs (19)
7257var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 7294var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<FieldDeclarationSyntax>().Single(); 7323var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 7361var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 7404var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Single(); 7845var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 7912var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 8158var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8162var indexSyntax = syntax.ArgumentList.Arguments.Single().Expression; 8225var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8229var indexSyntax = syntax.ArgumentList.Arguments.Single().Expression; 8283var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ElementAccessExpressionSyntax>().Single(); 8287var indexSyntax = syntax.ArgumentList.Arguments.Single().Expression; 8383var value = declarationSyntax.Variables.Single().Initializer.Value; 11305var stackAllocSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<StackAllocArrayCreationExpressionSyntax>().Single(); 11308var countSyntax = arrayTypeSyntax.RankSpecifiers.Single().Sizes.Single(); 11837var parameterSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParameterSyntax>().Single(); 11877var foreachSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single();
Semantics\UsingStatementTests.cs (7)
60var usingStatement = tree.GetCompilationUnitRoot().DescendantNodes().OfType<UsingStatementSyntax>().Single(); 62var declaredSymbol = model.GetDeclaredSymbol(usingStatement.Declaration.Variables.Single()); 69var memberAccessExpression = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 1341var usingStatement = tree.GetCompilationUnitRoot().DescendantNodes().OfType<UsingStatementSyntax>().Single(); 1343var declaredSymbol = model.GetDeclaredSymbol(usingStatement.Declaration.Variables.Single()); 1376var usingStatement = tree.GetCompilationUnitRoot().DescendantNodes().OfType<UsingStatementSyntax>().Single(); 1853var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single();
Semantics\Utf8StringsLiteralsTests.cs (13)
2970var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 2998var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3026var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3054var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3082var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3110var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3138var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3166var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3194var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3222var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3250var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3278var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3306var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression;
Semantics\VarianceTests.cs (2)
117Assert.Equal(ErrorCode.ERR_NoImplicitConvCast, (ErrorCode)errors.Single().Code); 230var code = (ErrorCode)errors.Single().Code;
SourceGeneration\GeneratorDriverTests.cs (11)
1496var syntaxTree = compilation.SyntaxTrees.Single(); 2168compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.Single(), CSharpSyntaxTree.ParseText(source, parseOptions)); 2230compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.Single(), CSharpSyntaxTree.ParseText(source, parseOptions)); 3649var validSyntaxTree = comp.SyntaxTrees.Single(); 3710var validSyntaxTree = ctx.Compilation.SyntaxTrees.Single(); 3743var syntaxTree = comp.SyntaxTrees.Single(); 3775var syntaxTree = comp.SyntaxTrees.Single(); 3806var syntaxTree = ctx.Compilation.SyntaxTrees.Single(); 3835var syntaxTree = ctx.Compilation.SyntaxTrees.Single(); 3867var syntaxTree = comp.SyntaxTrees.Single(); 3897var syntaxTree = ctx.Compilation.SyntaxTrees.Single();
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (2)
192step => Assert.True(step.Outputs.Single().Value is CompilationUnitSyntax c && c.SyntaxTree == compilation.SyntaxTrees.Single())); 222step => Assert.True(step.Outputs.Single().Value is CompilationUnitSyntax c && c.SyntaxTree == compilation.SyntaxTrees.Single()));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1041)
Compilation\ForEachStatementInfoTests.cs (2)
37var e1 = (ITypeSymbol)c.GlobalNamespace.GetMembers("E1").Single(); 44var e2 = (ITypeSymbol)c.GlobalNamespace.GetMembers("E2").Single();
Compilation\GetSemanticInfoBrokenCodeTests.cs (4)
224var usingSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<UsingStatementSyntax>().Single(); 242var tree = comp.SyntaxTrees.Single(); 245var typeOfSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TypeOfExpressionSyntax>().Single(); 267var literalSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single();
Compilation\GetSemanticInfoTests.cs (54)
1137var stmt = (GlobalStatementSyntax)root.Members.Single(); 2074Assert.Equal("System.Object IA.P { get; }", members.Single().ToTestDisplayString()); 2115Assert.Equal("System.Object IB.P { get; }", members.Single().ToTestDisplayString()); 2134Assert.Equal("System.Object D.P { get; set; }", members.Single().ToTestDisplayString()); 2153Assert.Equal("void IA.M()", members.Single().ToTestDisplayString()); 2356var lambdaSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<SimpleLambdaExpressionSyntax>().Single(); 2925var tree = comp.SyntaxTrees.Single(); 3017var tree = comp.SyntaxTrees.Single(); 3472var argexpr = expr.ArgumentList.Arguments.Single().Expression; 3526var argexpr = expr.ArgumentList.Arguments.Single().Expression; 3607var literal = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 3632var literal = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 3665var literal = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 3701var literal = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 3782var tree = compilation.SyntaxTrees.Single(); 3843var tree = compilation.SyntaxTrees.Single(); 3909var tree = compilation.SyntaxTrees.Single(); 4035var tree = comp.SyntaxTrees.Single(); 4109Assert.Equal("x", localDecl1.Variables.Single().Identifier.ValueText); 4111Assert.Equal("q", localDecl2.Variables.Single().Identifier.ValueText); 4164Assert.Equal("x", localDecl1.Variables.Single().Identifier.ValueText); 4166Assert.Equal("q", localDecl2.Variables.Single().Identifier.ValueText); 4212var syntax = tree.GetCompilationUnitRoot().FindToken(position).Parent.DescendantNodesAndSelf().OfType<OmittedTypeArgumentSyntax>().Single(); 4242var syntax = tree.GetCompilationUnitRoot().FindToken(position).Parent.DescendantNodesAndSelf().OfType<OmittedTypeArgumentSyntax>().Single(); 4272var syntax = tree.GetCompilationUnitRoot().FindToken(position).Parent.DescendantNodesAndSelf().OfType<GenericNameSyntax>().Single(); 4292var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<OmittedTypeArgumentSyntax>().Single(); 4323var initializerSyntax = speculativeSyntax.DescendantNodesAndSelf().OfType<InitializerExpressionSyntax>().Single(); 4433var tree = compilation.SyntaxTrees.Single(); 4436var fieldSyntax = tree.GetRoot().DescendantNodes().OfType<FieldDeclarationSyntax>().Single(); 4487var tree = compilation.SyntaxTrees.Single(); 4490var memberAccessSyntax = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 4532var tree = compilation.SyntaxTrees.Single(); 4535var callSyntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 4641var memberAccess = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 4671var tree = comp.SyntaxTrees.Single(); 4716var tree = comp.SyntaxTrees.Single(); 4752var trueLiteral = tree.GetRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 4785var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 4828var syntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 4875var statement = tree.GetRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Single(); 5400var tree = compilation.SyntaxTrees.Single(); 5518var tree = comp.SyntaxTrees.Single(); 5521var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 5532var tree = comp.SyntaxTrees.Single(); 5535var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 5579var tree = comp.SyntaxTrees.Single(); 5582var nullSyntax = tree.GetRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 5617var tree = comp.SyntaxTrees.Single(); 5620var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 5664var tree = comp.SyntaxTrees.Single(); 5667var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 5717var tree = comp.SyntaxTrees.Single(); 5720var methodGroupSyntax = tree.GetRoot().DescendantNodes().OfType<ArgumentSyntax>().Single().Expression; 5988var foreachSyntaxNode = root.DescendantNodes().OfType<ForEachStatementSyntax>().Single();
Compilation\GetUnusedImportDirectivesTests.cs (1)
93var syntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression;
Compilation\ReferenceManagerTests.cs (3)
894var rd1 = t1.GetCompilationUnitRoot().GetReferenceDirectives().Single(); 895var rd2 = t2.GetCompilationUnitRoot().GetReferenceDirectives().Single(); 896var rd3 = t3.GetCompilationUnitRoot().GetReferenceDirectives().Single();
Compilation\SemanticModelAPITests.cs (64)
175var assignment = root.DescendantNodes().OfType<ParenthesizedExpressionSyntax>().Single(); 209var rxDecl = root.DescendantNodes().OfType<ForStatementSyntax>().Single().Declaration; 210Assert.Same(model.GetDeclaredSymbol(rxDecl.Variables.Single()), rxSymbol); 241var rxDecl = root.DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 825var bInner = (comp.GlobalNamespace.GetMembers("N").Single() as INamespaceSymbol).GetTypeMembers("B", 0).Single(); 1229var tree = comp.SyntaxTrees.Single(); 1232var aliasSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Single(); 1265var aliasSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ExternAliasDirectiveSyntax>().Single(); 1278var aliasQualifiedSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AliasQualifiedNameSyntax>().Single(); 1306var aliasSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ExternAliasDirectiveSyntax>().Single(); 1311var aliasQualifiedSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AliasQualifiedNameSyntax>().Single(); 1338var aliasSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<NameEqualsSyntax>().Single().Name; 1341var usingSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Single(); 1358var tree = comp.SyntaxTrees.Single(); 1361var oldSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 1390var oldSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 1725var tree = comp.SyntaxTrees.Single(); 1728var aliasDecl = tree.GetRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Single(); 1739var fieldDecl = tree.GetRoot().DescendantNodes().OfType<FieldDeclarationSyntax>().Single(); 1741var fieldSymbol = model.GetDeclaredSymbol(fieldDecl.Declaration.Variables.Single()); 2046var thisSyntax = expr.DescendantNodes().OfType<ThisExpressionSyntax>().Single(); 2069var tree = comp.SyntaxTrees.Single(); 2072var oldSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 2092newSyntax = oldSyntax.ReplaceNode(oldSyntax.DescendantNodes().OfType<CastExpressionSyntax>().Single(), newArgument); 2109newSyntax = oldSyntax.ReplaceNode(oldSyntax.DescendantNodes().OfType<CastExpressionSyntax>().Single(), newArgument); 2141var oldSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ConstructorDeclarationSyntax>().Single(); 2310var accessorSyntax = tree.GetRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single(); 2313var statementSyntax = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single(); 2921var cref = typeDecl.DescendantNodes(descendIntoTrivia: true).OfType<TypeCrefSyntax>().Single(); 2961var cref = typeDecl.DescendantNodes(descendIntoTrivia: true).OfType<TypeCrefSyntax>().Single(); 3006var cref = typeDecl.DescendantNodes(descendIntoTrivia: true).OfType<TypeCrefSyntax>().Single(); 3127var syntax = tree.GetRoot().DescendantNodes().OfType<SimpleLambdaExpressionSyntax>().Single(). 3128Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Single(); 3230var omittedArraySize = typeSyntax.DescendantNodes().OfType<OmittedArraySizeExpressionSyntax>().Single(); 3259var method1 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3271var method2 = statementSyntax.DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3300var method1 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3312var method2 = statementSyntax.DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3341var method1 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3375var method1 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3388var method2 = statementSyntax.DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3417var method1 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3429var method2 = statementSyntax.DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3458var method1 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3470var method2 = statementSyntax.DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3499var method1 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3611var crefSyntax = root.DescendantNodes(descendIntoTrivia: true).OfType<QualifiedCrefSyntax>().Single(); 3738var tree = comp.SyntaxTrees.Single(); 3741var memberAccess = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 3785var localFunctionBody = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3786var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 3819var callSyntax = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 3846var syntax = tree.GetRoot().DescendantNodes().OfType<AliasQualifiedNameSyntax>().Single(); 3902var tree = comp.SyntaxTrees.Single(); 3910var method = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single(); 3911var init0 = method.Body.Statements[0].DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer.Value; 3920var init1 = method.Body.Statements[2].DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer.Value; 3927var init2 = method.Body.Statements[4].DescendantNodes().OfType<VariableDeclaratorSyntax>().Single().Initializer.Value; 4377var classA = (NamedTypeSymbol)globalNs.GetMembers("A").Single(); 4427var ifStatement = root.DescendantNodes().OfType<IfStatementSyntax>().Single(); 4460Assert.Equal("DEBUG", model.GetConstantValue(root.DescendantNodes().OfType<InvocationExpressionSyntax>().Single())); 4477var declarationExpression = root.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 4541var declarationExpression = root.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 4611var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(ident => ident.Identifier.Text == "global").Single();
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (36)
38var rxDecl = root.DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 60var rxDecl = root.DescendantNodes().OfType<ForStatementSyntax>().Single().Declaration; 62ISymbol rx = model.GetDeclaredSymbol(rxDecl.Variables.Single()); 1706var tree = compilation.SyntaxTrees.Single(); 1810var tree = compilation.SyntaxTrees.Single(); 1932var tree = compilation.SyntaxTrees.Single(); 1972tree = compilation.SyntaxTrees.Single(); 3019var ns1 = globalNS.GetMembers("NS").Single() as INamespaceSymbol; 3020var srcSym = ns1.GetMembers("A").Single() as INamedTypeSymbol; 3046var ns1 = globalNS.GetMembers("NS").Single() as NamespaceSymbol; 3076var ns1 = globalNS.GetMembers("NS").Single() as INamespaceSymbol; 3112var ns1 = nsg.GetMembers("NS1").Single() as INamespaceSymbol; 3113var ns2 = ns1.GetMembers("NS2").Single() as INamespaceSymbol; 3177var accessorDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AccessorDeclarationSyntax>().Single(); 3756var memSymbol = compilation.GlobalNamespace.GetMembers("System").Single(); 3996var tree = compilation.SyntaxTrees.Single(); 3999var typeofSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TypeOfExpressionSyntax>().Single(); 4085var tree = compilation.SyntaxTrees.Single(); 4127var call = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 4145call = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 4437var tree = compilation.SyntaxTrees.Single(); 4440var conversionDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ConversionOperatorDeclarationSyntax>().Single(); 4446var lookupSymbols = model.LookupSymbols(conversionDecl.DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, name: WellKnownMemberNames.ImplicitConversionName); 4468var tree = compilation.SyntaxTrees.Single(); 4471var conversionDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ConversionOperatorDeclarationSyntax>().Single(); 4477var lookupSymbols = model.LookupSymbols(conversionDecl.DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, name: WellKnownMemberNames.ExplicitConversionName); 4499var tree = compilation.SyntaxTrees.Single(); 4502var operatorDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<OperatorDeclarationSyntax>().Single(); 4508var lookupSymbols = model.LookupSymbols(operatorDecl.DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, name: WellKnownMemberNames.AdditionOperatorName); 4533var tree = compilation.SyntaxTrees.Single(); 4570var tree = compilation.SyntaxTrees.Single(); 4651var tree = compilation.SyntaxTrees.Single(); 4741var enumDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<EnumDeclarationSyntax>().Single(); 4742var eventDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<EventDeclarationSyntax>().Single(); 5174var typeDeclC = (TypeDeclarationSyntax)cu.Members.Single(); 5175var methodDeclM = (MethodDeclarationSyntax)typeDeclC.Members.Single();
Compilation\SemanticModelGetSemanticInfoTests.cs (2)
14656var argumentSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AttributeArgumentSyntax>().Single(); 15380var qe = tree.GetRoot().DescendantNodes().OfType<QueryExpressionSyntax>().Single();
Compilation\UsedAssembliesTests.cs (1)
135var tree = comp.SyntaxTrees.Single();
DocumentationComments\ConstructorDocumentationCommentTests.cs (1)
41_acmeNamespace = (NamespaceSymbol)_compilation.GlobalNamespace.GetMembers("Acme").Single();
DocumentationComments\CrefTests.cs (204)
254var crefSyntax = GetCrefSyntaxes(compilation).Single(); 328var crefSyntax = GetCrefSyntaxes(compilation).Single(); 357var crefSyntax = GetCrefSyntaxes(compilation).Single(); 386var crefSyntax = GetCrefSyntaxes(compilation).Single(); 405var crefSyntax = GetCrefSyntaxes(compilation).Single(); 425var crefSyntax = GetCrefSyntaxes(compilation).Single(); 442var crefSyntax = GetCrefSyntaxes(compilation).Single(); 467var crefSyntax = GetCrefSyntaxes(compilation).Single(); 496var crefSyntax = GetCrefSyntaxes(compilation).Single(); 519var crefSyntax = GetCrefSyntaxes(compilation).Single(); 539var crefSyntax = GetCrefSyntaxes(compilation).Single(); 559var crefSyntax = GetCrefSyntaxes(compilation).Single(); 582var crefSyntax = GetCrefSyntaxes(compilation).Single(); 605var crefSyntax = GetCrefSyntaxes(compilation).Single(); 628var crefSyntax = GetCrefSyntaxes(compilation).Single(); 657var crefSyntax = GetCrefSyntaxes(compilation).Single(); 691var crefSyntax = GetCrefSyntaxes(compilation).Single(); 905var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 1001var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 1100var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 1202var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1245var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1248var expectedSymbol = compilation.GlobalNamespace.GetMembers("B").OfType<SourceNamedTypeSymbol>().Single(); 1267var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1289var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1311var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1333var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1355var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1377var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1406var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1426var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1451var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1477var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1503var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1528var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1552var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1599var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1630var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1657var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1695var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1732var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1758var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1780var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1804var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1840var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1869var crefSyntax = GetCrefSyntaxes(compilation).Single(); 1902var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2001var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2043var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2094var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2136var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2166var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2196var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2216var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2237var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2258var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2279var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2304var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2328var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2355var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2379var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2409var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2430var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2450var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2471var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2492var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2516var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2540var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2564var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2594var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2615var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2635var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2656var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2679var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2700var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2724var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2748var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2772var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2802var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2838var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2859var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2879var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2900var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2921var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2943var crefSyntax = GetCrefSyntaxes(compilation).Single(); 2965var crefSyntax = (QualifiedCrefSyntax)GetCrefSyntaxes(compilation).Single(); 2998var crefSyntax = (QualifiedCrefSyntax)GetCrefSyntaxes(compilation).Single(); 3017var actualTypeArgument = model.GetSymbolInfo(left.TypeArgumentList.Arguments.Single()).Symbol; 3032var actualTypeArgument = model.GetSymbolInfo(right.TypeArgumentList.Arguments.Single()).Symbol; 3072var crefSyntax = (IndexerMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 3079var actualParameterType = model.GetSymbolInfo(crefSyntax.Parameters.Parameters.Single().Type).Symbol; 3097var crefSyntax = (OperatorMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 3106var actualParameterType = model.GetSymbolInfo(crefSyntax.Parameters.Parameters.Single().Type).Symbol; 3124var crefSyntax = (ConversionOperatorMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 3133var actualParameterType = model.GetSymbolInfo(crefSyntax.Parameters.Parameters.Single().Type).Symbol; 3155var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3178var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3201var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3224var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3248var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3272var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3296var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3320var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3343var crefSyntax = GetCrefSyntaxes(compilation).Single(); 3370var crefSyntax = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 4557var crefSyntax = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 4575var crefSyntax = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 4578model.GetSymbolInfo(((GenericNameSyntax)crefSyntax.Name).TypeArgumentList.Arguments.Single()); 4593var crefSyntax = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 4596model.GetSymbolInfo(((GenericNameSyntax)crefSyntax.Name).TypeArgumentList.Arguments.Single()); 4610var crefSyntax = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 4613model.GetSymbolInfo(((GenericNameSyntax)crefSyntax.Name).TypeArgumentList.Arguments.Single()); 4785var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4786var cref = GetCrefSyntaxes(compilation).Single(); 4820var cref = GetCrefSyntaxes(compilation).Single(); 4847var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4848var cref = GetCrefSyntaxes(compilation).Single(); 4874var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4875var cref = GetCrefSyntaxes(compilation).Single(); 4909var cref = GetCrefSyntaxes(compilation).Single(); 4935var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 4936var cref = GetCrefSyntaxes(compilation).Single(); 4977var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5009var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5045var cref = GetCrefSyntaxes(compilation).Single(); 5086var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5138var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5176var cref = GetCrefSyntaxes(compilation).Single(); 5198var cref = GetCrefSyntaxes(compilation).Single(); 5284var cref = GetCrefSyntaxes(compilation).Single(); 5310var cref = GetCrefSyntaxes(compilation).Single(); 5336var cref = GetCrefSyntaxes(compilation).Single(); 5362var cref = GetCrefSyntaxes(compilation).Single(); 5400var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5424var cref = GetCrefSyntaxes(compilation).Single(); 5443var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5444var cref = GetCrefSyntaxes(compilation).Single(); 5469var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5470var cref = GetCrefSyntaxes(compilation).Single(); 5491var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 5492var cref = GetCrefSyntaxes(compilation).Single(); 5512var cref = GetCrefSyntaxes(compilation).Single(); 5557var cref = GetCrefSyntaxes(compilation).Single(); 5593var tree = compilation.SyntaxTrees.Single(); 5594var cref = GetCrefSyntaxes(compilation).Single(); 5623var tree = compilation.SyntaxTrees.Single(); 5624var cref = GetCrefSyntaxes(compilation).Single(); 5657var cref = GetCrefSyntaxes(compilation).Single(); 5676var cref = GetCrefSyntaxes(compilation).Single(); 5691var cref = GetCrefSyntaxes(compilation).Single(); 5712var cref = GetCrefSyntaxes(compilation).Single(); 5744var cref = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 5745var parameterType = cref.Parameters.Parameters.Single().Type; 5851var cref = GetCrefSyntaxes(compilation).Single(); 5900var cref = GetCrefSyntaxes(compilation).Single(); 5924var cref = GetCrefSyntaxes(compilation).Single(); 5948var cref = GetCrefSyntaxes(compilation).Single(); 5973var cref = GetCrefSyntaxes(compilation).Single(); 5997var cref = GetCrefSyntaxes(compilation).Single(); 6025var cref = GetCrefSyntaxes(compilation).Single(); 6045var crefSyntax = GetCrefSyntaxes(compilation).Single(); 6069var crefSyntax = GetCrefSyntaxes(compilation).Single(); 6104var tree = compilation.SyntaxTrees.Single(); 6107var crefSyntax = GetCrefSyntaxes(compilation).Single(); 6139var tree = compilation.SyntaxTrees.Single(); 6145var crefSyntax = GetCrefSyntaxes(compilation).Single(); 6182var tree = compilation.SyntaxTrees.Single(); 6188var crefSyntax = GetCrefSyntaxes(compilation).Single(); 6190var parameterTypeSyntax = crefSyntax.DescendantNodes().OfType<CrefParameterSyntax>().Single().Type; 6210var tree = compilation.SyntaxTrees.Single(); 6213var crefSyntax = GetCrefSyntaxes(compilation).Single(); 6216var alias = model.GetAliasInfo(crefSyntax.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Single()); 6240var tree = compilation.SyntaxTrees.Single(); 6243var crefSyntax = GetCrefSyntaxes(compilation).Single(); 6245DescendantNodes().OfType<CrefParameterSyntax>().Single(). 6246DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 6276var cref = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 6326var cref = (ConversionOperatorMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 6328var crefParameterType = cref.Parameters.Parameters.Single().Type; 6424var tree = comp.SyntaxTrees.Single(); 6427var syntax = GetCrefSyntaxes(comp).Single(); 6462var tree = comp.SyntaxTrees.Single(); 6465var syntax = GetCrefSyntaxes(comp).Single(); 6496var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6531var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6558var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6559var cref = GetCrefSyntaxes(compilation).Single(); 6580var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6581var cref = GetCrefSyntaxes(compilation).Single(); 6603var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 6604var cref = GetCrefSyntaxes(compilation).Single(); 6672var crefSyntax = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 6674var name = ((GenericNameSyntax)crefSyntax.Name).TypeArgumentList.Arguments.Single(); 6702var cref = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 6704var parameter = cref.Parameters.Parameters.Single(); 6745var cref = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 6747var parameter = cref.Parameters.Parameters.Single(); 6801var cref = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 6844var cref = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 6895var cref = (NameMemberCrefSyntax)GetCrefSyntaxes(compilation).Single(); 6897var parameter = cref.Parameters.Parameters.Single(); 6924var cref = xml.Descendants("see").Single().Attribute("cref").Value; 6948var cref = xml.Descendants("see").Single().Attribute("cref").Value; 7065var symbol = model.GetSymbolInfo(crefSyntaxes.Single()).Symbol;
DocumentationComments\DestructorDocumentationCommentTests.cs (1)
34_acmeNamespace = (NamespaceSymbol)_compilation.GlobalNamespace.GetMembers("Acme").Single();
DocumentationComments\DocumentationCommentIDTests.cs (4)
31var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<UsingDirectiveSyntax>().Single(); 144var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<GotoStatementSyntax>().Single().Expression; 165var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 309var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<FromClauseSyntax>().Single();
DocumentationComments\FieldDocumentationCommentTests.cs (1)
58_acmeNamespace = (NamespaceSymbol)_compilation.GlobalNamespace.GetMembers("Acme").Single();
DocumentationComments\IncludeTests.cs (2)
53var acmeNamespace = (NamespaceSymbol)compilation.GlobalNamespace.GetMembers("Acme").Single(); 115var acmeNamespace = (NamespaceSymbol)compilation.GlobalNamespace.GetMembers("Acme").Single();
DocumentationComments\MethodDocumentationCommentTests.cs (1)
71_acmeNamespace = (NamespaceSymbol)_compilation.GlobalNamespace.GetMembers("Acme").Single();
DocumentationComments\ParameterTests.cs (5)
327var nameSyntax = GetNameAttributeValues(compilation).Single(); 350var nameSyntax = GetNameAttributeValues(compilation).Single(); 566var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 594var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single()); 643var model = compilation.GetSemanticModel(compilation.SyntaxTrees.Single());
DocumentationComments\PropertyDocumentationCommentTests.cs (1)
35_acmeNamespace = (NamespaceSymbol)_compilation.GlobalNamespace.GetMembers("Acme").Single();
DocumentationComments\TypeDocumentationCommentTests.cs (1)
46_acmeNamespace = (NamespaceSymbol)_compilation.GlobalNamespace.GetMembers("Acme").Single();
SymbolDisplay\SymbolDisplayTests.cs (18)
4674var a = (ITypeSymbol)comp.GlobalNamespace.GetMembers("A").Single(); 4866var outer = (INamedTypeSymbol)vbComp.GlobalNamespace.GetMembers("Outer").Single(); 5450var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 5518var indexer = type.GetMembers().Where(m => m.Kind == SymbolKind.Property && ((IPropertySymbol)m).IsIndexer).Single(); 5722var indexer = type.GetMembers().Where(m => m.Kind == SymbolKind.Property && ((IPropertySymbol)m).IsIndexer).Single(); 6439.Single(); 6482.Single(); 6516.Single(); 6611.Single(); 6670var declarator = root.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 6703var declarator = root.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 6748var declarator = root.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 7737var variable = tree.GetRoot().DescendantNodes().OfType<ForEachVariableStatementSyntax>().Single().Variable; 7832var constructor = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 7892var constructor = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 7924var continuation = tree.GetRoot().DescendantNodes().OfType<QueryContinuationSyntax>().Single(); 8312var name = tree.GetRoot().DescendantNodes().OfType<VisualBasic.Syntax.VariableDeclaratorSyntax>().Single(); 8759var binaryExpression = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single();
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (2)
1004var syntaxTree = compilation.SyntaxTrees.Single(); 1007var invocationSyntax = nodes.OfType<InvocationExpressionSyntax>().Single();
Symbols\AnonymousTypesSemanticsTests.cs (1)
2012current = current.ChildNodes().Single();
Symbols\AnonymousTypesSymbolTests.cs (1)
1640var expr = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AnonymousObjectCreationExpressionSyntax>().Single();
Symbols\AssemblyAndNamespaceTests.cs (7)
74var ns = comp.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 126var ns = global.GetMembers("N1").Single() as NamespaceSymbol; 169var ns = global.GetMembers("NS").Single() as NamespaceSymbol; 214var ns = global.GetMembers("N1").Single() as NamespaceSymbol; 262var ns = global.GetMembers("N1").Single() as NamespaceSymbol; 303var ns = global.GetMembers("N1").Single() as NamespaceSymbol; 335var ns1 = globalNS.GetMembers("NS").Single() as NamespaceSymbol;
Symbols\CheckedUserDefinedOperatorsTests.cs (89)
514var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 532crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 540crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 573var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 604var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 636var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 653crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 660crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 686var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 704crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 712crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 745var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 777var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 809var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 817crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 825crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 858var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 866crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 874crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1057var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1071crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1078crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1107var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1121crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1128crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1160var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1174crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1181crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1210var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1223crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1230crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1694var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1713crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1721crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1755var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1787var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1817var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1835crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1850crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1883var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1891crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1899crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1927var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1945crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1953crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 1987var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2020var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2052var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2070crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2078crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2111var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2119crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2127crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2276var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2312crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2320crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2370var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2406crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2414crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2853var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2871crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2879crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2909var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2938var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2967var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2996var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3019var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3037crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3045crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3075var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3104var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3133var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3162var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3254var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3268crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3275crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3304var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3318crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3325crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 7210var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7211var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single(); 7282var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7283var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single(); 7353var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7354var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single(); 7426var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7427var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single(); 7490var xNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single(); 7491var yNode = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "y").Single();
Symbols\CompilationCreationTests.cs (4)
55var types = expectedSyntaxTrees.Select(tree => compilation.GetSemanticModel(tree).GetDeclaredSymbol(tree.GetCompilationUnitRoot().Members.Single())).ToArray(); 2582MethodSymbol m1 = classModule1.GetMembers("M1").OfType<MethodSymbol>().Single(); 2583MethodSymbol m2 = classModule1.GetMembers("M2").OfType<MethodSymbol>().Single(); 2584MethodSymbol m3 = classModule1.GetMembers("M3").OfType<MethodSymbol>().Single();
Symbols\ConversionTests.cs (7)
2066var tree = comp.SyntaxTrees.Single(); 2069var castSyntax = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Single(); 2076var forEachSyntax = tree.GetRoot().DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 2136var tree = comp.SyntaxTrees.Single(); 2139var syntax = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Single(); 2170var tree = comp.SyntaxTrees.Single(); 2173var syntax = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Single();
Symbols\CorLibrary\CorTypes.cs (2)
294var node = tree.GetRoot().DescendantNodes().OfType<TypeOfExpressionSyntax>().Single(); 359var node = tree.GetRoot().DescendantNodes().OfType<TypeOfExpressionSyntax>().Single();
Symbols\DefaultInterfaceImplementationTests.cs (11)
14042return container.GetMembers().OfType<PropertySymbol>().Single(); 27670return container.GetMembers().OfType<EventSymbol>().Single(); 67148Assert.Empty(i1.GetMembers().OfType<MethodSymbol>().Single().ExplicitInterfaceImplementations); 67214Assert.Same(i2.GetMembers().OfType<MethodSymbol>().Single(), i1.GetMembers().OfType<MethodSymbol>().Single().ExplicitInterfaceImplementations.Single()); 67330var m = i1.GetMembers().OfType<PropertySymbol>().Single(); 67398var m1 = i1.GetMembers().OfType<PropertySymbol>().Single(); 67399var m2 = i2.GetMembers().OfType<PropertySymbol>().Single(); 67518var m = i1.GetMembers().OfType<EventSymbol>().Single(); 67589var m1 = i1.GetMembers().OfType<EventSymbol>().Single(); 67590var m2 = i2.GetMembers().OfType<EventSymbol>().Single();
Symbols\DestructorTests.cs (3)
404var tree = compilation.SyntaxTrees.Single(); 407var destructorDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<DestructorDeclarationSyntax>().Single(); 413var finalizeSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single().Name;
Symbols\ExtensionMethodTests.cs (6)
227syntaxTree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single()).Symbol; 2950var tree = compilation.SyntaxTrees.Single(); 2952var memberAccess = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 3008var tree = compilation.SyntaxTrees.Single(); 3010var memberAccess = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 3778var member = (MemberAccessExpressionSyntax)syntaxTree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression;
Symbols\FunctionPointerTypeSymbolTests.cs (20)
54.Single().ParameterList.Parameters 55.Single().Type; 285syntaxTree.GetRoot().DescendantNodes().OfType<FunctionPointerTypeSyntax>().Single(), 687.Single().ParameterList.Parameters 688.Single().Type; 1151.Single(); 1160.ParameterList.Parameters.Single().Type!) 1161.RankSpecifiers.Single() 1162.Sizes.Single(); 1262.Single(); 1270var nestedTypeInfo = model.GetTypeInfo(functionPointerTypeSyntax.ParameterList.Parameters.Single().Type!); 1319.Single() 1685var mDeclSyntax = syntaxTree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Skip(2).Single(); 1697var varDecl = mDeclSyntax.DescendantNodes().OfType<VariableDeclarationSyntax>().Single(); 1704var varInitializer = varDecl.Variables.Single().Initializer!.Value; 1711var assignment = mDeclSyntax.DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 1730InvocationExpressionSyntax invocationExpressionSyntax = mDeclSyntax.DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 1746var returnExpression = mDeclSyntax.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!; 1867var variableDeclaratorSyntax = m3DeclSyntax.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 1877var invocationExpr = m3DeclSyntax.DescendantNodes().OfType<InvocationExpressionSyntax>().Single();
Symbols\GenericConstraintTests.cs (2)
7393var nest = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "Nest").Single(); 7418var nest = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "Nest").Single();
Symbols\ImplicitClassTests.cs (5)
30var n = ((NamespaceSymbol)c.Assembly.GlobalNamespace.GetMembers("N").Single()); 43n = ((NamespaceSymbol)c2.GlobalNamespace.GetMembers("N").Single()); 74var toStringIdentifier = identifiers.Where(node => node.Identifier.ValueText.Equals("ToString")).Single(); 116var namespaceDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single(); 117var methodDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single();
Symbols\IndexerTests.cs (1)
1289var indexerAccessSyntax = GetElementAccessExpressions(tree.GetCompilationUnitRoot()).Single();
Symbols\InterfaceImplementationTests.cs (57)
51var @base = (NamedTypeSymbol)global.GetMembers("Base").Single(); 85var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 122var baseInterface = (NamedTypeSymbol)global.GetMembers("BaseInterface").Single(); 125var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 128var @class = (NamedTypeSymbol)global.GetMembers("Class").Single(); 178var baseInterface = (NamedTypeSymbol)global.GetMembers("BaseInterface").Single(); 181var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 184var @class = (NamedTypeSymbol)global.GetMembers("Class").Single(); 245var baseInterface1 = (NamedTypeSymbol)global.GetMembers("BaseInterface1").Single(); 248var baseInterface2 = (NamedTypeSymbol)global.GetMembers("BaseInterface2").Single(); 251var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 254var @class = (NamedTypeSymbol)global.GetMembers("Class").Single(); 317var baseInterface1 = (NamedTypeSymbol)global.GetMembers("BaseInterface1").Single(); 320var baseInterface2 = (NamedTypeSymbol)global.GetMembers("BaseInterface2").Single(); 323var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 326var @class = (NamedTypeSymbol)global.GetMembers("Class").Single(); 374var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 377var class1 = (NamedTypeSymbol)global.GetMembers("Class1").Single(); 380var class2 = (NamedTypeSymbol)global.GetMembers("Class2").Single(); 431var baseInterface = (NamedTypeSymbol)global.GetMembers("BaseInterface").Single(); 434var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 437var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 451var class1 = (NamedTypeSymbol)global.GetMembers("Class1").Single(); 459var class2 = (NamedTypeSymbol)global.GetMembers("Class2").Single(); 507var baseInterface1 = (NamedTypeSymbol)global.GetMembers("BaseInterface1").Single(); 510var baseInterface2 = (NamedTypeSymbol)global.GetMembers("BaseInterface2").Single(); 513var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 516var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 524var class1 = (NamedTypeSymbol)global.GetMembers("Class1").Single(); 535var class2 = (NamedTypeSymbol)global.GetMembers("Class2").Single(); 575var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 578var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 584var class1 = (NamedTypeSymbol)global.GetMembers("Class1").Single(); 588var class2 = (NamedTypeSymbol)global.GetMembers("Class2").Single(); 625var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 628var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 633var class1 = (NamedTypeSymbol)global.GetMembers("Class1").Single(); 637var class2 = (NamedTypeSymbol)global.GetMembers("Class2").Single(); 676var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 679var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 686var class1 = (NamedTypeSymbol)global.GetMembers("Class1").Single(); 694var class2 = (NamedTypeSymbol)global.GetMembers("Class2").Single(); 737var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 741var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 757var class1 = (NamedTypeSymbol)global.GetMembers("Class1").Single(); 775var class2 = (NamedTypeSymbol)global.GetMembers("Class2").Single(); 827var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 830var nonDeclaring1 = (NamedTypeSymbol)global.GetMembers("NonDeclaringClass1").Single(); 835var declaring1 = (NamedTypeSymbol)global.GetMembers("DeclaringClass1").Single(); 839var nonDeclaring2 = (NamedTypeSymbol)global.GetMembers("NonDeclaringClass2").Single(); 845var declaring2 = (NamedTypeSymbol)global.GetMembers("DeclaringClass2").Single(); 911var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 917var baseClass = (NamedTypeSymbol)global.GetMembers("Base").Single(); 930var derivedClass = (SourceNamedTypeSymbol)global.GetMembers("Derived").Single(); 980var @interface = (NamedTypeSymbol)global.GetMembers("Interface").Single(); 986var baseClass = (NamedTypeSymbol)global.GetMembers("Base").Single(); 999var derivedClass = (SourceNamedTypeSymbol)global.GetMembers("Derived").Single();
Symbols\LocalFunctionTests.cs (3)
35var localSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 56var localSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 77var localSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single();
Symbols\Metadata\PE\NoPia.cs (31)
75test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 76test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 108test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 109test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 141test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 142test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 195test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 196test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 232test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 233test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 263test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 264test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 297test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 298test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 416test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 417test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 449test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 450test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 481test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 482test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 521test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 522test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 566test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 567test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 597test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 598test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 633test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 634test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 1236var varI5_Foo = varI5.GetMembers("Foo").OfType<MethodSymbol>().Single(); 1246var varI7_Foo = varI7.GetMembers("Foo").OfType<MethodSymbol>().Single(); 1247var varI7_Bar = varI7.GetMembers("Bar").OfType<MethodSymbol>().Single();
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (20)
34var localField = classLocalType1.GetMembers("field").OfType<FieldSymbol>().Single(); 53var localField = classLocalType.GetMembers("nested").OfType<FieldSymbol>().Single(); 73var localField = classLocalType.GetMembers("nested").OfType<FieldSymbol>().Single(); 92var localField = classLocalType.GetMembers("nested").OfType<FieldSymbol>().Single(); 116var var1 = classLocalType1.GetMembers("i1").OfType<FieldSymbol>().Single(); 134var localField = classLocalType.GetMembers("inheritsMethods").OfType<FieldSymbol>().Single(); 163var var1 = classLocalType.GetMembers("i1").OfType<FieldSymbol>().Single(); 181var local = classLocalType1.GetMembers("typeRef").OfType<FieldSymbol>().Single(); 200var local = classLocalType1.GetMembers("typeRef").OfType<FieldSymbol>().Single(); 219var local = classLocalType1.GetMembers("typeRef").OfType<FieldSymbol>().Single(); 238var local = classLocalType1.GetMembers("typeRef").OfType<FieldSymbol>().Single(); 257var local = classLocalType.GetMembers("i2").OfType<FieldSymbol>().Single(); 276var local = classLocalType.GetMembers("typeRef").OfType<FieldSymbol>().Single(); 295var local = classLocalType.GetMembers("tr2a").OfType<FieldSymbol>().Single(); 314var local = classLocalType.GetMembers("tr2a").OfType<FieldSymbol>().Single(); 333var local = classLocalType.GetMembers("tr2b").OfType<FieldSymbol>().Single(); 352var var1 = classLocalType.GetMembers("Event2").OfType<EventSymbol>().Single(); 369var var1 = classLocalType.GetMembers("Event3").OfType<FieldSymbol>().Single(); 389var localField = classLocalType.GetMembers("myclass").OfType<FieldSymbol>().Single(); 410var localField = classLocalType.GetMembers("mygeneric").OfType<FieldSymbol>().Single();
Symbols\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.cs (15)
42MethodSymbol methodSymbol = classLocalType.GetMembers("Test1").OfType<MethodSymbol>().Single(); 100MethodSymbol methodSymbol = classLocalType.GetMembers("Test1").OfType<MethodSymbol>().Single(); 136FieldSymbol localFieldSymbol = classLocalType.GetMembers("myOwnVar").OfType<FieldSymbol>().Single(); 139MethodSymbol refMethodSymbol = classRefLocalType.GetMembers("Scen1").OfType<MethodSymbol>().Single(); 196FieldSymbol localFieldSymbol = classLocalType.GetMembers("myOwnRef").OfType<FieldSymbol>().Single(); 199MethodSymbol refMethodSymbol = classRefLocalType.GetMembers("Scen2").OfType<MethodSymbol>().Single(); 232FieldSymbol localFieldSymbol = classLocalType.GetMembers("myLocalType").OfType<FieldSymbol>().Single(); 235MethodSymbol methodSymbol = classRefLocalType.GetMembers("Scen3").OfType<MethodSymbol>().Single(); 267FieldSymbol localFieldSymbol = classLocalType.GetMembers("myLocalType").OfType<FieldSymbol>().Single(); 270var methodSymbol = classRefLocalType.GetMembers("Scen4").OfType<PropertySymbol>().Single(); 300FieldSymbol localFieldSymbol = classLocalType.GetMembers("myLocalType").OfType<FieldSymbol>().Single(); 303var methodSymbol = classRefLocalType.GetMembers("Scen5").OfType<PropertySymbol>().Single(); 326MethodSymbol methodSymbol = classRefLocalType.GetMembers("Foo").OfType<MethodSymbol>().Single(); 348MethodSymbol methodSymbol = classRefLocalType.GetMembers("Foo").OfType<MethodSymbol>().Single(); 370MethodSymbol refMethodSymbol = classRefLocalType.GetMembers("Scen2").OfType<MethodSymbol>().Single();
Symbols\MethodEqualityTests.cs (1)
205var tree = comp.SyntaxTrees.Single();
Symbols\OverriddenOrHiddenMembersTests.cs (21)
245var baseInterface1 = (NamedTypeSymbol)global.GetMembers("BaseInterface1").Single(); 246var baseInterface2 = (NamedTypeSymbol)global.GetMembers("BaseInterface2").Single(); 247var derivedInterface1 = (NamedTypeSymbol)global.GetMembers("DerivedInterface1").Single(); 248var derivedInterface2 = (NamedTypeSymbol)global.GetMembers("DerivedInterface2").Single(); 336var baseInterface1 = (NamedTypeSymbol)global.GetMembers("BaseInterface1").Single(); 337var baseInterface2 = (NamedTypeSymbol)global.GetMembers("BaseInterface2").Single(); 338var derivedInterface1 = (NamedTypeSymbol)global.GetMembers("DerivedInterface1").Single(); 339var derivedInterface2 = (NamedTypeSymbol)global.GetMembers("DerivedInterface2").Single(); 417var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 418var derivedClass = (NamedTypeSymbol)global.GetMembers("DerivedClass").Single(); 468var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 469var derivedClass = (NamedTypeSymbol)global.GetMembers("DerivedClass").Single(); 528var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 529var derivedClass = (NamedTypeSymbol)global.GetMembers("DerivedClass").Single(); 606var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 607var derivedClass = (NamedTypeSymbol)global.GetMembers("DerivedClass").Single(); 666var baseClass = (NamedTypeSymbol)global.GetMembers("BaseClass").Single(); 667var derivedClass = (NamedTypeSymbol)global.GetMembers("DerivedClass").Single(); 746var definingClass = (NamedTypeSymbol)global.GetMembers("DefiningClass").Single(); 747var hidingClass = (NamedTypeSymbol)global.GetMembers("HidingClass").Single(); 748var overridingClass = (NamedTypeSymbol)global.GetMembers("OverridingClass").Single();
Symbols\RelaxedShiftOperatorTests.cs (6)
102var shift = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 146var shift = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 190var shift = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 234var shift = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 278var shift = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single(); 322var shift = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single();
Symbols\Retargeting\NoPia.cs (42)
385test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 386test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 418test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 419test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 449test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 450test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 501test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 502test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 536test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 537test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 566test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 567test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 599test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 600test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 686test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 687test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 719test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 720test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 750test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 751test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 802test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 803test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 837test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 838test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 867test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 868test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 900test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 901test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 990test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 991test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 1023test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 1024test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 1054test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 1055test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 1106test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 1107test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 1141test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 1142test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 1171test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 1172test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single(); 1204test1 = classLocalTypes1.GetMembers("Test1").OfType<MethodSymbol>().Single(); 1205test2 = classLocalTypes2.GetMembers("Test2").OfType<MethodSymbol>().Single();
Symbols\Retargeting\RetargetCustomAttributes.cs (6)
209FieldSymbol testField = testClass.GetMembers("testField").OfType<FieldSymbol>().Single(); 219PropertySymbol testProperty = testClass.GetMembers("TestProperty").OfType<PropertySymbol>().Single(); 233MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single(); 243MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single(); 255MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single(); 267MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single();
Symbols\Retargeting\RetargetCustomModifiers.cs (8)
47FieldSymbol f0 = modifiers.GetMembers("F0").OfType<FieldSymbol>().Single(); 57MethodSymbol m1 = modifiers.GetMembers("F1").OfType<MethodSymbol>().Single(); 59ParameterSymbol p2 = modifiers.GetMembers("F2").OfType<MethodSymbol>().Single().Parameters[0]; 61MethodSymbol m5 = modifiers.GetMembers("F5").OfType<MethodSymbol>().Single(); 64ParameterSymbol p6 = modifiers.GetMembers("F6").OfType<MethodSymbol>().Single().Parameters[0]; 66MethodSymbol m7 = modifiers.GetMembers("F7").OfType<MethodSymbol>().Single(); 165FieldSymbol volatileFld = modifiers.GetMembers("volatileFld").OfType<FieldSymbol>().Single(); 192MethodSymbol m1 = modifiers.GetMembers("F1").OfType<MethodSymbol>().Single();
Symbols\Source\AccessTests.cs (4)
30var a = global.GetMembers("A").Single() as NamespaceSymbol; 47var a = global.GetMembers("A").Single() as NamespaceSymbol; 73var a = global.GetMembers("A").Single() as NamespaceSymbol; 96var a = global.GetMembers("A").Single() as NamespaceSymbol;
Symbols\Source\BaseClassTests.cs (12)
1072var B1 = global1.GetTypeMembers("ClassB", 0).Distinct().Single(); 1188var B1 = global1.GetTypeMembers("ClassB", 0).Distinct().Single(); 1254var n = global.GetMembers("N").OfType<NamespaceSymbol>().Single(); 1279var n1 = global.GetMembers("N1").Single() as NamespaceSymbol; 1280var n2 = global.GetMembers("N2").Single() as NamespaceSymbol; 1301var n1 = global.GetMembers("N1").Single() as NamespaceSymbol; 1302var n2 = global.GetMembers("N2").Single() as NamespaceSymbol; 1320var d = global.GetMembers("D").Single() as NamedTypeSymbol; 1380var n1 = global.GetMembers("N1").Single() as NamespaceSymbol; 1381var n2 = global.GetMembers("N2").Single() as NamespaceSymbol; 1440NamespaceSymbol nif = (NamespaceSymbol)comp.SourceModule.GlobalNamespace.GetMembers("if").Single(); 1465NamespaceSymbol nif = (NamespaceSymbol)comp.SourceModule.GlobalNamespace.GetMembers("if").Single();
Symbols\Source\DeclaringSyntaxNodeTests.cs (8)
190var n1 = global.GetMembers("N1").Single() as INamespaceSymbol; 234var n1 = global.GetMembers("N1").Single() as INamespaceSymbol; 409var system = global.GetMembers("System").Single() as INamespaceSymbol; 410var n1 = global.GetMembers("N1").Single() as INamespaceSymbol; 411var n2 = n1.GetMembers("N2").Single() as INamespaceSymbol; 412var n3 = n2.GetMembers("N3").Single() as INamespaceSymbol; 449var n1 = global.GetMembers("N1").Single() as INamespaceSymbol; 516var n1 = global.GetMembers("N1").Single() as INamespaceSymbol;
Symbols\Source\DelegateTests.cs (10)
228NamedTypeSymbol dout = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("out").Single(); 338NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 392NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 423NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 454NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 488NamedTypeSymbol d = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("D").Single(); 738var anonymousMethod = root.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 765var anonymousMethod = root.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 827ExpressionSyntax lambdaSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 834lambdaSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single();
Symbols\Source\EnumTests.cs (1)
757var classEnum = comp.SourceModule.GlobalNamespace.GetMembers("EnumPartial").Single() as NamedTypeSymbol;
Symbols\Source\EventTests.cs (2)
59NamedTypeSymbol c1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C1").Single(); 303var semanticModel = compVerifier.Compilation.GetSemanticModel(compVerifier.Compilation.SyntaxTrees.Single());
Symbols\Source\ExternAliasTests.cs (5)
408var aliasSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ExternAliasDirectiveSyntax>().Single(); 434var aliasSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ExternAliasDirectiveSyntax>().Single(); 475var tree = comp.SyntaxTrees.Single(); 479var externAliasSyntax = root.DescendantNodes().OfType<ExternAliasDirectiveSyntax>().Single(); 480var usingSyntax = root.DescendantNodes().OfType<UsingDirectiveSyntax>().Single();
Symbols\Source\FieldTests.cs (2)
235NamedTypeSymbol c1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C1").Single(); 255NamedTypeSymbol type1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C").Single();
Symbols\Source\FileModifierTests.cs (6)
3612var invoked = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression; 3977var methodNameSyntax = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Single(); 4124var voidTypeSyntax = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single().Type!; 4410var node = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single(); 4454var node = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single(); 4477var node = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single();
Symbols\Source\LocationTests.cs (1)
28var n = global.GetMembers("N").Single() as NamespaceSymbol;
Symbols\Source\MethodTests.cs (17)
289var node = tree.DescendantNodes().OfType<PredefinedTypeSyntax>().Where(n => n.Keyword.Kind() == SyntaxKind.VoidKeyword).Single(); 310var node = tree.DescendantNodes().OfType<PredefinedTypeSyntax>().Where(n => n.Keyword.Kind() == SyntaxKind.VoidKeyword).Single(); 510var ns = comp.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 586var ns = comp.GlobalNamespace.GetMembers("N1").Single() as NamespaceSymbol; 779var ns = comp.GlobalNamespace.GetMembers("N1").Single() as NamespaceSymbol; 958var ns = comp.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1068var ns = comp.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1165var ns = comp.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1259var ns = comp.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1354var classB = (NamedTypeSymbol)comp.GlobalNamespace.GetMembers("B").Single(); 1372var classC = (NamedTypeSymbol)comp.GlobalNamespace.GetMembers("C").Single(); 1464var ns = comp.GlobalNamespace.GetMembers("N2").Single() as NamespaceSymbol; 1502var n2 = comp.GlobalNamespace.GetMembers("N2").Single() as NamespaceSymbol; 1618NamedTypeSymbol c1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C1").Single(); 1708var systemNamespace = (NamespaceSymbol)globalNamespace.GetMembers("System").Single(); 1804var systemNamespace = (NamespaceSymbol)globalNamespace.GetMembers("Namespace").Single(); 2571var type = syntax.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().Single();
Symbols\Source\NullablePublicAPITests.cs (94)
377return c.GetMembers("M1").OfType<IMethodSymbol>().Single().Parameters.ToArray(); 1123_ = model.GetTypeInfoAndVerifyIOperation(root.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single().Value); 1219var dCast = (CastExpressionSyntax)root.DescendantNodes().OfType<EqualsValueClauseSyntax>().Single().Value; 1263var conditional = root.DescendantNodes().OfType<ConditionalExpressionSyntax>().Single(); 1361var ifStatement = root.DescendantNodes().OfType<IfStatementSyntax>().Single(); 1362var conditionalAccessExpression = root.DescendantNodes().OfType<ConditionalAccessExpressionSyntax>().Single(); 1363var ternary = root.DescendantNodes().OfType<ConditionalExpressionSyntax>().Single(); 1441var returnStatement = root.DescendantNodes().OfType<ReturnStatementSyntax>().Single(); 1443var yReference = ((MemberAccessExpressionSyntax)newSource.DescendantNodes().OfType<InvocationExpressionSyntax>().Single().Expression).Expression; 1513var ifStatement = root.DescendantNodes().OfType<IfStatementSyntax>().Single(); 1514var conditionalAccessExpression = root.DescendantNodes().OfType<ConditionalAccessExpressionSyntax>().Single(); 1569var ifStatement = root.DescendantNodes().OfType<IfStatementSyntax>().Single(); 1570var conditionalAccessExpression = root.DescendantNodes().OfType<ConditionalAccessExpressionSyntax>().Single(); 1571var ternary = root.DescendantNodes().OfType<ConditionalExpressionSyntax>().Single(); 1626var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 1627var varDecl = lambda.DescendantNodes().OfType<VariableDeclarationSyntax>().Single(); 1669var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 1670var varDecl = lambda.DescendantNodes().OfType<VariableDeclarationSyntax>().Single(); 1712var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 1713var varDecl = lambda.DescendantNodes().OfType<VariableDeclarationSyntax>().Single(); 2133var s2Assignment = root.DescendantNodes().OfType<AssignmentExpressionSyntax>().Single(); 2136var newDeclarator = newDeclaration.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 2218var declaration = root.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 2629var sRef = root.DescendantNodes().OfType<IdentifierNameSyntax>().Where(n => n.Identifier.ValueText == "s").Single(); 2663var select = root.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "Select").Single(); 2701var select = root.DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ValueText == "Select").Single(); 2927var lhs = root.DescendantNodes().OfType<AssignmentExpressionSyntax>().Single().Left; 2957var collectionInitializer = root.DescendantNodes().OfType<InitializerExpressionSyntax>().Single(); 2999var collectionInitializer = root.DescendantNodes().OfType<InitializerExpressionSyntax>().Single(); 3041var collectionInitializer = root.DescendantNodes().OfType<InitializerExpressionSyntax>().Single(); 3101var collectionInitializer = root.DescendantNodes().OfType<InitializerExpressionSyntax>().Single(); 3488var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3497.Single() 3661var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3664var localFunction = lambda.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 3697var localFunctionBody = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 3698var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 3732var localFunctionBody = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3733var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 3769var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3772.Single() 3808var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3810var parameter = lambda.DescendantNodes().OfType<ParameterSyntax>().Single(); 3868var @foreach = lambda.DescendantNodes().OfType<ForEachStatementSyntax>().Single(); 3876var localFunction = lambda.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 3879var o8Declaration = localFunction.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 3917var o2Decl = fieldLambda.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 3931var o4Decl = propertyLambda.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(); 4062var localFunction = root.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 4065var speculativeO2Ref = speculativeAttribute.DescendantNodes().OfType<AttributeArgumentSyntax>().Single().Expression; 4117var localFunction = lambda.DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 4120var position = localFunction.DescendantNodes().OfType<VariableDeclarationSyntax>().Single().Span.End; 4242var typeOf = syntaxTree.GetRoot().DescendantNodes().OfType<TypeOfExpressionSyntax>().Single(); 4365var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4370var type2 = statement.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4393var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4398var type2 = statement.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4421var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4428var type2 = statement.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4451var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4458var type2 = statement.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4481var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4488var type2 = statement.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4511var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4520var type2 = methodDeclaration.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4543var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4553var type2 = methodDeclaration.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4576var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4581var type2 = arrow.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4604var type = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4611var type2 = arrow.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4637var initializer = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 4642var type2 = newInitializer.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4668var initializer = tree.GetRoot().DescendantNodes().OfType<ConstructorInitializerSyntax>().Single(); 4675var type2 = newInitializer.DescendantNodes().OfType<DeclarationExpressionSyntax>().Single().Type; 4699var initializer = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().Single(); 4905.Single(); 4914var newAccess = newBody.DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single(); 4933var localFunction = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); 4966var ternary = tree.GetRoot().DescendantNodes().OfType<ConditionalExpressionSyntax>().Single(); 5010var tupleLiteral = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Single(); 5049var constructor = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single(); 5065var switchExpressionInput = tree.GetRoot().DescendantNodes().OfType<SwitchExpressionSyntax>().Single().GoverningExpression; 5102var binaryRight = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single().Right; 5134var binaryRight = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single().Right; 5162var binaryRightArgument = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Single().Right.DescendantNodes().OfType<ArgumentSyntax>().Single().Expression; 5197var xUsage = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single().Expression; 5232var xUsage = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Single().Expression; 5255var collectionExpr = root.DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 5278var collectionExpr = root.DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 5310var collectionExpr = root.DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 5333var collectionExpr = root.DescendantNodes().OfType<CollectionExpressionSyntax>().Single(); 5355var collectionExpr = root.DescendantNodes().OfType<CollectionExpressionSyntax>().Single();
Symbols\Source\PropertyTests.cs (5)
449NamedTypeSymbol c1 = (NamedTypeSymbol)comp.SourceModule.GlobalNamespace.GetMembers("C1").Single(); 628var type = (PENamedTypeSymbol)compilation.GlobalNamespace.GetMembers("NoAccessors").Single(); 712var type = (PENamedTypeSymbol)verifier.Compilation.GlobalNamespace.GetMembers("Signatures").Single().GetSymbol(); 790var type = (PENamedTypeSymbol)compilation.GlobalNamespace.GetMembers("FamilyAssembly").Single(); 1819var @namespace = (NamespaceSymbol)globalNamespace.GetMembers("N").Single();
Symbols\Source\SourcePlusMetadataTests.cs (2)
82var system = global.GetMembers("System").Single() as NamespaceSymbol; 138var ns = (NamespaceSymbol)compilation.GlobalNamespace.GetMembers("NS").Single();
Symbols\Source\UsingAliasTests.cs (2)
697var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Short").Skip(1).Single(); 740var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Short").Skip(1).Single();
Symbols\StaticAbstractMembersInInterfacesTests.cs (4)
10752var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Where(n => n.ToString() == "x " + op + " 1").Single(); 10945var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Where(n => n.ToString() == "x " + op + " 1").Single(); 11135var node = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Where(n => n.ToString() == "x " + op + " y").Single(); 11960var node = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Where(n => n.ToString() == "x " + op + "= 1").Single();
Symbols\SymbolEqualityTests.cs (1)
962OfType<QueryExpressionSyntax>().Single();
Symbols\SymbolErrorTests.cs (61)
1472var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1498var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1517var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1535var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 1548var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 2335var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 2457var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 2556var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 2585var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3088var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3364var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3578var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3600var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3636var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3658var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3705var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3733var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3759var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3784var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 3948var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 4376var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 4756var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 5414var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 5556var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 5599var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 7462var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 8083var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 8202var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 8235var nsNamespace = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 8668var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9164var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9194var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9214var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9238var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9261var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9287var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9317var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 9335var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 11028var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 11456var ns = comp.SourceModule.GlobalNamespace.GetMembers("x").Single() as NamespaceSymbol; 12346var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 12522var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 12676var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 12725var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13054var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13084var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13114var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13475var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 13523var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 14560var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 14682var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 15097var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 15143var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol; 16951var ns1 = (NamespaceSymbol)comp.GlobalNamespace.GetMembers("N1").Single(); 16952var ns2 = (NamespaceSymbol)comp.GlobalNamespace.GetMembers("N2").Single(); 17650var ns = comp.SourceModule.GlobalNamespace.GetMembers("SA").Single() as NamespaceSymbol; 17687var ns = comp.SourceModule.GlobalNamespace.GetMembers("SA").Single() as NamespaceSymbol; 17930var ns = comp.SourceModule.GlobalNamespace.GetMembers("SA").Single() as NamespaceSymbol; 19407var b = comp.SourceModule.GlobalNamespace.GetMembers("B").Single() as NamespaceSymbol; 19422var b = comp.SourceModule.GlobalNamespace.GetMembers("B").Single() as NamespaceSymbol; 19453var ns = comp.SourceModule.GlobalNamespace.GetMembers("NS").Single() as NamespaceSymbol;
Symbols\SymbolExtensionTests.cs (1)
252var method = model.GetSymbolInfo(tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Method").Single()).Symbol.GetSymbol<MethodSymbol>();
Symbols\TypeTests.cs (12)
126var ns = global.GetMembers("NS").Single() as NamespaceSymbol; 205var ns = global.GetMembers("NS").Single() as NamespaceSymbol; 273var ns = global.GetMembers("NS").Single() as NamespaceSymbol; 348var ns = global.GetMembers("NS").Single() as NamespaceSymbol; 1062var ns = global.GetMembers("Convert").Single() as NamespaceSymbol; 1080var ns1 = global.GetMembers("NS1").Single() as NamespaceSymbol; 1102var ns = global.GetMembers("Collections").Single() as NamespaceSymbol; 1120var ns1 = global.GetMembers("NS").Single() as NamespaceSymbol; 1181var d = global.GetMembers("D").Single() as NamedTypeSymbol; 1200var system = global.GetMembers("System").Single() as NamespaceSymbol; 1851var tree = compilation.SyntaxTrees.Single(); 1854var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Single();
Symbols\UnsignedRightShiftTests.cs (14)
2705var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2723crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2731crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2761var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2790var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2821var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2854var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2877var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2895crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2903crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2933var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2962var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 2993var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single(); 3026var crefSyntax = CrefTests.GetCrefSyntaxes(compilation).Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (104)
Diagnostics\DiagnosticTest.cs (1)
1982var defineName = nodes.OfType<Syntax.DefineDirectiveTriviaSyntax>().Single().Name;
LexicalAndXml\LexicalTests.cs (16)
171var trivia = token.LeadingTrivia.Single(); 3840Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3850var trivia = token.LeadingTrivia.Single(); 3868Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3876var trivia = token.LeadingTrivia.Single(); 3899Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3922Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3940Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 3950Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.ConflictMarkerTrivia); 3956var trivia = token.LeadingTrivia.Single(); 4079Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 4089Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.ConflictMarkerTrivia); 4095var trivia = token.LeadingTrivia.Single(); 4245Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.WhitespaceTrivia); 4255Assert.True(token.LeadingTrivia.Single().Kind() == SyntaxKind.ConflictMarkerTrivia); 4261var trivia = token.LeadingTrivia.Single();
LexicalAndXml\PreprocessorTests.cs (15)
2105var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2127var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2215var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2236var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2257var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2278var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2299var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2320var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2341var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 2362var regionText = regionDirective.EndOfDirectiveToken.LeadingTrivia.Single(); 3215var error = tree.GetDiagnostics().Single(); 3875var diagnostic = tree.GetDiagnostics().Single(); 4425Assert.True(node.GetLoadDirectives().Single().File.IsMissing); 4567SyntaxToken token = nodes.OfType<NullableDirectiveTriviaSyntax>().Single().SettingToken; 4569token = nodes.OfType<ClassDeclarationSyntax>().Single().Identifier;
LexicalAndXml\RawStringLiteralLexingTests.cs (2)
221Assert.All(diagnostics, d => Assert.Equal(spans.Single().Key, d.Id)); 223var expectedDiagnosticSpans = spans.Single().Value.OrderBy(d => d.Start);
LexicalAndXml\XmlDocCommentTests.cs (2)
1976var typeParameter = method.TypeParameterList.Parameters.Single(); 2012var typeParameter = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).TypeParameterList.Parameters.Single();
Parsing\CrefParsingTests.cs (2)
29var trivia = SyntaxFactory.ParseLeadingTrivia(commentText, options ?? CSharpParseOptions.Default).Single(); 31var attr = structure.DescendantNodes().OfType<XmlCrefAttributeSyntax>().Single();
Parsing\ExpressionParsingTests.cs (1)
3016Assert.Equal(1, arrayCreation.Type.RankSpecifiers.Single().Rank);
Parsing\LocalFunctionParsingTests.cs (4)
1230.Single()); 1294var c = Assert.IsType<ClassDeclarationSyntax>(file.Members.Single()); 1346var c = Assert.IsType<ClassDeclarationSyntax>(file.Members.Single()); 1367var s2 = Assert.IsType<ReturnStatementSyntax>(s1.Body.Statements.Single());
Parsing\NameAttributeValueParsingTests.cs (2)
30var trivia = SyntaxFactory.ParseLeadingTrivia(commentText).Single(); 32var attr = structure.DescendantNodes().OfType<XmlNameAttributeSyntax>().Single();
Parsing\ParserErrorMessageTests.cs (15)
2632var error = parsedTree.GetDiagnostics().Single(); 3768Assert.Equal(SyntaxKind.InKeyword, methodDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3771Assert.Equal(SyntaxKind.InKeyword, delegateDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3774Assert.Equal(SyntaxKind.InKeyword, localFunctionStatement.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3777Assert.Equal(SyntaxKind.InKeyword, lambdaExpression.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3780Assert.Equal(SyntaxKind.InKeyword, anonymousMethodExpression.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3783Assert.Equal(SyntaxKind.InKeyword, indexerDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3786Assert.Equal(SyntaxKind.InKeyword, operatorDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind());
Parsing\ParsingErrorRecoveryTests.cs (10)
7937var classDecl = root.DescendantNodes().OfType<ClassDeclarationSyntax>().Single(); 7941var ns = root.DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single(); 7958var classDecl = root.DescendantNodes().OfType<ClassDeclarationSyntax>().Single(); 7962var ns = root.DescendantNodes().OfType<FileScopedNamespaceDeclarationSyntax>().Single(); 7979var structDecl = root.DescendantNodes().OfType<StructDeclarationSyntax>().Single(); 7982var ns = root.DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single(); 8002var structDecl = root.DescendantNodes().OfType<StructDeclarationSyntax>().Single(); 8006var ns = root.DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single(); 8026var classDecl = root.DescendantNodes().OfType<ClassDeclarationSyntax>().Single(); 8030var ns = root.DescendantNodes().OfType<NamespaceDeclarationSyntax>().Single();
Parsing\ScriptParsingTests.cs (8)
9639var trivia = eof.GetLeadingTrivia().Single(); 9642TestShebang(root.GetDirectives().Single(), command); 9656TestShebang(root.GetDirectives().Single(), command); 9663var statement = root.ChildNodes().Single(); 9665trivia = statement.GetLeadingTrivia().Single(); 9668TestShebang(root.GetDirectives().Single(), command); 9713Assert.Equal(SyntaxKind.SingleLineCommentTrivia, eof.GetLeadingTrivia().Single().Kind()); 9740var skippedText = endOfDirective.LeadingTrivia.Single();
Parsing\StatementParsingTests.cs (1)
3467var filterClause = root.DescendantNodes().OfType<CatchFilterClauseSyntax>().Single();
Parsing\VerbatimCrefParsingTests.cs (2)
29var trivia = SyntaxFactory.ParseLeadingTrivia(commentText).Single(); 31var attr = structure.DescendantNodes().OfType<XmlTextAttributeSyntax>().Single();
Syntax\FieldAndValueKeywordTests.cs (1)
1277var expr = syntaxTree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().Single().Expression;
Syntax\LambdaUtilitiesTests.cs (1)
57var methodDef = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(d => d.Identifier.ValueText == "M").Single();
Syntax\SyntaxAnnotationTests.cs (7)
171var node2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsNode(); 203var token2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsToken(); 235var trivia2 = newRoot.GetAnnotatedTrivia(annotation1).Single(); 300Assert.NotNull(rightNode.GetAnnotations().Single()); 620var annotatedNode = results.Single().AsNode(); 634var annotatedToken = results.Single().AsToken(); 648var annotatedTrivia = results.Single();
Syntax\SyntaxNodeTests.cs (7)
911tree1.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single().IsIncrementallyIdenticalTo( 912tree2.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single())); 922tree1.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single().IsIncrementallyIdenticalTo( 923tree2.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single())); 3464var @class = (ClassDeclarationSyntax)compilationUnit.Members.Single(); 3465var method = (MethodDeclarationSyntax)@class.Members.Single(); 3552var method = root.DescendantNodes().OfType<MethodDeclarationSyntax>().Single();
Syntax\SyntaxRewriterTests.cs (7)
337var tokenT = tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "T").Single(); 349var typeName = tree.GetCompilationUnitRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.GenericName)).Single(); 363var before = root.DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 382var invocation = root.DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 401var invocation = root.DescendantNodes().OfType<InvocationExpressionSyntax>().Single(); 601var ifStmt1 = tree1.GetCompilationUnitRoot().DescendantNodes().OfType<IfStatementSyntax>().Single(); 651var xmlNode = oldRoot.DescendantNodes(descendIntoTrivia: true).OfType<XmlEmptyElementSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
769return GetSyntaxes<T>(tree, text).Single();
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (10)
CodeGen\WinMdEventTests.cs (1)
671var syntax = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Single();
CodeGen\WinRTCollectionTests.cs (1)
7424var add = tree.GetRoot().DescendantNodes().Where(n => n.IsKind(SyntaxKind.IdentifierName) && ((IdentifierNameSyntax)n).Identifier.ValueText == "Add").Single();
Metadata\WinMdEventTests.cs (1)
2747var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single();
Metadata\WinMdMetadataTests.cs (7)
46var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 68var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 89var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 109var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 129var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 171var winmdlib = comp.ExternalReferences.Where(r => r.Display == "Windows").Single(); 240var attributeHandle = module.Module.MetadataReader.GetCustomAttributes(c.Handle).Single();
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (2)
110aliasAnnotationInfo = qualifiedNameNode.Right.Identifier.GetAnnotations(AliasAnnotation.Kind).Single(); 118aliasAnnotationInfo = aliasQualifiedNameNode.Name.Identifier.GetAnnotations(AliasAnnotation.Kind).Single();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (2)
90var text = pair.Value.GetTextChanges(GetTextSpan(pair.Key)).Single().NewText ?? ""; 146var text = triviaData.GetTextChanges(GetTextSpan(pair)).Single().NewText ?? "";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
204var newDeclarationTypeNode = newTree.GetRoot(cancellationToken).GetAnnotatedNodes(annotation).Single();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (1)
45newContextNode = (TContextNode)newRoot.GetAnnotatedNodes(s_annotation).Single();
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (4)
1669var symbol = compilation.GlobalNamespace.GetMembers("I").Single(); 4910var symbol = compilation.GlobalNamespace.GetMembers("S").Single(); 4966var symbol = compilation.GlobalNamespace.GetMembers("C").Single(); 4989var tree = compilation.SyntaxTrees.Single();
Microsoft.CodeAnalysis.EditorFeatures (15)
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (1)
55_ = ExecuteAsync(args, document, spans.Single()).CompletesAsyncOperation(token);
InlineRename\AbstractInlineRenameUndoManager.cs (1)
104var selectionSpan = selection.GetSnapshotSpansOnBuffer(snapshot.TextBuffer).Single();
InlineRename\CommandHandlers\AbstractRenameCommandHandler.cs (1)
77var singleSpan = selectedSpans.Single();
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
121var sessionInfo = await renameService.StartInlineSessionAsync(document, selectedSpans.Single().Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
InlineRename\CommandHandlers\AbstractRenameCommandHandler_WordDeleteHandler.cs (3)
55if (selectedSpans.Count == 1 && span.Contains(selectedSpans.Single().Span)) 58start = selectedSpans.Single().Start; 59end = selectedSpans.Single().End;
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
250var singleTrackingSpanTouched = trackingSpansTouched.Single();
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (3)
95if (e.Changes.Count != 1 || ShouldClearTrackingSession(e.Changes.Single())) 104var change = e.Changes.Single(); 171var change = eventArgs.Changes.Single();
Shared\Extensions\ITextViewExtensions.cs (2)
96var spanInView = textView.GetSpanInView(span).Single(); 107var spansInView = spans.Select(s => new Selection(textView.GetSpanInView(s).Single()));
Shared\Extensions\MefExtensions.cs (1)
55return extensions.SelectMatchingExtensions(contentTypes).Single();
Shared\Utilities\LinkedEditsTracker.cs (1)
98var singleIntersectingTrackingSpan = trackingSpansThatIntersect.Single();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (38)
AbstractTypingCommandHandlerTest.cs (1)
33var testDocument = workspace.Documents.Single();
AutomaticCompletion\AbstractAutomaticLineEnderTests.cs (2)
75var view = workspace.Documents.Single().GetTextView(); 76var buffer = workspace.Documents.Single().GetTextBuffer();
BraceMatching\AbstractBraceMatcherTests.cs (1)
26var position = workspace.Documents.Single().CursorPosition.Value;
BracePairs\AbstractBracePairsTests.cs (3)
30var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); 38var expected = workspace.Documents.Single().AnnotatedSpans;
CommentSelection\AbstractToggleCommentTestBase.cs (3)
66=> textView.BufferGraph.GetTextBuffers(b => b.ContentType.IsOfType(contentTypeName)).Single(); 85textView.Selection.Select(new SnapshotSpan(snapshot, spans.Single()), isReversed: false); 86textView.Caret.MoveTo(new SnapshotPoint(snapshot, spans.Single().End));
CompleteStatement\AbstractCompleteStatementTests.cs (1)
101var testDocument = workspace.Documents.Single();
Completion\AbstractCompletionProviderTests.cs (1)
1272Assert.Same(hostDocument, workspace.Documents.Single());
Diagnostics\DiagnosticTaggerWrapper.cs (1)
68.Single();
DocumentationComments\AbstractDocumentationCommentTests.cs (1)
133var testDocument = workspace.Documents.Single();
DocumentationComments\AbstractXmlTagCompletionTests.cs (1)
30var testDocument = workspace.Documents.Single();
ExtractInterface\AbstractExtractInterfaceTests.cs (1)
115Assert.Equal(expectedMemberName, testState.TestExtractInterfaceOptionsService.AllExtractableMembers.Single().Name);
Formatting\CoreFormatterTestsBase.cs (2)
137var testDocument = workspace.Documents.Single(); 244var testDocument = workspace.Documents.Single();
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
50Assert.Equal(hostDocument.SelectedSpans.Single().Start, targetPosition.Value);
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
44var testDocument = workspace.Documents.Single();
LanguageServer\AbstractLanguageServerProtocolTests.cs (2)
435.Projects.Single() 447.Projects.Single()
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
27var project = workspace.CurrentSolution.Projects.Single();
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
26var project = workspace.CurrentSolution.Projects.Single();
SignatureHelp\AbstractSignatureHelpProviderTests.cs (1)
468var documentId = testWorkspace.Documents.Where(d => d.Name == "SourceDocument").Single().Id;
SpellCheck\AbstractSpellCheckFixerProviderTests.cs (2)
38var document = workspace.Documents.Single(); 42var (replacement, span) = document.AnnotatedSpans.Single();
SpellCheck\AbstractSpellCheckSpanTests.cs (4)
26var annotations = workspace.Projects.Single().Documents.Single().AnnotatedSpans; 28var document = workspace.CurrentSolution.Projects.Single().Documents.Single();
Structure\AbstractSyntaxStructureProviderTests.cs (2)
45var hostDocument = workspace.Documents.Single(); 66var hostDocument = workspace.Documents.Single();
TextStructureNavigation\AbstractTextStructureNavigationTests.cs (1)
39var (key, expectedSpans) = annotatedSpans.Single();
Workspaces\EditorTestHostDocument.cs (1)
134var span = this.SelectedSpans.Single();
Workspaces\TestWorkspaceFixture.cs (3)
24public EditorTestHostDocument CurrentDocument => _currentDocument ?? _workspace.Documents.Single(); 52_currentDocument = workspace.Documents.Single(); 80var hostDocument = _currentDocument ?? (GetWorkspace()).Documents.Single();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (195)
CodeFixes\CodeFixServiceTests.cs (14)
56var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 57var document = project.Documents.Single(); 61var fixer1 = (MockFixer)fixers.Single().Value; 294var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 295document = project.Documents.Single(); 351workspace.Projects.Single().AddAdditionalDocument(additionalDocument); 398var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 401TextDocumentKind.Document => project.Documents.Single(), 402TextDocumentKind.AdditionalDocument => project.AdditionalDocuments.Single(), 403TextDocumentKind.AnalyzerConfigDocument => project.AnalyzerConfigDocuments.Single(), 779var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 781var document = project.Documents.Single(); 1072sourceDocument = workspace.CurrentSolution.Projects.Single().Documents.Single();
CodeGeneration\CodeGenerationTests.cs (11)
865this.Document = Workspace.CurrentSolution.Projects.Single().Documents.Single(); 876var semanticModel = await workspace.CurrentSolution.Projects.Single().Documents.Single().GetSemanticModelAsync(); 885var destSpan = Workspace.Documents.Single().SelectedSpans.Single(); 891var destSpan = Workspace.Documents.Single().SelectedSpans.Single(); 897var annotatedSpans = Workspace.Documents.Single().AnnotatedSpans[key]; 918var destSpan = Workspace.Documents.Single().SelectedSpans.Single();
CodeRefactorings\CodeRefactoringServiceTest.cs (9)
48var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 49var document = project.Documents.Single(); 87var document = workspace.CurrentSolution.Projects.Single().Documents.Single(); 104var codeRefactoring = workspace.ExportProvider.GetExportedValues<CodeRefactoringProvider>().OfType<T>().Single(); 106var project = workspace.CurrentSolution.Projects.Single(); 107var document = project.Documents.Single(); 165var project = workspace.CurrentSolution.Projects.Single() 204var project = workspace.CurrentSolution.Projects.Single()
CommentSelection\CommentUncommentSelectionCommandHandlerTests.cs (2)
801textView.Selection.Select(new SnapshotSpan(snapshot, spans.Single()), isReversed: false); 802textView.Caret.MoveTo(new SnapshotPoint(snapshot, spans.Single().End));
Completion\CompletionServiceTests.cs (2)
43var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 46var document = project.Documents.Single();
Diagnostics\DiagnosticAnalyzerServiceTests.cs (20)
328var project = workspace.CurrentSolution.Projects.Single(); 339var project = workspace.CurrentSolution.Projects.Single(); 350var project = workspace.CurrentSolution.Projects.Single(); 510var project = workspace.CurrentSolution.Projects.Single(); 511var document = project.Documents.Single(); 625var project = workspace.CurrentSolution.Projects.Single(); 626var document = isSourceGenerated ? (await project.GetSourceGeneratedDocumentsAsync(CancellationToken.None)).Single() : project.Documents.Single(); 703var project = workspace.CurrentSolution.Projects.Single(); 704var document = documentAnalysis ? project.Documents.Single() : null; 740var project = workspace.CurrentSolution.Projects.Single(); 751project = workspace.CurrentSolution.Projects.Single(); 752var document = project.Documents.Single(); 753var additionalDocument = project.AdditionalDocuments.Single(); 818var project = workspace.CurrentSolution.Projects.Single(); 819var document = project.Documents.Single(); 858var generator = new DiagnosticProducingGenerator(c => Location.Create(c.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10))); 859Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(new TestGeneratorReference(generator)).Solution)); 861var project = workspace.CurrentSolution.Projects.Single(); 862var document = project.Documents.Single();
Diagnostics\DiagnosticDataTests.cs (2)
142var document = additionalDocument.Project.Documents.Single(); 182var hostDocument = workspace.Documents.Single();
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (2)
62workspace.Projects.Single().Id, 63workspace.Projects.Single().MetadataReferences.Append(_unconditionalSuppressMessageRef.Value)));
FindSymbols\SymbolTreeInfoTests.cs (4)
22var project = solution.Projects.Single(); 43var project = solution.Projects.Single(); 66var project = solution.Projects.Single(); 88var project = solution.Projects.Single();
Formatting\InferredIndentationTests.cs (6)
26var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None); 39var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None); 53var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None);
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (1)
103var linkedDocument = document.Project.Solution.Projects.Single(p => p != document.Project).Documents.Single();
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (2)
305return stringText.Container.GetRelatedDocuments().Single(); 315var symbol = semanticModel.GetSymbolInfo(syntaxRoot.FindNode(testDocument.SelectedSpans.Single())).Symbol;
Preview\PreviewWorkspaceTests.cs (1)
166var project = previewWorkspace.CurrentSolution.Projects.Single();
RenameTracking\RenameTrackingTaggerProviderTests.cs (5)
381var textSpan = state.HostDocument.SelectedSpans.Single(); 395var textSpan = state.HostDocument.SelectedSpans.Single(); 409var textSpan = state.HostDocument.SelectedSpans.Single(); 429var textSpan = state.HostDocument.SelectedSpans.Single(); 853var textSpan = state.HostDocument.SelectedSpans.Single();
RenameTracking\RenameTrackingTestState.cs (1)
188var tag = tags.Single();
StackTraceExplorer\StackTraceExplorerTests.cs (2)
45var cursorDoc = workspace.Documents.Single(); 46var selectedSpan = cursorDoc.SelectedSpans.Single();
SymbolFinder\DependentTypeFinderTests.cs (2)
642var csDoc = csProject.Documents.Single(); 685var normalProject1 = solution.Projects.Single();
SymbolFinder\FindSymbolAtPositionTests.cs (1)
21var document = workspace.CurrentSolution.GetRequiredDocument(workspace.Documents.Single().Id);
SymbolKey\SymbolKeyCrossLanguageTests.cs (1)
41var csDocument = solution.Projects.Single(p => p.Language == LanguageNames.CSharp).Documents.Single();
Tagging\TagSpanIntervalTreeTests.cs (3)
54Assert.Equal(new Span(0, 5), GetIntersectingSpans(tree, buffer.CurrentSnapshot.GetFullSpan()).Single().Span); 65Assert.Equal(new Span(107, 5), spans.Single().Span); 76Assert.Equal(new Span(107, 5), spans.Single().Span);
TextEditor\OpenDocumentTests.cs (1)
32var textBufferFactoryService = ((IMefHostExportProvider)hostServices).GetExports<ITextBufferFactoryService>().Single().Value;
Utilities\SymbolEquivalenceComparerTests.cs (103)
52var type = (ITypeSymbol)(await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 124var csharpType = (ITypeSymbol)(await csharpWorkspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 125var vbType = (await vbWorkspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 194var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 195var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 196var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 197var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 245var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 246var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 247var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 248var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 284var typeC = (await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 285var typeD = (await workspace.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("D").Single(); 328var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 329var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 353var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 354var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 378var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 379var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 403var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 404var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 428var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 429var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 455var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 456var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 482var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 483var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 509var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 510var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 534var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 535var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 559var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 560var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 586var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 587var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 620var csharpType1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 621var vbType1 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 665var csharpType1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 666var vbType1 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 696var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 722var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 723var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 757var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 758var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 790var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 791var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 825var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 826var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 856var outer1 = (INamespaceSymbol)(await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").Single(); 857var outer2 = (INamespaceSymbol)(await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").Single(); 859var inner1 = (INamespaceSymbol)outer1.GetMembers("Inner").Single(); 860var inner2 = (INamespaceSymbol)outer2.GetMembers("Inner").Single(); 933var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 934var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 935var type2_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 936var type2_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 970var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 971var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type2").Single(); 995var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 996var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1020var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1021var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1051var outer = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Outer").Single(); 1052var other = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Other").Single(); 1081var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1082var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("Type1").Single(); 1112var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1113var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1152var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1153var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1182var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1183var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1212var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1213var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1243var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1244var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1274var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1275var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1306var type1_v1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1307var type1_v2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("C").Single(); 1343var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1344var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1407var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1408var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1470var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1471var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1533var t1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1534var t2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetTypeMembers("T").Single(); 1621var comp1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()); 1622var comp2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()); 1695var comp1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()); 1696var comp2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()); 1718var namespace1 = (await workspace1.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M"); 1719var namespace2 = (await workspace2.CurrentSolution.Projects.Single().GetCompilationAsync()).GlobalNamespace.GetNamespaceMembers().Single(n => n.Name == "N").GetNamespaceMembers().Single(n => n.Name == "M"); 1746var ta1 = (ITypeSymbol)a1.GlobalNamespace.GetMembers("T").Single(); 1747var ta2 = (ITypeSymbol)a2.GlobalNamespace.GetMembers("T").Single(); 1748var tb1 = (ITypeSymbol)b1.GlobalNamespace.GetMembers("T").Single(); 1749var tb2 = (ITypeSymbol)b2.GlobalNamespace.GetMembers("T").Single(); 1750var tb3 = (ITypeSymbol)b3.GlobalNamespace.GetMembers("T").Single(); 1835var type1 = (ITypeSymbol)c1.GlobalNamespace.GetMembers("C").Single(); 1836var type2 = (ITypeSymbol)c2.GlobalNamespace.GetMembers("C").Single();
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (1)
894var member = type.GetLmrType().GetMember(name, MemberBindingFlags).Single();
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
Debugger\Engine\DkmClrType.cs (1)
276Value = (string)attributeData.ConstructorArguments.Single().Value,
Debugger\Engine\DkmClrValue.cs (1)
636var constructor = lmrType.GetConstructors(bindingFlags).Single();
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (1)
894var member = type.GetLmrType().GetMember(name, MemberBindingFlags).Single();
Microsoft.CodeAnalysis.Features (7)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (1)
44newEndToken = root.ReplaceToken(startToken, newStartToken.WithAdditionalAnnotations(annotation)).GetAnnotatedTokens(annotation).Single();
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (1)
204var finallyStatement = finallyStatements.Single();
SemanticSearch\SemanticSearchUtilities.cs (2)
70=> solution.ProjectIds.Single(); 73=> solution.Projects.Single();
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
165if (GetValueFromNameAttribute(paramNameAttributesForNode.Single()) == name)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
923referencedSymbols.Single().Locations.IsEmpty();
Wrapping\AbstractCodeActionComputer.cs (1)
265var trackedNode = rewrittenRoot.GetAnnotatedNodes(s_toFormatAnnotation).Single();
Microsoft.CodeAnalysis.Features.Test.Utilities (3)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
464newProject = newSolution.Projects.Single();
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
92return (solution, solution.Projects.Single().Documents.Single());
Microsoft.CodeAnalysis.Features.UnitTests (75)
EditAndContinue\ActiveStatementsMapTests.cs (6)
120var project = solution.Projects.Single(); 121var document = project.Documents.Single(); 175var project = solution.Projects.Single(); 176var document = project.Documents.Single(); 226var project = solution.Projects.Single(); 227var document = project.Documents.Single();
EditAndContinue\CompileTimeSolutionProviderTests.cs (2)
67var sourceGeneratedDoc = (await compileTimeSolution.Projects.Single().GetSourceGeneratedDocumentsAsync()).Single();
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (29)
244var document1 = solution.Projects.Single().Documents.Single(); 287var document1 = solution.Projects.Single().Documents.Single(); 290var generatedDocument = (await solution.Projects.Single().GetSourceGeneratedDocumentsAsync()).Single(); 824var document1 = solution.Projects.Single().Documents.Single(); 874var document1 = solution.Projects.Single().Documents.Single(); 974var document1 = solution.Projects.Single().Documents.Single(); 1111var document1 = solution.Projects.Single().Documents.Single(); 1114var generatedDocument = (await solution.Projects.Single().GetSourceGeneratedDocumentsAsync()).Single(); 1258var document2 = solution.Projects.Single().Documents.Single(); 1301var document2 = solution.Projects.Single().Documents.Single(); 1457var document1 = solution.Projects.Single().Documents.Single(); 1459var document2 = solution.Projects.Single().Documents.Single(); 1497var document1 = solution.Projects.Single().Documents.Single(); 1499var document2 = solution.Projects.Single().Documents.Single(); 1556var projectC = solution.GetProjectsByName("C").Single();
EditAndContinue\EditSessionActiveStatementsTests.cs (3)
174var projectId = solution.ProjectIds.Single(); 653var project = solution.Projects.Single(); 654var document = project.Documents.Single();
FindUsages\DefinitionItemFactoryTests.cs (35)
131var project = solution.Projects.Single(); 167var project = solution.Projects.Single(); 209var project = solution.Projects.Single(); 212var m = compilation.Assembly.Modules.Single(); 245var project = solution.Projects.Single(); 287var project = solution.Projects.Single(); 329var project = solution.Projects.Single(); 382var project = solution.Projects.Single(); 436var project = solution.Projects.Single(); 476var project = solution.Projects.Single(); 516var project = solution.Projects.Single(); 558var project = solution.Projects.Single(); 662var project = solution.Projects.Single(); 699var project = solution.Projects.Single(); 761var project = solution.Projects.Single(); 817var project = solution.Projects.Single(); 871var project = solution.Projects.Single(); 926var project = solution.Projects.Single(); 928var document = project.Documents.Single(); 976var project = solution.Projects.Single(); 1031var project = solution.Projects.Single(); 1083var project = solution.Projects.Single(); 1145var project = solution.Projects.Single(); 1202var project = solution.Projects.Single(); 1259var project = solution.Projects.Single(); 1331var project = solution.Projects.Single(); 1333var document = project.Documents.Single(); 1391var project = solution.Projects.Single(); 1393var document = project.Documents.Single(); 1443var project = solution.Projects.Single(); 1444var document = project.Documents.Single(); 1506var project = solution.Projects.Single(); 1508var document = project.Documents.Single(); 1577var project = solution.Projects.Single(); 1579var document = project.Documents.Single();
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Handler\Diagnostics\Public\PublicDocumentPullDiagnosticsHandler.cs (2)
71if (progressValues.Single().TryGetFirst(out var value)) 76return progressValues.Single().Second;
Protocol\Converters\SumConverter.cs (2)
137.Single(); 148.Single();
Workspaces\LspMiscellaneousFilesWorkspace.cs (1)
66var id = projectInfo.Documents.Single().Id;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (19)
CodeActions\CodeActionResolveTests.cs (1)
579Uri = locations.Single().Uri
CodeLens\AbstractCodeLensTests.cs (6)
24var textDocument = CreateTextDocumentIdentifier(testLspServer.GetCurrentSolution().Projects.Single().Documents.Single().GetURI()); 59var textDocument = CreateTextDocumentIdentifier(testLspServer.GetCurrentSolution().Projects.Single().Documents.Single().GetURI()); 82var textDocument = CreateTextDocumentIdentifier(testLspServer.GetCurrentSolution().Projects.Single().Documents.Single().GetURI());
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
280diagnostics = progress!.Value.GetValues().Single().First;
Diagnostics\PullDiagnosticTests.cs (3)
678var generator = new DiagnosticProducingGenerator(context => Location.Create(context.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10))); 1324var generator = new DiagnosticProducingGenerator(context => Location.Create(context.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10))); 1345context.Compilation.SyntaxTrees.Single(),
DocumentChanges\DocumentChangesTests.WithFindAllReferences.cs (2)
43var originalDocument = testLspServer.GetCurrentSolution().Projects.Single().Documents.Single();
InlayHint\AbstractInlayHintTests.cs (2)
25var document = testLspServer.GetCurrentSolution().Projects.Single().Documents.Single();
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (1)
309return testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.Documents.Single();
SemanticTokens\AbstractSemanticTokensTests.cs (1)
103var kind = tokenTypeToIndex.Where(kvp => kvp.Value == tokens[i + 3]).Single().Key;
Symbols\WorkspaceSymbolsTests.cs (2)
250return string.Format(FeaturesResources.project_0, solution.Projects.Single().Name); 254return string.Format(FeaturesResources.in_0_project_1, containingSymbolName, solution.Projects.Single().Name);
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
436blobReader = blobs.Single();
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
BasicDeterministicKeyBuilderTests.cs (1)
242var compilationValue = references.Values<JObject>().Single()!;
CSharpDeterministicKeyBuilderTests.cs (1)
433var compilationValue = references.Values<JObject>().Single()!;
DeterministicKeyBuilderTests.cs (2)
112.Single(); 136value.Properties().Where(x => x.Name == ignoreProperty).Single().Remove();
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (2)
TelemetryLoggerTests.cs (2)
98var postedEvent = logger.PostedEvents.Single(); 117var scope = logger.OpenedScopes.Single();
Microsoft.CodeAnalysis.Remote.Workspaces (1)
SolutionAssetStorage.cs (1)
130return await _solutionAssetStorage._checksumToScope.Single().Value.GetTestAccessor().GetAssetAsync(checksum, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
148var scDir = Directory.GetFileSystemEntries(_provider.ShadowCopyDirectory).Single();
Microsoft.CodeAnalysis.Test.Utilities (39)
Compilation\TestOperationVisitor.cs (33)
376Assert.Same(operation.Operation, operation.ChildOperations.Single()); 415Assert.Same(operation.ReturnedValue, operation.ChildOperations.Single()); 496Assert.Same(operation.Operand, operation.ChildOperations.Single()); 508Assert.Same(operation.Operation, operation.ChildOperations.Single()); 582Assert.Same(operation.Value, operation.ChildOperations.Single()); 622Assert.Same(operation.Pointer, operation.ChildOperations.Single()); 755Assert.Same(operation.Operand, operation.ChildOperations.Single()); 863Assert.Same(operation.Operand, operation.ChildOperations.Single()); 919Assert.Same(operation.ValueOperand, operation.ChildOperations.Single()); 940Assert.Same(operation.Body, operation.ChildOperations.Single()); 992Assert.Same(operation.Operation, operation.ChildOperations.Single()); 998Assert.Same(operation.Argument, operation.ChildOperations.Single()); 1010Assert.Same(operation.Exception, operation.ChildOperations.Single()); 1017Assert.Same(operation.Reference, operation.ChildOperations.Single()); 1099Assert.Same(operation.Value, operation.ChildOperations.Single()); 1206Assert.Same(operation.Target, operation.ChildOperations.Single()); 1212Assert.Same(operation.Operand, operation.ChildOperations.Single()); 1233Assert.Same(operation.Instance, operation.ChildOperations.Single()); 1252Assert.Same(operation.Initializer, operation.ChildOperations.Single()); 1265Assert.Same(operation.Initializer, operation.ChildOperations.Single()); 1294Assert.Same(operation.Text, operation.ChildOperations.Single()); 1369Assert.Same(operation.Value, operation.ChildOperations.Single()); 1382Assert.Same(operation.Value, operation.ChildOperations.Single()); 1400Assert.Same(operation.Pattern, operation.ChildOperations.Single()); 1451Assert.Same(operation.Pattern, operation.ChildOperations.Single()); 1589Assert.Same(operation.Pattern, operation.ChildOperations.Single()); 1596Assert.Same(operation.Operation, operation.ChildOperations.Single()); 1602Assert.Same(operation.Expression, operation.ChildOperations.Single()); 1614Assert.Same(operation.Target, operation.ChildOperations.Single()); 1670Assert.Same(operation.BlockBody, operation.ChildOperations.Single()); 1675Assert.Same(operation.ExpressionBody, operation.ChildOperations.Single()); 1703Assert.Same(operation.Value, operation.ChildOperations.Single()); 1742Assert.Same(operation.Operand, operation.ChildOperations.Single());
Metadata\ILValidation.cs (4)
81byte[] buffer = GetBlobBuffer(peImage.GetBlobs().Single()); 141var buffer = peImage.GetBlobs().Single().GetBytes().Array; 217BindingFlags.NonPublic | BindingFlags.Instance).Single(), 341.Descendants().Where(e => e.Name == "files").Single()
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
102select pdbReader.GetBlobReader(cdi.Value)).Single();
Traits\CompilerTraitDiscoverer.cs (1)
21var array = (CompilerFeature[])traitAttribute.GetConstructorArguments().Single();
Microsoft.CodeAnalysis.UnitTests (14)
Analyzers\AnalyzerConfigTests.cs (2)
1591Assert.Equal("cs000", options[0].TreeOptions.Keys.Single()); 1609Assert.Equal(KeyValuePair.Create("cs000", ReportDiagnostic.Warn), options[0].TreeOptions.Single());
Collections\DebuggerAttributes.cs (1)
76return (DebuggerBrowsableState?)(int?)debuggerBrowsableAttribute?.ConstructorArguments.Single().Value;
CommonSyntaxTests.cs (2)
86SyntaxToken token = node.DescendantTokens().Single(); 102SyntaxToken token = node.DescendantTokens().Single();
Diagnostics\OperationTests.cs (2)
310var literal = tree.GetRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Single(); 323var classDecl = tree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().Single();
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1369var expectedSymbol = expectedSymbols.Single();
MetadataReferences\MetadataHelpersTests.cs (1)
490var nestedNS = nestedNamespaces.Single();
MetadataReferences\MetadataReferenceTests.cs (1)
575var c = (ITypeSymbol)comp.GlobalNamespace.GetMembers("C").Single();
Symbols\DocumentationCommentIdTests.cs (4)
37var symbol = comp.GetSymbolsWithName("DoStuff").Single(); 68var symbol = comp.GetSymbolsWithName("DoStuff").Single(); 87var symbol = comp.GetSymbolsWithName("DoStuff").Single(); 111var symbol = comp.GetSymbolsWithName("DoStuff").Single();
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
FlowAnalysis\FlowTestBase.vb (2)
100Dim span = spans.Single.Single
FlowAnalysis\IterationJumpYieldStatementTests.vb (1)
1345Dim foreachBlock = tree.GetRoot.DescendantNodes.OfType(Of ForEachBlockSyntax).Single
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (7)
Syntax\SyntaxAnnotationTests.vb (7)
157Dim node2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsNode() 188Dim token2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsToken() 219Dim trivia2 = newRoot.GetAnnotatedTrivia(annotation1).Single() 282Assert.NotNull(rightNode.GetAnnotations().Single()) 562Dim annotatedNode = results.Single().AsNode() 575Dim annotatedToken = results.Single().AsToken() 588Dim annotatedTrivia = results.Single()
Microsoft.CodeAnalysis.Workspaces (6)
Log\AggregateLogger.cs (1)
105return set.Single();
Rename\RenameUtilities.cs (1)
31var originalAliasAnnotation = token.GetAnnotations(AliasAnnotation.Kind).Single();
src\Compilers\Core\Portable\Collections\TemporaryArrayExtensions.cs (1)
66=> new[] { 0, 0 }.Single();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
525AnalyzeDelegateInvocation(targets.Single());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
214_lazyReplacedExpression = (TExpressionSyntax)_lazySemanticRootOfReplacedExpression.GetAnnotatedNodesAndTokens(annotation).Single().AsNode()!;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
56var newTokenLine = newDocument.Text.Lines.GetLineFromPosition(newRoot.GetAnnotatedTokens(annotation).Single().SpanStart);
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\ProjectMap.cs (1)
139? projectIds.Single()
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
279var project = solution.Projects.Single(); 1172Assert.Equal(expected, workspace.Diagnostics.Single().Message); 3276var csharpProject = solution.Projects.Single();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (8)
MEF\IMefHostExportProviderExtensions.cs (1)
16=> provider.GetExports<TExtension>().Single().Value;
SolutionUtilities.cs (5)
25var projectId = projectChanges.Single().ProjectId; 42var documentId = projectDifferences.GetChangedDocuments().Single(); 50var documentId = projectDifferences.GetChangedAdditionalDocuments().Single(); 70var documentId = projectDifferences.GetAddedDocuments().Single(); 102return Tuple.Create(projectChanges.NewProject, projectChanges.GetAddedProjectReferences().Single());
Workspaces\TestWorkspace_XmlConsumption.cs (1)
702var language = GetLanguage(documentElement.Ancestors(ProjectElementName).Single());
Workspaces\TestWorkspace`1.cs (1)
675Documents.Add(submission.Documents.Single());
Microsoft.CodeAnalysis.Workspaces.UnitTests (207)
CommandLineProject\CommandLineProjectTests.cs (5)
126var firstDoc = info.Documents.Single(); 127var secondDoc = info.AdditionalDocuments.Single(); 152var firstDoc = info.Documents.Single(); 153var analyzerRef = info.AnalyzerReferences.Single(); 167var analyzerRef = info.AnalyzerReferences.Single();
FindAllDeclarationsTests.cs (1)
704var project = solution.Projects.Single();
FindReferencesTests.cs (10)
134var typeSymbol = result.Where(@ref => @ref.Definition.Kind == SymbolKind.NamedType).Single(); 433solution = solution.AddMetadataReferences(solution.ProjectIds.Single(), NetFramework.References); 435var project = solution.Projects.Single(); 517var result = (await SymbolFinder.FindReferencesAsync(constraint, solution)).Single(); 555Assert.NotEqual(typeResult.Locations.Single().Location.SourceSpan, constructorResult.Locations.Single().Location.SourceSpan); 588Assert.NotEqual(typeResult.Locations.Single().Location.SourceSpan, constructorResult.Locations.Single().Location.SourceSpan); 630Assert.True(typeResult.Locations.All(loc => loc.Location.SourceSpan != constructorResult.Locations.Single().Location.SourceSpan)); 633Assert.NotNull(constructorResult.Locations.Single().Alias);
Remote\ServiceDescriptorTests.cs (1)
123AddTypeRecursive(method.ReturnType.GetGenericArguments().Single(), method);
SolutionTests\ProjectDependencyGraphTests.cs (28)
216solution = solution.WithProjectReferences(solution.GetProjectsByName("C").Single().Id, []); 226var projectAId = solution.GetProjectsByName("A").Single().Id; 227var projectBId = solution.GetProjectsByName("B").Single().Id; 280var projectId = solution.GetProjectsByName(project).Single().Id; 297var projectId = solution.GetProjectsByName(project).Single().Id; 315solution = solution.WithProjectReferences(solution.GetProjectsByName("A").Single().Id, 395solution = solution.WithProjectReferences(solution.GetProjectsByName("C").Single().Id, []); 415solution = solution.RemoveProject(solution.GetProjectsByName("B").Single().Id); 437solution = solution.RemoveProject(solution.GetProjectsByName("B").Single().Id); 459solution = solution.RemoveProject(solution.GetProjectsByName("B").Single().Id); 481solution = solution.RemoveProject(solution.GetProjectsByName("B").Single().Id); 503var a = solution.GetProjectsByName("A").Single(); 504var b = solution.GetProjectsByName("B").Single(); 505var d = solution.GetProjectsByName("D").Single(); 531var a = solution.GetProjectsByName("A").Single(); 532var b = solution.GetProjectsByName("B").Single(); 533var e = solution.GetProjectsByName("E").Single(); 560var a = solution.GetProjectsByName("A").Single(); 561var b = solution.GetProjectsByName("B").Single(); 562var c = solution.GetProjectsByName("C").Single(); 613var b = solution.GetProjectsByName("B").Single(); 614var c = solution.GetProjectsByName("C").Single(); 619b = solution.GetProjectsByName("B").Single(); 648var projectId = solution.GetProjectsByName(project).Single().Id; 660var projectId = solution.GetProjectsByName(project).Single().Id; 724references.Add(new ProjectReference(solution.GetProjectsByName(targetProject).Single().Id)); 728references.Add(new ProjectReference(solution.GetProjectsByName(targetProject).Single().Id, [$"alias{references.Count}"])); 733solution.GetProjectsByName(projectName).Single().Id,
SolutionTests\ProjectSemanticVersionTests.cs (1)
34await AssertSemanticVersionChangedAsync(project, project.RemoveDocument(project.DocumentIds.Single()));
SolutionTests\SolutionTests.cs (110)
175var documentId = solution.Projects.Single().DocumentIds.Single(); 195var documentId = solution.Projects.Single().DocumentIds.Single(); 226var documentId = solution.Projects.Single().DocumentIds.Single(); 253var documentId = solution.Projects.Single().DocumentIds.Single(); 272var documentId = solution.Projects.Single().DocumentIds.Single(); 291var documentId = solution.Projects.Single().DocumentIds.Single(); 302var documentId = solution.Projects.Single().DocumentIds.Single(); 338var tree = compilation.SyntaxTrees.Single(); 348var documentId = solution.Projects.Single().DocumentIds.Single(); 373var documentId = solution.Projects.Single().DocumentIds.Single(); 397var documentId = solution.Projects.Single().DocumentIds.Single(); 431var documentId1 = solution.Projects.First().DocumentIds.Single(); 432var documentId2 = solution.Projects.Last().DocumentIds.Single(); 519var documentId1 = solution.Projects.First().DocumentIds.Single(); 520var documentId2 = solution.Projects.Last().DocumentIds.Single(); 598var documentId1 = solution.Projects.First().DocumentIds.Single(); 599var documentId2 = solution.Projects.Last().DocumentIds.Single(); 684var documentId1 = solution.Projects.First().DocumentIds.Single(); 685var documentId2 = solution.Projects.Last().DocumentIds.Single(); 761var documentId1 = solution.Projects.First().DocumentIds.Single(); 762var documentId2 = solution.Projects.Last().DocumentIds.Single(); 849var documentId1 = solution.Projects.First().DocumentIds.Single(); 850var documentId2 = solution.Projects.Last().DocumentIds.Single(); 919var documentId = solution.Projects.Single().AdditionalDocumentIds.Single(); 941var documentId = solution.Projects.Single().AdditionalDocumentIds.Single(); 965var documentId = solution.Projects.Single().AnalyzerConfigDocumentIds.Single(); 987var documentId = solution.Projects.Single().AnalyzerConfigDocumentIds.Single(); 1011var documentId = solution.Projects.Single().DocumentIds.Single(); 1033var documentId = solution.Projects.Single().AdditionalDocumentIds.Single(); 1055var documentId = solution.Projects.Single().AnalyzerConfigDocumentIds.Single(); 1742var originalSyntaxTreeOptionsProvider = solution.Projects.Single().CompilationOptions!.SyntaxTreeOptionsProvider; 1745var defaultOptions = solution.Projects.Single().Services.GetRequiredService<ICompilationFactoryService>().GetDefaultCompilationOptions(); 1752var newSyntaxTreeOptionsProvider = solution.Projects.Single().CompilationOptions!.SyntaxTreeOptionsProvider; 1914var projectId = solution.Projects.Single().Id; 1947var projectId = solution.Projects.Single().Id; 1963var projectId = solution.Projects.Single().Id; 2005var projectId = solution.Projects.Single().Id; 2076var projectId = solution.Projects.Single().Id; 2094var projectId = solution.Projects.Single().Id; 2119var projectId = solution.Projects.Single().Id; 2146var projectId = solution.Projects.Single().Id; 2164var projectId = solution.Projects.Single().Id; 2192var projectId = solution.Projects.Single().Id; 2310var editorConfigId = DocumentId.CreateNewId(solution3.Projects.Single().Id); 2317var project2 = solution.Projects.Single(); 2590var pid2 = solution.Projects.Single().Id; 2697var finalProject = solution.Projects.Single(); 2984Assert.Empty(solution.Projects.Single().AnalyzerReferences); 2991var actualAnalyzerReferences = newSolution.Projects.Single().AnalyzerReferences; 2999var changes = newSolution.GetChanges(solution).GetProjectChanges().Single(); 3000var addedAnalyzerReference = changes.GetAddedAnalyzerReferences().Single(); 3008actualAnalyzerReferences = solution.Projects.Single().AnalyzerReferences; 3017actualAnalyzerReferences = solution.Projects.Single().AnalyzerReferences; 3023actualAnalyzerReferences = solution.Projects.Single().AnalyzerReferences; 3029actualAnalyzerReferences = solution.Projects.Single().AnalyzerReferences; 3235var classNode = syntaxRoot.DescendantNodes().OfType<CS.Syntax.ClassDeclarationSyntax>().Single(); 3240var classNode = syntaxRoot.DescendantNodes().OfType<VB.Syntax.ClassStatementSyntax>().Single(); 3445Assert.NotNull(docTree.GetAnnotatedNodes("test").Single()); 3925var syntaxTree = compilation.SyntaxTrees.Single(); 4258var frozenDocument = project.Documents.Single().WithFrozenPartialSemantics(CancellationToken.None); 4288var forkedProject = originalProject.RemoveDocument(originalProject.DocumentIds.Single()) 4291var frozenDocument = forkedProject.Documents.Single().WithFrozenPartialSemantics(CancellationToken.None); 4300Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4312var forkedProject = originalProject.RemoveDocument(originalProject.DocumentIds.Single()) 4315var frozenDocument = forkedProject.Documents.Single().WithFrozenPartialSemantics(CancellationToken.None); 4328Assert.True(frozenCompilation.ContainsSyntaxTree(await originalProject.Documents.Single().GetSyntaxTreeAsync())); 4353var documentId1 = DocumentId.CreateNewId(solution.ProjectIds.Single()); 4354var documentId2 = DocumentId.CreateNewId(solution.ProjectIds.Single()); 4355var documentId3 = DocumentId.CreateNewId(solution.ProjectIds.Single()); 4363var originalCompilation = await solution.Projects.Single().GetCompilationAsync(); 5186Assert.Equal(projectId1, solution.ProjectIds.Single()); 5187var compilation1New = await solution.Projects.Single().GetCompilationAsync(); 5230Assert.Equal(projectId1, solution.ProjectIds.Single()); 5231var compilation1New = await solution.Projects.Single().GetCompilationAsync(); 5462var documentId = solution.Projects.Single().DocumentIds.Single(); 5465var originalCompilation = await solution.Projects.Single().GetCompilationAsync(); 5551var regularDocumentId = solution.Projects.Single().DocumentIds.Single(); 5583var frozenProject = frozenSolution.Projects.Single(); 5602var frozenProject = frozenSolution.Projects.Single(); 5607Assert.True(frozenCompilation.ContainsSyntaxTree(await frozenProject.Documents.Single().GetSyntaxTreeAsync())); 5632Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5659Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5689Assert.True(frozenCompilation1.ContainsSyntaxTree(await frozenProject1.Documents.Single().GetSyntaxTreeAsync())); 5696Assert.True(frozenCompilation2.ContainsSyntaxTree(await frozenProject2.Documents.Single().GetSyntaxTreeAsync())); 5711var syntaxTree1 = await project1.Documents.Single().GetSyntaxTreeAsync(); 5715var forkedProject1 = frozenSolution.WithDocumentText(project1.Documents.Single().Id, SourceText.From("class Doc2 { }")).GetProject(project1.Id); 5716var forkedDocument1 = forkedProject1.Documents.Single(); 5744var syntaxTree1 = await project1.Documents.Single().GetSyntaxTreeAsync(); 5748Assert.Equal("// source1", generatedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 5754var forkedProject1 = frozenSolution.WithDocumentText(project1.Documents.Single().Id, SourceText.From("class Doc2 { }")).GetProject(project1.Id); 5767Assert.NotSame(generatedDocuments.Single(), forkedGeneratedDocuments.Single()); 5787var frozenProject = frozenSolution.Projects.Single(); 5807var documentId1 = project1.DocumentIds.Single(); 5817var documentId2 = project2.DocumentIds.Single();
SolutionTests\SolutionWithSourceGeneratorTests.cs (21)
259var documentId = project.DocumentIds.Single(); 263project = project.Solution.WithDocumentText(documentId, SourceText.From("// Changed Source File")).Projects.Single(); 301var additionalDocumentId = project.AdditionalDocumentIds.Single(); 306project = project.Solution.WithAdditionalDocumentText(additionalDocumentId, SourceText.From("Hello, everyone!")).Projects.Single(); 311project = project.Solution.WithAdditionalDocumentText(additionalDocumentId, SourceText.From("Good evening, everyone!")).Projects.Single(); 347var partialProject = project.Documents.Single().WithFrozenPartialSemantics(forceFreeze, CancellationToken.None).Project; 374projectBeforeChange.AdditionalDocumentIds.Single(), 375SourceText.From("Hello, world!!!!")).Projects.Single(); 423var projectIdWithGenerator = solution.ProjectIds.Single(); 489project = project.Documents.Single().WithText(SourceText.From("// Change")).Project; 565var existingText = await project.Documents.Single().GetTextAsync(); 567project = project.Documents.Single().WithText(newText).Project; 618var generatedDocument = Assert.Single(await workspace.CurrentSolution.Projects.Single().GetSourceGeneratedDocumentsAsync()); 645Assert.Empty(await workspace.CurrentSolution.Projects.Single().GetSourceGeneratedDocumentsAsync()); 662var projectIdWithGenerator = solution.ProjectIds.Single(); 725var documentToFreeze = workspace.CurrentSolution.Projects.Single().Documents.Single(); 760var document = project.Documents.Single().WithFrozenPartialSemantics(forceFreeze: true, CancellationToken.None); 789var document = project.Documents.Single().WithFrozenPartialSemantics(CancellationToken.None); 853project = project.Solution.AddDocument(documentInfo).Projects.Single() 905var projectId1 = solution.ProjectIds.Single();
SolutionTests\TryApplyChangesTests.cs (7)
77var project = workspace.CurrentSolution.Projects.Single(); 90var project = workspace.CurrentSolution.Projects.Single(); 103var project = workspace.CurrentSolution.Projects.Single(); 120var project = workspace.CurrentSolution.Projects.Single(); 135var project = workspace.CurrentSolution.Projects.Single(); 150var project = workspace.CurrentSolution.Projects.Single(); 164var project = workspace.CurrentSolution.Projects.Single();
SymbolKeyTests.cs (20)
318TestRoundTrip(GetAllSymbols(compilation.GetSemanticModel(compilation.SyntaxTrees.Single())), compilation); 826var typeParameter = GetDeclaredSymbols(compilation).OfType<INamedTypeSymbol>().Where(n => !n.IsImplicitlyDeclared).Single().TypeParameters.Single(); 840.Where(n => !n.IsImplicitlyDeclared).Single().GetMembers("M").OfType<IMethodSymbol>().Single().TypeParameters.Single(); 981compilation.GetSemanticModel(compilation.SyntaxTrees.Single()), 1022compilation1.GetSemanticModel(compilation1.SyntaxTrees.Single()), 1023n => n is CSharp.Syntax.MethodDeclarationSyntax).Single(); 1059compilation1.GetSemanticModel(compilation1.SyntaxTrees.Single()), 1060n => n is CSharp.Syntax.MethodDeclarationSyntax).Single(); 1092compilation1.GetSemanticModel(compilation1.SyntaxTrees.Single()), 1093n => n is CSharp.Syntax.PropertyDeclarationSyntax).Single(); 1127compilation1.GetSemanticModel(compilation1.SyntaxTrees.Single()), 1128n => n is VisualBasic.Syntax.PropertyStatementSyntax).Single(); 1174compilation2.GetSemanticModel(compilation2.SyntaxTrees.Single()), 1175n => n is CSharp.Syntax.MemberAccessExpressionSyntax).Single(); 1221compilation2.GetSemanticModel(compilation2.SyntaxTrees.Single()), 1222n => n is VisualBasic.Syntax.MemberAccessExpressionSyntax).Single(); 1273var tree = compilation1.SyntaxTrees.Single(); 1275var node = root.DescendantNodes().OfType<CSharp.Syntax.GenericNameSyntax>().Single(); 1415var syntaxTree = compilation.SyntaxTrees.Single();
SyntaxNodeTests.cs (1)
32var node = root.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single();
UtilityTest\CancellationSeriesTests.cs (1)
127Assert.Same(exception, aggregateException.InnerExceptions.Single());
WorkspaceServiceTests\GlobalOptionServiceTests.cs (1)
193], events.Single().ChangedOptions.Select(e => $"{e.key.Option.Definition.ConfigName}={e.newValue}"));
Microsoft.DotNet.Build.Tasks.Feed (2)
src\common\AzureStorageUtils.cs (2)
263if (lengthHeaderAvailable && long.Parse(contentLength.Single()) != localFileStream.Length) 273if (!localMD5.Equals(md5.Single(), StringComparison.OrdinalIgnoreCase))
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
PublishToSymbolServerTest.cs (1)
180Microsoft.Build.Framework.BuildMessageEventArgs registerLog = buildEngine.BuildMessageEvents.Where(x => x.Message.StartsWith("Would register request")).Single();
Microsoft.DotNet.Build.Tasks.Packaging (2)
GenerateNuSpec.cs (1)
164var licenseUrlElement = nuspec.Descendants(NuSpecXmlNamespace + "licenseUrl").Single();
ValidationTask.cs (1)
68return (values != null && values.Count == 1) ? values.Single() : null;
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\FinalizeInsertionVsixFile.cs (1)
122var file = ((JArray)json["files"]).Where(f => (string)f["fileName"] == partName).Single();
Microsoft.DotNet.Build.Tasks.Workloads (3)
Msi\WorkloadPackGroupMsi.wix.cs (3)
85var dotnetHomeElement = directoriesDoc.Root.Descendants().Where(d => (string)d.Attribute("Id") == "DOTNETHOME").Single(); 94var componentGroupRefElement = productDoc.Root.Descendants(ns + "ComponentGroupRef").Single(); 102var registryKeyElement = registryDoc.Root.Descendants(ns + "RegistryKey").Single();
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\NuGetVersionUpdater.cs (1)
379throw exceptions.Single();
Microsoft.DotNet.VersionTools (1)
Dependencies\Submodule\SubmoduleDependencyInfo.cs (1)
43commit = remoteRefLines.Single().Split('\t').First();
Microsoft.DotNet.VersionTools.Tests (2)
BuildManifest\BuildManifestClientTests.cs (2)
78It.Is<string[]>(parents => parents.Single() == fakeCommitHash))) 142It.Is<string[]>(parents => parents.Single() == fakeCommitHash)))
Microsoft.Extensions.Caching.Abstractions (1)
Hybrid\HybridCache.cs (1)
104ICollection<string> { Count: 1 } => RemoveByTagAsync(tags.Single(), cancellationToken),
Microsoft.Extensions.Caching.MicroBenchmarks (1)
DistributedCacheBenchmarks.cs (1)
100multiplexer.GetServer(multiplexer.GetEndPoints().Single()).FlushDatabase();
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
ConfigurationProviderTestBase.cs (1)
26var providerTag = configRoot.Providers.Single().ToString();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
DefaultHealthCheckServiceTest.cs (2)
453var healthCheck = (DisposableDependeciesCheck)results.Entries.Single().Value.Data.Single().Value;
HealthCheckPublisherHostedServiceTest.cs (1)
785return services.GetServices<IHostedService>().OfType<HealthCheckPublisherHostedService>().Single();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
Linux\LinuxUtilizationProviderTests.cs (1)
205var meter = meterFactory.Meters.Single();
ResourceMonitoringOptionsCustomValidatorTests.cs (1)
74var failureMessage = validationResult.Failures.Single();
Windows\WindowsContainerSnapshotProviderTests.cs (1)
344var meter = meterFactory.Meters.Single();
Windows\WindowsSnapshotProviderTests.cs (1)
168var meter = meterFactory.Meters.Single();
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggerTest.cs (1)
966var logRecord = fakeLogger.Collector.GetSnapshot().Single();
Microsoft.Extensions.Http.Resilience.Tests (4)
Routing\OrderedRoutingStrategyTest.cs (2)
90group.Endpoints.Single().Weight = 0; 97group.Endpoints.Single().Weight = 99999;
Routing\WeightedRoutingStrategyTest.cs (2)
134group.Endpoints.Single().Weight = 0; 146group.Endpoints.Single().Weight = 99999;
Microsoft.Extensions.Resilience.Tests (2)
Resilience\ResilienceServiceCollectionExtensionsTests.cs (2)
40enrichers.Single().Should().BeOfType<ResilienceMetricsEnricher>(); 50enrichers.Single().Should().BeOfType<ResilienceMetricsEnricher>();
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Gen.ContextualOptions.Unit.Tests (21)
EmitterTests.cs (4)
38syntaxTree.GetRoot().DescendantNodes().OfType<StructDeclarationSyntax>().Single().Members.Single().Modifiers, 65.Single() 94.Single()
ParserTests.cs (14)
30Assert.Empty(result!.Single().OptionsContextProperties); 31Assert.Equal(DiagDescriptors.ContextDoesNotHaveValidProperties, result!.Single().Diagnostics.Single().Descriptor); 32Assert.True(result.Single().ShouldEmit); 33Assert.Equal("TestClasses.ClassWithUnusableProperties", result.Single().HintName); 47Assert.Empty(result!.Single().Diagnostics); 48Assert.Equal("Foo", result!.Single().OptionsContextProperties.Single()); 49Assert.True(result.Single().ShouldEmit); 50Assert.Equal(".NamespacelessRecord", result.Single().HintName); 64Assert.Equal(DiagDescriptors.ContextMustBePartial, result!.Single().Diagnostics.Single().Descriptor); 65Assert.False(result.Single().ShouldEmit); 79Assert.Contains(result!.Single().Diagnostics, diag => diag.Descriptor == DiagDescriptors.ContextCannotBeStatic); 80Assert.False(result.Single().ShouldEmit); 94Assert.Contains(result!.Single().Diagnostics, diag => diag.Descriptor == DiagDescriptors.ContextCannotBeRefLike); 95Assert.False(result.Single().ShouldEmit);
SyntaxContextReceiverTests.cs (2)
36Assert.Equal(declaration.Key.Name, declaration.Value.Single().Identifier.Text); 72var declaration = typeDeclarations!.Single();
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.JSInterop.Tests (5)
JSInProcessRuntimeTest.cs (3)
21var call = runtime.InvokeCalls.Single(); 53var call = runtime.InvokeCalls.Single(); 80var call = runtime.InvokeCalls.Single();
JSRuntimeTest.cs (2)
284var call = runtime.BeginInvokeCalls.Single(); 310var call = runtime.EndInvokeDotNetCalls.Single();
Microsoft.ML.PerformanceTests (1)
Harness\Metrics.cs (1)
58var result = results.Single();
Microsoft.ML.Tests (4)
Transformers\HashTests.cs (3)
87Assert.Equal(AnnotationUtils.Kinds.KeyValues, column.Annotations.Schema.Single().Name); 92Assert.Equal(AnnotationUtils.Kinds.KeyValues, column.Annotations.Schema.Single().Name); 97Assert.Equal(AnnotationUtils.Kinds.KeyValues, column.Annotations.Schema.Single().Name);
Transformers\KeyToBinaryVectorEstimatorTest.cs (1)
133Assert.Equal(AnnotationUtils.Kinds.IsNormalized, column.Annotations.Schema.Single().Name);
Microsoft.VisualStudio.LanguageServices (8)
ChangeSignature\ChangeSignatureDialogViewModel.cs (1)
137matchingParameters.Single().HasParameterNameConflict = Visibility.Collapsed;
ColorSchemes\ColorSchemeApplier.ColorSchemeReader.cs (1)
42var categoryElement = themeElement.Descendants("Category").Single();
LanguageService\AbstractLanguageService`2.IVsLanguageTextOps.cs (1)
61var ts = selections.Single();
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
280OnDocumentOpened(projectInfo.Documents.Single().Id, sourceTextContainer);
Snippets\AbstractSnippetExpansionLanguageHelper.cs (1)
40subjectBufferSpan = subjectBufferSpanCollection.Single();
Snippets\SnippetExpansionClient.cs (2)
1126subjectBufferSpan = subjectBufferSpanCollection.Single(); 1141span = spanCollection.Single();
Venus\ContainedLanguageCodeSupport.cs (1)
237var newMember = newRoot.GetAnnotatedNodesAndTokens(annotation).Single();
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
3185? ((BaseFieldDeclarationSyntax)finalNode).Declaration.Variables.Single()
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (58)
CodeModel\AbstractFileCodeElementTests.cs (3)
54=> GetCurrentSolution().Projects.Single(); 57=> GetCurrentProject().Documents.Single(); 91return (GetWorkspace()).Documents.Single().GetTextBuffer().CurrentSnapshot.GetText();
CodeModel\FileCodeModelTestHelpers.cs (2)
35var project = workspace.CurrentSolution.Projects.Single(); 36var document = project.Documents.Single().Id;
DocumentOutline\DocumentOutlineTestsBase.cs (2)
56TextBuffer = workspace.Documents.Single().GetTextBuffer(); 66=> PathRoot + _workspace.Documents.Single().FilePath!;
PersistentStorage\AbstractPersistentStorageTests.cs (50)
220var project = solution.Projects.Single(); 238var document = solution.Projects.Single().Documents.Single(); 271DoSimultaneousWrites(s => storage.WriteStreamAsync(solution.Projects.Single(), streamName1, EncodeString(s))); 272var value = int.Parse(ReadStringToEnd(await storage.ReadStreamAsync(solution.Projects.Single(), streamName1))); 286DoSimultaneousWrites(s => storage.WriteStreamAsync(solution.Projects.Single().Documents.Single(), streamName1, EncodeString(s))); 287var value = int.Parse(ReadStringToEnd(await storage.ReadStreamAsync(solution.Projects.Single().Documents.Single(), streamName1))); 312Assert.True(await storage.WriteStreamAsync(solution.Projects.Single(), streamName1, EncodeString(GetData1(size)), GetChecksum1(withChecksum))); 313DoSimultaneousReads(async () => ReadStringToEnd(await storage.ReadStreamAsync(solution.Projects.Single(), streamName1, GetChecksum1(withChecksum))), GetData1(size)); 325Assert.True(await storage.WriteStreamAsync(solution.Projects.Single().Documents.Single(), streamName1, EncodeString(GetData1(size)), GetChecksum1(withChecksum))); 326DoSimultaneousReads(async () => ReadStringToEnd(await storage.ReadStreamAsync(solution.Projects.Single().Documents.Single(), streamName1, GetChecksum1(withChecksum))), GetData1(size)); 482var document = solution.Projects.Single().Documents.Single(); 503var document = solution.Projects.Single().Documents.Single(); 524var document = solution.Projects.Single().Documents.Single(); 545var document = solution.Projects.Single().Documents.Single(); 566var document = solution.Projects.Single().Documents.Single(); 590var document = solution.Projects.Single().Documents.Single(); 614var document = solution.Projects.Single().Documents.Single(); 638var document = solution.Projects.Single().Documents.Single(); 662var document = solution.Projects.Single().Documents.Single(); 683var document = solution.Projects.Single().Documents.Single(); 704var document = solution.Projects.Single().Documents.Single(); 725var document = solution.Projects.Single().Documents.Single(); 746var document = solution.Projects.Single().Documents.Single(); 770var document = solution.Projects.Single().Documents.Single(); 794var document = solution.Projects.Single().Documents.Single(); 818var document = solution.Projects.Single().Documents.Single(); 874var id = DocumentId.CreateNewId(solution.Projects.Single().Id); 894var id = DocumentId.CreateNewId(solution.Projects.Single().Id); 990var project = solution.Projects.Single();
ProjectSystemShim\EntryPointFinderTests.cs (1)
28Assert.Equal("C", entryPoints.Single().Name);
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
ExtractInterface\ExtractInterfaceViewModelTests.vb (1)
292Dim doc = workspace.Documents.Single()
MSBuild (1)
XMake.cs (1)
1613ProjectGraphEntryPoint entryPoint = graphBuildRequest.ProjectGraphEntryPoints.Single();
Replay (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
600return hashAttributes.Single().Hash;
Roslyn.VisualStudio.Next.UnitTests (37)
Options\VisualStudioSettingsOptionPersisterTests.cs (2)
139Assert.Equal((optionKey, CSharpFormattingOptions2.NewLineBeforeOpenBrace.DefaultValue & ~NewLineBeforeOpenBracePlacement.Methods), refreshedOptions.Single()); 154Assert.Equal((optionKey, NewLineBeforeOpenBracePlacement.Accessors | NewLineBeforeOpenBracePlacement.LambdaExpressionBody), refreshedOptions.Single());
Services\ServiceHubServicesTests.cs (7)
146var priorityDocumentId = solution.Projects.Single().Documents.Single().Id; 158Assert.Equal(solution.Projects.Single().Documents.Single().Id, info.DocumentId); 196workspace.CurrentSolution.Projects.Single().Documents.Single(), 454var localProject = localWorkspace.CurrentSolution.Projects.Single();
Services\SolutionServiceTests.cs (28)
253var projectId = solution.ProjectIds.Single(); 269var project = solution.Projects.Single(); 510.Projects.Single() 521var documentIdentity = (await solution.Projects.Single().GetSourceGeneratedDocumentsAsync()).First().Identity; 550var project1 = solution.Projects.Single(); 591var project1 = solution.Projects.Single(); 632var project1 = solution.Projects.Single(); 665var project1 = solution.Projects.Single(); 706var project1 = solution.Projects.Single(); 746var project1 = solution.Projects.Single(); 786var project1 = solution.Projects.Single(); 819var project1 = solution.Projects.Single(); 874var project1 = solution.Projects.Single(); 920var project1 = solution.Projects.Single(); 943var project1 = solution.Projects.Single(); 988var project1 = solution.Projects.Single(); 989var document1 = project1.Documents.Single(); 1007var project1 = solution.Projects.Single(); 1008var document1 = project1.Documents.Single(); 1039var project1 = solution.Projects.Single(); 1081var document3 = project2.Documents.Single(); 1103var project1 = solution.Projects.Single(); 1104var document1 = project1.Documents.Single(); 1130var project1 = solution.Projects.Single(); 1131var document1 = project1.Documents.Single(); 1159var project1 = solution.Projects.Single(); 1160var document1 = project1.Documents.Single(); 1206var project1 = solution.Projects.Single();
Shared.Tests (2)
Data.Validation\LengthAttributeTests.cs (2)
396Assert.Equal("My custom message for 'CustomMessage'.", results.Single().ErrorMessage); 416Assert.Equal("The field DefaultMessage length must be greater or equal than 5.", results.Single().ErrorMessage);
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
139Assert.Equal(headers.GetValues(headerName).Single(), expectedValue);
System.Collections.Immutable (4)
System\Linq\ImmutableArrayExtensions.cs (4)
462return immutableArray.array!.Single(); 483ImmutableArray.TwoElementArray.Single(); // throw the same exception as LINQ would 493Enumerable.Empty<T>().Single(); // throw the same exception as LINQ would 526ImmutableArray.TwoElementArray.Single(); // throw the same exception as LINQ would
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.LifetimeContext.cs (1)
41var exportDef = factoryPartDefinition.ExportDefinitions.Single();
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
192.Single();
System.Private.Windows.Core.TestUtilities (1)
DebuggerAttributes.cs (1)
63return (DebuggerBrowsableState?)(int?)debuggerBrowsableAttribute?.ConstructorArguments.Single().Value;
System.Reflection.DispatchProxy (1)
src\libraries\Common\src\System\Reflection\Emit\IgnoreAccessChecksToAttributeBuilder.cs (1)
98return attributeTypeBuilder.CreateTypeInfo().DeclaredConstructors.Single();
System.Windows.Forms.Design.Tests (5)
System\ComponentModel\Design\ByteViewerTests.cs (4)
803TextBox textBox = control.Controls.OfType<TextBox>().Single(); 804ScrollBar scrollBar = control.Controls.OfType<ScrollBar>().Single(); 833TextBox textBox = control.Controls.OfType<TextBox>().Single(); 834ScrollBar scrollBar = control.Controls.OfType<ScrollBar>().Single();
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (1)
52var toolStripContainerActionList = _designer.ActionLists.OfType<ToolStripContainerActionList>().Single();
System.Windows.Forms.Tests (10)
System\Windows\Forms\PropertyGridTests.cs (10)
291Assert.Equal(expected, control.Controls.OfType<ToolStrip>().Single().BackColor); 297Assert.Equal(expected, control.Controls.OfType<ToolStrip>().Single().BackColor); 322Assert.Equal(expected, control.Controls.OfType<ToolStrip>().Single().BackColor); 331Assert.Equal(expected, control.Controls.OfType<ToolStrip>().Single().BackColor); 3100Assert.Equal(visible && value, control.Controls.OfType<ToolStrip>().Single().Visible); 3108Assert.Equal(visible && value, control.Controls.OfType<ToolStrip>().Single().Visible); 3116Assert.Equal(visible && !value, control.Controls.OfType<ToolStrip>().Single().Visible); 3146Assert.Equal(visible && value, control.Controls.OfType<ToolStrip>().Single().Visible); 3157Assert.Equal(visible && value, control.Controls.OfType<ToolStrip>().Single().Visible); 3168Assert.Equal(visible && !value, control.Controls.OfType<ToolStrip>().Single().Visible);
Templates.Blazor.Tests (2)
BlazorWebTemplateTest.cs (1)
93Assert.Equal(expectedEncoding, response.Content.Headers.ContentEncoding.Single());
src\Shared\CertificateGeneration\CertificateManager.cs (1)
154.Single()
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
154.Single()
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
154.Single()
Templates.Mvc.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
154.Single()
Templates.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
154.Single()
vbc (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
600return hashAttributes.Single().Hash;
VBCSCompiler (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
600return hashAttributes.Single().Hash;
VBCSCompiler.UnitTests (25)
AnalyzerConsistencyCheckerTests.cs (1)
164var errorMessage = errorMessages!.Single();
CompilerServerTests.cs (24)
241Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 305Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 431Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 443Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 478Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 493Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 507Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 521Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 535Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 562Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 592Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 609Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 627Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 652Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 670Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 699Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 728Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 1162Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 1189Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 1211Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 1238Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 1319Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 1345Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single()); 1419Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single());