private void TaskCompletedCallback(bool isCancelled, Exception ex, BlobTransferType transferType, string localFile, Uri url) { if (TransferCompleted != null) { TransferCompleted(this, new BlobTransferCompleteEventArgs(ex, isCancelled, null, localFile, url, transferType)); } }
/// <summary> /// Initializes a new instance of the <see cref="BlobTransferCompleteEventArgs"/> class. /// </summary> /// <param name="error">The error, if any, that occurred. Nulls allowed.</param> /// <param name="isCanceled">True if the operation was canceled; false otherwise.</param> /// <param name="userState">The user state provided for the operation.</param> /// <param name="localFileName">The name of the local file.</param> /// <param name="url">A <see cref="Uri"/> representing the location of the blob.</param> /// <param name="transferType">The blob transfer type.</param> /// <exception cref="ArgumentException">If <paramref name="localFileName"/> is null or empty.</exception> /// <exception cref="ArgumentNullException">If <paramref name="url"/> is null.</exception> public BlobTransferCompleteEventArgs(Exception error, bool isCanceled, object userState, string localFileName, Uri url, BlobTransferType transferType) : base(error, isCanceled, userState) { if (string.IsNullOrEmpty(localFileName)) { throw new ArgumentException(StringTable.ErrorLocalFilenameIsNullOrEmpty); } if (url == null) { throw new ArgumentNullException("url"); } this.LocalFileName = localFileName; this.Url = url; this.TransferType = transferType; }
/// <summary> /// Initializes a new instance of the <see cref="BlobTransferCompleteEventArgs"/> class. /// </summary> /// <param name="error">The error, if any, that occurred. Nulls allowed.</param> /// <param name="isCanceled">True if the operation was canceled; false otherwise.</param> /// <param name="userState">The user state provided for the operation.</param> /// <param name="localFileName">The name of the local file.</param> /// <param name="url">A <see cref="Uri"/> representing the location of the blob.</param> /// <param name="transferType">The blob transfer type.</param> /// <exception cref="ArgumentException">If <paramref name="localFileName"/> is null or empty.</exception> /// <exception cref="ArgumentNullException">If <paramref name="url"/> is null.</exception> public BlobTransferCompleteEventArgs(Exception error, bool isCanceled, object userState, string localFileName, Uri url, BlobTransferType transferType) : base(error, isCanceled, userState) { if (string.IsNullOrEmpty(localFileName)) { throw new ArgumentException(CommonStringTable.ErrorLocalFilenameIsNullOrEmpty); } if (url == null) { throw new ArgumentNullException("url"); } this.LocalFileName = localFileName; this.Url = url; this.TransferType = transferType; }