Ejemplo n.º 1
0
 private ActionAnswer AccountAction(Action action, string subject, double value)
 {
     lock (mLock)
     {
         if (mBuildingRepository.AddAccount(subject, value))
         {
             action();
             return(new ActionAnswer(true));
         }
         else
         {
             return(new ActionAnswer(false, "Not enough funds."));
         }
     }
 }