Skip to content

Commit

Permalink
Add support for Directives
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasviehweger committed Dec 29, 2016
1 parent 192e122 commit d304947
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Alexa.NET/Response/IDirective.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
}
4 changes: 4 additions & 0 deletions Alexa.NET/Response/Response.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace Alexa.NET.Response
{
Expand All @@ -16,5 +17,8 @@ public class ResponseBody
[JsonProperty("shouldEndSession")]
[JsonRequired]
public bool ShouldEndSession { get; set; }

[JsonProperty("directives", NullValueHandling = NullValueHandling.Ignore)]
public IList<IDirective> Directives { get; set; } = new List<IDirective>();
}
}

0 comments on commit d304947

Please sign in to comment.