Skip to content

CompareExchangeResult

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework.Workspace

CompareExchangeResult Class

Result data for a successful TryCompareExchange(string, string, string) call.

public sealed record CompareExchangeResult : System.IEquatable<NexusLabs.Needlr.AgentFramework.Workspace.CompareExchangeResult>

Inheritance System.Object 🡒 CompareExchangeResult

Implements System.IEquatable<CompareExchangeResult>

Constructors

CompareExchangeResult(bool, string) Constructor

Result data for a successful TryCompareExchange(string, string, string) call.

public CompareExchangeResult(bool Exchanged, string? Reason);

Parameters

Exchanged System.Boolean

Whether the content was swapped.

Reason System.String

Why the exchange did not happen when Exchanged is false (e.g., "content mismatch"). null when the exchange succeeded.

Properties

CompareExchangeResult.Exchanged Property

Whether the content was swapped.

public bool Exchanged { get; init; }

Property Value

System.Boolean

CompareExchangeResult.Reason Property

Why the exchange did not happen when Exchanged is false (e.g., "content mismatch"). null when the exchange succeeded.

public string? Reason { get; init; }

Property Value

System.String