diff --git a/src/OpenIddict.Abstractions/OpenIddictExtensions.cs b/src/OpenIddict.Abstractions/OpenIddictExtensions.cs index b23473fe..6173a38e 100644 --- a/src/OpenIddict.Abstractions/OpenIddictExtensions.cs +++ b/src/OpenIddict.Abstractions/OpenIddictExtensions.cs @@ -9,6 +9,9 @@ using JetBrains.Annotations; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Exposes extensions allowing to register the OpenIddict services. + /// public static class OpenIddictExtensions { /// diff --git a/src/OpenIddict.Core/OpenIddictCoreExtensions.cs b/src/OpenIddict.Core/OpenIddictCoreExtensions.cs index bfdbbfcf..d0dc50fe 100644 --- a/src/OpenIddict.Core/OpenIddictCoreExtensions.cs +++ b/src/OpenIddict.Core/OpenIddictCoreExtensions.cs @@ -14,6 +14,9 @@ using OpenIddict.Core; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Exposes extensions allowing to register the OpenIddict core services. + /// public static class OpenIddictCoreExtensions { /// diff --git a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkExtensions.cs b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkExtensions.cs index c5225680..ccbc32e7 100644 --- a/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkExtensions.cs +++ b/src/OpenIddict.EntityFramework/OpenIddictEntityFrameworkExtensions.cs @@ -13,6 +13,9 @@ using OpenIddict.EntityFramework.Models; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Exposes extensions allowing to register the OpenIddict Entity Framework 6.x services. + /// public static class OpenIddictEntityFrameworkExtensions { /// diff --git a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreExtensions.cs b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreExtensions.cs index e9936d05..cccdec71 100644 --- a/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreExtensions.cs +++ b/src/OpenIddict.EntityFrameworkCore/OpenIddictEntityFrameworkCoreExtensions.cs @@ -15,6 +15,9 @@ using OpenIddict.EntityFrameworkCore.Models; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Exposes extensions allowing to register the OpenIddict Entity Framework Core services. + /// public static class OpenIddictEntityFrameworkCoreExtensions { /// diff --git a/src/OpenIddict.MongoDb/OpenIddictMongoDbExtensions.cs b/src/OpenIddict.MongoDb/OpenIddictMongoDbExtensions.cs index 8215db7f..7274f1cf 100644 --- a/src/OpenIddict.MongoDb/OpenIddictMongoDbExtensions.cs +++ b/src/OpenIddict.MongoDb/OpenIddictMongoDbExtensions.cs @@ -13,6 +13,9 @@ using OpenIddict.MongoDb.Models; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Exposes extensions allowing to register the OpenIddict MongoDB services. + /// public static class OpenIddictMongoDbExtensions { /// diff --git a/src/OpenIddict.Mvc/OpenIddictMvcBinder.cs b/src/OpenIddict.Mvc/Internal/OpenIddictMvcBinder.cs similarity index 83% rename from src/OpenIddict.Mvc/OpenIddictMvcBinder.cs rename to src/OpenIddict.Mvc/Internal/OpenIddictMvcBinder.cs index ed78e4d0..c3efa91d 100644 --- a/src/OpenIddict.Mvc/OpenIddictMvcBinder.cs +++ b/src/OpenIddict.Mvc/Internal/OpenIddictMvcBinder.cs @@ -14,17 +14,24 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Options; -namespace OpenIddict.Mvc +namespace OpenIddict.Mvc.Internal { /// /// Represents an ASP.NET Core MVC model binder that is able to bind - /// and - /// instances. + /// and instances. + /// Note: this API supports the OpenIddict infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future minor releases. /// public class OpenIddictMvcBinder : IModelBinder { private readonly IOptions _options; + /// + /// Creates a new instance of the class. + /// and instances. + /// Note: this API supports the OpenIddict infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future minor releases. + /// public OpenIddictMvcBinder([NotNull] IOptions options) { _options = options; diff --git a/src/OpenIddict.Mvc/OpenIddictMvcBinderProvider.cs b/src/OpenIddict.Mvc/Internal/OpenIddictMvcBinderProvider.cs similarity index 81% rename from src/OpenIddict.Mvc/OpenIddictMvcBinderProvider.cs rename to src/OpenIddict.Mvc/Internal/OpenIddictMvcBinderProvider.cs index 167c0c8f..8e2938d0 100644 --- a/src/OpenIddict.Mvc/OpenIddictMvcBinderProvider.cs +++ b/src/OpenIddict.Mvc/Internal/OpenIddictMvcBinderProvider.cs @@ -10,11 +10,13 @@ using JetBrains.Annotations; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Binders; -namespace OpenIddict.Mvc +namespace OpenIddict.Mvc.Internal { /// - /// Represents an ASP.NET Core MVC model binder provider that is - /// able to provide instances of . + /// Represents an ASP.NET Core MVC model binder provider that is able to provide instances + /// of for the OpenID Connect server primitives. + /// Note: this API supports the OpenIddict infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future minor releases. /// public class OpenIddictMvcBinderProvider : IModelBinderProvider { diff --git a/src/OpenIddict.Mvc/OpenIddictMvcExtensions.cs b/src/OpenIddict.Mvc/OpenIddictMvcExtensions.cs index 6a6ade16..19320f1b 100644 --- a/src/OpenIddict.Mvc/OpenIddictMvcExtensions.cs +++ b/src/OpenIddict.Mvc/OpenIddictMvcExtensions.cs @@ -7,10 +7,13 @@ using System; using JetBrains.Annotations; using Microsoft.AspNetCore.Mvc; -using OpenIddict.Mvc; +using OpenIddict.Mvc.Internal; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Exposes extensions allowing to register the OpenIddict MVC services. + /// public static class OpenIddictMvcExtensions { /// diff --git a/src/OpenIddict.Server/Internal/OpenIddictServerEventService.cs b/src/OpenIddict.Server/Internal/OpenIddictServerEventService.cs index 596c71ac..ce91a4b1 100644 --- a/src/OpenIddict.Server/Internal/OpenIddictServerEventService.cs +++ b/src/OpenIddict.Server/Internal/OpenIddictServerEventService.cs @@ -24,6 +24,11 @@ namespace OpenIddict.Server.Internal { private readonly IServiceProvider _provider; + /// + /// Creates a new instance of the class. + /// Note: this API supports the OpenIddict infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future minor releases. + /// public OpenIddictServerEventService([NotNull] IServiceProvider provider) { _provider = provider; diff --git a/src/OpenIddict.Server/OpenIddictServerExtensions.cs b/src/OpenIddict.Server/OpenIddictServerExtensions.cs index 627c0d52..80e29138 100644 --- a/src/OpenIddict.Server/OpenIddictServerExtensions.cs +++ b/src/OpenIddict.Server/OpenIddictServerExtensions.cs @@ -22,6 +22,9 @@ using OpenIddict.Server.Internal; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Exposes extensions allowing to register the OpenIddict server services. + /// public static class OpenIddictServerExtensions { /// diff --git a/src/OpenIddict.Validation/Internal/OpenIddictValidationEventService.cs b/src/OpenIddict.Validation/Internal/OpenIddictValidationEventService.cs index 30a3b636..ca51267b 100644 --- a/src/OpenIddict.Validation/Internal/OpenIddictValidationEventService.cs +++ b/src/OpenIddict.Validation/Internal/OpenIddictValidationEventService.cs @@ -22,6 +22,11 @@ namespace OpenIddict.Validation.Internal { private readonly IServiceProvider _provider; + /// + /// Creates a new instance of the class. + /// Note: this API supports the OpenIddict infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future minor releases. + /// public OpenIddictValidationEventService([NotNull] IServiceProvider provider) { _provider = provider; diff --git a/src/OpenIddict.Validation/OpenIddictValidationExtensions.cs b/src/OpenIddict.Validation/OpenIddictValidationExtensions.cs index 56f337a3..6b8799e2 100644 --- a/src/OpenIddict.Validation/OpenIddictValidationExtensions.cs +++ b/src/OpenIddict.Validation/OpenIddictValidationExtensions.cs @@ -17,6 +17,9 @@ using OpenIddict.Validation.Internal; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Exposes extensions allowing to register the OpenIddict validation services. + /// public static class OpenIddictValidationExtensions { /// diff --git a/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs b/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs index 7d971548..098eff9e 100644 --- a/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs +++ b/test/OpenIddict.MongoDb.Tests/OpenIddictMongoDbContextTests.cs @@ -72,9 +72,9 @@ namespace OpenIddict.MongoDb.Tests var context = new OpenIddictMongoDbContext(options, provider); // Act and assert - var exception = await Assert.ThrowsAsync(async delegate + var exception = await Assert.ThrowsAsync(delegate { - await Task.WhenAll( + return Task.WhenAll( context.GetDatabaseAsync(CancellationToken.None).AsTask(), context.GetDatabaseAsync(CancellationToken.None).AsTask(), context.GetDatabaseAsync(CancellationToken.None).AsTask(), diff --git a/test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderProviderTests.cs b/test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderProviderTests.cs similarity index 87% rename from test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderProviderTests.cs rename to test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderProviderTests.cs index 4d804bb2..19ae03c6 100644 --- a/test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderProviderTests.cs +++ b/test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderProviderTests.cs @@ -6,20 +6,14 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using AspNet.Security.OpenIdConnect.Primitives; -using AspNet.Security.OpenIdConnect.Server; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Features; -using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding.Binders; using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; -using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Moq; using Xunit; -namespace OpenIddict.Mvc.Tests +namespace OpenIddict.Mvc.Internal.Tests { public class OpenIddictMvcModelBinderProviderTests { diff --git a/test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderTests.cs b/test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderTests.cs similarity index 99% rename from test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderTests.cs rename to test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderTests.cs index 2e2fc29d..09a46539 100644 --- a/test/OpenIddict.Mvc.Tests/OpenIddictMvcModelBinderTests.cs +++ b/test/OpenIddict.Mvc.Tests/Internal/OpenIddictMvcModelBinderTests.cs @@ -18,7 +18,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using Microsoft.Extensions.Options; using Xunit; -namespace OpenIddict.Mvc.Tests +namespace OpenIddict.Mvc.Internal.Tests { public class OpenIddictMvcModelBinderTests { diff --git a/test/OpenIddict.Mvc.Tests/OpenIddictMvcExtensionsTests.cs b/test/OpenIddict.Mvc.Tests/OpenIddictMvcExtensionsTests.cs index 69ba0113..027eeec6 100644 --- a/test/OpenIddict.Mvc.Tests/OpenIddictMvcExtensionsTests.cs +++ b/test/OpenIddict.Mvc.Tests/OpenIddictMvcExtensionsTests.cs @@ -8,6 +8,7 @@ using System; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using OpenIddict.Mvc.Internal; using Xunit; namespace OpenIddict.Mvc.Tests