Method TryParse
- Namespace
- MailFathom.Application.Jobs.Scheduling
- Assembly
- MailFathom.Application.dll
TryParse(string?, out JobRecurrence?, out string?)
Reads a declared schedule, reporting what is wrong with one this system cannot use.
public static bool TryParse(string? declaration, out JobRecurrence? recurrence, out string? error)
Parameters
declarationstringThe schedule as an operator wrote it.
recurrenceJobRecurrenceThe parsed schedule, or null when the declaration is unusable.
errorstringWhat an operator has to fix, or null when the declaration is usable.
Returns
Remarks
The failure is a message rather than an exception, because the one caller that matters is configuration validation and what it needs is every fault of a section in one reading rather than the first one raised.