private static IEnumerable <GdbObjRefMsg> GetDeletableAllowedErrorRefs( VerificationParametersMsg requestParameters, BackgroundVerificationService qaService) { // Add invalidated allowed errors to be deleted if (requestParameters.ReportInvalidExceptions) { foreach (AllowedError allowedError in qaService.GetInvalidatedAllowedErrors()) { yield return(GetGdbObjRefMsg(allowedError)); } } if (requestParameters.ReportUnusedExceptions) { foreach (AllowedError allowedError in qaService.GetUnusedAllowedErrors()) { yield return(GetGdbObjRefMsg(allowedError)); } } }