CreateConversationOptionsBuilder.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) |
Specifies a user to include as a member in the conversation being created. |
| WithUser(String, String) |
Specifies the user to include as a participant in the conversation being built. |
WithUser(ChannelAccount)
Specifies a user to include as a member in the conversation being created.
public Microsoft.Agents.Builder.App.Proactive.CreateConversationOptionsBuilder WithUser(Microsoft.Agents.Core.Models.ChannelAccount user);
member this.WithUser : Microsoft.Agents.Core.Models.ChannelAccount -> Microsoft.Agents.Builder.App.Proactive.CreateConversationOptionsBuilder
Public Function WithUser (user As ChannelAccount) As CreateConversationOptionsBuilder
Parameters
- user
- ChannelAccount
The user account to add as a member of the conversation. Ignored if null.
Returns
The current CreateConversationOptionsBuilder instance for method chaining.
Exceptions
Thrown if required parameters are missing or invalid.
Applies to
WithUser(String, String)
Specifies the user to include as a participant in the conversation being built.
public Microsoft.Agents.Builder.App.Proactive.CreateConversationOptionsBuilder WithUser(string userId, string userName = default);
member this.WithUser : string * string -> Microsoft.Agents.Builder.App.Proactive.CreateConversationOptionsBuilder
Public Function WithUser (userId As String, Optional userName As String = Nothing) As CreateConversationOptionsBuilder
Parameters
- userId
- String
The unique identifier of the user to add to the conversation. Cannot be null.
- userName
- String
The display name of the user to add to the conversation. This value is optional and can be null.
Returns
The current CreateConversationOptionsBuilder instance with the specified user set as a participant.
Exceptions
Thrown if required parameters are missing or invalid.