670 references to ElementAt
Diagnostics.EFCore.FunctionalTests (2)
MigrationsEndPointMiddlewareTest.cs (2)
135Assert.Equal("111111111111111_MigrationOne", appliedMigrations.ElementAt(0).MigrationId); 136Assert.Equal("222222222222222_MigrationTwo", appliedMigrations.ElementAt(1).MigrationId);
Microsoft.AspNetCore.Components.Analyzers.Tests (3)
Verifiers\CodeFixVerifier.cs (2)
96document = ApplyFix(document, actions.ElementAt((int)codeFixIndex)); 100document = ApplyFix(document, actions.ElementAt(0));
Verifiers\DiagnosticVerifier.cs (1)
121var actual = actualResults.ElementAt(i);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (3)
Verifiers\CodeFixVerifier.cs (2)
96document = ApplyFix(document, actions.ElementAt((int)codeFixIndex)); 100document = ApplyFix(document, actions.ElementAt(0));
Verifiers\DiagnosticVerifier.cs (1)
121var actual = actualResults.ElementAt(i);
Microsoft.AspNetCore.Http.Tests (1)
RequestCookiesCollectionTests.cs (1)
55Assert.Equal(value, cookies.ElementAt(i).Value);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (1)
DelegatingEnumerableTest.cs (1)
48var errorWrapper = delegatingEnumerable.ElementAt(i);
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
AsyncEnumerableTestBase.cs (2)
92Assert.Equal("Project0", GetName(projects.ElementAt(0))); 93Assert.Equal("Project9", GetName(projects.ElementAt(9)));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Rendering\HtmlHelperSelectTest.cs (2)
1559var expectedItem = expected.ElementAt(i); 1560var actualItem = actual.ElementAt(i);
Microsoft.AspNetCore.Routing.Tests (2)
RouteTest.cs (2)
1664Assert.IsType<RegexRouteConstraint>(constraint.Constraints.ElementAt(0)); 1665Assert.IsType<IntRouteConstraint>(constraint.Constraints.ElementAt(1));
Microsoft.Build.Engine.OM.UnitTests (89)
Construction\ConstructionEditing_Tests.cs (1)
1080var referenceSibling = item.Metadata.ElementAt(position);
Construction\WhiteSpacePreservation_Tests.cs (1)
257(pe, p) => { pe.ItemGroups.ElementAt(1).AddItem("i2", "b"); });
Definition\DefinitionEditing_Tests.cs (1)
2601var item = project.Items.ElementAt(itemIndex);
Definition\Project_Tests.cs (5)
612object.ReferenceEquals(imports.First().ImportingElement, xml.Imports.ElementAt(0)).ShouldBeTrue(); 1980project.GetItems("i").ElementAt(0).EvaluatedInclude.ShouldBe("v1_v2"); 1982project.GetItems("j").ElementAt(0).EvaluatedInclude.ShouldBe("v1_v2"); 2045project.GetItems("i").ElementAt(0).GetMetadataValue("m").ShouldBe("m0;m1"); 4351item = itemsOfValue.ElementAt(position);
Definition\ProjectItem_Tests.cs (72)
1243ProjectItem item1b = project.GetItems("i").ElementAt(1); 1244ProjectItem item1c = project.GetItems("i").ElementAt(2); 1294ProjectItem item1b = project.GetItems("i").ElementAt(1); 1387Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("l")); 1388Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("m")); 1389Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("n")); 1390Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("o")); 1391Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("p")); 1399Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("l")); 1400Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("m")); 1401Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("n")); 1402Assert.Equal("o4", project.GetItems("m").ElementAt(1).GetMetadataValue("o")); 1403Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("p")); 1485Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("l")); 1486Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("m")); 1487Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("n")); 1488Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("o")); 1489Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("p")); 1497Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("l")); 1498Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("m")); 1499Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("n")); 1500Assert.Equal("o4", project.GetItems("m").ElementAt(1).GetMetadataValue("o")); 1501Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("p")); 2236var m1 = metadata.ElementAt(0); 2240var m2 = metadata.ElementAt(1); 2249var me1 = metadataElements.ElementAt(0); 2253var me2 = metadataElements.ElementAt(1); 2296var m1 = metadata.ElementAt(0); 2305var me1 = metadataElements.ElementAt(0); 2426items.ElementAt(0).GetMetadataValue("M1").ShouldBe("x"); 2427items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 2428items.ElementAt(1).GetMetadataValue("M1").ShouldBe("y"); 2429items.ElementAt(1).GetMetadataValue("M2").ShouldBe("d"); 2453items.ElementAt(0).GetMetadataValue("M1").ShouldBe("x"); 2454items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 2455items.ElementAt(1).GetMetadataValue("M1").ShouldBe("y"); 2456items.ElementAt(1).GetMetadataValue("M2").ShouldBe("d"); 2487items.ElementAt(0).GetMetadataValue("M1").ShouldBe(@"FOO.TXT"); 2488items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 2489items.ElementAt(1).GetMetadataValue("M1").ShouldBe("foo/bar.txt"); 2490items.ElementAt(1).GetMetadataValue("M2").ShouldBe("x"); 2491items.ElementAt(2).GetMetadataValue("M1").ShouldBe(@"/foo/BAR.vb\\/"); 2492items.ElementAt(2).GetMetadataValue("M2").ShouldBe("Y"); 2493items.ElementAt(3).GetMetadataValue("M1").ShouldBe(@"b\d\c"); 2494items.ElementAt(3).GetMetadataValue("M2").ShouldBe("f"); 2500items.ElementAt(0).GetMetadataValue("M1").ShouldBe("foo/bar.txt"); 2501items.ElementAt(0).GetMetadataValue("M2").ShouldBe("x"); 2502items.ElementAt(1).GetMetadataValue("M1").ShouldBe(@"/foo/BAR.vb\\/"); 2503items.ElementAt(1).GetMetadataValue("M2").ShouldBe("Y"); 2504items.ElementAt(2).GetMetadataValue("M1").ShouldBe(@"b\d\c"); 2505items.ElementAt(2).GetMetadataValue("M2").ShouldBe("f"); 2562items.ElementAt(0).GetMetadataValue("v0").ShouldBe("x"); 2563items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 2564items.ElementAt(1).GetMetadataValue("v0").ShouldBe("y"); 2565items.ElementAt(1).GetMetadataValue("M2").ShouldBe("d"); 2599items.ElementAt(0).GetMetadataValue("v0").ShouldBe("x"); 2600items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 2601items.ElementAt(1).GetMetadataValue("v0").ShouldBe("3"); 2602items.ElementAt(1).GetMetadataValue("M2").ShouldBe("Y"); 2603items.ElementAt(2).GetMetadataValue("v0").ShouldBe("y"); 2604items.ElementAt(2).GetMetadataValue("M2").ShouldBe("d"); 2629items.ElementAt(0).GetMetadataValue("c").ShouldBe("x"); 2630items.ElementAt(1).GetMetadataValue("c").ShouldBe("2"); 2631items.ElementAt(2).GetMetadataValue("c").ShouldBe("3"); 2632items.ElementAt(3).GetMetadataValue("c").ShouldBe("y"); 2633items.ElementAt(0).GetMetadataValue("d").ShouldBe("c"); 2634items.ElementAt(1).GetMetadataValue("d").ShouldBe("x"); 2635items.ElementAt(2).GetMetadataValue("d").ShouldBe("Y"); 2636items.ElementAt(3).GetMetadataValue("d").ShouldBe("d"); 2658items.ElementAt(0).EvaluatedInclude.ShouldBe("a2"); 2659items.ElementAt(1).EvaluatedInclude.ShouldBe("c2"); 2660items.ElementAt(2).EvaluatedInclude.ShouldBe("d2");
Definition\ProjectItemDefinition_Tests.cs (9)
248ProjectItem item = project.GetItems("i").ElementAt(0); 275ProjectItem item = project.GetItems("i").ElementAt(0); 302ProjectItem item = project.GetItems("i").ElementAt(0); 333ProjectItem item = project.GetItems("i").ElementAt(0); 361ProjectItem item = project.GetItems("i").ElementAt(0); 391ProjectItem item = project.GetItems("i").ElementAt(0); 419ProjectItem item = project.GetItems("i").ElementAt(0); 459ProjectItemInstance item1 = instance.GetItems("i").ElementAt(0); 462ProjectItemInstance item2 = instance.GetItems("i").ElementAt(1);
Microsoft.Build.Engine.UnitTests (152)
BackEnd\IntrinsicTask_Tests.cs (74)
1033Assert.Equal("a2", i1Group.ElementAt(1).EvaluatedInclude); 1035Assert.Equal("m2", i2Group.ElementAt(1).EvaluatedInclude); 1038Assert.Equal("m2", i1Group.ElementAt(1).GetMetadataValue("m")); 1067Assert.Equal("a2", i2Group.ElementAt(1).EvaluatedInclude); 1070Assert.Equal(String.Empty, i2Group.ElementAt(1).GetMetadataValue("n")); 1124Assert.Equal("b1", i1Group.ElementAt(1).EvaluatedInclude); 1125Assert.Equal("b1", i1Group.ElementAt(2).EvaluatedInclude); 1127Assert.Equal("m2", i1Group.ElementAt(1).GetMetadataValue("m")); 1128Assert.Equal("m3", i1Group.ElementAt(2).GetMetadataValue("m")); 1131Assert.Equal("m2", i2Group.ElementAt(1).EvaluatedInclude); 1132Assert.Equal("m3", i2Group.ElementAt(2).EvaluatedInclude); 1473<i Include='" + newFiles.ElementAt(1) + "'><output>" + oldFiles.ElementAt(1) + @"</output></i> 1491logger.AssertLogContains(new string[] { "start:[]", "end:[" + newFiles.ElementAt(1) + "]", "final:[" + oldFiles.First() + ";" + newFiles.ElementAt(1) + "]" }); 1515<i Include='" + newFiles.ElementAt(1) + "'><output>" + oldFiles.ElementAt(1) + @"</output></i> 1534logger.AssertLogContains(new string[] { "start:[]", "end:[" + newFiles.ElementAt(1) + "]", "final:[" + newFiles.ElementAt(1) + "]" }); 1553string newInput = newFiles.ElementAt(1); 1554string oldOutput = oldFiles.ElementAt(1); 1781items.ElementAt(0).GetMetadataValue("M1").ShouldBe("x"); 1782items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 1783items.ElementAt(1).GetMetadataValue("M1").ShouldBe("y"); 1784items.ElementAt(1).GetMetadataValue("M2").ShouldBe("d"); 1815items.ElementAt(0).GetMetadataValue("M1").ShouldBe("x"); 1816items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 1817items.ElementAt(1).GetMetadataValue("M1").ShouldBe("y"); 1818items.ElementAt(1).GetMetadataValue("M2").ShouldBe("d"); 1859items.ElementAt(0).GetMetadataValue("M1").ShouldBe(@"FOO.TXT"); 1860items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 1861items.ElementAt(1).GetMetadataValue("M1").ShouldBe("foo/bar.txt"); 1862items.ElementAt(1).GetMetadataValue("M2").ShouldBe("x"); 1863items.ElementAt(2).GetMetadataValue("M1").ShouldBe(@"/foo/BAR.vb\\/"); 1864items.ElementAt(2).GetMetadataValue("M2").ShouldBe("Y"); 1865items.ElementAt(3).GetMetadataValue("M1").ShouldBe(@"b\d\c"); 1866items.ElementAt(3).GetMetadataValue("M2").ShouldBe("f"); 1872items.ElementAt(0).GetMetadataValue("M1").ShouldBe("foo/bar.txt"); 1873items.ElementAt(0).GetMetadataValue("M2").ShouldBe("x"); 1874items.ElementAt(1).GetMetadataValue("M1").ShouldBe(@"/foo/BAR.vb\\/"); 1875items.ElementAt(1).GetMetadataValue("M2").ShouldBe("Y"); 1876items.ElementAt(2).GetMetadataValue("M1").ShouldBe(@"b\d\c"); 1877items.ElementAt(2).GetMetadataValue("M2").ShouldBe("f"); 1946items.ElementAt(0).GetMetadataValue("v0").ShouldBe("x"); 1947items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 1948items.ElementAt(1).GetMetadataValue("v0").ShouldBe("y"); 1949items.ElementAt(1).GetMetadataValue("M2").ShouldBe("d"); 1984items.ElementAt(0).GetMetadataValue("v0").ShouldBe("x"); 1985items.ElementAt(0).GetMetadataValue("M2").ShouldBe("c"); 1986items.ElementAt(1).GetMetadataValue("v0").ShouldBe("3"); 1987items.ElementAt(1).GetMetadataValue("M2").ShouldBe("Y"); 1988items.ElementAt(2).GetMetadataValue("v0").ShouldBe("y"); 1989items.ElementAt(2).GetMetadataValue("M2").ShouldBe("d"); 2020items.ElementAt(0).GetMetadataValue("c").ShouldBe("x"); 2021items.ElementAt(1).GetMetadataValue("c").ShouldBe("2"); 2022items.ElementAt(2).GetMetadataValue("c").ShouldBe("3"); 2023items.ElementAt(3).GetMetadataValue("c").ShouldBe("y"); 2024items.ElementAt(0).GetMetadataValue("d").ShouldBe("c"); 2025items.ElementAt(1).GetMetadataValue("d").ShouldBe("x"); 2026items.ElementAt(2).GetMetadataValue("d").ShouldBe("Y"); 2027items.ElementAt(3).GetMetadataValue("d").ShouldBe("d"); 2055items.ElementAt(0).EvaluatedInclude.ShouldBe("a2"); 2056items.ElementAt(1).EvaluatedInclude.ShouldBe("c2"); 2057items.ElementAt(2).EvaluatedInclude.ShouldBe("d2"); 2151Assert.Equal("a3", i0Group.ElementAt(1).EvaluatedInclude); 2152Assert.Equal("a4", i0Group.ElementAt(2).EvaluatedInclude); 2275Assert.Equal("m1.obj", linkGroup.ElementAt(1).EvaluatedInclude); 2276Assert.Equal("m2", linkGroup.ElementAt(2).EvaluatedInclude); 2277Assert.Equal("m2", linkGroup.ElementAt(3).EvaluatedInclude); 2966ProjectItemInstance item2 = lookup.GetItems("i1").ElementAt(1); 2996ProjectItemInstance item2 = lookup.GetItems("i1").ElementAt(1); 3045ProjectItemInstance item2 = lookup.GetItems("i1").ElementAt(1); 3076ProjectItemInstance item2 = lookup.GetItems("i1").ElementAt(1); 3562<i Include='" + files.First() + "'><output>" + files.ElementAt(1) + @"</output></i>
BackEnd\Lookup_Tests.cs (4)
112Assert.Equal("a2", lookup.GetItems("i1").ElementAt(1).EvaluatedInclude); 124Assert.Equal("a2", lookup.GetItems("i1").ElementAt(1).EvaluatedInclude); 136Assert.Equal("a2", lookup.GetItems("i1").ElementAt(1).EvaluatedInclude); 141Assert.Equal("a2", table1["i1"].ElementAt(1).EvaluatedInclude);
BackEnd\TaskExecutionHost_Tests.cs (2)
1329Assert.Equal(values[i], _bucket.Lookup.GetItems("output").ElementAt(i).EvaluatedInclude); 1344Assert.Equal(0, TaskItemComparer.Instance.Compare(values[i], new TaskItem(_bucket.Lookup.GetItems("output").ElementAt(i))));
Construction\SolutionProjectGenerator_Tests.cs (1)
1906Assert.Contains("%abtest", instances[0].GetItems("ProjectReference").ElementAt(0).EvaluatedInclude);
Definition\ItemDefinitionGroup_Tests.cs (26)
1532Assert.Equal("jm6", p.GetItems("j").ElementAt(1).GetMetadataValue("m")); 1533Assert.Equal("in1", p.GetItems("j").ElementAt(1).GetMetadataValue("n")); 1534Assert.Equal("io2", p.GetItems("j").ElementAt(1).GetMetadataValue("o")); 1535Assert.Equal("ip1", p.GetItems("j").ElementAt(1).GetMetadataValue("p")); 1536Assert.Equal("jq3", p.GetItems("j").ElementAt(1).GetMetadataValue("q")); 1538Assert.Equal("km5", p.GetItems("k").ElementAt(0).GetMetadataValue("m")); 1539Assert.Equal("", p.GetItems("k").ElementAt(0).GetMetadataValue("n")); 1540Assert.Equal("", p.GetItems("k").ElementAt(0).GetMetadataValue("o")); 1541Assert.Equal("", p.GetItems("k").ElementAt(0).GetMetadataValue("p")); 1542Assert.Equal("kq4", p.GetItems("k").ElementAt(0).GetMetadataValue("q")); 1543Assert.Equal("kr4", p.GetItems("k").ElementAt(0).GetMetadataValue("r")); 1544Assert.Equal("", p.GetItems("k").ElementAt(0).GetMetadataValue("s")); 1546Assert.Equal("jm3", p.GetItems("k").ElementAt(1).GetMetadataValue("m")); 1547Assert.Equal("jn3", p.GetItems("k").ElementAt(1).GetMetadataValue("n")); 1548Assert.Equal("", p.GetItems("k").ElementAt(1).GetMetadataValue("o")); 1549Assert.Equal("", p.GetItems("k").ElementAt(1).GetMetadataValue("p")); 1550Assert.Equal("jq3", p.GetItems("k").ElementAt(1).GetMetadataValue("q")); 1551Assert.Equal("kr4", p.GetItems("k").ElementAt(1).GetMetadataValue("r")); 1552Assert.Equal("ks3", p.GetItems("k").ElementAt(1).GetMetadataValue("s")); 1554Assert.Equal("jm6", p.GetItems("k").ElementAt(2).GetMetadataValue("m")); 1555Assert.Equal("in1", p.GetItems("k").ElementAt(2).GetMetadataValue("n")); 1556Assert.Equal("io2", p.GetItems("k").ElementAt(2).GetMetadataValue("o")); 1557Assert.Equal("ip1", p.GetItems("k").ElementAt(2).GetMetadataValue("p")); 1558Assert.Equal("jq3", p.GetItems("k").ElementAt(2).GetMetadataValue("q")); 1559Assert.Equal("kr4", p.GetItems("k").ElementAt(2).GetMetadataValue("r")); 1560Assert.Equal("ks3", p.GetItems("k").ElementAt(1).GetMetadataValue("s"));
EscapingInProjects_Tests.cs (7)
883Assert.Equal("a", items.ElementAt(0).EvaluatedInclude); 884Assert.Equal("b;c", items.ElementAt(1).EvaluatedInclude); 885Assert.Equal("foo;bar", items.ElementAt(2).EvaluatedInclude); 915Assert.Equal("a", items.ElementAt(0).EvaluatedInclude); 916Assert.Equal("b;c", items.ElementAt(1).EvaluatedInclude); 917Assert.Equal("foo", items.ElementAt(2).EvaluatedInclude); 918Assert.Equal("bar", items.ElementAt(3).EvaluatedInclude);
Evaluation\Evaluator_Tests.cs (36)
1479ProjectRootElement importXml = ProjectRootElement.Open(project.Items.ElementAt(0).Xml.ContainingProject.FullPath); 1532ProjectMetadataElement xml1 = project.Xml.ItemDefinitions.ElementAt(0).Metadata.ElementAt(0); 1586ProjectMetadata metadatum = project.GetItems("i").ElementAt(0).GetMetadata("m"); 1592ProjectMetadataElement xml1 = project.Xml.ItemDefinitions.ElementAt(0).Metadata.ElementAt(0); 1595ProjectMetadataElement xml2 = project.Xml.Items.ElementAt(0).Metadata.ElementAt(0); 1625ProjectMetadata metadatum = project.GetItems("i").ElementAt(1).GetMetadata("m"); 1630ProjectMetadataElement xml1 = project.Xml.Items.ElementAt(1).Metadata.ElementAt(0); 1657ProjectMetadata metadatum = project.GetItems("i").ElementAt(0).GetMetadata("m"); 1662ProjectMetadataElement xml1 = project.Xml.Items.ElementAt(0).Metadata.ElementAt(0); 1754ProjectMetadata metadatum = project.GetItems("i").ElementAt(0).GetMetadata("m"); 1848ProjectMetadata predecessor = project.GetItems("i").ElementAt(0).GetMetadata("m").Predecessor; 1887Assert.Null(project.GetItems("j").ElementAt(0).GetMetadata("m").Predecessor); 1952Assert.Equal("1", restOfAllEvaluatedProperties.ElementAt(0).EvaluatedValue); 1953Assert.Equal("2", restOfAllEvaluatedProperties.ElementAt(1).EvaluatedValue); 1954Assert.Equal("2;2", restOfAllEvaluatedProperties.ElementAt(2).EvaluatedValue); 1955Assert.Equal("4", restOfAllEvaluatedProperties.ElementAt(3).EvaluatedValue); 2023Assert.Equal("i1", project.AllEvaluatedItems.ElementAt(0).EvaluatedInclude); 2024Assert.Equal(String.Empty, project.AllEvaluatedItems.ElementAt(0).GetMetadataValue("m")); 2025Assert.Equal("j1", project.AllEvaluatedItems.ElementAt(1).EvaluatedInclude); 2026Assert.Equal("m1", project.AllEvaluatedItems.ElementAt(1).GetMetadataValue("m")); 2027Assert.Equal("i3", project.AllEvaluatedItems.ElementAt(2).EvaluatedInclude); 2028Assert.Equal("i1", project.AllEvaluatedItems.ElementAt(3).EvaluatedInclude); 2029Assert.Equal("m2", project.AllEvaluatedItems.ElementAt(3).GetMetadataValue("m")); 2030Assert.Equal("i5", project.AllEvaluatedItems.ElementAt(4).EvaluatedInclude); 2031Assert.Equal("i10", project.AllEvaluatedItems.ElementAt(5).EvaluatedInclude); 2036project.RemoveItem(project.AllEvaluatedItems.ElementAt(1)); 2116Assert.Equal("1", restOfAllEvaluatedProperties.ElementAt(0).EvaluatedValue); 2117Assert.Equal("2", restOfAllEvaluatedProperties.ElementAt(1).EvaluatedValue); 2118Assert.Equal("3", restOfAllEvaluatedProperties.ElementAt(2).EvaluatedValue); 2179Assert.Equal("2", project.AllEvaluatedItemDefinitionMetadata.ElementAt(1).EvaluatedValue); 2180Assert.Equal("1;2", project.AllEvaluatedItemDefinitionMetadata.ElementAt(3).EvaluatedValue);
TestComparers\ProjectInstanceModelTestComparers.cs (2)
347var xPair = x.ElementAt(i); 348var yPair = y.ElementAt(i);
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
1282var xPair = x.ElementAt(i); 1283var yPair = y.ElementAt(i);
Microsoft.Cci.Extensions (2)
Extensions\MemberExtensions.cs (2)
164var messageArgument = attribute.Arguments.ElementAt(0) as IMetadataConstant; 165var errorArgument = attribute.Arguments.ElementAt(1) as IMetadataConstant;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (1)
76var elementNode = (XmlElementSyntax)newDocCommentNode.ChildNodes().ElementAt(0);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Interactive\NavigateTo\InteractiveNavigateToTests.cs (2)
469var item = items.ElementAt(1); 476item = items.ElementAt(0);
NavigateTo\NavigateToTests.cs (2)
670var item = items.ElementAt(1); 677item = items.ElementAt(0);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (132)
CodeGen\CodeGenDeconstructTests.cs (35)
1128var tuple = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 1368var x = nodes.OfType<VariableDeclaratorSyntax>().ElementAt(2); 1425var x = nodes.OfType<VariableDeclaratorSyntax>().ElementAt(2); 1510var tuple1 = nodes.OfType<TupleExpressionSyntax>().ElementAt(0); 1515var tuple2 = nodes.OfType<TupleExpressionSyntax>().ElementAt(1); 1563var tuple = nodes.OfType<TupleExpressionSyntax>().ElementAt(0); 1670Assert.Equal("(System.Int32 x, System.Int32 y) a", model.GetDeclaredSymbol(declarations.ElementAt(4)).ToTestDisplayString()); 1672Assert.Equal("(System.Int32, System.Int32) b", model.GetDeclaredSymbol(declarations.ElementAt(5)).ToTestDisplayString()); 1674Assert.Equal("(System.Int32, System.Int32 x) c", model.GetDeclaredSymbol(declarations.ElementAt(6)).ToTestDisplayString()); 1676var x = (ILocalSymbol)model.GetDeclaredSymbol(declarations.ElementAt(7)); 1681model.GetDeclaredSymbol(declarations.ElementAt(8)).ToTestDisplayString()); 3135var lhsNested = tree.GetRoot().DescendantNodes().OfType<ParenthesizedVariableDesignationSyntax>().ElementAt(1); 3184var x234 = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().ElementAt(1); 3189var x34 = tree.GetRoot().DescendantNodes().OfType<ParenthesizedVariableDesignationSyntax>().ElementAt(1); 3248var x23 = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 3286var lhsNested = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().ElementAt(1); 3336var lhsNested = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().ElementAt(2); 3447var literal = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 3483var literal = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 5509var secondY = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == "y").ElementAt(1); 5540var secondX = tree.GetRoot().DescendantNodes().OfType<SingleVariableDesignationSyntax>().Where(d => d.Identifier.ValueText == "x").ElementAt(1); 5916var discard2 = GetDiscardDesignations(tree).ElementAt(1); 5924var discard3 = GetDiscardDesignations(tree).ElementAt(2); 6408var yz = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(2); 6413var y = tree.GetRoot().DescendantNodes().OfType<DeclarationExpressionSyntax>().ElementAt(1); 6441model.GetTypeInfo(refs.ElementAt(0)); // Assert.Equal("int", model.GetTypeInfo(refs.ElementAt(0)).Type.ToDisplayString()); 6442model.GetTypeInfo(refs.ElementAt(1)); // Assert.Equal("string", model.GetTypeInfo(refs.ElementAt(1)).Type.ToDisplayString()); 6444var tuple = (TupleExpressionSyntax)refs.ElementAt(0).Parent.Parent; 6866var discard2 = GetDiscardDesignations(tree).ElementAt(1); 6932var discard2 = GetDiscardDesignations(tree).ElementAt(1); 6984var discard2 = GetDiscardDesignations(tree).ElementAt(1); 7002var discard4 = GetDiscardDesignations(tree).ElementAt(2); 7238var lhs = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 7520var lhs = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(2); 8629var node = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().ElementAt(1);
CodeGen\CodeGenRefLocalTests.cs (3)
4033var xDecl = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(1); 4070var xDecl = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(1); 4104var xDecl = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(1);
CodeGen\CodeGenTupleEqualityTests.cs (15)
682var tuple1 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(0); 688var tuple2 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 793var tuple1 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(0); 806var tuple2 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 1001var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 1399var nullLiteral = literals.ElementAt(0); 1403var nullLiteral2 = literals.ElementAt(1); 1497var tuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(3); 1619var rightTuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(2); 1675var tuple1 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(0); 1683var tuple2 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 1776var tuple1 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(0); 1782var tuple2 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1); 1918var tuple1 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(0); 1924var tuple2 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1);
CodeGen\CodeGenTupleTest.cs (79)
3688var yTuple = nodes.OfType<TupleExpressionSyntax>().ElementAt(0); 3705var zTuple = nodes.OfType<TupleExpressionSyntax>().ElementAt(1); 3934var yTuple = nodes.OfType<TupleExpressionSyntax>().ElementAt(0); 3938var zTuple = nodes.OfType<TupleExpressionSyntax>().ElementAt(1); 3941var tTuple = nodes.OfType<TupleExpressionSyntax>().ElementAt(2); 3993var yTuple = nodes.OfType<TupleExpressionSyntax>().ElementAt(0); 4839var invocation1 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().ElementAt(0); 4844var invocation2 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().ElementAt(2); 5075var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().ElementAt(0); 5119var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().ElementAt(0); 5160var memberAccess = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().ElementAt(0); 5164var memberAccess2 = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().ElementAt(1); 5168var memberAccess3 = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().ElementAt(2); 5204var invocation = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().ElementAt(0); 7570var tuple1 = tuples.ElementAt(0); 7579var tuple2 = tuples.ElementAt(1); 7588var tuple3 = tuples.ElementAt(2); 7632verifyTuple("(1, null)", tuples.ElementAt(0)); 7633verifyTuple("(2, null)", tuples.ElementAt(1)); 8324var l11 = nodes.OfType<LiteralExpressionSyntax>().ElementAt(2); 8751var l11 = nodes.OfType<LiteralExpressionSyntax>().ElementAt(2); 8836var lnull = nodes.OfType<LiteralExpressionSyntax>().ElementAt(2); 9856var t1 = names.ElementAt(4); 9859var t2 = names.ElementAt(5); 9862var t3 = names.ElementAt(6); 9865var d1 = names.ElementAt(7); 9868var d2 = names.ElementAt(8); 9871var d3 = names.ElementAt(9); 9907var t1 = names.ElementAt(4); 9910var t2 = names.ElementAt(5); 9913var t3 = names.ElementAt(6); 9949var t1 = names.ElementAt(4); 9953var t2 = names.ElementAt(5); 9957var t3 = names.ElementAt(6); 9995var t1 = names.ElementAt(4); 9999var t2 = names.ElementAt(5); 10003var t3 = names.ElementAt(6); 10059var t1 = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(3); 10098var t1 = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(2); 10101var t2 = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(3); 10134var t1 = names.ElementAt(2); 10137var t2 = names.ElementAt(3); 17212var n1 = nodes.OfType<TupleExpressionSyntax>().ElementAt(0); 17219var n2 = nodes.OfType<TupleExpressionSyntax>().ElementAt(1); 17226var n3 = nodes.OfType<LiteralExpressionSyntax>().ElementAt(4); 17233var n4 = nodes.OfType<LiteralExpressionSyntax>().ElementAt(5); 17273var n1 = nodes.OfType<TupleExpressionSyntax>().ElementAt(0); 17280var n2 = nodes.OfType<TupleExpressionSyntax>().ElementAt(1); 17287var n3 = nodes.OfType<LiteralExpressionSyntax>().ElementAt(4); 17294var n4 = nodes.OfType<LiteralExpressionSyntax>().ElementAt(5); 17332var n1 = nodes.OfType<TupleExpressionSyntax>().ElementAt(0); 17339var n2 = nodes.OfType<TupleExpressionSyntax>().ElementAt(1); 17370var nc = nodes.OfType<NameColonSyntax>().ElementAt(0); 17403var x1Bob = nodes.OfType<MemberAccessExpressionSyntax>().ElementAt(1); 19293var x1 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(2)); 19296var x2 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(3)); 19299var x3 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(4)); 19302var x4 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(5)); 19305var x5 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(6)); 19308var x6 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(7)); 19311var x7 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(8)); 19314var x8 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(9)); 19317var x9 = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(10)); 19320var x6double = model.GetDeclaredSymbol(nodes.OfType<VariableDeclaratorSyntax>().ElementAt(11)); 24259var derived = tree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().ElementAt(1); 24322var derived = tree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().ElementAt(1); 24386var derived = tree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().ElementAt(1); 24396var collection = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(3); 24459var derived = tree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().ElementAt(1); 24469var collection = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(3); 24532var derived = tree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().ElementAt(1); 24542var collection = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(3); 24606var derived = tree.GetRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().ElementAt(1); 24616var collection = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(3); 25024var x = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(1); 25053var y = tree.GetRoot().DescendantNodes().OfType<TupleTypeSyntax>().ElementAt(0); 25058var z = tree.GetRoot().DescendantNodes().OfType<TupleTypeSyntax>().ElementAt(1); 25084var tuple = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(0); 25881var tuple = tree.GetRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(1);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (24)
Attributes\AttributeTests_NativeInteger.cs (1)
1380var interfaceImpl = reader.GetInterfaceImplementation(typeDef.GetInterfaceImplementations().ElementAt(1));
Attributes\InternalsVisibleToAndStrongNameTests.cs (4)
2415CompileAndVerify(other.WithReferences(new[] { other.References.ElementAt(0), new CSharpCompilationReference(unsigned) })).VerifyDiagnostics(); 2417CompileAndVerify(other.WithReferences(new[] { other.References.ElementAt(0), MetadataReference.CreateFromStream(unsigned.EmitToStream()) })).VerifyDiagnostics(); 2443var comps = new[] {other.WithReferences(new []{other.References.ElementAt(0), new CSharpCompilationReference(unsigned)}), 2444other.WithReferences(new []{other.References.ElementAt(0), MetadataReference.CreateFromStream(unsigned.EmitToStream()) })};
Semantics\OutVarTests.cs (11)
32978var discard1 = GetDiscardDesignations(tree).ElementAt(0); 32987var discard2 = GetDiscardDesignations(tree).ElementAt(1); 33063var discard1 = GetDiscardDesignations(tree).ElementAt(0); 33079var discard2 = GetDiscardDesignations(tree).ElementAt(1); 33177var discard1 = GetDiscardDesignations(tree).ElementAt(0); 33193var discard2 = GetDiscardDesignations(tree).ElementAt(1); 33241var discard1 = GetDiscardDesignations(tree).ElementAt(0); 33257var discard2 = GetDiscardDesignations(tree).ElementAt(1); 34329var method = syntaxTree.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().ElementAt(i + 2); 34543var method = syntaxTree.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().ElementAt(i + 2); 36170var propertyExpressionBodySyntax = tree.GetRoot().DescendantNodes().OfType<ArrowExpressionClauseSyntax>().ElementAt(1);
Semantics\PatternMatchingTestBase.cs (1)
459var node = tree.GetRoot().DescendantNodes().OfType<T>().ElementAt(index);
Semantics\PrimaryConstructorTests.cs (3)
1072var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 1300var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 1967var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1);
Semantics\RecordTests.cs (4)
21144var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 21374var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 22079var x = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "X").ElementAt(1); 23371var recordDeclaration = tree.GetRoot().DescendantNodes().OfType<RecordDeclarationSyntax>().ElementAt(1);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (1)
76var elementNode = (XmlElementSyntax)newDocCommentNode.ChildNodes().ElementAt(0);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\SyntaxUtilitiesTests.cs (2)
87var leftPosition = leftRoot.DescendantNodes().OfType<LiteralExpressionSyntax>().ElementAt(2).SpanStart; // 0 within Console.WriteLine(0) 134var leftPosition = leftRoot.DescendantNodes().OfType<LiteralExpressionSyntax>().ElementAt(5).SpanStart; // 3 within Console.WriteLine(3)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (7)
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (1)
933return graph.Blocks.SelectMany(b => b.Operations.SelectMany(o => o.DescendantsAndSelf())).OfType<IFlowAnonymousFunctionOperation>().ElementAt(index);
IOperation\IOperationTests_IVariableDeclaration.cs (6)
615Assert.Equal(OperationKind.VariableInitializer, declarator.ChildOperations.ElementAt(1).Kind); 657Assert.Equal(OperationKind.VariableInitializer, declarator.ChildOperations.ElementAt(0).Kind); 853Assert.Equal(OperationKind.VariableDeclarator, declaration.ChildOperations.ElementAt(1).Kind); 875Assert.Equal(OperationKind.VariableDeclarator, declaration.ChildOperations.ElementAt(1).Kind); 927var literalExpr = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 934var invocExpr = nodes.OfType<InvocationExpressionSyntax>().ElementAt(0);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (91)
Semantics\DeconstructionTests.cs (1)
4724var aa = nodes.OfType<DeclarationExpressionSyntax>().ElementAt(0);
Semantics\ExpressionBodiedMemberTests.cs (1)
44.ElementAt(1);
Semantics\ImplicitObjectCreationTests.cs (6)
1980var def = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().ElementAt(0); 2219var def = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().ElementAt(0); 3217var first = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().ElementAt(1); 3221var second = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().ElementAt(2); 3225var third = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().ElementAt(3); 3229var fourth = nodes.OfType<ImplicitObjectCreationExpressionSyntax>().ElementAt(4);
Semantics\IndexAndRangeTests.cs (3)
1251var expression = tree.GetRoot().DescendantNodes().OfType<RangeExpressionSyntax>().ElementAt(1); 1284var expression = tree.GetRoot().DescendantNodes().OfType<RangeExpressionSyntax>().ElementAt(2); 1317var expression = tree.GetRoot().DescendantNodes().OfType<RangeExpressionSyntax>().ElementAt(3);
Semantics\LocalFunctionTests.cs (2)
395.OfType<IdentifierNameSyntax>().ElementAt(2); 409a = newTree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().ElementAt(2);
Semantics\NonTrailingNamedArgumentsTests.cs (11)
46var firstInvocation = nodes.OfType<InvocationExpressionSyntax>().ElementAt(2); 51var firstNamedArgA = nodes.OfType<NameColonSyntax>().ElementAt(0); 58var secondInvocation = nodes.OfType<InvocationExpressionSyntax>().ElementAt(3); 63var secondNamedArgA = nodes.OfType<NameColonSyntax>().ElementAt(1); 368var invocation = nodes.OfType<InvocationExpressionSyntax>().ElementAt(1); 394var invocation = nodes.OfType<InvocationExpressionSyntax>().ElementAt(1); 424var invocation = nodes.OfType<InvocationExpressionSyntax>().ElementAt(1); 680var invocation = nodes.OfType<InvocationExpressionSyntax>().ElementAt(1); 745var invocation = nodes.OfType<InvocationExpressionSyntax>().ElementAt(1); 777var invocation = nodes.OfType<InvocationExpressionSyntax>().ElementAt(1); 984var invocation = nodes.OfType<AttributeSyntax>().ElementAt(1);
Semantics\NullableReferenceTypesTests.cs (6)
73763var node = tree.GetRoot().DescendantNodes().OfType<EnumMemberDeclarationSyntax>().ElementAt(1); 94281var localDeclaration = syntaxTree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(1); 111772verifyLocalFunction(localSyntaxes.ElementAt(0), "C.M1.local", new[] { "C!" }); 111773verifyLocalFunction(localSyntaxes.ElementAt(1), "C.M2.local", new[] { "C" }); 111826verifyLocalFunction(localSyntaxes.ElementAt(0), "C.M3.local", new[] { "C" }); 146466.ElementAt(1);
Semantics\OperatorTests.cs (2)
2991var boolPlusPlus = tree.GetRoot().DescendantNodes().OfType<PostfixUnaryExpressionSyntax>().ElementAt(0); 2997var errorPlusPlus = tree.GetRoot().DescendantNodes().OfType<PostfixUnaryExpressionSyntax>().ElementAt(1);
Semantics\RefEscapingTests.cs (8)
5717var tuple2 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(3); 5723var tuple3 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(5); 5729var tuple6 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(11); 5735var tuple7 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(13); 5817var tuple2 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(3); 5823var tuple3 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(5); 5829var tuple6 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(11); 5835var tuple7 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().ElementAt(13);
Semantics\StackAllocInitializerTests.cs (10)
1050var obj1 = variables.ElementAt(i); 1058var obj2 = variables.ElementAt(i + 1); 1066var obj3 = variables.ElementAt(i + 2); 1074var obj4 = variables.ElementAt(i + 3); 1082var obj5 = variables.ElementAt(i + 4); 1152var obj1 = variables.ElementAt(i); 1161var obj2 = variables.ElementAt(i + 1); 1169var obj3 = variables.ElementAt(i + 2); 1177var obj4 = variables.ElementAt(i + 3); 1185var obj5 = variables.ElementAt(i + 4);
Semantics\StackAllocSpanExpressionsTests.cs (10)
56var obj1 = variables.ElementAt(0); 64var obj2 = variables.ElementAt(1); 72var obj3 = variables.ElementAt(2); 80var obj4 = variables.ElementAt(3); 88var obj5 = variables.ElementAt(4); 130var obj1 = variables.ElementAt(0); 139var obj2 = variables.ElementAt(1); 147var obj3 = variables.ElementAt(2); 155var obj4 = variables.ElementAt(3); 163var obj5 = variables.ElementAt(4);
Semantics\TargetTypedDefaultTests.cs (30)
196var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 244var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 253var nullSyntax = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 281var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 290var nullSyntax = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 326var default1 = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 332var default2 = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 520var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 529var nullSyntax = nodes.OfType<LiteralExpressionSyntax>().ElementAt(2); 566var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 575var nullSyntax = nodes.OfType<LiteralExpressionSyntax>().ElementAt(2); 609var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 618var nullSyntax = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 667var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 748var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 757var nullSyntax = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 1142var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 1631var defaultLiteral = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 1911var first = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 2089var def = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().ElementAt(0); 2333var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(0); 2340var nullSyntax = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 2414var first = nodes.OfType<LiteralExpressionSyntax>().ElementAt(2); 2419var second = nodes.OfType<LiteralExpressionSyntax>().ElementAt(3); 2424var third = nodes.OfType<LiteralExpressionSyntax>().ElementAt(4); 2429var fourth = nodes.OfType<LiteralExpressionSyntax>().ElementAt(5); 2457var def = nodes.OfType<LiteralExpressionSyntax>().ElementAt(1); 3583var default2 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<DefaultExpressionSyntax>().ElementAt(0); 3590var default3 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<DefaultExpressionSyntax>().ElementAt(1); 3597var default4 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<DefaultExpressionSyntax>().ElementAt(2);
Semantics\TopLevelStatementsTests.cs (1)
6046localDecl = tree1.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(1);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (59)
Compilation\SemanticModelAPITests.cs (1)
2027.OfType<EqualsValueClauseSyntax>().ElementAt(1);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3748var tree2 = compilation.SyntaxTrees.ElementAt(1);
DocumentationComments\CrefTests.cs (2)
4650model.GetSymbolInfo(crefSyntaxes.ElementAt(0)); 4651model.GetSymbolInfo(crefSyntaxes.ElementAt(1));
DocumentationComments\ParameterTests.cs (27)
41Assert.Equal(typeParameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 42Assert.Equal(typeParameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(1)).Symbol); 65Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 66Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(1)).Symbol); 89Assert.Equal(typeParameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 90Assert.Equal(typeParameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(1)).Symbol); 114Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 115Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(1)).Symbol); 143Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 144Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(1)).Symbol); 168Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 169Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(1)).Symbol); 189Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(0))); 190Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(1))); 210Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(0))); 211Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(1))); 231Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(0))); 232Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(1))); 252Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(0))); 253Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(1))); 281Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 282Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(nameSyntaxes.ElementAt(1))); 306Assert.Equal(parameters.ElementAt(0), model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 307Assert.Equal(parameters.ElementAt(1), model.GetSymbolInfo(nameSyntaxes.ElementAt(1)).Symbol); 308Assert.Equal(parameters.ElementAt(2), model.GetSymbolInfo(nameSyntaxes.ElementAt(2)).Symbol); 383Assert.Equal(typeParameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(0)).Symbol); 384Assert.Equal(parameter, model.GetSymbolInfo(nameSyntaxes.ElementAt(1)).Symbol);
Symbols\DefaultInterfaceImplementationTests.cs (8)
14737var p1 = i1.GetMembers().OfType<PropertySymbol>().ElementAt(0); 14760var p2 = i1.GetMembers().OfType<PropertySymbol>().ElementAt(1); 14783var p3 = i1.GetMembers().OfType<PropertySymbol>().ElementAt(2); 14810var p4 = i1.GetMembers().OfType<PropertySymbol>().ElementAt(3); 28236var p1 = i1.GetMembers().OfType<EventSymbol>().ElementAt(0); 28263var p2 = i1.GetMembers().OfType<EventSymbol>().ElementAt(1); 28290var p3 = i1.GetMembers().OfType<EventSymbol>().ElementAt(2); 28317var p4 = i1.GetMembers().OfType<EventSymbol>().ElementAt(3);
Symbols\Source\NullablePublicAPITests.cs (18)
1515var ternary = root.DescendantNodes().OfType<ConditionalExpressionSyntax>().ElementAt(1); 2134var lastDeclaration = root.DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(3); 3540var innerLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3551.ElementAt(1) 3601var innerLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3612.ElementAt(1) 3862var innerLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3927var propertyLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3981var innerLambda1 = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3991var innerLambda2 = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 4050var o2Decl = root.DescendantNodes().OfType<VariableDeclaratorSyntax>().ElementAt(1); 4116var innerLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 4181var nestedLocalFunction = (IMethodSymbol)model.GetDeclaredSymbol(lambda.DescendantNodes().OfType<LocalFunctionStatementSyntax>().ElementAt(1)); 4211var attributeUsage = root.DescendantNodes().OfType<AttributeSyntax>().ElementAt(1); 4272var default0 = root.DescendantNodes().OfType<EqualsValueClauseSyntax>().ElementAt(0).Value; 4275var default1 = root.DescendantNodes().OfType<EqualsValueClauseSyntax>().ElementAt(1).Value; 4306var default0 = root.DescendantNodes().OfType<AttributeArgumentSyntax>().ElementAt(0).Expression; 4309var default1 = root.DescendantNodes().OfType<AttributeArgumentSyntax>().ElementAt(1).Expression;
Symbols\Source\UpdatedContainingSymbolAndNullableAnntotationTests.cs (2)
39var local2 = model.GetDeclaredSymbol(varDeclarators.ElementAt(1)).GetSymbol<SourceLocalSymbol>(); 41Symbol m2 = model.GetDeclaredSymbol(root.DescendantNodes().OfType<MethodDeclarationSyntax>().ElementAt(1)).GetSymbol();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (13)
Diagnostics\LocationsTests.cs (1)
418var span = syntaxTree.GetDiagnostics().ElementAt(3).Location.GetLineSpan();
IncrementalParsing\IncrementalParsingTests.cs (2)
3714Assert.Equal(pd.ElementAt(i).Inspect(), id.ElementAt(i).Inspect());
Parsing\ParserRegressionTests.cs (4)
228Assert.Equal("(1,1201): error CS1056: Unexpected character '\\u003C'", actualErrors.ElementAt(200).ToString(EnsureEnglishUICulture.PreferredOrNull)); 229Assert.Equal("(1,1207): error CS1056: Unexpected character '\\u003E\\u003E\\u003E\\u003E'", actualErrors.ElementAt(201).ToString(EnsureEnglishUICulture.PreferredOrNull)); 246Assert.Equal("(1,2001): error CS1056: Unexpected character '\\U0000003C'", actualErrors.ElementAt(200).ToString(EnsureEnglishUICulture.PreferredOrNull)); 247Assert.Equal("(1,2011): error CS1056: Unexpected character '\\u003E\\u003E\\u003E\\u003E'", actualErrors.ElementAt(201).ToString(EnsureEnglishUICulture.PreferredOrNull));
Syntax\SyntaxAnnotationTests.cs (4)
358var oldNode = actualNodesOrTokens.ElementAt(i); 359var annotatedNode = annotatedNodesOrTokens.ElementAt(i); 373var oldTrivia = actualTrivia.ElementAt(i); 374var newTrivia = annotatedTrivia.ElementAt(i);
Syntax\TrackNodeTests.cs (2)
40Assert.Equal("a", currentAs.ElementAt(0).ToString()); 89Assert.Equal(newA.ToFullString(), latestAs.ElementAt(0).ToFullString());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Completion\AbstractCompletionProviderTests.cs (1)
183trigger = RoslynCompletion.CompletionTrigger.CreateInsertionTrigger(insertedCharacter: code.ElementAt(position - 1));
NavigateTo\AbstractNavigateToTests.cs (1)
174var actualItem = items.ElementAt(i);
SignatureHelp\AbstractSignatureHelpProviderTests.cs (2)
192expectedTestItems.ElementAt(i)); 391code.ElementAt(cursorPosition - 1));
Microsoft.CodeAnalysis.UnitTests (5)
Collections\List\ICollection.Generic.Tests.cs (2)
100casted.Remove(casted.ElementAt(0)); 271collection.Remove(collection.ElementAt(0));
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (1)
47Assert.Equal(enumerable.ElementAt(index), list[index + listLength]);
MetadataReferences\MetadataHelpersTests.cs (2)
503Assert.Equal("a", nestedNamespaces.ElementAt(0).Key); 504Assert.Equal("b", nestedNamespaces.ElementAt(1).Key);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
Syntax\SyntaxAnnotationTests.vb (4)
332Dim oldNode = actualNodesOrTokens.ElementAt(index) 333Dim annotatedNode = annotatedNodesOrTokens.ElementAt(index) 346Dim oldTrivia = actualTrivia.ElementAt(index) 347Dim newTrivia = annotatedTrivia.ElementAt(index)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
114var p0 = solution.Projects.ElementAt(0); 115var p1 = solution.Projects.ElementAt(1);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace_XmlConsumption.cs (2)
283.Split(',').Select(v => KeyValuePairUtil.Create(v.Split('=').ElementAt(0), (object)v.Split('=').ElementAt(1))).ToImmutableArray());
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
FindAllDeclarationsTests.TestSolutionsAndProject.cs (1)
69var actualResult = declarations.ElementAt(i).ToString();
FindReferencesTests.cs (7)
189Assert.Equal(expected: 2, actual: references.ElementAt(0).Locations.Count()); 194Assert.Equal(expected: 2, actual: references.ElementAt(0).Locations.Count()); 226Assert.Equal(expected: 0, actual: references.ElementAt(0).Locations.Count()); 287SyntaxNode declareMethod = methodlist.ElementAt(0); 288SyntaxNode normalMethod = methodlist.ElementAt(2); 293Assert.Equal(2, references.ElementAt(0).Locations.Count()); 298Assert.Equal(2, references.ElementAt(0).Locations.Count());
Microsoft.Data.Analysis (1)
DataFrameColumn.cs (1)
485KeyValuePair<T, List<ValueTuple<int, int>>> minElement = heapOfValueAndListOfTupleOfSortAndBufferIndex.ElementAt(0);
Microsoft.Data.Analysis.Tests (2)
ArrayComparer.cs (2)
192IArrowArray expectedArray = expectedBatch.Arrays.ElementAt(i); 193IArrowArray actualArray = actualBatch.Arrays.ElementAt(i);
Microsoft.ML.AutoML (14)
Experiment\Runners\CrossValSummaryRunner.cs (6)
62_groupIdColumn, _labelColumn, _metricsAgent, _preprocessorTransforms?.ElementAt(i), modelFileInfo, _modelInputSchema, 80var bestModel = trainResults.ElementAt(bestFoldIndex).model; 125topKPredictionCount: newMetrics.ElementAt(0).TopKPredictionCount, 175double[] arr = new double[results.ElementAt(0).Count()]; 178arr[i] = GetAverageOfNonNaNScores(results.Select(x => x.ElementAt(i))); 215var value = values.ElementAt(i);
PipelineSuggesters\PipelineSuggester.cs (2)
127var trainer = availableTrainers.ElementAt(history.Count()); 137switch (hps.ElementAt(i))
Utils\BestResultUtil.cs (6)
56return results.ElementAt(indexOfBestScore); 69return results.ElementAt(indexOfBestScore); 129if (scores.ElementAt(i) < minScore) 131minScore = scores.ElementAt(i); 144if (scores.ElementAt(i) > maxScore) 146maxScore = scores.ElementAt(i);
Microsoft.ML.AutoML.Tests (1)
Util.cs (1)
31editor.Values[i] = colNames.ElementAt(i).AsMemory();
Microsoft.ML.Core.Tests (6)
UnitTests\TestHosts.cs (6)
46var randHostTuple = hosts.ElementAt(rand.Next(hosts.Count - 1)); 64} while ((hosts.ElementAt(index).Item1 as ICancelable).IsCanceled || 66hosts.ElementAt(index).Item2 < 2); 67(hosts.ElementAt(index).Item1 as ICancelable).CancelExecution(); 68rootHost = hosts.ElementAt(index).Item1; 104var tuple = hosts.ElementAt(i);
Microsoft.ML.Data (1)
Transforms\ValueMapping.cs (1)
325TValue value = values.ElementAt(i);
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
573_curDataSetRow = dataSetOrder.ElementAt(0);
Microsoft.ML.Sweeper (4)
Algorithms\NelderMead.cs (4)
311_worst = _simplexVertices.ElementAt(0); 312_secondWorst = _simplexVertices.ElementAt(1); 313_best = _simplexVertices.ElementAt(_simplexVertices.Count - 1); 386VectorUtils.AddMult(_simplexVertices.ElementAt(i).Value, centroid, scale);
Microsoft.ML.TensorFlow.Tests (2)
TensorflowTests.cs (2)
2073Assert.Equal(imageHeight, tfInputShape.ElementAt(0)[1].dims[0]); 2074Assert.Equal(imageWidth, tfInputShape.ElementAt(0)[2].dims[0]);
Microsoft.ML.Tests (3)
Transformers\NormalizerTests.cs (3)
1087linqMedian = ((sortedNumbers.ElementAt(halfIndex) + 1088sortedNumbers.ElementAt((halfIndex - 1))) / 2); 1092linqMedian = sortedNumbers.ElementAt(halfIndex);
Microsoft.ML.TimeSeries (6)
PolynomialUtils.cs (6)
343var k1 = Math.Abs(factors.ElementAt(0).Key); 344var k2 = Math.Abs(factors.ElementAt(factors.Count - 1).Key); 349f1 = factors.ElementAt(0); 354f1 = factors.ElementAt(factors.Count - 1); 363var f2 = factors.ElementAt(ind); 384var coeff = factors.ElementAt(0).Coefficients;
System.Composition.TypedParts (2)
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (2)
145ConstructorInfo constructorInfo = genericPartTypeInfo.DeclaredConstructors.ElementAt(index); 157constructor = type.DeclaredConstructors.ElementAt(index);
System.Linq (4)
System\Linq\Concat.SpeedOpt.cs (2)
104return source.ElementAt(index); 285return source.ElementAt(index);
System\Linq\ElementAt.cs (2)
59return source.ElementAt(index.Value); 64return source.ElementAt(count - index.Value);
System.Linq.Parallel (1)
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (1)
142result = ExceptionAggregator.WrapEnumerable(childWithCancelChecks, cancelState).ElementAt(_index);
xunit.assert (2)
Sdk\Exceptions\EqualException.cs (2)
242 var expectedType = mismatchIndex < expectedEnumerable?.Count() ? expectedEnumerable.ElementAt(mismatchIndex)?.GetType().FullName : string.Empty; 243 var actualType = mismatchIndex < actualEnumerable?.Count() ? actualEnumerable.ElementAt(mismatchIndex)?.GetType().FullName : string.Empty;