You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The structure of the AsmResolver project is hierarchical, where different concerns of functionality are split up into multiple directories and sub-directories.
While this improves the project structure, it results in a lot of namespaces. For a user this is cumbersome, as they would have to import many of these namespaces with using statements, while a lot of these components are used together quite frequently and could also be considered part of one bigger main component. For example, the TablesStream class is often used in conjunction with BlobStream and StringsStream, to resolve the raw indices in the tables to meaningful signatures and strings respectively, but right now these three streams all reside in different namespaces.
Proposal
Consolidate the following commonly used namespaces to reduce nesting and thus the amount of usings required in a typical C# program that uses AsmResolver:
We may even consider flattening the entirety of AsmResolver.PE.DotNet.Metadata.* to a single AsmResolver.PE.DotNet.Metadata, as different streams in the metadata directory are typically used together.
Consumers could use global usings now in modern C#. However, this still means a good portion of these statements will be dedicated to just importing AsmResolver-related namespaces only. Furthermore, when using editors that do not have intelligent autocompletion (especially when working with languages such as Powershell), it is hard to remember in which namespace everything is put.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Problem Description
The structure of the AsmResolver project is hierarchical, where different concerns of functionality are split up into multiple directories and sub-directories.
While this improves the project structure, it results in a lot of namespaces. For a user this is cumbersome, as they would have to import many of these namespaces with
using
statements, while a lot of these components are used together quite frequently and could also be considered part of one bigger main component. For example, theTablesStream
class is often used in conjunction withBlobStream
andStringsStream
, to resolve the raw indices in the tables to meaningful signatures and strings respectively, but right now these three streams all reside in different namespaces.Proposal
Consolidate the following commonly used namespaces to reduce nesting and thus the amount of usings required in a typical C# program that uses AsmResolver:
AsmResolver.PE.File.Headers
->AsmResolver.PE.File
AsmResolver.PE.DotNet.Metadata.Tables.Rows
->AsmResolver.PE.DotNet.Metadata.Tables
AsmResolver.PE.DotNet.Metadata.*
to a singleAsmResolver.PE.DotNet.Metadata
, as different streams in the metadata directory are typically used together.AsmResolver.DotNet.Signatures.Types
->AsmResolver.DotNet.Signatures
AsmResolver.DotNet.Signatures.Security
->AsmResolver.DotNet.Signatures
AsmResolver.DotNet.Signatures.Marshal
->AsmResolver.DotNet.Signatures
AsmResolver.DotNet.Builder.Metadata.Blob
->AsmResolver.DotNet.Builder.Metadata
AsmResolver.DotNet.Builder.Metadata.Guid
->AsmResolver.DotNet.Builder.Metadata
AsmResolver.DotNet.Builder.Metadata.Strings
->AsmResolver.DotNet.Builder.Metadata
AsmResolver.DotNet.Builder.Metadata.Tables
->AsmResolver.DotNet.Builder.Metadata
AsmResolver.DotNet.Builder.Metadata.UserStrings
->AsmResolver.DotNet.Builder.Metadata
Alternatives
Consumers could use
global using
s now in modern C#. However, this still means a good portion of these statements will be dedicated to just importing AsmResolver-related namespaces only. Furthermore, when using editors that do not have intelligent autocompletion (especially when working with languages such as Powershell), it is hard to remember in which namespace everything is put.Additional Context
No response
The text was updated successfully, but these errors were encountered: