public PluginProfileErrorCollection Add(Mashup dto, bool generateUniqueName)
{
if (generateUniqueName)
{
dto.Name = GetUniqueMashupName(dto.Name);
}
var errors = dto.ValidateAdd(ManagerProfile);
if (errors.Any())
{
return errors;
}
AddMashupNameToPlugin(dto.Name);
_scriptStorage.SaveMashup(dto);
_bus.Send(dto.CreatePluginMashupMessage());
_log.InfoFormat("Add mashup command sent to TP (Mashup '{0}' for account '{1}')", dto.Name, _context.AccountName.Value);
return errors;
}