Washi1337/AsmResolver

Remove redundant interfaces

Closed this issue · 0 comments

Problem Description

The initial design of AsmResolver v4.0 defined many interfaces defining common structures found in the PE file format, with the intention to be open about possible implementations. However, in practice, they only have one implementing class each, which define a base implementation for all instances of these classes. This means even the different implementations of these classes (e.g., the lazy initialized versions of every structure) are deriving from these base implementations rather than the interface directly. This renders the interfaces redundant.

Proposal

Remove the following interfaces, and replace occurrences with the commonly used class:

  • IPEFile
  • IPEImage
  • IDotNetDirectory
  • IMetadata
  • IExportDirectory
  • IImportedModule
  • ITlsDirectory
  • IResourceData
  • IResourceDirectory

Alternatives

No response

Additional Context

The interfaces have been kept for backwards compatibility in 5.0, but they do not really serve any purpose anymore.