Created
September 8, 2018 18:08
-
-
Save letsar/ee184a5a05f30ba1b6a70c7fd42ad9c7 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
// Gets the instance registered for the Sith type. | |
Sith theSith = container.resolve<Sith>(); | |
// Gets the instance registered for the Sith type under 'DartVader' name. | |
Sith dartVader = container.resolve<Sith>('DartVader'); | |
// Container is a callable class, so you can also resolve a type like this: | |
Sith sith = container<Sith>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment