forked from Azure/azure-functions-dotnet-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
36 lines (33 loc) · 1.09 KB
/
Program.cs
File metadata and controls
36 lines (33 loc) · 1.09 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
36
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace FunctionApp
{
class Program
{
static async Task Main(string[] args)
{
// #if DEBUG
// Debugger.Launch();
// #endif
//<docsnippet_startup>
var host = new HostBuilder()
//<docsnippet_configure_defaults>
.ConfigureFunctionsWorkerDefaults()
//</docsnippet_configure_defaults>
//<docsnippet_dependency_injection>
.ConfigureServices(s =>
{
s.AddSingleton<IHttpResponderService, DefaultHttpResponderService>();
})
//</docsnippet_dependency_injection>
.Build();
//</docsnippet_startup>
//<docsnippet_host_run>
await host.RunAsync();
//</docsnippet_host_run>
}
}
}