Skip to content

[feature request] Allow set custom attributes on inner method #205

@moonheart

Description

@moonheart

The problem:

When calling extern method, it may throw System.AccessViolationException, which can not be catched and will crashes the process.

To catch this exception (.NET Framework only), the caller must set two attributes on current method: HandleProcessCorruptedStateExceptionsAttribute and SecurityCriticalAttribute.

But the weaver did not copy these attributes to the generated innner method, and causes the process crash.

Possible solution

  1. Always copy these two attributes to inner method if exist
    This is the easist but not the best, because it takes extra steps to check attributes.
  2. Allow set custom attributes in user advices.
    Users can set attributes based on their logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions