Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant interfaces #445

Closed
Washi1337 opened this issue Jun 9, 2023 · 0 comments
Closed

Remove redundant interfaces #445

Washi1337 opened this issue Jun 9, 2023 · 0 comments
Milestone

Comments

@Washi1337
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant