microsoft / microsoft/mcp

Standardize dependency injected constructor parameter validation

Open
#2,604 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

engineering item needs-team-attention server-Azure.Mcp tools-Core
Dominant language
C#
Stars
3.7k
Forks
624
Avg merge
2d 20h
Merged PRs (30d)
220

Description

While migrating `IBaseCommand` implementations to use dependency injection for all services they require it was noted that there is inconsistent handling for those parameters. In some cases they're used as-is and in other cases they're validated for being non-null. This issue is a follow-up to make that handling consistent across all implementation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for IBaseCommand and all of its implementations, then compare how dependency-injected constructor parameters are handled. Establish the consistent non-null validation pattern from the existing implementations and apply it across the remaining implementations; done means the handling is consistent throughout.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.