You have a couple options. Pass the container to the bootstrapper's
constructor. Or register your services in the bootstrapper. Each container
specific bootstrapper has a Container property that is accessible from
within the bootstrapper. Or you can bootstrap things yourself with the code
that you saw in the tests. My preference is to do the bootstrapping in my
own code. The host doesn't buy you a lot if you're just trying to run the
bus from within your own app. I will typically use the host classes when
hosting a windows service and the bus endpoing IS the application. Does that
make sense?

On Mon, Aug 8, 2011 at 11:06 PM, MichaelK <[email protected]> wrote:

> Hi All,
>
> Sorry for the maybe very noobie question but I am just starting to
> play around with RSB. So far I really like how easy it was to get up
> and running but I am a bit confused regarding IoC containers and
> registering my own stuff
>
> 1) I like how easy it is to use the IoC library of choice since you
> have them all defined. For example I got autofac working by creating
> this class
>
> public class BootStrapper : AutofacBootStrapper
> {
> }
>
> and then in program main calling this and all RSB stuff was registered
> for me...awesome!
>
> var host = new DefaultHost();
> host.Start<Bootstrapper>();
>
> Then reviewing the unit Tests I see...
>
>  new RhinoServiceBusConfiguration()
>                .UseAutofac(container)
>                .Configure();
>
> My question is this. What is the proper way to register my own
> services? Can I use the BootStrapper class and override a method? Or
> if you want to register your own stuff you need to use the 2nd
> approach. Basically looking for some guidance as I would assume both
> approaches would work.
>
> Thanks in advance
> -Michael
>
> --
> You received this message because you are subscribed to the Google Groups
> "Rhino Tools Dev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rhino-tools-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to