Exemple #1
0
        /// <summary>
        /// Callback method invoked whenever bytes have been transferred.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">The event arguments containing the SISession instance for
        /// which bytes have been transferred.</param>
        private void OnBytesTransferred(object sender, BytesTransferredEventArgs e)
        {
            // Get the Metadata of the file.
            FileMetaData meta;

            if (metaData.TryGetValue(e.Session.Sid, out meta))
            {
                // Raise the 'FileTransferProgress' event.
                FileTransferProgress.Raise(this, new FileTransferProgressEventArgs(
                                               new FileTransfer(e.Session, meta.Name, meta.Description)));
            }
        }
 /// <summary>
 /// Callback method invoked whenever bytes have been transferred.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">The event arguments containing the SISession instance for
 /// which bytes have been transferred.</param>
 private void OnBytesTransferred(object sender, BytesTransferredEventArgs e)
 {
     // Get the Metadata of the file.
     FileMetaData meta;
     if (metaData.TryGetValue(e.Session.Sid, out meta))
     {
         // Raise the 'FileTransferProgress' event.
         FileTransferProgress.Raise(this, new FileTransferProgressEventArgs(
             new FileTransfer(e.Session, meta.Name, meta.Description)));
     }
 }