Beispiel #1
0
        public static async Task <ResourceResponse> SendTranslateActivityAsync(this ITurnContext context, string textReplyToSend, string speak = null, string inputHint = "acceptingInput", CancellationToken cancellationToken = default(CancellationToken))
        {
            textReplyToSend = await context.Translate(textReplyToSend);

            return(await context.SendActivityAsync(textReplyToSend, speak, inputHint, cancellationToken));
        }
Beispiel #2
0
        public static async Task <Activity> CreateReply(this Activity activity, string text, ITurnContext context)
        {
            text = await context.Translate(text);

            return(activity.CreateReply(text));
        }