Table of Contents

Class TypeForwardServiceOptions

Namespace
Cuemon.Extensions.DependencyInjection
Assembly
Cuemon.Extensions.DependencyInjection.dll

Configuration options for Microsoft Dependency Injection that support nested type forwarding.

public class TypeForwardServiceOptions : ServiceOptions, IValidatableParameterObject, IParameterObject
Inheritance
Object
TypeForwardServiceOptions
Implements
Inherited Members
Extension Methods

Constructors

TypeForwardServiceOptions()

Initializes a new instance of the ServiceOptions class.

public TypeForwardServiceOptions()

Remarks

The following table shows the initial property values for an instance of ServiceOptions.

PropertyInitial Value
NestedTypePredicateserviceType => serviceType.GetInterfaces();
NestedTypeSelector_ => true;

Properties

NestedTypePredicate

Gets or sets the function delegate that will test each element for a condition based on a System.Type.

public Func<Type, bool> NestedTypePredicate { get; set; }

Property Value

Func<Type, Boolean>

The function delegate that will test each element for a condition based on a System.Type.

NestedTypeSelector

Gets or sets the function delegate that will fetch nested types of a service.

public Func<Type, IEnumerable<Type>> NestedTypeSelector { get; set; }

Property Value

Func<Type, IEnumerable<Type>>

The function delegate that will fetch nested types of a service.

UseNestedTypeForwarding

Gets or sets a value indicating whether nested type forwarding should be part of the operation.

public bool UseNestedTypeForwarding { get; set; }

Property Value

Boolean

true if nested type forwarding should be part of the operation; otherwise, false.

Methods

ValidateOptions()

Determines whether the public read-write properties of this instance are in a valid state.

public void ValidateOptions()

Remarks

This method is expected to throw exceptions when one or more conditions fails to be in a valid state.

Exceptions

System.InvalidOperationException

NestedTypePredicate cannot be null - or - NestedTypeSelector cannot be null.

See Also