11 references to ElementAtOrDefault
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
71
var declaratorToRemoveLocation = diagnostic.AdditionalLocations.
ElementAtOrDefault
(1);
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
300
var newParameter = newParameterList.Parameters.
ElementAtOrDefault
(parameterIndex);
Microsoft.CodeAnalysis.CSharp.Features (3)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
485
var nextStatement = oldStatements.
ElementAtOrDefault
(statementIndex);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
71
var declaratorToRemoveLocation = diagnostic.AdditionalLocations.
ElementAtOrDefault
(1);
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
300
var newParameter = newParameterList.Parameters.
ElementAtOrDefault
(parameterIndex);
Microsoft.CodeAnalysis.Features (1)
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
238
statement = blockStatements.
ElementAtOrDefault
(blockStatements.IndexOf(ifOrElseIf) + relativeIndex);
Roslyn.Diagnostics.Analyzers (2)
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (2)
153
var argumentToReplace = generator.GetAttributeArguments(declaration).
ElementAtOrDefault
(0);
196
var argumentToReplace = generator.GetAttributeArguments(declaration).
ElementAtOrDefault
(1);
System.Linq (2)
System\Linq\ElementAt.cs (2)
102
return source.
ElementAtOrDefault
(index.Value);
107
return source.
ElementAtOrDefault
(count - index.Value);
System.Linq.Parallel (1)
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (1)
136
result = ExceptionAggregator.WrapEnumerable(childWithCancelChecks, cancelState).
ElementAtOrDefault
(_index)!;