예제 #1
0
        private async Task ResumeAfterAuth(IDialogContext context, IAwaitable <string> result)
        {
            var message    = await result;
            var authResult = context.GetAuthResult();

            if (authResult != null)
            {
                var domain = authResult.Upn.Split('@')[1].Split('.')[0];
                context.UserData.SetValue("ResourceId", domain);
                _resourceId = domain;
            }
            await context.PostAsync(message);

            await context.PostAsync("What would you like me to do?");

            context.Wait(MessageReceivedAsync);
        }