User: xtoff
Date: 2009/12/18 08:48 AM
Modified:
/InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Lifestyle/
LifestyleManagerTestCase.cs
/InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Lifestyle/Components/
PerWebRequestComponent.cs
/InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Registration/
ComponentRegistrationTestCase.cs
/InversionOfControl/trunk/src/Castle.MicroKernel/Handlers/
AbstractHandler.cs
/InversionOfControl/trunk/src/Castle.MicroKernel/Lifestyle/
PerWebRequestLifestyleManager.cs
/InversionOfControl/trunk/src/Castle.MicroKernel/Registration/Lifestyle/
LifestyleGroup.cs, PerWebRequest.cs
Log:
Applied patch from Simon Cropp for IOC-ISSUE-176 - No need for PerWebRequest
in silverlight
File Changes:
Directory:
/InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Lifestyle/Components/
=======================================================================================
File [modified]: PerWebRequestComponent.cs
Delta lines: +4 -0
===================================================================
---
InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Lifestyle/LifestyleManagerTestCase.cs
2009-12-18 15:42:28 UTC (rev 6453)
+++
InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Lifestyle/LifestyleManagerTestCase.cs
2009-12-18 15:48:07 UTC (rev 6454)
@@ -77,13 +77,17 @@
TestHandlersLifestyle(typeof(NoInfoComponent),
LifestyleType.Singleton, false);
TestHandlersLifestyle(typeof(NoInfoComponent),
LifestyleType.Thread, false);
TestHandlersLifestyle(typeof(NoInfoComponent),
LifestyleType.Transient, false);
+#if (!SILVERLIGHT)
TestHandlersLifestyle(typeof(NoInfoComponent),
LifestyleType.PerWebRequest, false);
+#endif
TestHandlersLifestyleWithService(typeof(NoInfoComponent),
LifestyleType.Transient, false);
TestHandlersLifestyleWithService(typeof(NoInfoComponent),
LifestyleType.Singleton, false);
TestHandlersLifestyleWithService(typeof(NoInfoComponent), LifestyleType.Thread,
false);
TestHandlersLifestyleWithService(typeof(NoInfoComponent),
LifestyleType.Transient, false);
+#if (!SILVERLIGHT)
TestHandlersLifestyleWithService(typeof(NoInfoComponent),
LifestyleType.PerWebRequest, false);
+#endif
TestLifestyleAndSameness(typeof(PerThreadComponent),
LifestyleType.Transient, true, false);
Directory: /InversionOfControl/trunk/src/Castle.MicroKernel/Handlers/
=====================================================================
File [modified]: AbstractHandler.cs
Delta lines: +2 -3
===================================================================
---
InversionOfControl/trunk/src/Castle.MicroKernel/Lifestyle/PerWebRequestLifestyleManager.cs
2009-12-18 15:42:28 UTC (rev 6453)
+++
InversionOfControl/trunk/src/Castle.MicroKernel/Lifestyle/PerWebRequestLifestyleManager.cs
2009-12-18 15:48:07 UTC (rev 6454)
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#if (!SILVERLIGHT)
namespace Castle.MicroKernel.Lifestyle
{
using System;
@@ -22,9 +23,7 @@
/// Implements a Lifestyle Manager for Web Apps that
/// create at most one object per web request.
/// </summary>
-#if (!SILVERLIGHT)
[Serializable]
-#endif
public class PerWebRequestLifestyleManager : AbstractLifestyleManager
{
private string PerRequestObjectID =
"PerRequestLifestyleManager_" + Guid.NewGuid();
@@ -136,4 +135,5 @@
}
#endregion
-}
\ No newline at end of file
+}
Directory: /InversionOfControl/trunk/src/Castle.MicroKernel/Lifestyle/
======================================================================
File [modified]: PerWebRequestLifestyleManager.cs
Delta lines: +3 -1
===================================================================
---
InversionOfControl/trunk/src/Castle.MicroKernel/Registration/Lifestyle/LifestyleGroup.cs
2009-12-18 15:42:28 UTC (rev 6453)
+++
InversionOfControl/trunk/src/Castle.MicroKernel/Registration/Lifestyle/LifestyleGroup.cs
2009-12-18 15:48:07 UTC (rev 6454)
@@ -48,11 +48,13 @@
{
get { return AddDescriptor(new PerThread<S>()); }
}
-
+
+#if (!SILVERLIGHT)
public ComponentRegistration<S> PerWebRequest
{
get { return AddDescriptor(new PerWebRequest<S>()); }
}
+#endif
public ComponentRegistration<S> Pooled
Directory:
/InversionOfControl/trunk/src/Castle.MicroKernel/Registration/Lifestyle/
===================================================================================
File [modified]: LifestyleGroup.cs
Delta lines: +3 -1
===================================================================
---
InversionOfControl/trunk/src/Castle.MicroKernel/Registration/Lifestyle/PerWebRequest.cs
2009-12-18 15:42:28 UTC (rev 6453)
+++
InversionOfControl/trunk/src/Castle.MicroKernel/Registration/Lifestyle/PerWebRequest.cs
2009-12-18 15:48:07 UTC (rev 6454)
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#if (!SILVERLIGHT)
namespace Castle.MicroKernel.Registration.Lifestyle
{
using Castle.Core;
@@ -23,4 +24,5 @@
{
}
}
-}
\ No newline at end of file
+}
+#endif
File [modified]: PerWebRequest.cs
Delta lines: +3 -1
===================================================================
---
InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Lifestyle/Components/PerWebRequestComponent.cs
2009-12-18 15:42:28 UTC (rev 6453)
+++
InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Lifestyle/Components/PerWebRequestComponent.cs
2009-12-18 15:48:07 UTC (rev 6454)
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#if (!SILVERLIGHT)
namespace Castle.MicroKernel.Tests.Lifestyle.Components
{
using Castle.Core;
@@ -35,4 +36,5 @@
#endregion
}
-}
\ No newline at end of file
+}
+#endif
Directory: /InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Lifestyle/
============================================================================
File [modified]: LifestyleManagerTestCase.cs
Delta lines: +3 -1
===================================================================
---
InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Registration/ComponentRegistrationTestCase.cs
2009-12-18 15:42:28 UTC (rev 6453)
+++
InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Registration/ComponentRegistrationTestCase.cs
2009-12-18 15:48:07 UTC (rev 6454)
@@ -244,7 +244,8 @@
IHandler handler = kernel.GetHandler("customer");
Assert.AreEqual(LifestyleType.Thread,
handler.ComponentModel.LifestyleType);
}
-
+
+#if (!SILVERLIGHT)
[Test]
public void AddComponent_WithPerWebRequestLifestyle_WorksFine()
{
@@ -258,6 +259,7 @@
IHandler handler = kernel.GetHandler("customer");
Assert.AreEqual(LifestyleType.PerWebRequest,
handler.ComponentModel.LifestyleType);
}
+#endif
[Test]
Directory: /InversionOfControl/trunk/src/Castle.MicroKernel.Tests/Registration/
===============================================================================
File [modified]: ComponentRegistrationTestCase.cs
Delta lines: +0 -0
===================================================================
--
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.