facet classafIoc::Contribute

sys::Obj
  afIoc::Contribute : sys::Facet

@Js
@Serializable

Use in AppModule classes to denote a service contribution method. The service to be contributed to is derived from either the serviceId, serviceType, or the method name.

Either serviceId or serviceType should be defined, not both.

optional

Source

const Bool optional := false

Marks the contribution as optional; no Err is thrown if the service is not found.

This allows you to contribute to services that may or may not be defined in the registry. (e.g. contributing to optional 3rd party library)

serviceId

Source

const Str? serviceId := null

The id of the service to be configured.

Use either this or serviceType, not both.

serviceType

Source

const Type? serviceType := null

The type of the service to be configured.

Use either this or serviceId, not both.