public ServiceHandle Build(HostSettings settings)
        {
            try
            {
                ServiceAvailability serviceAvailability = new ServiceAvailabilityImpl();

                var builder = new ControlServiceBuilder<SuperviseService>(
                    x => new SuperviseService(x, serviceAvailability, _serviceBuilderFactory), _serviceEvents);

                ServiceHandle serviceHandle = builder.Build(settings);

                return serviceHandle;
            }
            catch (Exception ex)
            {
                throw new ServiceBuilderException("An exception occurred creating supervise service", ex);
            }
        }
        public ServiceHandle Build(HostSettings settings)
        {
            try
            {
                ServiceAvailability serviceAvailability = new ServiceAvailabilityImpl();


                var builder = new ControlServiceBuilder <SuperviseService>(
                    x => new SuperviseService(x, serviceAvailability, _serviceBuilderFactory), _serviceEvents);

                ServiceHandle serviceHandle = builder.Build(settings);

                return(serviceHandle);
            }
            catch (Exception ex)
            {
                throw new ServiceBuilderException("An exception occurred creating supervise service", ex);
            }
        }