public JoinWorldProximityChannelEventListener(IVoiceSessionAuthenticatedEventSubscribable subscriptionService, [NotNull] ILog logger, [NotNull] IPositionalVoiceChannelCollection positionalVoiceChannels, [NotNull] IVivoxAuthorizationService vivoxAutheAuthorizationService, [NotNull] IChatChannelJoinedEventPublisher channelJoinEventPublisher) : base(subscriptionService) { Logger = logger ?? throw new ArgumentNullException(nameof(logger)); PositionalVoiceChannels = positionalVoiceChannels ?? throw new ArgumentNullException(nameof(positionalVoiceChannels)); VivoxAutheAuthorizationService = vivoxAutheAuthorizationService ?? throw new ArgumentNullException(nameof(vivoxAutheAuthorizationService)); ChannelJoinEventPublisher = channelJoinEventPublisher ?? throw new ArgumentNullException(nameof(channelJoinEventPublisher)); }
public JoinGuildTextChatEventListener(IGuildStatusChangedEventSubscribable subscriptionService, IReadonlyLocalPlayerDetails localPlayerDetails, IVoiceSessionAuthenticatedEventSubscribable vivoxAuthenticatedEventSubscribable, [NotNull] IVivoxAuthorizationService vivoxAutheAuthorizationService, [NotNull] IChatChannelJoinedEventPublisher channelJoinEventPublisher, [NotNull] ILog logger) : base(subscriptionService, localPlayerDetails) { VivoxAutheAuthorizationService = vivoxAutheAuthorizationService ?? throw new ArgumentNullException(nameof(vivoxAutheAuthorizationService)); ChannelJoinEventPublisher = channelJoinEventPublisher ?? throw new ArgumentNullException(nameof(channelJoinEventPublisher)); Logger = logger ?? throw new ArgumentNullException(nameof(logger)); TaskCompletionSource <ILoginSession> source = new TaskCompletionSource <ILoginSession>(); ChatChannelSession = source.Task; //When vivox authenticates we can then set the completion of the login session. vivoxAuthenticatedEventSubscribable.OnVoiceSessionAuthenticated += (sender, args) => source.SetResult(args.Session); }