ArtifactVisualizer.Helpers.CollectData.GetCleanedMeetings C# (CSharp) Метод

GetCleanedMeetings() статический приватный Метод

Fetches meetings from the DB (hint: no API calls are made, meetings are only fetched if they are already stored)
static private GetCleanedMeetings ( DateTimeOffset date ) : List
date DateTimeOffset
Результат List
        internal static List<TimeSpentItem> GetCleanedMeetings(DateTimeOffset date)
        {
            var list = new List<TimeSpentItem>();

            var meetingsFromDb = Queries.GetMeetingsFromDatabase(date);

            // if already saved, get it from the database (if not today)
            if (meetingsFromDb != null && meetingsFromDb.Count > 0)
            {
                foreach (var w in meetingsFromDb)
                {
                    // hide day or longer meetings
                    if (w.Item3 >= 24 * 60) continue;

                    // hide meetings which not yet occurred
                    if (w.Item2 > DateTime.Now) continue;

                    var item = new TimeSpentItem(TimeSpentType.Meeting, w.Item1, w.Item3);
                    list.Add(item);
                }
            }

            return list;
        }