DamianEdwards / DamianEdwards/MiniValidation
Make polymorphism support an option
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 390
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Supporting polymorphism requires the entire object graph of the object being validated be walked every time as any member of a type maybe a descendent type at runtime for that instance (modulo sealed types). This is obviously expensive so consider adding an option to make polymorphism an option (static property or new options object passed in to TryValidate). When disabled only the declared type of members would be considered when determining if a member has anything warranting validation (which is cached).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the TryValidate entry point and trace the object-graph walk and the existing cached member-validation decisions. Determine how an option should control declared versus runtime-type inspection, and verify that disabled polymorphism avoids the extra traversal while enabled behavior remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100