AccountEventPublisher class
namespace: Serenity.Extensions assembly: Serenity.Extensions
The default IAccountEventPublisher, which fills the user of an event from its ID, who did it from the current user, and the time, IP address and user agent of the request, and tells the handlers one after another, in the request, so they can use its services, e.g. to render an email. An exception of a handler is logged.
public class AccountEventPublisher : IAccountEventPublisher
| parameter |
description |
| handlers |
The handlers of the events. |
| userRetriever |
Gives the users from their IDs. |
| userAccessor |
Gives the current user, who did it. |
| httpContextAccessor |
Gives the request, for its IP address and user agent. |
| logger |
Logs the exceptions of the handlers. |
| timeProvider |
Gives the time. |
Public Members
| name |
description |
| AccountEventPublisher(…) |
The default IAccountEventPublisher, which fills the user of an event from its ID, who did it from the current user, and the time, IP address and user agent of the request, and tells the handlers one after another, in the request, so they can use its services, e.g. to render an email. An exception of a handler is logged. |
| Publish(…) |
|
Protected Members
| name |
description |
| virtual Dispatch(…) |
Tells the handlers of the event, logging the exceptions they throw. |
| virtual PrepareRequest(…) |
Fills what the request tells: who did it, from the claims of the current user, when, and from where. It doesn't read the database, as it is called in the transaction of the change. |
| virtual PrepareUsers(…) |
Fills the user of the event from its ID, and the display name of who did it, which are read from the user retrieve service, after the transaction of the change is committed. |
See Also