Show / Hide Table of Contents

Interface IGetsDecoratedService

A factory service which uses the decorator pattern to build and return a service by specifying which implementation types to use and in which order.

Namespace: CSF.DecoratorBuilder
Assembly: CSF.DecoratorBuilder.Abstractions.dll
Syntax
public interface IGetsDecoratedService

Methods

| Improve this Doc View Source

GetDecoratedService(Type, Func<ICreatesDecorator, ICustomizesDecorator>, ITypedResolvable[])

Builds and returns an instance of a service, using the decorator pattern.

Declaration
object GetDecoratedService(Type serviceType, Func<ICreatesDecorator, ICustomizesDecorator> customizationFunc, params ITypedResolvable[] globalParams)
Parameters
Type Name Description
System.Type serviceType

The service type, typically an interface.

System.Func<ICreatesDecorator, ICustomizesDecorator> customizationFunc

A customization function, to build the 'shape' of the decorated service.

ITypedResolvable[] globalParams

An optional collection of resolution parameters, to be applied to every resolution operation.

Returns
Type Description
System.Object

The service instance.

| Improve this Doc View Source

GetDecoratedService<TService>(Func<ICreatesDecorator<TService>, ICustomizesDecorator<TService>>, ITypedResolvable[])

Builds and returns an instance of a service, using the decorator pattern.

Declaration
TService GetDecoratedService<TService>(Func<ICreatesDecorator<TService>, ICustomizesDecorator<TService>> customizationFunc, params ITypedResolvable[] globalParams)
    where TService : class
Parameters
Type Name Description
System.Func<ICreatesDecorator<TService>, ICustomizesDecorator<TService>> customizationFunc

A customization function, to build the 'shape' of the decorated service.

ITypedResolvable[] globalParams

An optional collection of resolution parameters, to be applied to every resolution operation.

Returns
Type Description
TService

The service instance.

Type Parameters
Name Description
TService

The service type, typically an interface.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX