Created
December 27, 2011 17:15
-
-
Save kellabyte/1524422 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
public class ApplicationHost | |
{ | |
private static volatile ApplicationHost instance; | |
private static object syncRoot = new Object(); | |
private ApplicationHost() | |
{ | |
Execute.InitializeWithDispatcher(); | |
// Initialize the Funq container. | |
this.Container = new Container(); | |
} | |
public static ApplicationHost Current | |
{ | |
get | |
{ | |
if (instance == null) | |
{ | |
lock (syncRoot) | |
{ | |
if (instance == null) | |
instance = new ApplicationHost(); | |
} | |
} | |
return instance; | |
} | |
} | |
public Container Container { get; private set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment