Exemple #1
0
 public bo()
 {
     _page = HttpContext.Current.Handler as tl_page;
     if (_page == null)
     {
         throw new Exception("pagina attiva non valida!");
     }
 }
Exemple #2
0
    public json_request(tl_page page)
    {
        string json = String.Empty;

        page.Request.InputStream.Position = 0;
        using (var inputStream = new StreamReader(page.Request.InputStream)) {
            json = inputStream.ReadToEnd();
        }
        if (string.IsNullOrEmpty(json))
        {
            throw new Exception("nessuna richiesta da elaborare!");
        }

        _jo = JObject.Parse(json);
    }
Exemple #3
0
 public static bool there_request(tl_page page)
 {
     return(page.Request.Headers["toyn-post"] != null);
 }