Created
April 30, 2017 06:40
-
-
Save FacileTechnolab/f4805c5e47e0cb5f9c67d6ca542088d7 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
//contructor inject example | |
public class SomeClass | |
{ | |
public ILog Logger { get; set; } | |
public SomeClass(ILog _logger) | |
{ | |
Logger = _logger; | |
} | |
//resolve ILog object in method | |
public SomeMethod() | |
{ | |
ILog logger= AppHostBase.Instance.Container.Resolve<ILog>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment