C# Class Spring.Context.Support.WebApplicationContext

Web application context, taking the context definition files from the file system or from URLs. Treats resource paths as web resources, when using IApplicationContext.GetResource. Resource paths are considered relative to the virtual directory. Note: In case of multiple config locations, later object definitions will override ones defined in earlier loaded files. This can be leveraged to deliberately override certain object definitions via an extra XML file.
Inheritance: Spring.Context.Support.AbstractXmlApplicationContext
Afficher le fichier Open project: spring-projects/spring-net Class Usage Examples

Méthodes publiques

Méthode Description
GetContext ( string virtualPath ) : IApplicationContext

Returns the web application context for the given (absolute!) virtual path

GetRootContext ( ) : IApplicationContext

Returns the root context of this web application

ToString ( ) : string

returns detailed instance information for debugging

WebApplicationContext ( ) : System

Create a new WebApplicationContext, loading the definitions from the given XML resource.

WebApplicationContext ( WebApplicationContextArgs args ) : System

Initializes a new instance of the WebApplicationContext class.

WebApplicationContext ( string name, bool caseSensitive ) : System

Create a new WebApplicationContext, loading the definitions from the given XML resource.

WebApplicationContext ( string name, bool caseSensitive, IApplicationContext parentContext ) : System

Create a new WebApplicationContext with the given parent, loading the definitions from the given XML resources.

WebApplicationContext ( string name, bool caseSensitive, string configurationLocations, IResource configurationResources ) : System

Create a new WebApplicationContext, loading the definitions from the given XML resource.

Méthodes protégées

Méthode Description
CreateObjectFactory ( ) : Spring.Objects.Factory.Support.DefaultListableObjectFactory

Creates web object factory for this context using parent context's factory as a parent.

CreateXmlObjectDefinitionReader ( Spring.Objects.Factory.Support.DefaultListableObjectFactory objectFactory ) : Spring.Objects.Factory.Xml.XmlObjectDefinitionReader

Create a reader instance capable of handling web objects (Pages,Controls) for importing o bject definitions into the specified objectFactory.

InitObjectDefinitionReader ( Spring.Objects.Factory.Xml.XmlObjectDefinitionReader objectDefinitionReader ) : void

Initializes object definition reader.

Private Methods

Méthode Description
GetContextInternal ( string virtualPath ) : IApplicationContext
GetContextPathWithTrailingSlash ( ) : string

Returns the application-relative virtual path of this context (without leading '~'!).

OnContextRegistryCleared ( object sender, EventArgs ev ) : void

EventHandler for ContextRegistry.Cleared event. Discards webContextCache.

Method Details

CreateObjectFactory() protected méthode

Creates web object factory for this context using parent context's factory as a parent.
protected CreateObjectFactory ( ) : Spring.Objects.Factory.Support.DefaultListableObjectFactory
Résultat Spring.Objects.Factory.Support.DefaultListableObjectFactory

CreateXmlObjectDefinitionReader() protected méthode

Create a reader instance capable of handling web objects (Pages,Controls) for importing o bject definitions into the specified objectFactory.
protected CreateXmlObjectDefinitionReader ( Spring.Objects.Factory.Support.DefaultListableObjectFactory objectFactory ) : Spring.Objects.Factory.Xml.XmlObjectDefinitionReader
objectFactory Spring.Objects.Factory.Support.DefaultListableObjectFactory
Résultat Spring.Objects.Factory.Xml.XmlObjectDefinitionReader

GetContext() public static méthode

Returns the web application context for the given (absolute!) virtual path
public static GetContext ( string virtualPath ) : IApplicationContext
virtualPath string
Résultat IApplicationContext

GetRootContext() public static méthode

Returns the root context of this web application
public static GetRootContext ( ) : IApplicationContext
Résultat IApplicationContext

InitObjectDefinitionReader() protected méthode

Initializes object definition reader.
protected InitObjectDefinitionReader ( Spring.Objects.Factory.Xml.XmlObjectDefinitionReader objectDefinitionReader ) : void
objectDefinitionReader Spring.Objects.Factory.Xml.XmlObjectDefinitionReader Reader to initialize.
Résultat void

ToString() public méthode

returns detailed instance information for debugging
public ToString ( ) : string
Résultat string

WebApplicationContext() public méthode

Create a new WebApplicationContext, loading the definitions from the given XML resource.
public WebApplicationContext ( ) : System
Résultat System

WebApplicationContext() public méthode

Initializes a new instance of the WebApplicationContext class.
public WebApplicationContext ( WebApplicationContextArgs args ) : System
args WebApplicationContextArgs The args.
Résultat System

WebApplicationContext() public méthode

Create a new WebApplicationContext, loading the definitions from the given XML resource.
public WebApplicationContext ( string name, bool caseSensitive ) : System
name string The application context name.
caseSensitive bool Flag specifying whether to make this context case sensitive or not.
Résultat System

WebApplicationContext() public méthode

Create a new WebApplicationContext with the given parent, loading the definitions from the given XML resources.
public WebApplicationContext ( string name, bool caseSensitive, IApplicationContext parentContext ) : System
name string The application context name.
caseSensitive bool Flag specifying whether to make this context case sensitive or not.
parentContext IApplicationContext The parent context.
Résultat System

WebApplicationContext() public méthode

Create a new WebApplicationContext, loading the definitions from the given XML resource.
public WebApplicationContext ( string name, bool caseSensitive, string configurationLocations, IResource configurationResources ) : System
name string The application context name.
caseSensitive bool Flag specifying whether to make this context case sensitive or not.
configurationLocations string Names of configuration resources.
configurationResources IResource Configuration resources.
Résultat System