Skip to content

[AssignAll] attribute on method for aspect oriented programming #7

@angularsen

Description

@angularsen

Magic comments like // AssignAll enable is a bit off-putting.

It would be more natural and discoverable with:

[AssignAll]
public PersonDto ToDto(Person entity)
{
	return new PersonDto
	{
		FullName = $"{entity.FirstName} {entity.LastName}"
	};
}

Instead of:

public PersonDto ToDto(Person entity)
{
    // AssignAll enable
	return new PersonDto
	{
		FullName = $"{entity.FirstName} {entity.LastName}"
	};
    // AssignAll disable
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions