From 30bce3358b027e1e81c563987a32cd61492fe802 Mon Sep 17 00:00:00 2001 From: John Tomlinson Date: Tue, 23 Feb 2021 17:46:48 +0000 Subject: [PATCH] Added an Xml Input Textarea to teh Results screen which displays the xml that the user entered on the input screen. * The xml input text area is displayed below the Results text area on the Results screen --- Xml2CSharp.Web/Home.cs | 3 ++- Xml2CSharp.Web/result.cshtml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Xml2CSharp.Web/Home.cs b/Xml2CSharp.Web/Home.cs index 771a847..4e19b25 100644 --- a/Xml2CSharp.Web/Home.cs +++ b/Xml2CSharp.Web/Home.cs @@ -22,7 +22,7 @@ public Home() var stringWriter = new StringWriter(); classInfoWriter.Write(stringWriter); - return View["result", new ConvertResponse { CSharpCode = stringWriter.ToString() }]; + return View["result", new ConvertResponse { XmlInput = xml, CSharpCode = stringWriter.ToString() }]; }; } @@ -30,6 +30,7 @@ public Home() public class ConvertResponse { + public string XmlInput { get; set; } public string CSharpCode { get; set; } } } \ No newline at end of file diff --git a/Xml2CSharp.Web/result.cshtml b/Xml2CSharp.Web/result.cshtml index 83ec739..523413e 100644 --- a/Xml2CSharp.Web/result.cshtml +++ b/Xml2CSharp.Web/result.cshtml @@ -8,5 +8,8 @@ +

Xml

- +
+ +