public override ProvisioningTemplate ExtractObjects(Web web, ProvisioningTemplate template, TokenParser parser, ProvisioningTemplateCreationInformation creationInfo)
        {
            using (var scope = new PnPMonitoredScope(this.Name))
            {
                foreach (var listInstance in template.Lists)
                {
                    List list = web.Lists.GetById(listInstance.ID);
                    web.Context.Load(list);
                    web.Context.ExecuteQueryRetry();

                    if (creationInfo.ExecutePreProvisionEvent<ListInstance, List>(Handlers.ListContents, template, listInstance, list))
                    {
                        ListItemsProvider provider = new ListItemsProvider(list, web, template);
                        List<DataRow> dataRows = provider.ExtractItems(creationInfo, parser, scope);
                        listInstance.DataRows.AddRange(dataRows);

                        creationInfo.ExecutePostProvisionEvent<ListInstance, List>(Handlers.ListContents, template, listInstance, list);
                    }
                }
            }
            return template;
        }
        public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate template, TokenParser parser, ProvisioningTemplateApplyingInformation applyingInformation)
        {
            using (var scope = new PnPMonitoredScope(this.Name))
            {
                if (template.Lists.Any())
                {
                    var rootWeb = (web.Context as ClientContext).Site.RootWeb;

                    #region DataRows

                    foreach (var listInstance in template.Lists)
                    {
                        if (listInstance.DataRows != null && listInstance.DataRows.Any())
                        {
                            scope.LogDebug(CoreResources.Provisioning_ObjectHandlers_ListInstancesDataRows_Processing_data_rows_for__0_, listInstance.Title);
                            // Retrieve the target list
                            var list = web.Lists.GetByTitle(listInstance.Title);
                            web.Context.Load(list);
                            web.Context.ExecuteQueryRetry();

                            ListItemsProvider provider = new ListItemsProvider(list, web, template);
                            provider.AddListItems(listInstance.DataRows, template, parser, scope);
                            if (null == m_listContentProviders)
                            {
                                m_listContentProviders = new Dictionary<Guid, ListItemsProvider>();
                            }
                            m_listContentProviders[list.Id] = provider;
                        }
                    }

                    UpdateLookupValues(web, scope);

                    #endregion
                }
            }

            return parser;
        }