public void Edit(Ticket ticket, EditTicketRequest request) { wrappedInstance.Edit(ticket, request); var labels = labelProvider.GetLabels(request.CommaSeparatedLabelNames); ticket.Labels.ReplaceContents(labels); }
public Ticket CreateTicket(CreateTicketRequest request) { var ticket = wrappedInstance.CreateTicket(request); var labels = labelProvider.GetLabels(request.CommaSeparatedLabelNames); ticket.Labels.UnionWith(labels); return(ticket); }
public override IReadOnlyCollection <Label> GetLabels(IReadOnlyCollection <string> labelNames) { if (labelNames == null) { throw new ArgumentNullException(nameof(labelNames)); } var existingLabels = existingLabelProvider.GetLabels(labelNames); var missingNames = GetMissingLabelNames(labelNames, existingLabels); var newLabels = newLabelProvider.GetLabels(missingNames); return(existingLabels.Union(newLabels).ToList()); }