Esempio n. 1
0
        public MicropartOfServiceCenter(
            ILoggerFactory loggerFactory,
            IMicropartStatusManager micropartStatusManager)
        {
            _serviceCenterService = new ServiceCenterService(loggerFactory?.CreateLogger("Consul"));
            var micropartInfoOfServiceCenter = micropartStatusManager.UpdateStatus <MicropartInfoOfServiceCenter>(MicropartType);

            if (!micropartInfoOfServiceCenter.IsEnabled)
            {
                throw new MicroServicePartNotEnabledException(micropartInfoOfServiceCenter.MicroServicePartName);
            }
        }
Esempio n. 2
0
        public MicroPartOfZipkin(
            ILoggerFactory loggerFactory,
            IEnumerable <IMicroPartInfo> microServiceParts,
            IMicropartStatusManager micropartStatusManager
            )
        {
            _loggerFactory = loggerFactory;

            var micropartInfoOfZipkin = micropartStatusManager.UpdateStatus <MicropartInfoOfZipkin>(MicropartType);

            if (!micropartInfoOfZipkin.IsEnabled)
            {
                throw new MicroServicePartNotEnabledException(micropartInfoOfZipkin.MicroServicePartName);
            }
        }