/// <summary>
 /// The OnBridgeClosed handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnBridgeClosed(object sender, BridgeClosedEventArgs args)
 {
     try
     {
         var bridge = (IMessageBusBridge)sender;
         var name   = bridge.GetType().Name;
         Trace.TraceInformation(
             "[Machine Name: {0}][DeploymentId: {1}][Role: {2}][Role Instance Id: {3}][Bridge {4}] Closed ({5:F6} seconds).",
             this.MachineName,
             this.DeploymentId,
             this.RoleInstanceName,
             this.RoleInstanceId,
             name,
             args.Elapsed.TotalSeconds);
     }
     catch (InvalidCastException ex)
     {
         Trace.TraceError(ex.ToString());
     }
     catch (NullReferenceException ex)
     {
         Trace.TraceError(ex.ToString());
     }
     catch (ArgumentNullException ex)
     {
         Trace.TraceError(ex.ToString());
     }
     catch (FormatException ex)
     {
         Trace.TraceError(ex.ToString());
     }
 }
Beispiel #2
0
 /// <summary>
 /// The on bridge closed.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The eventArgs.
 /// </param>
 private void OnBridgeClosed(object sender, BridgeClosedEventArgs args)
 {
     if (this.BridgeClosed != null)
     {
         this.BridgeClosed(sender, args);
     }
 }
Beispiel #3
0
 private void OnBridgeClosed(object sender, BridgeClosedEventArgs args)
 {
     try
     {
         var bridge = (IMessageBusBridge)sender;
         var name   = bridge.GetType().Name;
         this.bridgeEventWriter.Closed(
             this.MachineName,
             this.DeploymentId,
             this.RoleInstanceName,
             this.RoleInstanceId,
             name,
             args.Elapsed.TotalSeconds.ToString(CultureInfo.InvariantCulture));
     }
     catch (Exception ex)
     {
         Trace.TraceError(ex.ToString());
     }
 }
 /// <summary>
 /// The on bridge closed.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The eventArgs.
 /// </param>
 private void OnBridgeClosed(object sender, BridgeClosedEventArgs args)
 {
     if (this.BridgeClosed != null)
     {
         this.BridgeClosed(sender, args);
     }
 }
 /// <summary>
 /// The OnBridgeClosed handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnBridgeClosed(object sender, BridgeClosedEventArgs args)
 {
     try
     {
         var bridge = (IMessageBusBridge)sender;
         var name = bridge.GetType().Name;
         Debug.Print(
             "[Machine Name: {0}][DeploymentId: {1}][Role: {2}][Role Instance Id: {3}][Bridge {4}] Closed ({5:F6} seconds).", 
             this.MachineName, 
             this.DeploymentId, 
             this.RoleInstanceName, 
             this.RoleInstanceId, 
             name, 
             args.Elapsed.TotalSeconds);
     }
     catch (InvalidCastException ex)
     {
         Debug.Print(ex.ToString());
     }
     catch (NullReferenceException ex)
     {
         Debug.Print(ex.ToString());
     }
     catch (ArgumentNullException ex)
     {
         Debug.Print(ex.ToString());
     }
     catch (FormatException ex)
     {
         Debug.Print(ex.ToString());
     }
 }
 private void OnBridgeClosed(object sender, BridgeClosedEventArgs args)
 {
     try
     {
         var bridge = (IMessageBusBridge)sender;
         var name = bridge.GetType().Name;
         this.bridgeEventWriter.Closed(
             this.MachineName, 
             this.DeploymentId, 
             this.RoleInstanceName, 
             this.RoleInstanceId, 
             name, 
             args.Elapsed.TotalSeconds.ToString(CultureInfo.InvariantCulture));
     }
     catch (Exception ex)
     {
         Trace.TraceError(ex.ToString());
     }
 }
 /// <summary>
 /// The OnBridgeClosed handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnBridgeClosed(object sender, BridgeClosedEventArgs args)
 {
     this.NumberEventsFired++;
 }
 /// <summary>
 /// The OnBridgeClosed handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnBridgeClosed(object sender, BridgeClosedEventArgs args)
 {
     this.NumberEventsFired++;
 }