Class LoggingProfileSinkStatusGui
Extracted from CreateLoggingProfileWindow as a single-responsibility collaborator: the
Configure Sinks step's Output Folder section, the Summary step's per-sink/profile status bullets, and the
Done step are the sink/Done PRESENTATION concern, separate from the window's own step orchestration —
mirroring Serenity.Localization.Installation.Settings.Editor.Builder.LocalizationTableSelectionGui's
own extraction rationale. This is not a file-size fix: CreateLoggingProfileWindow was
already over the project's ~600-line size-guidance trigger before this extraction and remains so after
it — see the PR body for the one-line justification the project's size guidance calls for.
Draws the one-line resolve status for a Logging sink singleton (Console/File/Structured) on the Configure
Sinks step, and the identical text for the Summary step's bullet — both read the SAME cached
SettingsAssetAuthoring.SettingsResolution<TSettings> passed in by
CreateLoggingProfileWindow, so what a sink section says while configuring it can never
disagree with what the Summary bullet says. Sinks stay singleton-resolved by TYPE (see
LoggingProfileCreator's type doc) rather than adopting their own
Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset in this PR — a status line is all three need. Also draws the Done
step's per-asset "created/updated at, with a Ping button" row, so an UPDATED sink (which never appears in
Serenity.Global.Infrastructure.Editor.SerenityCreationResult.CreatedPaths) is still named after the write.
Inheritance
LoggingProfileSinkStatusGui
Assembly: Serenity.UnityLogging.Infrastructure.Editor.dll
Syntax
public static class LoggingProfileSinkStatusGui
Fields
ConsoleSinkDisplayName
Display names every window-side call site reads instead of holding its own copy — an
earlier draft's DrawDoneStep took all four as separate parameters instead.
Declaration
public const string ConsoleSinkDisplayName = "Console Sink"
Field Value
FileSinkDisplayName
Declaration
public const string FileSinkDisplayName = "File Sink"
Field Value
ProfileDisplayName
Declaration
public const string ProfileDisplayName = "Logging Profile"
Field Value
StructuredSinkDisplayName
Declaration
public const string StructuredSinkDisplayName = "Structured Sink"
Field Value
Methods
DescribeLine<TSettings>(SettingsResolution<TSettings>, string, string)
The status line text alone, name-agnostic — for a caller (the Summary step's bullet, the
Configure-step section under its own header) that supplies the asset name exactly once around it.
Declaration
public static string DescribeLine<TSettings>(SettingsAssetAuthoring.SettingsResolution<TSettings> resolution, string displayName, string plannedPath) where TSettings : Object
Parameters
Returns
Type Parameters
| Name |
Description |
| TSettings |
|
DrawDoneStep(Result, string)
The whole Done step: Serenity.Global.Infrastructure.Editor.SerenityWizardDoneStep's standard success/created/manual-
steps/button-row block, plus a "Written assets" section naming every asset this run wrote — including
a sink that was only updated in place, which Serenity.Global.Infrastructure.Editor.SerenityWizardDoneStep's own "Created" list
omits — each with its own Ping button. Reads the four display name consts on this same type rather
than taking them as parameters — an earlier draft's four-name-parameter signature was a review flag.
Declaration
public static void DrawDoneStep(LoggingProfileCreator.Result lastResult, string cookbookDocumentationPath)
Parameters
DrawOutputFolderSection(ref SerenityFolderField, Action)
The window's own "Output Folder" section, not Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAssetGui.DrawOutputFolderSection(Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset,Serenity.Global.Infrastructure.Editor.SerenityFolderField@,Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAssetGui.Model,System.Action{System.String}):
this folder also serves as every sink's/the backend's own create-new fallback, so it must stay
enabled regardless of the profile target's mode — the shared helper disables it while updating in
place. Invokes onChanged when the folder changes, so the caller can re-resolve its
by-Id-in-folder target.
Declaration
public static void DrawOutputFolderSection(ref SerenityFolderField folder, Action onChanged)
Parameters
| Type |
Name |
Description |
| SerenityFolderField |
folder |
|
| Action |
onChanged |
|
DrawSummaryBullet<TSettings>(bool, SettingsResolution<TSettings>, string, string)
The Summary step's bullet for one sink: the disabled line while the sink is off, otherwise
"bullet — name — DescribeLine" — the ONE place the name and the name-agnostic line are composed
together, so the name appears exactly once.
Declaration
public static void DrawSummaryBullet<TSettings>(bool enabled, SettingsAssetAuthoring.SettingsResolution<TSettings> resolution, string displayName, string plannedPath) where TSettings : Object
Parameters
Type Parameters
| Name |
Description |
| TSettings |
|
Draw<TSettings>(SettingsResolution<TSettings>, string, string)
The status line plus, when it applies, the ambiguous-assets or package-content warning
HelpBox. Drawn directly under the sink's own section header (e.g. "Console Sink"), which
is where the asset name comes from — the line itself never repeats it.
Declaration
public static void Draw<TSettings>(SettingsAssetAuthoring.SettingsResolution<TSettings> resolution, string displayName, string plannedPath) where TSettings : Object
Parameters
Type Parameters
| Name |
Description |
| TSettings |
|
PlannedSinkPath(string, string)
Where a new sink asset of this fallback name would be created under outputFolder —
the same computation Create(Input) performs, so a status line can never
disagree with it.
Declaration
public static string PlannedSinkPath(string outputFolder, string fileNameFallback)
Parameters
| Type |
Name |
Description |
| string |
outputFolder |
|
| string |
fileNameFallback |
|
Returns