private IEnumerable <ITemplate> InstallTemplats(XElement templateElement, int userId = 0) { if (string.Equals(Constants.Packaging.TemplatesNodeName, templateElement.Name.LocalName) == false) { throw new ArgumentException("Must be \"" + Constants.Packaging.TemplatesNodeName + "\" as root", "templateElement"); } return(_packagingService.ImportTemplates(templateElement, userId)); }
private async Task UnpackTemplates(IEnumerable <XElement> elements) { foreach (var element in elements) { var name = (string)element.Element("Name"); await Out.WriteLineFormattedAsync("Importing Template '{0}'", name); packagingService.ImportTemplates(element); } }
public IEnumerable <ITemplate> ImportTemplates(XElement element, int userId = 0, bool raiseEvents = true) { return(realPackagingService.ImportTemplates(element, userId, raiseEvents)); }