some body text
", true) 102 | .PlaintextAlternativeBody("Test - Some body text"); 103 | 104 | var response = await email.SendAsync(); 105 | 106 | Assert.IsTrue(response.Successful); 107 | } 108 | 109 | [Test] 110 | public void CanSendHtmlAndPlaintextTogether() 111 | { 112 | var email = Email 113 | .From(fromEmail) 114 | .To(toEmail) 115 | .Body("some body text
", true) 116 | .PlaintextAlternativeBody("Test - Some body text"); 117 | 118 | var response = email.Send(); 119 | 120 | Assert.IsTrue(response.Successful); 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /test/FluentEmail.Core.Tests/MailgunSenderTests.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading.Tasks; 3 | using FluentEmail.Core; 4 | using FluentEmail.Core.Models; 5 | using NUnit.Framework; 6 | using Newtonsoft.Json; 7 | 8 | namespace FluentEmail.Mailgun.Tests 9 | { 10 | public class MailgunSenderTests 11 | { 12 | const string toEmail = "bentest1@mailinator.com"; 13 | const string fromEmail = "ben@test.com"; 14 | const string subject = "Attachment Tests"; 15 | const string body = "This email is testing the attachment functionality of MailGun."; 16 | 17 | [SetUp] 18 | public void SetUp() 19 | { 20 | var sender = new MailgunSender("sandboxcf5f41bbf2f84f15a386c60e253b5fe9.mailgun.org", "key-8d32c046d7f14ada8d5ba8253e3e30de"); 21 | Email.DefaultSender = sender; 22 | } 23 | 24 | [Test] 25 | public async Task CanSendEmail() 26 | { 27 | var email = Email 28 | .From(fromEmail) 29 | .To(toEmail) 30 | .Subject(subject) 31 | .Body(body); 32 | 33 | var response = await email.SendAsync(); 34 | 35 | Assert.IsTrue(response.Successful); 36 | } 37 | 38 | [Test] 39 | public async Task GetMessageIdInResponse() 40 | { 41 | var email = Email 42 | .From(fromEmail) 43 | .To(toEmail) 44 | .Subject(subject) 45 | .Body(body); 46 | 47 | var response = await email.SendAsync(); 48 | 49 | Assert.IsTrue(response.Successful); 50 | Assert.IsNotEmpty(response.MessageId); 51 | } 52 | 53 | [Test] 54 | public async Task CanSendEmailWithTag() 55 | { 56 | var email = Email 57 | .From(fromEmail) 58 | .To(toEmail) 59 | .Subject(subject) 60 | .Body(body) 61 | .Tag("test"); 62 | 63 | var response = await email.SendAsync(); 64 | 65 | Assert.IsTrue(response.Successful); 66 | } 67 | 68 | [Test] 69 | public async Task CanSendEmailWithVariables() 70 | { 71 | var email = Email 72 | .From(fromEmail) 73 | .To(toEmail) 74 | .Subject(subject) 75 | .Body(body) 76 | .Header("X-Mailgun-Variables", JsonConvert.SerializeObject(new Variable { Var1 = "Test"})); 77 | 78 | var response = await email.SendAsync(); 79 | 80 | Assert.IsTrue(response.Successful); 81 | } 82 | 83 | [Test] 84 | public async Task CanSendEmailWithAttachments() 85 | { 86 | var stream = new MemoryStream(); 87 | var sw = new StreamWriter(stream); 88 | sw.WriteLine("Hey this is some text in an attachment"); 89 | sw.Flush(); 90 | stream.Seek(0, SeekOrigin.Begin); 91 | 92 | var attachment = new Attachment 93 | { 94 | Data = stream, 95 | ContentType = "text/plain", 96 | Filename = "mailgunTest.txt" 97 | }; 98 | 99 | var email = Email 100 | .From(fromEmail) 101 | .To(toEmail) 102 | .Subject(subject) 103 | .Body(body) 104 | .Attach(attachment); 105 | 106 | var response = await email.SendAsync(); 107 | 108 | Assert.IsTrue(response.Successful); 109 | } 110 | 111 | [Test] 112 | public async Task CanSendEmailWithInlineImages() 113 | { 114 | using (var stream = File.OpenRead($"{Path.Combine(Directory.GetCurrentDirectory(), "logotest.png")}")) 115 | { 116 | var attachment = new Attachment 117 | { 118 | IsInline = true, 119 | Data = stream, 120 | ContentType = "image/png", 121 | Filename = "logotest.png" 122 | }; 123 | 124 | var email = Email 125 | .From(fromEmail) 126 | .To(toEmail) 127 | .Subject(subject) 128 | .Body("Inline image here:You should see an image without an attachment, or without a download prompt, depending on the email client.
", true) 130 | .Attach(attachment); 131 | 132 | var response = await email.SendAsync(); 133 | 134 | Assert.IsTrue(response.Successful); 135 | } 136 | } 137 | 138 | class Variable 139 | { 140 | public string Var1 { get; set; } 141 | } 142 | } 143 | } -------------------------------------------------------------------------------- /test/FluentEmail.Core.Tests/MailtrapSenderTests.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading.Tasks; 3 | using FluentEmail.Core; 4 | using FluentEmail.Core.Models; 5 | using NUnit.Framework; 6 | 7 | namespace FluentEmail.Mailtrap.Tests 8 | { 9 | public class MailtrapSenderTests 10 | { 11 | const string toEmail = "testto.fluentemail@mailinator.com"; 12 | const string fromEmail = "testfrom.fluentemail@mailinator.com"; 13 | const string subject = "Mailtrap Email Test"; 14 | const string body = "This email is testing the functionality of mailtrap."; 15 | const string username = ""; // Mailtrap SMTP inbox username 16 | const string password = ""; // Mailtrap SMTP inbox password 17 | 18 | [SetUp] 19 | public void SetUp() 20 | { 21 | var sender = new MailtrapSender(username, password); 22 | Email.DefaultSender = sender; 23 | } 24 | 25 | [Test, Ignore("Missing credentials")] 26 | public void CanSendEmail() 27 | { 28 | var email = Email 29 | .From(fromEmail) 30 | .To(toEmail) 31 | .Subject(subject) 32 | .Body(body); 33 | 34 | var response = email.Send(); 35 | 36 | Assert.IsTrue(response.Successful); 37 | } 38 | 39 | 40 | [Test, Ignore("Missing credentials")] 41 | public async Task CanSendEmailAsync() 42 | { 43 | var email = Email 44 | .From(fromEmail) 45 | .To(toEmail) 46 | .Subject(subject) 47 | .Body(body); 48 | 49 | var response = await email.SendAsync(); 50 | 51 | Assert.IsTrue(response.Successful); 52 | } 53 | 54 | [Test, Ignore("Missing credentials")] 55 | public async Task CanSendEmailWithAttachments() 56 | { 57 | var stream = new MemoryStream(); 58 | var sw = new StreamWriter(stream); 59 | sw.WriteLine("Hey this is some text in an attachment"); 60 | sw.Flush(); 61 | stream.Seek(0, SeekOrigin.Begin); 62 | 63 | var attachment = new Attachment 64 | { 65 | Data = stream, 66 | ContentType = "text/plain", 67 | Filename = "mailtrapTest.txt" 68 | }; 69 | 70 | var email = Email 71 | .From(fromEmail) 72 | .To(toEmail) 73 | .Subject(subject) 74 | .Body(body) 75 | .Attach(attachment); 76 | 77 | var response = await email.SendAsync(); 78 | 79 | Assert.IsTrue(response.Successful); 80 | } 81 | 82 | [Test, Ignore("Missing credentials")] 83 | public async Task CanSendEmailWithInlineImages() 84 | { 85 | using (var stream = File.OpenRead($"{Path.Combine(Directory.GetCurrentDirectory(), "logotest.png")}")) 86 | { 87 | var attachment = new Attachment 88 | { 89 | IsInline = true, 90 | Data = stream, 91 | ContentType = "image/png", 92 | Filename = "logotest.png" 93 | }; 94 | 95 | var email = Email 96 | .From(fromEmail) 97 | .To(toEmail) 98 | .Subject(subject) 99 | .Body("Inline image here:You should see an image without an attachment, or without a download prompt, depending on the email client.
", true) 101 | .Attach(attachment); 102 | 103 | var response = await email.SendAsync(); 104 | 105 | Assert.IsTrue(response.Successful); 106 | } 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /test/FluentEmail.Core.Tests/SendGridSenderTests.cs: -------------------------------------------------------------------------------- 1 | using FluentEmail.Core; 2 | using NUnit.Framework; 3 | using System; 4 | using System.IO; 5 | using System.Threading.Tasks; 6 | using Attachment = FluentEmail.Core.Models.Attachment; 7 | 8 | namespace FluentEmail.SendGrid.Tests 9 | { 10 | public class SendGridSenderTests 11 | { 12 | const string apiKey = "missing-credentials"; // TODO: Put your API key here 13 | 14 | const string toEmail = "fluentEmail@mailinator.com"; 15 | const string toName = "FluentEmail Mailinator"; 16 | const string fromEmail = "test@fluentmail.com"; 17 | const string fromName = "SendGridSender Test"; 18 | 19 | [SetUp] 20 | public void SetUp() 21 | { 22 | if (string.IsNullOrWhiteSpace(apiKey)) throw new ArgumentException("SendGrid Api Key needs to be supplied"); 23 | 24 | var sender = new SendGridSender(apiKey, true); 25 | Email.DefaultSender = sender; 26 | } 27 | 28 | [Test, Ignore("No sendgrid credentials")] 29 | public async Task CanSendEmail() 30 | { 31 | const string subject = "SendMail Test"; 32 | const string body = "This email is testing send mail functionality of SendGrid Sender."; 33 | 34 | var email = Email 35 | .From(fromEmail, fromName) 36 | .To(toEmail, toName) 37 | .Subject(subject) 38 | .Body(body); 39 | 40 | var response = await email.SendAsync(); 41 | 42 | Assert.IsTrue(response.Successful); 43 | } 44 | 45 | [Test, Ignore("No sendgrid credentials")] 46 | public async Task CanSendTemplateEmail() 47 | { 48 | const string subject = "SendMail Test"; 49 | const string templateId = "123456-insert-your-own-id-here"; 50 | object templateData = new 51 | { 52 | Name = toName, 53 | ArbitraryValue = "The quick brown fox jumps over the lazy dog." 54 | }; 55 | 56 | var email = Email 57 | .From(fromEmail, fromName) 58 | .To(toEmail, toName) 59 | .Subject(subject); 60 | 61 | var response = await email.SendWithTemplateAsync(templateId, templateData); 62 | 63 | Assert.IsTrue(response.Successful); 64 | } 65 | 66 | [Test, Ignore("No sendgrid credentials")] 67 | public async Task CanSendEmailWithReplyTo() 68 | { 69 | const string subject = "SendMail Test"; 70 | const string body = "This email is testing send mail with ReplyTo functionality of SendGrid Sender."; 71 | 72 | var email = Email 73 | .From(fromEmail, fromName) 74 | .To(toEmail, toName) 75 | .ReplyTo(toEmail, toName) 76 | .Subject(subject) 77 | .Body(body); 78 | 79 | var response = await email.SendAsync(); 80 | 81 | Assert.IsTrue(response.Successful); 82 | } 83 | 84 | [Test, Ignore("No sendgrid credentials")] 85 | public async Task CanSendEmailWithCategory() 86 | { 87 | const string subject = "SendMail Test"; 88 | const string body = "This email is testing send mail with Categories functionality of SendGrid Sender."; 89 | 90 | var email = Email 91 | .From(fromEmail, fromName) 92 | .To(toEmail, toName) 93 | .ReplyTo(toEmail, toName) 94 | .Subject(subject) 95 | .Tag("TestCategory") 96 | .Body(body); 97 | 98 | var response = await email.SendAsync(); 99 | 100 | Assert.IsTrue(response.Successful); 101 | } 102 | 103 | [Test, Ignore("No sendgrid credentials")] 104 | public async Task CanSendEmailWithAttachments() 105 | { 106 | const string subject = "SendMail With Attachments Test"; 107 | const string body = "This email is testing the attachment functionality of SendGrid Sender."; 108 | 109 | using (var stream = File.OpenRead($"{Directory.GetCurrentDirectory()}/test-binary.xlsx")) 110 | { 111 | var attachment = new Attachment 112 | { 113 | Data = stream, 114 | ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 115 | Filename = "test-binary.xlsx" 116 | }; 117 | 118 | var email = Email 119 | .From(fromEmail, fromName) 120 | .To(toEmail, toName) 121 | .Subject(subject) 122 | .Body(body) 123 | .Attach(attachment); 124 | 125 | 126 | var response = await email.SendAsync(); 127 | 128 | Assert.IsTrue(response.Successful); 129 | } 130 | } 131 | 132 | [Test, Ignore("No sendgrid credentials")] 133 | public async Task CanSendHighPriorityEmail() 134 | { 135 | const string subject = "SendMail Test"; 136 | const string body = "This email is testing send mail functionality of SendGrid Sender."; 137 | 138 | var email = Email 139 | .From(fromEmail, fromName) 140 | .To(toEmail, toName) 141 | .Subject(subject) 142 | .Body(body) 143 | .HighPriority(); 144 | 145 | var response = await email.SendAsync(); 146 | 147 | Assert.IsTrue(response.Successful); 148 | } 149 | 150 | [Test, Ignore("No sendgrid credentials")] 151 | public async Task CanSendLowPriorityEmail() 152 | { 153 | const string subject = "SendMail Test"; 154 | const string body = "This email is testing send mail functionality of SendGrid Sender."; 155 | 156 | var email = Email 157 | .From(fromEmail, fromName) 158 | .To(toEmail, toName) 159 | .Subject(subject) 160 | .Body(body) 161 | .LowPriority(); 162 | 163 | var response = await email.SendAsync(); 164 | 165 | Assert.IsTrue(response.Successful); 166 | } 167 | } 168 | } -------------------------------------------------------------------------------- /test/FluentEmail.Core.Tests/SmtpSenderTests.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Net.Mail; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | using FluentEmail.Core; 6 | using NUnit.Framework; 7 | using Attachment = FluentEmail.Core.Models.Attachment; 8 | 9 | namespace FluentEmail.Smtp.Tests 10 | { 11 | [NonParallelizable] 12 | public class SmtpSenderTests 13 | { 14 | // Warning: To pass, an smtp listener must be running on localhost:25. 15 | 16 | const string toEmail = "bob@test.com"; 17 | const string fromEmail = "johno@test.com"; 18 | const string subject = "sup dawg"; 19 | const string body = "what be the hipitity hap?"; 20 | 21 | private static IFluentEmail TestEmail => Email 22 | .From(fromEmail) 23 | .To(toEmail) 24 | .Subject(subject) 25 | .Body(body); 26 | 27 | private readonly string tempDirectory; 28 | 29 | public SmtpSenderTests() 30 | { 31 | tempDirectory = Path.Combine(Path.GetTempPath(), "EmailTest"); 32 | } 33 | 34 | [SetUp] 35 | public void SetUp() 36 | { 37 | var sender = new SmtpSender(() => new SmtpClient("localhost") 38 | { 39 | EnableSsl = false, 40 | DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory, 41 | PickupDirectoryLocation = tempDirectory 42 | }); 43 | 44 | Email.DefaultSender = sender; 45 | Directory.CreateDirectory(tempDirectory); 46 | } 47 | 48 | [TearDown] 49 | public void TearDown() 50 | { 51 | Directory.Delete(tempDirectory, true); 52 | } 53 | 54 | [Test] 55 | public void CanSendEmail() 56 | { 57 | var email = TestEmail 58 | .Body("some body text
", true) 98 | .PlaintextAlternativeBody("Test - Some body text"); 99 | 100 | var response = await email.SendAsync(); 101 | 102 | Assert.IsTrue(response.Successful); 103 | } 104 | 105 | [Test] 106 | public void CanSendHtmlAndPlaintextTogether() 107 | { 108 | var email = TestEmail 109 | .Body("some body text
", true) 110 | .PlaintextAlternativeBody("Test - Some body text"); 111 | 112 | var response = email.Send(); 113 | 114 | Assert.IsTrue(response.Successful); 115 | } 116 | 117 | [Test] 118 | public void CancelSendIfCancelationRequested() 119 | { 120 | var email = TestEmail; 121 | 122 | var tokenSource = new CancellationTokenSource(); 123 | tokenSource.Cancel(); 124 | 125 | var response = email.Send(tokenSource.Token); 126 | 127 | Assert.IsFalse(response.Successful); 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /test/FluentEmail.Core.Tests/TemplateEmailTests.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using System.IO; 3 | using System.Reflection; 4 | using System.Threading.Tasks; 5 | using FluentEmail.Core.Defaults; 6 | using FluentEmail.Core.Interfaces; 7 | using NUnit.Framework; 8 | 9 | namespace FluentEmail.Core.Tests 10 | { 11 | [TestFixture] 12 | public class TemplateEmailTests 13 | { 14 | private Assembly ThisAssembly() => this.GetType().GetTypeInfo().Assembly; 15 | const string toEmail = "bob@test.com"; 16 | const string fromEmail = "johno@test.com"; 17 | const string subject = "sup dawg"; 18 | 19 | [Test] 20 | public void Anonymous_Model_Template_From_File_Matches() 21 | { 22 | var email = Email 23 | .From(fromEmail) 24 | .To(toEmail) 25 | .Subject(subject) 26 | .UsingTemplateFromFile($"{Path.Combine(Directory.GetCurrentDirectory(), "test.txt")}", new { Test = "FLUENTEMAIL" }); 27 | 28 | Assert.AreEqual("yo email FLUENTEMAIL", email.Data.Body); 29 | } 30 | 31 | [Test] 32 | public void Using_Template_From_Not_Existing_Culture_File_Using_Default_Template() 33 | { 34 | var culture = new CultureInfo("fr-FR"); 35 | var email = Email 36 | .From(fromEmail) 37 | .To(toEmail) 38 | .Subject(subject) 39 | .UsingCultureTemplateFromFile($"{Path.Combine(Directory.GetCurrentDirectory(), "test.txt")}", new { Test = "FLUENTEMAIL", culture }, culture); 40 | 41 | Assert.AreEqual("yo email FLUENTEMAIL", email.Data.Body); 42 | } 43 | 44 | [Test] 45 | public void Using_Template_From_Culture_File() 46 | { 47 | var culture = new CultureInfo("he-IL"); 48 | var email = Email 49 | .From(fromEmail) 50 | .To(toEmail) 51 | .Subject(subject) 52 | .UsingCultureTemplateFromFile($"{Path.Combine(Directory.GetCurrentDirectory(), "test.txt")}", new { Test = "FLUENTEMAIL" }, culture); 53 | 54 | Assert.AreEqual("hebrew email FLUENTEMAIL", email.Data.Body); 55 | } 56 | 57 | [Test] 58 | public void Using_Template_From_Current_Culture_File() 59 | { 60 | var culture = new CultureInfo("he-IL"); 61 | var email = Email 62 | .From(fromEmail) 63 | .To(toEmail) 64 | .Subject(subject) 65 | .UsingCultureTemplateFromFile($"{Path.Combine(Directory.GetCurrentDirectory(), "test.txt")}", new {Test = "FLUENTEMAIL"}, culture); 66 | 67 | Assert.AreEqual("hebrew email FLUENTEMAIL", email.Data.Body); 68 | } 69 | 70 | [Test] 71 | public void Anonymous_Model_Template_Matches() 72 | { 73 | string template = "sup ##Name##"; 74 | 75 | var email = Email 76 | .From(fromEmail) 77 | .To(toEmail) 78 | .Subject(subject) 79 | .UsingTemplate(template, new { Name = "LUKE" }); 80 | 81 | Assert.AreEqual("sup LUKE", email.Data.Body); 82 | } 83 | 84 | 85 | 86 | [Test] 87 | public void Set_Custom_Template() 88 | { 89 | string template = "sup ##Name## here is a list @foreach(var i in Model.Numbers) { @i }"; 90 | 91 | var email = Email 92 | .From(fromEmail) 93 | .To(toEmail) 94 | .Subject(subject) 95 | .UsingTemplateEngine(new TestTemplate()) 96 | .UsingTemplate(template, new { Name = "LUKE", Numbers = new string[] { "1", "2", "3" } }); 97 | 98 | Assert.AreEqual("custom template", email.Data.Body); 99 | } 100 | 101 | [Test] 102 | public void Using_Template_From_Embedded_Resource() 103 | { 104 | var email = Email 105 | .From(fromEmail) 106 | .To(toEmail) 107 | .Subject(subject) 108 | .UsingTemplateFromEmbedded("FluentEmail.Core.Tests.test-embedded.txt", new { Test = "EMBEDDEDTEST" }, ThisAssembly()); 109 | 110 | Assert.AreEqual("yo email EMBEDDEDTEST", email.Data.Body); 111 | } 112 | 113 | [Test] 114 | public void New_Anonymous_Model_Template_From_File_Matches() 115 | { 116 | var email = new Email(fromEmail) 117 | .To(toEmail) 118 | .Subject(subject) 119 | .UsingTemplateFromFile($"{Path.Combine(Directory.GetCurrentDirectory(), "test.txt")}", new { Test = "FLUENTEMAIL" }); 120 | 121 | Assert.AreEqual("yo email FLUENTEMAIL", email.Data.Body); 122 | } 123 | 124 | [Test] 125 | public void New_Using_Template_From_Not_Existing_Culture_File_Using_Default_Template() 126 | { 127 | var culture = new CultureInfo("fr-FR"); 128 | var email = new Email(fromEmail) 129 | .To(toEmail) 130 | .Subject(subject) 131 | .UsingCultureTemplateFromFile($"{Path.Combine(Directory.GetCurrentDirectory(), "test.txt")}", new { Test = "FLUENTEMAIL", culture }, culture); 132 | 133 | Assert.AreEqual("yo email FLUENTEMAIL", email.Data.Body); 134 | } 135 | 136 | [Test] 137 | public void New_Using_Template_From_Culture_File() 138 | { 139 | var culture = new CultureInfo("he-IL"); 140 | var email = new Email(fromEmail) 141 | .To(toEmail) 142 | .Subject(subject) 143 | .UsingCultureTemplateFromFile($"{Path.Combine(Directory.GetCurrentDirectory(), "test.txt")}", new { Test = "FLUENTEMAIL" }, culture); 144 | 145 | Assert.AreEqual("hebrew email FLUENTEMAIL", email.Data.Body); 146 | } 147 | 148 | [Test] 149 | public void New_Using_Template_From_Current_Culture_File() 150 | { 151 | var culture = new CultureInfo("he-IL"); 152 | var email = new Email(fromEmail) 153 | .To(toEmail) 154 | .Subject(subject) 155 | .UsingCultureTemplateFromFile($"{Path.Combine(Directory.GetCurrentDirectory(), "test.txt")}", new {Test = "FLUENTEMAIL"}, culture); 156 | 157 | Assert.AreEqual("hebrew email FLUENTEMAIL", email.Data.Body); 158 | } 159 | 160 | 161 | 162 | [Test] 163 | public void New_Set_Custom_Template() 164 | { 165 | string template = "sup @Model.Name here is a list @foreach(var i in Model.Numbers) { @i }"; 166 | 167 | var email = new Email(new TestTemplate(), new SaveToDiskSender("/"), fromEmail) 168 | .To(toEmail) 169 | .Subject(subject) 170 | .UsingTemplate(template, new { Name = "LUKE", Numbers = new string[] { "1", "2", "3" } }); 171 | 172 | Assert.AreEqual("custom template", email.Data.Body); 173 | } 174 | 175 | [Test] 176 | public void New_Using_Template_From_Embedded_Resource() 177 | { 178 | var email = new Email(fromEmail) 179 | .To(toEmail) 180 | .Subject(subject) 181 | .UsingTemplateFromEmbedded("FluentEmail.Core.Tests.test-embedded.txt", new { Test = "EMBEDDEDTEST" }, ThisAssembly()); 182 | 183 | Assert.AreEqual("yo email EMBEDDEDTEST", email.Data.Body); 184 | } 185 | } 186 | 187 | public class TestTemplate : ITemplateRenderer 188 | { 189 | public string Parse