コード例 #1
0
ファイル: UiProject.cs プロジェクト: bhuvanchandra/emul8
 protected override bool TryLoad(System.Xml.Linq.XDocument doc)
 {
     var projectInfoNode = doc.XPathSelectElement(@"/x:Project/x:PropertyGroup/x:ProjectInfo", NamespaceManager);
     var uiType = projectInfoNode.Value;
     if(string.IsNullOrWhiteSpace(uiType))
     {
         throw new ArgumentException("UiType must be set.");
     }
     
     UiType = uiType;
     
     return base.TryLoad(doc);
 }
コード例 #2
0
        public XElement ToUDS(System.Xml.Linq.XElement physicalService)
        {
            string name = physicalService.Attribute("Name").Value;

            XElement x = new XElement("Service", new XAttribute("Name", name), new XAttribute("Enabled", "true"));
            XElement def = new XElement("Definition", new XAttribute("Type", "DBHelper"));
            x.Add(def);

            XElement handler = physicalService.XPathSelectElement("Property[@Name='Definition']/Service/ServiceDescription/Handler");
            foreach (XElement e in handler.Elements())
                def.Add(e);

            return x;
        }
コード例 #3
0
ファイル: PluginProject.cs プロジェクト: rte-se/emul8
 protected override bool TryLoad(System.Xml.Linq.XDocument doc)
 {
     var projectInfoNode = doc.XPathSelectElement(ProjectInfoXPath, NamespaceManager);
     PluginModes = projectInfoNode.Elements().Select(x => x.Value).ToArray();
     return base.TryLoad(doc);
 }