Esempio n. 1
0
        /// <summary>
        /// Read MDF from stream.
        /// </summary>
        /// <param name="stream"></param>
        public Mdf(Stream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException("stream");
            }
            if (!stream.CanSeek)
            {
                throw new ArgumentException("stream");
            }

            Data          = stream;
            Data.Position = 0;

            DataGroups = new DataGroupCollection(this);
            IDBlock    = IdentificationBlock.Read(this, stream);
            HDBlock    = HeaderBlock.Read(this, stream);
        }
Esempio n. 2
0
 public Mdf()
 {
     DataGroups = new DataGroupCollection(this);
     IDBlock    = IdentificationBlock.Create(this);
     HDBlock    = HeaderBlock.Create(this);
 }