示例#1
0
 /// <summary>
 /// Serializes the given dynamic value which requires to be an array or dictionary of BYAML compatible values
 /// and stores it in the given file.
 /// </summary>
 public static void SaveN(string fileName, BymlFileData file)
 {
     using (FileStream stream = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None))
     {
         SaveN(stream, file);
     }
 }
示例#2
0
 public static byte[] SaveN(BymlFileData file)
 {
     using (MemoryStream stream = new MemoryStream())
     {
         SaveN(stream, file);
         return(stream.ToArray());
     }
 }
示例#3
0
 /// <summary>
 /// Serializes the given dynamic value which requires to be an array or dictionary of BYAML compatible values
 /// and stores it in the specified stream.
 /// No duplication checks are done using this method.
 /// </summary>
 public static void FastSaveN(Stream stream, BymlFileData file)
 {
     new ByamlWriter(stream, file.SupportPaths, file.byteOrder, file.Version).Write(file.RootNode, true);
 }