/// <summary>
        /// The OnBridgeInitializing handler.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="args">
        /// The args.
        /// </param>
        private void OnBridgeInitializing(object sender, BridgeInitializingEventArgs 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}] Initializing.",
                    this.MachineName,
                    this.DeploymentId,
                    this.RoleInstanceName,
                    this.RoleInstanceId,
                    name);
            }
            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());
            }
        }
Ejemplo n.º 2
0
        private void OnBridgeInitializing(object sender, BridgeInitializingEventArgs args)
        {
            try
            {
                var bridge = (IMessageBusBridge)sender;
                var name   = bridge.GetType().Name;

                this.bridgeEventWriter.Initializing(
                    this.MachineName,
                    this.DeploymentId,
                    this.RoleInstanceName,
                    this.RoleInstanceId,
                    name);
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.ToString());
            }
        }
        /// <summary>
        /// The OnBridgeInitializing handler.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="args">
        /// The args.
        /// </param>
        private void OnBridgeInitializing(object sender, BridgeInitializingEventArgs 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}] Initializing.", 
                    this.MachineName, 
                    this.DeploymentId, 
                    this.RoleInstanceName, 
                    this.RoleInstanceId, 
                    name);
            }
            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 OnBridgeInitializing(object sender, BridgeInitializingEventArgs args)
        {
            try
            {
                var bridge = (IMessageBusBridge)sender;
                var name = bridge.GetType().Name;

                this.bridgeEventWriter.Initializing(
                    this.MachineName, 
                    this.DeploymentId, 
                    this.RoleInstanceName, 
                    this.RoleInstanceId, 
                    name);
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.ToString());
            }
        }
 /// <summary>
 /// The OnBridgeInitializing handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnBridgeInitializing(object sender, BridgeInitializingEventArgs args)
 {
     this.NumberEventsFired++;
 }
 /// <summary>
 /// The OnBridgeInitializing handler.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The args.
 /// </param>
 private void OnBridgeInitializing(object sender, BridgeInitializingEventArgs args)
 {
     this.NumberEventsFired++;
 }