Example #1
0
 private void QueryBatch(int batchNumber, ContentType contentType, string url, int skip, OutputWriter writer)
 {
     ProcessBatch(batchNumber, contentType.Query().Where("url", url).Limit(ContentstackQueryResultLimit)
                  .Skip(skip).Find <Entry>().GetAwaiter().GetResult(), contentType.ContentTypeId, writer);
 }
Example #2
0
        private void ProcessBatch(int batchNumber, ContentstackCollection <Entry> entries, string contentTypeUid, OutputWriter writer)
        {
            foreach (Entry entry in entries.Items)
            {
                string message = $"batch {batchNumber} [{contentTypeUid}] : {entry.Uid} : {entry.Title}";

                if (entry.Object.ContainsKey("url"))
                {
                    message += " (" + entry.Object["url"] + ")";
                }

                writer.Message(this, message);
            }
        }