Ejemplo n.º 1
0
 /// <summary>
 /// Releases the file resources used by the stream.
 /// </summary>
 public void Dispose()
 {
     if (this.originalStream != null)
     {
         this.originalStream.Dispose();
         this.originalStream = null;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the FileWriteStreamHelper class for a file.
 /// </summary>
 /// <param name="file">File reference to write to.</param>
 /// <param name="fileSize">Size of the file.</param>
 /// <param name="createNew">Use <c>true</c> if the file is newly created, <c>false</c> otherwise.</param>
 /// <param name="accessCondition">An object that represents the access conditions for the file. If null, no condition is used.</param>
 /// <param name="options">An object that specifies additional options for the request.</param>
 internal FileWriteStreamHelper(CloudFile file, long fileSize, bool createNew, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
 {
     this.originalStream = new FileWriteStream(file, fileSize, createNew, accessCondition, options, operationContext);
     this.originalStreamAsOutputStream = this.originalStream.AsOutputStream();
 }