Class MessageContext
Represents the context of a message being sent within the agent runtime. This includes metadata such as the sender, topic, RPC status, and cancellation handling.
public class MessageContext
- Inheritance
-
MessageContext
- Inherited Members
Constructors
MessageContext(string, CancellationToken)
Represents the context of a message being sent within the agent runtime. This includes metadata such as the sender, topic, RPC status, and cancellation handling.
public MessageContext(string messageId, CancellationToken cancellationToken)
Parameters
messageId
stringcancellationToken
CancellationToken
MessageContext(CancellationToken)
public MessageContext(CancellationToken cancellation)
Parameters
cancellation
CancellationToken
Properties
CancellationToken
Gets or sets the cancellation token associated with this message. This can be used to cancel the operation if necessary.
public CancellationToken CancellationToken { get; set; }
Property Value
IsRpc
Gets or sets a value indicating whether this message is part of an RPC (Remote Procedure Call).
public bool IsRpc { get; set; }
Property Value
MessageId
Gets or sets the unique identifier for this message.
public string MessageId { get; set; }
Property Value
Sender
Gets or sets the sender of the message.
If null
, the sender is unspecified.
public AgentId? Sender { get; set; }
Property Value
Topic
Gets or sets the topic associated with the message.
If null
, the message is not tied to a specific topic.
public TopicId? Topic { get; set; }