Ejemplo n.º 1
0
        void ITrackingRepository.CreateCommunicationSentTrack(EventMessage message)
        {
            using (var dc = new TrackingDataContext(_connectionFactory.CreateConnection()))
            {
                // Insert an entry for the communication itself.

                InsertCommunication(dc, message);

                // Look for all links.

                var properties = message.GetParameterValue("Properties");
                if (properties is InstrumentationDetails)
                {
                    var tinyUrls = ((InstrumentationDetails)properties).GetValue("TinyUrls");
                    if (tinyUrls is InstrumentationDetails)
                    {
                        foreach (var tinyUrl in (InstrumentationDetails)tinyUrls)
                        {
                            if (tinyUrl.Value is InstrumentationDetails)
                            {
                                InsertCommunicationLink(dc, (InstrumentationDetails)tinyUrl.Value);
                            }
                        }
                    }
                }

                dc.SubmitChanges();
            }
        }
Ejemplo n.º 2
0
 void ITrackingRepository.CreateRequestTrack(EventMessage message)
 {
     using (var dc = new TrackingDataContext(_connectionFactory.CreateConnection()))
     {
         InsertRequest(dc, message);
         dc.SubmitChanges();
     }
 }
Ejemplo n.º 3
0
 void ITrackingRepository.CreateCommunicationLinkClickedTrack(EventMessage message)
 {
     using (var dc = new TrackingDataContext(_connectionFactory.CreateConnection()))
     {
         InsertCommunicationLinkClicked(dc, message);
         dc.SubmitChanges();
     }
 }
Ejemplo n.º 4
0
        void ITrackingRepository.CreateCommunicationLinksTrack(EventMessage message)
        {
            using (var dc = new TrackingDataContext(_connectionFactory.CreateConnection()))
            {
                // Look for all links.

                var tinyUrls = message.GetParameterValue("TinyUrls");
                if (tinyUrls is InstrumentationDetails)
                {
                    foreach (var tinyUrl in (InstrumentationDetails)tinyUrls)
                    {
                        if (tinyUrl.Value is InstrumentationDetails)
                        {
                            InsertCommunicationLink(dc, (InstrumentationDetails)tinyUrl.Value);
                        }
                    }
                }

                dc.SubmitChanges();
            }
        }