An IApplicationContext implementation that reads context definitions from XML based resources.
For a list of all members of this type, see XmlApplicationContext Members .
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Currently, the resources that are supported are the
assembly resource types.
Note 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 XmlApplicationContext 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" );
Assembly: Spring.Core (in Spring.Core.dll)