/// <summary>
        /// The OnSubscriberClosing handler.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="args">
        /// The args.
        /// </param>
        private void OnSubscriberClosing(object sender, SubscriberClosingEventArgs args)
        {
            try
            {
                var subscriber = (ISubscriber)sender;
                var name       = subscriber.GetType().Name;

                Trace.TraceInformation(
                    "[Machine Name: {0}][DeploymentId: {1}][Role: {2}][Role Instance Id: {3}][Subscriber {4}] Closing.",
                    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());
            }
        }
示例#2
0
 /// <summary>
 /// The on subscriber closing.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The eventArgs.
 /// </param>
 private void OnSubscriberClosing(object sender, SubscriberClosingEventArgs args)
 {
     if (this.SubscriberClosing != null)
     {
         this.SubscriberClosing(sender, args);
     }
 }
示例#3
0
        private void OnSubscriberClosing(object sender, SubscriberClosingEventArgs args)
        {
            try
            {
                var subscriber = (ISubscriber)sender;
                var name       = subscriber.GetType().Name;

                this.subscriberEventWriter.Closing(
                    this.MachineName,
                    this.DeploymentId,
                    this.RoleInstanceName,
                    this.RoleInstanceId,
                    name);
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.ToString());
            }
        }
 /// <summary>
 /// The on subscriber closing.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="args">
 /// The eventArgs.
 /// </param>
 private void OnSubscriberClosing(object sender, SubscriberClosingEventArgs args)
 {
     if (this.SubscriberClosing != null)
     {
         this.SubscriberClosing(sender, args);
     }
 }
        /// <summary>
        /// The OnSubscriberClosing handler.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="args">
        /// The args.
        /// </param>
        private void OnSubscriberClosing(object sender, SubscriberClosingEventArgs args)
        {
            try
            {
                var subscriber = (ISubscriber)sender;
                var name = subscriber.GetType().Name;

                Debug.Print(
                    "[Machine Name: {0}][DeploymentId: {1}][Role: {2}][Role Instance Id: {3}][Subscriber {4}] Closing.", 
                    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 OnSubscriberClosing(object sender, SubscriberClosingEventArgs args)
        {
            try
            {
                var subscriber = (ISubscriber)sender;
                var name = subscriber.GetType().Name;

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