public bool CheckTicket(Ticket toAdd, out IFailedTicket failure) { failure = null; var okToAdd = true; if (previouslyImported.ContainsKey(toAdd.ID) == false) { var validationErrors = toWorkItem(toAdd).Validate(); okToAdd = (validationErrors.Count == 0); if (okToAdd == false) { failure = new TfsFailedValidation(toAdd, validationErrors); } } return(okToAdd); }
public bool CheckTicket(Ticket toAdd, out IFailedTicket failure) { failure = null; var okToAdd = true; if (previouslyImported.ContainsKey(toAdd.ID) == false) { var validationErrors = toWorkItem(toAdd).Validate(); okToAdd = (validationErrors.Count == 0); if (okToAdd == false) { failure = new TfsFailedValidation(toAdd, validationErrors); } } return okToAdd; }