Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractApplicationContext.IsPrototype Method

Determines whether the specified object name is prototype. That is, will GetObject always return independent instances?

[Visual Basic]
Public NotOverridable Sub IsPrototype( _
   ByVal name As String _
) _
    Implements IObjectFactory.IsPrototype
[C#]
public bool IsPrototype(
   string name
);

Parameters

name
The name of the object to query

Return Value

true if the specified object name will always deliver independent instances; otherwise, false.

Implements

IObjectFactory.IsPrototype

Remarks

This method returning false does not clearly indicate a singleton object. It indicated non-independent instances, which may correspond to a scoped object as well. use the IsSingleton property to explicitly check for a shared singleton instance.

Translates aliases back to the corresponding canonical object name. Will ask the parent factory if the object can not be found in this factory instance.

Exceptions

Exception TypeCondition
NoSuchObjectDefinitionExceptionif there is no object with the given name.

See Also

AbstractApplicationContext Class | Spring.Context.Support Namespace