public Controllers.LiveThread Validate(Controllers.LiveThread liveThread) { Assert.IsNotNull(liveThread); Assert.IsNotNull(liveThread.Id); return(liveThread); }
/// <summary> /// Create a new live thread controller instance from another live thread controller instance. /// </summary> /// <param name="dispatch"></param> /// <param name="liveThread">A valid instance of this class</param> public LiveThread(Dispatch dispatch, LiveThread liveThread) { Dispatch = dispatch; Import(liveThread.Id, liveThread.Description, liveThread.NSFW, liveThread.Resources, liveThread.Title, liveThread.TotalViews, liveThread.Created, liveThread.Fullname, liveThread.WebsocketURL, liveThread.AnnouncementURL, liveThread.State, liveThread.ViewerCount, liveThread.Icon); EventData = liveThread.EventData; }
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); } }
private bool Diff(LiveThread compare) { return(!(Id.Equals(compare.Id) && Description.Equals(compare.Description) && NSFW.Equals(compare.NSFW) && Resources.Equals(compare.Resources) && TotalViews.Equals(compare.TotalViews) && Created.Equals(compare.Created) && Fullname.Equals(compare.Fullname) && IsAnnouncement.Equals(compare.IsAnnouncement) && AnnouncementURL.Equals(compare.AnnouncementURL) && State.Equals(compare.State) && ViewerCount.Equals(compare.ViewerCount) && Icon.Equals(compare.Icon))); }
/// <summary> /// Create a new live thread controller instance from another live thread controller instance. /// </summary> /// <param name="dispatch"></param> /// <param name="liveThread">A valid instance of this class</param> public LiveThread(Dispatch dispatch, LiveThread liveThread) { Dispatch = dispatch; Import(liveThread.EventData); }