Source/EasyNetQ/AutoSubscribe/AutoSubscriber.cs
/// <summary>
/// Registers all async 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 async 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 async 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 SubscribeAsync(params Assembly[] assemblies)
        {
            Preconditions.CheckAny(assemblies, "assemblies", "No assemblies specified.");
            var genericBusSubscribeMethod = GetSubscribeMethodOfBus("SubscribeAsync", typeof(Func<,>));
            var subscriptionInfos = GetSubscriptionInfos(assemblies.SelectMany(a => a.GetTypes()), typeof(IConsumeAsync<>));
            Func<Type,Type> subscriberTypeFromMessageTypeDelegate = messageType => typeof (Func<,>).MakeGenericType(messageType, typeof (Task));
            InvokeMethods(subscriptionInfos, DispatchAsyncMethodName, genericBusSubscribeMethod, subscriberTypeFromMessageTypeDelegate);
        }
public virtual void SubscribeAsync ( params Assembly [ ] assemblies ) { Preconditions . CheckAny ( assemblies , " " , " " ) ; var genericBusSubscribeMethod = GetSubscribeMethodOfBus ( " " , typeof ( Func < , > ) ) ; var subscriptionInfos = GetSubscriptionInfos ( assemblies . SelectMany ( a => a . GetTypes ( ) ) , typeof ( IConsumeAsync < > ) ) ; Func < Type , Type > subscriberTypeFromMessageTypeDelegate = messageType => typeof ( Func < , > ) . MakeGenericType ( messageType , typeof ( Task ) ) ; InvokeMethods ( subscriptionInfos , DispatchAsyncMethodName , genericBusSubscribeMethod , subscriberTypeFromMessageTypeDelegate ) ; }
Registers all async consumers in passed assembly.
Registers all async consumers in passed assembly .
assemblies
The assembleis to scan for consumers.
The assembleis to scan for consumers .