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.
*/
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using OpenIddict.EntityFrameworkCore.Models;
@ -13,6 +14,7 @@ namespace OpenIddict.EntityFrameworkCore;
/// Represents a model customizer able to register the entity sets
/// required by the OpenIddict stack in an Entity Framework Core context.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class OpenIddictEntityFrameworkCoreCustomizer<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication,
[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
/// using the default OpenIddict models and the default key type (string).
/// </summary>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder UseOpenIddict(this DbContextOptionsBuilder builder)
=> builder.UseOpenIddict<OpenIddictEntityFrameworkCoreApplication,
OpenIddictEntityFrameworkCoreAuthorization,
@ -34,8 +34,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Registers the OpenIddict entity sets in the Entity Framework Core context
/// using the default OpenIddict models and the default key type (string).
/// </summary>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder<TContext> UseOpenIddict<TContext>(this DbContextOptionsBuilder<TContext> builder)
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
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>.
/// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey>(this DbContextOptionsBuilder builder)
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
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>.
/// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder<TContext> UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey,
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
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>.
/// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication,
[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
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>.
/// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static DbContextOptionsBuilder<TContext> UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization,
@ -149,8 +149,8 @@ public static class OpenIddictEntityFrameworkCoreHelpers
/// Registers the OpenIddict entity sets in the Entity Framework Core context
/// using the default OpenIddict models and the default key type (string).
/// </summary>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static ModelBuilder UseOpenIddict(this ModelBuilder builder)
=> builder.UseOpenIddict<OpenIddictEntityFrameworkCoreApplication,
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
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TKey}"/>.
/// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static ModelBuilder UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TKey>(this ModelBuilder builder) where TKey : notnull, IEquatable<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
/// <see cref="OpenIddictEntityFrameworkCoreBuilder.ReplaceDefaultEntities{TApplication, TAuthorization, TScope, TToken, TKey}"/>.
/// </remarks>
/// <param name="builder">The builder used to configure the Entity Framework context.</param>
/// <returns>The Entity Framework context builder.</returns>
/// <param name="builder">The builder used to configure the Entity Framework Core context.</param>
/// <returns>The Entity Framework Core context builder.</returns>
public static ModelBuilder UseOpenIddict<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TApplication,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TAuthorization,

Loading…
Cancel
Save