6 references to ElementAtOrDefault
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
73
var declaratorToRemoveLocation = diagnostic.AdditionalLocations.
ElementAtOrDefault
(1);
Microsoft.CodeAnalysis.CSharp.Features (2)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
421
var nextStatement = oldStatements.
ElementAtOrDefault
(statementIndex);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
73
var declaratorToRemoveLocation = diagnostic.AdditionalLocations.
ElementAtOrDefault
(1);
System.Linq (2)
System\Linq\ElementAt.cs (2)
104
return source.
ElementAtOrDefault
(index.Value);
109
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)!;