コード例 #1
0
ファイル: CoreBus.cs プロジェクト: peterxj1/EzBus
        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();
        }
コード例 #2
0
ファイル: Host.cs プロジェクト: 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();
        }
コード例 #3
0
ファイル: CoreBus.cs プロジェクト: Zapote/EzBus
        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();
        }
コード例 #4
0
 public HandleErrorMessageMiddleware(ISendingChannel sendingChannel, IBusConfig busConfig)
 {
     this.sendingChannel = sendingChannel ?? throw new ArgumentNullException(nameof(sendingChannel));
     this.busConfig      = busConfig ?? throw new ArgumentNullException(nameof(busConfig));
 }