Esempio n. 1
0
        private void ProcessIncomingHost(object sender, OnBeingHostedArgs e)
        {
            BeingHostedNotification host = e.BeingHostedNotification;
            string msg = $"{host.HostedByChannel}, auto: {host.IsAutoHosted}, {host.Viewers} viewers";

            Log.Information(msg);
        }
Esempio n. 2
0
        private void OnChannelHosted(object sender, OnBeingHostedArgs e)
        {
            BeingHostedNotification bHNotif = e.BeingHostedNotification;

            EvtOnHostedArgs hostedArgs = new EvtOnHostedArgs
            {
                HostedData = new EvtHostedData(bHNotif.Channel, bHNotif.HostedByChannel,
                                               bHNotif.Viewers, bHNotif.IsAutoHosted)
            };

            ChannelHostedEvent?.Invoke(hostedArgs);
        }
Esempio n. 3
0
        public void PropertyTest()
        {
            Mock <ITwitchChannelLink> cLink = new Mock <ITwitchChannelLink>();

            BeingHostedNotification       eventArgs    = new BeingHostedNotification("BenAbt", "SchwabenCode", "Twitch", 999, true);
            TwitchBeingHostedNotification notification = new TwitchBeingHostedNotification(cLink.Object, eventArgs);

            notification.ChannelLink.Should().NotBeNull();
            notification.ChannelLink.Should().Be(cLink.Object);
            notification.BeingHostedNotification.Should().NotBeNull();
            notification.BeingHostedNotification.Should().IsSameOrEqualTo(eventArgs);
        }
Esempio n. 4
0
 public TwitchBeingHostedNotification(ITwitchChannelLink channelLink, BeingHostedNotification beingHostedNotification) : base(channelLink)
 {
     BeingHostedNotification = beingHostedNotification;
 }