static RuntimeBase() { var busConfiguration = new BusConfigurationSection(); busConfiguration.Bus.Endpoint = "msmq://localhost/Dagent.nuget"; ServiceBusManager.SetProvider(() => new RhinoServiceBusAbstractor(busConfiguration)); }
/// <summary> /// Called when [end start]. /// </summary> protected override void OnEndStart() { base.OnEndStart(); ServiceBusManager.SetProvider(() => new RhinoServiceBusAbstractor(_locator, GetInstance <Rhino.ServiceBus.IServiceBus>())) .RegisterWithServiceLocator(_locator, _name); // also opens to connection, thus registering IServiceBus Open(ServiceBusManager.Current); }
public void Constructor() { // set service bus ServiceBusManager.SetProvider(() => new AppServiceBus() .Add <MyMessageHandler>() ); }
static void Main(string[] args) { ServiceLocatorManager.SetProvider(() => new UnityServiceLocator()); ServiceBusManager.SetProvider(() => new RhinoServiceBusAbstractor()) .AddMessageHandler(null) .AddMessageHandler(null); var serviceBus = ServiceBusManager.Current; serviceBus.Send <Message>(x => { x.Name = "George"; }); }
/// <summary> /// Initializes a new instance of the <see cref="BootstrapNServiceBusHost"/> class. /// </summary> /// <param name="locator">The locator.</param> protected BootstrapNServiceBusHost(IServiceLocator locator) { ServiceBusManager.SetProvider(() => new NServiceBusAbstractor(locator)); }