UnregisteredTypeEventArgs Class

Simple Injector
Provides data for and interaction with the ResolveUnregisteredType event of the Container. An observer can check the UnregisteredServiceType to see whether the unregistered type can be handled. The Register(FuncObject) method can be called to register a FuncTResult delegate that allows creation of instances of the unregistered for this and future requests.
Inheritance Hierarchy

SystemObject
  SystemEventArgs
    SimpleInjectorUnregisteredTypeEventArgs

Namespace:  SimpleInjector
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax

public class UnregisteredTypeEventArgs : EventArgs

The UnregisteredTypeEventArgs type exposes the following members.

Properties

  NameDescription
Public propertyHandled
Gets a value indicating whether the event represented by this instance has been handled. This property will return true when Register(FuncObject) has been called on this instance.
Public propertyUnregisteredServiceType
Gets the unregistered service type that is currently requested.
Top
Methods

  NameDescription
Public methodRegister(FuncObject)
Registers a FuncTResult delegate that allows creation of instances of the type expressed by the UnregisteredServiceType for this and future requests. The delegate will be caches and future requests will directly call that delegate.
Public methodRegister(Expression)
Registers an Expression that describes the creation of instances of the type expressed by the UnregisteredServiceType for this and future requests. The delegate will be cached and future requests will directly use that expression or the compiled delegate.
Public methodRegister(Registration)
Registers a Registration that describes the creation of instances of the type expressed by the UnregisteredServiceType for this and future requests. The registration will be cached and future requests will directly call unon that registration, the expression that it generates or the delegate that gets compiled from that expression.
Top
See Also

Reference