Class ChannelService
- Namespace
- EchoHub.Server.Services
- Assembly
- EchoHub.Server.dll
public class ChannelService : IChannelService
- Inheritance
-
ChannelService
- Implements
-
- Inherited Members
-
Constructors
ChannelService(IServiceScopeFactory, PresenceTracker, ILogger<ChannelService>)
public ChannelService(IServiceScopeFactory scopeFactory, PresenceTracker presenceTracker, ILogger<ChannelService> logger)
Parameters
scopeFactory IServiceScopeFactory
presenceTracker PresenceTracker
logger ILogger<ChannelService>
Methods
CreateChannelAsync(Guid, string, string?, bool)
public Task<ChannelOperationResult> CreateChannelAsync(Guid creatorUserId, string name, string? topic, bool isPublic)
Parameters
creatorUserId Guid
name string
topic string
isPublic bool
Returns
- Task<ChannelOperationResult>
DeleteChannelAsync(Guid, string)
public Task<ChannelOperationResult> DeleteChannelAsync(Guid callerUserId, string channelName)
Parameters
callerUserId Guid
channelName string
Returns
- Task<ChannelOperationResult>
EnsureChannelMembershipAsync(Guid, string)
public Task<(bool Success, string? Error)> EnsureChannelMembershipAsync(Guid userId, string channelName)
Parameters
userId Guid
channelName string
Returns
- Task<(bool Success, string Error)>
GetChannelByNameAsync(string)
public Task<ChannelDto?> GetChannelByNameAsync(string channelName)
Parameters
channelName string
Returns
- Task<ChannelDto>
GetChannelListAsync()
public Task<List<ChannelListItem>> GetChannelListAsync()
Returns
- Task<List<ChannelListItem>>
GetChannelTopicAsync(string)
public Task<(string? Topic, bool Exists)> GetChannelTopicAsync(string channelName)
Parameters
channelName string
Returns
- Task<(string Topic, bool Exists)>
GetChannelsAsync(Guid, int, int)
public Task<PaginatedResponse<ChannelDto>> GetChannelsAsync(Guid userId, int offset, int limit)
Parameters
userId Guid
offset int
limit int
Returns
- Task<PaginatedResponse<ChannelDto>>
UpdateTopicAsync(Guid, string, string?)
public Task<ChannelOperationResult> UpdateTopicAsync(Guid callerUserId, string channelName, string? topic)
Parameters
callerUserId Guid
channelName string
topic string
Returns
- Task<ChannelOperationResult>