protected async Task RemoveFromClientSetAsync(string connectionId, IClientSetGrain clientSet) { var count = await clientSet.RemoveFromClientSetAsync(connectionId); if (count == 0) { var clientSetId = clientSet.GetId(); if (State.ConnectionIds.Remove(clientSetId)) { await WriteStateAsync(); } } }
protected async Task AddToClientSetAsync(string connectionId, IClientSetGrain clientSet) { var count = await clientSet.AddToClientSetAsync(connectionId); if (count == 1) { var clientSetId = clientSet.GetId(); if (State.ConnectionIds.Add(clientSetId)) { await WriteStateAsync(); } } }