public static CommandMapper CreateInstance(ICommandTarget o, XmlTextReader xtr) { SimpleXmlSerializer serializer = new SimpleXmlSerializer(typeof(CommandMapper)); try { CommandMapper km = (CommandMapper)serializer.Deserialize(xtr); km.target = o; return(km); } finally { xtr.Close(); } }
public static Stylesheet Load(string filename, XmlNameTable tbl) { SimpleXmlSerializer serializer = new SimpleXmlSerializer(typeof(Stylesheet)); XmlTextReader xtr = new XmlTextReader(filename); try { Stylesheet s = (Stylesheet)serializer.Deserialize(xtr); s.BindStyles(tbl); return(s); } finally { xtr.Close(); } }
public static XmlCatalog Load() { Assembly asm=typeof(XmlCatalog).Assembly; Uri baseUri=new Uri(asm.CodeBase); Uri catalogUri=new Uri(baseUri, "catalog.xml"); XmlTextReader xtr=new XmlTextReader(catalogUri.AbsoluteUri); SimpleXmlSerializer serializer = new SimpleXmlSerializer(typeof(XmlCatalog)); try { XmlCatalog xc=(XmlCatalog) serializer.Deserialize(xtr); return xc; } finally { xtr.Close(); } }
public static XmlCatalog Load() { Assembly asm = typeof(XmlCatalog).Assembly; Uri baseUri = new Uri(asm.CodeBase); Uri catalogUri = new Uri(baseUri, "catalog.xml"); XmlTextReader xtr = new XmlTextReader(catalogUri.AbsoluteUri); SimpleXmlSerializer serializer = new SimpleXmlSerializer(typeof(XmlCatalog)); try { XmlCatalog xc = (XmlCatalog)serializer.Deserialize(xtr); return(xc); } finally { xtr.Close(); } }
public static Stylesheet Load(string filename, XmlNameTable tbl) { SimpleXmlSerializer serializer = new SimpleXmlSerializer(typeof(Stylesheet)); XmlTextReader xtr=new XmlTextReader(filename); try { Stylesheet s=(Stylesheet) serializer.Deserialize(xtr); s.BindStyles(tbl); return s; } finally { xtr.Close(); } }
public static CommandMapper CreateInstance(ICommandTarget o, XmlTextReader xtr) { SimpleXmlSerializer serializer = new SimpleXmlSerializer(typeof(CommandMapper)); try { CommandMapper km=(CommandMapper) serializer.Deserialize(xtr); km.target=o; return km; } finally { xtr.Close(); } }
/// <summary> /// Deserializes <see cref="StoredDomainModel"/> from string. /// </summary> /// <param name="serialized">Serialized instance.</param> /// <returns>Deserialized instance.</returns> public static StoredDomainModel Deserialize(string serialized) { return(Serializer.Deserialize(serialized)); }
/// <summary> /// Deserializes <see cref="StoredPartialIndexFilterInfoCollection"/> from string. /// </summary> /// <param name="serialized">Serialized instance.</param> /// <returns>Deserialized instance.</returns> public static StoredPartialIndexFilterInfoCollection Deserialize(string serialized) { return(Serializer.Deserialize(serialized)); }