ResolverOptions
public class ResolverOptions<Service>
A ResolverOptions instance is returned by a registration function in order to allow additonal configuratiom. (e.g. scopes, etc.)
-
Declaration
Swift
public init(resolver: Resolver, factory: @escaping ResolverFactoryArguments<Service>)
-
Indicates that the registered Service also implements a specific protocol that may be resolved on its own.
Declaration
Swift
public final func implements<Protocol>(_ type: Protocol.Type, name: String? = nil) -> ResolverOptions<Service>
Parameters
type
Type of protocol being registered.
name
Named variant of protocol being registered.
Return Value
ResolverOptions instance that allows further customization of registered Service.
-
Allows easy assignment of injected properties into resolved Service.
Declaration
Swift
public final func resolveProperties(_ block: @escaping ResolverFactoryMutator<Service>) -> ResolverOptions<Service>
Parameters
block
Resolution block.
Return Value
ResolverOptions instance that allows further customization of registered Service.
-
Allows easy assignment of injected properties into resolved Service.
Declaration
Swift
public final func resolveProperties(_ block: @escaping ResolverFactoryMutatorArguments<Service>) -> ResolverOptions<Service>
Parameters
block
Resolution block that also receives resolution arguments.
Return Value
ResolverOptions instance that allows further customization of registered Service.
-
Defines scope in which requested Service may be cached.
Declaration
Swift
public final func scope(_ scope: ResolverScope) -> ResolverOptions<Service>
Parameters
block
Resolution block.
Return Value
ResolverOptions instance that allows further customization of registered Service.