Ejemplo n.º 1
0
        public CoreBus(ISendingChannel sendingChannel, IPublishingChannel publishingChannel)
        {
            this.sendingChannel    = sendingChannel ?? throw new ArgumentNullException(nameof(sendingChannel));
            this.publishingChannel = publishingChannel ?? throw new ArgumentNullException(nameof(publishingChannel));

            var messageSerializerType = TypeResolver.GetType <IBodySerializer>();

            serializer = (IBodySerializer)messageSerializerType.CreateInstance();
        }
Ejemplo n.º 2
0
Archivo: Host.cs Proyecto: Zapote/EzBus
        public Host(HostConfig config)
        {
            if (config == null) throw new ArgumentNullException(nameof(config));
            this.config = config;
            endpointErrorName = $"{config.EndpointName}.error";

            objectFactory = ObjectFactoryResolver.GetObjectFactory();
            sendingChannel = SendingChannelResolver.GetChannel();
            messageSerializer = MessageSerlializerResolver.GetSerializer();
        }
Ejemplo n.º 3
0
        public CoreBus(ISendingChannel sendingChannel, IPublishingChannel publishingChannel, IMessageRouting messageRouting)
        {
            if (sendingChannel == null) throw new ArgumentNullException(nameof(sendingChannel));
            if (messageRouting == null) throw new ArgumentNullException(nameof(messageRouting));
            if (publishingChannel == null) throw new ArgumentNullException(nameof(publishingChannel));

            this.sendingChannel = sendingChannel;
            this.messageRouting = messageRouting;
            this.publishingChannel = publishingChannel;

            serializer = MessageSerlializerResolver.GetSerializer();
        }
Ejemplo n.º 4
0
 public HandleErrorMessageMiddleware(ISendingChannel sendingChannel, IBusConfig busConfig)
 {
     this.sendingChannel = sendingChannel ?? throw new ArgumentNullException(nameof(sendingChannel));
     this.busConfig      = busConfig ?? throw new ArgumentNullException(nameof(busConfig));
 }