ServiceIdAgentThread Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| ServiceIdAgentThread() |
Initializes a new instance of the ServiceIdAgentThread class without a service thread identifier. |
| ServiceIdAgentThread(String) |
Initializes a new instance of the ServiceIdAgentThread class with the specified service thread identifier. |
| ServiceIdAgentThread(JsonElement, JsonSerializerOptions) |
Initializes a new instance of the ServiceIdAgentThread class from previously serialized state. |
ServiceIdAgentThread()
Initializes a new instance of the ServiceIdAgentThread class without a service thread identifier.
protected ServiceIdAgentThread();
Protected Sub New ()
Remarks
When using this constructor, the ServiceThreadId will be null initially and should be set by derived classes when the remote conversation is created.
Applies to
ServiceIdAgentThread(String)
Initializes a new instance of the ServiceIdAgentThread class with the specified service thread identifier.
protected ServiceIdAgentThread(string serviceThreadId);
new Microsoft.Agents.AI.ServiceIdAgentThread : string -> Microsoft.Agents.AI.ServiceIdAgentThread
Protected Sub New (serviceThreadId As String)
Parameters
- serviceThreadId
- String
The unique identifier that references the conversation state stored in the remote service.
Exceptions
serviceThreadId is null.
serviceThreadId is empty or contains only whitespace.
Applies to
ServiceIdAgentThread(JsonElement, JsonSerializerOptions)
Initializes a new instance of the ServiceIdAgentThread class from previously serialized state.
protected ServiceIdAgentThread(System.Text.Json.JsonElement serializedThreadState, System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = default);
new Microsoft.Agents.AI.ServiceIdAgentThread : System.Text.Json.JsonElement * System.Text.Json.JsonSerializerOptions -> Microsoft.Agents.AI.ServiceIdAgentThread
Protected Sub New (serializedThreadState As JsonElement, Optional jsonSerializerOptions As JsonSerializerOptions = Nothing)
Parameters
- serializedThreadState
- JsonElement
A JsonElement representing the serialized state of the thread.
- jsonSerializerOptions
- JsonSerializerOptions
Optional settings for customizing the JSON deserialization process.
Exceptions
The serializedThreadState is not a JSON object.
The serializedThreadState is invalid or cannot be deserialized to the expected type.
Remarks
This constructor enables restoration of a service-backed thread from serialized state, typically used when deserializing thread information that was previously saved or transmitted across application boundaries.