mirror of
https://github.com/microsoft/autogen.git
synced 2025-10-19 11:59:27 +00:00
add xml comments for MessageContext.cs
This commit is contained in:
parent
e2082875e2
commit
42703dd79c
@ -3,14 +3,38 @@
|
|||||||
|
|
||||||
namespace Microsoft.AutoGen.Contracts.Python;
|
namespace Microsoft.AutoGen.Contracts.Python;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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.
|
||||||
|
/// </summary>
|
||||||
public class MessageContext(string messageId, CancellationToken cancellationToken)
|
public class MessageContext(string messageId, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the unique identifier for this message.
|
||||||
|
/// </summary>
|
||||||
public string MessageId { get; set; } = messageId;
|
public string MessageId { get; set; } = messageId;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the cancellation token associated with this message.
|
||||||
|
/// This can be used to cancel the operation if necessary.
|
||||||
|
/// </summary>
|
||||||
public CancellationToken CancellationToken { get; set; } = cancellationToken;
|
public CancellationToken CancellationToken { get; set; } = cancellationToken;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the sender of the message.
|
||||||
|
/// If <c>null</c>, the sender is unspecified.
|
||||||
|
/// </summary>
|
||||||
public AgentId? Sender { get; set; }
|
public AgentId? Sender { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the topic associated with the message.
|
||||||
|
/// If <c>null</c>, the message is not tied to a specific topic.
|
||||||
|
/// </summary>
|
||||||
public TopicId? Topic { get; set; }
|
public TopicId? Topic { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether this message is part of an RPC (Remote Procedure Call).
|
||||||
|
/// </summary>
|
||||||
public bool IsRpc { get; set; }
|
public bool IsRpc { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user