Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

GetTimeInPlaceAction.cs 790 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  1. namespace LuisActions.Samples
  2. {
  3. using System;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Threading.Tasks;
  6. using Microsoft.Cognitive.LUIS.ActionBinding;
  7. [Serializable]
  8. [LuisActionBinding("TimeInPlace", FriendlyName = "Get the Time in a location")]
  9. public class GetTimeInPlaceAction : GetDataFromPlaceBaseAction
  10. {
  11. /// <summary>
  12. /// Should convert to 24 hours format (Optional)
  13. /// </summary>
  14. [Display(Name = "Convert to 24 hours format?")]
  15. public bool ConvertTo24HoursFormat { get; set; }
  16. public override Task<object> FulfillAsync()
  17. {
  18. var result = string.Format("The time in {0} is 00:00", this.Place);
  19. return Task.FromResult((object)result);
  20. }
  21. }
  22. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...