/// <summary> /// Cancels the specified file-transfer. /// </summary> /// <param name="transfer">The file-transfer to cancel.</param> /// <exception cref="ArgumentNullException">The transfer parameter is /// null.</exception> /// <exception cref="ArgumentException">The specified transfer instance does /// not represent an active data-transfer operation.</exception> public void CancelFileTransfer(FileTransfer transfer) { transfer.ThrowIfNull("transfer"); SISession session = GetSession(transfer.SessionId, transfer.From, transfer.To); if (session == null) { throw new ArgumentException("The specified transfer instance does not " + "represent an active data-transfer operation."); } session.Extension.CancelTransfer(session); }
/// <summary> /// Initializes a new instance of the FileTransferAbortedEventArgs class. /// </summary> /// <param name="transfer">A FileTransfer object representing the file-transfer /// operation for which the event is being raised.</param> /// <exception cref="ArgumentNullException">The transfer parameter is /// null.</exception> internal FileTransferAbortedEventArgs(FileTransfer transfer) { transfer.ThrowIfNull("transfer"); Transfer = transfer; }
/// <summary> /// Cancels the specified file-transfer. /// </summary> /// <param name="transfer">The file-transfer to cancel.</param> /// <exception cref="ArgumentNullException">The transfer parameter is /// null.</exception> /// <exception cref="ArgumentException">The specified transfer instance does /// not represent an active data-transfer operation.</exception> /// <exception cref="InvalidOperationException">The XmppClient instance is not /// connected to a remote host, or the XmppClient instance has not authenticated with /// the XMPP server.</exception> /// <exception cref="ObjectDisposedException">The XmppClient object has been /// disposed.</exception> public void CancelFileTransfer(FileTransfer transfer) { AssertValid(); transfer.ThrowIfNull("transfer"); siFileTransfer.CancelFileTransfer(transfer); }
/// <summary> /// Initializes a new instance of the FileTransferProgressEventArgs class. /// </summary> /// <param name="transfer">A FileTransfer object representing the file-transfer /// operation for which the event is being raised.</param> /// <exception cref="ArgumentNullException">The transfer parameter is /// null.</exception> internal FileTransferProgressEventArgs(FileTransfer transfer) { transfer.ThrowIfNull("transfer"); Transfer = transfer; }