Retrieving projection state with C# EventStore Client API

Imagine that I have a simple pony jumping projection from Rob, and I want to get the state of each projection using C# EventStore Client API.

Of course I understand the obvious way is to construct uri by convention /projection/jumpingponies2/state?partition=pony-pinkiepie and load it with HttpClient, but I suppose that there is some better solution provided by Event Store Client API.

Could you please advise best practices on retrieving current projection state with C# EventStore Client API?



Thank you Greg, unfortunately this method does not suites me as I am trying to get state of partitioned projection so my solution for now is below. Will enhance it to take all gossip seeds in account.

using (HttpClient client = new HttpClient())


var address = m_EventStoreConnection.Settings.GossipSeeds.First().EndPoint;

var state = await client.GetStringAsync(address.ToHttpUrl($"/projection/{projectionName}/state?partition=users-{userId}"));

model = JsonConvert.DeserializeObject(state);