public async Task WritePaaStream(Stream stream) { using MemoryStream memStream = new MemoryStream(); foreach (var entry in animationsPar.Entries) { AnimationGroup animationGroup = animationGroups.Find(group => group.FileName == entry.FileName); memStream.SetLength(0); Serialiser.Serialise(new Binary(memStream, true), animationGroup); memStream.Seek(0, SeekOrigin.Begin); await entry.SetData(memStream); } await animationsPar.SaveTo(stream); }
public void WritePauStream(Stream stream) { Binary.WriteUInt32(stream, true, 0x50415505); Serialiser.Serialise(new Binary(stream, true), rootControl); }
public static string ToBase64(object obj) { using MemoryStream memStream = new MemoryStream(); Serialiser.Serialise(new Binary(memStream, true), obj); return(Convert.ToBase64String(memStream.ToArray())); }