My favorites | Sign in
Project Logo
                
People details
Project owners:
  wiryadi.adidharma

Fluent Spring is a DSL (Domain Specific Language) to configure Spring.NET container. It enable fluent programmatic configuration of Spring.NET.

This is how you would use the configurator:

using FluentSpring;
using Spring.Context;
 
...
 
  configurator = new FluentConfigurator();

  configurator.Register<SimpleClass>().AsSelf();

  configurator.Register<ClassWithConstructorParam>().AsSelf()
    .BindCtorArg().To<SimpleClass>();

  IApplicationContext appContext = configurator.ToSpring();

  ClassWithConstructorParam myObject = appContext.GetObject<ClassWithConstructorParam>();
  Assert.IsNotNull(myObject);
  Assert.IsNotNull(myObject.Arg1);

For detailed code, check out the unit tests in ResolveConstructorDependencyTest.cs Take a look at









Hosted by Google Code