Class InfoObjectBeforeUpdateEvent<TInfo>
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
An event invoked before an info object of type TInfo
is updated.
public class InfoObjectBeforeUpdateEvent<TInfo> : InfoObjectBeforeUpdateEvent, IInfoObjectEvent, IEventState where TInfo : BaseInfo
Type Parameters
TInfo
Type of info object being updated.
- Inheritance
-
objectInfoObjectBeforeUpdateEvent<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 Update as it allows to provide a dedicated code for synchronous and asynchronous execution paths.
Constructors
InfoObjectBeforeUpdateEvent(TInfo)
Initializes a new instance of the InfoObjectBeforeUpdateEvent<TInfo> class using the infoObject
provided.
public InfoObjectBeforeUpdateEvent(TInfo infoObject)
Parameters
infoObject
TInfoInfo object being updated.
Exceptions
- ArgumentNullException
Thrown when
infoObject
is null.
Properties
InfoObject
Gets the info object being updated.
public TInfo InfoObject { get; }
Property Value
- TInfo
See Also
InfoObjectAfterUpdateEvent<TInfo>