Skip to content

Commit 3d0d7ea

Browse files
Andreas Gehrkechristianhelle
Andreas Gehrke
authored andcommitted
Fix Warning S6608 : Indexing at Count-1 should be used instead of the "Enumerable" extension method "Last"
1 parent 40c3692 commit 3d0d7ea

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)