/// <summary> /// Get current presence in the channel. WaitForSync is not implemented yet. Partial result may be returned /// </summary> /// <returns></returns> public Task <IEnumerable <PresenceMessage> > GetAsync(GetOptions options = null) { var getOptions = options ?? new GetOptions(); //TODO: waitForSync is not implemented yet var result = Map.Values.Where(x => (getOptions.ClientId.IsEmpty() || (x.ClientId == getOptions.ClientId)) && (getOptions.ConnectionId.IsEmpty() || (x.ConnectionId == getOptions.ConnectionId))); return(Task.FromResult(result)); }
/// <summary> /// Get current presence in the channel. WaitForSync is not implemented yet. Partial result may be returned /// </summary> /// <returns></returns> public async Task <IEnumerable <PresenceMessage> > GetAsync(GetOptions options = null) { var getOptions = options ?? new GetOptions(); if (getOptions.WaitForSync) { await WaitForSyncAsync(); } var result = Map.Values.Where(x => (getOptions.ClientId.IsEmpty() || x.ClientId == getOptions.ClientId) && (getOptions.ConnectionId.IsEmpty() || x.ConnectionId == getOptions.ConnectionId)); return(result); }