Esempio n. 1
0
        /// <summary>
        /// Constructor that wraps an existing stream
        /// </summary>
        /// <param name="stream">Stream to wrap and read from</param>
        /// <param name="modKey">ModKey</param>
        /// <param name="release">Game Release the stream is for</param>
        /// <param name="bufferSize">Size of internal buffer</param>
        /// <param name="dispose">Whether to dispose the source stream</param>
        /// <param name="offsetReference">Optional offset reference position to use</param>
        public MutagenBinaryReadStream(
            Stream stream,
            ModKey modKey,
            GameRelease release,
            int bufferSize       = 4096,
            bool dispose         = true,
            long offsetReference = 0)
            : base(stream, bufferSize, dispose)
        {
            var startPos = stream.Position;

            this.MetaData = new ParsingBundle(release, MasterReferenceReader.FromStream(stream, modKey, release))
            {
                ModKey = modKey
            };
            stream.Position      = startPos;
            this.OffsetReference = offsetReference;
        }
Esempio n. 2
0
 public IMasterReferenceReader FromStream(IMutagenReadStream stream)
 {
     return(MasterReferenceReader.FromStream(stream));
 }
Esempio n. 3
0
 public IMasterReferenceReader FromStream(Stream stream, ModKey modKey, bool disposeStream = true)
 {
     return(MasterReferenceReader.FromStream(stream, modKey, _gameReleaseContext.Release, disposeStream));
 }