示例#1
0
        public Controllers.LiveThread Validate(Controllers.LiveThread liveThread)
        {
            Assert.IsNotNull(liveThread);
            Assert.IsNotNull(liveThread.Id);

            return(liveThread);
        }
示例#2
0
        /// <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;
        }
示例#3
0
        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);
            }
        }
示例#4
0
 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)));
 }
示例#5
0
 /// <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);
 }