463 references to Last
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\TraceTests.cs (1)
946var last = GetStringId(traces.PagedResult.Items.Last().TraceId);
Aspire.Hosting.Containers.Tests (2)
ContainerResourceBuilderTests.cs (2)
49Assert.Equal("new-image", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Last().Image); 50Assert.Equal("latest", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Last().Tag);
Aspire.Hosting.Tests (2)
Utils\WithAnnotationTests.cs (2)
21Assert.NotEqual(dummyAnnotations.First(), dummyAnnotations.Last()); 35Assert.NotEqual(dummyAnnotations.First(), dummyAnnotations.Last());
CSharpSyntaxGenerator (4)
SourceWriter.cs (4)
529WriteLine($"case SyntaxKind.{kind.Name}:{(kind == kinds.Last() ? " break;" : "")}"); 570WriteLine($"case SyntaxKind.{kind.Name}:{(kind == kinds.Last() ? " break;" : "")}"); 1438WriteLine($"case SyntaxKind.{kind.Name}:{(kind == kinds.Last() ? " break;" : "")}"); 1470WriteLine($"case SyntaxKind.{kind.Name}:{(kind == kinds.Last() ? " break;" : "")}");
dotnet-openapi (2)
Commands\BaseCommand.cs (2)
383if (uri.Segments.Any() && uri.Segments.Last() != "/") 385var lastSegment = uri.Segments.Last();
dotnet-svcutil-lib (6)
Shared\MSBuildProj.cs (6)
193var targetFramework = targetFrameworkElements.Last().Value.Trim(); 214var targetFrameworks = targetFrameworksElements.Last().Value; 248msbuildProj.RuntimeIdentifier = runtimeIdentifierElements.Last().Value.Trim(); 603element = existingElements.Last(); 660var targetFrameworkNode = targetFrameworkElements.Last(); 668var targetFrameworksNode = targetFrameworksElements.Last();
dotnet-svcutil-lib.Tests (2)
E2ETests.cs (2)
324var testCaseName = referenceFolderName.Replace(" ", "_").Split('/').Last(); 347var testCaseName = referenceFolderName.Replace(" ", "_").Split('/').Last();
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
539Assert.Equal("2", headerValues.Last());
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
539Assert.Equal("2", headerValues.Last());
illink (2)
Microsoft.AspNetCore.App.Analyzers (2)
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (2)
281index += charResults.Last().span.Length; 291index += charResults.Last().span.Length;
Microsoft.AspNetCore.Authorization.Test (1)
DefaultAuthorizationServiceTests.cs (1)
194var second = allowed.Failure.FailureReasons.Last();
Microsoft.AspNetCore.Components.Authorization.Tests (3)
AuthorizeViewTest.cs (1)
212var batch = renderer.Batches.Last();
CascadingAuthenticationStateTest.cs (2)
106var batch2 = renderer.Batches.Last(); 142var batch = renderer.Batches.Last();
Microsoft.AspNetCore.Components.Tests (25)
CascadingParameterStateTest.cs (18)
62var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 79var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 101var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 127var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 152var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 171var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 190var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 205var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 224var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 239var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 254var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 269var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 284var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 299var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 321var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 347var result = CascadingParameterState.FindCascadingParameters(states.Last(), out _); 371_ = CascadingParameterState.FindCascadingParameters(states.Last(), out var hasSingleDeliveryParameters); 387_ = CascadingParameterState.FindCascadingParameters(states.Last(), out var hasSingleDeliveryParameters);
RendererTest.cs (7)
2877var batch = renderer.Batches.Last(); 3098var latestBatch = renderer.Batches.Last(); 4406var latestBatch = renderer.Batches.Last(); 4771Assert.Contains(errorThrowingComponentId, renderer.Batches.Last().DisposedComponentIDs); 4813var batch = renderer.Batches.Last(); 5669Assert.True(logStream.Last() == (expectedId, NestedAsyncComponent.EventType.OnParametersSetAsyncSync) || 5670logStream.Last() == (expectedId, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync));
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
487existingParameters.Add(routeParameter.Value.DescriptorsPath.Last());
Microsoft.AspNetCore.Grpc.Swagger (2)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (1)
106var field = routeParameter.Value.DescriptorsPath.Last();
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
487existingParameters.Add(routeParameter.Value.DescriptorsPath.Last());
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
360var generatedSyntaxTree = compilation.SyntaxTrees.Last();
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
360var generatedSyntaxTree = compilation.SyntaxTrees.Last();
Microsoft.AspNetCore.Http.Results.Tests (22)
AcceptedAtRouteOfTResultTests.cs (1)
133var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
AcceptedAtRouteResultTests.cs (1)
87var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
AcceptedOfTResultTests.cs (1)
74var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
AcceptedResultTests.cs (1)
44var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
BadRequestOfTResultTests.cs (1)
117var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
BadRequestResultTests.cs (1)
57var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
ConflictOfTResultTests.cs (1)
95var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
ConflictResultTests.cs (1)
58var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
CreatedAtRouteOfTResultTests.cs (1)
103var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
CreatedAtRouteResultTests.cs (1)
85var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
CreatedOfTResultTests.cs (1)
109var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
CreatedResultTests.cs (1)
75var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
InternalServerErrorOfTResultTests.cs (1)
117var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
InternalServerErrorResultTests.cs (1)
57var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
NoContentResultTests.cs (1)
54var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
NotFoundOfTResultTests.cs (1)
77var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
NotFoundResultTests.cs (1)
53var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
OkOfTResultTests.cs (1)
94var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
OkResultTests.cs (1)
56var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
UnprocessableEntityOfTResultTests.cs (1)
94var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
UnprocessableEntityResultTests.cs (1)
57var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
ValidationProblemResultTests.cs (1)
105var producesResponseTypeMetadata = builder.Metadata.OfType<ProducesResponseTypeMetadata>().Last();
Microsoft.AspNetCore.Identity.FunctionalTests (2)
LoginTests.cs (1)
252var email = emailSender.SentEmails.Last();
MapIdentityApiTests.cs (1)
1410var receivedEmail = emailSender.Emails.Last();
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
Filters\FilterContextTest.cs (2)
47var result = context.IsEffectivePolicy((ITestFilterPolicy)filters.Last()); 89Assert.Same(filters.Last(), result);
Microsoft.AspNetCore.Mvc.Core.Test (2)
AcceptedAtActionResultTests.cs (1)
209var header = context.HttpContext.Response.Headers.Last();
ApplicationModels\ControllerActionDescriptorProviderTests.cs (1)
328var lastHttpMethodMetadata = descriptor.EndpointMetadata.OfType<IHttpMethodMetadata>().Last();
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
HasValidatorsValidationMetadataProviderIntegrationTest.cs (2)
27Assert.IsType<HasValidatorsValidationMetadataProvider>(options.Value.ModelMetadataDetailsProviders.Last()); 45Assert.IsType<HasValidatorsValidationMetadataProvider>(options.Value.ModelMetadataDetailsProviders.Last());
Microsoft.AspNetCore.OpenApi.Tests (2)
Services\OpenApiGeneratorTests.cs (2)
122Assert.Equal("application/custom1", request.Content.Last().Key); 138Assert.Equal("application/custom1", request.Content.Last().Key);
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Matching\TrivialMatcherBuilder.cs (1)
17return new TrivialMatcher(_endpoints.Last());
Microsoft.Build.CommandLine.UnitTests (1)
CommandLineSwitches_Tests.cs (1)
901Assert.Null(parameters.Last());
Microsoft.Build.Engine.OM.UnitTests (1)
Construction\ProjectRootElement_Tests.cs (1)
1769projectFileAssert.Invoke(initialLocation, reloadLocation, rootElement.AllChildren.Last().Location.File);
Microsoft.Build.Engine.UnitTests (7)
BackEnd\IntrinsicTask_Tests.cs (1)
3547Assert.Equal("def.obj", instance.GetItems("CppCompile").Last().GetMetadataValue("ObjectFile"));
Evaluation\ProjectSdkImplicitImport_Tests.cs (4)
211VerifyPropertyFromImplicitImport(project, "InitialImportProperty", Path.Combine(_testSdkRoot, sdkNames.Last(), "Sdk", "Sdk.props"), sdkNames.Last()); 212VerifyPropertyFromImplicitImport(project, "FinalImportProperty", Path.Combine(_testSdkRoot, sdkNames.Last(), "Sdk", "Sdk.targets"), sdkNames.Last());
Graph\ProjectGraph_Tests.cs (2)
607var entryPointNode2 = projectGraph.EntryPointNodes.Last(); 646var entryPointNode2 = projectGraph.EntryPointNodes.Last();
Microsoft.Build.Tasks.UnitTests (1)
ResourceManagement_Tests.cs (1)
155int.TryParse(messageComponents.Last(), out int trailingInteger).ShouldBeTrue();
Microsoft.Cci.Extensions (1)
Writers\CSharp\CSDeclarationWriter.Properties.cs (1)
58WriteAttributes(setter.Parameters.Last().Attributes);
Microsoft.CodeAnalysis (4)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
84? MetadataTypeName.FromFullName(fullyQualifiedMetadataName.Split(s_nestedTypeNameSeparators).Last())
src\Dependencies\Collections\ImmutableSegmentedListExtensions.cs (3)
69: Enumerable.Last(immutableList); 81: Enumerable.Last(builder); 98return Enumerable.Empty<T>().Last();
Microsoft.CodeAnalysis.CodeStyle (3)
src\Dependencies\Collections\ImmutableSegmentedListExtensions.cs (3)
69: Enumerable.Last(immutableList); 81: Enumerable.Last(builder); 98return Enumerable.Empty<T>().Last();
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
263var right = expression.ChildNodes().Last();
Microsoft.CodeAnalysis.Collections.Package (3)
ImmutableSegmentedListExtensions.cs (3)
69: Enumerable.Last(immutableList); 81: Enumerable.Last(builder); 98return Enumerable.Empty<T>().Last();
Microsoft.CodeAnalysis.CSharp (5)
Binder\DecisionDagBuilder.cs (2)
1113if (whenTruePossible && !whenTrueState.IsImpossible && !(whenTrueBuilder.Any() && whenTrueBuilder.Last().IsFullyMatched)) 1116if (whenFalsePossible && !whenFalseState.IsImpossible && !(whenFalseBuilder.Any() && whenFalseBuilder.Last().IsFullyMatched))
Declarations\DeclarationTreeBuilder.cs (1)
335name: fullName.Last(),
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
607var lastExpression = builder.Last();
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
569var last = sideEffects.Last();
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
72TextSpan.FromBounds(start, root.Members.OfType<GlobalStatementSyntax>().Last().FullSpan.End));
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
40var mainTypeName = mainTypeFullName?.Split('.').Last();
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
273return compilationUnit.Members.OfType<GlobalStatementSyntax>().Last().Statement;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
132if (tokenText.Length <= 2 || tokenText.Last() != '"') 141if (tokenText.Length <= 1 || tokenText.Last() != '"')
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
42var lastMember = members.Last();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\QueryExpressionSyntaxExtensions.cs (1)
45var selectOrGroup = (SelectOrGroupClauseSyntax)allClauses.Last();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (2)
224if (previousToken.Kind() == SyntaxKind.StringLiteralToken && previousToken.ToString().Last() != '"') 229if (previousToken.Kind() == SyntaxKind.CharacterLiteralToken && previousToken.ToString().Last() != '\'')
StringCopyPaste\KnownSourcePasteProcessor.cs (1)
338var hasNewLine = content.IsText && HasNewLine(lastContentSourceText!.Lines.Last());
StringCopyPaste\UnknownSourcePasteProcessor.cs (1)
221HasNewLine(textOfCurrentChange.Lines.Last());
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (9)
CommentSelection\CSharpCommentSelectionTests.cs (2)
158new VirtualSnapshotPoint(snapshot, spans.Last().End)); 159textView.Caret.MoveTo(new SnapshotPoint(snapshot, spans.Last().End));
Completion\ArgumentProviders\ArgumentProviderOrderTests.cs (2)
88Assert.Equal(orderedCSharpArgumentProviders.Last().Metadata.Name, Assert.Single(orderedCSharpArgumentProviders[i].Metadata.BeforeTyped)); 114var lastArgumentProvider = orderedCSharpArgumentProviders.Last();
Completion\CompletionProviders\CompletionProviderOrderTests.cs (2)
120Assert.Equal(orderedCSharpCompletionProviders.Last().Metadata.Name, Assert.Single(orderedCSharpCompletionProviders[i].Metadata.BeforeTyped)); 146var lastCompletionProvider = orderedCSharpCompletionProviders.Last();
Formatting\FormattingEngineTests.cs (1)
2223var newRoot = root.InsertNodesBefore(root.DescendantNodes().Last(), [entry]);
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (2)
84Assert.Equal(originalSelections.Last().Start, view.Caret.Position.BufferPosition.Position); 110Assert.Equal(originalSelections.Last().Start, view.Caret.Position.BufferPosition.Position);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (10)
CodeGen\CodeGenTupleEqualityTests.cs (9)
381var tupleY = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Last(); 1008var lastEquals = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Last(); 1311var lastTuple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<TupleExpressionSyntax>().Last(); 1594var lastLiteral = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Last(); 1707var addition = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Last(); 2582var secondEquals = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Last(); 2642var equals = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Last(); 4184var lastNull = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LiteralExpressionSyntax>().Last(); 4276var comparison = tree.GetRoot().DescendantNodes().OfType<BinaryExpressionSyntax>().Last();
CodeGen\ObjectAndCollectionInitializerTests.cs (1)
1107var node = tree.GetRoot().DescendantNodes().OfType<Syntax.ObjectCreationExpressionSyntax>().Last();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (12)
CodeGen\IndexAndRangeTests.cs (11)
2263var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 2678var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 2841var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 3019var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 3133var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 3304var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 3455var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 3641var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 3731var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 3817var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last(); 3890var node = tree.GetRoot().DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last();
Emit\EditAndContinue\EditAndContinueTests.cs (1)
32var currentGenerationReader = readers.Last();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (39)
Attributes\AttributeTests.cs (10)
707var attrSyntax = root.DescendantNodes().OfType<AttributeSyntax>().Last(); 710var m0 = semanticModel.GetDeclaredSymbol(root.DescendantNodes().OfType<MethodDeclarationSyntax>().Last()); 748var attrSyntax = root.DescendantNodes().OfType<AttributeSyntax>().Last(); 752var newAttrSyntax = newRoot.DescendantNodes().OfType<AttributeSyntax>().Last(); 812var attrSyntax = root.DescendantNodes().OfType<AttributeSyntax>().Last(); 817var newAttrSyntax = newRoot.DescendantNodes().OfType<AttributeSyntax>().Last(); 854var attrSyntax = root.DescendantNodes().OfType<AttributeSyntax>().Last(); 858var newAttrSyntax = newRoot.DescendantNodes().OfType<AttributeSyntax>().Last(); 895var attrSyntax = root.DescendantNodes().OfType<AttributeSyntax>().Last(); 899var newAttrSyntax = newRoot.DescendantNodes().OfType<AttributeSyntax>().Last();
Attributes\AttributeTests_Nullable.cs (1)
152var interfaceImpl2 = reader.GetInterfaceImplementation(interfaceHandles.Last());
FlowAnalysis\FlowTestBase.cs (1)
224return GetSyntaxNodeList(tree).OfType<T>().Where(n => n.Span.Contains(offset)).Last();
FlowAnalysis\RegionAnalysisTests.cs (1)
14252var decl = tree.GetRoot().DescendantNodes().OfType<ExpressionStatementSyntax>().Last();
Semantics\CollectionExpressionTests.cs (10)
14234var returnValue = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Last().Expression; 14310var returnValue = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Last().Expression; 14446var cast = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Last().Expression; 14451var value = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Last().Expression; 14570var cast = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Last().Expression; 14575var value = tree.GetRoot().DescendantNodes().OfType<CastExpressionSyntax>().Last().Expression; 14653var nestedCollection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Last(); 14742var nestedCollection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Last(); 28879var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Last(); 29292var collection = tree.GetRoot().DescendantNodes().OfType<CollectionExpressionSyntax>().Last();
Semantics\InlineArrayTests.cs (4)
6199var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").Last(); 8118var f = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Last().Left; 10547var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").Last(); 11291var f = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(m => m.Identifier.ValueText == "F").Last();
Semantics\OutVarTests.cs (5)
14674var yRef = GetReferences(tree, "y1").Last(); 14733var yRef = GetReferences(tree, "y1").Last(); 19944var yRef = GetReferences(tree, "y").Last(); 19979var yRef = GetReferences(tree, "y").Last(); 36323var node = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "Test3").Last();
Semantics\PrimaryConstructorTests.cs (5)
1220var equalsValue = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Last(); 20655var typeDeclaration2 = root.ChildNodes().OfType<TypeDeclarationSyntax>().Last(); 20699var typeDeclaration2 = root.ChildNodes().OfType<TypeDeclarationSyntax>().Last(); 20744var typeDeclaration2 = root.ChildNodes().OfType<TypeDeclarationSyntax>().Last(); 20796var typeDeclaration2 = root.ChildNodes().OfType<TypeDeclarationSyntax>().Last();
Semantics\RecordTests.cs (2)
2489var x = tree.GetRoot().DescendantNodes().OfType<AssignmentExpressionSyntax>().Last().Left; 21339var equalsValue = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Last();
Microsoft.CodeAnalysis.CSharp.Features (9)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
432=> expression.AncestorsAndSelf().OfType<ExpressionSyntax>().Last();
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (2)
88current = array.Last(); 300var lastNonLocalFunctionStatement = statementsOnBlockWithForEach.Last();
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
178sourceNode = updatedRoot.GetAnnotatedNodesAndTokens(sourceNodeAnnotation).Last().AsNode();
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
72TextSpan.FromBounds(start, root.Members.OfType<GlobalStatementSyntax>().Last().FullSpan.End));
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
40var mainTypeName = mainTypeFullName?.Split('.').Last();
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
273return compilationUnit.Members.OfType<GlobalStatementSyntax>().Last().Statement;
Structure\CSharpStructureHelpers.cs (1)
448var (end, hintEnd) = GetCollapsibleEnd(syntaxList.Last().GetLastToken(), compressEmptyLines);
Wrapping\SeparatedSyntaxList\CSharpParameterWrapper.cs (1)
64? attributes.Last().GetLastToken().GetNextToken()
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests.cs (1)
711var fieldInitializer = tree.GetRoot().DescendantNodes().OfType<EqualsValueClauseSyntax>().Last().Value;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (53)
Semantics\DelegateTypeTests.cs (13)
2082var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2147var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2209var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2268var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2317var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2399var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2451var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "C.M").Last(); 2492var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2540var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2592var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last(); 2638var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M<int, int>").Last(); 2686var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M<int, int>").Last(); 2733var memberAccess = GetSyntaxes<MemberAccessExpressionSyntax>(tree, "new C().M").Last();
Semantics\FunctionPointerTests.cs (1)
205var initializer2 = tree.GetRoot().DescendantNodes().OfType<VariableDeclaratorSyntax>().Last().Initializer!.Value;
Semantics\InterceptorsTests.cs (8)
2286var invocation = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 3543var interceptableName = sourceTree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last().GetInterceptableNameSyntax()!; 8023var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 8082var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 8142var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 8197var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 8252var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 8302var node = source.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last();
Semantics\LambdaTests.cs (3)
860expr = exprs.Last(); 1038.Last(); 1092.Last();
Semantics\NameOfTests.cs (1)
3044var lastGeneric = root.DescendantNodes().OfType<GenericNameSyntax>().Last();
Semantics\NullableReferenceTypesTests.cs (7)
4530var lastCref = tree.GetRoot().DescendantNodes(descendIntoTrivia: true).OfType<NameMemberCrefSyntax>().Last(); 4562var lastCref = tree.GetRoot().DescendantNodes(descendIntoTrivia: true).OfType<NameMemberCrefSyntax>().Last(); 4594var lastCref = tree.GetRoot().DescendantNodes(descendIntoTrivia: true).OfType<NameMemberCrefSyntax>().Last(); 56591var invocationNode2 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 56619var lambdaNode = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Last(); 65890var function1 = tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Last(); 156750var invocationNode2 = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last();
Semantics\ObjectAndCollectionInitializerTests.cs (1)
3785var objectCreation = root.DescendantNodes().OfType<ObjectCreationExpressionSyntax>().Last();
Semantics\OperatorTests.cs (3)
7056var syntax = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 7211var syntax = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 7330var methodBody = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Last().Body;
Semantics\OverloadResolutionPerfTests.cs (1)
982var expr = tree.GetCompilationUnitRoot().DescendantNodes().OfType<Syntax.InvocationExpressionSyntax>().Last();
Semantics\RefFieldTests.cs (1)
16775var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Last();
Semantics\TypeOfTests.cs (1)
33var node = (ObjectCreationExpressionSyntax)tree.GetRoot().DescendantNodes().Where(n => n.ToString() == "new C(0)").Last();
Semantics\UnsafeTests.cs (1)
7535var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<PrefixUnaryExpressionSyntax>().Last();
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (2)
276step => Assert.True(step.Outputs.Single().Value is CompilationUnitSyntax c && c.SyntaxTree == compilation.SyntaxTrees.Last())); 305step => Assert.True(step.Outputs.Single().Value is CompilationUnitSyntax c && c.SyntaxTree == compilation.SyntaxTrees.Last()));
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.cs (7)
1106driver = driver.RunGenerators(compilation.RemoveSyntaxTrees(compilation.SyntaxTrees.Last())); 1159compilation.SyntaxTrees.Last(), 1160compilation.SyntaxTrees.Last().WithChangedText(SourceText.From(""" 1209compilation.SyntaxTrees.Last(), 1210compilation.SyntaxTrees.Last().WithChangedText(SourceText.From(""" 1632compilation.SyntaxTrees.Last(), 1633compilation.SyntaxTrees.Last().WithChangedText(SourceText.From("""
SourceGeneration\SyntaxAwareGeneratorTests.cs (3)
1122compilation = compilation.RemoveSyntaxTrees(compilation.SyntaxTrees.Last()); 1190compilation = compilation.RemoveSyntaxTrees(compilation.SyntaxTrees.Last()); 1427var lastTree = compilation.SyntaxTrees.Last();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (43)
Compilation\CompilationAPITests.cs (1)
1904Assert.Equal("alias", comp.References.Last().Properties.Aliases.Single());
Compilation\GetSemanticInfoTests.cs (4)
598var expr2 = exprs.Last(); 4110var localDecl2 = localDecls.Last(); 4165var localDecl2 = localDecls.Last(); 4400var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParameterSyntax>().Last();
Compilation\SemanticModelAPITests.cs (6)
202var rx = root.DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 234var rx = root.DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 872var pType02 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ClassDeclarationSyntax>().Last(); 881var pMethod02 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Last(); 899var pParam02 = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParameterSyntax>().Last(); 1203var argsym2 = model.GetSymbolInfo(args.Last().Expression).Symbol;
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
3866var node = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "Alias").Last().Parent; 4768var interfaceDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<InterfaceDeclarationSyntax>().Last();
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
14484var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<OmittedArraySizeExpressionSyntax>().Last();
Compilation\UsedAssembliesTests.cs (1)
666Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp3).GetAssemblyOrModuleSymbol(references.Last()));
DocumentationComments\CrefTests.cs (2)
6046var typeParameterSyntax = crefSyntax.DescendantNodes().OfType<IdentifierNameSyntax>().Last(); 6070var methodNameSyntax = crefSyntax.DescendantNodes().OfType<IdentifierNameSyntax>().Last();
Symbols\CovariantReturnTests.cs (2)
4024var lastReference = compilation.GetAssemblyOrModuleSymbol(compilation.References.Last()); 4262var lastReference = compilation.GetAssemblyOrModuleSymbol(compilation.References.Last());
Symbols\Metadata\PE\LoadingMethods.cs (6)
451var interfaceMethod = (MethodSymbol)@interface.GetMembers("Method").Last(); //this assumes decl order 460var substitutedInterfaceMethod = (MethodSymbol)substitutedInterface.GetMembers("Method").Last(); //this assumes decl order 464var classMethod = (MethodSymbol)@class.GetMembers("IGeneric<S>.Method").Last(); //this assumes decl order 487var interfaceMethod = (MethodSymbol)@interface.GetMembers("Method").Last(); //this assumes decl order 496var substitutedInterfaceMethod = (MethodSymbol)substitutedInterface.GetMembers("Method").Last(); //this assumes decl order 500var classMethod = (MethodSymbol)@class.GetMembers("IGeneric<System.Int32>.Method").Last(); //this assumes decl order
Symbols\Metadata\PE\TypeForwarders.cs (1)
1804Assert.Equal(expectedType.Split('+').Last(), reader.GetString(exportedTypeRow.Name)); //Only the actual type name.
Symbols\Source\FileModifierTests.cs (12)
1233var cReference = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Last().Expression; 1367var cReference = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Last().Expression; 1433var cReference = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Last().Expression; 1491var cReference = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Last().Expression; 1805var cReference = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Last(); 1880var cReference = tree.GetRoot().DescendantNodes().OfType<MemberAccessExpressionSyntax>().Last(); 2600var node = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 2639var node = tree.GetRoot().DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 3641var body = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Last().Body!; 3711var body = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Last().Body!; 3773var body = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Last().Body!; 3814var body = tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Last().Body!;
Symbols\Source\LocalTests.cs (1)
60OfType<VisualBasic.Syntax.IdentifierNameSyntax>().Last();
Symbols\Source\MethodTests.cs (1)
264var node = tree.GetRoot().DescendantNodes().OfType<PredefinedTypeSyntax>().Where(n => n.Keyword.Kind() == SyntaxKind.VoidKeyword).Last();
Symbols\Source\NullablePublicAPITests.cs (3)
1096var invocation = root.DescendantNodes().OfType<InvocationExpressionSyntax>().Last(); 4053var o1Ref = root.DescendantNodes().OfType<AttributeArgumentSyntax>().Last().Expression; 4056var o2Ref = root.DescendantNodes().OfType<ParameterSyntax>().Last().Default.Value;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxNodeTests.cs (1)
750var classDecl2 = (TypeDeclarationSyntax)root.ChildNodes().Last();
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (1)
117.Last();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
132if (tokenText.Length <= 2 || tokenText.Last() != '"') 141if (tokenText.Length <= 1 || tokenText.Last() != '"')
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
42var lastMember = members.Last();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\QueryExpressionSyntaxExtensions.cs (1)
45var selectOrGroup = (SelectOrGroupClauseSyntax)allClauses.Last();
Microsoft.CodeAnalysis.EditorFeatures (10)
Classification\CopyPasteAndPrintingClassificationBufferTaggerProvider.Tagger.cs (1)
121var spanToTag = new SnapshotSpan(snapshot, Span.FromBounds(spans.First().Start, spans.Last().End));
CommentSelection\AbstractToggleBlockCommentBase.cs (1)
97var lastLineAroundSelection = selectedSpans.Last().End.GetContainingLine().End;
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
246var boundingIntersectionSpan = Span.FromBounds(intersectionSpans.First().Start, intersectionSpans.Last().End);
Preview\AbstractPreviewFactoryService.cs (1)
775var lastLineSpan = lineSpans.Last();
Shared\Extensions\IProjectionBufferFactoryServiceExtensions.cs (5)
272if (snapshotSpan != snapshotSpanRange.Last()) 279if (snapshotSpanRange != snapshotSpanRanges.Last()) 287if (snapshot.GetLineNumberFromPosition(snapshotSpanRanges.Last().Last().End) < snapshot.LineCount - 1) 298if (!separator.Equals(spans.Last()))
Shared\Extensions\ITextViewExtensions.cs (1)
108textView.GetMultiSelectionBroker().SetSelectionRange(spansInView, spansInView.Last());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
CommentSelection\AbstractToggleCommentTestBase.cs (2)
92new VirtualSnapshotPoint(snapshot, spans.Last().End)); 93textView.Caret.MoveTo(new SnapshotPoint(snapshot, spans.Last().End));
CompleteStatement\AbstractCompleteStatementTests.cs (1)
104var startCaretPosition = testDocument.CursorPosition ?? testDocument.SelectedSpans.Last().End;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CommentSelection\CommentUncommentSelectionCommandHandlerTests.cs (2)
808new VirtualSnapshotPoint(snapshot, spans.Last().End)); 809textView.Caret.MoveTo(new SnapshotPoint(snapshot, spans.Last().End));
TextEditor\OpenDocumentTests.cs (2)
52Assert.Equal(documentIds.Last(), workspace.CurrentSolution.GetDocument(documentIds.First()).GetLinkedDocumentIds().Single()); 53Assert.Equal(documentIds.First(), workspace.CurrentSolution.GetDocument(documentIds.Last()).GetLinkedDocumentIds().Single());
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
InlineRename\UI\Dashboard\RenameDashboard.xaml.cs (1)
167=> FocusElement(_tabNavigableChildren.Last(), i => i == 0 ? _tabNavigableChildren.Count - 1 : i - 1);
SignatureHelp\Controller.Session_UpdateModel.cs (1)
110var lastItem = filteredItems.Last();
Microsoft.CodeAnalysis.Features (5)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
191Debug.Assert(textChanges.Last().Span.IntersectsWith(insertSpan.End));
Debugging\AbstractBreakpointResolver.cs (1)
206var lastName = names.Last();
MoveStaticMembers\MoveStaticMembersOptions.cs (1)
64TypeName = namespacesAndType.Last();
SignatureHelp\CommonSignatureHelpUtilities.cs (1)
97nextToken = argumentList.AncestorsAndSelf().Last().GetLastToken(includeZeroWidth: true);
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
263var right = expression.ChildNodes().Last();
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
DeterministicKeyBuilderTests.cs (1)
107var lastName = sectionName.Split('.').Last();
Microsoft.CodeAnalysis.UnitTests (2)
Collections\ImmutableListTestBase.cs (1)
452for (int value = basis.First() - 1; value <= basis.Last() + 1; value++)
Diagnostics\OperationTests.cs (1)
277var methodBodySyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<BaseMethodDeclarationSyntax>().Last();
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (1)
2864node = nodes.Last()
Microsoft.CodeAnalysis.Workspaces (4)
LinkedFileDiffMerging\AbstractLinkedFileMergeConflictCommentAdditionService.cs (1)
69var endPosition = changePartition.Last().Span.End;
src\Dependencies\Collections\ImmutableSegmentedListExtensions.cs (3)
69: Enumerable.Last(immutableList); 81: Enumerable.Last(builder); 98return Enumerable.Empty<T>().Last();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\Dependencies\Collections\ImmutableSegmentedListExtensions.cs (3)
69: Enumerable.Last(immutableList); 81: Enumerable.Last(builder); 98return Enumerable.Empty<T>().Last();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
SolutionGeneration.cs (1)
279var importTargets = document.Root.Elements().Last();
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
CodeCleanup\CodeCleanupTests.cs (3)
302var accessor = root.DescendantNodes().OfType<VisualBasic.Syntax.AccessorBlockSyntax>().Last(); 309var newAccessor = newRoot.DescendantNodes().OfType<VisualBasic.Syntax.AccessorBlockSyntax>().Last(); 312accessor = root.DescendantNodes().OfType<VisualBasic.Syntax.AccessorBlockSyntax>().Last();
SolutionTests\SolutionTests.cs (6)
432var documentId2 = solution.Projects.Last().DocumentIds.Single(); 520var documentId2 = solution.Projects.Last().DocumentIds.Single(); 599var documentId2 = solution.Projects.Last().DocumentIds.Single(); 685var documentId2 = solution.Projects.Last().DocumentIds.Single(); 762var documentId2 = solution.Projects.Last().DocumentIds.Single(); 850var documentId2 = solution.Projects.Last().DocumentIds.Single();
UtilityTest\IntervalTreeTests.cs (1)
256var tree = CreateTrees(Tuple.Create(0, 0, "A")).Last();
Microsoft.DotNet.Build.Tasks.Packaging (1)
ApplyBaseLine.cs (1)
87dependencyBaseLineVersions.Last() :
Microsoft.DotNet.Build.Tasks.Workloads (1)
WorkloadPackGroupPackage.wix.cs (1)
37var manifestPackage = ManifestsPerPlatform.First().Value.OrderBy(m => m.Version).Last();
Microsoft.DotNet.Helix.Sdk.Tests (4)
CreateXHarnessAndroidWorkItemsTests.cs (2)
116var workItem = _task.WorkItems.Last(); 147var workItem1 = _task.WorkItems.Last();
CreateXHarnessAppleWorkItemsTests.cs (2)
126var workItem = _task.WorkItems.Last(); 199var workItem2 = _task.WorkItems.Last();
Microsoft.DotNet.SignCheckLibrary (1)
Verification\Jar\JarError.cs (1)
30return _errors.Last();
Microsoft.DotNet.SourceBuild.Tasks (2)
src\WriteBuildOutputProps.cs (2)
63.Select(g => g.OrderBy(id => id.Version).Last()) 72Version = new DirectoryInfo(Directory.EnumerateDirectories(dir).OrderBy(s => s).Last()).Name
Microsoft.DotNet.VersionTools (2)
Automation\VstsApi\VstsAdapterClient.cs (1)
243return prs.OrderBy(pr => pr.Number).Last();
Dependencies\Submodule\SubmoduleDependencyInfo.cs (1)
95public string SimpleName => Repository.Split('/').Last();
Microsoft.DotNet.XliffTasks (1)
Model\XamlRuleDocument.cs (1)
215return localName.Contains('.') ? localName.Split('.').Last() : localName;
Microsoft.DotNet.XUnitAssert.Tests (1)
Sdk\ArgumentFormatterTests.cs (1)
548 var parameterTValue = genericTypeParameters.Last();
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
516return chatContents.Last().Text == "Hello"
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
CircularBufferTests.cs (1)
44Assert.Equal(expectedBufferElements.Last(), lastElement);
ResourceMonitoringBuilderTests.cs (1)
52Assert.IsAssignableFrom<AnotherPublisher>(publishersArray.Last());
Microsoft.Extensions.Diagnostics.Testing.Tests (8)
Metrics\MetricCollectorTests.cs (8)
64Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 74Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 109Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 119Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 156Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 166Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 217Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement); 227Assert.Same(collector.GetMeasurementSnapshot().Last(), collector.LastMeasurement);
Microsoft.Extensions.Http (1)
DependencyInjection\DefaultHttpClientBuilderServiceCollection.cs (1)
53_tracker.InsertDefaultsAfterDescriptor ??= _services.Last();
Microsoft.Extensions.Http.Resilience.Tests (1)
Helpers\OptionsUtilities.cs (1)
57propertyGroup => propertyGroup.Last().GetValue(options)!);
Microsoft.Maui.Controls.BindingSourceGen (3)
BindingTransformer.cs (1)
23 var previousPartIsReferenceType = newPath.Count > 0 && PreviousPartIsReferenceType(newPath.Last());
Setter.cs (2)
47 accessAccumulator = AccessExpressionBuilder.ExtendExpression(accessAccumulator, part, bindingId, part == path.Last()); 53 AssignmentStatement: BuildAssignmentStatement(accessAccumulator, path.Any() ? path.Last() : null, bindingId, assignedValueExpression));
Microsoft.Maui.Controls.Build.Tasks (6)
SetPropertiesVisitor.cs (6)
882 if (!properties.Any() || properties.Last().property == null || properties.Last().property.SetMethod == null) 888 var setterRef = module.ImportReference(properties.Last().property.SetMethod); 889 setterRef = module.ImportReference(setterRef.ResolveGenericParameters(properties.Last().propDeclTypeRef, module)); 908 (PropertyDefinition lastProperty, TypeReference lastPropDeclTypeRef, string lastIndexArg) = properties.Last(); 946 if (properties.Last().property.SetMethod.IsVirtual)
Microsoft.ML.AutoML (2)
AutoMLExperiment\AutoMLExperiment.cs (1)
224var mostRecentAddedStopServices = stopServices.GroupBy(s => s.GetType()).Select(g => g.Last()).ToList();
Experiment\Experiment.cs (1)
191throw new InvalidOperationException($"Training failed with the exception: {_history.Last().Exception}");
Microsoft.ML.AutoML.Samples (1)
Cifar10.cs (1)
23Label = p.Split("\\").SkipLast(1).Last(),
Microsoft.ML.AutoML.Tests (6)
AutoFitTests.cs (4)
459Assert.True(bestRun.ValidationMetrics.NormalizedDiscountedCumulativeGains.Last() > 0.4); 460Assert.True(bestRun.ValidationMetrics.DiscountedCumulativeGains.Last() > 19); 660if (experiment.RunDetails.Select(r => r.Exception == null).Count() > 1 && experiment.RunDetails.Last().Exception != null) 663var lastException = experiment.RunDetails.Last().Exception;
DatasetUtil.cs (1)
224.Last()
TunerTests.cs (1)
136var lastResult = history.Last();
Microsoft.ML.Data (3)
DataLoadSave\EstimatorChain.cs (1)
115if (_needCacheAfter.Last())
DataLoadSave\TransformerChain.cs (1)
116LastTransformer = transformers.Last() as TLastTransformer;
Evaluators\AnomalyDetectionEvaluator.cs (1)
263thresholdAtNumPos = sorted.Take((int)NumAnomalies).Last().Score;
Microsoft.ML.FastTree (9)
FastTree.cs (2)
686ch.Assert(Ensemble.Trees.Last() == tree); 687Ensemble.Trees.Last()
FastTreeRanking.cs (1)
680_maxSigmoid = _sigmoidTable.Last();
FastTreeRegression.cs (2)
392trainRegression = _trainRegressionTest.ComputeTests().Last().FinalValue; 394validRegression = _testRegressionTest.ComputeTests().Last().FinalValue;
FastTreeTweedie.cs (2)
328trainRegression = _trainRegressionTest.ComputeTests().Last().FinalValue; 330validRegression = _testRegressionTest.ComputeTests().Last().FinalValue;
Training\Test.cs (1)
322(_toleratedQueue.Count == 0 || _currentWindowSum > _toleratedQueue.Last().Sum))
TreeEnsemble\InternalRegressionTree.cs (1)
217CategoricalSplitFeatureRanges[i][1] = CategoricalSplitFeatures[i].Last();
Microsoft.ML.PerformanceTests (2)
ImageClassificationBench.cs (2)
154destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 193.Last()
Microsoft.ML.Samples (9)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
258destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 292.Last()
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
290destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 324.Last()
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (2)
246destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 280.Last()
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
267destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 301.Last()
Dynamic\Transforms\ApplyONNXModelWithInMemoryImages.cs (1)
66var lastClassProb = dataPoint.Scores.Last();
Microsoft.ML.Samples.GPU (8)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
258destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 292.Last()
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
290destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 324.Last()
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (2)
246destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 280.Last()
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
267destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 301.Last()
Microsoft.ML.TensorFlow.Tests (2)
TensorflowTests.cs (2)
1976destFileName = url.Split(Path.DirectorySeparatorChar).Last(); 2005.Last()
Microsoft.ML.Tests (6)
ImagesTests.cs (3)
1028using (var image = (MLImage)rowView.First().Values.Last().Value) 1189var resizedImage = (MLImage)rowView.First().Values.Last().Value; 1210int i = dataObjects.Last().LoadedImage.Height;
TrainerEstimators\MatrixFactorizationTests.cs (2)
686var lastElement = results.Last(); 704lastElement = topColumns.Last();
Transformers\HashTests.cs (1)
406Assert.Equal((uint)0, aHashed.Last());
Microsoft.ML.TorchSharp (3)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
262var destFileName = ModelUrl.Split('/').Last();
Roberta\QATrainer.cs (1)
246var destFileName = ModelUrl.Split('/').Last();
TorchSharpBaseTrainer.cs (1)
172var destFileName = modelUrl.Split('/').Last();
Microsoft.VisualStudio.LanguageServices (4)
GenerateType\GenerateTypeDialogViewModel.cs (1)
331_fileName = containers.Last();
InlineRename\InlineRenameUndoManager.cs (1)
139this.UndoManagers[subjectBuffer].ConflictResolutionRenameUndoPrimitive = GetUndoUnits(undoManager).Last();
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
64var typeName = viewModel.DestinationName.FullyQualifiedTypeName.Split('.').Last();
ValueTracking\TreeViewItemBase.cs (1)
86var lastChild = ChildItems.Last();
Roslyn.VisualStudio.Next.UnitTests (3)
Services\SolutionServiceTests.cs (3)
1041var document2 = project1.Documents.Last(); 1080var document2 = project1.Documents.Last(); 1208var document2 = project1.Documents.Last();
RunTests (1)
ProcessTestExecutor.cs (1)
99var vsTestConsolePath = Directory.EnumerateFiles(sdkDir, "vstest.console.dll", SearchOption.AllDirectories).Last();
Shared (1)
JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (1)
217CheckNullabilityAttributes(nullability, setter.GetParameters().Last().GetCustomAttributesData());
System.Collections.Immutable (2)
System\Linq\ImmutableArrayExtensions.cs (2)
401: Enumerable.Last(immutableArray.array!); 421return Enumerable.Empty<T>().Last();
System.Linq.Parallel (1)
System\Linq\ParallelEnumerable.cs (1)
5587return ExceptionAggregator.WrapEnumerable(childWithCancelChecks, settings.CancellationState).Last();
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
402if (type == node.Expressions.Last().Type)
System.Windows.Forms.Tests (6)
System\Windows\Forms\ControlTests.ControlCollection.cs (5)
42Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 117Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 195Assert.Same(collection2.Cast<Control>().Last(), e.AffectedControl); 231Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl); 3440Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl);
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (1)
36Assert.Same(collection.Cast<Control>().Last(), e.AffectedControl);