Пример #1
0
        public void SaveElementNodeTemplateFile(ElementNodeTemplate elementNodeTemplate, string filePath)
        {
            filePath = _GetRootedPath(filePath, ElementNodeTemplate.Directory);
            filePath = Path.ChangeExtension(filePath, ElementNodeTemplate.Extension);

            IObjectPersistor <ElementNodeTemplate> persistor = PersistorFactory.Instance.CreateElementNodeTemplatePersistor();

            persistor.SaveToFile(elementNodeTemplate, filePath);
        }
        public ElementNode ImportTemplateOnce(string templateFileName, ElementNode parentNode)
        {
            ElementNodeTemplate elementNodeTemplate = FileService.Instance.LoadElementNodeTemplateFile(templateFileName);

            if (elementNodeTemplate == null)
            {
                return(null);
            }

            VixenSystem.Nodes.AddChildToParent(elementNodeTemplate.ElementNode, parentNode);

            return(elementNodeTemplate.ElementNode);
        }
Пример #3
0
 public XmlElementNodeTemplateFilePolicy(ElementNodeTemplate template, XElement content)
 {
     _template = template;
     _content  = content;
 }