private void ProcessIncomingHost(object sender, OnBeingHostedArgs e) { BeingHostedNotification host = e.BeingHostedNotification; string msg = $"{host.HostedByChannel}, auto: {host.IsAutoHosted}, {host.Viewers} viewers"; Log.Information(msg); }
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); }
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); }
public TwitchBeingHostedNotification(ITwitchChannelLink channelLink, BeingHostedNotification beingHostedNotification) : base(channelLink) { BeingHostedNotification = beingHostedNotification; }