コード例 #1
0
 /// <summary>
 ///     Setups up the service bus with a new Unity Container and registers the types found in the given type provider.
 /// </summary>
 public static BusBuilderConfiguration WithUnityDependencyResolver(this BusBuilderConfiguration configuration, ITypeProvider typeProvider)
 {
     return(configuration.WithUnityDependencyResolver(typeProvider, new UnityContainer()));
 }
コード例 #2
0
 /// <summary>
 ///     Setups up the service bus with the specified Unity Container and AssemblyScanningTypeProvider, then registers the types
 ///     with the container.
 /// </summary>
 public static BusBuilderConfiguration WithUnityDependencyResolver(this BusBuilderConfiguration configuration, IUnityContainer unityContainer)
 {
     return(configuration.WithUnityDependencyResolver(new AssemblyScanningTypeProvider(Assembly.GetCallingAssembly()), unityContainer));
 }