CloudEventsServiceInvokeOnAccountDeleted Method

(Soft-)deletes the updated account to disc, and then invokes the Event Grid Topic that the Action Handler can start its process.

Definition

Namespace: MobileTrack.Web.Components.Services
Assembly: MobileTrack.Web.Components (in MobileTrack.Web.Components.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
public Task<Guid> InvokeOnAccountDeleted(
	AccountDto deletedAccount,
	UserSessionData deletedBy
)

Parameters

deletedAccount  AccountDto
Deleted account
deletedBy  UserSessionData
User deleting this account.

Return Value

TaskGuid
The identifier for the event grid action that the user in the front-end can follow up on.

Remarks

This event is only invoked when an account is soft-deleted (if ItemsCanBeImmediatelyDeleted is ), or permanently deleted if ItemsCanBeImmediatelyDeleted is .

There is no cancellation token because the deletion task should not be interrupted if the player leaves the page!

Exceptions

NullReferenceExceptionThrown if deletedAccount or deletedBy are not filled in.
ArgumentExceptionThrown if the deletedBy is the same user as the account to be deleted, or if deletedAccount is the main manager of deletedBy's CompanyDto.

See Also