78 references to Last
ILLink.RoslynAnalyzer (1)
DataFlow\ControlFlowGraphExtensions.cs (1)
24 var lastBlock = cfg.Blocks.Last ();
Microsoft.CodeAnalysis (2)
Operations\ControlFlowBranch.cs (1)
149builder.Add(leavingRegions[i + 1].NestedRegions.Last());
Operations\ControlFlowGraph.cs (1)
44Debug.Assert(blocks.Last().Kind == BasicBlockKind.Exit);
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
133!(statements.Last() is IReturnOperation { ReturnedValue: { } returnedValue }))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ControlFlowGraphExtensions.cs (1)
22var lastBlock = cfg.Blocks.Last();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
205var typeArgument = typeArguments.Single().ToDisplayParts().Last().ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
164var span = TextSpan.FromBounds(nodes.First().Span.Start, nodes.Last().Span.End);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
1087(signature1Parameters.Length > 0 && !signature1Parameters.Last().IsParams));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
88var lastCase = cases.Last();
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Invocation.cs (2)
681!candidate.Member.GetParameters().Last().Type.IsSZArray()) 926argumentSyntax, singleCandidate.Parameters.Last().Name, singleCandidate.Name);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1277parameters = parameters.Add(property.SetMethod.Parameters.Last());
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1301ParameterSymbol final = member.GetParameters().Last();
FlowAnalysis\ControlFlowPass.cs (1)
379var syntax = node.SwitchLabels.Last().Syntax;
Lowering\InitializerRewriter.cs (1)
45(initializer == boundInitializers.Last()) &&
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
64var returnField = fields.Last();
Symbols\MemberSymbolExtensions.cs (1)
27return !@params.IsEmpty && @params.Last().IsParams;
Symbols\Source\SourceMemberContainerSymbol.cs (4)
1175position < group.Last().Syntax.Span.End) 2998Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i - 1].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0); 3003Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i + 1].Last().Syntax, compilation)) < 0); 3008Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0);
Symbols\SymbolExtensions.cs (1)
453if (property.GetOwnOrInheritedSetMethod()?.Parameters.Last().FlowAnalysisAnnotations is { } setterAnnotations)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
134var span = TextSpan.FromBounds(section[0].FullSpan.Start, section.Last().FullSpan.End);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
73conditionalDirectives.Last().Span.End >= block.CloseBraceToken.Span.End) 79if (conditionalDirectives.Last().Span.End <= statement.Span.Start)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
574!textSpan.Contains(directives.Last().SpanStart))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
StringCopyPaste\StringCopyPasteHelpers.cs (2)
554if (spans.Last().Length > 0 && text[spans.Last().End - 1] == '"')
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
100Assert.Equal(expectedSpans.Last().Start, view.Caret.Position.BufferPosition.Position);
SymbolKey\SymbolKeyCompilationsTests.cs (2)
553ResolveAndVerifySymbol(newSymbols.Last(), originalSymbols.Last(), comp1, SymbolKeyComparison.None);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
14348m6Tuple = m6Method.Parameters.Last().Type;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
8511var diag = diags.Last();
FlowAnalysis\RegionAnalysisTests.cs (1)
3334var longsym = analysis.VariablesDeclared.Last() as ILocalSymbol;
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
134var span = TextSpan.FromBounds(section[0].FullSpan.Start, section.Last().FullSpan.End);
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
33=> !parameters.Last().IsParams || parameters.Length >= argumentCount;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\TargetTypedDefaultTests.cs (1)
3340var tree = comp.SyntaxTrees.Last();
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.cs (3)
193Assert.True(step.Outputs.Last().Value is ClassDeclarationSyntax { Identifier.ValueText: "D" }); 257Assert.True(step.Outputs.Last().Value is ClassDeclarationSyntax { Identifier.ValueText: "D" }); 291Assert.True(step.Outputs.Last().Value is ClassDeclarationSyntax { Identifier.ValueText: "D" });
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Compilation\GetSemanticInfoTests.cs (2)
1818Assert.Equal(TypeKind.Array, candidate.Parameters.Last().Type.TypeKind); 1819Assert.Equal(TypeKind.TypeParameter, ((IMethodSymbol)candidate.OriginalDefinition).Parameters.Last().Type.TypeKind);
Compilation\LoadDirectiveTests.cs (3)
80var external1 = compilation.SyntaxTrees.Last(); 163compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.Last(), newTree); 183compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.Last(), newTree);
Symbols\CustomModifiersTests.cs (1)
143Assert.Equal("System.Runtime.CompilerServices.IsLong", modifiers.Last().Modifier.ToTestDisplayString());
Symbols\MethodEqualityTests.cs (2)
85var baseClassMethod2 = (MethodSymbol)baseClass.GetMembers("Method").Last(); 145var baseClassMethod2 = (MethodSymbol)baseClass.GetMembers("Method").Last();
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
73conditionalDirectives.Last().Span.End >= block.CloseBraceToken.Span.End) 79if (conditionalDirectives.Last().Span.End <= statement.Span.Start)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
574!textSpan.Contains(directives.Last().SpanStart))
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SymbolEditorTests.cs (4)
356var location = symbol.Locations.Last(); 434var location = symbol.Locations.Last(); 480var location = symbol.Locations.Last(); 487var newLocation = newSymbol.Locations.Last();
Microsoft.CodeAnalysis.EditorFeatures (2)
CommentSelection\AbstractToggleBlockCommentBase.cs (1)
153var trackingSpan = TextSpan.FromBounds(intersectingBlockComments.First().Start, intersectingBlockComments.Last().End);
CommentSelection\ToggleLineCommentCommandHandler.cs (1)
142var indentation = DetermineSmallestIndent(selectedSpan, linesInSelection.First(), linesInSelection.Last());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
AbstractCommandHandlerTestState.cs (1)
88var lastSpan = selectionSpanList.Last();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
InlineHints\InlineHintsTag.cs (1)
229var last = taggedTexts.Last();
Microsoft.CodeAnalysis.Features (8)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (1)
144=> parameters.Length == 0 || !parameters.Last().IsOptional;
ChangeSignature\AbstractChangeSignatureService.cs (1)
1062var toType = methodSymbol.Parameters.Last().Type;
Completion\Utilities.cs (1)
31var totalOldSpan = TextSpan.FromBounds(changes.First().Span.Start, changes.Last().Span.End);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
46var lastNode = sections.Last().SyntaxToRemove;
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
132.WithTrailingTrivia(pieces.Last().GetTrailingTrivia());
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
133!(statements.Last() is IReturnOperation { ReturnedValue: { } returnedValue }))
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
88var lastCase = cases.Last();
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (1)
160_chunks[i - 1].Last(), _newlineBeforeOperatorTrivia,
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\InlayHint\InlayHintHandler.cs (1)
137var last = taggedTexts.Last();
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\AggregatedMetadataReader.cs (1)
30Last = Readers.Last();
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\GetImportScopesTests.vb (1)
414Assert.True(TypeOf scopes.Single().XmlNamespaces.Last().DeclaringSyntaxReference.GetSyntax() Is XmlNamespaceImportsClauseSyntax)
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ControlFlowGraphExtensions.cs (1)
22var lastBlock = cfg.Blocks.Last();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
205var typeArgument = typeArguments.Single().ToDisplayParts().Last().ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
164var span = TextSpan.FromBounds(nodes.First().Span.Start, nodes.Last().Span.End);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
1087(signature1Parameters.Length > 0 && !signature1Parameters.Last().IsParams));
Microsoft.Interop.SourceGeneration (4)
ArrayMarshallingInfoProvider.cs (2)
70arrayMarshaller.TypeArguments.Last()); 79ManagedTypeInfo.CreateTypeInfoForTypeSymbol(arrayMarshaller.TypeParameters.Last()));
CustomMarshallingInfoHelper.cs (2)
56entryPointType.TypeArguments.Last()); 85ManagedTypeInfo.CreateTypeInfoForTypeSymbol(entryPointType.TypeParameters.Last()));