Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target any partial method. #16

Open
otac0n opened this issue Dec 5, 2023 · 2 comments
Open

Target any partial method. #16

otac0n opened this issue Dec 5, 2023 · 2 comments

Comments

@otac0n
Copy link
Owner

otac0n commented Dec 5, 2023

In order to support attribute-based additive source generation, it would be helpful to be able to express any combination of namespace, class, nested class, and partial method with a simple declaration.

@namespace A.B.C
@className ExposedClass+X+Y
@methodName Method

could imply

namespace A.B.C
{
    partial class ExposedClass
    {
        partial class X
        {
                partial class Y
                {
                    Method() {}
                }
        }
    }
}

Better yet,

@memberName A.B.C.ExposedClass+X+Y.Method

Would imply the same.

@otac0n
Copy link
Owner Author

otac0n commented Dec 5, 2023

Can we target every generic class?

@otac0n
Copy link
Owner Author

otac0n commented Dec 6, 2023

I think it's too complicated to deal with inheriting values (especially recursively) if we add a @memberName option. Best is to just enable the @className to contain nested class names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant