Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IObjectFactory.IsTypeMatch Method

Determines whether the object with the given name matches the specified type.

[Visual Basic]
Public Sub IsTypeMatch( _
   ByVal name As String, _
   ByVal targetType As Type _
bool IsTypeMatch(
   string name,
   Type targetType


The name of the object to query.
Type of the target to match against.

Return Value

true if the object type matches; otherwise, false if it doesn't match or cannot be determined yet.


More specifically, check whether a GetObject call for the given name would return an object that is assignable to the specified target type. Translates aliases back to the corresponding canonical bean name. Will ask the parent factory if the bean cannot be found in this factory instance.


Exception Type Condition
NoSuchObjectDefinitionException Ff there is no object with the given name

See Also

IObjectFactory Interface | Spring.Objects.Factory Namespace