protected override byte[] GetRawBytes() { XmlTheme context = this.Context as XmlTheme; MemoryStream memoryStream = new MemoryStream(); context.SaveToStream((Stream)memoryStream); byte[] array = memoryStream.ToArray(); memoryStream.Close(); return(array); }
protected override object Deserialize(byte[] rawBytes) { XmlTheme xmlTheme = new XmlTheme(); MemoryStream memoryStream = new MemoryStream(rawBytes); XmlReader reader = XmlReader.Create((Stream)memoryStream); xmlTheme.DeserializePartially(reader); reader.Close(); memoryStream.Close(); return((object)xmlTheme); }
public XmlTheme[] DecompressThemes() { List <XmlTheme> xmlThemeList = new List <XmlTheme>(); foreach (RadArchiveStream stream in this.Streams) { XmlTheme xmlTheme = stream.Unzip() as XmlTheme; if (xmlTheme != null) { xmlThemeList.Add(xmlTheme); } } return(xmlThemeList.ToArray()); }
protected override object Deserialize(byte[] rawBytes) { XmlTheme theme = new XmlTheme(); MemoryStream memStream = new MemoryStream(rawBytes); XmlReader reader = XmlReader.Create(memStream); theme.DeserializePartiallyThemeFromReader(reader); reader.Close(); memStream.Close(); return(theme); }
protected override byte[] GetRawBytes() { XmlTheme theme = this.Context as XmlTheme; Debug.Assert(theme != null, "Invalid XmlThemeArchiveStream context."); MemoryStream savedThemeStream = new MemoryStream(); theme.SaveToStream(savedThemeStream); byte[] savedBuffer = savedThemeStream.ToArray(); savedThemeStream.Close(); return(savedBuffer); }
/// <summary> /// Gets all the themes that reside within this package. /// </summary> /// <returns></returns> public XmlTheme[] DecompressThemes() { List <XmlTheme> themes = new List <XmlTheme>(); foreach (RadArchiveStream stream in this.Streams) { XmlTheme theme = stream.Unzip() as XmlTheme; Debug.Assert(theme != null, "Invalid stream in RadThemePackage."); if (theme != null) { themes.Add(theme); } } return(themes.ToArray()); }
public RadXmlThemeArchiveStream(XmlTheme theme) : base((object)theme) { }
public RadXmlThemeArchiveStream(XmlTheme theme) : base(theme) { }