Interface IEventService
- Namespace
- Fdyay.IdentityServer.Events
- Assembly
- Fdyay.IdentityServer.Core.dll
Raises events, subject to what the host has switched on.
public interface IEventService
Methods
CanRaiseEventType(EventTypes)
Whether an event of this type would be raised.
bool CanRaiseEventType(EventTypes eventType)
Parameters
eventTypeEventTypes
Returns
Remarks
For the call sites where building the event costs something — a lookup, a formatted message — so that cost is not paid to construct an object RaiseAsync(Event, CancellationToken) will drop. Asking is optional: raising an event that is switched off is always safe.
RaiseAsync(Event, CancellationToken)
Raises an event, or does nothing if its type is switched off.
Task RaiseAsync(Event evt, CancellationToken cancellationToken = default)
Parameters
evtEventcancellationTokenCancellationToken