Class PublishEventArgs<TEntity>
Represents event data for publish operations.
Inheritance
Namespace: Umbraco.Cms.Core.Events
Assembly: Umbraco.Core.dll
Syntax
public class PublishEventArgs<TEntity> : CancellableEnumerableObjectEventArgs<TEntity>
Type Parameters
| Name | Description |
|---|---|
| TEntity | The type of the entity being published. |
Constructors
View SourcePublishEventArgs(IEnumerable<TEntity>)
Constructor accepting multiple entities that are used in the publish operation
Declaration
public PublishEventArgs(IEnumerable<TEntity> eventObject)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TEntity> | eventObject |
PublishEventArgs(IEnumerable<TEntity>, bool, bool)
Constructor accepting multiple entities that are used in the publish operation
Declaration
public PublishEventArgs(IEnumerable<TEntity> eventObject, bool canCancel, bool isAllPublished)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TEntity> | eventObject | |
| bool | canCancel | |
| bool | isAllPublished |
PublishEventArgs(IEnumerable<TEntity>, bool, EventMessages)
Constructor accepting multiple entities that are used in the publish operation
Declaration
public PublishEventArgs(IEnumerable<TEntity> eventObject, bool canCancel, EventMessages eventMessages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TEntity> | eventObject | |
| bool | canCancel | |
| EventMessages | eventMessages |
PublishEventArgs(IEnumerable<TEntity>, EventMessages)
Constructor accepting multiple entities that are used in the publish operation
Declaration
public PublishEventArgs(IEnumerable<TEntity> eventObject, EventMessages eventMessages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TEntity> | eventObject | |
| EventMessages | eventMessages |
PublishEventArgs(TEntity)
Constructor accepting a single entity instance
Declaration
public PublishEventArgs(TEntity eventObject)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntity | eventObject |
PublishEventArgs(TEntity, bool, bool)
Constructor accepting a single entity instance
Declaration
public PublishEventArgs(TEntity eventObject, bool canCancel, bool isAllPublished)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntity | eventObject | |
| bool | canCancel | |
| bool | isAllPublished |
PublishEventArgs(TEntity, bool, EventMessages)
Constructor accepting a single entity instance
Declaration
public PublishEventArgs(TEntity eventObject, bool canCancel, EventMessages eventMessages)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntity | eventObject | |
| bool | canCancel | |
| EventMessages | eventMessages |
PublishEventArgs(TEntity, EventMessages)
Constructor accepting a single entity instance
Declaration
public PublishEventArgs(TEntity eventObject, EventMessages eventMessages)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntity | eventObject | |
| EventMessages | eventMessages |
Properties
View SourcePublishedEntities
Returns all entities that were published during the operation
Declaration
public IEnumerable<TEntity>? PublishedEntities { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TEntity> |
Methods
View SourceEquals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Equals(PublishEventArgs<TEntity>?)
Declaration
public bool Equals(PublishEventArgs<TEntity>? other)
Parameters
| Type | Name | Description |
|---|---|---|
| PublishEventArgs<TEntity> | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Operators
View Sourceoperator ==(PublishEventArgs<TEntity>, PublishEventArgs<TEntity>)
Determines whether two PublishEventArgs<TEntity> instances are equal.
Declaration
public static bool operator ==(PublishEventArgs<TEntity> left, PublishEventArgs<TEntity> right)
Parameters
| Type | Name | Description |
|---|---|---|
| PublishEventArgs<TEntity> | left | The first instance to compare. |
| PublishEventArgs<TEntity> | right | The second instance to compare. |
Returns
| Type | Description |
|---|---|
| bool |
|
operator !=(PublishEventArgs<TEntity>, PublishEventArgs<TEntity>)
Determines whether two PublishEventArgs<TEntity> instances are not equal.
Declaration
public static bool operator !=(PublishEventArgs<TEntity> left, PublishEventArgs<TEntity> right)
Parameters
| Type | Name | Description |
|---|---|---|
| PublishEventArgs<TEntity> | left | The first instance to compare. |
| PublishEventArgs<TEntity> | right | The second instance to compare. |
Returns
| Type | Description |
|---|---|
| bool |
|