toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.53k stars 258 forks source link

IncludeAsync but truncate if too long. #532

Open sybaris opened 1 year ago

sybaris commented 1 year ago

Is your feature request related to a problem? Please describe. I use RazorLight generated reports sent by teams. My problem is I am limited in size.

Describe the solution you'd like My template loops and call IncludeAsync on several pages. I would like to check the returned size and if it's too big, I want to replace the text by : "Message truncated (toobig). Check the file xxx to have the complete message". Is there is an alternative to call IncludeAsync but to check before the returned size ?