Example #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();
        }
Example #2
0
File: Host.cs Project: 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();
        }
Example #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();
        }
 public HandleErrorMessageMiddleware(ISendingChannel sendingChannel, IBusConfig busConfig)
 {
     this.sendingChannel = sendingChannel ?? throw new ArgumentNullException(nameof(sendingChannel));
     this.busConfig      = busConfig ?? throw new ArgumentNullException(nameof(busConfig));
 }