Class InfoObjectBeforeInsertEvent
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
An event invoked before a new info object is inserted.
public class InfoObjectBeforeInsertEvent : InfoObjectEvent, IInfoObjectEvent, IEventState
- Inheritance
-
objectInfoObjectBeforeInsertEvent
- Implements
- Derived
-
InfoObjectBeforeInsertEvent<TInfo>
- Inherited Members
- Extension Methods
Remarks
To get notified about a specific type of info object being inserted, use InfoObjectBeforeInsertEvent<TInfo> instead.
Implement a corresponding event handler by inheriting IInfoObjectEventHandler<TInfoObjectEvent> and register it using AddInfoObjectEventHandler<TInfoObjectEvent, THandler>(IServiceCollection).
Using this approach is recommended over Insert as it allows to provide a dedicated code for synchronous and asynchronous execution paths.
Constructors
InfoObjectBeforeInsertEvent(BaseInfo)
Initializes a new instance of the InfoObjectBeforeInsertEvent using the infoObject
provided.
public InfoObjectBeforeInsertEvent(BaseInfo infoObject)
Parameters
infoObject
BaseInfoInfo object being inserted.
Exceptions
- ArgumentNullException
Thrown when
infoObject
is null.
Properties
InfoObject
Gets the info object being inserted.
public BaseInfo InfoObject { get; }