Exemplo n.º 1
0
 /// <summary>
 /// The on worker starting.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The eventArgs.
 /// </param>
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     if (this.WorkerStarting != null)
     {
         this.WorkerStarting(sender, args);
     }
 }
 /// <summary>
 /// The OnWorkerStarting handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     Trace.TraceInformation(
         "[Machine Name: {0}][DeploymentId: {1}][Role: {2}][Role Instance Id: {3}][Worker {4}] Starting.",
         this.MachineName,
         this.DeploymentId,
         this.RoleInstanceName,
         this.RoleInstanceId,
         sender);
 }
Exemplo n.º 3
0
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     try
     {
         this.workerEventWriter.Starting(
             this.MachineName,
             this.DeploymentId,
             this.RoleInstanceName,
             this.RoleInstanceId,
             sender.ToString());
     }
     catch (Exception ex)
     {
         Trace.TraceError(ex.ToString());
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// The worker start.
 /// </summary>
 /// <param name="role">
 /// The role.
 /// </param>
 /// <returns>
 /// The <see cref="IDisposable"/>.
 /// </returns>
 public IDisposable WorkerStart(object role)
 {
     return(GetActivityTracker(
                () =>
     {
         var args = new WorkerStartingEventArgs();
         this.OnWorkerStarting(role, args);
     },
                t =>
     {
         var args = new WorkerStartedEventArgs {
             Elapsed = t
         };
         this.OnWorkerStarted(role, args);
     }));
 }
 /// <summary>
 /// The worker start.
 /// </summary>
 /// <param name="role">
 /// The role.
 /// </param>
 /// <returns>
 /// The <see cref="IDisposable"/>.
 /// </returns>
 public IDisposable WorkerStart(object role)
 {
     return GetActivityTracker(
         () =>
             {
                 var args = new WorkerStartingEventArgs();
                 this.OnWorkerStarting(role, args);
             }, 
         t =>
             {
                 var args = new WorkerStartedEventArgs { Elapsed = t };
                 this.OnWorkerStarted(role, args);
             });
 }
 /// <summary>
 /// The on worker starting.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The eventArgs.
 /// </param>
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     if (this.WorkerStarting != null)
     {
         this.WorkerStarting(sender, args);
     }
 }
 /// <summary>
 /// The OnWorkerStarting handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     try
     {
         Debug.Print(
             "[Machine Name: {0}][DeploymentId: {1}][Role: {2}][Role Instance Id: {3}][Worker {4}] Starting.", 
             this.MachineName, 
             this.DeploymentId, 
             this.RoleInstanceName, 
             this.RoleInstanceId, 
             sender);
     }
     catch (ArgumentNullException ex)
     {
         Debug.Print(ex.ToString());
     }
     catch (FormatException ex)
     {
         Debug.Print(ex.ToString());
     }
 }
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     try
     {
         this.workerEventWriter.Starting(
             this.MachineName, 
             this.DeploymentId, 
             this.RoleInstanceName, 
             this.RoleInstanceId, 
             sender.ToString());
     }
     catch (Exception ex)
     {
         Trace.TraceError(ex.ToString());
     }
 }
 /// <summary>
 /// The OnWorkerStarting handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     this.NumberEventsFired++;
 }
 /// <summary>
 /// The OnWorkerStarting handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     Trace.TraceInformation(
         "[Machine Name: {0}][DeploymentId: {1}][Role: {2}][Role Instance Id: {3}][Worker {4}] Starting.", 
         this.MachineName, 
         this.DeploymentId, 
         this.RoleInstanceName, 
         this.RoleInstanceId, 
         sender);
 }
 /// <summary>
 /// The OnWorkerStarting handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnWorkerStarting(object sender, WorkerStartingEventArgs args)
 {
     this.NumberEventsFired++;
 }