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
  SimpleInjector.AdvancedApiObject
    SimpleInjectorTypesToRegisterOptions

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

public class TypesToRegisterOptions : ApiObject

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 TypeInfo.IsGenericTypeDefinition or Type.IsGenericTypeDefinition set to true) should be included in the result. The default value for this property is false.
Top
Methods

  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from ApiObject.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from ApiObject.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from ApiObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from ApiObject.)
Top
See Also

Reference