/// Instantiates and populates the underlying
/// with the object
@@ -200,16 +219,23 @@ namespace Spring.Context.Support
///
///
/// In the case of errors encountered reading any of the resources
- /// yielded by the method.
+ /// yielded by either the or
+ /// the methods.
///
- protected virtual void LoadObjectDefinitions(
- XmlObjectDefinitionReader objectDefinitionReader)
+ protected virtual void LoadObjectDefinitions(XmlObjectDefinitionReader objectDefinitionReader)
{
string[] locations = ConfigurationLocations;
if (locations != null)
{
- objectDefinitionReader.LoadObjectDefinitions(ConfigurationLocations);
+ objectDefinitionReader.LoadObjectDefinitions(locations);
}
+
+ IResource[] resources = ConfigurationResources;
+ if (resources != null)
+ {
+ objectDefinitionReader.LoadObjectDefinitions(resources);
+ }
+
}
diff --git a/src/Spring/Spring.Core/Context/Support/AbstractXmlApplicationContextArgs.cs b/src/Spring/Spring.Core/Context/Support/AbstractXmlApplicationContextArgs.cs
new file mode 100644
index 00000000..fd8c992f
--- /dev/null
+++ b/src/Spring/Spring.Core/Context/Support/AbstractXmlApplicationContextArgs.cs
@@ -0,0 +1,53 @@
+#region License
+
+/*
+ * Copyright © 2002-2005 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Spring.Core.IO;
+
+namespace Spring.Context.Support
+{
+ public abstract class AbstractXmlApplicationContextArgs
+ {
+
+ public virtual bool CaseSensitive { get; set; }
+
+ public virtual string[] ConfigurationLocations { get; set; }
+
+ public virtual IResource[] ConfigurationResources { get; set; }
+
+ public virtual string Name { get; set; }
+
+ public virtual IApplicationContext ParentContext { get; set; }
+
+ public virtual bool Refresh { get; set; }
+
+ ///
+ /// Initializes a new instance of the AbstractXmlApplicationContextArgs class.
+ ///
+ public AbstractXmlApplicationContextArgs()
+ {
+ ConfigurationLocations = new string[0];
+ ConfigurationResources = new IResource[0];
+ }
+
+ }
+}
diff --git a/src/Spring/Spring.Core/Context/Support/XmlApplicationContext.cs b/src/Spring/Spring.Core/Context/Support/XmlApplicationContext.cs
index 80cd607e..aa9e82b0 100644
--- a/src/Spring/Spring.Core/Context/Support/XmlApplicationContext.cs
+++ b/src/Spring/Spring.Core/Context/Support/XmlApplicationContext.cs
@@ -1,237 +1,286 @@
-#region License
-
-/*
- * Copyright © 2002-2005 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
-
-#endregion
-
-using Spring.Util;
+#region License
-namespace Spring.Context.Support
-{
- ///
- /// An implementation that
- /// reads context definitions from XML based resources.
- ///
- ///
- ///
- /// Currently, the resources that are supported are the file,
- /// http, ftp, config and assembly resource
- /// types.
- ///
- ///
- /// You can provide custom implementations of the
- /// interface and and register them
- /// with any that inherits
- /// from the
- ///
- /// interface.
- ///
- ///
- /// In case of multiple config locations, later object definitions will
- /// override ones defined in previously loaded resources. This can be
- /// leveraged to deliberately override certain object definitions via an
- /// extra XML file.
- ///
- ///
- ///
- ///
- /// Find below some examples of instantiating an
- /// using a
- /// variety of different XML resources.
- ///
- ///
- /// // an XmlApplicationContext that reads its object definitions from an
- /// // XML file that has been embedded in an assembly...
- /// IApplicationContext context = new XmlApplicationContext
- /// (
- /// "assembly://AssemblyName/NameSpace/ResourceName"
- /// );
- ///
- /// // an XmlApplicationContext that reads its object definitions from a
- /// // number of disparate XML resources...
- /// IApplicationContext context = new XmlApplicationContext
- /// (
- /// // from an XML file that has been embedded in an assembly...
- /// "assembly://AssemblyName/NameSpace/ResourceName",
- /// // and from a (relative) filesystem-based resource...
- /// "file://Objects/services.xml",
- /// // and from an App.config / Web.config resource...
- /// "config://spring/objects"
- /// );
- ///
- ///
- /// Rod Johnson
- /// Juergen Hoeller
- /// Griffin Caprio (.NET)
- ///
- ///
- ///
- public class XmlApplicationContext : AbstractXmlApplicationContext
- {
- private readonly string[] _configurationLocations;
-
- ///
- /// Creates a new instance of the
- /// class,
- /// loading the definitions from the supplied XML resource locations.
- ///
- /// The created context will be case sensitive.
- ///
- /// Any number of XML based object definition resource locations.
- ///
- public XmlApplicationContext(params string[] configurationLocations)
- : this(true, null, true, null, configurationLocations)
- { }
-
- ///
- /// Creates a new instance of the
- /// class,
- /// loading the definitions from the supplied XML resource locations.
- ///
- /// Flag specifying whether to make this context case sensitive or not.
- ///
- /// Any number of XML based object definition resource locations.
- ///
- public XmlApplicationContext(bool caseSensitive,
- params string[] configurationLocations)
- : this(true, null, caseSensitive, null, configurationLocations)
- { }
-
- ///
- /// Creates a new instance of the
- /// class,
- /// loading the definitions from the supplied XML resource locations.
- ///
- /// The application context name.
- /// Flag specifying whether to make this context case sensitive or not.
- ///
- /// Any number of XML based object definition resource locations.
- ///
- public XmlApplicationContext(string name, bool caseSensitive,
- params string[] configurationLocations)
- : this(true, name, caseSensitive, null, configurationLocations)
- { }
-
- ///
- /// Creates a new instance of the
- /// class,
- /// loading the definitions from the supplied XML resource locations,
- /// with the given .
- ///
- ///
- /// The parent context (may be ).
- ///
- ///
- /// Any number of XML based object definition resource locations.
- ///
- public XmlApplicationContext(
- IApplicationContext parentContext,
- params string[] configurationLocations)
- : this(true, null, true, parentContext, configurationLocations)
- { }
-
- ///
- /// Creates a new instance of the
- /// class,
- /// loading the definitions from the supplied XML resource locations,
- /// with the given .
- ///
- /// Flag specifying whether to make this context case sensitive or not.
- ///
- /// The parent context (may be ).
- ///
- ///
- /// Any number of XML based object definition resource locations.
- ///
- public XmlApplicationContext(
- bool caseSensitive,
- IApplicationContext parentContext,
- params string[] configurationLocations)
- : this(true, null, caseSensitive, parentContext, configurationLocations)
- { }
-
- ///
- /// Creates a new instance of the
- /// class,
- /// loading the definitions from the supplied XML resource locations,
- /// with the given .
- ///
- /// The application context name.
- /// Flag specifying whether to make this context case sensitive or not.
- ///
- /// The parent context (may be ).
- ///
- ///
- /// Any number of XML based object definition resource locations.
- ///
- public XmlApplicationContext(
- string name,
- bool caseSensitive,
- IApplicationContext parentContext,
- params string[] configurationLocations)
- : this(true, name, caseSensitive, parentContext, configurationLocations)
- {}
-
- ///
- /// Creates a new instance of the
- /// class,
- /// loading the definitions from the supplied XML resource locations,
- /// with the given .
- ///
- ///
- /// This constructor is meant to be used by derived classes. By passing =false, it is
- /// the responsibility of the deriving class to call to initialize the context instance.
- ///
- /// if true, is called automatically.
- /// The application context name.
- /// Flag specifying whether to make this context case sensitive or not.
- ///
- /// The parent context (may be ).
- ///
- ///
- /// Any number of XML based object definition resource locations.
- ///
- public XmlApplicationContext(
- bool refresh,
- string name,
- bool caseSensitive,
- IApplicationContext parentContext,
- params string[] configurationLocations)
- : base(name, caseSensitive, parentContext )
- {
- _configurationLocations = configurationLocations;
- if (refresh)
- {
- AssertUtils.ArgumentHasElements(configurationLocations, "configurationLocations");
- Refresh();
- }
- }
-
- ///
- /// An array of resource locations, referring to the XML object
- /// definition files that this context is to be built with.
- ///
- ///
- /// An array of resource locations, or if none.
- ///
- ///
- protected override string[] ConfigurationLocations
- {
- get { return _configurationLocations; }
- }
- }
+/*
+ * Copyright © 2002-2005 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+#endregion
+
+using Spring.Util;
+using Spring.Core.IO;
+using System;
+
+namespace Spring.Context.Support
+{
+ ///
+ /// An implementation that
+ /// reads context definitions from XML based resources.
+ ///
+ ///
+ ///
+ /// Currently, the resources that are supported are the file,
+ /// http, ftp, config and assembly resource
+ /// types.
+ ///
+ ///
+ /// You can provide custom implementations of the
+ /// interface and and register them
+ /// with any that inherits
+ /// from the
+ ///
+ /// interface.
+ ///
+ ///
+ /// In case of multiple config locations, later object definitions will
+ /// override ones defined in previously loaded resources. This can be
+ /// leveraged to deliberately override certain object definitions via an
+ /// extra XML file.
+ ///
+ ///
+ ///
+ ///
+ /// Find below some examples of instantiating an
+ /// using a
+ /// variety of different XML resources.
+ ///
+ ///
+ /// // an XmlApplicationContext that reads its object definitions from an
+ /// // XML file that has been embedded in an assembly...
+ /// IApplicationContext context = new XmlApplicationContext
+ /// (
+ /// "assembly://AssemblyName/NameSpace/ResourceName"
+ /// );
+ ///
+ /// // an XmlApplicationContext that reads its object definitions from a
+ /// // number of disparate XML resources...
+ /// IApplicationContext context = new XmlApplicationContext
+ /// (
+ /// // from an XML file that has been embedded in an assembly...
+ /// "assembly://AssemblyName/NameSpace/ResourceName",
+ /// // and from a (relative) filesystem-based resource...
+ /// "file://Objects/services.xml",
+ /// // and from an App.config / Web.config resource...
+ /// "config://spring/objects"
+ /// );
+ ///
+ ///
+ /// Rod Johnson
+ /// Juergen Hoeller
+ /// Griffin Caprio (.NET)
+ ///
+ ///
+ ///
+ public class XmlApplicationContext : AbstractXmlApplicationContext
+ {
+ private readonly string[] _configurationLocations;
+ private readonly IResource[] _configurationResources;
+
+
+
+ ///
+ /// Initializes a new instance of the XmlApplicationContext class.
+ ///
+ public XmlApplicationContext(XmlApplicationContextArgs args)
+ : base(args.Name, args.CaseSensitive, args.ParentContext)
+ {
+ _configurationLocations = args.ConfigurationLocations;
+ _configurationResources = args.ConfigurationResources;
+
+ if (args.Refresh)
+ {
+ bool hasLocations = args.ConfigurationLocations.Length > 0;
+ bool hasResources = args.ConfigurationResources.Length > 0;
+
+ if (!hasLocations && !hasResources)
+ throw new ArgumentException("You must provide either or both Configuration Locations and/or Configuration Resources!");
+
+ if (hasLocations || hasResources)
+ {
+ Refresh();
+ }
+ }
+
+ }
+
+
+
+ ///
+ /// Creates a new instance of the
+ /// class,
+ /// loading the definitions from the supplied XML resource locations.
+ ///
+ /// The created context will be case sensitive.
+ ///
+ /// Any number of XML based object definition resource locations.
+ ///
+ public XmlApplicationContext(params string[] configurationLocations)
+ : this(new XmlApplicationContextArgs() { ConfigurationLocations = configurationLocations })
+ { }
+
+ ///
+ /// Creates a new instance of the
+ /// class,
+ /// loading the definitions from the supplied XML resource locations.
+ ///
+ /// Flag specifying whether to make this context case sensitive or not.
+ ///
+ /// Any number of XML based object definition resource locations.
+ ///
+ public XmlApplicationContext(bool caseSensitive,
+ params string[] configurationLocations)
+ : this(new XmlApplicationContextArgs() { CaseSensitive = caseSensitive, ConfigurationLocations = configurationLocations })
+ { }
+
+ ///
+ /// Creates a new instance of the
+ /// class,
+ /// loading the definitions from the supplied XML resource locations.
+ ///
+ /// The application context name.
+ /// Flag specifying whether to make this context case sensitive or not.
+ ///
+ /// Any number of XML based object definition resource locations.
+ ///
+ public XmlApplicationContext(string name, bool caseSensitive,
+ params string[] configurationLocations)
+ : this(new XmlApplicationContextArgs() { Name = name, CaseSensitive = caseSensitive, ConfigurationLocations = configurationLocations })
+ { }
+
+ ///
+ /// Creates a new instance of the
+ /// class,
+ /// loading the definitions from the supplied XML resource locations,
+ /// with the given .
+ ///
+ ///
+ /// The parent context (may be ).
+ ///
+ ///
+ /// Any number of XML based object definition resource locations.
+ ///
+ public XmlApplicationContext(
+ IApplicationContext parentContext,
+ params string[] configurationLocations)
+ : this(new XmlApplicationContextArgs() { ParentContext = parentContext, ConfigurationLocations = configurationLocations })
+ { }
+
+ ///
+ /// Creates a new instance of the
+ /// class,
+ /// loading the definitions from the supplied XML resource locations,
+ /// with the given .
+ ///
+ /// Flag specifying whether to make this context case sensitive or not.
+ ///
+ /// The parent context (may be ).
+ ///
+ ///
+ /// Any number of XML based object definition resource locations.
+ ///
+ public XmlApplicationContext(
+ bool caseSensitive,
+ IApplicationContext parentContext,
+ params string[] configurationLocations)
+ : this(new XmlApplicationContextArgs() { CaseSensitive = caseSensitive, ParentContext = parentContext, ConfigurationLocations = configurationLocations })
+ { }
+
+ ///
+ /// Creates a new instance of the
+ /// class,
+ /// loading the definitions from the supplied XML resource locations,
+ /// with the given .
+ ///
+ /// The application context name.
+ /// Flag specifying whether to make this context case sensitive or not.
+ ///
+ /// The parent context (may be ).
+ ///
+ ///
+ /// Any number of XML based object definition resource locations.
+ ///
+ public XmlApplicationContext(
+ string name,
+ bool caseSensitive,
+ IApplicationContext parentContext,
+ params string[] configurationLocations)
+ : this(new XmlApplicationContextArgs() { Name = name, CaseSensitive = caseSensitive, ParentContext = parentContext, ConfigurationLocations = configurationLocations })
+ { }
+
+ ///
+ /// Creates a new instance of the
+ /// class,
+ /// loading the definitions from the supplied XML resource locations,
+ /// with the given .
+ ///
+ ///
+ /// This constructor is meant to be used by derived classes. By passing =false, it is
+ /// the responsibility of the deriving class to call to initialize the context instance.
+ ///
+ /// if true, is called automatically.
+ /// The application context name.
+ /// Flag specifying whether to make this context case sensitive or not.
+ ///
+ /// The parent context (may be ).
+ ///
+ ///
+ /// Any number of XML based object definition resource locations.
+ ///
+ public XmlApplicationContext(
+ bool refresh,
+ string name,
+ bool caseSensitive,
+ IApplicationContext parentContext,
+ params string[] configurationLocations)
+ : this(new XmlApplicationContextArgs() { Refresh = refresh, Name = name, CaseSensitive = caseSensitive, ParentContext = parentContext, ConfigurationLocations = configurationLocations })
+ { }
+
+
+ public XmlApplicationContext(
+ bool refresh,
+ string name,
+ bool caseSensitive,
+ IApplicationContext parentContext,
+ string[] configurationLocations,
+ IResource[] configurationResources)
+ : this(new XmlApplicationContextArgs() { Refresh = refresh, Name = name, CaseSensitive = caseSensitive, ParentContext = parentContext, ConfigurationLocations = configurationLocations, ConfigurationResources = configurationResources })
+ { }
+
+
+ ///
+ /// An array of resource locations, referring to the XML object
+ /// definition files with which this context is to be built.
+ ///
+ ///
+ /// An array of resource locations, or if none.
+ ///
+ ///
+ protected override string[] ConfigurationLocations
+ {
+ get { return _configurationLocations; }
+ }
+
+ ///
+ /// An array of resources instances with which this context is to be built.
+ ///
+ ///
+ /// An array of s, or if none.
+ ///
+ ///
+ protected override IResource[] ConfigurationResources
+ {
+ get { return _configurationResources; }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/Spring/Spring.Core/Context/Support/XmlApplicationContextArgs.cs b/src/Spring/Spring.Core/Context/Support/XmlApplicationContextArgs.cs
new file mode 100644
index 00000000..7a87b775
--- /dev/null
+++ b/src/Spring/Spring.Core/Context/Support/XmlApplicationContextArgs.cs
@@ -0,0 +1,39 @@
+#region License
+
+/*
+ * Copyright © 2002-2005 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Spring.Core.IO;
+
+namespace Spring.Context.Support
+{
+ public class XmlApplicationContextArgs : AbstractXmlApplicationContextArgs
+ {
+ ///
+ /// Initializes a new instance of the XmlApplicationContextArgs class.
+ ///
+ public XmlApplicationContextArgs()
+ {
+ CaseSensitive = true;
+ Refresh = true;
+ }
+ }
+}
diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs
index 3e43d9ee..9623ba27 100644
--- a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs
+++ b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs
@@ -1324,11 +1324,11 @@ namespace Spring.Objects.Factory.Support
}
else
{
- // No singleton instance found -> check bean definition.
+ // No singleton instance found -> check object definition.
IObjectFactory parentFactory = ParentObjectFactory;
if (parentFactory != null && !ContainsObjectDefinition(objectName))
{
- // No bean definition found in this factory -> delegate to parent.
+ // No object definition found in this factory -> delegate to parent.
return parentFactory.GetType(this.OriginalObjectName(name));
}
@@ -1339,7 +1339,7 @@ namespace Spring.Objects.Factory.Support
{
if (!IsFactoryDereference(name))
{
- // If it's a FactoryBean, we want to look at what it creates, not the factory class.
+ // If it's a FactoryObject, we want to look at what it creates, not the factory class.
return GetTypeForFactoryObject(objectName, mod);
}
else
diff --git a/src/Spring/Spring.Core/Spring.Core.2008.csproj b/src/Spring/Spring.Core/Spring.Core.2008.csproj
index e780bbd4..eac21748 100644
--- a/src/Spring/Spring.Core/Spring.Core.2008.csproj
+++ b/src/Spring/Spring.Core/Spring.Core.2008.csproj
@@ -214,6 +214,7 @@
Code
+
Code
@@ -265,6 +266,7 @@
Code
+
diff --git a/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs b/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs
index 8e418d57..6678dce0 100644
--- a/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs
+++ b/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs
@@ -36,6 +36,7 @@ using Spring.Objects.Factory.Xml;
using Spring.Objects.Support;
using Spring.Reflection.Dynamic;
using Spring.Util;
+using Spring.Core.IO;
namespace Spring.Context.Support
{
@@ -59,6 +60,7 @@ namespace Spring.Context.Support
private string _constructionUrl;
private readonly string[] _configurationLocations;
+ private readonly IResource[] _configurationResources;
///
/// Create a new WebApplicationContext, loading the definitions
@@ -66,7 +68,7 @@ namespace Spring.Context.Support
///
/// Names of configuration resources.
public WebApplicationContext(params string[] configurationLocations)
- : this(null, false, null, configurationLocations)
+ : this(new WebApplicationContextArgs() { ConfigurationLocations = configurationLocations })
{
}
@@ -78,7 +80,20 @@ namespace Spring.Context.Support
/// Flag specifying whether to make this context case sensitive or not.
/// Names of configuration resources.
public WebApplicationContext(string name, bool caseSensitive, params string[] configurationLocations)
- : this(name, caseSensitive, null, configurationLocations)
+ : this(new WebApplicationContextArgs() { Name = name, CaseSensitive = caseSensitive, ConfigurationLocations = configurationLocations })
+ {
+ }
+
+ ///
+ /// Create a new WebApplicationContext, loading the definitions
+ /// from the given XML resource.
+ ///
+ /// The application context name.
+ /// Flag specifying whether to make this context case sensitive or not.
+ /// Names of configuration resources.
+ /// Configuration resources.
+ public WebApplicationContext(string name, bool caseSensitive, string[] configurationLocations, IResource[] configurationResources)
+ : this(new WebApplicationContextArgs() { Name = name, CaseSensitive = caseSensitive, ConfigurationLocations = configurationLocations, ConfigurationResources=configurationResources })
{
}
@@ -91,9 +106,15 @@ namespace Spring.Context.Support
/// The parent context.
/// Names of configuration resources.
public WebApplicationContext(string name, bool caseSensitive, IApplicationContext parentContext,
- params string[] configurationLocations) : base(name, caseSensitive, parentContext)
+ params string[] configurationLocations)
+ : this(new WebApplicationContextArgs() { Name = name, CaseSensitive = caseSensitive, ParentContext = parentContext, ConfigurationLocations = configurationLocations })
+ { }
+
+
+ public WebApplicationContext(WebApplicationContextArgs args)
+ : base(args.Name, args.CaseSensitive, args.ParentContext)
{
- _configurationLocations = configurationLocations;
+ _configurationLocations = args.ConfigurationLocations;
DefaultResourceProtocol = WebUtils.DEFAULT_RESOURCE_PROTOCOL;
Refresh();
@@ -106,6 +127,7 @@ namespace Spring.Context.Support
}
}
+
///
/// returns detailed instance information for debugging
///
@@ -154,11 +176,11 @@ namespace Spring.Context.Support
{
string firstRequestPath = HttpRuntime.AppDomainAppVirtualPath.TrimEnd('/') + "/dummy.context";
s_weblog.Info("Forcing first request " + firstRequestPath);
- SafeMethod fnProcessRequestNow = new SafeMethod(typeof(HttpRuntime).GetMethod("ProcessRequestNow", BindingFlags.Static|BindingFlags.NonPublic));
+ SafeMethod fnProcessRequestNow = new SafeMethod(typeof(HttpRuntime).GetMethod("ProcessRequestNow", BindingFlags.Static | BindingFlags.NonPublic));
SimpleWorkerRequest wr = new SimpleWorkerRequest(firstRequestPath, string.Empty, new StringWriter());
fnProcessRequestNow.Invoke(null, new object[] { wr });
-// HttpRuntime.ProcessRequest(
-// wr);
+ // HttpRuntime.ProcessRequest(
+ // wr);
s_weblog.Info("Successfully processed first request!");
}
catch (Exception ex)
@@ -192,7 +214,7 @@ namespace Spring.Context.Support
///
public static IApplicationContext GetRootContext()
{
- return GetContextInternal( ("" + HttpRuntime.AppDomainAppVirtualPath).TrimEnd('/') + "/dummy.context");
+ return GetContextInternal(("" + HttpRuntime.AppDomainAppVirtualPath).TrimEnd('/') + "/dummy.context");
}
///