Ejemplo n.º 1
0
 public static CastleContainer CreateInstance()
 {
     if (_instance == null)
     {
         lock (_locker)
         {
             if (_instance == null)
             {
                 _instance = new CastleContainer();
             }
         }
     }
     return(_instance);
 }
Ejemplo n.º 2
0
 private UserService()
 {
     usrDao  = CastleContainer.CreateInstance().Resolve <IUserDao>();
     speaker = CastleContainer.CreateInstance().Resolve <ISpeak>();
 }