Table of Contents

Class OutageWindowParsing

Namespace
SEBT.Portal.Core.AppSettings
Assembly
SEBT.Portal.Core.dll

Parses the string-typed fields of an OutageWindow. Shared by the startup validator that rejects malformed schedules and by the evaluator that reads them at request time, so the two cannot disagree about which windows are well-formed.

public static class OutageWindowParsing
Inheritance
object
OutageWindowParsing

Methods

TryParseLocal(string, out DateTime)

Parses an ISO-8601 local wall-clock date-time (no offset) as System.DateTimeKind.Unspecified, matching the timezone-local "now" it is compared against.

public static bool TryParseLocal(string value, out DateTime result)

Parameters

value string
result DateTime

Returns

bool

TryParseTarget(string, out OutageTarget)

Parses a window's Target string case-insensitively. Empty or whitespace means Both — a scheduled backend outage affects every surface unless the window says otherwise.

public static bool TryParseTarget(string value, out OutageTarget target)

Parameters

value string
target OutageTarget

Returns

bool