introduce guard-statement to protect against dupl entries in the dictionary

This commit is contained in:
Steve Bohlen
2012-12-21 10:42:18 -05:00
parent 46f702116e
commit fdb0a57a96

View File

@@ -2811,6 +2811,7 @@ namespace Spring.Objects.Factory.Support
/// naturally implement <see cref="IDisposable"/>).
public void RegisterDisposableObject(String objectName, IDisposable instance)
{
if (disposableObjects.ContainsKey(objectName)) return;
disposableObjects.Add(objectName, instance);
}