mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Annotate Assert methods for better code analysis (#12618)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#define DEBUG
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Management.Automation
|
||||
@@ -126,6 +127,7 @@ namespace System.Management.Automation
|
||||
#if RESHARPER_ATTRIBUTES
|
||||
[JetBrains.Annotations.AssertionCondition(JetBrains.Annotations.AssertionConditionType.IS_TRUE)]
|
||||
#endif
|
||||
[DoesNotReturnIf(false)]
|
||||
bool condition,
|
||||
string whyThisShouldNeverHappen)
|
||||
{
|
||||
@@ -159,6 +161,7 @@ namespace System.Management.Automation
|
||||
#if RESHARPER_ATTRIBUTES
|
||||
[JetBrains.Annotations.AssertionCondition(JetBrains.Annotations.AssertionConditionType.IS_TRUE)]
|
||||
#endif
|
||||
[DoesNotReturnIf(false)]
|
||||
bool condition,
|
||||
string whyThisShouldNeverHappen, string detailMessage)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user