Exemple #1
0
    IEnumerator Start()
    {
        VersionNumber.Initialize();
        Config.Initialize();

        yield return(new WaitForSeconds(0.125f));

        Container.Load("Container").PrintString();

        sm = new StateMachine <GameManager>(new TestStateOne(this));

        yield return(new WaitForSeconds(0.5f));

        TwilioManager.SendSMS();
    }
        public static IActionResult SendSms(
            [HttpTrigger(AUTH_LEVEL, METHOD_GET, Route = SMS_ROUTE + "/{to}/{text}")]
            HttpRequest req,
            TraceWriter log,
            string to, string text)
        {
            log.Info($"SendSms {to}, {text}");
            MessageResource msg = null;

            try {
                msg = new TwilioManager().SendSms(to, text);
                return(new OkObjectResult(msg));
            }
            catch (System.Exception ex)
            {
                return(new OkObjectResult(ex.Message)); // https://exceptionnotfound.net/asp-net-core-demystified-action-results/
            }
        }