/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }