Share via


MessageFactory.Attachment Method

Definition

Overloads

Attachment(Attachment, String, String, String)

Returns a message activity that contains an attachment.

Attachment(IEnumerable<Attachment>, String, String, String)

Returns a message activity that contains a collection of attachments, in a list.

Attachment(Attachment, String, String, String)

Returns a message activity that contains an attachment.

public static Microsoft.Bot.Schema.IMessageActivity Attachment (Microsoft.Bot.Schema.Attachment attachment, string text = default, string ssml = default, string inputHint = default);
static member Attachment : Microsoft.Bot.Schema.Attachment * string * string * string -> Microsoft.Bot.Schema.IMessageActivity
Public Shared Function Attachment (attachment As Attachment, Optional text As String = Nothing, Optional ssml As String = Nothing, Optional inputHint As String = Nothing) As IMessageActivity

Parameters

attachment
Attachment

Attachment to include in the message.

text
String

Optional, the text of the message to send.

ssml
String

Optional, text to be spoken by your bot on a speech-enabled channel.

inputHint
String

Optional, indicates whether your bot is accepting, expecting, or ignoring user input after the message is delivered to the client. One of: "acceptingInput", "ignoringInput", or "expectingInput". Default is "acceptingInput".

Returns

A message activity containing the attachment.

Exceptions

attachment is null.

See also

Applies to

Attachment(IEnumerable<Attachment>, String, String, String)

Returns a message activity that contains a collection of attachments, in a list.

public static Microsoft.Bot.Schema.IMessageActivity Attachment (System.Collections.Generic.IEnumerable<Microsoft.Bot.Schema.Attachment> attachments, string text = default, string ssml = default, string inputHint = default);
static member Attachment : seq<Microsoft.Bot.Schema.Attachment> * string * string * string -> Microsoft.Bot.Schema.IMessageActivity
Public Shared Function Attachment (attachments As IEnumerable(Of Attachment), Optional text As String = Nothing, Optional ssml As String = Nothing, Optional inputHint As String = Nothing) As IMessageActivity

Parameters

attachments
IEnumerable<Attachment>

The attachments to include in the message.

text
String

Optional, the text of the message to send.

ssml
String

Optional, text to be spoken by your bot on a speech-enabled channel.

inputHint
String

Optional, indicates whether your bot is accepting, expecting, or ignoring user input after the message is delivered to the client. One of: "acceptingInput", "ignoringInput", or "expectingInput". Default is "acceptingInput".

Returns

A message activity containing the attachment.

Exceptions

attachments is null.

See also

Applies to