public static void Main(string[] args) { IFactory <AlertType, Severity> factory = new DialogFactory(); IDialog dialog = factory.CreateDialog(AlertType.Warning, Severity.High); System.Console.WriteLine(dialog.Title); System.Console.WriteLine(dialog.Content); System.Console.ReadLine(); }
/// <summary> /// POST: api/Messages /// Receive a message from a user and reply to it /// </summary> public async Task <HttpResponseMessage> Post([FromBody] Activity activity) { if (activity.Type == ActivityTypes.Message) { await Conversation.SendAsync(activity, () => DialogFactory.CreateDialog()); } else { HandleSystemMessage(activity); } var response = Request.CreateResponse(HttpStatusCode.OK); return(response); }