コード例 #1
0
ファイル: Server.cs プロジェクト: magicknot/PADI-DSTM
 public bool ConfirmPadInt(int uid)
 {
     Logger.Log(new String[] { "Server", ID.ToString(), "confirmPadInt ", "uid", uid.ToString(), serverState.StateMsg });
     try {
         return(serverState.ConfirmPadInt(uid));
     }
     catch (PadIntNotFoundException) {
         throw;
     }
     catch (ServerDoesNotReplyException) {
         throw;
     }
 }
コード例 #2
0
        internal override bool ConfirmPadInt(int uid)
        {
            Logger.Log(new String[] { "FreezedServer", Server.ID.ToString(), "confirmPadInt ", "uid", uid.ToString() });
            bool result;

            lock (this) {
                while (!recover)
                {
                    Monitor.Wait(this);
                }
                result = oldState.ConfirmPadInt(uid);
                Monitor.Pulse(this);
            }
            return(result);
        }