classafIoc::ServiceOverrideOptions
sys::Obj afIoc::ServiceOverrideOptions
Returned from AppModule
ServiceDefinitions methods to allow further override options to be set.
@since 2.0.0
- optional
This optional(Bool optional := true)
If
true
makes this override optional. As in no error is thrown if the service id does not exist. Useful for overriding 3rd party libraries that may or may not exist.- withImpl
Overrides the service implementation with the given type.
- withOverrideId
This withOverrideId(Str overrideId)
Sets an id for this override definition so others may override this override.
- withProxy
This withProxy(ServiceProxy proxy := ServiceProxy.always)
Overrides the proxy strategy for the service.
- withScope
This withScope(ServiceScope scope)
Overrides the scope of the service.