Skip to content

Commit 210afac

Browse files
Dennis DoomenCopilot
authored andcommitted
Update AV1820 guideline
Split from #298. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a0b0bea commit 210afac

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

_rules/1580.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ rule_category: maintainability
44
title: Write code that is easy to debug
55
severity: 2
66
---
7-
Because debugger breakpoints cannot be set inside expressions, avoid overuse of nested method calls. For example, a line like:
7+
Because debugger breakpoints cannot be set inside expressions, avoid overuse of nested method calls. For example, in some IDEs, a line like:
88

99
string result = ConvertToXml(ApplyTransforms(ExecuteQuery(GetConfigurationSettings(source))));
1010

1111
requires extra steps to inspect intermediate method return values. On the other hard, were this expression broken into intermediate variables, setting a breakpoint on one of them would be sufficient.
1212

13-
**Note** This does not apply to chaining method calls, which is a common pattern in fluent APIs.
13+
**Note:** This does not apply to chaining method calls, which is a common pattern in fluent APIs.
14+
15+
**Tip:** [JetBrains Rider](https://www.jetbrains.com/rider/) has a very advanced debugger that allows you to choose into which part of a nested or chained call you want to step. It also displays all intermediate parameter and return values.

_rules/1820.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
rule_id: 1820
33
rule_category: performance
4-
title: Only use `async` for low-intensive long-running activities
4+
title: Only use `async`/`await` for I/O-bound or long-running activities
55
severity: 1
66
---
7-
The usage of `async` won't automagically run something on a worker thread like `Task.Run` does. It just adds the necessary logic to allow releasing the current thread, and marshal the result back on that same thread if a long-running asynchronous operation has completed. In other words, use `async` only for I/O bound operations.
7+
The usage of `async` won't automagically run something on a worker thread like `Task.Run` does. It just adds the necessary logic to allow releasing the current thread, and marshal the result back on that same thread if a long-running asynchronous operation has completed. In other words, use `async` only for I/O-bound operations.

0 commit comments

Comments
 (0)