diff --git a/Directory.Build.props b/Directory.Build.props index 8d70e562..ace8a1cd 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,6 +4,7 @@ preview + preview $(NoWarn);CS1591;NU5118;NU5128 true true diff --git a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs index 144853d0..7cb91e69 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs @@ -9,6 +9,7 @@ using System.Buffers.Binary; using System.Collections.Generic; using System.Collections.Immutable; using System.ComponentModel.DataAnnotations; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Runtime.CompilerServices; @@ -22,7 +23,6 @@ using Microsoft.Extensions.Options; using OpenIddict.Abstractions; using static OpenIddict.Abstractions.OpenIddictConstants; using SR = OpenIddict.Abstractions.OpenIddictResources; -using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; #if !SUPPORTS_KEY_DERIVATION_WITH_SPECIFIED_HASH_ALGORITHM using Org.BouncyCastle.Crypto; @@ -445,7 +445,7 @@ namespace OpenIddict.Core throw new ArgumentNullException(nameof(query)); } - return GetAsync((applications, state) => state(applications), query, cancellationToken); + return GetAsync(static (applications, query) => query(applications), query, cancellationToken); } /// @@ -862,7 +862,7 @@ namespace OpenIddict.Core throw new ArgumentNullException(nameof(query)); } - return ListAsync((applications, state) => state(applications), query, cancellationToken); + return ListAsync(static (applications, query) => query(applications), query, cancellationToken); } /// diff --git a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs index 55d37f86..4803ba27 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs @@ -656,7 +656,7 @@ namespace OpenIddict.Core throw new ArgumentNullException(nameof(query)); } - return GetAsync((authorizations, state) => state(authorizations), query, cancellationToken); + return GetAsync(static (authorizations, query) => query(authorizations), query, cancellationToken); } /// @@ -893,7 +893,7 @@ namespace OpenIddict.Core throw new ArgumentNullException(nameof(query)); } - return ListAsync((authorizations, state) => state(authorizations), query, cancellationToken); + return ListAsync(static (authorizations, query) => query(authorizations), query, cancellationToken); } /// diff --git a/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs b/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs index 2d66c5b6..144dad6f 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs @@ -383,7 +383,7 @@ namespace OpenIddict.Core throw new ArgumentNullException(nameof(query)); } - return GetAsync((scopes, state) => state(scopes), query, cancellationToken); + return GetAsync(static (scopes, query) => query(scopes), query, cancellationToken); } /// @@ -704,7 +704,7 @@ namespace OpenIddict.Core throw new ArgumentNullException(nameof(query)); } - return ListAsync((scopes, state) => state(scopes), query, cancellationToken); + return ListAsync(static (scopes, query) => query(scopes), query, cancellationToken); } /// diff --git a/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs b/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs index 5a3d6508..dadf5a42 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs @@ -622,7 +622,7 @@ namespace OpenIddict.Core throw new ArgumentNullException(nameof(query)); } - return GetAsync((tokens, state) => state(tokens), query, cancellationToken); + return GetAsync(static (tokens, query) => query(tokens), query, cancellationToken); } /// @@ -892,7 +892,7 @@ namespace OpenIddict.Core throw new ArgumentNullException(nameof(query)); } - return ListAsync((tokens, state) => state(tokens), query, cancellationToken); + return ListAsync(static (tokens, query) => query(tokens), query, cancellationToken); } /// diff --git a/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkApplication.cs b/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkApplication.cs index 2e998737..c084f271 100644 --- a/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkApplication.cs +++ b/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkApplication.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace OpenIddict.EntityFramework.Models { @@ -74,8 +73,7 @@ namespace OpenIddict.EntityFramework.Models /// /// Gets or sets the unique identifier associated with the current application. /// - [AllowNull, MaybeNull] - public virtual TKey Id { get; set; } = default!; + public virtual TKey? Id { get; set; } /// /// Gets or sets the permissions associated with the diff --git a/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkAuthorization.cs b/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkAuthorization.cs index 0a68bdfd..84954f1b 100644 --- a/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkAuthorization.cs +++ b/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkAuthorization.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace OpenIddict.EntityFramework.Models { @@ -50,8 +49,7 @@ namespace OpenIddict.EntityFramework.Models /// /// Gets or sets the unique identifier associated with the current authorization. /// - [AllowNull, MaybeNull] - public virtual TKey Id { get; set; } = default!; + public virtual TKey? Id { get; set; } /// /// Gets or sets the additional properties serialized as a JSON object, diff --git a/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkScope.cs b/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkScope.cs index 04ab550e..34226a16 100644 --- a/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkScope.cs +++ b/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkScope.cs @@ -6,7 +6,6 @@ using System; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace OpenIddict.EntityFramework.Models { @@ -59,8 +58,7 @@ namespace OpenIddict.EntityFramework.Models /// /// Gets or sets the unique identifier associated with the current scope. /// - [AllowNull, MaybeNull] - public virtual TKey Id { get; set; } = default!; + public virtual TKey? Id { get; set; } /// /// Gets or sets the unique name associated with the current scope. diff --git a/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkToken.cs b/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkToken.cs index 3316071c..ae21cab6 100644 --- a/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkToken.cs +++ b/src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkToken.cs @@ -6,7 +6,6 @@ using System; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace OpenIddict.EntityFramework.Models { @@ -59,8 +58,7 @@ namespace OpenIddict.EntityFramework.Models /// /// Gets or sets the unique identifier associated with the current token. /// - [AllowNull, MaybeNull] - public virtual TKey Id { get; set; } = default!; + public virtual TKey? Id { get; set; } /// /// Gets or sets the payload of the current token, if applicable. diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs index c10d2d3a..7d848d7e 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs @@ -11,7 +11,6 @@ using System.ComponentModel; using System.Data; using System.Data.Entity; using System.Data.Entity.Infrastructure; -using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; @@ -862,8 +861,7 @@ namespace OpenIddict.EntityFramework /// /// The identifier to convert. /// An instance of representing the provided identifier. - [return: MaybeNull] - public virtual TKey ConvertIdentifierFromString(string? identifier) + public virtual TKey? ConvertIdentifierFromString(string? identifier) { if (string.IsNullOrEmpty(identifier)) { @@ -878,7 +876,7 @@ namespace OpenIddict.EntityFramework /// /// The identifier to convert. /// A representation of the provided identifier. - public virtual string? ConvertIdentifierToString([AllowNull] TKey identifier) + public virtual string? ConvertIdentifierToString(TKey? identifier) { if (Equals(identifier, default(TKey))) { diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs index dca2714e..4e1bcddd 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs @@ -11,7 +11,6 @@ using System.ComponentModel; using System.Data; using System.Data.Entity; using System.Data.Entity.Infrastructure; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.CompilerServices; using System.Text.Encodings.Web; @@ -820,8 +819,7 @@ namespace OpenIddict.EntityFramework /// /// The identifier to convert. /// An instance of representing the provided identifier. - [return: MaybeNull] - public virtual TKey ConvertIdentifierFromString(string? identifier) + public virtual TKey? ConvertIdentifierFromString(string? identifier) { if (string.IsNullOrEmpty(identifier)) { @@ -836,7 +834,7 @@ namespace OpenIddict.EntityFramework /// /// The identifier to convert. /// A representation of the provided identifier. - public virtual string? ConvertIdentifierToString([AllowNull] TKey identifier) + public virtual string? ConvertIdentifierToString(TKey? identifier) { if (Equals(identifier, default(TKey))) { diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkScopeStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkScopeStore.cs index 86f05910..feee3183 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkScopeStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkScopeStore.cs @@ -10,7 +10,6 @@ using System.Collections.Immutable; using System.ComponentModel; using System.Data.Entity; using System.Data.Entity.Infrastructure; -using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; @@ -630,8 +629,7 @@ namespace OpenIddict.EntityFramework /// /// The identifier to convert. /// An instance of representing the provided identifier. - [return: MaybeNull] - public virtual TKey ConvertIdentifierFromString(string? identifier) + public virtual TKey? ConvertIdentifierFromString(string? identifier) { if (string.IsNullOrEmpty(identifier)) { @@ -646,7 +644,7 @@ namespace OpenIddict.EntityFramework /// /// The identifier to convert. /// A representation of the provided identifier. - public virtual string? ConvertIdentifierToString([AllowNull] TKey identifier) + public virtual string? ConvertIdentifierToString(TKey? identifier) { if (Equals(identifier, default(TKey))) { diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs index f537aa88..bcf47cda 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs @@ -11,7 +11,6 @@ using System.ComponentModel; using System.Data; using System.Data.Entity; using System.Data.Entity.Infrastructure; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text.Encodings.Web; using System.Text.Json; @@ -848,8 +847,7 @@ namespace OpenIddict.EntityFramework /// /// The identifier to convert. /// An instance of representing the provided identifier. - [return: MaybeNull] - public virtual TKey ConvertIdentifierFromString(string? identifier) + public virtual TKey? ConvertIdentifierFromString(string? identifier) { if (string.IsNullOrEmpty(identifier)) { @@ -864,7 +862,7 @@ namespace OpenIddict.EntityFramework /// /// The identifier to convert. /// A representation of the provided identifier. - public virtual string? ConvertIdentifierToString([AllowNull] TKey identifier) + public virtual string? ConvertIdentifierToString(TKey? identifier) { if (Equals(identifier, default(TKey))) { diff --git a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreApplication.cs b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreApplication.cs index 5407240e..dd3135fd 100644 --- a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreApplication.cs +++ b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreApplication.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace OpenIddict.EntityFrameworkCore.Models { @@ -82,8 +81,7 @@ namespace OpenIddict.EntityFrameworkCore.Models /// /// Gets or sets the unique identifier associated with the current application. /// - [AllowNull, MaybeNull] - public virtual TKey Id { get; set; } = default!; + public virtual TKey? Id { get; set; } /// /// Gets or sets the permissions associated with the diff --git a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreAuthorization.cs b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreAuthorization.cs index 311a148a..2007b92b 100644 --- a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreAuthorization.cs +++ b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreAuthorization.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace OpenIddict.EntityFrameworkCore.Models { @@ -58,8 +57,7 @@ namespace OpenIddict.EntityFrameworkCore.Models /// /// Gets or sets the unique identifier associated with the current authorization. /// - [AllowNull, MaybeNull] - public virtual TKey Id { get; set; } = default!; + public virtual TKey? Id { get; set; } /// /// Gets or sets the additional properties serialized as a JSON object, diff --git a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreScope.cs b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreScope.cs index 3c2525b6..8d063b3c 100644 --- a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreScope.cs +++ b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreScope.cs @@ -6,7 +6,6 @@ using System; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace OpenIddict.EntityFrameworkCore.Models { @@ -59,8 +58,7 @@ namespace OpenIddict.EntityFrameworkCore.Models /// /// Gets or sets the unique identifier associated with the current scope. /// - [AllowNull, MaybeNull] - public virtual TKey Id { get; set; } = default!; + public virtual TKey? Id { get; set; } /// /// Gets or sets the unique name associated with the current scope. diff --git a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreToken.cs b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreToken.cs index 7c211f3b..4495b909 100644 --- a/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreToken.cs +++ b/src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreToken.cs @@ -6,7 +6,6 @@ using System; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace OpenIddict.EntityFrameworkCore.Models { @@ -67,8 +66,7 @@ namespace OpenIddict.EntityFrameworkCore.Models /// /// Gets or sets the unique identifier associated with the current token. /// - [AllowNull, MaybeNull] - public virtual TKey Id { get; set; } = default!; + public virtual TKey? Id { get; set; } /// /// Gets or sets the payload of the current token, if applicable. diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs index 2526d983..f60186dc 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.ComponentModel; using System.Data; -using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; @@ -912,8 +911,7 @@ namespace OpenIddict.EntityFrameworkCore /// /// The identifier to convert. /// An instance of representing the provided identifier. - [return: MaybeNull] - public virtual TKey ConvertIdentifierFromString(string? identifier) + public virtual TKey? ConvertIdentifierFromString(string? identifier) { if (string.IsNullOrEmpty(identifier)) { @@ -928,7 +926,7 @@ namespace OpenIddict.EntityFrameworkCore /// /// The identifier to convert. /// A representation of the provided identifier. - public virtual string? ConvertIdentifierToString([AllowNull] TKey identifier) + public virtual string? ConvertIdentifierToString(TKey? identifier) { if (Equals(identifier, default(TKey))) { diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs index 25282d3e..6e319ac8 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.ComponentModel; using System.Data; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Runtime.CompilerServices; using System.Text.Encodings.Web; @@ -905,8 +904,7 @@ namespace OpenIddict.EntityFrameworkCore /// /// The identifier to convert. /// An instance of representing the provided identifier. - [return: MaybeNull] - public virtual TKey ConvertIdentifierFromString(string? identifier) + public virtual TKey? ConvertIdentifierFromString(string? identifier) { if (string.IsNullOrEmpty(identifier)) { @@ -921,7 +919,7 @@ namespace OpenIddict.EntityFrameworkCore /// /// The identifier to convert. /// A representation of the provided identifier. - public virtual string? ConvertIdentifierToString([AllowNull] TKey identifier) + public virtual string? ConvertIdentifierToString(TKey? identifier) { if (Equals(identifier, default(TKey))) { diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreScopeStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreScopeStore.cs index 8079129b..a2fa0282 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreScopeStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreScopeStore.cs @@ -8,7 +8,6 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; @@ -646,8 +645,7 @@ namespace OpenIddict.EntityFrameworkCore /// /// The identifier to convert. /// An instance of representing the provided identifier. - [return: MaybeNull] - public virtual TKey ConvertIdentifierFromString(string? identifier) + public virtual TKey? ConvertIdentifierFromString(string? identifier) { if (string.IsNullOrEmpty(identifier)) { @@ -662,7 +660,7 @@ namespace OpenIddict.EntityFrameworkCore /// /// The identifier to convert. /// A representation of the provided identifier. - public virtual string? ConvertIdentifierToString([AllowNull] TKey identifier) + public virtual string? ConvertIdentifierToString(TKey? identifier) { if (Equals(identifier, default(TKey))) { diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs index 8d1dc3bf..4dd14382 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.ComponentModel; using System.Data; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text.Encodings.Web; using System.Text.Json; @@ -918,8 +917,7 @@ namespace OpenIddict.EntityFrameworkCore /// /// The identifier to convert. /// An instance of representing the provided identifier. - [return: MaybeNull] - public virtual TKey ConvertIdentifierFromString(string? identifier) + public virtual TKey? ConvertIdentifierFromString(string? identifier) { if (string.IsNullOrEmpty(identifier)) { @@ -934,7 +932,7 @@ namespace OpenIddict.EntityFrameworkCore /// /// The identifier to convert. /// A representation of the provided identifier. - public virtual string? ConvertIdentifierToString([AllowNull] TKey identifier) + public virtual string? ConvertIdentifierToString(TKey? identifier) { if (Equals(identifier, default(TKey))) { diff --git a/src/OpenIddict.Server/OpenIddictServerBuilder.cs b/src/OpenIddict.Server/OpenIddictServerBuilder.cs index 4360c644..fba838b4 100644 --- a/src/OpenIddict.Server/OpenIddictServerBuilder.cs +++ b/src/OpenIddict.Server/OpenIddictServerBuilder.cs @@ -6,6 +6,7 @@ using System; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Reflection; @@ -17,7 +18,6 @@ using Microsoft.IdentityModel.Tokens; using OpenIddict.Server; using static OpenIddict.Abstractions.OpenIddictConstants; using SR = OpenIddict.Abstractions.OpenIddictResources; -using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; namespace Microsoft.Extensions.DependencyInjection { diff --git a/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs b/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs index b8cfd52a..fe7aeab9 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationBuilder.cs @@ -6,6 +6,7 @@ using System; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Reflection; @@ -16,7 +17,6 @@ using Microsoft.IdentityModel.Protocols.OpenIdConnect; using Microsoft.IdentityModel.Tokens; using OpenIddict.Validation; using SR = OpenIddict.Abstractions.OpenIddictResources; -using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; namespace Microsoft.Extensions.DependencyInjection {