IClassFactoryRegisterInstance Method (Type, Object) |
Registers an implementation of an interface. The instance passed across will be returned
on each call to Resolve.
Namespace: InterfaceFactoryAssembly: InterfaceFactory (in InterfaceFactory.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax void RegisterInstance(
Type interfaceType,
Object instance
)
Sub RegisterInstance (
interfaceType As Type,
instance As Object
)
void RegisterInstance(
Type^ interfaceType,
Object^ instance
)
abstract RegisterInstance :
interfaceType : Type *
instance : Object -> unit
Parameters
- interfaceType
- Type: SystemType
The interface type. - instance
- Type: SystemObject
An object whose type implements interfaceType.
See Also