Class FileBuilder

Namespace: redb.Route.File
Assembly: redb.Route.File.dll

Fluent builder for File endpoint URIs.

public sealed class FileBuilder

Inheritance

Object→FileBuilder

Methods

AllowNullBody()

Allow sending null body (creates empty file).

public FileBuilder AllowNullBody()

AntExclude(string)

Ant-style patterns over the relative path that drop a file ("archive/**").

public FileBuilder AntExclude(string patterns)

AntFilterCaseSensitive(bool)

Whether the Ant patterns respect case (default true).

public FileBuilder AntFilterCaseSensitive(bool value = true)

AntInclude(string)

Ant-style patterns over the path relative to the polled directory, several separated by commas ("TYPE_A/outbox/*.csv"). Sees directories, which Includ...

public FileBuilder AntInclude(string patterns)

AppendChars(string)

Characters to append after writing (e.g. newline).

public FileBuilder AppendChars(string chars)

AutoCreate(bool)

Auto-create target directory. Default true.

public FileBuilder AutoCreate(bool autoCreate = true)

BackoffErrorThreshold(IExpression)

Backoff error threshold from an expression.

public FileBuilder BackoffErrorThreshold(IExpression value)

BackoffErrorThreshold(int)

Consecutive failed polls (the poll itself threw) that arm the backoff skip (0 = disabled).

public FileBuilder BackoffErrorThreshold(int value)

BackoffIdleThreshold(IExpression)

Backoff idle threshold from an expression.

public FileBuilder BackoffIdleThreshold(IExpression value)

BackoffIdleThreshold(int)

Consecutive idle polls (no exchange created) that arm the backoff skip (0 = disabled).

public FileBuilder BackoffIdleThreshold(int value)

BackoffMultiplier(IExpression)

Backoff multiplier from an expression.

public FileBuilder BackoffMultiplier(IExpression value)

BackoffMultiplier(int)

Skip this many polls once a backoff threshold is hit (0 = disabled; needs a threshold).

public FileBuilder BackoffMultiplier(int value)

BackoffOnFailedExchanges()

Count a poll whose every created exchange failed as an error for backoff (needs BackoffErrorThreshold).

public FileBuilder BackoffOnFailedExchanges()

Build()

Builds the File endpoint URI string.

public string Build()

Charset(string)

Character encoding. Default "utf-8".

public FileBuilder Charset(string charset)

Delay(IExpression)

Poll delay from an expression.

public FileBuilder Delay(IExpression ms)

Delay(int)

Poll delay in milliseconds. Default 500.

public FileBuilder Delay(int ms)

Delete()

Delete file after processing.

public FileBuilder Delete()

DoneFileName(IExpression)

Done file name pattern. If set, only files with a matching done file are processed.

public FileBuilder DoneFileName(IExpression name)

DoneFileName(string)

Done file name pattern (template string, supports ${...}).

public FileBuilder DoneFileName(string name)

EagerDeleteTargetFile(bool)

Eagerly delete target file before writing. Default true.

public FileBuilder EagerDeleteTargetFile(bool eager = true)

Exclude(string)

File name pattern to exclude.

public FileBuilder Exclude(string pattern)

FileExist(string)

Strategy when target file exists: Override, Append, Fail, Ignore, Move, TryRename.

public FileBuilder FileExist(string strategy)

FileName(IExpression)

Output file name or expression (e.g. Header("CamelFileName")).

public FileBuilder FileName(IExpression name)

FileName(string)

Output file name (template string, supports ${...}).

public FileBuilder FileName(string name)

Filter(string)

Name of an IGenericFileFilter in the route registry ("#myFilter") deciding for files and directories.

public FileBuilder Filter(string registryName)

FilterDirectory(string)

Condition deciding whether a subdirectory is walked into at all — evaluated before it is listed.

public FileBuilder FilterDirectory(string condition)

FilterFile(string)

Condition deciding whether a polled file is taken, evaluated before it is read or moved.

public FileBuilder FilterFile(string condition)

Idempotent(IExpression?)

Enable idempotent consumer with an optional key expression.

public FileBuilder Idempotent(IExpression? key = null)

Idempotent(string)

Enable idempotent consumer with a custom key. Supports the file keys

