Search Results for

    Show / Hide Table of Contents

    Class TaskService

    Inheritance
    object
    TaskService
    Implements
    ITaskService
    IDisposable
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Connections.Database.Tasks
    Assembly: LemonEdge.Database.Connector.dll
    Syntax
    [Obsolete("Task service is now executed via hosted services found in LemonEdge.Tasks")]
    public class TaskService : ITaskService, IDisposable

    Constructors

    TaskService(ILogger, IDatabaseInfoManager, IServiceContext, IEntityContextFactory, IEntityDescriptorFactory, IDomainContextEventHandler, IStorageServiceFactory, IOptions<CacheSettings>, IOptions<MessageSettings>, IOptions<TaskServiceSettings>, CancellationToken)

    Declaration
    public TaskService(ILogger log, IDatabaseInfoManager databaseInfoManager, IServiceContext services, IEntityContextFactory entityContextFactory, IEntityDescriptorFactory entityDescriptorFactory, IDomainContextEventHandler eventHandler, IStorageServiceFactory storageServiceFactory, IOptions<CacheSettings> cacheSettings, IOptions<MessageSettings> messageSettings, IOptions<TaskServiceSettings> taskServiceSettings, CancellationToken cancel = default)
    Parameters
    Type Name Description
    ILogger log
    IDatabaseInfoManager databaseInfoManager
    IServiceContext services
    IEntityContextFactory entityContextFactory
    IEntityDescriptorFactory entityDescriptorFactory
    IDomainContextEventHandler eventHandler
    IStorageServiceFactory storageServiceFactory
    IOptions<CacheSettings> cacheSettings
    IOptions<MessageSettings> messageSettings
    IOptions<TaskServiceSettings> taskServiceSettings
    CancellationToken cancel

    Properties

    IsRunning

    Returns true if the task service is currently running

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

    Methods

    Dispose()

    Declaration
    public void Dispose()

    Dispose(bool)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    HasStopped()

    Declaration
    public Task<bool> HasStopped()
    Returns
    Type Description
    Task<bool>

    Pause()

    Declaration
    public void Pause()

    ProcessTask(bool, IDatabaseInfo, long?, Guid?, object)

    Declaration
    public Task<bool> ProcessTask(bool waitForTask, IDatabaseInfo dbInfo, long? accountId, Guid? taskId, object queueRemovalHandler)
    Parameters
    Type Name Description
    bool waitForTask
    IDatabaseInfo dbInfo
    long? accountId
    Guid? taskId
    object queueRemovalHandler
    Returns
    Type Description
    Task<bool>

    ProcessTaskFromQueue(string)

    Declaration
    public Task ProcessTaskFromQueue(string queueMessage)
    Parameters
    Type Name Description
    string queueMessage
    Returns
    Type Description
    Task

    SetCancellationToken(CancellationToken)

    Declaration
    public void SetCancellationToken(CancellationToken cancel)
    Parameters
    Type Name Description
    CancellationToken cancel

    SetFileOutput(string)

    Sets a path to a file to log the processing of all tasks by the sevice to

    Declaration
    public void SetFileOutput(string filePath)
    Parameters
    Type Name Description
    string filePath

    A path to file to log all task activity to

    Shutdown()

    Declaration
    public Task Shutdown()
    Returns
    Type Description
    Task

    StartAsync()

    Declaration
    public Task StartAsync()
    Returns
    Type Description
    Task

    StartOnNewThread()

    Starts the service processing any IServerTask on the queue

    Declaration
    public void StartOnNewThread()

    Stop()

    Declaration
    public void Stop()

    Implements

    ITaskService
    IDisposable

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.