/// <summary>
        /// Event handler that indicates the microservice has changed status
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Microservice_StatusChanged(object sender, StatusChangedEventArgs e)
        {
            if (e == null || e.StatusNew != ServiceStatus.Running)
            {
                return;
            }

            IMicroservice microservice = sender as IMicroservice;

            if (microservice != null && mIsSubscribedToStatusEvent)
            {
                lock (mSyncLock)
                {
                    if (mIsSubscribedToStatusEvent)
                    {
                        microservice.StatusChanged -= new EventHandler <StatusChangedEventArgs>(Microservice_StatusChanged);
                        mIsSubscribedToStatusEvent  = false;
                    }
                }
            }

            mStatusChangeResetEvent.Set();
        }
Exemple #2
0
        private void Sender_StatusChanged(object component, StatusChangedEventArgs e)
        {
            var newSenders = mSenders.Where((l) => l.Status == ServiceStatus.Running).ToArray();

            Interlocked.Exchange(ref mActiveSenders, newSenders);
        }
 private void MicroserviceBff_StatusChanged(object sender, StatusChangedEventArgs e)
 {
 }