Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 internal void SetInfo(HandlerInfo info)
 {
     Bytes          = info.Bytes;
     _senderFactory = info.SenderFactory;
     SenderAddress  = info.Address;
 }