ResolverOptions
public class ResolverOptions<Service>
A ResolverOptions instance is returned by a registration function in order to allow additonal configuratiom. (e.g. scopes, etc.)
-
Undocumented
Declaration
Swift
public var scope: ResolverScope
-
Undocumented
Declaration
Swift
public init(resolver: Resolver)
-
Indicates that the registered Service also implements a specific protocol that may be resolved on its own.
Declaration
Swift
@discardableResult public final func implements<Protocol>(_ type: Protocol.Type, name: Resolver.Name? = 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
@discardableResult 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
@discardableResult public final func resolveProperties(_ block: @escaping ResolverFactoryMutatorArgumentsN<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
@discardableResult public final func scope(_ scope: ResolverScope) -> ResolverOptions<Service>
Parameters
block
Resolution block.
Return Value
ResolverOptions instance that allows further customization of registered Service.