Skip to content
simonthorogood edited this page Dec 18, 2010 · 1 revision

OpenRasta’s initialization process relies on a host environment. Such a host, implementing the IHost interface, needs to be registered.

Initialization flow

  1. Host registration through HostManager.RegisterHost(IHost host)
  2. Host raises the Start event
  3. The host manager queries the host’s ResolverAccessor property.
    1. If the property is null, the host manager initializes the default dependency manager
    2. If the property is not null, the host manager uses the dependency manager provided by the host
  4. The host manager registers the dependency resolver in itself for the components that rely on controlling their dependencies’ lifetime
  5. The host manager lets the host register the root dependencies by calling the ConfigureRootDependencies method.
  6. The host manager ensures that the minimal dependencies have been registered correctly (see Host root dependencies)
  7. The host manager intializes the IDependencyRegistrar instance registered in the dependency manager, or the DefaultDependencyRegistrar if none was found.
  8. The host manager lets the host register the leaf dependencies by calling the ConfigureLeafDependencies method.
  9. The host manager marks the configuration as complete.

Notifying of a new request

When the host detects a new incoming request, it must raise its IncomingRequest event with a new instance of an ICommunicationContext type. The host manager will be responsible for including the context, request and response objects in the container.

Clone this wiki locally