Simplify reflection of classes generated by annotations framework

Open
#1,760 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
aws, csharp
Domain
backend, devtools

Research direction

No files or tests are named. Start by tracing how the annotation framework generates classes named "{Class}_{Method}_Generated" and how consumers currently find them through reflection. Done would require an agreed metadata attribute and a stable method or interface contract for locating and invoking the generated class.

Written by the indexing model from the issue text.

Description

annotations feature-request p2
Describe the feature

I'm using reflection to find the class generated by the annotation framework.

Whilst the approach is easily reproducible because the class name is "{Class}_{Method}_Generated" and the method is Method, it would be easier if the generated class was decorated with a attribute (possibly one coming from the BCL) that can be used to quickly find the generated class given the original class/function.

Additionally, it would be great if the generated class had the method with a fixed name like Handle or whatever.

Using a marking attribute and maybe even some interface with a single Handle method would make the process easier and less relying on internal implementation.

Use Case

I'm working on a tool to improve development experience when working with Annotations Lambda

Proposed Solution

No response

Other Information

No response

Acknowledgements
  • I may be able to implement this feature request
  • This feature might incur a breaking change
AWS .NET SDK and/or Package version used

Any

Targeted .NET Platform

.NET 8 + Aspire

Operating System and version

Any

Dominant language
C#
Stars
1.7k
Forks
503
Avg merge
1d 18h
Merged PRs (30d)
21

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/aws-lambda-dotnet

All issues in aws/aws-lambda-dotnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.