public void AskQuestion(IErpResult state) { Question question = new Question { Mode = this.Mode, PosedDateTime = DateTime.Now, UserId = this.ConversationUser.Id, ConversationId = this.ConversationId, State = state, QuestionText = state.QuestionText }; this.QuestionManagerReference.AddQuestion(question); this.Say(state, null); }
private void OnResponse(IErpResult result) { }
public void ReturnResult(IErpResult result) { ProcessAnswer.Invoke(result); }
private void OnERPResponse(IErpResult data) { EventHandler<ERPResponseEvent> handler = OnERPRequest; // Do we have an event handler wired up? if (handler != null) { ERPResponseEvent args = new ERPResponseEvent(); args.UserId = data.UserId; args.ConversationId = data.ConversationId; args.Entity = data.Entity; args.Target = data.Target; args.Context = data.Context; args.IsQuestion = data.IsQuestion; args.QuestionText = data.QuestionText; // Fire the event handler.Invoke(this, args); } }
public void Say(IErpResult result, object tag) { string tagString = string.Empty; tagString = this.SerializeTag(tag); this.EventAggregator.GetEvent<ReplyToChannelEvent>().Publish(new ReplyToChannelEventArgs { Mode = (ConversationType)this.Mode, Reply = result, TagString = tagString, Tag = tag, ConversationId = this.ConversationId, Callback = this.Callback, UserId = this.ConversationUser.Id, }); }