Skip to main content

Definition

Assembly: CloudNimble.SimpleMessageBus.Dispatch.FileSystem.dll Namespace: CloudNimble.SimpleMessageBus.Dispatch.Triggers Inheritance: System.Object

Syntax

CloudNimble.SimpleMessageBus.Dispatch.Triggers.SimpleMessageBusFileProcessor

Summary

Default file processor used by FileTriggerAttribute.

Constructors

.ctor

Constructs a new instance.

Syntax

public SimpleMessageBusFileProcessor(CloudNimble.SimpleMessageBus.Dispatch.Triggers.SimpleMessageBusFileProcessorFactoryContext context)

Parameters

NameTypeDescription
contextCloudNimble.SimpleMessageBus.Dispatch.Triggers.SimpleMessageBusFileProcessorFactoryContextThe SimpleMessageBusFileProcessorFactoryContext to use.

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

InstanceId Virtual

Gets the current role instance ID. In Azure WebApps, this will be the WEBSITE_INSTANCE_ID. In non Azure scenarios, this will default to the Process ID.

Syntax

public virtual string InstanceId { get; }

Property Value

Type: string

MaxDegreeOfParallelism Virtual

Gets the maximum degree of parallelism that will be used when processing files concurrently.

Syntax

public virtual int MaxDegreeOfParallelism { get; }

Property Value

Type: int

Remarks

Files are added to an internal processing queue as file events are detected, and they’re processed in parallel based on this setting.

MaxProcessCount Virtual

Gets the maximum number of times file processing will be attempted for a file.

Syntax

public virtual int MaxProcessCount { get; }

Property Value

Type: int

MaxQueueSize Virtual

Gets the bounds on the maximum number of files that can be queued up for processing at one time. When set to -1, the work queue is unbounded.

Syntax

public virtual int MaxQueueSize { get; }

Property Value

Type: int

StatusFileExtension Virtual

Gets the file extension that will be used for the status files that are created for processed files.

Syntax

public virtual string StatusFileExtension { get; }

Property Value

Type: string

Methods

Cleanup Virtual

Perform any required cleanup. This includes deleting processed files (when AutoDelete is True).

Syntax

public virtual void Cleanup()

CleanupProcessedFiles Virtual

Clean up any files that have been fully processed

Syntax

public virtual void CleanupProcessedFiles()

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ProcessFileAsync Virtual

Process the file indicated by the specified FileSystemEventArgs.

Syntax

public virtual System.Threading.Tasks.Task<bool> ProcessFileAsync(System.IO.FileSystemEventArgs eventArgs, System.Threading.CancellationToken cancellationToken)

Parameters

NameTypeDescription
eventArgsSystem.IO.FileSystemEventArgsThe FileSystemEventArgs indicating the file to process.
cancellationTokenSystem.Threading.CancellationTokenThe CancellationToken to use.

Returns

Type: System.Threading.Tasks.Task<bool> A Task that returns true if the file was processed successfully, false otherwise.

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ShouldProcessFile Virtual

Determines whether the specified file should be processed.

Syntax

public virtual bool ShouldProcessFile(string filePath)

Parameters

NameTypeDescription
filePathstringThe candidate file for processing.

Returns

Type: bool True if the file should be processed, false otherwise.

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?