Struct ConversationId
- Namespace
- Emissary
- Assembly
- Emissary.dll
Strongly typed identifier for a single agent conversation.
public readonly record struct ConversationId : IEquatable<ConversationId>
- Implements
- Inherited Members
Remarks
Ids are UUIDv7, so they sort by creation time — useful for state stores and trace correlation.
Constructors
ConversationId(Guid)
Strongly typed identifier for a single agent conversation.
public ConversationId(Guid Value)
Parameters
ValueGuidThe underlying globally unique value.
Remarks
Ids are UUIDv7, so they sort by creation time — useful for state stores and trace correlation.
Properties
Value
The underlying globally unique value.
public Guid Value { get; init; }
Property Value
Methods
New()
Creates a new, time-ordered conversation id.
public static ConversationId New()
Returns
Parse(string)
Parses a conversation id from its string form.
public static ConversationId Parse(string text)
Parameters
textstringAny format accepted by Parse(string).
Returns
Exceptions
- FormatException
The text is not a valid id.
ToString()
Returns the compact (32 hex digits, no hyphens) form of the id.
public override string ToString()
Returns
TryParse(string?, out ConversationId)
Attempts to parse a conversation id from its string form.
public static bool TryParse(string? text, out ConversationId id)
Parameters
textstringThe candidate text, or null.
idConversationIdThe parsed id, or default on failure.