Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3cedae3

Browse filesBrowse files
committed
Clean Client Program.cs
1 parent 4512b7a commit 3cedae3
Copy full SHA for 3cedae3

File tree

Expand file treeCollapse file tree

1 file changed

+1
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-7
lines changed

‎Client/Program.cs

Copy file name to clipboardExpand all lines: Client/Program.cs
+1-7Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
using System;
22
using System.Net.Http;
3-
using System.Collections.Generic;
43
using System.Threading.Tasks;
5-
using System.Text;
64
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
7-
using Microsoft.Extensions.Configuration;
85
using Microsoft.Extensions.DependencyInjection;
9-
using Microsoft.Extensions.Logging;
106

117
namespace BlazorApp.Client
128
{
@@ -18,9 +14,7 @@ public static async Task Main(string[] args)
1814
builder.RootComponents.Add<App>("app");
1915

2016
var baseAddress = builder.Configuration["BaseAddress"] ?? builder.HostEnvironment.BaseAddress;
21-
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(baseAddress) });
22-
23-
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
17+
builder.Services.AddScoped(_ => new HttpClient { BaseAddress = new Uri(baseAddress) });
2418

2519
await builder.Build().RunAsync();
2620
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.