コード例 #1
0
        public BrokerEgressConfigurator WithExitPipeFitter <TConfigurator>() where TConfigurator : IPipeFitter
        {
            if (_configuration.ExitPipeFitterType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "exit pipe fitter type",
                          "broker egress",
                          nameof(WithExitPipeFitter));
            }

            _configuration.ExitPipeFitterType = typeof(TConfigurator);
            return(this);
        }
コード例 #2
0
        public BrokerIngressConfigurator WithQueueNameMatcher <TMatcher>() where TMatcher : IQueueNameMatcher
        {
            if (_configuration.QueueNameMatcherType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "queue name matcher type",
                          "broker ingress",
                          nameof(WithQueueNameMatcher));
            }

            _configuration.QueueNameMatcherType = typeof(TMatcher);
            return(this);
        }
コード例 #3
0
        public EgressApiConfigurator WithMessageKey <TMessageKey>()
        {
            if (_configuration.MessageKeyType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "message key type",
                          "broker egress API",
                          nameof(WithMessageKey));
            }

            _configuration.MessageKeyType = typeof(TMessageKey);
            return(this);
        }
コード例 #4
0
        public BrokerIngressConfigurator WithEnterPipeFitter <TPipeFitter>() where TPipeFitter : IPipeFitter
        {
            if (_configuration.EnterPipeFitterType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "enter pipe fitter type",
                          "broker ingress",
                          nameof(WithEnterPipeFitter));
            }

            _configuration.EnterPipeFitterType = typeof(TPipeFitter);
            return(this);
        }
コード例 #5
0
        public EgressApiConfigurator WithPipeFitter <TPipeFitter>() where TPipeFitter : IPipeFitter
        {
            if (_configuration.PipeFitterType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "pipe fitter",
                          "broker egress API",
                          nameof(WithPipeFitter));
            }

            _configuration.PipeFitterType = typeof(TPipeFitter);
            return(this);
        }
コード例 #6
0
        public IngressApiConfigurator WithMessagePayload <TMessagePayload>()
        {
            if (_configuration.MessagePayloadType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "message payload type",
                          "broker ingress API",
                          nameof(WithMessagePayload));
            }

            _configuration.MessagePayloadType = typeof(TMessagePayload);
            return(this);
        }
コード例 #7
0
        public EgressApiConfigurator WithMessageTypesRegistry <TMessageTypesRegistry>()
            where TMessageTypesRegistry : IEgressApiMessageTypesRegistry
        {
            if (_configuration.MessageTypesRegistryType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "message types registry type",
                          "broker egress API",
                          nameof(WithMessageTypesRegistry));
            }

            _configuration.MessageTypesRegistryType = typeof(TMessageTypesRegistry);
            return(this);
        }
コード例 #8
0
        public IngressApiConfigurator WithHandlerRegistry <THandlerRegistryType>()
            where THandlerRegistryType : IHandlerRegistry
        {
            if (_configuration.HandlerRegistryType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "handler registry type",
                          "broker ingress API",
                          nameof(WithHandlerRegistry));
            }

            _configuration.HandlerRegistryType = typeof(THandlerRegistryType);
            return(this);
        }
コード例 #9
0
        public IngressApiConfigurator WithQueueNamePatternsProvider <TQueueNamePatternsProvider>()
            where TQueueNamePatternsProvider : IQueueNamePatternsProvider
        {
            if (_configuration.QueueNamePatternsProviderType != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "queue name patterns provider type",
                          "broker ingress API",
                          nameof(WithQueueNamePatternsProvider));
            }

            _configuration.QueueNamePatternsProviderType = typeof(TQueueNamePatternsProvider);
            return(this);
        }
コード例 #10
0
        public MessageBrokerConfigurator WithId([NotNull] string id)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                throw new ArgumentNullException(nameof(id));
            }
            if (_configuration.Id != null)
            {
                throw ConfiguratorTools.MakeConfigurationMethodCalledMoreThanOnceException(
                          "ID",
                          "broker",
                          nameof(WithId));
            }

            _configuration.Id = id;
            return(this);
        }