View Source
Class CancellableEventArgs
Represents event data for events that support cancellation.
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public class CancellableEventArgs : EventArgs
Constructors
View Source
CancellableEventArgs()
Declaration
public CancellableEventArgs()
View Source
CancellableEventArgs(Boolean)
Declaration
public CancellableEventArgs(bool canCancel)
Parameters
Type |
Name |
Description |
System.Boolean |
canCancel |
|
View Source
CancellableEventArgs(Boolean, EventMessages)
Declaration
public CancellableEventArgs(bool canCancel, EventMessages eventMessages)
Parameters
Type |
Name |
Description |
System.Boolean |
canCancel |
|
EventMessages |
eventMessages |
|
View Source
CancellableEventArgs(Boolean, EventMessages, IDictionary<String, Object>)
Declaration
public CancellableEventArgs(bool canCancel, EventMessages messages, IDictionary<string, object> additionalData)
Parameters
Type |
Name |
Description |
System.Boolean |
canCancel |
|
EventMessages |
messages |
|
IDictionary<System.String, System.Object> |
additionalData |
|
View Source
CancellableEventArgs(EventMessages)
Declaration
public CancellableEventArgs(EventMessages eventMessages)
Parameters
Properties
View Source
AdditionalData
In some cases raised evens might need to contain additional arbitrary readonly data which can be read by event
subscribers
Declaration
public ReadOnlyDictionary<string, object> AdditionalData { get; set; }
Property Value
Type |
Description |
System.Collections.ObjectModel.ReadOnlyDictionary<System.String, System.Object> |
|
View Source
CanCancel
Flag to determine if this instance will support being cancellable
Declaration
public bool CanCancel { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
View Source
Cancel
If this instance supports cancellation, this gets/sets the cancel value
Declaration
public bool Cancel { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
View Source
EventState
This can be used by event subscribers to store state in the event args so they easily deal with custom state data
between a starting ("ing")
event and an ending ("ed") event
Declaration
public IDictionary<string, object> EventState { get; set; }
Property Value
Type |
Description |
IDictionary<System.String, System.Object> |
|
View Source
Messages
Returns the EventMessages object which is used to add messages to the message collection for this event
Declaration
public EventMessages Messages { get; }
Property Value
Methods
View Source
CancelOperation(EventMessage)
if this instance supports cancellation, this will set Cancel to true with an affiliated cancellation message
Declaration
public void CancelOperation(EventMessage cancelationMessage)
Parameters
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Equals(CancellableEventArgs)
Declaration
public bool Equals(CancellableEventArgs other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Operators
View Source
Equality(CancellableEventArgs, CancellableEventArgs)
Declaration
public static bool operator ==(CancellableEventArgs left, CancellableEventArgs right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
Inequality(CancellableEventArgs, CancellableEventArgs)
Declaration
public static bool operator !=(CancellableEventArgs left, CancellableEventArgs right)
Parameters
Returns
Type |
Description |
System.Boolean |
|