Remove IApplicationContextAware.ApplicationContext getter from the interface. [SPRNET-782]

This commit is contained in:
bbaia
2008-08-05 14:00:48 +00:00
parent 852b83a4c6
commit 38cab98326
23 changed files with 498 additions and 224 deletions

View File

@@ -1,161 +1,160 @@
#region License
/*
* Copyright <20> 2002-2006 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
#region Imports
using System;
using System.Reflection;
using Spring.Caching;
using Spring.Context;
using Spring.Expressions;
using System.Collections;
#endregion
namespace Spring.Aspects.Cache
{
/// <summary>
/// Base class for different cache advice implementations that provide
/// access to common functionality, such as obtaining a cache instance.
/// </summary>
/// <author>Aleksandar Seovic</author>
public class BaseCacheAdvice : IApplicationContextAware
{
private IApplicationContext applicationContext;
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }
set { applicationContext = value; }
}
/// <summary>
/// Returns an <see cref="ICache"/> instance based on the cache name.
/// </summary>
/// <param name="name">The name of the cache.</param>
/// <returns>
/// Cache instance for the specified <paramref name="name"/> if one
/// is registered in the application context, or <c>null</c> if it isn't.
/// </returns>
public ICache GetCache(string name)
{
return applicationContext.GetObject(name) as ICache;
}
/// <summary>
/// Prepares variables for expression evaluation by packaging all
/// method arguments into a dictionary, keyed by argument name.
/// </summary>
/// <param name="method">
/// Method to get parameters info from.
/// </param>
/// <param name="arguments">
/// Argument values to package.
/// </param>
/// <returns>
/// A dictionary containing all method arguments, keyed by method name.
/// </returns>
protected static IDictionary PrepareVariables(MethodInfo method, object[] arguments)
#region License
/*
* Copyright <20> 2002-2006 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
#region Imports
using System;
using System.Reflection;
using Spring.Caching;
using Spring.Context;
using Spring.Expressions;
using System.Collections;
#endregion
namespace Spring.Aspects.Cache
{
/// <summary>
/// Base class for different cache advice implementations that provide
/// access to common functionality, such as obtaining a cache instance.
/// </summary>
/// <author>Aleksandar Seovic</author>
public class BaseCacheAdvice : IApplicationContextAware
{
private IApplicationContext applicationContext;
/// <summary>
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
public IApplicationContext ApplicationContext
{
set { applicationContext = value; }
}
/// <summary>
/// Returns an <see cref="ICache"/> instance based on the cache name.
/// </summary>
/// <param name="name">The name of the cache.</param>
/// <returns>
/// Cache instance for the specified <paramref name="name"/> if one
/// is registered in the application context, or <c>null</c> if it isn't.
/// </returns>
public ICache GetCache(string name)
{
return applicationContext.GetObject(name) as ICache;
}
/// <summary>
/// Prepares variables for expression evaluation by packaging all
/// method arguments into a dictionary, keyed by argument name.
/// </summary>
/// <param name="method">
/// Method to get parameters info from.
/// </param>
/// <param name="arguments">
/// Argument values to package.
/// </param>
/// <returns>
/// A dictionary containing all method arguments, keyed by method name.
/// </returns>
protected static IDictionary PrepareVariables(MethodInfo method, object[] arguments)
{
IDictionary vars = new Hashtable();
vars[method.Name] = method;
ParameterInfo[] parameters = method.GetParameters();
for (int i = 0; i < parameters.Length; i++)
{
ParameterInfo p = parameters[i];
vars[p.Name] = arguments[i];
}
return vars;
}
/// <summary>
/// Evaluates a SpEL expression as a boolean value.
/// </summary>
/// <param name="condition">
/// The expression string that should be evaluated.
/// </param>
/// <param name="conditionExpression">
/// The SpEL expression instance that should be evaluated.
/// </param>
/// <param name="context">
/// The object to evaluate expression against.
/// </param>
/// <param name="variables">
/// The expression variables dictionary.
/// </param>
/// <returns>
/// The evaluated boolean.
/// </returns>
/// <exception cref="System.InvalidOperationException">
/// If the SpEL expression could not be successfuly resolved to a boolean.
/// </exception>
protected static bool EvalCondition(string condition,
IExpression conditionExpression, object context, IDictionary variables)
{
if (conditionExpression == null)
{
return true;
}
else
{
object value = conditionExpression.GetValue(context, variables);
if (value is bool)
{
return (bool)value;
}
else
{
throw new InvalidOperationException(String.Format(
"The SpEL expression '{0}' could not be successfuly resolved to a boolean.",
condition));
}
}
}
/// <summary>
/// Retrieves custom attribute for the specified attribute type.
/// </summary>
/// <param name="method">
/// Method to get attribute from.
/// </param>
/// <param name="attributeType">
/// Attribute type.
/// </param>
/// <returns>
/// Attribute instance if one is found, <c>null</c> otherwise.
/// </returns>
protected static object GetCustomAttribute(MethodInfo method, Type attributeType)
{
object[] attributes = method.GetCustomAttributes(attributeType, false);
if (attributes.Length > 0)
{
return attributes[0];
}
return null;
}
}
vars[method.Name] = method;
ParameterInfo[] parameters = method.GetParameters();
for (int i = 0; i < parameters.Length; i++)
{
ParameterInfo p = parameters[i];
vars[p.Name] = arguments[i];
}
return vars;
}
/// <summary>
/// Evaluates a SpEL expression as a boolean value.
/// </summary>
/// <param name="condition">
/// The expression string that should be evaluated.
/// </param>
/// <param name="conditionExpression">
/// The SpEL expression instance that should be evaluated.
/// </param>
/// <param name="context">
/// The object to evaluate expression against.
/// </param>
/// <param name="variables">
/// The expression variables dictionary.
/// </param>
/// <returns>
/// The evaluated boolean.
/// </returns>
/// <exception cref="System.InvalidOperationException">
/// If the SpEL expression could not be successfuly resolved to a boolean.
/// </exception>
protected static bool EvalCondition(string condition,
IExpression conditionExpression, object context, IDictionary variables)
{
if (conditionExpression == null)
{
return true;
}
else
{
object value = conditionExpression.GetValue(context, variables);
if (value is bool)
{
return (bool)value;
}
else
{
throw new InvalidOperationException(String.Format(
"The SpEL expression '{0}' could not be successfuly resolved to a boolean.",
condition));
}
}
}
/// <summary>
/// Retrieves custom attribute for the specified attribute type.
/// </summary>
/// <param name="method">
/// Method to get attribute from.
/// </param>
/// <param name="attributeType">
/// Attribute type.
/// </param>
/// <returns>
/// Attribute instance if one is found, <c>null</c> otherwise.
/// </returns>
protected static object GetCustomAttribute(MethodInfo method, Type attributeType)
{
object[] attributes = method.GetCustomAttributes(attributeType, false);
if (attributes.Length > 0)
{
return attributes[0];
}
return null;
}
}
}

View File

@@ -64,8 +64,9 @@ namespace Spring.Aspects.Cache
get { return advisors; }
set { throw new NotSupportedException("Cache aspect advisors cannot be set externally."); }
}
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
@@ -92,7 +93,6 @@ namespace Spring.Aspects.Cache
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }
set
{
applicationContext = value;

View File

@@ -49,7 +49,7 @@ namespace Spring.Aspects.Cache
}
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
@@ -76,7 +76,6 @@ namespace Spring.Aspects.Cache
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return ((IApplicationContextAware) Advice).ApplicationContext; }
set { ((IApplicationContextAware)Advice).ApplicationContext = value; }
}

View File

@@ -46,7 +46,7 @@ namespace Spring.Aspects.Cache
}
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
@@ -73,7 +73,6 @@ namespace Spring.Aspects.Cache
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return ((IApplicationContextAware) Advice).ApplicationContext; }
set { ((IApplicationContextAware) Advice).ApplicationContext = value; }
}

View File

@@ -47,7 +47,7 @@ namespace Spring.Aspects.Cache
}
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
@@ -74,7 +74,6 @@ namespace Spring.Aspects.Cache
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return ((IApplicationContextAware) Advice).ApplicationContext; }
set { ((IApplicationContextAware) Advice).ApplicationContext = value; }
}
}

View File

@@ -61,14 +61,13 @@ namespace Spring.Aspects.Validation
}
/// <summary>
/// Gets or sets the application context to search for validators in.
/// Sets the application context to search for validators in.
/// </summary>
/// <value>
/// The application context to search for validators in.
/// </value>
public IApplicationContext ApplicationContext
{
get { return this.applicationContext; }
set { this.applicationContext = value; }
}
}

View File

@@ -50,7 +50,7 @@ namespace Spring.Aspects.Validation
}
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
@@ -77,7 +77,6 @@ namespace Spring.Aspects.Validation
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return ((IApplicationContextAware)Advice).ApplicationContext; }
set { ((IApplicationContextAware)Advice).ApplicationContext = value; }
}

View File

@@ -67,7 +67,7 @@ namespace Spring.Context
public interface IApplicationContextAware
{
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
@@ -92,6 +92,6 @@ namespace Spring.Context
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
IApplicationContext ApplicationContext { set; get; }
IApplicationContext ApplicationContext { set; }
}
}

View File

@@ -143,7 +143,7 @@ namespace Spring.Context.Support
#region IApplicationContextAware Members
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <exception cref="Spring.Context.ApplicationContextException">

View File

@@ -1,22 +1,22 @@
#region License
/*
* Copyright <20> 2002-2008 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.
/*
* Copyright <20> 2002-2008 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
#endregion
using System.Collections;
@@ -48,15 +48,15 @@ namespace Spring.Messaging.Core
public MessageQueue CreateMessageQueue(string messageQueueObjectName)
{
AssertUtils.ArgumentHasText(messageQueueObjectName, "DefaultMessageQueueObjectName");
IDictionary queues = LogicalThreadContext.GetData(QUEUE_DICTIONARY_SLOTNAME) as IDictionary;
if (queues == null)
IDictionary queues = LogicalThreadContext.GetData(QUEUE_DICTIONARY_SLOTNAME) as IDictionary;
if (queues == null)
{
queues = new Hashtable();
LogicalThreadContext.SetData(QUEUE_DICTIONARY_SLOTNAME, queues);
}
if (!queues.Contains(messageQueueObjectName))
}
if (!queues.Contains(messageQueueObjectName))
{
MessageQueue mq = ApplicationContext.GetObject(messageQueueObjectName) as MessageQueue;
MessageQueue mq = applicationContext.GetObject(messageQueueObjectName) as MessageQueue;
queues.Add(messageQueueObjectName, mq);
}
return queues[messageQueueObjectName] as MessageQueue;
@@ -73,7 +73,7 @@ namespace Spring.Messaging.Core
}
if (!converters.Contains(messgaeConverterObjectName))
{
IMessageConverter mc = ApplicationContext.GetObject(messgaeConverterObjectName) as IMessageConverter;
IMessageConverter mc = applicationContext.GetObject(messgaeConverterObjectName) as IMessageConverter;
converters.Add(messgaeConverterObjectName, mc);
}
return converters[messgaeConverterObjectName] as IMessageConverter;
@@ -83,6 +83,32 @@ namespace Spring.Messaging.Core
#region IApplicationContextAware Members
/// <summary>
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }

View File

@@ -194,13 +194,36 @@ namespace Spring.Messaging.Core
set { timeout = value; }
}
#endregion
#region IApplicationContextAware Members
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// </summary>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }
@@ -209,8 +232,6 @@ namespace Spring.Messaging.Core
#endregion
#endregion
#region IInitializingObject Members

View File

@@ -122,6 +122,32 @@ namespace Spring.Messaging.Listener
#region IApplicationContextAware Members
/// <summary>
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }

View File

@@ -15,7 +15,6 @@ namespace Spring.Messaging.Listener
private string messageQueueObjectName;
private IApplicationContext applicationContext;
protected object messageMapMonitor = new object();
protected IDictionary messageMap = new Hashtable();
@@ -54,9 +53,31 @@ namespace Spring.Messaging.Listener
#region IApplicationContextAware Members
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }

View File

@@ -179,6 +179,32 @@ namespace Spring.Messaging.Listener
#region IApplicationContextAware Members
/// <summary>
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }

View File

@@ -105,7 +105,7 @@ namespace Spring.Scheduling.Quartz
}
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>

View File

@@ -568,7 +568,7 @@ namespace Spring.Scheduling.Quartz
#region IApplicationContextAware Members
/// <summary>
/// Set the <see cref="Spring.Context.IApplicationContext"/> that this
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>
@@ -597,7 +597,6 @@ namespace Spring.Scheduling.Quartz
public virtual IApplicationContext ApplicationContext
{
set { applicationContext = value; }
get { return applicationContext; }
}
#endregion

View File

@@ -100,15 +100,37 @@ namespace Spring.Remoting
#endregion
#region IApplicationContextAware Members
/// <summary>
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
#region IApplicationContextAware Members
/// <summary>
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }
set { applicationContext = value; }
}

View File

@@ -134,15 +134,37 @@ namespace Spring.Remoting
#endregion
#region IApplicationContextAware Members
/// <summary>
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
#region IApplicationContextAware Members
/// <summary>
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return applicationContext; }
set { applicationContext = value; }
}

View File

@@ -104,12 +104,34 @@ namespace Spring.ServiceModel.Activation
#region IApplicationContextAware Members
/// <summary>
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return _applicationContext; }
set { _applicationContext = value; }
}

View File

@@ -276,11 +276,34 @@ namespace Spring.Web.Support
#region IApplicationContextAware implementation
/// <summary>
/// Gets or sets the application context.
/// Sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
public IApplicationContext ApplicationContext
{
get { return this.applicationContext; }
set { this.applicationContext = value; }
}

View File

@@ -246,8 +246,32 @@ namespace Spring.Web.UI
#region Application context support
/// <summary>
/// Gets or sets Spring application context.
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public virtual IApplicationContext ApplicationContext

View File

@@ -1412,8 +1412,32 @@ namespace Spring.Web.UI
#region Application context support
/// <summary>
/// Gets or sets Spring application context of the page.
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public virtual IApplicationContext ApplicationContext

View File

@@ -849,8 +849,32 @@ namespace Spring.Web.UI
#region Application context support
/// <summary>
/// Gets or sets Spring application context of the page.
/// Gets or sets the <see cref="Spring.Context.IApplicationContext"/> that this
/// object runs in.
/// </summary>
/// <value></value>
/// <remarks>
/// <p>
/// Normally this call will be used to initialize the object.
/// </p>
/// <p>
/// Invoked after population of normal object properties but before an
/// init callback such as
/// <see cref="Spring.Objects.Factory.IInitializingObject"/>'s
/// <see cref="Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
/// or a custom init-method. Invoked after the setting of any
/// <see cref="Spring.Context.IResourceLoaderAware"/>'s
/// <see cref="Spring.Context.IResourceLoaderAware.ResourceLoader"/>
/// property.
/// </p>
/// </remarks>
/// <exception cref="Spring.Context.ApplicationContextException">
/// In the case of application context initialization errors.
/// </exception>
/// <exception cref="Spring.Objects.ObjectsException">
/// If thrown by any application context methods.
/// </exception>
/// <exception cref="Spring.Objects.Factory.ObjectInitializationException"/>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public virtual IApplicationContext ApplicationContext