コード例 #1
0
        private static EventMessageCollection FillMessageCollection(IDataReader dr)
        {
            var arr = new EventMessageCollection();

            try
            {
                EventMessage obj;
                while (dr.Read())
                {
                    //fill business object
                    obj = FillMessage(dr, false);
                    //add to collection
                    arr.Add(obj);
                }
            }
            catch (Exception exc)
            {
                Exceptions.Exceptions.LogException(exc);
            }
            finally
            {
                //close datareader
                CBO.CloseDataReader(dr, true);
            }
            return(arr);
        }
コード例 #2
0
 public EventMessageCollection GetMessages( string eventName )
 {
     EventMessageCollection oEventMessageCollection = new EventMessageCollection();
     string[] EventMessageFiles;
     string EventMessageFile;
     string[] subscribers = new string[0];
     if( EventQueueConfiguration.GetConfig().PublishedEvents[eventName] != null )
     {
         subscribers = EventQueueConfiguration.GetConfig().PublishedEvents[eventName].Subscribers.Split( ";".ToCharArray() );
     }
     else
     {
         subscribers[0] = "";
     }
     for( int indx = 0; indx <= subscribers.Length - 1; indx++ )
     {
         EventMessageFiles = Directory.GetFiles( m_messagePath, MessageName( eventName, subscribers[indx], "*" ) );
         foreach( string tempLoopVar_EventMessageFile in EventMessageFiles )
         {
             EventMessageFile = tempLoopVar_EventMessageFile;
             oEventMessageCollection.Add( DeserializeMessage( EventMessageFile, subscribers[indx] ) );
         }
     }
     return oEventMessageCollection;
 }
コード例 #3
0
        public EventMessageCollection GetMessages(string eventName)
        {
            EventMessageCollection oEventMessageCollection = new EventMessageCollection();

            string[] EventMessageFiles;
            string   EventMessageFile;

            string[] subscribers = new string[0];
            if (EventQueueConfiguration.GetConfig().PublishedEvents[eventName] != null)
            {
                subscribers = EventQueueConfiguration.GetConfig().PublishedEvents[eventName].Subscribers.Split(";".ToCharArray());
            }
            else
            {
                subscribers[0] = "";
            }
            for (int indx = 0; indx <= subscribers.Length - 1; indx++)
            {
                EventMessageFiles = Directory.GetFiles(m_messagePath, MessageName(eventName, subscribers[indx], "*"));
                foreach (string tempLoopVar_EventMessageFile in EventMessageFiles)
                {
                    EventMessageFile = tempLoopVar_EventMessageFile;
                    oEventMessageCollection.Add(DeserializeMessage(EventMessageFile, subscribers[indx]));
                }
            }
            return(oEventMessageCollection);
        }
コード例 #4
0
        public EventMessageCollection GetMessages(string eventName, string subscriberId)
        {
            EventMessageCollection oEventMessageCollection = new EventMessageCollection();

            string[] EventMessageFiles;
            string   EventMessageFile;

            EventMessageFiles = Directory.GetFiles(m_messagePath, MessageName(eventName, subscriberId, "*"));
            foreach (string tempLoopVar_EventMessageFile in EventMessageFiles)
            {
                EventMessageFile = tempLoopVar_EventMessageFile;
                oEventMessageCollection.Add(DeserializeMessage(EventMessageFile, subscriberId));
            }
            return(oEventMessageCollection);
        }
コード例 #5
0
        private static EventMessageCollection FillMessageCollection(IDataReader dr)
        {
            var arr = new EventMessageCollection();
            try
            {
                EventMessage obj;
                while (dr.Read())
                {
					//fill business object
                    obj = FillMessage(dr, false);
                    //add to collection
                    arr.Add(obj);
                }
            }
            catch (Exception exc)
            {
                Exceptions.Exceptions.LogException(exc);
            }
            finally
            {
				//close datareader
                CBO.CloseDataReader(dr, true);
            }
            return arr;
        }
コード例 #6
0
 public EventMessageCollection GetMessages( string eventName, string subscriberId )
 {
     EventMessageCollection oEventMessageCollection = new EventMessageCollection();
     string[] EventMessageFiles;
     string EventMessageFile;
     EventMessageFiles = Directory.GetFiles( m_messagePath, MessageName( eventName, subscriberId, "*" ) );
     foreach( string tempLoopVar_EventMessageFile in EventMessageFiles )
     {
         EventMessageFile = tempLoopVar_EventMessageFile;
         oEventMessageCollection.Add( DeserializeMessage( EventMessageFile, subscriberId ) );
     }
     return oEventMessageCollection;
 }