Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

PreserveDependencyAttribute should support "*" for members #799

Closed

Description

@stephentoub

Or some alternative way of saying "keep everything on the target type". Example where this is helpful:
https://github.com/dotnet/corefx/blob/bc1f6ae4e757251c8691fe94e68617ce1516e684/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSite.cs#L280-L323
https://github.com/dotnet/corefx/blob/bc1f6ae4e757251c8691fe94e68617ce1516e684/src/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.cs
Here lots of methods are potentially being used, representing all methods on the type. Instead of explicitly having 40 PreserveDependency attributes, I could have 1, and if the target type ever added more arg lengths, this wouldn't need to be updated.

(Ideally it would use the same syntax as the ILLinkTrim.xml files, which support * for pattern matching.)

Activity

  1. marek-safar commented on Oct 30, 2019

    @marek-safar
    Contributor

    I think supporting the same syntax as in xml descriptors make sense.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions