Clarify exception handling in ConversationId property (#1457)

Update XML documentation to clarify exception behavior.

See `ChatClientAgentThreadTests.SetConversationIdThrowsWhenMessageStoreIsSet` which already verifies this is the actual behavior.

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
This commit is contained in:
Daniel Cazzulino
2025-11-17 16:50:26 -03:00
committed by GitHub
Unverified
parent 77247a304e
commit d50371729a
@@ -75,8 +75,8 @@ public class ChatClientAgentThread : AgentThread
/// <remarks>
/// <para>
/// Note that either <see cref="ConversationId"/> or <see cref="MessageStore "/> may be set, but not both.
/// If <see cref="MessageStore "/> is not null, and <see cref="ConversationId"/> is set, <see cref="MessageStore "/>
/// will be reverted to null, and vice versa.
/// If <see cref="MessageStore "/> is not null, setting <see cref="ConversationId"/> will throw an
/// <see cref="InvalidOperationException "/> exception.
/// </para>
/// <para>
/// This property may be null in the following cases:
@@ -91,6 +91,7 @@ public class ChatClientAgentThread : AgentThread
/// to fork the thread with each iteration.
/// </para>
/// </remarks>
/// <exception cref="InvalidOperationException">Attempted to set a conversation ID but a <see cref="MessageStore"/> is already set.</exception>
public string? ConversationId
{
get => this._conversationId;