private static void ProcessSpListItemCollection(
            XDocument result,
            string query,
            SPSite spSite,
            SPWeb web,
            Guid theWebId,
            Dictionary <string, List <string> > workingOnDict)
        {
            Guard.ArgumentIsNotNull(result, nameof(result));
            Guard.ArgumentIsNotNull(spSite, nameof(spSite));
            Guard.ArgumentIsNotNull(web, nameof(web));
            Guard.ArgumentIsNotNull(workingOnDict, nameof(workingOnDict));

            foreach (var selectedList in GetMyWorkParams.SelectedLists.Distinct().OrderBy(l => l))
            {
                var spList = web.Lists.TryGetList(selectedList);

                if (spList == null)
                {
                    continue;
                }

                var spQuery = new SPQuery {
                    QueryThrottleMode = SPQueryThrottleOption.Override
                };

                var viewFieldsBuilder = new StringBuilder(spQuery.ViewFields);

                foreach (var selectedField in GetMyWorkParams.SelectedFields)
                {
                    viewFieldsBuilder.Append($@"<FieldRef Name='{selectedField}' Nullable='TRUE'/>");
                }

                if (!GetMyWorkParams.SelectedFields.Exists(f => f.Equals(CompletedField)))
                {
                    viewFieldsBuilder.Append($"<FieldRef Name='{CompletedField}' Nullable='TRUE'/>");
                }

                spQuery.ViewFields = viewFieldsBuilder.ToString();
                spQuery.Query      = query;

                SPListItemCollection spListItemCollection = null;
                SPSecurity.RunWithElevatedPrivileges(
                    () => spListItemCollection = spList.GetItems(spQuery));

                if (!spListItemCollection.HasItems())
                {
                    continue;
                }

                var listContainsField = GetMyWorkParams.SelectedFields.Any(
                    selectedField =>
                    spListItemCollection.Fields.ContainsField(selectedField));

                if (!listContainsField)
                {
                    continue;
                }

                ProcessSpListItem(result, spSite, spListItemCollection, spList, theWebId, web, workingOnDict);
            }
        }