Last active
August 29, 2015 14:07
-
-
Save ahmettek/a6246310435df5f103aa to your computer and use it in GitHub Desktop.
IoC Initialize
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
public class IoC | |
{ | |
private static IWindsorContainer _container; | |
private static readonly object SyncRoot = new object(); | |
public static void Initialize() | |
{ | |
if (_container == null) | |
{ | |
lock (SyncRoot) | |
{ | |
_container = new WindsorContainer(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment