我不喜欢这个功能的外观。如果没有“魔术字符串”,有没有办法让它看起来不那么难看。
private static bool Inconsistent(AdStats adStat) {
return
adStat.Daily.Impressions != adStat.Hourly.Sum(h => h.Value.Impressions) ||
adStat.Daily.Clicks != adStat.Hourly.Sum(h => h.Value.Clicks) ||
adStat.Daily.Spent != adStat.Hourly.Sum(h => h.Value.Spent) ||
adStat.Daily.SocialImpressions != adStat.Hourly.Sum(h => h.Value.SocialImpressions) ||
adStat.Daily.SocialClicks != adStat.Hourly.Sum(h => h.Value.SocialClicks) ||
adStat.Daily.SocialSpent != adStat.Hourly.Sum(h => h.Value.SocialSpent) ||
adStat.Daily.UniqueImpressions != adStat.Hourly.Sum(h => h.Value.UniqueImpressions) ||
adStat.Daily.UniqueClicks != adStat.Hourly.Sum(h => h.Value.UniqueClicks) ||
adStat.Daily.SocialUniqueImpressions != adStat.Hourly.Sum(h => h.Value.SocialUniqueImpressions) ||
adStat.Daily.SocialUniqueClicks != adStat.Hourly.Sum(h => h.Value.SocialUniqueClicks);
}