summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xSendGrid/SendGrid.suobin34816 -> 39936 bytes
-rwxr-xr-xSendGrid/SendGrid/Header.cs56
-rwxr-xr-xSendGrid/SendGrid/ISendGrid.cs4
-rwxr-xr-xSendGrid/SendGrid/Mail.csproj2
-rwxr-xr-xSendGrid/SendGrid/SendGrid.cs301
-rwxr-xr-xSendGrid/SendGrid/Transport/ITransport.cs7
-rwxr-xr-xSendGrid/Tests/TestHeader.cs25
-rwxr-xr-xSendGrid/Tests/Tests.csproj7
8 files changed, 393 insertions, 9 deletions
diff --git a/SendGrid/SendGrid.suo b/SendGrid/SendGrid.suo
index 9a82799..1b103bc 100755
--- a/SendGrid/SendGrid.suo
+++ b/SendGrid/SendGrid.suo
Binary files differ
diff --git a/SendGrid/SendGrid/Header.cs b/SendGrid/SendGrid/Header.cs
new file mode 100755
index 0000000..42a538f
--- /dev/null
+++ b/SendGrid/SendGrid/Header.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Mail;
+using System.Text;
+
+namespace SendGrid
+{
+ public class Header : IHeader
+ {
+ public void AddTo(IEnumerable<string> recipients)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddSubVal(string tag, IEnumerable<string> substitutions)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddUniqueIdentifier(IDictionary<string, string> identifiers)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SetCategory(string category)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Enable(string filter)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Disable(string filter)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddFilterSetting(string filter, IEnumerable<string> settings, string value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddHeader(MailMessage mime)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AsJson()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SendGrid/SendGrid/ISendGrid.cs b/SendGrid/SendGrid/ISendGrid.cs
index e5d3226..20e7114 100755
--- a/SendGrid/SendGrid/ISendGrid.cs
+++ b/SendGrid/SendGrid/ISendGrid.cs
@@ -14,7 +14,7 @@ namespace SendGrid
String Cc { get; set; }
String Bcc { get; set; }
String Subject { get; set; }
- String Headers { get; set; }
+ IHeader Header { get; set; }
String Html { get; set; }
String Text { get; set; }
String Transport { get; set; }
@@ -59,8 +59,6 @@ namespace SendGrid
#endregion
#region SMTP API Functions
- IHeader Header();
-
void DisableGravatar();
void DisableOpenTracking();
void DisableClickTracking();
diff --git a/SendGrid/SendGrid/Mail.csproj b/SendGrid/SendGrid/Mail.csproj
index 141d232..d6b0d55 100755
--- a/SendGrid/SendGrid/Mail.csproj
+++ b/SendGrid/SendGrid/Mail.csproj
@@ -41,9 +41,11 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="Header.cs" />
<Compile Include="IHeader.cs" />
<Compile Include="ISendGrid.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="SendGrid.cs" />
<Compile Include="Transport\ITransport.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
diff --git a/SendGrid/SendGrid/SendGrid.cs b/SendGrid/SendGrid/SendGrid.cs
new file mode 100755
index 0000000..966dc6d
--- /dev/null
+++ b/SendGrid/SendGrid/SendGrid.cs
@@ -0,0 +1,301 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Mail;
+using System.Text;
+
+namespace SendGrid
+{
+ public class SendGrid : ISendGrid
+ {
+ public SendGrid(IHeader header)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string From
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string To
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Cc
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Bcc
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Subject
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public IHeader Header
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Html
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Text
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Transport
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Date
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public MailMessage CreateMimeMessage()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddTo(string address)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddTo(IEnumerable<string> addresses)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddTo(IDictionary<string, string> addresssInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddTo(IEnumerable<IDictionary<string, string>> addressesInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddCc(string address)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddCc(IEnumerable<string> addresses)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddCc(IDictionary<string, string> addresssInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddCc(IEnumerable<IDictionary<string, string>> addressesInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddBcc(string address)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddBcc(IEnumerable<string> addresses)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddBcc(IDictionary<string, string> addresssInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddBcc(IEnumerable<IDictionary<string, string>> addressesInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddRcpts(string address)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddRcpts(IEnumerable<string> addresses)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddRcpts(IDictionary<string, string> addresssInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddRcpts(IEnumerable<IDictionary<string, string>> addressesInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddSubVal(string tag, string value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddAttachment(string filePath)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddAttachment(Attachment attachment)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string GetMailFrom()
+ {
+ throw new NotImplementedException();
+ }
+
+ public IEnumerable<string> GetRecipients()
+ {
+ throw new NotImplementedException();
+ }
+
+ public string Get(string field)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Set(string field, string value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableGravatar()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableOpenTracking()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableClickTracking()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableSpamCheck()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableUnsubscribe()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableFooter()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableGoogleAnalytics()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableTemplate()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableBcc()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableBipassListManaement()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableGravatar()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableOpenTracking()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableClickTracking(string text = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableSpamCheck(int score = 5, string url = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableUnsubscribe(string text, string html, string replace, string url, string landing)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableFooter(string text = null, string html = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableGoogleAnalytics(string source, string medium, string term, string content = null, string campaign = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableTemplate(string html = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableBcc(string email = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableBipassListManaement()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Mail()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SendGrid/SendGrid/Transport/ITransport.cs b/SendGrid/SendGrid/Transport/ITransport.cs
index 97ebdb6..92557b1 100755
--- a/SendGrid/SendGrid/Transport/ITransport.cs
+++ b/SendGrid/SendGrid/Transport/ITransport.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace SendGrid.Transport
+namespace SendGrid.Transport
{
public interface ITransport
{
diff --git a/SendGrid/Tests/TestHeader.cs b/SendGrid/Tests/TestHeader.cs
new file mode 100755
index 0000000..323e394
--- /dev/null
+++ b/SendGrid/Tests/TestHeader.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Moq;
+using NUnit.Framework;
+using SendGrid;
+
+namespace Tests
+{
+ [TestFixture]
+ public class TestHeader
+ {
+ [Test]
+ public void TestAddTo()
+ {
+ var foo = new Mock<IHeader>();
+ foo.Setup(m => m.Enable("foo"));
+
+ var bar = new SendGrid.SendGrid(foo.Object);
+ Assert.AreEqual(1, 2, "I suck");
+
+ }
+ }
+}
diff --git a/SendGrid/Tests/Tests.csproj b/SendGrid/Tests/Tests.csproj
index 5f8d402..0fcdc86 100755
--- a/SendGrid/Tests/Tests.csproj
+++ b/SendGrid/Tests/Tests.csproj
@@ -52,11 +52,18 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="TestHeader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\SendGrid\Mail.csproj">
+ <Project>{3C687BEF-FF50-44AD-8315-2D4237281AF8}</Project>
+ <Name>Mail</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.