Ejemplo n.º 1
0
 private void Deserialize(string configXml)
 {
     if (!String.IsNullOrEmpty(configXml))
     {
         var xmlDoc = new XmlDocument {
             XmlResolver = null
         };
         xmlDoc.LoadXml(configXml);
         foreach (XmlElement xmlItem in xmlDoc.SelectNodes("/EventQueueConfig/PublishedEvents/Event"))
         {
             var oPublishedEvent = new PublishedEvent();
             oPublishedEvent.EventName   = xmlItem.SelectSingleNode("EventName").InnerText;
             oPublishedEvent.Subscribers = xmlItem.SelectSingleNode("Subscribers").InnerText;
             PublishedEvents.Add(oPublishedEvent.EventName, oPublishedEvent);
         }
         foreach (XmlElement xmlItem in xmlDoc.SelectNodes("/EventQueueConfig/EventQueueSubscribers/Subscriber"))
         {
             var oSubscriberInfo = new SubscriberInfo();
             oSubscriberInfo.ID          = xmlItem.SelectSingleNode("ID").InnerText;
             oSubscriberInfo.Name        = xmlItem.SelectSingleNode("Name").InnerText;
             oSubscriberInfo.Address     = xmlItem.SelectSingleNode("Address").InnerText;
             oSubscriberInfo.Description = xmlItem.SelectSingleNode("Description").InnerText;
             oSubscriberInfo.PrivateKey  = xmlItem.SelectSingleNode("PrivateKey").InnerText;
             EventQueueSubscribers.Add(oSubscriberInfo.ID, oSubscriberInfo);
         }
     }
 }
 public EventQueueConfiguration()
 {
     _publishedEvents = new PublishedEvents();
     _eventQueueSubscribers = new EventQueueSubscribers();
 }
Ejemplo n.º 3
0
 public EventQueueConfiguration()
 {
     _publishedEvents       = new PublishedEvents();
     _eventQueueSubscribers = new EventQueueSubscribers();
 }