MessageFactory.Carousel 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
첨부 파일 컬렉션을 포함하는 메시지 활동을 회전식으로 반환합니다.
public static Microsoft.Bot.Schema.IMessageActivity Carousel(System.Collections.Generic.IEnumerable<Microsoft.Bot.Schema.Attachment> attachments, string text = default, string ssml = default, string inputHint = default);
static member Carousel : seq<Microsoft.Bot.Schema.Attachment> * string * string * string -> Microsoft.Bot.Schema.IMessageActivity
Public Shared Function Carousel (attachments As IEnumerable(Of Attachment), Optional text As String = Nothing, Optional ssml As String = Nothing, Optional inputHint As String = Nothing) As IMessageActivity
매개 변수
- attachments
- IEnumerable<Attachment>
메시지에 포함할 첨부 파일입니다.
- text
- String
선택 사항으로 보낼 메시지의 텍스트입니다.
- ssml
- String
선택 사항으로, 음성 지원 채널에서 봇이 말하는 텍스트입니다.
- inputHint
- String
선택 사항으로, 메시지가 클라이언트에 전달된 후 봇이 사용자 입력을 수락, 예상 또는 무시할지 여부를 나타냅니다. "acceptingInput", "ignoringInput" 또는 "expectingInput" 중 하나입니다. 기본값은 "acceptingInput"입니다.
반환
첨부 파일이 포함된 메시지 활동입니다.
예외
attachments는 null 입니다.
예제
이 코드는 HeroCards의 회전목마를 만들고 보냅니다.
// Create the activity and attach a set of Hero cards.
var activity = MessageFactory.Carousel(
new Attachment[]
{
new HeroCard(
title: "title1",
images: new CardImage[] { new CardImage(url: "imageUrl1.png") },
buttons: new CardAction[]
{
new CardAction(title: "button1", type: ActionTypes.ImBack, value: "item1")
})
.ToAttachment(),
new HeroCard(
title: "title2",
images: new CardImage[] { new CardImage(url: "imageUrl2.png") },
buttons: new CardAction[]
{
new CardAction(title: "button2", type: ActionTypes.ImBack, value: "item2")
})
.ToAttachment(),
new HeroCard(
title: "title3",
images: new CardImage[] { new CardImage(url: "imageUrl3.png") },
buttons: new CardAction[]
{
new CardAction(title: "button3", type: ActionTypes.ImBack, value: "item3")
})
.ToAttachment()
});
// Send the activity as a reply to the user.
await context.SendActivity(activity);