Skip to content

Feature: Linking via the member/method name #35

Open
@mikej0

Description

@mikej0

Hello,

Just a thought that in classes with long chains where you want to slot a new call in the middle, perhaps it could be possible to link by the name of the member or method instead of a number? Then we don't need to increase all following calls by 1 each time.

So for example:

[FluentMember] // First
public string Name { get; private set; }

[FluentMember("Name")] // Follows after member "Name"
public int Age { get; private set; }

[FluentMethod("Name")]
[FluentContinueWith("Age")]
public void Address(string address) { }

Or for type safety, is it possible to automate creating an enum with the names instead of magic strings?

[FluentMember] // First
public string Name { get; private set; }

[FluentMember({Name}Members.Name)] // Follows after member "Name"
public int Age { get; private set; }

[FluentMethod({Name}Members.Name)]
[FluentContinueWith({Name}Members.Age)]
public void Address(string address) { }

Or something similar...

Thanks

Mike

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions