This project is read-only.

Component Registration

The MVC Turbine Component Registration API provides a simple way to register components in two ways:
  • Automatically - Let Turbine auto-register components at application.
  • Manually - Have access to the Service Locator to do your own registration.

The API exposes a simple interface, IComponentRegistration, and a delegate, ServiceReg, that allows you to plug into the Turbine pipeline. This types are defined as:

namespace MvcTurbine.ComponentModel
{
    using System;

    /// <summary>
    /// Provides a simple way register components within your application.
    /// </summary>
    public interface IComponentRegistration
    {
        /// <summary>
        /// Registers the components with the specified <see cref="IServiceLocator"/> instance.
        /// </summary>
        /// <param name="locator">Instance of <see cref="IServiceLocator"/> to use.</param>
        void Register(IServiceLocator locator);
    }

    /// <summary>
    /// Defines a way to setup registration for the specified serviceType within the specified <see cref="IServiceLocator"/> instance.
    /// </summary>
    /// <param name="locator">Instance of <see cref="IServiceLocator"/> to use.</param>
    /// <param name="serviceType">The type to register</param>
    public delegate void ServiceReg(IServiceLocator locator, Type serviceType);
}

To learn how to use ServiceReg, visit the Auto Registration section and to learn more about IComponentRegistration, visit the Manual Registration section respectively.

Last edited Sep 24, 2009 at 10:11 PM by jglozano, version 5

Comments

No comments yet.