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
SimpleInjector.AdvancedApiObject
SimpleInjectorTypesToRegisterOptions
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
The TypesToRegisterOptions type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TypesToRegisterOptions | Initializes a new instance of the TypesToRegisterOptions class. |
Properties
Name | Description | |
---|---|---|
IncludeComposites |
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> T[] T serviceType | |
IncludeDecorators |
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 T serviceType | |
IncludeGenericTypeDefinitions |
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.
|
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from ApiObject.) | |
GetHashCode | Serves as the default hash function. (Inherited from ApiObject.) | |
GetType | Gets the Type of the current instance. (Inherited from ApiObject.) | |
ToString | Returns a string that represents the current object. (Inherited from ApiObject.) |
See Also