C# Class DotNetWorkQueue.ASendJobToQueue

Base class for sending jobs to transports
Inheritance: ISendJobToQueue
Afficher le fichier Open project: blehnen/DotNetWorkQueue

Protected Properties

Свойство Type Description
GetTimeFactory IGetTimeFactory
Queue IProducerMethodQueue

Méthodes publiques

Méthode Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

SendAsync ( IScheduledJob job, DateTimeOffset scheduledTime, Expression actionToRun ) : Task

Sends the specified action to the specified queue.

SendAsync ( IScheduledJob job, DateTimeOffset scheduledTime, LinqExpressionToRun expressionToRun ) : Task

Sends the specified action to the specified queue.

Méthodes protégées

Méthode Description
ASendJobToQueue ( IProducerMethodQueue queue, IGetTimeFactory getTimeFactory ) : System

Initializes a new instance of the ASendJobToQueue class.

DeleteJob ( string name ) : void

Deletes the job based on the job name.

Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

DoesJobExist ( string name, DateTimeOffset scheduledTime ) : QueueStatuses

Returns the status of the job based on name and scheduled time.

JobAlreadyExistsError ( Exception error ) : bool

Return true if the exception indicates that the job already exists.

Used to determine if we should return specific error messages

SetMetaDataForJob ( string jobName, DateTimeOffset scheduledTime, DateTimeOffset eventTime, string route, IAdditionalMessageData messageData ) : void

Sets the specified meta data on the messageData context

Private Methods

Méthode Description
ProcessResult ( IScheduledJob job, DateTimeOffset scheduledTime, IQueueOutputMessage result ) : IJobQueueOutputMessage
SendPreChecks ( string jobName, DateTimeOffset scheduledTime ) : IJobQueueOutputMessage

Method Details

ASendJobToQueue() protected méthode

Initializes a new instance of the ASendJobToQueue class.
protected ASendJobToQueue ( IProducerMethodQueue queue, IGetTimeFactory getTimeFactory ) : System
queue IProducerMethodQueue The queue.
getTimeFactory IGetTimeFactory The get time factory.
Résultat System

DeleteJob() protected abstract méthode

Deletes the job based on the job name.
protected abstract DeleteJob ( string name ) : void
name string The name.
Résultat void

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Résultat void

DoesJobExist() protected abstract méthode

Returns the status of the job based on name and scheduled time.
protected abstract DoesJobExist ( string name, DateTimeOffset scheduledTime ) : QueueStatuses
name string The name.
scheduledTime DateTimeOffset The scheduled time.
Résultat QueueStatuses

JobAlreadyExistsError() protected abstract méthode

Return true if the exception indicates that the job already exists.
Used to determine if we should return specific error messages
protected abstract JobAlreadyExistsError ( Exception error ) : bool
error System.Exception The error.
Résultat bool

SendAsync() public méthode

Sends the specified action to the specified queue.
public SendAsync ( IScheduledJob job, DateTimeOffset scheduledTime, Expression actionToRun ) : Task
job IScheduledJob The job.
scheduledTime DateTimeOffset The scheduled time.
actionToRun Expression The action to run.
Résultat Task

SendAsync() public méthode

Sends the specified action to the specified queue.
public SendAsync ( IScheduledJob job, DateTimeOffset scheduledTime, LinqExpressionToRun expressionToRun ) : Task
job IScheduledJob The job.
scheduledTime DateTimeOffset The scheduled time.
expressionToRun DotNetWorkQueue.Messages.LinqExpressionToRun The expression to run.
Résultat Task

SetMetaDataForJob() protected abstract méthode

Sets the specified meta data on the messageData context
protected abstract SetMetaDataForJob ( string jobName, DateTimeOffset scheduledTime, DateTimeOffset eventTime, string route, IAdditionalMessageData messageData ) : void
jobName string Name of the job.
scheduledTime DateTimeOffset The scheduled time.
eventTime DateTimeOffset The event time.
route string The route. May be null.
messageData IAdditionalMessageData The message data.
Résultat void

Property Details

GetTimeFactory protected_oe property

Time factory for obtaining current date/time
protected IGetTimeFactory GetTimeFactory
Résultat IGetTimeFactory

Queue protected_oe property

The queue to send jobs to.
protected IProducerMethodQueue Queue
Résultat IProducerMethodQueue