public MembersAdded( IBotAddCommand addBotCommand, IUserAdd userAdd, IGetCurrentChatSettingsQuery getCurrentChatSettingsQuery, IAddChatCommand addChatCommand ) : base(addBotCommand, userAdd, getCurrentChatSettingsQuery, addChatCommand) { }
public virtual async Task Handle(IAddChatCommand <TChatInfo, TParticipationCandidateCollection, TParticipationCandidate> command, IChatBusContext chatEventPublisher) { await ChatsPermissionValidator.ValidateAdd(command.InitiatorUserId, command.ChatId, command.ChatInfo, WorkerName).ConfigureAwait(false); var chat = await ChatStore.Create(command.ChatId, command.ChatInfo, command.ToAdd, command.ToInvite, command.InitiatorUserId).ConfigureAwait(false); var @event = ChatsEventBuilder.BuildChatAddedEvent(command.InitiatorUserId, chat); await chatEventPublisher.EventPublisher.Publish(@event).ConfigureAwait(false); }
//private readonly IConfigureUserCommand configureUserCommand; public StartCommand( IAddChatCommand addChatCommand, IGetCurrentChatSettingsQuery getCurrentChatSettingsQuery //IConfigureUserCommand configureUserCommand ) { this.addChatCommand = addChatCommand; this.getCurrentChatSettingsQuery = getCurrentChatSettingsQuery; // this.configureUserCommand = configureUserCommand; }
public MemberAdded( IBotAddCommand addBotCommand, Raid.IUserAdd userAdd, IGetCurrentChatSettingsQuery getCurrentChatSettingsQuery, IAddChatCommand addChatCommand ) { this.addBotCommand = addBotCommand; this.userAdd = userAdd; this.getCurrentChatSettingsQuery = getCurrentChatSettingsQuery; this.addChatCommand = addChatCommand; }