Browse Source

Update the XML documentation and decorate OpenIddictEntityFrameworkCoreCustomizer with [EditorBrowsable(EditorBrowsableState.Never)]

pull/2437/head
Kévin Chalet 2 weeks ago
parent
commit
2ff81b8c1b
  1. 2
      src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreCustomizer.cs
  2. 36
      src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreHelpers.cs

2
src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreCustomizer.cs

@ -4,6 +4,7 @@
* the license and the contributors participating to this project. * the license and the contributors participating to this project.
*/ */
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using OpenIddict.EntityFrameworkCore.Models; using OpenIddict.EntityFrameworkCore.Models;
@ -13,6 +14,7 @@ namespace OpenIddict.EntityFrameworkCore;
/// Represents a model customizer able to register the entity sets /// Represents a model customizer able to register the entity sets
/// required by the OpenIddict stack in an Entity Framework Core context. /// required by the OpenIddict stack in an Entity Framework Core context.
/// </summary> /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class OpenIddictEntityFrameworkCoreCustomizer< public sealed class OpenIddictEntityFrameworkCoreCustomizer<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization,

36
src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreHelpers.cs

@ -22,8 +22,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Registers the OpenIddict entity sets in the Entity Framework Core context /// Registers the OpenIddict entity sets in the Entity Framework Core context
/// using the default OpenIddict models and the default key type (string). /// using the default OpenIddict models and the default key type (string).
/// </summary> /// </summary>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder UseOpenIddict(this DbContextOptionsBuilder builder) public static DbContextOptionsBuilder UseOpenIddict(this DbContextOptionsBuilder builder)
=> builder.UseOpenIddict<OpenIddictEntityFrameworkCoreApplication, => builder.UseOpenIddict<OpenIddictEntityFrameworkCoreApplication,
OpenIddictEntityFrameworkCoreAuthorization, OpenIddictEntityFrameworkCoreAuthorization,
@ -34,8 +34,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Registers the OpenIddict entity sets in the Entity Framework Core context /// Registers the OpenIddict entity sets in the Entity Framework Core context
/// using the default OpenIddict models and the default key type (string). /// using the default OpenIddict models and the default key type (string).
/// </summary> /// </summary>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder<TContext> UseOpenIddict<TContext>(this DbContextOptionsBuilder<TContext> builder) public static DbContextOptionsBuilder<TContext> UseOpenIddict<TContext>(this DbContextOptionsBuilder<TContext> builder)
where TContext : DbContext where TContext : DbContext
{ {
@ -51,8 +51,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Note: when using a custom key type, the new key type MUST be registered by calling /// Note: when using a custom key type, the new key type MUST be registered by calling
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>. /// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>.
/// </remarks> /// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder UseOpenIddict< public static DbContextOptionsBuilder UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey>(this DbContextOptionsBuilder builder) [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey>(this DbContextOptionsBuilder builder)
where TKey : notnull, IEquatable<TKey> where TKey : notnull, IEquatable<TKey>
@ -69,8 +69,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Note: when using a custom key type, the new key type MUST be registered by calling /// Note: when using a custom key type, the new key type MUST be registered by calling
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>. /// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>.
/// </remarks> /// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder<TContext> UseOpenIddict< public static DbContextOptionsBuilder<TContext> UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey,
TContext>(this DbContextOptionsBuilder<TContext> builder) TContext>(this DbContextOptionsBuilder<TContext> builder)
@ -89,8 +89,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Note: when using custom entities, the new entities MUST be registered by calling /// Note: when using custom entities, the new entities MUST be registered by calling
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>. /// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>.
/// </remarks> /// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder UseOpenIddict< public static DbContextOptionsBuilder UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization,
@ -124,8 +124,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Note: when using custom entities, the new entities MUST be registered by calling /// Note: when using custom entities, the new entities MUST be registered by calling
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>. /// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>.
/// </remarks> /// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder<TContext> UseOpenIddict< public static DbContextOptionsBuilder<TContext> UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization,
@ -149,8 +149,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Registers the OpenIddict entity sets in the Entity Framework Core context /// Registers the OpenIddict entity sets in the Entity Framework Core context
/// using the default OpenIddict models and the default key type (string). /// using the default OpenIddict models and the default key type (string).
/// </summary> /// </summary>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static ModelBuilder UseOpenIddict(this ModelBuilder builder) public static ModelBuilder UseOpenIddict(this ModelBuilder builder)
=> builder.UseOpenIddict<OpenIddictEntityFrameworkCoreApplication, => builder.UseOpenIddict<OpenIddictEntityFrameworkCoreApplication,
OpenIddictEntityFrameworkCoreAuthorization, OpenIddictEntityFrameworkCoreAuthorization,
@ -165,8 +165,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Note: when using a custom key type, the new key type MUST be registered by calling /// Note: when using a custom key type, the new key type MUST be registered by calling
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>. /// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>.
/// </remarks> /// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static ModelBuilder UseOpenIddict< public static ModelBuilder UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey>(this ModelBuilder builder) where TKey : notnull, IEquatable<TKey> [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey>(this ModelBuilder builder) where TKey : notnull, IEquatable<TKey>
=> builder.UseOpenIddict<OpenIddictEntityFrameworkCoreApplication<TKey>, => builder.UseOpenIddict<OpenIddictEntityFrameworkCoreApplication<TKey>,
@ -182,8 +182,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Note: when using custom entities, the new entities MUST be registered by calling /// Note: when using custom entities, the new entities MUST be registered by calling
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>. /// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>.
/// </remarks> /// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param> /// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework context builder.</returns> /// <returns>The Entity Framework Core context builder.</returns>
public static ModelBuilder UseOpenIddict< public static ModelBuilder UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization,

Loading…
Cancel
Save