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

Feature / Rich Transients #187

Merged
merged 30 commits into from
Oct 31, 2024
Merged

Conversation

dncsvr
Copy link
Member

@dncsvr dncsvr commented Oct 23, 2024

Introduce RichTransientsCodingStyleFeature for a better transient object
experience.

  • Allow identifiable transients to be parameters just like entities
  • Allow identifiable transients to have their identifier in the route just like
    entities
    • this means their route should be plural as well

Tasks

  • Add RichTransients coding style feature
    • identify transients with With method having a single id parameter
    • render Get if there are any public properties and return object as dto
    • id parameter should be rendered from route
    • pluralize route
    • rich transient can be method parameter
    • command can be initialized with rich transient parameter
    • nullable support
    • update docs

Additional Tasks

  • merge from main
  • Move with params as query convention from CommandPattern to here, as it
    is more relevant
  • Scan project to find additional relevant config/convention/sample code
    etc. to move them under this coding style.
  • enable commands to be initialized with and entity
    • remove method is initializer checks from lookup entity conventions
    • dont use factory method for transient targets
    • command with Entity case: single by id
  • refine compiler error messages
    • display closest scope in hierarchy method or class

@dncsvr dncsvr self-assigned this Oct 23, 2024
dncsvr added 11 commits October 23, 2024 18:30
- use `RichTransientAttribute` for markin classes
- add pluralization
- rename sample classes
- edit routing rich transients test cases
- add `HasPublicDataAttribute` to mark types with public properties
- remove `RichTransient` attribute
- add find target from initializer convention
- change convention orders to execute before entity and command conventions
- edit routing rich transients samples and test
- add lookup transients by id conventions
- remove `HasPublicData`
- use `CSharpFriendlyFullName` for id types
- fix typos
@dncsvr dncsvr marked this pull request as ready for review October 28, 2024 20:59
@dncsvr dncsvr requested a review from cihandeniz October 28, 2024 20:59
- remove orm dependency in rich transient conventions
- fix indentation
- use `string` as parameter and return type for rich transient samples
- use `find` instead of `initialize` for id parameter description
- apply single by unique for only target parameters
- merge rich entity add parameter and find target conventions
- edit diagnostic extensions to return full source if if no node is found
- add compiler exception message test cases
@dncsvr dncsvr merged commit 2102b5f into mouseless:main Oct 31, 2024
6 checks passed
@dncsvr dncsvr deleted the feature/rich-transients branch October 31, 2024 11:01
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

Successfully merging this pull request may close these issues.

2 participants