/// <summary>
 /// Registers the publicly visible types from an assembly which contains a given type into the container.
 /// </summary>
 /// <typeparam name="TFrom">The type the assembly contains.</typeparam>
 /// <param name="registrator">The registrator.</param>
 /// <param name="selector">The type selector.</param>
 /// <param name="serviceTypeSelector">The service type selector. Used to filter the service types the actual type bound to.</param>
 /// <param name="registerSelf">If it's true the types will be registered to their own type too.</param>
 /// <param name="configurator">The configurator for the registered types.</param>
 /// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
 public static IStashboxContainer RegisterAssemblyContaining <TFrom>(this IDependencyCollectionRegistrator registrator,
                                                                     Func <Type, bool> selector = null,
                                                                     Func <Type, Type, bool> serviceTypeSelector = null,
                                                                     bool registerSelf = true,
                                                                     Action <RegistrationConfigurator> configurator = null)
     where TFrom : class =>
 registrator.RegisterAssemblyContaining(typeof(TFrom),
                                        selector,
                                        serviceTypeSelector,
                                        registerSelf,
                                        configurator);
Exemple #2
0
 /// <summary>
 /// Registers the publicly visible types from an assembly which contains a given type into the container.
 /// </summary>
 /// <typeparam name="TFrom">The type the assembly contains.</typeparam>
 /// <param name="registrator">The registrator.</param>
 /// <param name="selector">The type selector.</param>
 /// <param name="configurator">The configurator for the registered types.</param>
 /// <returns>The <see cref="IStashboxContainer"/> which on this method was called.</returns>
 public static IStashboxContainer RegisterAssemblyContaining <TFrom>(this IDependencyCollectionRegistrator registrator, Func <Type, bool> selector = null, Action <IFluentServiceRegistrator> configurator = null)
     where TFrom : class =>
 registrator.RegisterAssemblyContaining(typeof(TFrom), selector, configurator);