Rebus.Autofac/Config/ContainerBuilderExtensions.cs
/// <summary>
/// Registers all Rebus message handler types found in the assembly of <paramref name="handlerType"/>
/// </summary>
Registers all Rebus message handler types found in the assembly of
Registers all Rebus message handler types found in the assembly of
public static void RegisterHandlersFromAssemblyOf(this ContainerBuilder builder, Type handlerType, PropertyWiringOptions propertyWiringOptions = PropertyWiringOptions.None)
        {
            if (builder == null) throw new ArgumentNullException(nameof(builder));
            if (handlerType == null) throw new ArgumentNullException(nameof(handlerType));
            builder.RegisterAssemblyTypes(handlerType.Assembly)
                .Where(t => t.IsClass && !t.IsAbstract && t.GetInterfaces().Any(IsRebusHandler))
                .As(GetImplementedHandlerInterfaces)
                .InstancePerDependency()
                .PropertiesAutowired(propertyWiringOptions);
        }
public static void RegisterHandlersFromAssemblyOf ( this ContainerBuilder builder , Type handlerType , PropertyWiringOptions propertyWiringOptions = PropertyWiringOptions . None ) { if ( builder == null ) throw new ArgumentNullException ( nameof ( builder ) ) ; if ( handlerType == null ) throw new ArgumentNullException ( nameof ( handlerType ) ) ; builder . RegisterAssemblyTypes ( handlerType . Assembly ) . Where ( t => t . IsClass && ! t . IsAbstract && t . GetInterfaces ( ) . Any ( IsRebusHandler ) ) . As ( GetImplementedHandlerInterfaces ) . InstancePerDependency ( ) . PropertiesAutowired ( propertyWiringOptions ) ; }
Registers all Rebus message handler types found in the assembly of
Registers all Rebus message handler types found in the assembly of
ContainerBuilder
this
handlerType
Type
propertyWiringOptions
PropertyWiringOptions