Beispiel #1
0
 public Locator()
 {
     _instance = this;
 }
Beispiel #2
0
        private static void SetupInstance()
        {
            if (_instance != null)
                return;

            //HACK do NOT like this but at this point can not think of a better approach.
            //Need to ensure that how ever they access this object the same instance is returned, i.e. IoC or static Instance reference
            var container = new WindsorContainer();
            _instance = container.Resolve<Locator>();
        }