summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--SendGrid/Example/Program.cs8
-rw-r--r--SendGrid/SendGridMail/SendGrid.cs9
-rw-r--r--SendGrid/Tests/TestSendgrid.cs18
4 files changed, 20 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index 78f2930..2892e7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,5 @@ SendGrid/test-results/
.DS_store
SendGrid/SendGrid.userprefs
SendGrid/packages/
+SendGrid/TestResult.xml
+SendGrid/SendGrid.sln.VisualState.xml
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs
index aa8a5a9..113e3f5 100644
--- a/SendGrid/Example/Program.cs
+++ b/SendGrid/Example/Program.cs
@@ -13,14 +13,14 @@ namespace Example
{
// Create the email object first, then add the properties.
var myMessage = new SendGridMessage();
- myMessage.AddTo("anna@example.com");
+ myMessage.AddTo("anna@example.com");
myMessage.From = new MailAddress("john@example.com", "John Smith");
myMessage.Subject = "Testing the SendGrid Library";
myMessage.Text = "Hello World! %tag%";
- var subs = new List<String> { "私は%type%ラーメンが大好き" };
- myMessage.AddSubstitution("%tag%",subs);
- myMessage.AddSection("%type%", "とんこつ");
+ var subs = new List<String> { "私は%type%ラーメンが大好き" };
+ myMessage.AddSubstitution("%tag%",subs);
+ myMessage.AddSection("%type%", "とんこつ");
SendAsync(myMessage);
diff --git a/SendGrid/SendGridMail/SendGrid.cs b/SendGrid/SendGridMail/SendGrid.cs
index ef8f8df..6a3dceb 100644
--- a/SendGrid/SendGridMail/SendGrid.cs
+++ b/SendGrid/SendGridMail/SendGrid.cs
@@ -221,10 +221,11 @@ namespace SendGrid
//let the system complain if they do something bad, since the function returns null
Header.AddSubstitution(replacementTag, substitutionValues);
}
- public void AddSection(String relacementTag, String sectionValue)
- {
- Header.AddSection(relacementTag, sectionValue);
- }
+
+ public void AddSection(String relacementTag, String sectionValue)
+ {
+ Header.AddSection(relacementTag, sectionValue);
+ }
public void AddUniqueArgs(IDictionary<String, String> identifiers)
{
diff --git a/SendGrid/Tests/TestSendgrid.cs b/SendGrid/Tests/TestSendgrid.cs
index 400c64f..dfd4c73 100644
--- a/SendGrid/Tests/TestSendgrid.cs
+++ b/SendGrid/Tests/TestSendgrid.cs
@@ -347,16 +347,16 @@ namespace Tests
Assert.AreEqual("{\"filters\" : {\"opentrack\" : {\"settings\" : {\"enable\" : \"0\"}}}}", json);
}
- [Test]
- public void TestAddSection()
- {
- var header = new Header();
- var sendgrid = new SendGridMessage(header);
+ [Test]
+ public void TestAddSection()
+ {
+ var header = new Header();
+ var sendgrid = new SendGridMessage(header);
- sendgrid.AddSection("tag", "value");
+ sendgrid.AddSection("tag", "value");
- var json = header.JsonString();
- Assert.AreEqual("{\"section\" : {\"tag\" : \"value\"}}", json);
- }
+ var json = header.JsonString();
+ Assert.AreEqual("{\"section\" : {\"tag\" : \"value\"}}", json);
+ }
}
} \ No newline at end of file