11 references to ElementAtOrDefault
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
113
var elementType = parameters.
ElementAtOrDefault
(0);
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpSemanticModel.cs (1)
5158
return (GetSymbolInfo(tupleTypeSyntax, cancellationToken).Symbol.GetSymbol() as NamedTypeSymbol)?.TupleElements.
ElementAtOrDefault
(tupleTypeSyntax.Elements.IndexOf(declarationSyntax)).GetPublicSymbol();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
246
? parameterList.ReplaceNodes(parameterList.Parameters, (parameterNode, _) => PromoteParameter(generator, parameterNode, delegateMethod.Parameters.
ElementAtOrDefault
(i++)))
Microsoft.CodeAnalysis.CSharp.Features (6)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (5)
229
if (statements.
ElementAtOrDefault
(2) != null)
234
if (statements.
ElementAtOrDefault
(0) is not LocalDeclarationStatementSyntax declaration || statements.
ElementAtOrDefault
(1) is not ReturnStatementSyntax returnStatement)
266
if (statements.
ElementAtOrDefault
(0) is not LocalDeclarationStatementSyntax declaration || statements.
ElementAtOrDefault
(1) is not ExpressionStatementSyntax assignment)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
246
? parameterList.ReplaceNodes(parameterList.Parameters, (parameterNode, _) => PromoteParameter(generator, parameterNode, delegateMethod.Parameters.
ElementAtOrDefault
(i++)))
Microsoft.CodeAnalysis.Workspaces (2)
Recommendations\AbstractRecommendationServiceRunner.cs (1)
160
var concreteType = typeArguments.
ElementAtOrDefault
(index);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
113
var elementType = parameters.
ElementAtOrDefault
(0);