예제 #1
0
        internal MappedStream DoOpenContent(SparseStream parent, Ownership ownsParent)
        {
            SparseStream theParent    = parent;
            Ownership    theOwnership = ownsParent;

            if (parent == null)
            {
                theParent    = new ZeroStream(Capacity);
                theOwnership = Ownership.Dispose;
            }

            ContentStream contentStream = new ContentStream(SparseStream.FromStream(_logicalStream, Ownership.None), _fileStream.CanWrite, _batStream, _freeSpace, _metadata, Capacity, theParent, theOwnership);

            return(new AligningStream(contentStream, Ownership.Dispose, (int)_metadata.LogicalSectorSize));
        }
        internal MappedStream DoOpenContent(SparseStream parent, Ownership ownsParent)
        {
            SparseStream theParent = parent;
            Ownership theOwnership = ownsParent;

            if (parent == null)
            {
                theParent = new ZeroStream(Capacity);
                theOwnership = Ownership.Dispose;
            }

            ContentStream contentStream = new ContentStream(SparseStream.FromStream(_fileStream, Ownership.None), _batStream, _freeSpace, _metadata, Capacity, theParent, theOwnership);
            return new AligningStream(contentStream, Ownership.Dispose, (int)_metadata.LogicalSectorSize);
        }