Squidex Client Lib

How do you use the GetAllSync method in the client library? It’s asking for a callback method.

It is designed to return 100.000+ content items, therefore you do not want to have them all in memory.

Lets say you create a big CSV file, then your code would look like this

using (var writer = new CSVWriter(...))
{
  await WriteHeaders(writer);

 await contents.GetAllAsync(async content => {
   await writer.Write(content.Data....);
   await writer.NextRecord();
 });
}
1 Like