Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- fixing silverlight builds... what else?

  • Loading branch information...
commit b75e7c08dd022acff0d80d565a4fd7c3b54bcbee 1 parent 65cf2dd
@kkozmic kkozmic authored
View
2  src/Castle.Windsor.Tests/Registration/DynamicParametersTestCase.cs
@@ -245,7 +245,7 @@ public void Properly_releases_tracked_dendendencies_im_multithreaded_scenarios()
}
foreach (var thread in threads)
{
- Assert.True(thread.Join(TimeSpan.FromSeconds(30)));
+ Assert.True(thread.Join((int)TimeSpan.FromSeconds(30).TotalMilliseconds));
}
Assert.AreEqual(0, count);
View
12 src/Castle.Windsor/Facilities/TypedFactory/Internal/TypedFactoryInterceptor.cs
@@ -134,7 +134,11 @@ private void CollectDeadReferences()
}
resolveCount = 0;
+#if SL3
+ var instances = new List<object>();
+#else
var instances = new HashSet<object>(new ReferenceEqualityComparer());
+#endif
var newList = new List<WeakReference>();
foreach (var reference in resolvedTrackedComponents)
{
@@ -147,10 +151,18 @@ private void CollectDeadReferences()
{
continue;
}
+#if SL3
+ if(instances.Any(existing=> ReferenceEquals(existing,instances)) == false)
+ {
+ instances.Add(instance);
+ newList.Add(reference);
+ }
+#else
if (instances.Add(instance))
{
newList.Add(reference);
}
+#endif
}
resolvedTrackedComponents.Clear();
resolvedTrackedComponents.AddRange(newList);
Please sign in to comment.
Something went wrong with that request. Please try again.