/// <summary>
 /// Initializes a new instance of the <see cref="StreamCopyBeforeWriteEventArgs"/> class.
 /// </summary>
 /// <param name="dataToWrite">The data that should be written.</param>
 /// <param name="copier">The copier.</param>
 /// <param name="totalBytesCopies">The total bytes copies.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="copier" /> is <see langword="null" />.
 /// </exception>
 /// <exception cref="ArgumentOutOfRangeException">
 /// <paramref name="totalBytesCopies" /> is invalid.
 /// </exception>
 /// <exception cref="NullReferenceException">
 /// <paramref name="copier" /> is <see langword="null" />.
 /// </exception>
 public StreamCopyBeforeWriteEventArgs(IEnumerable <byte> dataToWrite, StreamCopier copier, long totalBytesCopies)
     : this(dataToWrite, copier.Source, copier.Destination, totalBytesCopies)
 {
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StreamCopyProgressErrorEventArgs"/> class.
 /// </summary>
 /// <param name="ex">The occured exception(s).</param>
 /// <param name="copier">The copier.</param>
 /// <param name="bytesCopied">The bytes copied.</param>
 /// <param name="totalBytesCopies">The total bytes copies.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="ex" /> is <see langword="null" />.
 /// </exception>
 /// <exception cref="ArgumentOutOfRangeException">
 /// <paramref name="bytesCopied" /> and/or <paramref name="totalBytesCopies" /> are invalid.
 /// </exception>
 /// <exception cref="NullReferenceException">
 /// <paramref name="ex" /> and/or <paramref name="copier" /> are <see langword="null" />.
 /// </exception>
 public StreamCopyProgressErrorEventArgs(Exception ex, StreamCopier copier, long bytesCopied, long totalBytesCopies)
     : this(ex, copier.Source, copier.Destination, bytesCopied, totalBytesCopies)
 {
 }
Exemple #3
0
 internal StreamCopyExecutionContext(StreamCopier copier, TState state)
 {
     this._COPIER = copier;
     this._STATE  = state;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StreamCopyProgressEventArgs"/> class.
 /// </summary>
 /// <param name="copier">The copier.</param>
 /// <param name="bytesCopied">The bytes copied.</param>
 /// <param name="totalBytesCopies">The total bytes copies.</param>
 /// <exception cref="ArgumentOutOfRangeException">
 /// <paramref name="bytesCopied" /> and/or <paramref name="totalBytesCopies" /> are invalid.
 /// </exception>
 /// <exception cref="NullReferenceException">
 /// <paramref name="copier" /> is <see langword="null" />.
 /// </exception>
 public StreamCopyProgressEventArgs(StreamCopier copier, long bytesCopied, long totalBytesCopies)
     : this(copier.Source, copier.Destination, bytesCopied, totalBytesCopies)
 {
 }