Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractObjectFactory.IsObjectTypeMatch Method

Determines whether the type of the given object definition matches the specified target type.

[Visual Basic]
Protected Sub IsObjectTypeMatch( _
   ByVal objectName As String, _
   ByVal rod As RootObjectDefinition, _
   ByVal targetType As Type _
)
[C#]
protected bool IsObjectTypeMatch(
   string objectName,
   RootObjectDefinition rod,
   Type targetType
);

Parameters

objectName
Name of the object (for error handling purposes).
rod
The merged object definition to determine the type for.
targetType
Type to match against (never null).

Return Value

true if object definition matches tye specified target type; otherwise, false.

Remarks

Allows for lazy load of the actual object type, provided that the type match can be determined otherwise.

The default implementation simply delegates to the standard

ResolveObjectType
method. Subclasses may override this to use a differnt strategy.

Exceptions

Exception TypeCondition
CannotLoadObjectTypeExceptionif we failed to load the type.

See Also

AbstractObjectFactory Class | Spring.Objects.Factory.Support Namespace