wrappers: add CLIAssembly.external property

This commit is contained in:
Shiz 2020-06-14 17:07:37 +02:00
parent 75afef1cac
commit a05727c3a1
1 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@ import destruct
from .util import cached_property
from .common import CLIStreamType, CLIStreamIndex, CLITableType, CLITableIndex, CLITableRange, CLIToken, CLICodedToken
from .tables import CLITypeClassSemantics
from .tables import CLITypeClassSemantics, CLIAssemblyRefTable
from .code import determine_header
@ -246,6 +246,10 @@ class CLIClass(CLITableWrapper):
@register_wrapper(CLITableType.Assembly)
@register_wrapper(CLITableType.AssemblyRef)
class CLIAssembly(CLITableWrapper):
@property
def external(self):
return isinstance(self._raw, CLIAssemblyRefTable)
def __repr__(self):
return '<{}: {} (v{}.{}.{}.{})>'.format(
self.__class__.__name__, self.name,