UndeleteRequestHandlerBase<TRow,TUndeleteRequest,TUndeleteResponse> class
namespace: Serenity.Services assembly: Serenity.Net.Services
Abstract base class for undelete request handlers that share state and mode neutral helper methods between synchronous and asynchronous undelete request handlers.
public abstract class UndeleteRequestHandlerBase<TRow, TUndeleteRequest, TUndeleteResponse> :
IUndeleteRequestHandler
where TRow : class, IRow, IIdRow, new()
where TUndeleteRequest : UndeleteRequest
where TUndeleteResponse : UndeleteResponse, new()
| parameter |
description |
| TRow |
Entity type |
| TUndeleteRequest |
Undelete request type |
| TUndeleteResponse |
Undelete response type |
| context |
Request context |
Public Members
| name |
description |
| Cache { get; } |
Gets the two level cache from the request context. |
| Connection { get; } |
Gets the current connection. |
| Context { get; } |
Gets the request context. |
| Localizer { get; } |
Gets the localizer from the request context. |
| Permissions { get; } |
Gets the permission service from the request context. |
| Request { get; protected set; } |
Gets the request object. |
| Response { get; protected set; } |
Gets the response object. |
| Row { get; protected set; } |
Gets the entity being undeleted. |
| StateBag { get; } |
A state bag for behaviors to preserve state among their methods. It will be cleared before each request, e.g. Process call. |
| UnitOfWork { get; protected set; } |
Gets the current unit of work. |
| User { get; } |
Gets the current user from the request context. |
Protected Members
| name |
description |
| UndeleteRequestHandlerBase(…) |
Abstract base class for undelete request handlers that share state and mode neutral helper methods between synchronous and asynchronous undelete request handlers. |
| virtual GetBehaviors() |
Gets the list of undelete behaviors. |
| virtual GetDisplayOrderFilter() |
Gets the display order filter for current group, if the entity implements IDisplayOrderRow interface |
| virtual GetRequestEntityId() |
Gets the id of the entity targeted by the current request, converted to the value type of the row's id field. Used both for loading the entity and for building the error returned when it cannot be loaded, so that a caller cannot distinguish a missing record from one they are not allowed to touch. |
| virtual InvalidateCacheOnCommit() |
Attaches a cache invalidation call to to OnCommit callback of the current unit of work. This would clear cached items related to this row type. |
| virtual IsDeleted() |
Checks that row type implements one of IIsActiveDeletedRow, IIsDeletedRow or IDeleteLogRow interfaces and it is actual marked as deleted |
| virtual ValidatePermissions() |
Validates the user permissions for undelete operation |
Exceptions
| exception |
condition |
| ArgumentNullException |
context is null. |
Initializes a new instance of the class.
See Also