public static void ProcessNotification(CommonEventStructureType notification)
        {
            string filePath = System.Configuration.ConfigurationManager.AppSettings["filePath"];
            string fileName = System.Configuration.ConfigurationManager.AppSettings["fileName"];
            string target   = string.Format("{0}/{1}", filePath, fileName);

            string soapEnvelope = SerializeToXML(notification);

            if (!File.Exists(target))
            {
                using (StreamWriter sw = File.CreateText(target))
                {
                    sw.WriteLine(soapEnvelope);
                }
            }
            else
            {
                using (StreamWriter sw = File.AppendText(target))
                {
                    sw.WriteLine(soapEnvelope);
                }
            }
        }
Example #2
0
 public void Notify(CommonEventStructureType notification)
 {
     NotificationProcessor.ProcessNotification(notification);
 }