Пример #1
0
 public bool Equals(IrregularSalaryPeriod other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(PeriodStart.Equals(other.PeriodStart) && PeriodEnd.Equals(other.PeriodEnd) && SalaryAmount == other.SalaryAmount && CurrencyCode == other.CurrencyCode);
 }
Пример #2
0
        private async Task LoadDatas()
        {
            Demo.WeaponFired = await _cacheService.GetDemoWeaponFiredAsync(Demo);

            CurrentRound     = Demo.Rounds.First(r => r.Number == RoundNumber);
            PeriodStart      = DateTime.Today;
            PeriodEnd        = DateTime.Today.AddSeconds(CurrentRound.Duration);
            VisibleStartTime = PeriodStart.AddSeconds(-5);
            VisibleEndTime   = PeriodEnd.AddSeconds(5);
            RoundEventList   = await _roundService.GetTimeLineEventList(Demo, CurrentRound);

            PlayersStats = await _playerService.GetPlayerRoundStatsListAsync(Demo, CurrentRound);
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            StatementRecord other = obj as StatementRecord;

            if (other != null)
            {
                return((!string.IsNullOrEmpty(SourceFactId) && SourceFactId.Equals(other.SourceFactId)) ||
                       (Title.Equals(other.Title) && PeriodStart.Equals(other.PeriodStart) && PeriodEnd.Equals(other.PeriodEnd) && (FactId != null && FactId.Equals(other.FactId))));
            }
            else
            {
                return(false);
            }
        }
Пример #4
0
        public override int GetHashCode()
        {
            if (!string.IsNullOrEmpty(SourceFactId))
            {
                return(SourceFactId.GetHashCode());
            }
            else
            {
                unchecked // Overflow is fine, just wrap
                {
                    int hash = 117;

                    hash = hash * 123 + Title.GetHashCode();
                    hash = hash * 123 + PeriodStart.GetHashCode();
                    hash = hash * 123 + PeriodEnd.GetHashCode();

                    return(hash);
                }
            }
        }
Пример #5
0
 public override string ToString()
 {
     return(PeriodStart.ToShortDateString() + " - " + PeriodEnd.ToShortDateString() + " " + Value);
 }
Пример #6
0
 public override string ToString()
 {
     return(String.Format(CultureInfo.CurrentCulture, "{0}: {1} of {2} since {3}", Name, StatusSoFar, Threshold, PeriodStart.UTCFormattedStringOrEmpty(false)));
 }