diff options
author | brandonmwest <brawest@gmail.com> | 2014-02-07 11:30:42 -0700 |
---|---|---|
committer | brandonmwest <brawest@gmail.com> | 2014-02-07 11:30:42 -0700 |
commit | e4a57fc33b188074613b3296f0ec3a614cce9163 (patch) | |
tree | b95b11802bc82fd92c81a3766997c19076508622 /SendGrid/SendGridMail/Utils.cs | |
parent | 96c7b116a9db2d184f07e659b837145ebe10765d (diff) | |
parent | 4eeb055fef43e79d623464f6b3b119943949a98c (diff) | |
download | sendgrid-csharp-e4a57fc33b188074613b3296f0ec3a614cce9163.zip sendgrid-csharp-e4a57fc33b188074613b3296f0ec3a614cce9163.tar.gz sendgrid-csharp-e4a57fc33b188074613b3296f0ec3a614cce9163.tar.bz2 |
Merge pull request #40 from sendgrid/deprecate_smtp
Deprecate smtp
Diffstat (limited to 'SendGrid/SendGridMail/Utils.cs')
-rwxr-xr-x | SendGrid/SendGridMail/Utils.cs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/SendGrid/SendGridMail/Utils.cs b/SendGrid/SendGridMail/Utils.cs deleted file mode 100755 index 0221aa4..0000000 --- a/SendGrid/SendGridMail/Utils.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System;
-using System.Collections.Generic;
-using System.IO;
-using System.IO.Pipes;
-using System.Linq;
-using System.Net;
-using System.Net.Mail;
-using System.Runtime.Serialization.Json;
-using System.Text;
-
-namespace SendGridMail
-{
- public class Utils
- {
- public static string Serialize<T>(T obj)
- {
- var serializer = new DataContractJsonSerializer(obj.GetType());
- using (var stream = new MemoryStream())
- {
- serializer.WriteObject(stream, obj);
- var jsonData = Encoding.UTF8.GetString(stream.ToArray(), 0, (int)stream.Length);
- return jsonData;
- }
- }
-
- public static string SerializeDictionary(IDictionary<String, String> dic)
- {
- return "{"+String.Join(",",dic.Select(kvp => Serialize(kvp.Key) + ":" + Serialize(kvp.Value)))+"}";
- }
- }
-}
|