Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MpqStream"/> class.
        /// </summary>
        /// <param name="mpqFile">The MPQ file that owns this stream.</param>
        /// <param name="fileHandle">The file handle.</param>
        public MpqStream(MpqFile mpqFile, IntPtr fileHandle)
        {
            if (mpqFile == null)
                throw new ArgumentNullException("mpqFile");
            if (fileHandle == IntPtr.Zero)
                throw new ArgumentNullException("fileHandle");

            this.mpqFile = mpqFile;
            this.fileHandle = fileHandle;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MpqStream"/> class.
        /// </summary>
        /// <param name="mpqFile">The MPQ file that owns this stream.</param>
        /// <param name="fileHandle">The file handle.</param>
        public MpqStream(MpqFile mpqFile, IntPtr fileHandle)
        {
            if (mpqFile == null)
            {
                throw new ArgumentNullException("mpqFile");
            }
            if (fileHandle == IntPtr.Zero)
            {
                throw new ArgumentNullException("fileHandle");
            }

            this.mpqFile    = mpqFile;
            this.fileHandle = fileHandle;
        }