public static void Reject() { if (procedureRequestingConfirmation != null) { procedureRequestingConfirmation.onReject(); procedureRequestingConfirmation.Finished = true; procedureRequestingConfirmation = null; } }
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 }