public HandlerMapper(ISerializer serializer, IServiceProvider provider, ILogger <HandlerMapper> logger, IUdpSenderFactory senderFactory, HandlerRegistry controllerRegistry) { _serializer = serializer; _logger = logger; _provider = provider; _controllerRegistry = controllerRegistry; _senderFactory = senderFactory; _mappings = _controllerRegistry.Handlers.Select(x => new HandlerMapping(x)).ToDictionary(x => x.MessageType, y => y); }
internal void SetInfo(HandlerInfo info) { Bytes = info.Bytes; _senderFactory = info.SenderFactory; SenderAddress = info.Address; }