Ejemplo n.º 1
0
                public static NetIncomeIntentWorker.QueryParameters Parse(IntentRequest request)
                {
                    var qp = new NetIncomeIntentWorker.QueryParameters();

                    qp.Date = request.Intent.Slots["date"].Value == null ? (DateTime?)null : DateTime.Parse(request.Intent.Slots["date"].Value);
                    qp.Year = request.Intent.Slots["year"].Value == null ? (int?)null : int.Parse(request.Intent.Slots["year"].Value);
                    return(qp);
                }
Ejemplo n.º 2
0
                public static NetIncomeIntentWorker.QueryParameters Parse(RecognizerResult result)
                {
                    var qp = new NetIncomeIntentWorker.QueryParameters();

                    qp.Year = result.Entities.ContainsKey("datetime") ?
                              int.Parse((string)result.Entities["datetime"].First()["timex"].First()) :
                              (int?)null;
                    return(qp);
                }