public PluginProfileErrorCollection Update(UpdateMashupDto dto) { NormalizeMashup(dto); if (dto.IsNameChanged()) { var addErrors = Add(dto); if (!addErrors.Any()) { var deleteErrors = Delete(dto.OldName); foreach (var error in deleteErrors) { addErrors.Add(error); } } return addErrors; } return UpdateInternal(dto); }
private PluginProfileErrorCollection UpdateInternal(UpdateMashupDto dto) { var errors = dto.ValidateUpdate(ManagerProfile); if (!errors.Any()) { _scriptStorage.SaveMashup(dto); _bus.Send(dto.CreatePluginMashupMessage()); _log.InfoFormat("Update mashup commnad sent to TP (Mashup '{0}' for account '{1}')", dto.Name, _context.AccountName.Value); } return errors; }