-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHandler.cs
More file actions
27 lines (21 loc) · 639 Bytes
/
Handler.cs
File metadata and controls
27 lines (21 loc) · 639 Bytes
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
using System.Threading;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Lambdajection.Attributes;
using Microsoft.Extensions.Options;
namespace Lambdajection.Examples.CustomConfiguration
{
[Lambda(typeof(Startup), ConfigFactory = typeof(ConfigFactory))]
public partial class Handler
{
private readonly Config config;
public Handler(IOptions<Config> config)
{
this.config = config.Value;
}
public Task<string> Handle(object request, CancellationToken cancellationToken = default)
{
return Task.FromResult(config.Foo);
}
}
}