Unosquare
    Show / Hide Table of Contents

    Class RunnerBase

    Represents an background worker abstraction with a life cycle and running at a independent thread.

    Inheritance
    Object
    RunnerBase
    Implements
    IDisposable
    Namespace: Swan.Threading
    Syntax
    public abstract class RunnerBase : ConfiguredObject, IDisposable

    Constructors

    RunnerBase(Boolean)

    Initializes a new instance of the RunnerBase class.

    Declaration
    protected RunnerBase(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    if set to true [is enabled].

    Properties

    ErrorMessages

    Gets the error messages.

    Declaration
    public List<string> ErrorMessages { get; }
    Property Value
    Type Description
    List<String>

    The error messages.

    IsEnabled

    Gets a value indicating whether this instance is enabled.

    Declaration
    public bool IsEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if this instance is enabled; otherwise, false.

    IsRunning

    Gets a value indicating whether this instance is running.

    Declaration
    public bool IsRunning { get; }
    Property Value
    Type Description
    Boolean

    true if this instance is running; otherwise, false.

    Name

    Gets the name.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String

    The name.

    Methods

    Cleanup()

    Cleanups this instance.

    Declaration
    protected virtual void Cleanup()

    Dispose()

    Declaration
    public void Dispose()

    DoBackgroundWork(CancellationToken)

    Does the background work.

    Declaration
    protected abstract void DoBackgroundWork(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The ct.

    OnSetup()

    Called when [setup].

    Declaration
    protected virtual void OnSetup()

    Setup()

    Setups this instance.

    Declaration
    protected void Setup()

    Start()

    Starts this instance.

    Declaration
    public virtual void Start()

    Stop()

    Stops this instance.

    Declaration
    public virtual void Stop()

    Implements

    IDisposable

    Comments

    Back to top Copyright © 2017-2019 Unosquare