/// <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); } }
public static byte[] SaveN(BymlFileData file) { using (MemoryStream stream = new MemoryStream()) { SaveN(stream, file); return(stream.ToArray()); } }
/// <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); }