97 instantiations of DoesNotReturnIf
BuildActionTelemetryTable (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Contract.cs (6)
78public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 91public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 104public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 117public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 130public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 143public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
Microsoft.AspNetCore.Cryptography.Internal (1)
CryptoUtil.cs (1)
20public static void Assert([DoesNotReturnIf(false)] bool condition, string message)
Microsoft.AspNetCore.Diagnostics (2)
src\Shared\Diagnostics\AnalyzerDebug.cs (2)
14public static void Assert([DoesNotReturnIf(false)] bool b) => Debug.Assert(b); 18public static void Assert([DoesNotReturnIf(false)] bool b, string message)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
src\Shared\Diagnostics\AnalyzerDebug.cs (2)
14public static void Assert([DoesNotReturnIf(false)] bool b) => Debug.Assert(b); 18public static void Assert([DoesNotReturnIf(false)] bool b, string message)
Microsoft.AspNetCore.Http.Connections.Client (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
18public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
18public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
18public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.AspNetCore.SignalR.Client.Core (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
18public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.Build.Engine.OM.UnitTests (24)
ErrorUtilities.cs (24)
44internal static void VerifyThrowInternalError([DoesNotReturnIf(false)] bool condition, string message, params object?[]? args) 88internal static void VerifyThrowInternalErrorUnreachable([DoesNotReturnIf(false)] bool condition) 191internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage) 202internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0) 213internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1) 224internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1, object arg2) 235internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1, object arg2, object arg3) 257internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName) 269internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0) 284internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1) 299internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2) 314internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2, object arg3) 362internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName) 370internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0) 378internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1) 386internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2) 394internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2, object arg3) 406internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName) 418internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0) 431internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1) 444internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2) 457internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3) 480internal static void VerifyThrowArgumentOutOfRange([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression(nameof(condition))] string? parameterName = null) 588internal static void VerifyThrowObjectDisposed([DoesNotReturnIf(false)] bool condition, string objectName)
Microsoft.CodeAnalysis (5)
InternalUtilities\Debug.cs (4)
17public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 21public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 26public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 51internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
InternalUtilities\FailFast.cs (1)
96internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1787private static void AssertTrueWithGraph([DoesNotReturnIf(false)] bool value, string message, Func<string> finalGraph)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (4)
17public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 21public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 26public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 51internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (1)
96internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Contract.cs (6)
78public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 91public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 104public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 117public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 130public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 143public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
Microsoft.Extensions.Caching.StackExchangeRedis (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
18public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.Extensions.Identity.Stores (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (2)
18public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 34public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Replay (4)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (4)
17public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 21public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 26public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 51internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
RunTests (1)
HelixTestRunner.cs (1)
114void Verify([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression("condition")] string? message = null)
System.Collections.Immutable (3)
Validation\Requires.cs (3)
84public static void Range([DoesNotReturnIf(false)] bool condition, string? parameterName, string? message = null) 113public static void Argument([DoesNotReturnIf(false)] bool condition, string? parameterName, string? message) 125public static void Argument([DoesNotReturnIf(false)] bool condition)
System.Diagnostics.TraceSource (3)
System\Diagnostics\Trace.cs (3)
119public static void Assert([DoesNotReturnIf(false)] bool condition) 129public static void Assert([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression(nameof(condition))] string? message = null) 139public static void Assert([DoesNotReturnIf(false)] bool condition, string? message, string? detailMessage)
System.Linq.Expressions (1)
System\Dynamic\Utils\ContractUtils.cs (1)
39public static void Requires([DoesNotReturnIf(false)] bool precondition, string paramName)
System.Private.CoreLib (12)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (4)
225public static void Assume([DoesNotReturnIf(false)] bool condition) 244public static void Assume([DoesNotReturnIf(false)] bool condition, string? userMessage) 263public static void Assert([DoesNotReturnIf(false)] bool condition) 277public static void Assert([DoesNotReturnIf(false)] bool condition, string? userMessage)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Debug.cs (6)
82public static void Assert([DoesNotReturnIf(false)] bool condition) => 86public static void Assert([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression(nameof(condition))] string? message = null) => 90public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) => 94public static void Assert([DoesNotReturnIf(false)] bool condition, string? message, string? detailMessage) 103public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler detailMessage) => 107public static void Assert([DoesNotReturnIf(false)] bool condition, string? message, [StringSyntax(StringSyntaxAttribute.CompositeFormat)] string detailMessageFormat, params object?[] args) =>
src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (2)
57public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 70public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\DiagnosticUtility.cs (1)
68public static void DebugAssert([DoesNotReturnIf(false)] bool condition, string message)
xunit.assert (8)
BooleanAsserts.cs (8)
32 public static void False([DoesNotReturnIf(parameterValue: true)] bool condition) => 44 public static void False([DoesNotReturnIf(parameterValue: true)] bool? condition) => 58 [DoesNotReturnIf(parameterValue: true)] bool condition, 74 [DoesNotReturnIf(parameterValue: true)] bool? condition, 91 public static void True([DoesNotReturnIf(parameterValue: false)] bool condition) => 103 public static void True([DoesNotReturnIf(parameterValue: false)] bool? condition) => 117 [DoesNotReturnIf(parameterValue: false)] bool condition, 133 [DoesNotReturnIf(parameterValue: false)] bool? condition,
3 references to DoesNotReturnIf
mscorlib (1)
mscorlib.cs (1)
62[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute))]
netstandard (1)
netstandard.cs (1)
622[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute))]
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
134[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute))]