Table of Contents

Class InfoObjectBeforeInsertEvent<TInfo>

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

An event invoked before a new info object of type TInfo is inserted.

public class InfoObjectBeforeInsertEvent<TInfo> : InfoObjectBeforeInsertEvent, IInfoObjectEvent, IEventState where TInfo : BaseInfo

Type Parameters

TInfo

Type of info object being inserted.

Inheritance
object
InfoObjectBeforeInsertEvent<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

InfoObjectBeforeInsertEvent(TInfo)

Initializes a new instance of the InfoObjectBeforeInsertEvent<TInfo> class using the infoObject provided.

public InfoObjectBeforeInsertEvent(TInfo infoObject)

Parameters

infoObject TInfo

Info object being inserted.

Exceptions

ArgumentNullException

Thrown when infoObject is null.

Properties

InfoObject

Gets the info object being inserted.

public TInfo InfoObject { get; }

Property Value

TInfo

See Also