add CILFile.classes and CILFile.interfaces
This commit is contained in:
parent
21d55f5a2d
commit
39f9cdaf2e
|
@ -137,6 +137,21 @@ class CLIFile:
|
|||
def get_by_token(self, t):
|
||||
return self.get_table_entry(t.table, t.row)
|
||||
|
||||
|
||||
@property
|
||||
def entrypoint(self):
|
||||
return self.get_by_token(self.header.entrypoint)
|
||||
|
||||
@property
|
||||
def classes(self):
|
||||
return (
|
||||
t for t in self.get_table(CLITableType.TypeDef)
|
||||
if t.flags.semantics == CLITypeClassSemantics.Class
|
||||
)
|
||||
|
||||
@property
|
||||
def interfaces(self):
|
||||
return (
|
||||
t for t in self.get_table(CLITableType.TypeDef)
|
||||
if t.flags.semantics == CLITypeClassSemantics.Interface
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue