How to check if hole is thru all only from geometry?

How to check if hole is thru all only from geometry? Without using features data. I was thinking about gatering informations from edges and faces.

The only input is selected face containing holes. I know how to select edge but how to determine that it's thru all hole?

SolidworksApi macros