TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
veerendra chejerla
NA
84
3.5k
how to pass set value in one method to another
Jan 29 2020 7:52 PM
i am trying to pass Set vlue in one method to another method in bot framework using C#
i wrote two methods
This is my first method
if
(item.PromptOption !=
"NULL"
)
{
if
(item.PromptOption.Split(
'!'
).Length >= 1)
{
questionTExt = item.PromptOption.Split(
'!'
)[0];
lstConfirmAction1 =
new
List<
string
>();
int
getLen = item.PromptOption.Split(
'!'
)[1].Split(
'$'
).Count();
for
(
int
i = 0; i < getLen; i++)
{
lstConfirmAction1.Add(item.PromptOption.Split(
'!'
)[1].Split(
'$'
)[i]);
}
// lstConfirmAction.Add(item.PromptOption.Split('!')[1].Split('$')[1]);
}
context.UserData.SetValue(questionTExt, questionTExt);
var val= context.UserData.GetValue<
string
>(questionTExt);
PromptDialog.Choice(context,
this
.OnFeedback, lstActions, questiontext,
null
, 3);
}
My second method
private
async Task OnFeedback(IDialogContext context, IAwaitable<
string
> result)
{
string
selectedStatus =
string
.Empty;
selectedStatus = await result;
var item = trbList1.Where(a => a.ID == childID && a.HeaderOption.ToLower() == selectedStatus.ToLower()).FirstOrDefault();
if
(!
string
.IsNullOrEmpty(item.Text))
{
if
(item.Text ==
"break"
)
{
isTriggered =
false
;
SaveQnAData(context,
"YES"
,
"TRUE"
);
await context.PostAsync(
"Thank You"
);
}
else
{
var qst = context.UserData.GetValue<
string
>(questionTExt);
botCon.KyraConverastionDetails.BotReply = qst;
await context.PostAsync(item.Text);
}
}
}
Reply
Answers (
1
)
XML to CSV parser with column names in C#
C# timer problem