public override Stream GetStream(out StreamConstraints constraints) { constraints = new StreamConstraints(_streamGuard, _imageStart, _imageSize); return(_stream); }
/// <summary> /// Gets a seekable and readable <see cref="Stream"/> that can be used to read all data. /// The operations on the stream has to be done under a lock of <see cref="StreamConstraints.GuardOpt"/> if non-null. /// The image starts at <see cref="StreamConstraints.ImageStart"/> and has size <see cref="StreamConstraints.ImageSize"/>. /// It is the caller's responsibility not to read outside those bounds. /// </summary> public abstract Stream GetStream(out StreamConstraints constraints);
public override Stream GetStream(out StreamConstraints constraints) { constraints = new StreamConstraints(null, 0, _size); return(new ReadOnlyUnmanagedMemoryStream(_memory, _size)); }
public override Stream GetStream(out StreamConstraints constraints) { constraints = new StreamConstraints(null, 0, Size); return new ImmutableMemoryStream(array); }
public override Stream GetStream(out StreamConstraints constraints) { constraints = new StreamConstraints(null, 0, size); return new ReadOnlyUnmanagedMemoryStream(memory, size); }
public override Stream GetStream(out StreamConstraints constraints) { constraints = new StreamConstraints(null, 0, Size); return(new ImmutableMemoryStream(array)); }
public override Stream GetStream(out StreamConstraints constraints) { constraints = new StreamConstraints(_streamGuard, _imageStart, _imageSize); return _stream; }
public override Stream GetStream(out StreamConstraints constraints) { constraints = new StreamConstraints(streamGuard, imageStart, imageSize); return this.stream; }