Example #1
0
        public override Task ProcessServiceHealthAsync(ServiceEntity service)
        {
            ServiceEventSource.Current.Message($"service: {service}, aggregatedHealth: {service.Health.AggregatedHealthState}");
            if (service.ServiceName == "SampleStatelessService1")
            {
                ServiceEventSource.Current.Message("Change bulb here");
                // add bulb control from other proj
            }

            if (service.IsHealthEventReportingEnabled(
                    service.ApplicationName,
                    service.Health.AggregatedHealthState))
            {
                service.Health.HealthEvents
                .ForEachHealthEvent(healthEvent =>
                {
                    ServiceEventSource.Current.Message($"service: {service}, health: {healthEvent}");
                });
            }

            return(this.completedTask);
        }
 public abstract Task ProcessServiceHealthAsync(ServiceEntity service);