diff --git a/Spring.Net.2005.sln b/Spring.Net.2005.sln
index 28faa870..dc2c27b0 100644
--- a/Spring.Net.2005.sln
+++ b/Spring.Net.2005.sln
@@ -29,9 +29,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
- ProjectSection(SolutionItems) = preProject
- Spring.build = Spring.build
- EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Services.2005", "src\Spring\Spring.Services\Spring.Services.2005.csproj", "{B58E34CF-6E70-481D-AC87-1BC2D13C21FB}"
ProjectSection(WebsiteProperties) = preProject
@@ -147,6 +144,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate20.20
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.2005", "src\Spring\Spring.Messaging\Spring.Messaging.2005.csproj", "{0E23AE41-D8D8-41C2-84A2-D35564049F0D}"
+ ProjectSection(WebsiteProperties) = preProject
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.Debug = "False"
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Messaging.Tests.2005", "test\Spring\Spring.Messaging.Tests\Spring.Messaging.Tests.2005.csproj", "{41BC3AEA-7EB3-48BF-B1EC-84119376AC98}"
+ ProjectSection(WebsiteProperties) = preProject
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.Debug = "False"
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
@@ -418,6 +427,26 @@ Global
{71368632-B8B7-4A6A-8C65-8DA848120C82}.Release|Any CPU.Build.0 = Release|Any CPU
{71368632-B8B7-4A6A-8C65-8DA848120C82}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{71368632-B8B7-4A6A-8C65-8DA848120C82}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Release|.NET.ActiveCfg = Release|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {0E23AE41-D8D8-41C2-84A2-D35564049F0D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Debug|.NET.ActiveCfg = Debug|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Release|.NET.ActiveCfg = Release|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Release|Any CPU.Build.0 = Release|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {41BC3AEA-7EB3-48BF-B1EC-84119376AC98}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Spring.build b/Spring.build
index 3b32a993..ed92d47a 100644
--- a/Spring.build
+++ b/Spring.build
@@ -201,8 +201,7 @@
-
-
+
@@ -301,11 +300,11 @@
-
+
-
-
-
+
+
+
@@ -669,7 +668,7 @@
-
+
diff --git a/Spring.include b/Spring.include
index 900c7a40..47e7ddac 100644
--- a/Spring.include
+++ b/Spring.include
@@ -203,7 +203,12 @@
-
+
+ -->
+
+
+
+
@@ -386,18 +391,20 @@
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/examples/Spring/Spring.Calculator/Spring.Calculator.build b/examples/Spring/Spring.Calculator/Spring.Calculator.build
index 676a14b2..fde9168c 100644
--- a/examples/Spring/Spring.Calculator/Spring.Calculator.build
+++ b/examples/Spring/Spring.Calculator/Spring.Calculator.build
@@ -2,12 +2,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/examples/Spring/Spring.Examples.build b/examples/Spring/Spring.Examples.build
index 6c9bfc03..c3a8761f 100644
--- a/examples/Spring/Spring.Examples.build
+++ b/examples/Spring/Spring.Examples.build
@@ -2,14 +2,14 @@
-
-
-
-
-
+
+
+
+
+
-
+
@@ -17,3 +17,4 @@
+
diff --git a/examples/Spring/Spring.IoCQuickStart.AppContext/Spring.IocQuickStart.AppContext.build b/examples/Spring/Spring.IoCQuickStart.AppContext/Spring.IocQuickStart.AppContext.build
index dfca8bfb..99874385 100644
--- a/examples/Spring/Spring.IoCQuickStart.AppContext/Spring.IocQuickStart.AppContext.build
+++ b/examples/Spring/Spring.IoCQuickStart.AppContext/Spring.IocQuickStart.AppContext.build
@@ -25,10 +25,11 @@
+
-
\ No newline at end of file
+
diff --git a/examples/Spring/SpringAir/SpringAir.build b/examples/Spring/SpringAir/SpringAir.build
index a498a6c0..37b7b4aa 100644
--- a/examples/Spring/SpringAir/SpringAir.build
+++ b/examples/Spring/SpringAir/SpringAir.build
@@ -2,29 +2,29 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/examples/Spring/SpringAir/test/SpringAir.Core.Tests/SpringAir.Core.Tests.build b/examples/Spring/SpringAir/test/SpringAir.Core.Tests/SpringAir.Core.Tests.build
index 68468eac..edd58665 100644
--- a/examples/Spring/SpringAir/test/SpringAir.Core.Tests/SpringAir.Core.Tests.build
+++ b/examples/Spring/SpringAir/test/SpringAir.Core.Tests/SpringAir.Core.Tests.build
@@ -22,12 +22,24 @@
-
+
+
+
+
+
+
+
+
+
+ outputdir="${current.bin.dir}/results" />
-
+ appconfig="${current.bin.dir}/${project::get-name()}.dll.config" />
+
+
+
diff --git a/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs b/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs
index c468bcee..79649e5d 100644
--- a/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs
+++ b/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs
@@ -113,7 +113,11 @@ namespace Spring.Core.TypeResolution
private static Type LoadTypeDirectlyFromAssembly(TypeAssemblyHolder typeInfo)
{
Type type = null;
- Assembly assembly = Assembly.LoadWithPartialName(typeInfo.AssemblyName);
+#if MONO_2_0
+ Assembly assembly = Assembly.Load(typeInfo.AssemblyName);
+#else
+ Assembly assembly = Assembly.LoadWithPartialName(typeInfo.AssemblyName);
+#endif
if (assembly != null)
{
type = assembly.GetType(typeInfo.TypeName, true, true);
diff --git a/src/Spring/Spring.Core/Expressions/OpLike.cs b/src/Spring/Spring.Core/Expressions/OpLike.cs
index 0b5af217..a85bd05e 100644
--- a/src/Spring/Spring.Core/Expressions/OpLike.cs
+++ b/src/Spring/Spring.Core/Expressions/OpLike.cs
@@ -20,7 +20,7 @@
using System;
using System.Runtime.Serialization;
-#if NET_2_0 && !MONO
+#if NET_2_0 && !MONO_2_0
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
#endif
@@ -59,7 +59,7 @@ namespace Spring.Expressions
///
protected override object Get(object context, EvaluationContext evalContext)
{
-#if NET_2_0 && !MONO
+#if NET_2_0 && !MONO_2_0
string text = Left.GetValueInternal( context, evalContext ) as string;
string pattern = Right.GetValueInternal( context, evalContext ) as string;
@@ -69,4 +69,4 @@ namespace Spring.Expressions
#endif
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Spring/Spring.Core/Expressions/Parser/ExpressionLexer.cs b/src/Spring/Spring.Core/Expressions/Parser/ExpressionLexer.cs
index f80e88df..b3308506 100644
--- a/src/Spring/Spring.Core/Expressions/Parser/ExpressionLexer.cs
+++ b/src/Spring/Spring.Core/Expressions/Parser/ExpressionLexer.cs
@@ -1,4 +1,4 @@
-// $ANTLR 2.7.6 (2005-12-22): "Expression.g" -> "ExpressionLexer.cs"$
+// $ANTLR 2.7.6 (2005-12-22): "Expressions/Expression.g" -> "ExpressionLexer.cs"$
namespace Spring.Expressions
{
@@ -123,18 +123,18 @@ namespace Spring.Expressions
caseSensitiveLiterals = true;
setCaseSensitive(true);
literals = new Hashtable(100, (float) 0.4, null, Comparer.Default);
+ literals.Add("false", 6);
literals.Add("true", 7);
literals.Add("and", 8);
- literals.Add("matches", 14);
literals.Add("in", 10);
literals.Add("null", 15);
- literals.Add("between", 12);
+ literals.Add("matches", 14);
literals.Add("or", 9);
+ literals.Add("between", 12);
literals.Add("is", 11);
literals.Add("like", 13);
literals.Add("new", 46);
literals.Add("date", 52);
- literals.Add("false", 6);
}
override public IToken nextToken() //throws TokenStreamException
diff --git a/src/Spring/Spring.Core/Expressions/Parser/ExpressionParser.cs b/src/Spring/Spring.Core/Expressions/Parser/ExpressionParser.cs
index d7779e60..bb19ddfa 100644
--- a/src/Spring/Spring.Core/Expressions/Parser/ExpressionParser.cs
+++ b/src/Spring/Spring.Core/Expressions/Parser/ExpressionParser.cs
@@ -1,4 +1,4 @@
-// $ANTLR 2.7.6 (2005-12-22): "Expression.g" -> "ExpressionParser.cs"$
+// $ANTLR 2.7.6 (2005-12-22): "Expressions/Expression.g" -> "ExpressionParser.cs"$
namespace Spring.Expressions
{
diff --git a/src/Spring/Spring.Core/Expressions/Parser/ExpressionParserTokenTypes.cs b/src/Spring/Spring.Core/Expressions/Parser/ExpressionParserTokenTypes.cs
index 1f47e89a..bf82456b 100644
--- a/src/Spring/Spring.Core/Expressions/Parser/ExpressionParserTokenTypes.cs
+++ b/src/Spring/Spring.Core/Expressions/Parser/ExpressionParserTokenTypes.cs
@@ -1,4 +1,4 @@
-// $ANTLR 2.7.6 (2005-12-22): "Expression.g" -> "ExpressionLexer.cs"$
+// $ANTLR 2.7.6 (2005-12-22): "Expressions/Expression.g" -> "ExpressionLexer.cs"$
namespace Spring.Expressions
{
diff --git a/src/Spring/Spring.Core/Expressions/Parser/ExpressionParserTokenTypes.txt b/src/Spring/Spring.Core/Expressions/Parser/ExpressionParserTokenTypes.txt
index 5e36c13e..c92e21f2 100644
--- a/src/Spring/Spring.Core/Expressions/Parser/ExpressionParserTokenTypes.txt
+++ b/src/Spring/Spring.Core/Expressions/Parser/ExpressionParserTokenTypes.txt
@@ -1,4 +1,4 @@
-// $ANTLR 2.7.6 (2005-12-22): Expression.g -> ExpressionParserTokenTypes.txt$
+// $ANTLR 2.7.6 (2005-12-22): Expressions/Expression.g -> ExpressionParserTokenTypes.txt$
ExpressionParser // output token vocab name
EXPR=4
OPERAND=5
diff --git a/src/Spring/Spring.Core/Objects/Factory/IObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/IObjectFactory.cs
index efaea2a7..295a8cf9 100644
--- a/src/Spring/Spring.Core/Objects/Factory/IObjectFactory.cs
+++ b/src/Spring/Spring.Core/Objects/Factory/IObjectFactory.cs
@@ -30,13 +30,13 @@ namespace Spring.Objects.Factory
/// The root interface for accessing a Spring.NET IoC container.
///
///
- ///
+ ///
/// This is the basic client view of a Spring.NET IoC container; further interfaces
/// such as and
///
/// are available for specific purposes such as enumeration and configuration.
- ///
- ///
+ ///
+ ///
/// This is the root interface to be implemented by objects that can hold a number
/// of object definitions, each uniquely identified by a
/// name. An independent instance of any of these objects can be obtained
@@ -45,15 +45,15 @@ namespace Spring.Objects.Factory
/// singleton in the scope of the factory). Which type of instance
/// will be returned depends on the object factory configuration - the API is the same.
/// The Singleton approach is more useful and hence more common in practice.
- ///
- ///
+ ///
+ ///
/// The point of this approach is that the IObjectFactory is a central registry of
/// application components, and centralizes the configuring of application components
/// (no more do individual objects need to read properties files, for example).
/// See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a
/// discussion of the benefits of this approach.
- ///
- ///
+ ///
+ ///
/// Normally an IObjectFactory will load object definitions stored in a configuration
/// source (such as an XML document), and use the
/// namespace to configure the objects. However, an implementation could simply return
@@ -61,8 +61,8 @@ namespace Spring.Objects.Factory
/// constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties
/// file etc. Implementations are encouraged to support references amongst objects,
/// to either Singletons or Prototypes.
- ///
- ///
+ ///
+ ///
/// In contrast to the methods in
/// , all of the methods
/// in this interface will also check parent factories if this is an
@@ -70,13 +70,13 @@ namespace Spring.Objects.Factory
/// not found in this factory instance, the immediate parent is asked. Objects in
/// this factory instance are supposed to override objects of the same name in any
/// parent factory.
- ///
- ///
+ ///
+ ///
/// Object factories are supposed to support the standard object lifecycle interfaces
/// as far as possible. The maximum set of initialization methods and their standard
/// order is:
- ///
- ///
+ ///
+ ///
///
/// -
///
@@ -124,12 +124,12 @@ namespace Spring.Objects.Factory
///
///
///
- ///
+ ///
///
- ///
+ ///
/// On shutdown of an object factory, the following lifecycle methods apply:
- ///
- ///
+ ///
+ ///
///
/// -
///
@@ -143,7 +143,7 @@ namespace Spring.Objects.Factory
///
///
///
- ///
+ ///
///
/// Rod Johnson
/// Juergen Hoeller
@@ -154,14 +154,14 @@ namespace Spring.Objects.Factory
/// Is this object a singleton?
///
///
- ///
+ ///
/// That is, will
/// always return the same object?
- ///
- ///
+ ///
+ ///
/// Will ask the parent factory if the object cannot be found in this factory
/// instance.
- ///
+ ///
///
/// The name of the object to query.
/// True if the named object is a singleton.
@@ -195,10 +195,10 @@ namespace Spring.Objects.Factory
/// Does this object factory contain an object with the given name?
///
///
- ///
+ ///
/// Will ask the parent factory if the object cannot be found in this factory
/// instance.
- ///
+ ///
///
/// The name of the object to query.
/// True if an object with the given name is defined.
@@ -208,10 +208,10 @@ namespace Spring.Objects.Factory
/// Return the aliases for the given object name, if defined.
///
///
- ///
+ ///
/// Will ask the parent factory if the object cannot be found in this factory
/// instance.
- ///
+ ///
///
/// The object name to check for aliases.
/// The aliases, or an empty array if none.
@@ -220,27 +220,28 @@ namespace Spring.Objects.Factory
///
string[] GetAliases(string name);
+#if !MONO
///
/// Return an instance (possibly shared or independent) of the given object name.
///
///
- ///
+ ///
/// This method allows an object factory to be used as a replacement for the
/// Singleton or Prototype design pattern.
- ///
- ///
+ ///
+ ///
/// Note that callers should retain references to returned objects. There is no
/// guarantee that this method will be implemented to be efficient. For example,
/// it may be synchronized, or may need to run an RDBMS query.
- ///
- ///
+ ///
+ ///
/// Will ask the parent factory if the object cannot be found in this factory
/// instance.
- ///
- ///
+ ///
+ ///
/// This is the indexer for the
/// interface.
- ///
+ ///
///
/// The name of the object to return.
/// The instance of the object.
@@ -250,25 +251,26 @@ namespace Spring.Objects.Factory
///
/// If the object could not be created.
///
- object this[string name] { get; }
+#endif
+ object this[string name] { get; }
///
/// Return an instance (possibly shared or independent) of the given object name.
///
///
- ///
+ ///
/// This method allows an object factory to be used as a replacement for the
/// Singleton or Prototype design pattern.
- ///
- ///
+ ///
+ ///
/// Note that callers should retain references to returned objects. There is no
/// guarantee that this method will be implemented to be efficient. For example,
/// it may be synchronized, or may need to run an RDBMS query.
- ///
- ///
+ ///
+ ///
/// Will ask the parent factory if the object cannot be found in this factory
/// instance.
- ///
+ ///
///
/// The name of the object to return.
/// The instance of the object.
@@ -284,19 +286,19 @@ namespace Spring.Objects.Factory
/// Return an instance (possibly shared or independent) of the given object name.
///
///
- ///
+ ///
/// This method allows an object factory to be used as a replacement for the
/// Singleton or Prototype design pattern.
- ///
- ///
+ ///
+ ///
/// Note that callers should retain references to returned objects. There is no
/// guarantee that this method will be implemented to be efficient. For example,
/// it may be synchronized, or may need to run an RDBMS query.
- ///
- ///
+ ///
+ ///
/// Will ask the parent factory if the object cannot be found in this factory
/// instance.
- ///
+ ///
///
/// The name of the object to return.
///
@@ -353,23 +355,23 @@ namespace Spring.Objects.Factory
/// Return an instance (possibly shared or independent) of the given object name.
///
///
- ///
+ ///
/// Provides a measure of type safety by throwing an exception if the object is
/// not of the required .
- ///
- ///
+ ///
+ ///
/// This method allows an object factory to be used as a replacement for the
/// Singleton or Prototype design pattern.
- ///
- ///
+ ///
+ ///
/// Note that callers should retain references to returned objects. There is no
/// guarantee that this method will be implemented to be efficient. For example,
/// it may be synchronized, or may need to run an RDBMS query.
- ///
- ///
+ ///
+ ///
/// Will ask the parent factory if the object cannot be found in this factory
/// instance.
- ///
+ ///
///
/// The name of the object to return.
///
@@ -394,12 +396,12 @@ namespace Spring.Objects.Factory
/// Determine the type of the object with the given name.
///
///
- ///
+ ///
/// More specifically, checks the type of object that
/// would return.
/// For an , returns the type
/// of object that the creates.
- ///
+ ///
///
/// The name of the object to query.
///
@@ -432,14 +434,14 @@ namespace Spring.Objects.Factory
/// using the named object definition.
///
///
- ///
+ ///
/// In addition to being generally useful, typically this method is used to provide
/// dependency injection functionality for objects that are instantiated outwith the
/// control of a developer. A case in point is the way that the current (1.1)
/// ASP.NET classes instantiate web controls... the instantiation takes place within
/// a private method of a compiled page, and thus cannot be hooked into the
/// typical Spring.NET IOC container lifecycle for dependency injection.
- ///
+ ///
///
///
/// The following code snippet assumes that the instantiated factory instance
diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectDefinitionReader.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectDefinitionReader.cs
index d10f124b..03eaff4c 100644
--- a/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectDefinitionReader.cs
+++ b/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectDefinitionReader.cs
@@ -208,18 +208,9 @@ namespace Spring.Objects.Factory.Xml
{
try
{
- XmlReader reader = null;
-
- if (SystemUtils.MonoRuntime)
- {
- reader = XmlUtils.CreateReader(stream);
- }
- else
- {
- reader =
+ XmlReader reader =
XmlUtils.CreateValidatingReader(stream, Resolver, NamespaceParserRegistry.GetSchemas(),
- new ValidationEventHandler(HandleValidation));
- }
+ new ValidationEventHandler(HandleValidation));
#region Instrumentation
@@ -325,4 +316,4 @@ namespace Spring.Objects.Factory.Xml
#endregion
}
-}
\ No newline at end of file
+}
diff --git a/src/Spring/Spring.Core/Spring.Core.build b/src/Spring/Spring.Core/Spring.Core.build
index e6c26c8f..c70aa85c 100644
--- a/src/Spring/Spring.Core/Spring.Core.build
+++ b/src/Spring/Spring.Core/Spring.Core.build
@@ -20,7 +20,7 @@
-
+
@@ -29,18 +29,20 @@
-
+
-
+
-
+
+
+
@@ -55,7 +57,7 @@
failonerror="true"/>
-
+
diff --git a/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs b/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs
index 961c2ea0..b6932600 100644
--- a/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs
+++ b/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs
@@ -127,14 +127,14 @@ namespace Spring.Context.Support
/// Since the HttpRuntime discards it's configurationsection cache, we maintain our own context cache.
/// Despite it really speeds up context-lookup, since we don't have to go through the whole HttpConfigurationSystem
///
- private static readonly Hashtable s_webContextCache = new CaseInsensitiveHashtable(); //CollectionsUtil.CreateCaseInsensitiveHashtable();
+ private static readonly Hashtable s_webContextCache = new CaseInsensitiveHashtable();
static WebApplicationContext()
{
// register for ContextRegistry.Cleared event - we need to discard our cache in this case
ContextRegistry.Cleared += new EventHandler(OnContextRegistryCleared);
-#if NET_2_0 && !MONO
+#if NET_2_0 && !MONO_2_0
if (HttpRuntime.AppDomainAppVirtualPath != null) // check if we're within an ASP.NET AppDomain!
{
// ensure HttpRuntime has been fully initialized!
@@ -375,4 +375,4 @@ namespace Spring.Context.Support
return new WebObjectFactory(contextPath, this.CaseSensitive, GetInternalParentObjectFactory());
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Spring/Spring.Web/Spring.Web.build b/src/Spring/Spring.Web/Spring.Web.build
index b2b2f87e..c1e418e1 100644
--- a/src/Spring/Spring.Web/Spring.Web.build
+++ b/src/Spring/Spring.Web/Spring.Web.build
@@ -16,7 +16,7 @@
>
-
+
@@ -30,7 +30,9 @@
-
+
+
+
diff --git a/src/Spring/Spring.Web/Util/ControlCollectionAccessor.cs b/src/Spring/Spring.Web/Util/ControlCollectionAccessor.cs
index c736f651..7b5cd8f5 100644
--- a/src/Spring/Spring.Web/Util/ControlCollectionAccessor.cs
+++ b/src/Spring/Spring.Web/Util/ControlCollectionAccessor.cs
@@ -33,9 +33,14 @@ namespace Spring.Util
/// Erich Eichinger
internal class ControlCollectionAccessor
{
- private static readonly IDynamicField _owner = new SafeField(typeof (ControlCollection).GetField("_owner", BindingFlags.Instance | BindingFlags.NonPublic));
+#if MONO_2_0
+ private static readonly IDynamicField _owner = new SafeField(typeof (ControlCollection).GetField("owner", BindingFlags.Instance | BindingFlags.NonPublic));
+#else
+ private static readonly IDynamicField _owner = new SafeField(typeof (ControlCollection).GetField("_owner", BindingFlags.Instance | BindingFlags.NonPublic));
+#endif
+
private readonly ControlCollection _controls;
- private readonly Type _controlsType;
+ private readonly Type _controlsType;
///
/// Returns the underlying ControlCollection instance.
@@ -72,4 +77,4 @@ namespace Spring.Util
set { _owner.SetValue(_controls, value); }
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Spring/Spring.Web/Util/ISessionState.cs b/src/Spring/Spring.Web/Util/ISessionState.cs
index 0f2498a9..6a48e114 100644
--- a/src/Spring/Spring.Web/Util/ISessionState.cs
+++ b/src/Spring/Spring.Web/Util/ISessionState.cs
@@ -38,7 +38,7 @@ namespace Spring.Util
///
int CodePage { get; set; }
-#if NET_2_0
+#if NET_2_0 && !MONO
///
///
///
diff --git a/src/Spring/Spring.Web/Util/VirtualEnvironment.cs b/src/Spring/Spring.Web/Util/VirtualEnvironment.cs
index b7be76af..575426e8 100644
--- a/src/Spring/Spring.Web/Util/VirtualEnvironment.cs
+++ b/src/Spring/Spring.Web/Util/VirtualEnvironment.cs
@@ -219,7 +219,7 @@ namespace Spring.Util
get { return _sessionState.CodePage; }
set { _sessionState.CodePage = value; }
}
-#if NET_2_0
+#if NET_2_0 && !MONO
public HttpCookieMode CookieMode
{
get { return _sessionState.CookieMode; }
diff --git a/src/Spring/Spring.Web/Web/Providers/ConfigurableActiveDirectoryMembershipProvider.cs b/src/Spring/Spring.Web/Web/Providers/ConfigurableActiveDirectoryMembershipProvider.cs
index ac2da7ba..3ada94ff 100644
--- a/src/Spring/Spring.Web/Web/Providers/ConfigurableActiveDirectoryMembershipProvider.cs
+++ b/src/Spring/Spring.Web/Web/Providers/ConfigurableActiveDirectoryMembershipProvider.cs
@@ -18,7 +18,7 @@
#endregion
-#if NET_2_0
+#if NET_2_0 && !MONO
#region Imports
diff --git a/src/Spring/Spring.Web/Web/Support/PageHandlerFactory.cs b/src/Spring/Spring.Web/Web/Support/PageHandlerFactory.cs
index dfda7610..59ad6166 100644
--- a/src/Spring/Spring.Web/Web/Support/PageHandlerFactory.cs
+++ b/src/Spring/Spring.Web/Web/Support/PageHandlerFactory.cs
@@ -167,10 +167,16 @@ namespace Spring.Web.Support
///
internal class PageHandlerWrapper : Page, IHttpHandler
{
-#if NET_2_0
+#if NET_2_0 && !MONO_2_0
private static readonly FieldInfo fiHttpContext_CurrentHandler =
typeof(HttpContext).GetField("_currentHandler", BindingFlags.NonPublic | BindingFlags.Instance);
- private static readonly MethodInfo miPage_SetPreviousPage =
+#endif
+#if MONO_2_0
+ private static readonly FieldInfo fiHttpContext_CurrentHandler =
+ typeof(HttpContext).GetField("handler", BindingFlags.NonPublic | BindingFlags.Instance);
+#endif
+#if NET_2_0 || !MONO_2_0
+ private static readonly MethodInfo miPage_SetPreviousPage =
typeof(System.Web.UI.Page).GetMethod("SetPreviousPage", BindingFlags.NonPublic | BindingFlags.Instance);
#endif
@@ -277,11 +283,15 @@ namespace Spring.Web.Support
{
System.Web.UI.Page page = (Page) handler;
+// TODO: to fix this would require a change to the Mono source as there is no mechanisim (public or private) for explicitly setting the
+// PreviousPage at the moment
+#if !MONO_2_0
// During Server.Transfer/Execute() the PreviousPage property gets set
if (this.PreviousPage != null)
{
miPage_SetPreviousPage.Invoke(page, new object[] { this.PreviousPage });
}
+#endif
}
#endif
@@ -420,4 +430,4 @@ namespace Spring.Web.Support
{
}
}
-}
\ No newline at end of file
+}
diff --git a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.build b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.build
index 60044192..8ff2acbd 100644
--- a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.build
+++ b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.build
@@ -18,7 +18,7 @@
output="${current.bin.dir}/${project::get-name()}.dll"
doc="${current.bin.dir}/${project::get-name()}.xml">
-
+
@@ -42,27 +42,33 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -79,9 +85,14 @@
+
+
+
+
+
+
+
+
+
+
+