You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marek Fišera edited this page Nov 26, 2015
·
3 revisions
Models.Deleters are 'dispatcher'-like pattern for deleting objects. By passing object key (IKey) you obtain information whether this object can be deleted from storage and what next must be deleted before deleting this object.
Behind dispatcher there is registered handler for deleting object by its type. This handler is responsible to determining whether the object can be deleted and optionally which objects depend on it. Providing this context the handler informs caller what to delete to delete the object.
Typical use-case
User clicks on delete button.
The handler is invoked to determine whether the object can be deleted and provided information about optional references to other objects.
Message box is rendered with the information about references and deletion confirmation.
User confirms that object should be deleted with referenced objects.