Created
September 8, 2018 17:14
-
-
Save letsar/0058f2605d72bf7587530f4ef6a36565 to your computer and use it in GitHub Desktop.
This file contains 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
// Registers a new instance. | |
container.registerInstance(Sith('Anakin', 'Skywalker')); | |
// Registers a new instance with a specified name. | |
container.registerInstance(Sith('Anakin', 'Skywalker'), name: 'DartVader'); | |
// Registers a new instance, with a specified name, and under a supertype. | |
container.registerInstance<Character, Sith>(Sith('Anakin', 'Skywalker'), name: 'DartVader'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment