Fix this.Marker() generator for explicit interfaces, generics and field naming#12
Merged
VPDPersonal merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
…ld naming
- Use ExplicitInterfaceImplementations[0].Name to drop the interface prefix from method/property markers
- Rename marker fields to {Name}_Marker_Line_{N}
- Emit interpolated marker labels for generic types via nested Markers<T> helper, copy type constraints, make the extension method generic
VPDPersonal
added a commit
that referenced
this pull request
Apr 30, 2026
…ld naming (#12) - Use ExplicitInterfaceImplementations[0].Name to drop the interface prefix from method/property markers - Rename marker fields to {Name}_Marker_Line_{N} - Emit interpolated marker labels for generic types via nested Markers<T> helper, copy type constraints, make the extension method generic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IBinderAdder.Addnow producesAdd_Marker_Line_45and labelOneTimeBindableMember.Add (45)instead ofAspid.MVVM.IBinderAdder.Add_line_45.{Name}_Marker_Line_{N}convention.Markers<T,...>holds the marker fields, the extension method is now generic with copied type constraints, and the marker label is emitted as$"TypeName<{typeof(T).Name}>.Method (line)".Test plan
dotnet buildof the generator project — succeeds with 0 warnings/errors.EmitCompilerGeneratedFiles— verified output for non-generic, generic-with-where T : class, and explicit-interface implementations matches the expected shape.this.Marker()keeps working in real samples (MarkerTest.cs) and inOneTimeBindableMember<T>.