Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractObjectFactory.IsTypeMatch Method

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

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

Parameters

name
The name of the object to query.
targetType
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.

Implements

IObjectFactory.IsTypeMatch

Remarks

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.

Exceptions

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

See Also

AbstractObjectFactory Class | Spring.Objects.Factory.Support Namespace