Skip to content

Commit d522be0

Browse files
author
Thomas Duft
committed
removed some build warnings
1 parent 636afb8 commit d522be0

File tree

4 files changed

+33
-27
lines changed

4 files changed

+33
-27
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ dotnet_diagnostic.CA1848.severity = none
7171
# CA1852: Type 'Program' can be sealed because it has no subtypes in its containing assembly and is not externally visible
7272
dotnet_diagnostic.CA1852.severity = none
7373

74+
# IDE0005
75+
dotnet_diagnostic.IDE0005.severity = none
7476
# IDE0290: Use primary constructor (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0290)
7577
dotnet_diagnostic.IDE0290.severity = none
7678

samples/Server/ConfigureServices.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ string environmentName
7474
});
7575
}
7676

77-
services.AddOpenIddict()
78-
// Register the OpenIddict core components.
77+
services.AddOpenIddict()
78+
// Register the OpenIddict core components.
7979
.AddCore(options =>
8080
{
8181
options.UseEntityFrameworkCore();
8282
if (!Helpers.Constants.IsTestingEnvironment(environmentName))
8383
{
8484
options.UseQuartz();
8585
}
86-
})
87-
// Register the OpenIddict server components.
86+
})
87+
// Register the OpenIddict server components.
8888
.AddServer(options =>
8989
{
9090
options.SetIssuer(new Uri("https://localhost:5001/"));
@@ -139,17 +139,17 @@ string environmentName
139139
{
140140
options.DisableAccessTokenEncryption();
141141
}
142-
})
143-
// Register the OpenIddict validation components.
142+
})
143+
// Register the OpenIddict validation components.
144144
.AddValidation(options =>
145145
{
146146
// Import the configuration from the local OpenIddict server instance.
147147
options.UseLocalServer();
148148

149149
// Register the ASP.NET Core host.
150150
options.UseAspNetCore();
151-
})
152-
// Register the EF based UI Store for OpenIddict related entities.
151+
})
152+
// Register the EF based UI Store for OpenIddict related entities.
153153
.AddUIStore(options =>
154154
{
155155
options.OpenIddictUIContext = builder =>
@@ -164,8 +164,8 @@ string environmentName
164164
.Name);
165165
});
166166
};
167-
})
168-
// Register the APIs for the EF based UI Store based on OpenIddict.
167+
})
168+
// Register the APIs for the EF based UI Store based on OpenIddict.
169169
.AddUIApis(options =>
170170
{
171171
// Tell the system about the allowed Permissions it is built/configured for.
@@ -185,8 +185,8 @@ string environmentName
185185
Permissions.Prefixes.Scope + "server_scope",
186186
Permissions.Prefixes.Scope + "api_scope"
187187
];
188-
})
189-
// Register the EF based UI Store for the ASP.NET Identity related entities.
188+
})
189+
// Register the EF based UI Store for the ASP.NET Identity related entities.
190190
.AddUIIdentityStore<ApplicationUser>(options =>
191191
{
192192
options.OpenIddictUIIdentityContext = builder =>
@@ -201,8 +201,8 @@ string environmentName
201201
.Name);
202202
});
203203
};
204-
})
205-
// Register the APIs for the EF based UI Store based on ASP.NET Identity.
204+
})
205+
// Register the APIs for the EF based UI Store based on ASP.NET Identity.
206206
.AddUIIdentityApis<ApplicationUser>();
207207

208208
if (!Helpers.Constants.IsTestingEnvironment(environmentName))

src/identity/OpenIddict.UI.Identity.Api/DependencyInjection.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private static IServiceCollection AddAuthorizationServices(
7171
Action<AuthorizationPolicyBuilder> policy
7272
)
7373
{
74-
services.AddAuthorizationBuilder()
74+
services.AddAuthorizationBuilder()
7575
.AddPolicy(Policies.OpenIddictUiIdentityApiPolicy, policy
7676
);
7777

@@ -85,12 +85,14 @@ string routePrefix
8585
{
8686
builder.Services.AddControllers(options =>
8787
{
88-
options.UseOpenIddictUIRoutePrefix(routePrefix, new List<Type>
89-
{
90-
typeof(AccountController),
91-
typeof(ClaimTypeController),
92-
typeof(RoleController)
93-
});
88+
options.UseOpenIddictUIRoutePrefix(
89+
routePrefix,
90+
[
91+
typeof(AccountController),
92+
typeof(ClaimTypeController),
93+
typeof(RoleController)
94+
]
95+
);
9496
});
9597

9698
return builder;

src/openiddict/OpenIddict.UI.Api/DependencyInjection.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static IServiceCollection AddAuthorizationServices(
4747
Action<AuthorizationPolicyBuilder> policy
4848
)
4949
{
50-
services.AddAuthorizationBuilder()
50+
services.AddAuthorizationBuilder()
5151
.AddPolicy(Policies.OpenIddictUiApiPolicy, policy
5252
);
5353

@@ -61,11 +61,13 @@ string routePrefix
6161
{
6262
builder.Services.AddControllers(options =>
6363
{
64-
options.UseOpenIddictUIRoutePrefix(routePrefix, new List<Type>
65-
{
66-
typeof(ApplicationController),
67-
typeof(ScopeController)
68-
});
64+
options.UseOpenIddictUIRoutePrefix(
65+
routePrefix,
66+
[
67+
typeof(ApplicationController),
68+
typeof(ScopeController)
69+
]
70+
);
6971
});
7072

7173
return builder;

0 commit comments

Comments
 (0)