-
For instance,
https://github.com/microsoft/msbuild/blob/00781ad1353afba25451148dba61845ac139b572/src/Shared/ErrorUtilities.cs#L54-L60
Should have `[DoesNotReturn]`
https://github.com/microsof…
-
I have the following null guard:
`Guard.Verify.IsNotNull(await response.Content.ToJsonAsync().ConfigureAwait(false), nameof(JsonSerializeExtensions.ToJsonAsync))`
IDISP004 warns even though it is …
-
**Version Used**:
```
commit baa0dcc0f3d023c37c069c4feb36986e979036cd
Merge: 548db2b498 f889038688
Author: dotnet-automerge-bot
Date: Mon Aug 5 16:00:23 2019 -0700
Merge pull request…
-
### Overview
There should be `Guard.IsNotEmpty(Guid)` API to Guard against empty guids. With current API's the same guard can be achieved by `Guard.IsTrue(guid != Guid.Empty);`.
### API breakdown
`…
-
> **Edit** Please vote by leaving 👍 if want them hidden 👎 if want to include them in stack traces
Currently, most throw helpers (like `ArgumentNullException.ThrowIfNull(p)`) don't use the `[StackTr…
-
1. In `void M([DisallowNull]string x)` the attribute is redundant.
Same in `void M([DisallowNull]T t) where T : class` or `void M([DisallowNull]T t) where T : struct`.
2. `[MaybeNull]int` or `[May…
-
There's an [upcoming C# language feature](https://github.com/dotnet/csharplang/issues/287) intended to enable better diagnostics by stringifying the arguments that passed to a failed assert. e.g.
`…
-
## Rationale
Number of libraries, including the new minimal ASP.NET host, use `Assembly.GetCallingAssembly()` for convenience. `Assembly.GetCallingAssembly()` is slow and unreliable API, and also n…
-
```C#
// Trimmer/NativeAot don't optimize branches away based on DoesNotReturnIfAttribute
[ExpectedWarning ("IL2026", nameof (RequiresUnreferencedCode), Tool.Trimmer | Tool.NativeAot, "")]
static v…
-
The new string interpolation syntax in C# 6 has a drawback when used with NLog: It performs the interpolation regardless of which log levels are enabled (since it has to be passed as a string to NLog;…