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(); }
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(); }
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)); }