CreateConversationOptionsBuilder.WithActivity(IActivity) Method

Definition

Adds an Activity to the conversation being created. This does not apply to all Channel types, but can be used to specify the initial message for those that do. Teams supports this, and will use the Activity as the initial message in the conversation. For channels that do not support this, the Activity will be ignored.

public Microsoft.Agents.Builder.App.Proactive.CreateConversationOptionsBuilder WithActivity(Microsoft.Agents.Core.Models.IActivity message);
member this.WithActivity : Microsoft.Agents.Core.Models.IActivity -> Microsoft.Agents.Builder.App.Proactive.CreateConversationOptionsBuilder
Public Function WithActivity (message As IActivity) As CreateConversationOptionsBuilder

Parameters

message
IActivity

The activity representing the message to include in the conversation. Ignored if null.

Returns

The current instance of CreateConversationOptionsBuilder with the specified message added.

Applies to