Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(IListableObjectFactory, Type, Boolean, Boolean) Method

Get all object names for the given type, including those defined in ancestor factories.

[Visual Basic]
Public Overloads Shared Sub ObjectNamesForTypeIncludingAncestors( _
   ByVal factory As IListableObjectFactory, _
   ByVal type As Type, _
   ByVal includePrototypes As Boolean, _
   ByVal includeFactoryObjects As Boolean _
public static string[] ObjectNamesForTypeIncludingAncestors(
   IListableObjectFactory factory,
   Type type,
   bool includePrototypes,
   bool includeFactoryObjects


If this isn't also an IHierarchicalObjectFactory, this method will return the same as it's own GetObjectDefinitionNames method.
The Type that objects must match.
Whether to include prototype objects too or just singletons (also applies to IFactoryObject instances).
Whether to include IFactoryObject instances too or just normal objects.

Return Value

The array of object names, or an empty array if none.


Will return unique names in case of overridden object definitions.

Does consider objects created by IFactoryObjects if includeFactoryObjects is set to true, which means that IFactoryObjects will get initialized.

See Also

ObjectFactoryUtils Class | Spring.Objects.Factory Namespace | ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors Overload List