public ActivitiesList Process(IEnumerable <string> nameFilter, bool includeNullTitles, DateTime from, DateTime until)
        {
            ActivitiesList activities = new ActivitiesList();

            RegistriesList registries = StraightDbHelper.GetRegistries(_connectionString);

            if (registries == null)
            {
                return(null);
            }

            registries.Filter(nameFilter, includeNullTitles, from, until);
            if (registries.IsEmpty)
            {
                return(null);
            }

            while (!registries.IsEmpty)
            {
                Activity       activity = null;
                int            numOfRegistriesInActivity = DetectActivity(registries);
                RegistriesList activityRegistries        = ExtractActivity(registries, numOfRegistriesInActivity);
                activity = CreateActivity(activityRegistries);
                activities.Add(activity);
                activities.RegistriesIds.AddRange(activityRegistries.GetAllIds());
            }

            return(activities);
        }
 public void MarkRegistriesAsProcessed(IEnumerable <long> ids)
 {
     StraightDbHelper.MarkRegistriesAsProcessed(_connectionString, ids);
 }
 public void DeleteProcessedRegistriesFromDb()
 {
     StraightDbHelper.DeleteProcessedRegistries(_connectionString);
 }