Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ContextRegistry.GetContext(String) Method

Returns context based on specified name.

[Visual Basic]
Public Overloads Shared Sub GetContext( _
   ByVal name As String _
)
[C#]
public static IApplicationContext GetContext(
   string name
);

Parameters

name
The context name.

Return Value

The specified context, or null, if context with that name doesn't exists.

Remarks

The first call to GetContext will create the context as specified in the .NET application configuration file under the location spring/context.

Exceptions

Exception Type Condition
ArgumentException If the context name is null or empty

See Also

ContextRegistry Class | Spring.Context.Support Namespace | ContextRegistry.GetContext Overload List