51 changed files with 251 additions and 137 deletions
@ -1,22 +0,0 @@ |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace OpenIddict.Server |
|||
{ |
|||
/// <summary>
|
|||
/// Dispatches events by invoking the corresponding handlers.
|
|||
/// </summary>
|
|||
public interface IOpenIddictServerEventService |
|||
{ |
|||
/// <summary>
|
|||
/// Publishes a new event.
|
|||
/// </summary>
|
|||
/// <typeparam name="TEvent">The type of the event to publish.</typeparam>
|
|||
/// <param name="notification">The event to publish.</param>
|
|||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
|
|||
/// <returns>A <see cref="Task"/> that can be used to monitor the asynchronous operation.</returns>
|
|||
Task PublishAsync<TEvent>([NotNull] TEvent notification, CancellationToken cancellationToken = default) |
|||
where TEvent : class, IOpenIddictServerEvent; |
|||
} |
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace OpenIddict.Validation |
|||
{ |
|||
/// <summary>
|
|||
/// Dispatches events by invoking the corresponding handlers.
|
|||
/// </summary>
|
|||
public interface IOpenIddictValidationEventService |
|||
{ |
|||
/// <summary>
|
|||
/// Publishes a new event.
|
|||
/// </summary>
|
|||
/// <typeparam name="TEvent">The type of the event to publish.</typeparam>
|
|||
/// <param name="notification">The event to publish.</param>
|
|||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
|
|||
/// <returns>A <see cref="Task"/> that can be used to monitor the asynchronous operation.</returns>
|
|||
Task PublishAsync<TEvent>([NotNull] TEvent notification, CancellationToken cancellationToken = default) |
|||
where TEvent : class, IOpenIddictValidationEvent; |
|||
} |
|||
} |
|||
@ -1,15 +1,23 @@ |
|||
using System; |
|||
/* |
|||
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
|||
* See https://github.com/openiddict/openiddict-core for more information concerning
|
|||
* the license and the contributors participating to this project. |
|||
*/ |
|||
|
|||
using System; |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using JetBrains.Annotations; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
|
|||
namespace OpenIddict.Validation |
|||
namespace OpenIddict.Validation.Internal |
|||
{ |
|||
/// <summary>
|
|||
/// Dispatches notifications by invoking the corresponding handlers.
|
|||
/// Dispatches events by invoking the corresponding notification handlers.
|
|||
/// 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.
|
|||
/// </summary>
|
|||
public class OpenIddictValidationEventService : IOpenIddictValidationEventService |
|||
public class OpenIddictValidationEventService |
|||
{ |
|||
private readonly IServiceProvider _provider; |
|||
|
|||
Loading…
Reference in new issue