public bool IsMatch(GovTalkMessageGovTalkDetailsError error) { if (error.Number.Equals("1046")) return true; else return false; }
public bool IsMatch(GovTalkMessageGovTalkDetailsError error) { return error.Number.Equals("1020") == true? true: false; }
public string ErrorResponse(GovTalkMessageGovTalkDetailsError error) { return error.Text[0]; }
public string CalculateErrorReturn(GovTalkMessageGovTalkDetailsError error) { return _errorRules.First(e => e.IsMatch(error)).ErrorResponse(error); // @TODO: Handle situation where no rule is matched, or there is no errorResponse class }