private void C_LiveThreadUpdated(object sender, LiveThreadUpdateEventArgs e) { try { Assert.AreNotEqual(e.OldThread.NSFW, e.NewThread.NSFW); LiveThreadUpdated = true; } catch (AssertFailedException) { } }
private void CheckLiveThread() { LiveThread newThread = About(); if (Diff(newThread)) { // Event handler to alert the calling app that the object has changed. --Kris LiveThreadUpdateEventArgs args = new LiveThreadUpdateEventArgs { OldThread = this, NewThread = newThread }; OnThreadUpdated(args); } }
protected virtual void OnThreadUpdated(LiveThreadUpdateEventArgs e) { ThreadUpdated?.Invoke(this, e); }
/// <summary> /// If automatic monitoring of the thread (not updates or contributors) is enabled, this callback will apply any changes to this instance. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void C_ApplyThreadUpdates(object sender, LiveThreadUpdateEventArgs e) { Import(e.NewThread.EventData); }
/// <summary> /// If automatic monitoring of the thread (not updates or contributors) is enabled, this callback will apply any changes to this instance. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void C_ApplyThreadUpdates(object sender, LiveThreadUpdateEventArgs e) { Import(e.NewThread.Id, e.NewThread.Description, e.NewThread.NSFW, e.NewThread.Resources, e.NewThread.Title, e.NewThread.TotalViews, e.NewThread.Created, e.NewThread.Fullname, e.NewThread.WebsocketURL, e.NewThread.AnnouncementURL, e.NewThread.State, e.NewThread.ViewerCount, e.NewThread.Icon); }