Пример #1
0
        public AtomEventInfoCollection GetEventInfos(int productId, int fileId, int eventId)
        {
            AtomEventInfoCollection eventInfos = new AtomEventInfoCollection();

            foreach (TestDatabaseProduct product in m_Products)
            {
                if (product.Product.Product.Id == productId)
                {
                    foreach (TestDatabaseFile file in product.Files)
                    {
                        if (file.File.File.Id == fileId)
                        {
                            foreach (TestDatabaseEvent thisEvent in file.Events)
                            {
                                if (thisEvent.TheEvent.Event.Id == eventId)
                                {
                                    return(thisEvent.EventInfos);
                                }
                            }
                        }
                    }
                }
            }
            return(eventInfos);
        }
Пример #2
0
        /// <summary>
        /// Returns a list of event infos for the specified event.
        /// </summary>
        /// <param name="theEvent">Event for which the event info is required.</param>
        /// <param name="days">Number of days of events to get - max is 90.</param>
        /// <returns>Collection of event infos.</returns>
        public AtomEventInfoCollection GetEventDetails(AtomEvent theEvent, int days)
        {
            AtomEventInfoCollection eventInfos = new AtomEventInfoCollection();

            return(m_TestDatabase.GetEventInfos(theEvent.ProductId, theEvent.FileId, theEvent.Event.Id));
        }