예제 #1
0
 /// <summary>
 /// Saves the contents in the file with the given <paramref name="fileName"/>.
 /// </summary>
 /// <param name="fileName">The name of the file to save the contents into.</param>
 public void Save(string fileName)
 {
     using (BfshaFileSaver saver = new BfshaFileSaver(this, fileName))
     {
         saver.Execute();
     }
 }
예제 #2
0
        // ---- METHODS (PUBLIC) ---------------------------------------------------------------------------------------

        /// <summary>
        /// Saves the contents in the given <paramref name="stream"/> and optionally leaves it open
        /// </summary>
        /// <param name="stream">The <see cref="Stream"/> to save the contents into.</param>
        /// <param name="leaveOpen"><c>true</c> to leave the stream open after writing, otherwise <c>false</c>.</param>
        public void Save(Stream stream, bool leaveOpen = false)
        {
            using (BfshaFileSaver saver = new BfshaFileSaver(this, stream, leaveOpen))
            {
                saver.Execute();
            }
        }