Created
May 23, 2020 20:33
-
-
Save Plnda/f2764ec3cdec272ba8d05b32aa2f5c9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Public class | |
public class Dependencies { | |
/// Will hold all our factories | |
public var factories: [ObjectIdentifier: Service] = [:] | |
/// Make sure that our init will stay private so they need to use the provider functionBuilder | |
private init() { } | |
/// Make sure that all the dependencies are removed when we deinit | |
deinit { | |
factories.removeAll() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment