Skip to content

Commit 3c615f7

Browse files
authored
Update AV1137: Keep parameters as specific and narrow as possible (#355)
1 parent 9b7ccfe commit 3c615f7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_rules/1137.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
rule_id: 1137
33
rule_category: member-design
4-
title: Define parameters as specific as possible
4+
title: Define parameters as specific and narrow as possible
55
severity: 2
66
---
77
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.

0 commit comments

Comments
 (0)