public string CreateItem(string name, string guid, string parentguid, CiType citype) { if (citype == CiType.Project) { return this.CreateProject2(name); } else if (citype == CiType.Httpdd) { return this.Insert(name, guid, CiType.HttpddConf, Httpdd.GetDefaultHttpddHtml(name)); } else if (citype == CiType.Pkg) { return this.Insert(name, guid, CiType.PkgHtml, Pkg.GetDefaultPkgHtml(name, name)); } else if (citype == CiType.Layers) { Layer layer = new Layer() { name = name }; return this.Insert(name, guid, CiType.LayerXML, Utility.XMLUtil.SerializeXML<Layer>(layer)); } else if (citype == CiType.Symbols) { Symbol symbol = new Symbol() { name = name }; return this.Insert(name, guid, CiType.SymbolXML, Utility.XMLUtil.SerializeXML<Symbol>(symbol)); } else if (citype == CiType.Map) { Map map = new Map() { name = name }; map.Web.Add(new Web() { maxScaleDenom=0, minScaleDenom=0 }); return this.Insert(name, guid, CiType.MapXML, Utility.XMLUtil.SerializeXML<Map>(map)); } else return ""; }
public void testLayer() { Map map = new Map(); Layer layer = new Layer(); Class c = new Class(); }
public static bool LoadFromFile(string fileName, out Layer obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); }
/// <summary> /// Deserializes xml markup from file into an Layer object /// </summary> /// <param Name="fileName">string xml file to load and deserialize</param> /// <param Name="obj">Output Layer object</param> /// <param Name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out Layer obj, out System.Exception exception) { exception = null; obj = default(Layer); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } }
public static bool Deserialize(string xml, out Layer obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); }
/// <summary> /// Deserializes workflow markup into an Layer object /// </summary> /// <param Name="xml">string workflow markup to deserialize</param> /// <param Name="obj">Output Layer object</param> /// <param Name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string xml, out Layer obj, out System.Exception exception) { exception = null; obj = default(Layer); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } }