private void OnTracking(Tracking model)
 {
     Console.WriteLine(model.ToString());
 }
Ejemplo n.º 2
0
 public HttpResponseMessage SendTracking(string messageId = "1111", string mailingId = "1111", string address = "*****@*****.**")
 {
     var tracking = new Tracking()
     {
         DateTime = DateTime.Now,
         MailingId = mailingId,
         MessageId = messageId,
         Address = address,
         ServerId = ServerId,
         SecretKey = SecretKey,
         ClientIp = "127.0.01",
         TrackingType = 0,
         Url = "http://www.socketlabs.com",
         UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36"
     };
     return _client.PostAsync("/api/EmailEvent/", tracking.ToEncodedContent()).Result;
 }