public VideoController(IVideoCloudRepository videoRepository, ILogger <VideoController> logger, IMapper mapper, BusinessProducer producer, IOptions <EventBusConstants> options) { _videoRepository = videoRepository; _logger = logger; _mapper = mapper; _producer = producer; _constants = options.Value; }
public AudioController(IAudioCloudRepository audioRepository, ILogger <AudioController> logger, IMapper mapper, BusinessProducer producer, IOptions <EventBusConstants> options) { _audioRepository = audioRepository; _logger = logger; _mapper = mapper; _producer = producer; _constants = options.Value; }
public BusinessConsumer(IEventBusConnection connection, IMapper mapper, IAudioServerRepository audioRepository, IVideoServerRepository videoRepository, IPhotoServerRepository photoRepository, IOptions <EventBusConstants> constants) { _connection = connection; _mapper = mapper; _audioRepository = audioRepository; _videoRepository = videoRepository; _photoRepository = photoRepository; _constants = constants.Value; }
private static EventBusConstants GetConstants() { var builder = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: false, reloadOnChange: false); IConfigurationRoot configuration = builder.Build(); var setting = new EventBusConstants(); setting.AudioExchange = configuration.GetSection("EventBusConstants:AudioExchange").Value; setting.AudioQueue = configuration.GetSection("EventBusConstants:AudioQueue").Value; setting.AudioRouting = configuration.GetSection("EventBusConstants:AudioRouting").Value; setting.VideoExchange = configuration.GetSection("EventBusConstants:VideoExchange").Value; setting.VideoQueue = configuration.GetSection("EventBusConstants:VideoQueue").Value; setting.VideoRouting = configuration.GetSection("EventBusConstants:VideoRouting").Value; return(setting); }