- source.zip
- MetaContainer
- Libs
- Autofac.dll
- Castle.Core.dll
- Castle.DynamicProxy2.dll
- Castle.MicroKernel.dll
- Castle.Windsor.dll
- Microsoft.Practices.ObjectBuilder2.dll
- Microsoft.Practices.ServiceLocation.dll
- Microsoft.Practices.Unity.dll
- nunit.framework.dll
- Rhino.Mocks.dll
- MetaContainer.Autofac
- MetaContainer.Castle
- MetaContainer.sln
- MetaContainer.Unity
- MetaContainer.vssscc
- MetaContainer
- Samples.MetaContainer.MoneyExchangeSample.ConsoleHost
- Samples.MetaContainer.MoneyExchangeSample.ContainerAbstraction
- Samples.MetaContainer.MoneyExchangeSample.DomainModel
- Tests.MetaContainer.Autofac
- Tests.MetaContainer.Castle
- Tests.MetaContainer.Unity
- Tests.MetaContainer
|
using System;
using Microsoft.Practices.ServiceLocation;
namespace MetaContainer
{
/// <summary>
/// A simple abstract interface over any dependency injection container.
/// </summary>
public interface IMetaContainer : IServiceLocator
{
/// <summary>
/// Registers mapping from service interface <paramref name="from"/> to implementation class
/// <paramref name="to"/> named <paramref name="name"/> and with <paramref name="scope"/> scope.
/// </summary>
/// <param name="from">Service interface type.</param>
/// <param name="to">Service implementation type.</param>
/// <param name="name">Name of the mapping (if named, otherwise - null).</param>
/// <param name="scope">Scope or lifestyle of a component.</param>
void Register(Type from, Type to, string name, Scope scope);
/// <summary>
/// Registers mapping from service interface <paramref name="from"/> to a method <paramref name="factoryMethod"/> producing
/// service implementation objects. Mapping is named <paramref name="name"/> and is defined with
/// <paramref name="scope"/>.
/// </summary>
/// <param name="from">Service interface type.</param>
/// <param name="factoryMethod">A method producing service implementations.</param>
/// <param name="name">Name of the mapping (if named, otherwise - null).</param>
/// <param name="scope">Scope or lifestyle of a component.</param>
void Register(Type from, Func<string, object> factoryMethod, string name, Scope scope);
/// <summary>
/// Creates child container for current container.
/// </summary>
/// <returns>A child container instance or null, if infrastructure doesn't support child
/// container feature.</returns>
IMetaContainer CreateChildContainer();
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.