ServerSnapshot: Improve API and allow filtering with custom struct enumerator by mgravell · Pull Request #2337 · StackExchange/StackExchange.Redis (original) (raw)
so we aren't limited just to ReadOnlySpan<ServerEndpoint>, and don't need the allocatey ToArray()
implemented as custom iterator which allows async and LINQ to work directly' existing code still uses span for efficiency, with the new API used in limited scenarios only
intent here:
- provide an efficient basis for filtered "all server's matching X" functionality
- provide the
Where(CommandFlags)basis for upcoming broadcast work - avoid some unnecessary allocations