Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- upped version number to 2.5.1

- updated changes.txt
- cosmetic changes in how issues in potential lifestyle mismatches view are displayed based on feedback I got.
  • Loading branch information...
commit 423e76595ba01d9796a29d3057fcdb1d48e116e9 1 parent 7e46cbe
@kkozmic kkozmic authored
View
25 Changes.txt
@@ -1,12 +1,23 @@
-unreleased changes
+2.5.1 (2010-09-21)
==================
+
+- added "Potential lifestyle mismatches" debugger view item, that will detect and list situations where Singleton depends on Transient or PerWebRequest component (which is usually a bug)
+
+- fixed issue where forwarding main type would create additional, superfluous handler
+
+- WebLogger/WebLoggerFactory was removed from Castle.Core so all references to that are removed from Windsor as well
+
+- obseleted UseSingleProxyInterface in preference over IProxyGenerationHook
+
+- fixed IOC-220 Composite pattern with CollectionResolver should be properly supported without throwing "cycle detected" exception
+
- fixed IOC-218 Enable methods that take arguments as anonymous objects in Silverlight version. This works in SL, but requires [assembly: InternalsVisibleTo(Castle.Core.Internal.InternalsVisible.ToCastleCore)]
-- fixed IOC-217 Enable ISupportInitialize support as lifecyclecle concern
+- fixed IOC-217 Enable ISupportInitialize support as lifecyclecle concern in Silverlight 4
-- implemented IOC-216 Make it possible to specify service overrides in DependsOn, either via Property, or ServiceOverride entry class.
+- implemented IOC-216 Make it possible to specify service overrides in DependsOn, either via Property, or ServiceOverride entry class
-- implemented IOC-215 Hide obsolete members from IntelliSense
+- implemented IOC-215 Hide obsolete members from IntelliSense (in basic view. By default in VB they won't be showed, but will in C# :( )
- fixed IOC-214 Missing bracket in obsolete warning text
@@ -18,7 +29,11 @@ unreleased changes
- fixed IOC-209 Bug in constructor selection when resolving - Windsor would pick unresolvable constructor
-- Reverted back (to the way it was in v2.1) conditional registration of helper components used by TypedFactoryFacility as it would cause issues when used with nested containers (see the new test and thread "Typed Factories in sub Container (differences between 2.5 and 2.1)" on users group)
+- reverted back (to the way it was in v2.1) conditional registration of helper components used by TypedFactoryFacility as it would cause issues when used with nested containers (see the new test and thread "Typed Factories in sub Container (differences between 2.5 and 2.1)" on users group)
+
+- added framework information the assembly was built for to the AssemblyTitle attribute
+
+- improved how late bound types are displayed in debugger
- fixed bug where count of potentially misconfigured components would show invalid value
View
2  Settings.proj
@@ -36,7 +36,7 @@ limitations under the License.
<!-- Versioning -->
<Project_Major>2</Project_Major>
<Project_Minor>5</Project_Minor>
- <Project_Build>0</Project_Build>
+ <Project_Build>1</Project_Build>
<!-- Project folders -->
<BuildScriptsPath Condition="'$(BuildScriptsPath)' ==''">$(RootPath)\buildscripts</BuildScriptsPath>
View
34 src/Castle.Windsor.Tests/Experimental/ProblematicDependenciesTestCase.cs
@@ -18,6 +18,7 @@ namespace Castle.Windsor.Tests.Experimental
using Castle.MicroKernel;
using Castle.MicroKernel.Registration;
+ using Castle.MicroKernel.Tests.ClassComponents;
using Castle.Windsor.Experimental.Debugging;
using Castle.Windsor.Experimental.Debugging.Primitives;
using Castle.Windsor.Tests.ClassComponents;
@@ -52,27 +53,38 @@ public void Can_detect_singleton_depending_on_transient_directly_and_indirectly(
}
[Test]
- public void Can_detect_singleton_depending_on_two_transients_directly_and_indirectly()
+ public void Can_detect_singleton_depending_on_transient_indirectly()
{
- Container.Register(Component.For<CBA>().LifeStyle.Singleton,
- Component.For<B>().LifeStyle.Transient,
- Component.For<A>().LifeStyle.Transient);
+ Container.Register(Component.For<C>().LifeStyle.Singleton,
+ Component.For<B>().LifeStyle.Singleton,
+ Component.For<A>().LifeStyle.Transient);
- var items = GetMismatches();
- Assert.AreEqual(2, items.Length);
- var cbaMismatches = items.Where(i => i.Components.First().Handler.Service == typeof(CBA)).ToArray();
- Assert.AreEqual(2, cbaMismatches.Length);
+ var mismatches = GetMismatches();
+ Assert.AreEqual(2, mismatches.Length);
}
[Test]
- public void Can_detect_singleton_depending_on_transient_indirectly()
+ public void Can_detect_singleton_depending_on_transient_indirectly_via_custom_lifestyle()
{
Container.Register(Component.For<C>().LifeStyle.Singleton,
- Component.For<B>().LifeStyle.Singleton,
+ Component.For<B>().LifeStyle.Custom<CustomLifestyleManager>(),
Component.For<A>().LifeStyle.Transient);
var mismatches = GetMismatches();
- Assert.AreEqual(2, mismatches.Length);
+ Assert.AreEqual(1, mismatches.Length);
+ }
+
+ [Test]
+ public void Can_detect_singleton_depending_on_two_transients_directly_and_indirectly()
+ {
+ Container.Register(Component.For<CBA>().LifeStyle.Singleton,
+ Component.For<B>().LifeStyle.Transient,
+ Component.For<A>().LifeStyle.Transient);
+
+ var items = GetMismatches();
+ Assert.AreEqual(2, items.Length);
+ var cbaMismatches = items.Where(i => i.Components.First().Handler.Service == typeof(CBA)).ToArray();
+ Assert.AreEqual(2, cbaMismatches.Length);
}
[SetUp]
View
5 src/Castle.Windsor/Windsor/Experimental/Debugging/Primitives/LifestyleDependency.cs
@@ -92,7 +92,7 @@ private MismatchedDependency GetItem()
private string GetKey()
{
- return string.Format("\"{0}\" {1}", component.Name, component.Model.GetLifestyleDescription());
+ return string.Format("\"{0}\" »{1}«", component.Name, component.Model.GetLifestyleDescription());
}
private string GetMismatchMessage(IList<MetaComponent> items)
@@ -111,7 +111,8 @@ private string GetMismatchMessage(IList<MetaComponent> items)
private string GetName(MetaComponent root)
{
- return string.Format("\"{0}\" {1} ->", root.Name, root.Model.GetLifestyleDescription());
+ var indirect = (parent.component == root) ? string.Empty : "indirectly ";
+ return string.Format("\"{0}\" »{1}« {2}depends on", root.Name, root.Model.GetLifestyleDescription(), indirect);
}
private bool ImTheRoot()
View
1  src/Castle.Windsor/Windsor/Experimental/Debugging/Primitives/MismatchedDependency.cs
@@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
+
namespace Castle.Windsor.Experimental.Debugging.Primitives
{
using System.Diagnostics;
Please sign in to comment.
Something went wrong with that request. Please try again.