示例#1
0
 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);
 }
示例#2
0
 public void WritePauStream(Stream stream)
 {
     Binary.WriteUInt32(stream, true, 0x50415505);
     Serialiser.Serialise(new Binary(stream, true), rootControl);
 }
示例#3
0
 public static string ToBase64(object obj)
 {
     using MemoryStream memStream = new MemoryStream();
     Serialiser.Serialise(new Binary(memStream, true), obj);
     return(Convert.ToBase64String(memStream.ToArray()));
 }