Beispiel #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 specified stream.
        /// </summary>
        /// <param name="stream">The <see cref="Stream"/> to store the data in.</param>
        /// <param name="root">The dynamic value becoming the root of the BYAML file. Must be an array or dictionary of
        /// BYAML compatible values.</param>
        /// <param name="supportPaths">Whether to include a path array. This must be enabled for Mario Kart 8 files.
        /// </param>
        /// <param name="byteOrder">The <see cref="ByteOrder"/> to store data in.</param>
        public static void Save(Stream stream, dynamic root, bool supportPaths = false,
                                ByteOrder byteOrder = ByteOrder.BigEndian)
        {
            ByamlFile byamlFile = new ByamlFile(supportPaths, byteOrder);

            byamlFile.Write(stream, root);
        }