Show / Hide Table of Contents

    Class Scheduler

    Class that represents a scheduler for events.

    Inheritance
    System.Object
    Scheduler
    Implements
    IScheduler
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Scheduling
    Assembly: Fibula.Scheduling.dll
    Syntax
    public class Scheduler : IScheduler

    Constructors

    | Improve this Doc View Source

    Scheduler(ILogger)

    Initializes a new instance of the Scheduler class.

    Declaration
    public Scheduler(ILogger logger)
    Parameters
    Type Name Description
    Serilog.ILogger logger

    The logger to use.

    Properties

    | Improve this Doc View Source

    CurrentTime

    Gets the current time.

    Declaration
    public DateTimeOffset CurrentTime { get; }
    Property Value
    Type Description
    System.DateTimeOffset
    | Improve this Doc View Source

    Logger

    Gets a reference to the logger instance.

    Declaration
    public ILogger Logger { get; }
    Property Value
    Type Description
    Serilog.ILogger
    | Improve this Doc View Source

    QueueSize

    Gets the queue size of the scheduler.

    Declaration
    public int QueueSize { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    CancelAllFor(UInt32, Type)

    Cancels all the events attributed to a requestor.

    Declaration
    public void CancelAllFor(uint requestorId, Type specificType = null)
    Parameters
    Type Name Description
    System.UInt32 requestorId

    The id of the requestor.

    System.Type specificType

    Optional. The type of event to remove. By default, it will remove all.

    | Improve this Doc View Source

    CancelEvent(IEvent)

    Cancels an event.

    Declaration
    public bool CancelEvent(IEvent evt)
    Parameters
    Type Name Description
    IEvent evt

    The event to cancel.

    Returns
    Type Description
    System.Boolean

    True if the event is cancelled, false otherwise.

    | Improve this Doc View Source

    RunAsync(CancellationToken)

    Begins the scheduler's processing the queue and firing events.

    Declaration
    public Task RunAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken

    A token to observe for cancellation.

    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task representing the asynchronous processing operation.

    | Improve this Doc View Source

    ScheduleEvent(IEvent, Nullable<TimeSpan>)

    Schedules an event to be fired after the specified delay time.

    Declaration
    public void ScheduleEvent(IEvent eventToSchedule, TimeSpan? delayTime = default(TimeSpan? ))
    Parameters
    Type Name Description
    IEvent eventToSchedule

    The event to schedule.

    System.Nullable<System.TimeSpan> delayTime

    Optional. The time delay after which the event should be fired. If left null, the event is scheduled to be fired ASAP.

    Events

    | Improve this Doc View Source

    EventFired

    When an event gets fired by the this scheduler.

    Declaration
    public event EventFiredDelegate EventFired
    Event Type
    Type Description
    EventFiredDelegate

    Implements

    IScheduler

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.