Skip to content

ExperimentItemPublicationResult

NexusLabs.Foundry.Evaluation

NexusLabs.Foundry.Evaluation.Experiments

ExperimentItemPublicationResult Class

Describes one item scope's publication outcome independently from item quality.

public sealed record ExperimentItemPublicationResult : System.IEquatable<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemPublicationResult>

Inheritance System.Object 🡒 ExperimentItemPublicationResult

Implements System.IEquatable<ExperimentItemPublicationResult>

Properties

ExperimentItemPublicationResult.Correlations Property

Gets namespaced provider identifiers produced by this scope.

public System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemCorrelation> Correlations { get; }

Property Value

System.Collections.Generic.IReadOnlyList<ExperimentItemCorrelation>

ExperimentItemPublicationResult.Failure Property

Gets the structured publication failure, when present.

public NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailure? Failure { get; }

Property Value

ExperimentFailure

ExperimentItemPublicationResult.IsRequired Property

Gets a value indicating whether publication failure is required for aggregate publication health.

public bool IsRequired { get; }

Property Value

System.Boolean

ExperimentItemPublicationResult.Name Property

Gets the unique item-scope provider name.

public string Name { get; }

Property Value

System.String

ExperimentItemPublicationResult.Status Property

Gets the publication status.

public NexusLabs.Foundry.Evaluation.Experiments.ExperimentPublicationOperationStatus Status { get; }

Property Value

ExperimentPublicationOperationStatus

Methods

ExperimentItemPublicationResult.Failed(string, bool, IReadOnlyList<ExperimentItemCorrelation>, ExperimentFailure) Method

Creates a failed canonical item-scope publication result.

public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemPublicationResult Failed(string name, bool isRequired, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemCorrelation> correlations, NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailure failure);

Parameters

name System.String

The registered item-scope provider name.

isRequired System.Boolean

Whether publication failure is required.

correlations System.Collections.Generic.IReadOnlyList<ExperimentItemCorrelation>

The provider correlations to snapshot.

failure ExperimentFailure

The structured item-scope publication failure.

Returns

ExperimentItemPublicationResult
A failed canonical publication result.

Exceptions

System.ArgumentException
name or a correlation component is blank, or correlation identity is duplicated.

System.ArgumentNullException
correlations, one of its elements, or failure is null.

System.InvalidOperationException
failure is not a non-retryable item-scope publication failure.

ExperimentItemPublicationResult.NotAttempted(string, bool, IReadOnlyList<ExperimentItemCorrelation>) Method

Creates a canonical item-scope publication result that was not attempted.

public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemPublicationResult NotAttempted(string name, bool isRequired, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemCorrelation> correlations);

Parameters

name System.String

The registered item-scope provider name.

isRequired System.Boolean

Whether publication failure is required.

correlations System.Collections.Generic.IReadOnlyList<ExperimentItemCorrelation>

The provider correlations to snapshot.

Returns

ExperimentItemPublicationResult
A not-attempted canonical publication result.

Exceptions

System.ArgumentException
name or a correlation component is blank, or correlation identity is duplicated.

System.ArgumentNullException
correlations or one of its elements is null.

ExperimentItemPublicationResult.Succeeded(string, bool, IReadOnlyList<ExperimentItemCorrelation>) Method

Creates a successful canonical item-scope publication result.

public static NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemPublicationResult Succeeded(string name, bool isRequired, System.Collections.Generic.IReadOnlyList<NexusLabs.Foundry.Evaluation.Experiments.ExperimentItemCorrelation> correlations);

Parameters

name System.String

The registered item-scope provider name.

isRequired System.Boolean

Whether publication failure is required.

correlations System.Collections.Generic.IReadOnlyList<ExperimentItemCorrelation>

The provider correlations to snapshot.

Returns

ExperimentItemPublicationResult
A successful canonical publication result.

Exceptions

System.ArgumentException
name or a correlation component is blank, or correlation identity is duplicated.

System.ArgumentNullException
correlations or one of its elements is null.