ConversationReferenceBuilder.WithUser Method
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
| Name | Description |
|---|---|
| WithUser(ChannelAccount) |
Sets the user associated with the conversation reference being built. |
| WithUser(String, String) |
Sets the user information for the reference using the specified user ID, optional user name, and role. |
WithUser(ChannelAccount)
Sets the user associated with the conversation reference being built.
public Microsoft.Agents.Builder.App.Proactive.ConversationReferenceBuilder WithUser(Microsoft.Agents.Core.Models.ChannelAccount user);
member this.WithUser : Microsoft.Agents.Core.Models.ChannelAccount -> Microsoft.Agents.Builder.App.Proactive.ConversationReferenceBuilder
Public Function WithUser (user As ChannelAccount) As ConversationReferenceBuilder
Parameters
- user
- ChannelAccount
The user to associate with the conversation reference. Cannot be null.
Returns
The current ConversationReferenceBuilder instance for method chaining.
Applies to
WithUser(String, String)
Sets the user information for the reference using the specified user ID, optional user name, and role.
public Microsoft.Agents.Builder.App.Proactive.ConversationReferenceBuilder WithUser(string userId, string? userName = default);
member this.WithUser : string * string -> Microsoft.Agents.Builder.App.Proactive.ConversationReferenceBuilder
Public Function WithUser (userId As String, Optional userName As String = Nothing) As ConversationReferenceBuilder
Parameters
- userId
- String
The unique identifier of the user to associate with the reference. Cannot be null.
- userName
- String
The display name of the user. May be null if no display name is available.
Returns
The current ConversationReferenceBuilder instance with the updated user information.