Class BaseEvent
Abstract class that represents the base event for scheduling.
Inheritance
Inherited Members
Namespace: Fibula.Scheduling
Assembly: Fibula.Scheduling.dll
Syntax
public abstract class BaseEvent : StablePriorityQueueNode, IEvent, IEquatable<BaseEvent>
Constructors
| Improve this Doc View SourceBaseEvent(UInt32)
Initializes a new instance of the BaseEvent class.
Declaration
public BaseEvent(uint requestorId = 0U)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | requestorId | Optional. The id of the creature or entity requesting the event. Default is 0. |
Properties
| Improve this Doc View SourceCanBeCancelled
Gets or sets a value indicating whether the event can be cancelled.
Declaration
public abstract bool CanBeCancelled { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EventId
Gets a unique identifier for this event.
Declaration
public string EventId { get; }
Property Value
Type | Description |
---|---|
System.String |
ExcludeFromTelemetry
Gets or sets a value indicating whether to exclude this event from telemetry logging.
Declaration
public bool ExcludeFromTelemetry { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasCancellationHandler
Gets a value indicating whether this event has a handler hooked up for it's Cancelled event.
Declaration
public bool HasCancellationHandler { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasExpeditionHandler
Gets a value indicating whether this event has a handler hooked up for it's Expedited event.
Declaration
public bool HasExpeditionHandler { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RepeatAfter
Gets or sets the time after which this event should be repeated. The event is not repeated if the value is not positive.
Declaration
public TimeSpan RepeatAfter { get; protected set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
RequestorId
Gets the id of the requestor of this event, if available.
Declaration
public uint RequestorId { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
State
Gets or sets the event's state.
Declaration
public EventState State { get; set; }
Property Value
Type | Description |
---|---|
EventState |
Methods
| Improve this Doc View SourceCancel()
Attempts to cancel this event.
Declaration
public bool Cancel()
Returns
Type | Description |
---|---|
System.Boolean | True if the event is successfully cancelled, false otherwise. |
Complete(Boolean)
Marks this event as completed, notifying subscribers of it's Completed event.
Declaration
public void Complete(bool asCancelled = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | asCancelled | Optional. A value indicating whether the event was cancelled. |
Equals(BaseEvent)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(BaseEvent other)
Parameters
Type | Name | Description |
---|---|---|
BaseEvent | other | The other object to compare against. |
Returns
Type | Description |
---|---|
System.Boolean | True if the current object is equal to the other parameter, false otherwise. |
Execute(IEventContext)
Executes the event logic.
Declaration
public abstract void Execute(IEventContext context)
Parameters
Type | Name | Description |
---|---|---|
IEventContext | context | The execution context. |
Expedite()
Attempts to expedite this event, in other words, requesting it to be fired immediately.
Declaration
public bool Expedite()
Returns
Type | Description |
---|---|
System.Boolean | True if the event is successfully expedited, false otherwise. |
Events
| Improve this Doc View SourceCancelled
Fired when this event is cancelled.
Declaration
public event EventCancelledDelegate Cancelled
Event Type
Type | Description |
---|---|
EventCancelledDelegate |
Completed
Fired when this even is processed to completion (after no more repeats).
Declaration
public event EventCompletedDelegate Completed
Event Type
Type | Description |
---|---|
EventCompletedDelegate |
Expedited
Fired when this event is expedited.
Declaration
public event EventExpeditedDelegate Expedited
Event Type
Type | Description |
---|---|
EventExpeditedDelegate |