コード例 #1
0
 public MessagingBusBuilder()
 {
     ServicesBuilder = new ServicesBuilder(this);
     ServiceBuilderServiceResolver = new ServiceBuilderServiceResolver(ServicesBuilder);
     ServiceResolver =
         new CompoundServiceResolver(ServiceBuilderServiceResolver, new DefaultServiceResolver());
     SubscriptionBuilder = new SubscriptionsBuilder(this);
     MessagingConfig     = new MessagingConfigurationBuilder(this);
 }
コード例 #2
0
        /// <summary>
        /// Specifies the <see cref="IServiceResolver"/> to use.
        /// </summary>
        /// <param name="serviceResolver">The <see cref="IServiceResolver"/> to use.</param>
        /// <returns>
        /// The current <see cref="MessagingBusBuilder"/>.
        /// </returns>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="serviceResolver"/> is <see langword="null"/>.
        /// </exception>
        public MessagingBusBuilder WithServiceResolver(IServiceResolver serviceResolver)
        {
            if (serviceResolver == null)
            {
                throw new ArgumentNullException(nameof(serviceResolver));
            }

            ServiceResolver = new CompoundServiceResolver(ServiceBuilderServiceResolver, serviceResolver);
            return(this);
        }