Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 40 lines (36 sloc) 1.146 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Routing;
using FubuCore;
using FubuCore.Binding;
using FubuMVC.Core;
using FubuMVC.Core.Registration;
using FubuMVC.Core.Runtime;
using FubuMVC.StructureMap;
using Rhino.ServiceBus;
using Rhino.ServiceBus.Impl;
using Rhino.ServiceBus.MessageModules;
using StructureMap;

namespace FubuTransportation
{
    class Program
    {
        static void Main(string[] args)
        {
            var container = new Container();
            container.Configure(x => x.For<IMessageModule>().Singleton().Use<FubuTransportationMessageModule>());
            new RhinoServiceBusConfiguration()
                .UseStructureMap(container)
                .Configure();

            var inputMessage = new Input{Message = "Test", CorrelationId = Guid.NewGuid()};
            FubuApplication.For<TransportationRegistry>()
                .StructureMap(container)
                .Bootstrap();

            var bus = container.GetInstance<IStartableServiceBus>();
            bus.Start();
            bus.Send(inputMessage);

            Console.ReadKey();
        }
    }
}
Something went wrong with that request. Please try again.