FindMyFiles

FindMyFiles.ViewModels

StatusFormatter Class

All user-facing status wording in one place — keys resolve through Loc (Strings/<lang>/Resources.resw).

public static class StatusFormatter

Inheritance System.Object → StatusFormatter

Methods

StatusFormatter.Count(QueryTraceData, long) Method

Result-count line: the hits count plus the elapsed query time (ms) when a trace is present (TotalUs → ms), the bare count otherwise.

public static string Count(FindMyFiles.Engine.QueryTraceData? trace, long hits);

Parameters

trace QueryTraceData

Latest query trace, or null when timing is unavailable.

hits System.Int64

Number of matching results.

Returns

System.String
Localized count line, with elapsed time when a trace is present.

StatusFormatter.EngineMode(IEngineClient) Method

Status-bar transport badge: which engine the app talks to right now (client type + live connection state).

public static string EngineMode(FindMyFiles.Engine.IEngineClient engine);

Parameters

engine IEngineClient

Engine client whose type and connection state to describe.

Returns

System.String
Localized transport badge for the active engine.

StatusFormatter.Overall(IReadOnlyList<VolumeStatus>, IReadOnlyList<string>) Method

Startup/refresh snapshot of the overall index state — reflects whatever the engine reports right now, so an already-Ready volume never shows "indexing…". requested is the list we asked to index, used only for messaging when the engine hasn't surfaced any status yet.

public static string Overall(System.Collections.Generic.IReadOnlyList<FindMyFiles.Engine.VolumeStatus> volumes, System.Collections.Generic.IReadOnlyList<string> requested);

Parameters

volumes System.Collections.Generic.IReadOnlyList<VolumeStatus>

Per-volume status the engine reports right now.

requested System.Collections.Generic.IReadOnlyList<System.String>

Volumes we asked to index, used only for early messaging.

Returns

System.String
Localized overall index-state line.

StatusFormatter.QueryError(string) Method

Status line for a rejected query — the engine's syntax-error message behind a localized prefix.

public static string QueryError(string message);

Parameters

message System.String

Engine syntax-error message for the rejected query.

Returns

System.String
Localized error line with the engine message behind a prefix.

StatusFormatter.Volume(VolumeStatus, string) Method

Status-bar line for a volume state change; falls back to the current text for states that carry no message.

public static string Volume(FindMyFiles.Engine.VolumeStatus s, string current);

Parameters

s VolumeStatus

Volume status that changed.

current System.String

Existing status text, returned for states with no message.

Returns

System.String
Localized line for the new volume state, or current.