/// <summary>
 /// Registers the publicly visible types from an assembly into the container.
 /// </summary>
 /// <param name="registrator">The registrator.</param>
 /// <param name="assembly">The assembly holding the types to register.</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 RegisterAssembly(this IDependencyCollectionRegistrator registrator,
                                                   Assembly assembly,
                                                   Func <Type, bool> selector = null,
                                                   Func <Type, Type, bool> serviceTypeSelector = null,
                                                   bool registerSelf = true,
                                                   Action <RegistrationConfigurator> configurator = null) =>
 registrator.RegisterTypes(assembly.CollectTypes(),
                           selector,
                           serviceTypeSelector,
                           registerSelf,
                           configurator);
Пример #2
0
 /// <summary>
 /// Registers the publicly visible types from an assembly into the container.
 /// </summary>
 /// <param name="registrator">The registrator.</param>
 /// <param name="assembly">The assembly holding the types to register.</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 RegisterAssembly(this IDependencyCollectionRegistrator registrator, Assembly assembly, Func <Type, bool> selector = null, Action <IFluentServiceRegistrator> configurator = null) =>
 registrator.RegisterTypes(assembly.CollectTypes(), selector, configurator);