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.")); } } }