File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed
Sources/Knit/ServiceCollection Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ extension Container {
7
7
///
8
8
/// Usage:
9
9
/// ```
10
- /// let container = Container()
11
- /// container.addBehavior(ServiceCollector())
12
10
/// container.registerIntoCollection(Animal.self) { _ in Cat(...) }
13
11
/// container.registerIntoCollection(Animal.self) { _ in Dog(...) }
14
12
///
Original file line number Diff line number Diff line change @@ -7,12 +7,10 @@ import Swinject
7
7
extension Swinject . Resolver {
8
8
9
9
/// Resolves a collection of all services registered using
10
- /// ``Container/registerIntoCollection(_:factory:)`` or
10
+ /// ``Container/registerIntoCollection(_:factory:)``
11
11
///
12
12
/// Usage:
13
13
/// ```
14
- /// let container = Container()
15
- /// container.addBehavior(ServiceCollector())
16
14
/// container.registerIntoCollection(Animal.self) { _ in Cat() })
17
15
/// container.registerIntoCollection(Animal.self) { _ in Dog() })
18
16
///
@@ -34,12 +32,10 @@ extension Swinject.Resolver {
34
32
extension Knit . Resolver {
35
33
36
34
/// Resolves a collection of all services registered using
37
- /// ``Container/registerIntoCollection(_:factory:)`` or
35
+ /// ``Container/registerIntoCollection(_:factory:)``
38
36
///
39
37
/// Usage:
40
38
/// ```
41
- /// let container = Container()
42
- /// container.addBehavior(ServiceCollector())
43
39
/// container.registerIntoCollection(Animal.self) { _ in Cat() })
44
40
/// container.registerIntoCollection(Animal.self) { _ in Dog() })
45
41
///
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ import Foundation
6
6
import Swinject
7
7
8
8
/// A Swinject behavior that aggregates all services registered using
9
- /// ``Container/registerIntoCollection(_:factory:)`` or
9
+ /// ``Container/registerIntoCollection(_:factory:)``
10
10
///
11
11
/// Usage:
12
12
/// ```
13
13
/// let container = Container()
14
- /// container.addBehavior(ServiceCollector())
14
+ /// container.addBehavior(ServiceCollector()) // Note that this is done by default in Knit's ModuleAssembler
15
+ ///
15
16
/// container.registerIntoCollection(Animal.self) { _ in Cat() })
16
17
/// container.registerIntoCollection(Animal.self) { _ in Dog() })
17
18
///
You can’t perform that action at this time.
0 commit comments