User: cneuwirt
Date: 2008/09/05 07:49 AM
Modified:
/trunk/InversionOfControl/Castle.MicroKernel.Tests/Registration/
AllTypesTestCase.cs
/trunk/InversionOfControl/Castle.MicroKernel/Registration/Strategies/
BasedOnDescriptor.cs
Log:
Allow for return valued configuration expressions in registration.
File Changes:
Directory: /trunk/InversionOfControl/Castle.MicroKernel.Tests/Registration/
===========================================================================
File [modified]: AllTypesTestCase.cs
Delta lines: +0 -0
===================================================================
Directory: /trunk/InversionOfControl/Castle.MicroKernel/Registration/Strategies/
================================================================================
File [modified]: BasedOnDescriptor.cs
Delta lines: +14 -1
===================================================================
---
trunk/InversionOfControl/Castle.MicroKernel.Tests/Registration/AllTypesTestCase.cs
2008-09-02 07:46:49 UTC (rev 5305)
+++
trunk/InversionOfControl/Castle.MicroKernel.Tests/Registration/AllTypesTestCase.cs
2008-09-05 14:49:35 UTC (rev 5306)
@@ -208,6 +208,20 @@
}
[Test]
+ public void
RegisterAssemblyTypes_WithLinqConfigurationReturningValue_RegisteredInContainer()
+ {
+ kernel.Register(AllTypes.Of<ICommon>()
+ .FromAssembly(Assembly.GetExecutingAssembly())
+ .Configure(component =>
component.LifeStyle.Transient)
+ );
+
+ foreach (IHandler handler in
kernel.GetAssignableHandlers(typeof(ICommon)))
+ {
+ Assert.AreEqual(LifestyleType.Transient,
handler.ComponentModel.LifestyleType);
+ }
+ }
+
+ [Test]
public void
RegisterMultipleAssemblyTypes_BasedOn_RegisteredInContainer()
{
kernel.Register(
@@ -264,4 +278,4 @@
Assert.AreEqual(1, handlers.Length);
}
}
-}
\ No newline at end of file
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Commits" 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/castle-project-commits?hl=en
-~----------~----~----~----~------~----~------~--~---