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); }
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); }
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); } }
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); } } }
public override string ToString() { return(PeriodStart.ToShortDateString() + " - " + PeriodEnd.ToShortDateString() + " " + Value); }
public override string ToString() { return(String.Format(CultureInfo.CurrentCulture, "{0}: {1} of {2} since {3}", Name, StatusSoFar, Threshold, PeriodStart.UTCFormattedStringOrEmpty(false))); }