Class InfoObjectAfterInsertEvent<TInfo>
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
An event invoked after a new info object of type TInfo
is inserted.
public class InfoObjectAfterInsertEvent<TInfo> : InfoObjectAfterInsertEvent, IInfoObjectEvent, IEventState where TInfo : BaseInfo
Type Parameters
TInfo
Type of info object that was inserted.
- Inheritance
-
objectInfoObjectAfterInsertEvent<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 Insert as it allows to provide a dedicated code for synchronous and asynchronous execution paths.
Constructors
InfoObjectAfterInsertEvent(TInfo, EventStateStore)
Initializes a new instance of the InfoObjectAfterInsertEvent<TInfo> class using the infoObject
provided.
public InfoObjectAfterInsertEvent(TInfo infoObject, EventStateStore state)
Parameters
infoObject
TInfoInfo object that was inserted.
state
EventStateStoreState data to initialize the event with.
Exceptions
- ArgumentNullException
Thrown when
infoObject
is null.
Properties
InfoObject
Gets the info object being inserted.
public TInfo InfoObject { get; }
Property Value
- TInfo
See Also
InfoObjectBeforeInsertEvent<TInfo>