public static DailySentenceModel RequestFromWeb(DateTime dateTime)
 {
     try
     {
         DailySentenceModel result = null;
         string             FormatDateTimeString = dateTime.ToString("yyyy-MM-dd");
         WebRequest         webRequest           = HttpWebRequest.Create("http://open.iciba.com/dsapi/?date=" + FormatDateTimeString);
         WebResponse        webResponse          = webRequest.GetResponse();
         Stream             stream = webResponse.GetResponseStream();
         StreamReader       sr     = new StreamReader(stream);
         var jsonstring            = sr.ReadToEnd();
         try
         {
             result = Json.Deserialize <DailySentenceModel>(jsonstring);
         }
         catch
         {
             //HandleException(DictionaryServiceException.Unsupport_Sentence, jsonstring);
         }
         return(result);
     }
     catch (Exception)
     {
         return(new DailySentenceModel());
     }
 }
        public static async Task <DailySentenceModel> RequestFromWebAsync(DateTime dateTime)
        {
            DailySentenceModel t = await Task.Run(() => RequestFromWeb(dateTime));

            return(t);
        }
 public static async Task <DailySentenceModel> RequestByDateTimeAsync(DateTime dateTime)
 {
     return(await DailySentenceModel.RequestFromWebAsync(dateTime));
 }
 public static DailySentenceModel RequestByDateTime(DateTime dateTime)
 {
     return(DailySentenceModel.RequestFromWeb(dateTime));
 }
 public static async Task <DailySentenceModel> RequestByTodayAsync()
 {
     return(await DailySentenceModel.RequestFromWebAsync(DateTime.Now));
 }
 public static DailySentenceModel RequestByToday()
 {
     return(DailySentenceModel.RequestFromWeb(DateTime.Now));
 }