Skip to content

UndeleteRequestHandlerBase<TRow,TUndeleteRequest,TUndeleteResponse> class

namespace: Serenity.Services   assemblySerenity.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

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(…) Initializes a new instance of the class.
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 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

See Also