Skip to content

CorrelationQueryResult

Namespace: Dotsider.Core.Analysis.Models

Assembly: Dotsider.Core.dll

The result of a CorrelationQuery: an Outcome with exactly the payload that outcome carries — a Report when resolved, a candidate list when ambiguous, a Message explaining a miss or an unavailable index.

public sealed record CorrelationQueryResult : IEquatable<CorrelationQueryResult>

ObjectCorrelationQueryResult

CorrelationQueryResult(CorrelationQueryOutcome, CorrelationReport?, IReadOnlyList<CorrelationCandidate>, string?)

Section titled “CorrelationQueryResult(CorrelationQueryOutcome, CorrelationReport?, IReadOnlyList<CorrelationCandidate>, string?)”

The result of a CorrelationQuery: an Outcome with exactly the payload that outcome carries — a Report when resolved, a candidate list when ambiguous, a Message explaining a miss or an unavailable index.

Parameters:

public CorrelationQueryResult(CorrelationQueryOutcome Outcome, CorrelationReport? Report, IReadOnlyList<CorrelationCandidate> Candidates, string? Message)

The ambiguous matches, empty unless Outcome is Ambiguous.

Returns: IReadOnlyList<CorrelationCandidate>

public IReadOnlyList<CorrelationCandidate> Candidates { get; init; }

A human-readable explanation for a non-resolved outcome, or null when resolved.

Returns: String

public string? Message { get; init; }

How the query resolved.

Returns: CorrelationQueryOutcome

public CorrelationQueryOutcome Outcome { get; init; }

The resolved correlation, or null unless Outcome is Resolved.

Returns: CorrelationReport

public CorrelationReport? Report { get; init; }

Ambiguous(IReadOnlyList<CorrelationCandidate>, string)

Section titled “Ambiguous(IReadOnlyList<CorrelationCandidate>, string)”

Creates an ambiguous result listing every matched candidate.

Parameters:

Returns: CorrelationQueryResult

public static CorrelationQueryResult Ambiguous(IReadOnlyList<CorrelationCandidate> candidates, string message)

Creates a not-found result explaining the miss.

Parameters:

  • message (String): Why nothing matched.

Returns: CorrelationQueryResult

public static CorrelationQueryResult NotFound(string message)

Creates a resolved result carrying the correlation report.

Parameters:

Returns: CorrelationQueryResult

public static CorrelationQueryResult Resolved(CorrelationReport report)

Creates an unavailable result explaining why correlation could not run.

Parameters:

  • message (String): Why the index was unavailable.

Returns: CorrelationQueryResult

public static CorrelationQueryResult Unavailable(string message)