Source/EasyNetQ/AutoSubscribe/AutoSubscriber.cs
/// <summary>
/// Registers all consumers in passed assembly. The actual Subscriber instances is
/// created using <seealso cref="AutoSubscriberMessageDispatcher"/>. The SubscriptionId per consumer
/// method is determined by <seealso cref="GenerateSubscriptionId"/> or if the method
/// is marked with <see cref="AutoSubscriberConsumerAttribute"/> with a custom SubscriptionId.
/// </summary>
/// <param name="assemblies">The assembleis to scan for consumers.</param>
Registers all consumers in passed assembly. The actual Subscriber instances is
created using . The SubscriptionId per consumer
method is determined by  or if the method
is marked with  with a custom SubscriptionId.
Registers all consumers in passed assembly . The actual Subscriber instances is created using . The SubscriptionId per consumer method is determined by or if the method is marked with with a custom SubscriptionId .
public virtual void Subscribe(params Assembly[] assemblies)
        {
            Preconditions.CheckAny(assemblies, "assemblies", "No assemblies specified.");
            var genericBusSubscribeMethod = GetSubscribeMethodOfBus("Subscribe",typeof(Action<>));
            var subscriptionInfos = GetSubscriptionInfos(assemblies.SelectMany(a => a.GetTypes()), typeof(IConsume<>));
            InvokeMethods(subscriptionInfos,DispatchMethodName, genericBusSubscribeMethod, messageType => typeof(Action<>).MakeGenericType(messageType));
        }
public virtual void Subscribe ( params Assembly [ ] assemblies ) { Preconditions . CheckAny ( assemblies , " " , " " ) ; var genericBusSubscribeMethod = GetSubscribeMethodOfBus ( " " , typeof ( Action < > ) ) ; var subscriptionInfos = GetSubscriptionInfos ( assemblies . SelectMany ( a => a . GetTypes ( ) ) , typeof ( IConsume < > ) ) ; InvokeMethods ( subscriptionInfos , DispatchMethodName , genericBusSubscribeMethod , messageType => typeof ( Action < > ) . MakeGenericType ( messageType ) ) ; }
Registers all consumers in passed assembly.
Registers all consumers in passed assembly .
assemblies
The assembleis to scan for consumers.
The assembleis to scan for consumers .