Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ISingletonObjectRegistry.GetSingleton Method

Return the (raw) singleton object registered under the given name.

[Visual Basic]
Public Sub GetSingleton( _
   ByVal objectName As String _
object GetSingleton(
   string objectName


Name of the object to look for.

Return Value

the registered singleton object, or

if none found


Only checks already instantiated singletons; does not return an Object for singleton object definitions which have not been instantiated yet.

The main purpose of this method is to access manually registered singletons RegisterSingleton. Can also be used to access a singleton defined by an object definition that already been created, in a raw fashion.

See Also

ISingletonObjectRegistry Interface | Spring.Objects.Factory.Config Namespace