Skip to content

Commit afcb4ad

Browse files
committed
- code linting
Signed-off-by: Vincent Biret <[email protected]>
1 parent 28fa9b3 commit afcb4ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Kiota.Builder/CodeDOM/CodeClass.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ public CodeComposedTypeBase? OriginalComposedType
4848
public CodeIndexer? Indexer => InnerChildElements.Values.OfType<CodeIndexer>().FirstOrDefault(static x => !x.Deprecation?.IsDeprecated ?? true);
4949
public void AddIndexer(params CodeIndexer[] indexers)
5050
{
51-
if (indexers == null || indexers.Any(static x => x == null))
51+
if (indexers == null || Array.Exists(indexers, static x => x == null))
5252
throw new ArgumentNullException(nameof(indexers));
5353
if (!indexers.Any())
5454
throw new ArgumentOutOfRangeException(nameof(indexers));
5555

5656
foreach (var value in indexers)
5757
{
5858
var existingIndexers = InnerChildElements.Values.OfType<CodeIndexer>().ToArray();
59-
if (existingIndexers.Any(x => !x.IndexParameterName.Equals(value.IndexParameterName, StringComparison.OrdinalIgnoreCase)) ||
59+
if (Array.Exists(existingIndexers, x => !x.IndexParameterName.Equals(value.IndexParameterName, StringComparison.OrdinalIgnoreCase)) ||
6060
InnerChildElements.Values.OfType<CodeMethod>().Any(static x => x.IsOfKind(CodeMethodKind.IndexerBackwardCompatibility)))
6161
{
6262
foreach (var existingIndexer in existingIndexers)

0 commit comments

Comments
 (0)