 | ServiceContainerOnCreateInstance Method |
Creates an instance of the type with the specified constructor arguments.
Namespace: DigitalRune.ServiceLocationAssembly: DigitalRune.ServiceLocation (in DigitalRune.ServiceLocation.dll) Version: 1.3.0.0 (1.3.0.13596)
Syntaxprotected virtual Object OnCreateInstance(
Type type,
Object[] args
)
Protected Overridable Function OnCreateInstance (
type As Type,
args As Object()
) As Object
protected:
virtual Object^ OnCreateInstance(
Type^ type,
array<Object^>^ args
)
abstract OnCreateInstance :
type : Type *
args : Object[] -> Object
override OnCreateInstance :
type : Type *
args : Object[] -> Object
Parameters
- type
- Type: SystemType
The type of the instance. - args
- Type: SystemObject
The constructor arguments.
Return Value
Type:
ObjectA new instance of the requested type.
RemarksNotes to Inheritors: When overriding OnCreateInstance(Type, Object) be
sure to throw an exception if the activation fails. The method must not return
.
See Also