EntityHelper.cs 579 B

12345678910111213141516171819202122
  1. using Syncfusion.DocIO.DLS;
  2. namespace Vinno.vCloud.ReportGenerator
  3. {
  4. public static class EntityHelper
  5. {
  6. public static bool IsInHeader(this IEntity entity)
  7. {
  8. while (true)
  9. switch (entity.Owner)
  10. {
  11. case null:
  12. return false;
  13. case HeaderFooter _:
  14. return true;
  15. default:
  16. entity = entity.Owner;
  17. continue;
  18. }
  19. }
  20. }
  21. }