Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _rules/1137.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
rule_id: 1137
rule_category: member-design
title: Define parameters as specific as possible
title: Define parameters as specific and narrow as possible
severity: 2
---
If your method or local function needs a specific piece of data, define parameters as specific as that and don't take a container object instead. For instance, consider a method that needs a connection string that is exposed through a central `IConfiguration` interface. Rather than taking a dependency on the entire configuration, just define a parameter for the connection string. This not only prevents unnecessary coupling, it also improves maintainability in the long run.
Expand Down