SHARE
TWEET

Untitled

a guest Oct 14th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Dip
  2.  
  3. //1
  4. private let container = DependencyContainer { container in
  5.                                              
  6.     //2
  7.     container.register { SimpleClock() as Clock }
  8. }
  9.  
  10. //3
  11. let simpleClock: Clock = try! container.resolve()
  12.  
  13. /*
  14.  * Output:
  15.  * creating SimpleClock
  16.  */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top