-
Notifications
You must be signed in to change notification settings - Fork 18
Propose ADR for using TryAdd
in .NET dependency injection
#606
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
base: main
Are you sure you want to change the base?
Conversation
@@ -94,7 +94,7 @@ It may sometimes be needed to assert to the compiler that you know something is | |||
it thinks it might be - to do that you can use the [`!` operator][null-forgiving]. You may want to | |||
do this for properties that you know are populated elsewhere; for example: | |||
|
|||
```c# | |||
```csharp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When writing this ADR I realized c#
doesn't make syntax highlighting work in our docs only csharp
. Even though c#
does work in GitHub.
Deploying contributing-docs with
|
Latest commit: |
8909941
|
Status: | ✅ Deploy successful! |
Preview URL: | https://a7de5539.contributing-docs.pages.dev |
Branch Preview URL: | https://adr-try-add-dependency-injec.contributing-docs.pages.dev |
TryAdd
in .NET dependency injection
Great job, no security vulnerabilities found in this Pull Request |
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
docs/architecture/adr/0026-dotnet-dependency-injection-enhancements.md
Outdated
Show resolved
Hide resolved
occasionally throughout the codebase but they is no outside encouragement to use them. | ||
- **Encourage usage** - Start encouraging usage through team training and encouragement to use them | ||
in code reviews but don't make any automatic check to enforce usage. | ||
- **Enforce usage** - Start enforcing usage of `TryAdd` overloads by adding the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 My one non-suggestion comment: what if we went this way? Do we get other benefits long-term? The plan here could be two-stage and we introduce this later.
Co-authored-by: Matt Bishop <matt@withinfocus.com>
🎟️ Tracking
N/A
📔 Objective
Add ADR for encouraging use of
TryAdd
overloads in .NET dependency injection.⏰ Reminders before review
team
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes