-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFunction.cs
More file actions
35 lines (31 loc) · 1.21 KB
/
Function.cs
File metadata and controls
35 lines (31 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using System.IO;
using Alexa.NET.Response;
using Alexa.NET.Request;
using Alexa.NET.Request.Type;
using Newtonsoft.Json;
using Alexa.NET;
using Amazon.Lambda.Core;
using alexa_dotnet_lambda_helloworld.BusinessLogic;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializerAttribute(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
namespace alexa_dotnet_lambda_helloworld
{
/// <summary>
/// This class extends from APIGatewayProxyFunction which contains the method FunctionHandlerAsync which is the
/// actual Lambda function entry point. The Lambda handler field should be set to
///
/// alexa_dotnet_lambda_helloworld::alexa_dotnet_lambda_helloworld.LambdaEntryPoint::FunctionHandlerAsync
/// </summary>
public class Function
{
public async Task<SkillResponse> FunctionHandler(SkillRequest input, ILambdaContext context)
{
AlexaRequestProcessor alexaRequestProcessor = new AlexaRequestProcessor();
return await alexaRequestProcessor.ProcessAsync(input);
}
}
}