public FileBuilder Idempotent(string key)

Include(string)

File name pattern to include (e.g. "*.csv").

public FileBuilder Include(string pattern)

InitialDelay(IExpression)

Initial delay from an expression.

public FileBuilder InitialDelay(IExpression ms)

InitialDelay(int)

Initial delay before first poll. Default 0.

public FileBuilder InitialDelay(int ms)

JailStartingDirectory(bool)

Whether the producer refuses to write outside this directory. Default true.

public FileBuilder JailStartingDirectory(bool jail = true)

MaxMessagesPerPoll(IExpression)

Max files per poll from an expression.

public FileBuilder MaxMessagesPerPoll(IExpression max)

MaxMessagesPerPoll(int)

Max files per poll. Default 0 (unlimited).

public FileBuilder MaxMessagesPerPoll(int max)

MinAge(IExpression)

Minimum file age from an expression.

public FileBuilder MinAge(IExpression ms)

MinAge(long)

Minimum file age in milliseconds before processing.

public FileBuilder MinAge(long ms)

MoveExisting(string)

Strategy when file exists in move target: Override, Append, Fail, Ignore, Move, TryRename.

public FileBuilder MoveExisting(string strategy)

MoveFailed(IExpression)

Move a file whose processing failed to this directory (quarantine for poison files).

public FileBuilder MoveFailed(IExpression directory)

MoveFailed(string)

Move a file whose processing failed to this directory. Without it a failed file is left in place

public FileBuilder MoveFailed(string directory)

MoveTo(IExpression)

Move processed file to this directory.

public FileBuilder MoveTo(IExpression directory)

MoveTo(string)

Move processed file to this directory. Supports the file keys

public FileBuilder MoveTo(string directory)

Noop()

Do nothing after processing (leave file in place).

public FileBuilder Noop()

PreMove(IExpression)

Pre-move directory (temporary move before processing).

public FileBuilder PreMove(IExpression directory)

PreMove(string)

Pre-move directory (temporary move before processing). Supports the file keys

public FileBuilder PreMove(string directory)

ReadLock(string)

Read lock strategy: None, MarkerFile, Changed, FileLock, Rename.

public FileBuilder ReadLock(string strategy)

ReadLockCheckInterval(IExpression)

Read lock check interval from an expression.

public FileBuilder ReadLockCheckInterval(IExpression ms)

ReadLockCheckInterval(int)

Read lock check interval in milliseconds. Default 1000.

public FileBuilder ReadLockCheckInterval(int ms)

ReadLockMarkerFileExtension(string)

Marker file extension for MarkerFile read lock. Default ".redbLock".

public FileBuilder ReadLockMarkerFileExtension(string ext)

ReadLockMinAge(IExpression)

Read lock min age from an expression.

public FileBuilder ReadLockMinAge(IExpression ms)

ReadLockMinAge(long)

Minimum file age for Changed read lock. Default 1000.

public FileBuilder ReadLockMinAge(long ms)

ReadLockTimeout(IExpression)

Read lock timeout from an expression.

public FileBuilder ReadLockTimeout(IExpression ms)

ReadLockTimeout(long)

Read lock timeout in milliseconds. Default 10000.

public FileBuilder ReadLockTimeout(long ms)

Recursive()

Recurse into subdirectories.

public FileBuilder Recursive()

SortBy(string)

Sort order: None, Name, NameDesc, Modified, ModifiedDesc, Size, SizeDesc.

public FileBuilder SortBy(string sortBy)

StreamBody()

Set exchange body to a FileStream instead of byte[]. Stream is closed by Exchange.DisposeAsync.

public FileBuilder StreamBody()

TempFileName(IExpression)

Temporary file name during write.

public FileBuilder TempFileName(IExpression name)

TempFileName(string)

Temporary file name during write (template string, supports ${...}).

public FileBuilder TempFileName(string name)

TempPrefix(IExpression)

Temporary file prefix during write.

public FileBuilder TempPrefix(IExpression prefix)

TempPrefix(string)

Temporary file prefix during write (template string, supports ${...}).

public FileBuilder TempPrefix(string prefix)

ToString()

Returns a string that represents the current object.

public override string ToString()