public MessagingBusBuilder()
 {
     ServicesBuilder = new ServicesBuilder(this);
     ServiceBuilderServiceResolver = new ServiceBuilderServiceResolver(ServicesBuilder);
     ServiceResolver =
         new CompoundServiceResolver(ServiceBuilderServiceResolver, new DefaultServiceResolver());
     SubscriptionBuilder = new SubscriptionsBuilder(this);
     MessagingConfig     = new MessagingConfigurationBuilder(this);
 }
Exemple #2
0
        /// <summary>
        /// Configures messaging.
        /// </summary>
        /// <param name="configure">A delegate to a method to use to configure messaging.</param>
        /// <returns>
        /// The current <see cref="MessagingBusBuilder"/>.
        /// </returns>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="configure"/> is <see langword="null"/>.
        /// </exception>
        public MessagingBusBuilder Messaging(Action <MessagingConfigurationBuilder> configure)
        {
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            if (MessagingConfig == null)
            {
                MessagingConfig = new MessagingConfigurationBuilder(this);
            }

            configure(MessagingConfig);

            return(this);
        }