예제 #1
0
 public static void Reject()
 {
     if (procedureRequestingConfirmation != null)
     {
         procedureRequestingConfirmation.onReject();
         procedureRequestingConfirmation.Finished = true;
         procedureRequestingConfirmation          = null;
     }
 }
예제 #2
0
        protected void RequestConfirmation(String dialogContent = "")
        {
            SendData(new ConfirmationRequestSchema {
                res            = "request_confirmation",
                dialog_content = dialogContent
            });
            procedureRequestingConfirmation = this;

            Utils.setTimeout(() => {
                if (procedureRequestingConfirmation != this)
                {
                    return;
                }
                Console.WriteLine("Confirmation timed out");
                Reject();
                SendData(new SimpleResponse {
                    res = "confirmation_timed_out"
                });
            }, 1000 * 15);            //15 seconds
        }