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

CodeWriter Invoke methode #58

Open
Codelisk opened this issue Jul 31, 2023 · 2 comments
Open

CodeWriter Invoke methode #58

Codelisk opened this issue Jul 31, 2023 · 2 comments

Comments

@Codelisk
Copy link

Codelisk commented Jul 31, 2023

Currently when we want to Invoke something in a method body we have to use AppendLine:

methodBuilder.WithBody((x) =>
{
    x.AppendLine($"await Test(argument1, argument2));
});

Idea would be to create an "InvocationBuilder" which we could use like this:

x.Invoke(useAwait, methodname, params, prefix, suffix);

When interested i would volunteer to create a PR.

@dansiegel
Copy link
Owner

Can you expand on this idea @Codelisk? Like is the goal to produce:

public string Speak()
{
    return Speak("Hello World");
}

@Codelisk
Copy link
Author

Codelisk commented Sep 1, 2023

Yes thats pretty much it :)

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

2 participants