Exemplo n.º 1
0
        static RuntimeBase()
        {
            var busConfiguration = new BusConfigurationSection();

            busConfiguration.Bus.Endpoint = "msmq://localhost/Dagent.nuget";
            ServiceBusManager.SetProvider(() => new RhinoServiceBusAbstractor(busConfiguration));
        }
Exemplo n.º 2
0
 /// <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>()
                                   );
 }
Exemplo n.º 4
0
        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));
 }