C# Class Microsoft.Teams.Apps.FAQPlusPlus.Common.Components.QnAPairServiceFacade

Class that handles get/add/update of QnA pairs.
Inheritance: IQnAPairServiceFacade
Mostrar archivo Open project: OfficeDev/microsoft-teams-apps-faqplus

Public Methods

Method Description
EditQnAPairAsync ( AdaptiveSubmitActionData postedQnaPairEntity, ITurnContext turnContext ) : Task

Validate the adaptive card fields while editing the question and answer pair.

GetReplyToQnAAsync ( ITurnContext turnContext, IMessageActivity message ) : Task

Get the reply to a question asked by end user.

QnAPairServiceFacade ( Common.Providers.IConfigurationDataProvider configurationProvider, IQnaServiceProvider qnaServiceProvider, IActivityStorageProvider activityStorageProvider, IOptionsMonitor botSettings, ILogger logger ) : System

Initializes a new instance of the QnAPairServiceFacade class.

SaveQnAPairAsync ( ITurnContext turnContext, string answer, AdaptiveSubmitActionData qnaPairEntity ) : Task

Method perform update operation of question and answer pair.

Private Methods

Method Description
CardResponseAsync ( ITurnContext turnContext, AdaptiveSubmitActionData postedQnaPairEntity, string answer ) : Task

Return card response.

Method Details

EditQnAPairAsync() public method

Validate the adaptive card fields while editing the question and answer pair.
public EditQnAPairAsync ( AdaptiveSubmitActionData postedQnaPairEntity, ITurnContext turnContext ) : Task
postedQnaPairEntity AdaptiveSubmitActionData Qna pair entity contains submitted card data.
turnContext ITurnContext Context object containing information cached for a single turn of conversation with a user.
return Task

GetReplyToQnAAsync() public method

Get the reply to a question asked by end user.
public GetReplyToQnAAsync ( ITurnContext turnContext, IMessageActivity message ) : Task
turnContext ITurnContext Context object containing information cached for a single turn of conversation with a user.
message IMessageActivity Text message.
return Task

QnAPairServiceFacade() public method

Initializes a new instance of the QnAPairServiceFacade class.
public QnAPairServiceFacade ( Common.Providers.IConfigurationDataProvider configurationProvider, IQnaServiceProvider qnaServiceProvider, IActivityStorageProvider activityStorageProvider, IOptionsMonitor botSettings, ILogger logger ) : System
configurationProvider Common.Providers.IConfigurationDataProvider Configuration Provider.
qnaServiceProvider IQnaServiceProvider QnA service provider.
activityStorageProvider IActivityStorageProvider Activity storage provider.
botSettings IOptionsMonitor Represents a set of key/value application configuration properties for FaqPlusPlus bot.
logger ILogger Instance to send logs to the Application Insights service.
return System

SaveQnAPairAsync() public method

Method perform update operation of question and answer pair.
public SaveQnAPairAsync ( ITurnContext turnContext, string answer, AdaptiveSubmitActionData qnaPairEntity ) : Task
turnContext ITurnContext Context object containing information cached for a single turn of conversation with a user.
answer string Answer of the given question.
qnaPairEntity AdaptiveSubmitActionData Qna pair entity that contains question and answer information.
return Task