Ejemplo n.º 1
0
 internal void OnRaiseProgressEvent(PutObjectProgressArgs e)
 {
     EventHandler<PutObjectProgressArgs> putObjectProgressEvent = this.PutObjectProgressEvent;
     try
     {
         if (putObjectProgressEvent != null)
         {
             putObjectProgressEvent(this, e);
         }
     }
     catch
     {
     }
 }
Ejemplo n.º 2
0
        internal void OnRaiseProgressEvent(PutObjectProgressArgs e)
        {
            EventHandler <PutObjectProgressArgs> putObjectProgressEvent = this.PutObjectProgressEvent;

            try
            {
                if (putObjectProgressEvent != null)
                {
                    putObjectProgressEvent(this, e);
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// This method is called by a producer of put object progress
        /// notifications. When called, all the subscribers in the
        /// invocation list will be called sequentially.
        /// </summary>
        /// <param name="e"></param>
        internal void OnRaiseProgressEvent(PutObjectProgressArgs e)
        {
            // Make a temporary copy of the event to avoid the possibility of
            // a race condition if the last and only subscriber unsubscribes
            // immediately after the null check and before the event is raised.
            EventHandler <PutObjectProgressArgs> handler = PutObjectProgressEvent;

            try
            {
                // Event will be null if there are no subscribers
                if (handler != null)
                {
                    // This automatically calls all subscribers sequentially
                    // http://msdn.microsoft.com/en-us/library/ms173172%28VS.80%29.aspx
                    handler(this, e);
                }
            }
            catch
            {
            }
        }
 private void putObjectProgressEventCallback(object sender, PutObjectProgressArgs e)
 {
     this._fileTransporterRequest.OnRaiseProgressEvent(e.IncrementTransferred, e.TransferredBytes, e.TotalBytes);
 }
Ejemplo n.º 5
0
 private void request_Static_PutObjectProgressEvent(object sender, PutObjectProgressArgs e)
 {
     var context = GlobalHost.ConnectionManager.GetHubContext<ProgressHub>();
     context.Clients.Client(_progressId).changePercent(e.PercentDone.ToString(), "Upload2S3");
 }
Ejemplo n.º 6
0
 private void ProgressEvent(object sender, PutObjectProgressArgs args)
 {
     OperationProgress = args.PercentDone / 100.0;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// This method is called by a producer of put object progress
 /// notifications. When called, all the subscribers in the 
 /// invocation list will be called sequentially.
 /// </summary>
 /// <param name="e"></param>
 internal void OnRaiseProgressEvent(PutObjectProgressArgs e)
 {
     // Make a temporary copy of the event to avoid the possibility of
     // a race condition if the last and only subscriber unsubscribes
     // immediately after the null check and before the event is raised.
     EventHandler<PutObjectProgressArgs> handler = PutObjectProgressEvent;
     try
     {
         // Event will be null if there are no subscribers
         if (handler != null)
         {
             // This automatically calls all subscribers sequentially
             // http://msdn.microsoft.com/en-us/library/ms173172%28VS.80%29.aspx
             handler(this, e);
         }
     }
     catch
     {
     }
 }
Ejemplo n.º 8
0
 private void putRequest_PutObjectProgressEvent(object sender, PutObjectProgressArgs e) {
     this.ReportProcess(e.PercentDone);
 }