Exemplo n.º 1
0
        public void SetChannels(List<ChannelDto> channels)
        {
            foreach (var channel in channels)
            {
                var query = new ChannelsQuery(channel.Id);
                _channelQueryHandler.CreateOrUpdateValueById<ChannelDto>(query, channel);
            }

            SetChannelsIds(new ChannelIdsDto {Ids = channels.Select(x => x.Id).ToList()});
        }
Exemplo n.º 2
0
        public async Task <List <Channel> > GetAvailableChatChannelsAsync()
        {
            var channels = await Task.Run(async() =>
            {
                var channelsQuery = new ChannelsQuery(_connection);
                var result        = await channelsQuery.ExecuteAsync();
                return(result);
            });

            return(channels);
        }
Exemplo n.º 3
0
 public void SetChannel(ChannelDto channel)
 {
     var query = new ChannelsQuery(channel.Id);
     _channelQueryHandler.CreateOrUpdateValueById<ChannelDto>(query, channel);
 }
Exemplo n.º 4
0
 public List<ChannelDto> GetChannels(List<string> ids)
 {
     var query = new ChannelsQuery(ids);
     return _channelQueryHandler.GetValuesByIds(query);
 }
Exemplo n.º 5
0
 public ChannelDto GetChannel(string id)
 {
     var query = new ChannelsQuery(id);
     return _channelQueryHandler.GetValueById(query);
 }