Skip to content

Commit 8d7808c

Browse files
authored
Respond to latest SlimBuilder changes in BasicGrpc (#1842)
1 parent cd584ca commit 8d7808c

File tree

4 files changed

+36
-10
lines changed

4 files changed

+36
-10
lines changed

src/BenchmarksApps/Grpc/BasicGrpc/Program.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
using System.Text;
21
using BasicGrpc.Services;
3-
using Microsoft.AspNetCore.Server.Kestrel.Core;
42

53
var builder = WebApplication.CreateSlimBuilder(args);
6-
// No logging for benchmark scenario, template has AddConsole();
4+
builder.Logging.ClearProviders();
75

86
builder.Services.AddGrpc();
9-
builder.WebHost.ConfigureKestrel(options =>
10-
{
11-
options.ConfigureEndpointDefaults(listenOptions =>
12-
{
13-
listenOptions.Protocols = HttpProtocols.Http2;
14-
});
15-
});
167

178
var app = builder.Build();
189

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"profiles": {
3+
"BasicGrpc": {
4+
"commandName": "Project",
5+
"dotnetRunMessages": true,
6+
"launchBrowser": false,
7+
"applicationUrl": "http://localhost:55262",
8+
"environmentVariables": {
9+
"ASPNETCORE_ENVIRONMENT": "Development"
10+
}
11+
}
12+
}
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
}
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
},
8+
"AllowedHosts": "*",
9+
"Kestrel": {
10+
"EndpointDefaults": {
11+
"Protocols": "Http2"
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)