Skip to content

SessionBranchOutcome

Namespace AgentPrism · Assembly AgentPrism.Core.dll

The result of a branching attempt.

public sealed record SessionBranchOutcome : IEquatable<SessionBranchOutcome>

objectSessionBranchOutcome

IEquatable<SessionBranchOutcome>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The human-readable reason for a failure.

public string? Detail { get; init; }

string?

The branch that was opened. Populated only when SessionBranchStatus.Branched.

public SessionBranchResult? Result { get; init; }

SessionBranchResult?

The result.

public required SessionBranchStatus Status { get; init; }

SessionBranchStatus

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(SessionBranchOutcome? other)

other SessionBranchOutcome?

bool

Produces a failed result.

public static SessionBranchOutcome Failed(SessionBranchStatus status, string detail)

status SessionBranchStatus

The result.

detail string

The reason.

SessionBranchOutcome

The result.

public override int GetHashCode()

int

Produces a successful result.

public static SessionBranchOutcome Succeeded(SessionBranchResult result)

result SessionBranchResult

The branch that was opened.

SessionBranchOutcome

The result.

public override string ToString()

string

operator ==(SessionBranchOutcome?, SessionBranchOutcome?)

Section titled “ operator ==(SessionBranchOutcome?, SessionBranchOutcome?)”
public static bool operator ==(SessionBranchOutcome? left, SessionBranchOutcome? right)

left SessionBranchOutcome?

right SessionBranchOutcome?

bool

operator !=(SessionBranchOutcome?, SessionBranchOutcome?)

Section titled “ operator !=(SessionBranchOutcome?, SessionBranchOutcome?)”
public static bool operator !=(SessionBranchOutcome? left, SessionBranchOutcome? right)

left SessionBranchOutcome?

right SessionBranchOutcome?

bool