Пример #1
0
        private void getFileList()
        {
            Models response = ModelClient.GetModels(Ftype.All, 0, GetModelsOption.AllDescendants);

            int?         NextPage = response.Pagination.NextPage;
            List <Model> models   = new List <Model>();

            if (response.Pagination.Total > 0)
            {
                models.AddRange(response.Contents);
            }

            do
            {
                if (NextPage == null)
                {
                    break;
                }

                response = ModelClient.GetModels(NextPage.GetValueOrDefault(), Ftype.All, 0, GetModelsOption.AllDescendants);
                models.AddRange(response.Contents);
                NextPage = response.Pagination.NextPage;
            }while (NextPage != null);

            foreach (Model model in models)
            {
                insertModel(model);
            }
        }