Scope
public enum Scope
A scope defines the strategy used by the DependencyContainer
to manage resolved instances life cycle.
-
A new instance will be created every time it’s resolved.
Declaration
Swift
case unique
-
Instances resolved with the same type will be reused.
Declaration
Swift
case singleton
-
Instances resolved with the same type and same context will be reused.
Declaration
Swift
case shared(context: Context)
-
A type that represents a scope context.
See moreDeclaration
Swift
public struct Context : RawRepresentable, Hashable