예제 #1
0
 public bool Equals(PocketItem other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Id.Equals(other.Id) &&
            ResolvedId.Equals(other.ResolvedId) &&
            Equals(GivenUrl, other.GivenUrl) &&
            Equals(GivenTitle, other.GivenTitle) &&
            IsFavorite.Equals(other.IsFavorite) &&
            Status.Equals(other.Status) &&
            TimeAdded.Equals(other.TimeAdded) &&
            TimeUpdated.Equals(other.TimeUpdated) &&
            TimeRead.Equals(other.TimeRead) &&
            TimeFavorited.Equals(other.TimeFavorited) &&
            TimeSyncDatabaseAdded.Equals(other.TimeSyncDatabaseAdded) &&
            TimeSyncDatabaseUpdated.Equals(other.TimeSyncDatabaseUpdated) &&
            Equals(ResolvedTitle, other.ResolvedTitle) &&
            Equals(ResolvedUrl, other.ResolvedUrl) &&
            Equals(Excerpt, other.Excerpt) &&
            IsArticle.Equals(other.IsArticle) &&
            IsIndex.Equals(other.IsIndex) &&
            ImageContent.Equals(other.ImageContent) &&
            VideoContent.Equals(other.VideoContent) &&
            WordCount.Equals(other.WordCount) &&
            Equals(AmpUrl, other.AmpUrl) &&
            Equals(Encoding, other.Encoding) &&
            Equals(MimeType, other.MimeType) &&
            Equals(LeadImage, other.LeadImage));
 }
예제 #2
0
    void Update()
    {
        ScreenTimer.text = TimeLeft;
        // print(TimeLeft);
        if (!initialized)
        {
            return;
        }
        if (!timerActive)
        {
            return;
        }

        timer += Time.deltaTime;

        if (timer >= WaitTime)
        {
            timer = WaitTime;
            TimeOut.Invoke();
        }

        if ((int)timer != lastTime)
        {
            lastTime = (int)timer;
            TimeUpdated.Invoke();
        }
    }
예제 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = 47;
         hashCode = (hashCode * 53) ^ Id.GetHashCode();
         hashCode = (hashCode * 53) ^ ResolvedId.GetHashCode();
         if (GivenUrl != null)
         {
             hashCode = (hashCode * 53) ^ GivenUrl.GetHashCode();
         }
         if (GivenTitle != null)
         {
             hashCode = (hashCode * 53) ^ GivenTitle.GetHashCode();
         }
         hashCode = (hashCode * 53) ^ IsFavorite.GetHashCode();
         hashCode = (hashCode * 53) ^ (int)Status;
         hashCode = (hashCode * 53) ^ TimeAdded.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeUpdated.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeRead.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeFavorited.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeSyncDatabaseAdded.GetHashCode();
         hashCode = (hashCode * 53) ^ TimeSyncDatabaseUpdated.GetHashCode();
         if (ResolvedTitle != null)
         {
             hashCode = (hashCode * 53) ^ ResolvedTitle.GetHashCode();
         }
         if (ResolvedUrl != null)
         {
             hashCode = (hashCode * 53) ^ ResolvedUrl.GetHashCode();
         }
         if (Excerpt != null)
         {
             hashCode = (hashCode * 53) ^ Excerpt.GetHashCode();
         }
         hashCode = (hashCode * 53) ^ IsArticle.GetHashCode();
         hashCode = (hashCode * 53) ^ IsIndex.GetHashCode();
         hashCode = (hashCode * 53) ^ ImageContent.GetHashCode();
         hashCode = (hashCode * 53) ^ VideoContent.GetHashCode();
         hashCode = (hashCode * 53) ^ WordCount.GetHashCode();
         if (AmpUrl != null)
         {
             hashCode = (hashCode * 53) ^ AmpUrl.GetHashCode();
         }
         if (Encoding != null)
         {
             hashCode = (hashCode * 53) ^ Encoding.GetHashCode();
         }
         if (MimeType != null)
         {
             hashCode = (hashCode * 53) ^ MimeType.GetHashCode();
         }
         if (LeadImage != null)
         {
             hashCode = (hashCode * 53) ^ LeadImage.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #4
0
        IEnumerator Counter()
        {
            yield return(new WaitForSecondsRealtime(UpdateRate));

            TimeFromBeginning += Time.unscaledDeltaTime + UpdateRate;
            TimeUpdated?.Invoke(TimeFromBeginning);
            yield return(CheckEventList());

            StartCoroutine(Counter());
        }
예제 #5
0
 /// <summary>
 /// Updates the current time of this time keeper
 /// </summary>
 /// <param name="utcDateTime">The current time in UTC</param>
 internal void UpdateTime(DateTime utcDateTime)
 {
     LocalTime = utcDateTime.ConvertTo(DateTimeZone.Utc, TimeZone);
     TimeUpdated?.Invoke(this, new TimeUpdatedEventArgs(LocalTime, TimeZone));
 }
예제 #6
0
        public override string ToString()
        {
            string New = "";

            if (isNew)
            {
                New = " - New!";
            }
            return(Name + "\n" + Description + ": " + Price.ToString() + "\n" + "Last updated: " + TimeUpdated.ToShortDateString() + New);
        }
예제 #7
0
 public void ResetTime()
 {
     timer    = 0.0f;
     lastTime = 0;
     TimeUpdated.Invoke();
 }
 void SetTime(double time)
 {
     Director.time = time;
     CurrentTime   = time;
     TimeUpdated?.Invoke(time);
 }
 private void HandleTimeMessage(TimeDto time)
 {
     CurrentTrack.Duration    = time.Total;
     CurrentTrack.CurrentTime = time.Current;
     TimeUpdated?.Invoke(this, new TimeUpdatedEventArgs(CurrentTrack.Duration, CurrentTrack.CurrentTime));
 }