Example #1
0
        /// <summary>
        /// Creates a new instance of a IRandomAccessStream over the same resource as the current stream.
        /// </summary>
        /// <returns>The new stream. The initial, internal position of the stream is 0.</returns>
        public IRandomAccessStream CloneStream()
        {
            BlobReadStream       clonedStream = new BlobReadStream(this.originalStream);
            BlobReadStreamHelper clonedHelper = new BlobReadStreamHelper(clonedStream);

            return(clonedHelper);
        }
Example #2
0
        /// <summary>
        /// Returns an input stream at a specified location in a stream.
        /// </summary>
        /// <param name="position">The location in the stream at which to begin.</param>
        /// <returns>The input stream.</returns>
        public IInputStream GetInputStreamAt(ulong position)
        {
            BlobReadStream clonedStream = new BlobReadStream(this.originalStream);

            clonedStream.Seek((long)position, SeekOrigin.Begin);
            return(clonedStream.AsInputStream());
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the BlobReadStreamHelper class.
 /// </summary>
 /// <param name="otherStream">An instance of BlobReadStream class that this helper should use.</param>
 private BlobReadStreamHelper(BlobReadStream otherStream)
 {
     this.originalStream = otherStream;
     this.originalStreamAsInputStream = this.originalStream.AsInputStream();
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the BlobReadStreamHelper class.
 /// </summary>
 /// <param name="blob">Blob reference to read from</param>
 /// <param name="accessCondition">An object that represents the access conditions for the blob. If null, no condition is used.</param>
 /// <param name="options">An object that specifies additional options for the request.</param>
 internal BlobReadStreamHelper(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
 {
     this.originalStream = new BlobReadStream(blob, accessCondition, options, operationContext);
     this.originalStreamAsInputStream = this.originalStream.AsInputStream();
 }
 /// <summary>
 /// Creates a new instance of a IRandomAccessStream over the same resource as the current stream.
 /// </summary>
 /// <returns>The new stream. The initial, internal position of the stream is 0.</returns>
 public IRandomAccessStream CloneStream()
 {
     BlobReadStream clonedStream = new BlobReadStream(this.originalStream);
     return new BlobReadStreamHelper(clonedStream);
 }
 /// <summary>
 /// Initializes a new instance of the BlobReadStreamHelper class.
 /// </summary>
 /// <param name="otherStream">An instance of BlobReadStream class that this helper should use.</param>
 private BlobReadStreamHelper(BlobReadStream otherStream)
 {
     this.originalStream = otherStream;
     this.originalStreamAsInputStream = this.originalStream.AsInputStream();
 }
 /// <summary>
 /// Initializes a new instance of the BlobReadStreamHelper class.
 /// </summary>
 /// <param name="blob">Blob reference to read from</param>
 /// <param name="accessCondition">An object that represents the access conditions for the blob. If null, no condition is used.</param>
 /// <param name="options">An object that specifies any additional options for the request.</param>
 internal BlobReadStreamHelper(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
 {
     this.originalStream = new BlobReadStream(blob, accessCondition, options, operationContext);
     this.originalStreamAsInputStream = this.originalStream.AsInputStream();
 }
 /// <summary>
 /// Returns an input stream at a specified location in a stream.
 /// </summary>
 /// <param name="position">The location in the stream at which to begin.</param>
 /// <returns>The input stream.</returns>
 public IInputStream GetInputStreamAt(ulong position)
 {
     BlobReadStream clonedStream = new BlobReadStream(this.originalStream);
     clonedStream.Seek((long)position, SeekOrigin.Begin);
     return clonedStream.AsInputStream();
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlobReadStream"/> class.
 /// </summary>
 /// <param name="otherStream">Another BlobReadStream instance to clone.</param>
 internal BlobReadStream(BlobReadStream otherStream)
     : this(otherStream.blob, otherStream.accessCondition, otherStream.options, otherStream.operationContext)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BlobReadStream"/> class.
 /// </summary>
 /// <param name="otherStream">Another BlobReadStream instance to clone.</param>
 internal BlobReadStream(BlobReadStream otherStream)
     : this(otherStream.blob, otherStream.accessCondition, otherStream.options, otherStream.operationContext)
 {
 }
Example #11
0
 /// <summary>
 /// Initializes a new instance of the BlobReadStreamHelper class.
 /// </summary>
 /// <param name="otherStream">An instance of BlobReadStream class that this helper should use.</param>
 private BlobReadStreamHelper(BlobReadStream otherStream)
 {
     this.originalStream = otherStream;
 }