File tree 33 files changed +46
-203
lines changed
src/ProjectTemplates/Web.ProjectTemplates/content
ComponentsWebAssembly-CSharp
33 files changed +46
-203
lines changed Original file line number Diff line number Diff line change 1
- using System ;
2
1
using System . Security . Claims ;
3
- using System . Threading ;
4
- using System . Threading . Tasks ;
5
2
using Microsoft . AspNetCore . Components ;
6
3
using Microsoft . AspNetCore . Components . Authorization ;
7
4
using Microsoft . AspNetCore . Components . Server ;
8
5
using Microsoft . AspNetCore . Identity ;
9
- using Microsoft . Extensions . DependencyInjection ;
10
- using Microsoft . Extensions . Logging ;
11
6
using Microsoft . Extensions . Options ;
12
7
13
8
namespace BlazorServerWeb_CSharp . Areas . Identity
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Text ;
4
- using Microsoft . AspNetCore . Identity . EntityFrameworkCore ;
1
+ using Microsoft . AspNetCore . Identity . EntityFrameworkCore ;
5
2
using Microsoft . EntityFrameworkCore ;
6
3
7
4
namespace BlazorServerWeb_CSharp . Data
Original file line number Diff line number Diff line change 1
- using System ;
2
-
3
1
namespace BlazorServerWeb_CSharp . Data
4
2
{
5
3
public class WeatherForecast
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Linq ;
3
- using System . Threading . Tasks ;
4
-
5
1
namespace BlazorServerWeb_CSharp . Data
6
2
{
7
3
public class WeatherForecastService
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Diagnostics ;
4
- using System . Linq ;
5
- using System . Threading . Tasks ;
1
+ using System . Diagnostics ;
6
2
using Microsoft . AspNetCore . Mvc ;
7
3
using Microsoft . AspNetCore . Mvc . RazorPages ;
8
- using Microsoft . Extensions . Logging ;
9
4
10
5
namespace BlazorServerWeb_CSharp . Pages
11
6
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Threading . Tasks ;
5
1
#if ( OrganizationalAuth || IndividualB2CAuth )
6
2
using Microsoft . AspNetCore . Authentication ;
7
3
using Microsoft . AspNetCore . Authentication . OpenIdConnect ;
14
10
#endif
15
11
using Microsoft . AspNetCore . Authorization ;
16
12
#endif
17
- using Microsoft . AspNetCore . Builder ;
18
13
using Microsoft . AspNetCore . Components ;
19
14
#if ( IndividualLocalAuth )
20
15
using Microsoft . AspNetCore . Components . Authorization ;
21
16
using Microsoft . AspNetCore . Identity ;
22
17
using Microsoft . AspNetCore . Identity . UI ;
23
18
#endif
24
- using Microsoft . AspNetCore . Hosting ;
25
19
#if ( OrganizationalAuth )
26
20
using Microsoft . AspNetCore . Mvc . Authorization ;
27
21
#endif
28
22
#if ( IndividualLocalAuth )
29
23
using Microsoft . EntityFrameworkCore ;
30
24
#endif
31
- using Microsoft . Extensions . Configuration ;
32
- using Microsoft . Extensions . DependencyInjection ;
33
- using Microsoft . Extensions . Hosting ;
34
25
#if ( GenerateGraph )
35
26
using Graph = Microsoft . Graph ;
36
27
#endif
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Net . Http ;
4
- using System . Text ;
5
- using System . Threading . Tasks ;
6
1
#if ( ! NoAuth && Hosted )
7
2
using Microsoft . AspNetCore . Components . WebAssembly . Authentication ;
8
3
#endif
9
4
using Microsoft . AspNetCore . Components . WebAssembly . Hosting ;
10
- using Microsoft . Extensions . Configuration ;
11
- using Microsoft . Extensions . DependencyInjection ;
12
- using Microsoft . Extensions . Logging ;
13
5
#if ( Hosted )
14
6
using ComponentsWebAssembly_CSharp . Client ;
15
7
#else
Original file line number Diff line number Diff line change 1
1
using Microsoft . AspNetCore . ApiAuthorization . IdentityServer ;
2
2
using Microsoft . AspNetCore . Mvc ;
3
- using Microsoft . Extensions . Logging ;
4
3
5
4
namespace ComponentsWebAssembly_CSharp . Server . Controllers
6
5
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Threading . Tasks ;
5
- #if ( ! NoAuth )
1
+ #if ( ! NoAuth )
6
2
using Microsoft . AspNetCore . Authorization ;
7
3
#endif
8
4
#if ( GenerateApi )
9
- using Microsoft . Extensions . Configuration ;
10
5
using Microsoft . Identity . Web ;
11
6
using System . Net ;
12
- using System . Net . Http ;
13
7
#endif
14
8
#if ( GenerateGraph )
15
9
using Microsoft . Graph ;
16
10
#endif
17
11
using Microsoft . AspNetCore . Mvc ;
18
- using Microsoft . Extensions . Logging ;
19
12
#if ( OrganizationalAuth || IndividualB2CAuth )
20
13
using Microsoft . Identity . Web . Resource ;
21
14
#endif
Original file line number Diff line number Diff line change 1
- using ComponentsWebAssembly_CSharp . Server . Models ;
2
- using IdentityServer4 . EntityFramework . Options ;
3
- using Microsoft . AspNetCore . ApiAuthorization . IdentityServer ;
1
+ using Microsoft . AspNetCore . ApiAuthorization . IdentityServer ;
4
2
using Microsoft . EntityFrameworkCore ;
5
3
using Microsoft . Extensions . Options ;
6
- using System ;
7
- using System . Collections . Generic ;
8
- using System . Linq ;
9
- using System . Threading . Tasks ;
4
+ using IdentityServer4 . EntityFramework . Options ;
5
+ using ComponentsWebAssembly_CSharp . Server . Models ;
10
6
11
7
namespace ComponentsWebAssembly_CSharp . Server . Data
12
8
{
Original file line number Diff line number Diff line change 1
1
using Microsoft . AspNetCore . Identity ;
2
- using System ;
3
- using System . Collections . Generic ;
4
- using System . Linq ;
5
- using System . Threading . Tasks ;
6
2
7
3
namespace ComponentsWebAssembly_CSharp . Server . Models
8
4
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Diagnostics ;
4
- using System . Linq ;
5
- using System . Threading . Tasks ;
1
+ using System . Diagnostics ;
6
2
using Microsoft . AspNetCore . Mvc ;
7
3
using Microsoft . AspNetCore . Mvc . RazorPages ;
8
- using Microsoft . Extensions . Logging ;
9
4
10
5
namespace ComponentsWebAssembly_CSharp . Server . Pages
11
6
{
Original file line number Diff line number Diff line change 1
- using System . Linq ;
2
- #if ( OrganizationalAuth || IndividualB2CAuth || IndividualLocalAuth )
1
+ #if ( OrganizationalAuth || IndividualB2CAuth || IndividualLocalAuth )
3
2
using Microsoft . AspNetCore . Authentication ;
4
3
#endif
5
4
#if ( OrganizationalAuth || IndividualB2CAuth )
6
5
using Microsoft . AspNetCore . Authentication . JwtBearer ;
7
6
#endif
8
- using Microsoft . AspNetCore . Builder ;
9
- using Microsoft . AspNetCore . Hosting ;
10
7
using Microsoft . AspNetCore . ResponseCompression ;
11
8
#if ( IndividualLocalAuth )
12
9
using Microsoft . EntityFrameworkCore ;
13
10
#endif
14
- using Microsoft . Extensions . Configuration ;
15
- using Microsoft . Extensions . DependencyInjection ;
16
- using Microsoft . Extensions . Hosting ;
17
11
#if ( GenerateGraph )
18
12
using Graph = Microsoft . Graph ;
19
13
#endif
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Text ;
4
-
5
- namespace ComponentsWebAssembly_CSharp . Shared
1
+ namespace ComponentsWebAssembly_CSharp . Shared
6
2
{
7
3
public class WeatherForecast
8
4
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using Microsoft . AspNetCore . Builder ;
3
- using Microsoft . Extensions . Hosting ;
4
-
5
1
var builder = WebApplication . CreateBuilder ( args ) ;
6
2
var app = builder . Build ( ) ;
7
3
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . IO ;
4
- using System . Linq ;
5
- using System . Threading . Tasks ;
6
- using Microsoft . AspNetCore . Builder ;
7
- using Microsoft . AspNetCore . Hosting ;
8
- using Microsoft . Extensions . DependencyInjection ;
9
- using Microsoft . Extensions . Hosting ;
10
1
using GrpcService_CSharp . Services ;
11
2
12
3
var builder = WebApplication . CreateBuilder ( args ) ;
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Threading . Tasks ;
5
1
using Grpc . Core ;
6
- using Microsoft . Extensions . Logging ;
7
2
using GrpcService_CSharp ;
8
3
9
4
namespace GrpcService_CSharp . Services
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Threading . Tasks ;
5
- using Microsoft . AspNetCore . Mvc ;
1
+ using Microsoft . AspNetCore . Mvc ;
6
2
using Microsoft . AspNetCore . Mvc . RazorPages ;
7
3
8
4
namespace Company . RazorClassLibrary1 . MyFeature . Pages
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Threading . Tasks ;
3
1
using Microsoft . JSInterop ;
4
2
5
3
namespace Company . RazorClassLibrary1
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Text ;
4
- using Microsoft . AspNetCore . Identity . EntityFrameworkCore ;
1
+ using Microsoft . AspNetCore . Identity . EntityFrameworkCore ;
5
2
using Microsoft . EntityFrameworkCore ;
6
3
7
4
namespace Company . WebApplication1 . Data
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
1
using System . Diagnostics ;
4
- using System . Linq ;
5
- using System . Threading . Tasks ;
6
2
using Microsoft . AspNetCore . Mvc ;
7
3
using Microsoft . AspNetCore . Mvc . RazorPages ;
8
- using Microsoft . Extensions . Logging ;
9
4
10
5
namespace Company . WebApplication1 . Pages
11
6
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Threading . Tasks ;
5
- #if ( GenerateApiOrGraph )
6
- using Microsoft . Extensions . Configuration ;
7
- using Microsoft . Identity . Web ;
1
+ #if ( GenerateApiOrGraph )
8
2
using System . Net ;
9
- using System . Net . Http ;
10
3
#endif
4
+ using Microsoft . AspNetCore . Mvc ;
5
+ using Microsoft . AspNetCore . Mvc . RazorPages ;
11
6
#if ( GenerateGraph )
12
7
using Microsoft . Graph ;
13
8
#endif
14
- using Microsoft . AspNetCore . Mvc ;
15
- using Microsoft . AspNetCore . Mvc . RazorPages ;
16
- using Microsoft . Extensions . Logging ;
9
+ #if ( GenerateApiOrGraph )
10
+ using Microsoft . Identity . Web ;
11
+ #endif
17
12
18
13
namespace Company . WebApplication1 . Pages
19
14
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Threading . Tasks ;
5
- using Microsoft . AspNetCore . Mvc ;
1
+ using Microsoft . AspNetCore . Mvc ;
6
2
using Microsoft . AspNetCore . Mvc . RazorPages ;
7
- using Microsoft . Extensions . Logging ;
8
3
9
4
namespace Company . WebApplication1 . Pages
10
5
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Threading . Tasks ;
5
1
#if ( OrganizationalAuth || IndividualB2CAuth )
6
2
using Microsoft . AspNetCore . Authentication ;
7
- using Microsoft . Identity . Web ;
8
- using Microsoft . Identity . Web . UI ;
9
3
using Microsoft . AspNetCore . Authentication . OpenIdConnect ;
10
4
using Microsoft . AspNetCore . Authorization ;
11
5
#endif
12
- using Microsoft . AspNetCore . Builder ;
13
- using Microsoft . AspNetCore . Hosting ;
14
6
#if ( IndividualLocalAuth )
15
7
using Microsoft . AspNetCore . Identity ;
16
8
#endif
20
12
#if ( IndividualLocalAuth )
21
13
using Microsoft . EntityFrameworkCore ;
22
14
#endif
23
- using Microsoft . Extensions . Configuration ;
24
- using Microsoft . Extensions . DependencyInjection ;
25
- using Microsoft . Extensions . Hosting ;
26
- using Microsoft . Extensions . Logging ;
15
+ #if ( OrganizationalAuth || IndividualB2CAuth )
16
+ using Microsoft . Identity . Web ;
17
+ using Microsoft . Identity . Web . UI ;
18
+ #endif
27
19
#if ( MultiOrgAuth )
28
20
using Microsoft . IdentityModel . Tokens ;
29
21
#endif
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Diagnostics ;
4
- using System . Linq ;
5
- using System . Threading . Tasks ;
6
- #if ( OrganizationalAuth )
7
- using Microsoft . AspNetCore . Authorization ;
8
- #endif
1
+ using System . Diagnostics ;
9
2
#if ( GenerateApiOrGraph )
10
- using Microsoft . Extensions . Configuration ;
11
- using Microsoft . Identity . Web ;
12
3
using System . Net ;
13
- using System . Net . Http ;
14
4
#endif
5
+ #if ( OrganizationalAuth )
6
+ using Microsoft . AspNetCore . Authorization ;
7
+ #endif
8
+ using Microsoft . AspNetCore . Mvc ;
15
9
#if ( GenerateGraph )
16
10
using Microsoft . Graph ;
17
11
#endif
18
- using Microsoft . AspNetCore . Mvc ;
19
- using Microsoft . Extensions . Logging ;
12
+ #if ( GenerateApiOrGraph )
13
+ using Microsoft . Identity . Web ;
14
+ #endif
20
15
using Company . WebApplication1 . Models ;
21
16
22
17
namespace Company . WebApplication1 . Controllers
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Text ;
4
- using Microsoft . AspNetCore . Identity . EntityFrameworkCore ;
1
+ using Microsoft . AspNetCore . Identity . EntityFrameworkCore ;
5
2
using Microsoft . EntityFrameworkCore ;
6
3
7
4
namespace Company . WebApplication1 . Data
Original file line number Diff line number Diff line change 1
- using System ;
2
-
3
1
namespace Company . WebApplication1 . Models
4
2
{
5
3
public class ErrorViewModel
You can’t perform that action at this time.
0 commit comments