public void ExamineFlight(LogbookEntryDisplay led, IDictionary <string, CannedQuery> dQueries) { if (led == null) { throw new ArgumentNullException(nameof(led)); } if (dQueries == null) { throw new ArgumentNullException(nameof(dQueries)); } // Empty query name = all flights if (!dQueries.TryGetValue(QueryName, out CannedQuery query) && !String.IsNullOrWhiteSpace(QueryName)) { Progress = 0; FARRef = String.Format(CultureInfo.CurrentCulture, Resources.MilestoneProgress.ErrCustomProgressQueryNotFound.ToUpper(CultureInfo.CurrentCulture), QueryName); } else if (query == null || query.MatchesFlight(led)) { Progress += (decimal)led.HistogramValue(FieldName, Context); } }