コード例 #1
0
 /// <summary>
 /// Adds the message handlers by scan.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="predicate">The predicate.</param>
 /// <param name="assemblies">The assemblies.</param>
 /// <returns></returns>
 public static Lazy <IServiceBus> AddMessageHandlersByScan(this Lazy <IServiceBus> service, Predicate <Type> predicate, params Assembly[] assemblies)
 {
     ServiceBusManager.GetSetupDescriptor(service).Do(s => AddMessageHandlersByScan(s, predicate, assemblies)); return(service);
 }
コード例 #2
0
 /// <summary>
 /// Adds the message handler.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="handlerType">Type of the handler.</param>
 /// <returns></returns>
 public static Lazy <IServiceBus> AddMessageHandler(this Lazy <IServiceBus> service, Type handlerType)
 {
     ServiceBusManager.GetSetupDescriptor(service).Do(s => AddMessageHandler(s, handlerType)); return(service);
 }
コード例 #3
0
 /// <summary>
 /// Registers the with service locator.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="locator">The locator.</param>
 /// <param name="name">The name.</param>
 /// <returns></returns>
 public static Lazy <IServiceBus> RegisterWithServiceLocator(this Lazy <IServiceBus> service, IServiceLocator locator, string name)
 {
     ServiceBusManager.GetSetupDescriptor(service).RegisterWithServiceLocator(service, locator, name); return(service);
 }
コード例 #4
0
 /// <summary>
 /// Registers the with service locator.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="service">The service.</param>
 /// <param name="locator">The locator.</param>
 /// <returns></returns>
 public static Lazy <IServiceBus> RegisterWithServiceLocator <T>(this Lazy <IServiceBus> service, IServiceLocator locator)
     where T : class, IServiceBus
 {
     ServiceBusManager.GetSetupDescriptor(service).RegisterWithServiceLocator <T>(service, locator, null); return(service);
 }
コード例 #5
0
 /// <summary>
 /// Registers the with service locator.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="locator">The locator.</param>
 /// <returns></returns>
 public static Lazy <IServiceBus> RegisterWithServiceLocator(this Lazy <IServiceBus> service, Lazy <IServiceLocator> locator)
 {
     ServiceBusManager.GetSetupDescriptor(service).RegisterWithServiceLocator(service, locator, null); return(service);
 }
コード例 #6
0
 /// <summary>
 /// Registers the with service locator.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="service">The service.</param>
 /// <param name="name">The name.</param>
 /// <returns></returns>
 public static Lazy <IServiceBus> RegisterWithServiceLocator <T>(this Lazy <IServiceBus> service, string name)
     where T : class, IServiceBus
 {
     ServiceBusManager.GetSetupDescriptor(service).RegisterWithServiceLocator <T>(service, ServiceLocatorManager.Lazy, name); return(service);
 }
コード例 #7
0
 /// <summary>
 /// Loads from configuration.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="configuration">The configuration.</param>
 /// <returns></returns>
 public static Lazy <IServiceBus> LoadFromConfiguration(this Lazy <IServiceBus> service, ServiceBusConfiguration configuration)
 {
     ServiceBusManager.GetSetupDescriptor(service).LoadFromConfiguration(service, configuration); return(service);
 }