SyncToAsyncUndeleteBehaviorWrapper class
namespace: Serenity.Services assembly: Serenity.Net.Services
Wraps an IUndeleteBehaviorSync implementation and exposes it as an IUndeleteBehaviorAsync. This allows asynchronous undelete request handlers to run synchronous undelete behaviors.
public class SyncToAsyncUndeleteBehaviorWrapper : IUndeleteBehaviorAsync, IWrappedBehavior
Public Members
| name | description |
|---|---|
| SyncToAsyncUndeleteBehaviorWrapper(…) | Wraps an IUndeleteBehaviorSync implementation and exposes it as an IUndeleteBehaviorAsync. This allows asynchronous undelete request handlers to run synchronous undelete behaviors. |
| WrappedBehavior { get; } | |
| OnAfterUndeleteAsync(…) | |
| OnAuditAsync(…) | |
| OnBeforeUndeleteAsync(…) | |
| OnPrepareQueryAsync(…) | |
| OnReturnAsync(…) | |
| OnValidateRequestAsync(…) |
Remarks
A behavior instance is always cached and reused across requests, so make sure you don't store anything in private variables, and its operation is thread-safe. If you need to pass some state between events, use handler's StateBag.
See Also
- interface IUndeleteBehaviorAsync
- interface IWrappedBehavior
- Source: SyncToAsyncUndeleteBehaviorWrapper.cs