cezarypiatek / MappingGenerator

:arrows_counterclockwise: "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
https://marketplace.visualstudio.com/items?itemName=54748ff9-45fc-43c2-8ec5-cf7912bc3b84.mappinggenerator
MIT License
1.03k stars 120 forks source link

Suggestion: Scaffold invocation on multiple lines. #149

Closed fiseni closed 2 years ago

fiseni commented 4 years ago

The existing feature is really great and useful. Any chance we can get some styling while scaffolding? Something similar to the usage below. Basically, the ability to scaffold arguments on separate lines.

public AddressDto GetAddress1()
{
    return new AddressDto(street: "lorem ipsum", city: "lorem ipsum", country: "lorem ipsum");
}

public AddressDto GetAddress2()
{
    return new AddressDto
    (
        street: "lorem ipsum",
        city: "lorem ipsum",
        country: "lorem ipsum"
    );
}

I'm not familiar with VS extension eco-system, so I have no idea if this is a trivial thing, or if it requires substantial effort. I just think would be a really nice feature to have. At least in my perspective :)

cezarypiatek commented 4 years ago

I will try to look at this over the weekend.

cezarypiatek commented 2 years ago

The premium version contains an advanced method invocation scaffolder that allows for this kind of formatting.

image

More details about this feature in doc https://docs.mappinggenerator.net/invocation-scaffolding/invocation-scaffolder/ The Premium license can be acquired on the official webpage https://mappinggenerator.net/ If you have any other remarks or suggestions please report them here https://github.com/cezarypiatek/MappingGeneratorIssueTracker