ZcashLightClientKit/Sources/ZcashLightClientKit/Utils
Michal Fousek 5d2b2298b5 [#1012] Introduce dependency injection in the SDK
Closes #1012

- This is the first change for the dependency injection. This change
  adds `DIContainer` which is used to register and resolve dependencies.
- Then this change shows how `DIContainer` can be used to resolve
  dependencies. And it also shows how to mock dependencies in tests.
- Constructors of `Initializer` are changed to support mocking of
  depedendencies. But it doesn't affect public API in any way.
- Depedencies are registered in `Dependencies.setup()`. Then in the code
  `container.resolve(SomeType.self)` is called to get instance of the
  dependency.
- `ZcashTestCase` class is added. It inherits from `XCTestCase` and
  should be used for base class in tests. `ZcashTestCase` takes care of
  creation of `DIContainer` for dependencies mocking. In future we can
  maybe move there more things that are used in each test.
- Lot is missing here. Not all the code is using dependency injection.
  Tests for `DIContainer` are missing. Only `OfflineTests` work now
  (other tests can't be even compiled). It will be added in future
  changes.
2023-05-08 14:58:49 +02:00
..
AsyncToClosureGateway.swift [#888] Make actor from ZcashRustBackendWelding 2023-04-11 17:51:28 +02:00
AsyncToCombineGateway.swift [#888] Make actor from ZcashRustBackendWelding 2023-04-11 17:51:28 +02:00
Clamped.swift [#381] Move Zatoshi and Amount Types to the SDK (#396) 2022-06-22 16:45:37 -03:00
DIContainer.swift [#1012] Introduce dependency injection in the SDK 2023-05-08 14:58:49 +02:00
GenericActor.swift [#831] Add SDKSynchronizer wrappers for non-async API 2023-03-21 22:47:19 +01:00
LoggingProxy.swift [#442] Introduce parallel downloading and scanning 2023-05-05 09:35:43 +02:00
OSLogger.swift [#361] Introduce ZcashError (#1005) 2023-04-24 18:15:20 -03:00
SaplingParameterDownloader.swift [#361] Introduce ZcashError (#1005) 2023-04-24 18:15:20 -03:00
SpecificCombineTypes.swift [#888] Make actor from ZcashRustBackendWelding 2023-04-11 17:51:28 +02:00
SyncSessionIDGenerator.swift [#908] Add last and latest blocks data to Synchronizer State (#911) 2023-04-14 09:08:37 +02:00
Task+sleep.swift [#442] Introduce parallel downloading and scanning 2023-05-05 09:35:43 +02:00
UsedAliasesChecker.swift [#209] Add support for multiple instances of the SDKSynchronizer 2023-03-27 20:42:52 +02:00