public static Stylesheet Load(string Id) { Stylesheet stylesheet = new Stylesheet (); stylesheet._filename = Path.GetFileNameWithoutExtension (Id) + SorentoLib.Services.Config.Get<string> (Enums.ConfigKey.scms_stylesheetfileextension); return stylesheet; }
public void AddStylesheet(Stylesheet Stylesheet) { this._stylesheetids.Add (Stylesheet.Id); }
public static Stylesheet FromXmlDocument(XmlDocument xmlDocument) { Hashtable item; Stylesheet result; try { item = (Hashtable)SNDK.Convert.FromXmlDocument (SNDK.Convert.XmlNodeToXmlDocument (xmlDocument.SelectSingleNode ("(//scms.stylesheet)[1]"))); } catch { item = (Hashtable)SNDK.Convert.FromXmlDocument (xmlDocument); } if (item.ContainsKey ("id")) { try { result = Load ((string)item["id"]); } catch { result = new Stylesheet ((string)item["id"]); } } else { throw new Exception (Strings.Exception.StylesheetFromXMLDocument); } if (item.ContainsKey ("content")) { result.Content = (string)item["content"]; } return result; }