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