Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21752/src/Spring/Spring.Core/Objects/Factory/Support
Modified Files:
AbstractAutowireCapableObjectFactory.cs
Log Message:
fixed SPRNET-862
Index: AbstractAutowireCapableObjectFactory.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/AbstractAutowireCapableObjectFactory.cs,v
retrieving revision 1.84
retrieving revision 1.85
diff -C2 -d -r1.84 -r1.85
*** AbstractAutowireCapableObjectFactory.cs 4 Feb 2008 22:44:03 -0000 1.84
--- AbstractAutowireCapableObjectFactory.cs 20 Mar 2008 10:35:54 -0000 1.85
***************
*** 23,26 ****
--- 23,27 ----
using System;
using System.Collections;
+ using System.Collections.Specialized;
using System.Globalization;
using System.Reflection;
***************
*** 31,34 ****
--- 32,36 ----
using Spring.Core.TypeConversion;
using Spring.Core.TypeResolution;
+ using Spring.Expressions;
using Spring.Objects;
using Spring.Objects.Factory.Config;
***************
*** 1798,1802 ****
ExpressionHolder expHolder = (ExpressionHolder) argumentValue;
object context = null;
! object variables = null;
if (expHolder.Properties != null)
--- 1800,1804 ----
ExpressionHolder expHolder = (ExpressionHolder) argumentValue;
object context = null;
! IDictionary variables = null;
if (expHolder.Properties != null)
***************
*** 1808,1818 ****
contextProperty.Value);
PropertyValue variablesProperty = expHolder.Properties.GetPropertyValue("Variables");
! variables = variablesProperty == null
! ? null
! : ResolveValueIfNecessary(name, definition, "Variables",
! variablesProperty.Value);
}
! resolvedValue = expHolder.Expression.GetValue(context, (IDictionary) variables);
}
else if (argumentValue is IManagedCollection)
--- 1810,1832 ----
contextProperty.Value);
PropertyValue variablesProperty = expHolder.Properties.GetPropertyValue("Variables");
! object vars = (variablesProperty == null
! ? null
! : ResolveValueIfNecessary(name, definition, "Variables",
! variablesProperty.Value));
! if (vars is IDictionary)
! {
! variables = (IDictionary) vars;
! }
! else
! {
! if (vars != null) throw new ArgumentException("'Variables' must resolve to an IDictionary");
! }
}
! if (variables == null) variables = CollectionsUtil.CreateCaseInsensitiveHashtable();
! // add 'this' objectfactory reference to variables
! variables.Add( Expression.ReservedVariableNames.CurrentObjectFactory, this );
!
! resolvedValue = expHolder.Expression.GetValue(context, variables);
}
else if (argumentValue is IManagedCollection)
|