Class VersionMatrixView
- Namespace
- Quilt4Net.Toolkit.Features.ApplicationInsights
- Assembly
- Quilt4Net.Toolkit.dll
Materialized application/environment version matrix ready for UI rendering.
public sealed record VersionMatrixView : IEquatable<VersionMatrixView>
- Inheritance
-
VersionMatrixView
- Implements
- Inherited Members
Properties
Applications
Application names sorted alphabetically.
public required IReadOnlyList<string> Applications { get; init; }
Property Value
CellAliases
Per-cell alias info, populated only when an alias map has been applied
(typically by a host that provides an AliasFolder delegate to
VersionMatrixDisplay). Empty by default — consumers that don't
have an alias concept can ignore this entirely.
public IReadOnlyDictionary<(string App, string Env), CellAlias> CellAliases { get; init; }
Property Value
Cells
Cells keyed by (ApplicationName, Environment). Missing keys = empty cell.
public required IReadOnlyDictionary<(string App, string Env), VersionMatrixCell> Cells { get; init; }
Property Value
CellsByMachine
Per-machine breakdown of the same data: for each (App, Env), the list of cells observed on each individual machine running that app. Populated when the underlying telemetry carries a machine identifier (host.name or AppRoleInstance); empty list otherwise. The UI's "Per machine" toggle reads from this map to expand an app row into one sub-row per machine. The aggregated Cells still picks the latest version across machines for the default app-level view.
public IReadOnlyDictionary<(string App, string Env), IReadOnlyList<VersionMatrixCell>> CellsByMachine { get; init; }
Property Value
Environments
Environment names sorted by standard order (Development → Staging → Test → Production → other → unknown).
public required IReadOnlyList<string> Environments { get; init; }
Property Value
LastRefreshedUtc
UTC timestamp the data was fetched from Application Insights.
public required DateTime LastRefreshedUtc { get; init; }
Property Value
Methods
FromCells(IReadOnlyList<VersionMatrixCell>, DateTime?)
Build a view from a flat list of cells. Environments are returned alphabetical;
final domain ordering (Development → Staging → Test → Production, then unknown) is
applied at render time by VersionMatrixDisplay, so the same fetched view can
be reused under different ordering preferences.
public static VersionMatrixView FromCells(IReadOnlyList<VersionMatrixCell> cells, DateTime? lastRefreshedUtc = null)
Parameters
cellsIReadOnlyList<VersionMatrixCell>lastRefreshedUtcDateTime?Original load timestamp to stamp on the returned view. Pass the oldest per-context LastRefreshedUtc when merging multiple workspace views so the "Data loaded at …" indicator reflects the real fetch time across cache hits, not the moment this merge happened to run.
nullstamps UtcNow.
Returns
TryGetAlias(string, string, out CellAlias)
public bool TryGetAlias(string app, string env, out CellAlias info)
Parameters
Returns
TryGetCell(string, string, out VersionMatrixCell)
public bool TryGetCell(string app, string env, out VersionMatrixCell cell)
Parameters
appstringenvstringcellVersionMatrixCell