TypesToRegisterOptions Class

Simple Injector
Defines options to control the types returned from the GetTypesToRegister method. For a type to be returned, it should match all the conditions described by the class's properties. In other words, in case the searched assembly contains a generic type, that is both a decorator and a composite, it will only be returned by GetTypesToRegister in case both IncludeGenericTypeDefinitions, IncludeDecorators and IncludeComposites are set to true.
Inheritance Hierarchy

SystemObject
  SimpleInjectorTypesToRegisterOptions

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

public class TypesToRegisterOptions

The TypesToRegisterOptions type exposes the following members.

Constructors

  NameDescription
Public methodTypesToRegisterOptions
Initializes a new instance of the TypesToRegisterOptions class.
Top
Properties

  NameDescription
Public propertyIncludeComposites
Gets or sets a value indicating whether composite types should be included in the result. The default value of this property is true. A type is considered a composite if the type's constructor contains a parameter of
IEnumerable<T>
,
ICollection<T>
,
IList<T>
,
IReadOnlyCollection<T>
,
IReadOnlyList<T>
or
T[]
(array of T), where exactly matches the
serviceType
argument, supplied to the GetTypesToRegister method.
Public propertyIncludeDecorators
Gets or sets a value indicating whether decorator types should be included in the result. The default value of this property is false. A type is considered a decorator if the type's constructor contains a parameter of the type that exactly matches the
serviceType
argument, supplied to the GetTypesToRegister method, or when there is a FuncTResult argument where matches the
serviceType
argument.
Public propertyIncludeGenericTypeDefinitions
Gets or sets a value indicating whether generic type definitions (types that have Type.IsGenericTypeDefinition set to true) should be included in the result. The default value for this property is false.
Top
See Also

Reference