Class InfoObjectBeforeDeleteEvent<TInfo>
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
An event invoked before an info object of type TInfo
is deleted.
public class InfoObjectBeforeDeleteEvent<TInfo> : InfoObjectBeforeDeleteEvent, IInfoObjectEvent, IEventState where TInfo : BaseInfo
Type Parameters
TInfo
Type of info object being deleted.
- Inheritance
-
objectInfoObjectBeforeDeleteEvent<TInfo>
- Implements
- Inherited Members
- Extension Methods
Remarks
Implement a corresponding event handler by inheriting IInfoObjectEventHandler<TInfoObjectEvent> and register it using AddInfoObjectEventHandler<TInfoObjectEvent, THandler>(IServiceCollection).
Using this approach is recommended over Delete as it allows to provide a dedicated code for synchronous and asynchronous execution paths.
Constructors
InfoObjectBeforeDeleteEvent(TInfo)
Initializes a new instance of the InfoObjectBeforeDeleteEvent<TInfo> class using the infoObject
provided.
public InfoObjectBeforeDeleteEvent(TInfo infoObject)
Parameters
infoObject
TInfoInfo object being deleted.
Exceptions
- ArgumentNullException
Thrown when
infoObject
is null.
Properties
InfoObject
Gets the info object being deleted.
public TInfo InfoObject { get; }
Property Value
- TInfo
See Also
InfoObjectAfterDeleteEvent<TInfo>