Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResFile"/> class from the file with the given
 /// <paramref name="fileName"/>.
 /// </summary>
 /// <param name="fileName">The name of the file to load the data from.</param>
 public ResFile(string fileName)
 {
     using (ResFileLoader loader = new ResFileLoader(this, fileName))
     {
         loader.Execute();
     }
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResFile"/> class from the given <paramref name="stream"/> which
 /// is optionally left open.
 /// </summary>
 /// <param name="stream">The <see cref="Stream"/> to load the data from.</param>
 /// <param name="leaveOpen"><c>true</c> to leave the stream open after reading, otherwise <c>false</c>.</param>
 public ResFile(Stream stream, bool leaveOpen = false)
 {
     using (ResFileLoader loader = new ResFileLoader(this, stream, leaveOpen))
     {
         loader.Execute();
     }
 }