From d304947c6eac3ceda4622a832ffad033a92a81b7 Mon Sep 17 00:00:00 2001 From: Tobias Viehweger Date: Thu, 29 Dec 2016 17:35:26 +0100 Subject: [PATCH] Add support for Directives --- Alexa.NET/Response/IDirective.cs | 14 ++++++++++++++ Alexa.NET/Response/Response.cs | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 Alexa.NET/Response/IDirective.cs diff --git a/Alexa.NET/Response/IDirective.cs b/Alexa.NET/Response/IDirective.cs new file mode 100644 index 0000000..0333f73 --- /dev/null +++ b/Alexa.NET/Response/IDirective.cs @@ -0,0 +1,14 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Alexa.NET.Response +{ + public interface IDirective + { + [JsonRequired] + string Type { get; } + } +} diff --git a/Alexa.NET/Response/Response.cs b/Alexa.NET/Response/Response.cs index 4a2d54a..b1c7f99 100644 --- a/Alexa.NET/Response/Response.cs +++ b/Alexa.NET/Response/Response.cs @@ -1,4 +1,5 @@ using Newtonsoft.Json; +using System.Collections.Generic; namespace Alexa.NET.Response { @@ -16,5 +17,8 @@ public class ResponseBody [JsonProperty("shouldEndSession")] [JsonRequired] public bool ShouldEndSession { get; set; } + + [JsonProperty("directives", NullValueHandling = NullValueHandling.Ignore)] + public IList Directives { get; set; } = new List(); } } \ No newline at end of file