Class DeleteEventArgs
Represents event data for delete operations with an identifier.
Namespace: Umbraco.Cms.Core.Events
Assembly: Umbraco.Core.dll
Syntax
public class DeleteEventArgs : CancellableEventArgs
Constructors
View SourceDeleteEventArgs(int)
Initializes a new instance of the DeleteEventArgs class with cancellation enabled.
Declaration
public DeleteEventArgs(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The identifier of the object being deleted. |
DeleteEventArgs(int, bool)
Initializes a new instance of the DeleteEventArgs class.
Declaration
public DeleteEventArgs(int id, bool canCancel)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The identifier of the object being deleted. |
| bool | canCancel | A value indicating whether the event can be cancelled. |
DeleteEventArgs(int, bool, EventMessages)
Initializes a new instance of the DeleteEventArgs class.
Declaration
public DeleteEventArgs(int id, bool canCancel, EventMessages eventMessages)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The identifier of the object being deleted. |
| bool | canCancel | A value indicating whether the event can be cancelled. |
| EventMessages | eventMessages | The event messages. |
Properties
View SourceId
Gets the Id of the object being deleted.
Declaration
public int Id { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
View SourceEquals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Equals(DeleteEventArgs?)
Declaration
public bool Equals(DeleteEventArgs? other)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteEventArgs | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Operators
View Sourceoperator ==(DeleteEventArgs, DeleteEventArgs)
Determines whether two DeleteEventArgs instances are equal.
Declaration
public static bool operator ==(DeleteEventArgs left, DeleteEventArgs right)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteEventArgs | left | The first instance to compare. |
| DeleteEventArgs | right | The second instance to compare. |
Returns
| Type | Description |
|---|---|
| bool |
|
operator !=(DeleteEventArgs, DeleteEventArgs)
Determines whether two DeleteEventArgs instances are not equal.
Declaration
public static bool operator !=(DeleteEventArgs left, DeleteEventArgs right)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteEventArgs | left | The first instance to compare. |
| DeleteEventArgs | right | The second instance to compare. |
Returns
| Type | Description |
|---|---|
| bool |
|