Skip to main content

Definition

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

Syntax

CloudNimble.SimpleMessageBus.Dispatch.Triggers.SimpleMessageBusFileTriggerAttribute

Summary

Attribute used to mark a job function that should be invoked based on file events.

Remarks

The method parameter type can be one of the following:

Constructors

.ctor

Constructs a new instance.

Syntax

public SimpleMessageBusFileTriggerAttribute(string path, string filter, System.IO.WatcherChangeTypes changeTypes = 1, bool autoDelete = false)

Parameters

NameTypeDescription
pathstringThe root path that this trigger is configured to watch for files on.
filterstringThe optional file filter that will be used.
changeTypesSystem.IO.WatcherChangeTypesThe WatcherChangeTypes that will be used by the file watcher. The Default is Created.
autoDeleteboolTrue if processed files should be deleted automatically, false otherwise. The default is False.

Properties

AutoDelete

Gets a value indicating whether files should be automatically deleted after they are successfully processed. When set to true, all files including any companion files starting with the target file name will be deleted when the file is successfully processed.

Syntax

public bool AutoDelete { get; private set; }

Property Value

Type: bool

ChangeTypes

Gets the WatcherChangeTypes that will be used by the file watcher.

Syntax

public System.IO.WatcherChangeTypes ChangeTypes { get; private set; }

Property Value

Type: System.IO.WatcherChangeTypes

Filter

Gets the optional file filter that will be used.

Syntax

public string Filter { get; private set; }

Property Value

Type: string

Path

Gets the root path that this trigger is configured to watch for files on.

Syntax

public string Path { get; private set; }

Property Value

Type: string

RootPath

Gets the root path that this trigger is configured to watch for files on.

Syntax

public string RootPath { get; }

Property Value

Type: string