Skip to content

Commit cce1bd7

Browse files
authored
Revert "Remove usings from templates implicitly added by the SDK (#34219)"
This reverts commit d8bba72.
1 parent 9d60f25 commit cce1bd7

File tree

33 files changed

+203
-46
lines changed

33 files changed

+203
-46
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
using System;
12
using System.Security.Claims;
3+
using System.Threading;
4+
using System.Threading.Tasks;
25
using Microsoft.AspNetCore.Components;
36
using Microsoft.AspNetCore.Components.Authorization;
47
using Microsoft.AspNetCore.Components.Server;
58
using Microsoft.AspNetCore.Identity;
9+
using Microsoft.Extensions.DependencyInjection;
10+
using Microsoft.Extensions.Logging;
611
using Microsoft.Extensions.Options;
712

813
namespace BlazorServerWeb_CSharp.Areas.Identity

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Data/ApplicationDbContext.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
25
using Microsoft.EntityFrameworkCore;
36

47
namespace BlazorServerWeb_CSharp.Data

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Data/WeatherForecast.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System;
2+
13
namespace BlazorServerWeb_CSharp.Data
24
{
35
public class WeatherForecast

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Data/WeatherForecastService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
using System;
2+
using System.Linq;
3+
using System.Threading.Tasks;
4+
15
namespace BlazorServerWeb_CSharp.Data
26
{
37
public class WeatherForecastService

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.cshtml.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
using System.Diagnostics;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Diagnostics;
4+
using System.Linq;
5+
using System.Threading.Tasks;
26
using Microsoft.AspNetCore.Mvc;
37
using Microsoft.AspNetCore.Mvc.RazorPages;
8+
using Microsoft.Extensions.Logging;
49

510
namespace BlazorServerWeb_CSharp.Pages
611
{

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
15
#if (OrganizationalAuth || IndividualB2CAuth)
26
using Microsoft.AspNetCore.Authentication;
37
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
@@ -10,18 +14,23 @@
1014
#endif
1115
using Microsoft.AspNetCore.Authorization;
1216
#endif
17+
using Microsoft.AspNetCore.Builder;
1318
using Microsoft.AspNetCore.Components;
1419
#if (IndividualLocalAuth)
1520
using Microsoft.AspNetCore.Components.Authorization;
1621
using Microsoft.AspNetCore.Identity;
1722
using Microsoft.AspNetCore.Identity.UI;
1823
#endif
24+
using Microsoft.AspNetCore.Hosting;
1925
#if (OrganizationalAuth)
2026
using Microsoft.AspNetCore.Mvc.Authorization;
2127
#endif
2228
#if (IndividualLocalAuth)
2329
using Microsoft.EntityFrameworkCore;
2430
#endif
31+
using Microsoft.Extensions.Configuration;
32+
using Microsoft.Extensions.DependencyInjection;
33+
using Microsoft.Extensions.Hosting;
2534
#if (GenerateGraph)
2635
using Graph = Microsoft.Graph;
2736
#endif

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Program.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Net.Http;
4+
using System.Text;
5+
using System.Threading.Tasks;
16
#if (!NoAuth && Hosted)
27
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
38
#endif
49
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
10+
using Microsoft.Extensions.Configuration;
11+
using Microsoft.Extensions.DependencyInjection;
12+
using Microsoft.Extensions.Logging;
513
#if (Hosted)
614
using ComponentsWebAssembly_CSharp.Client;
715
#else

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Controllers/OidcConfigurationController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
22
using Microsoft.AspNetCore.Mvc;
3+
using Microsoft.Extensions.Logging;
34

45
namespace ComponentsWebAssembly_CSharp.Server.Controllers
56
{

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Controllers/WeatherForecastController.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
#if (!NoAuth)
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
#if (!NoAuth)
26
using Microsoft.AspNetCore.Authorization;
37
#endif
48
#if (GenerateApi)
9+
using Microsoft.Extensions.Configuration;
510
using Microsoft.Identity.Web;
611
using System.Net;
12+
using System.Net.Http;
713
#endif
814
#if (GenerateGraph)
915
using Microsoft.Graph;
1016
#endif
1117
using Microsoft.AspNetCore.Mvc;
18+
using Microsoft.Extensions.Logging;
1219
#if (OrganizationalAuth || IndividualB2CAuth)
1320
using Microsoft.Identity.Web.Resource;
1421
#endif

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Data/ApplicationDbContext.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
1+
using ComponentsWebAssembly_CSharp.Server.Models;
2+
using IdentityServer4.EntityFramework.Options;
3+
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
24
using Microsoft.EntityFrameworkCore;
35
using Microsoft.Extensions.Options;
4-
using IdentityServer4.EntityFramework.Options;
5-
using ComponentsWebAssembly_CSharp.Server.Models;
6+
using System;
7+
using System.Collections.Generic;
8+
using System.Linq;
9+
using System.Threading.Tasks;
610

711
namespace ComponentsWebAssembly_CSharp.Server.Data
812
{

0 commit comments

Comments
 (0)