Skip to content

Callbacks implementation for MemberCloner #333

@ghost

Description

Problem Description

When working with MemberCloner, you must do at least 2 loops through all copied types - implicit one (in MemberCloner), and explicit one (when you add types to module).

For small assemblies it won't matter, but for larger - it could cause huge processing time.

Callbacks system can solve this - user can define their callback types, cache processed types (for example interfaces), do some minor processing, and add result automatically to module - in a single iteration.

Proposal

To MemberCloner constructor, add argument Action<IMemberDescriptor>, and invoke it directly after the member is fully cloned.

Alternatives

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetIssues related to AsmResolver.DotNetenhancement

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions