Skip to content

Commit 408276b

Browse files
author
Andreas Gehrke
committed
Fix Warning S6608 : Indexing at Count-1 should be used instead of the "Enumerable" extension method "Last"
1 parent f23d8bd commit 408276b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Atc.Cosmos.EventStore.Cqrs/Projections/ProjectionFilter.cs

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ public ProjectionFilter(string filter)
1515
? CreateEvaluateAll()
1616
: CreateEvaluation(p))
1717
.ToArray();
18-
endsOnAcceptAll = filter
19-
.Split(
20-
new[] { EventStreamId.PartSeperator },
21-
StringSplitOptions.RemoveEmptyEntries)
22-
.Last() == "**";
18+
endsOnAcceptAll = filter.EndsWith(".**");
2319
}
2420

2521
public bool Evaluate(StreamId streamId)

0 commit comments

Comments
 (0)