235 instantiations of DoesNotReturnIf
BuildActionTelemetryTable (7)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
CodeStyleConfigFileGenerator (7)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
dotnet (4)
Debug.cs (4)
19public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 23public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 28public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 53internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
GenerateDocumentationAndConfigFiles (2)
Debug.cs (2)
12public static void Assert([DoesNotReturnIf(false)] bool b) => Debug.Assert(b); 16public static void Assert([DoesNotReturnIf(false)] bool b, string message)
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.Bcl.AsyncInterfaces (2)
src\libraries\Common\src\System\ExceptionPolyfills.cs (2)
29public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 37public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.Bcl.Numerics (2)
src\libraries\Common\src\System\ExceptionPolyfills.cs (2)
29public static void ThrowIf([DoesNotReturnIf(true)] bool condition, object instance) 37public static void ThrowIf([DoesNotReturnIf(true)] bool condition, Type type)
Microsoft.Build.Engine.OM.UnitTests (26)
ErrorUtilities.cs (26)
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, int arg0) 213internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0) 224internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, int arg0, int arg1) 235internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1) 246internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1, object arg2) 257internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1, object arg2, object arg3) 279internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName) 291internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0) 306internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1) 321internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2) 336internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2, object arg3) 384internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName) 392internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0) 400internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1) 408internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2) 416internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2, object arg3) 428internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName) 440internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0) 453internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1) 466internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2) 479internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3) 502internal static void VerifyThrowArgumentOutOfRange([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression(nameof(condition))] string? parameterName = null) 610internal static void VerifyThrowObjectDisposed([DoesNotReturnIf(false)] bool condition, string objectName)
Microsoft.Build.Tasks.CodeAnalysis (11)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (4)
19public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 23public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 28public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 53internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Microsoft.CodeAnalysis (6)
InternalUtilities\Debug.cs (4)
19public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 23public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 28public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 53internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
55private static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Microsoft.CodeAnalysis.Collections.Package (8)
Extensions\FixedSizeArrayBuilder.cs (1)
55private static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Microsoft.CodeAnalysis.Contracts.Package (7)
Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
ErrorReporting\FailFast.cs (1)
98internal 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.Threading.Package (8)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
55private static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Microsoft.CodeAnalysis.Workspaces (13)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (4)
19public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 23public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 28public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 53internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
55private static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
999private static void ThrowExceptionIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (12)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (4)
19public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 23public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 28public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 53internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
55private static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\ExportProviderCache.cs (1)
198private void RequireForSingleExportProvider([DoesNotReturnIf(false)] bool condition)
Microsoft.CommonLanguageServerProtocol.Framework.Example (7)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Microsoft.DotNet.HotReload.Client.Package (7)
Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
Microsoft.DotNet.HotReload.Client.Tests (7)
Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = 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.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.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)
MSBuild (26)
ErrorUtilities.cs (26)
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, int arg0) 213internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0) 224internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, int arg0, int arg1) 235internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1) 246internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1, object arg2) 257internal static void VerifyThrow([DoesNotReturnIf(false)] bool condition, string unformattedMessage, object arg0, object arg1, object arg2, object arg3) 279internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName) 291internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0) 306internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1) 321internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2) 336internal static void VerifyThrowInvalidOperation([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2, object arg3) 384internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName) 392internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0) 400internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1) 408internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2) 416internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, string resourceName, object arg0, object arg1, object arg2, object arg3) 428internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName) 440internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0) 453internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1) 466internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2) 479internal static void VerifyThrowArgument([DoesNotReturnIf(false)] bool condition, Exception? innerException, string resourceName, object arg0, object arg1, object arg2, object arg3) 502internal static void VerifyThrowArgumentOutOfRange([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression(nameof(condition))] string? parameterName = null) 610internal static void VerifyThrowObjectDisposed([DoesNotReturnIf(false)] bool condition, string objectName)
Replay (11)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (4)
19public static void Assert([DoesNotReturnIf(false)] bool condition) => Debug.Assert(condition); 23public static void Assert([DoesNotReturnIf(false)] bool condition, string message) 28public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) 53internal static void AssertOrFailFast([DoesNotReturnIf(false)] bool condition, string? message = null)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool condition, string? message = null)
RunTests (1)
HelixTestRunner.cs (1)
109void Verify([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression("condition")] string? message = null)
rzc (3)
Json\Assumed.cs (3)
67[DoesNotReturnIf(true)] bool condition, 79[DoesNotReturnIf(true)] bool condition, 93[DoesNotReturnIf(false)] bool condition,
SemanticSearch.BuildTask (7)
src\Dependencies\Contracts\Contract.cs (6)
82public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 95public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 108public static void ThrowIfFalse([DoesNotReturnIf(parameterValue: false)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfFalseInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 121public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 134public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 147public static void ThrowIfTrue([DoesNotReturnIf(parameterValue: true)] bool condition, [InterpolatedStringHandlerArgument("condition")] ThrowIfTrueInterpolatedStringHandler message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
98internal static void Assert([DoesNotReturnIf(false)] bool 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)
115public static void Assert([DoesNotReturnIf(false)] bool condition) 125public static void Assert([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression(nameof(condition))] string? message = null) 135public 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)
83public static void Assert([DoesNotReturnIf(false)] bool condition) => 87public static void Assert([DoesNotReturnIf(false)] bool condition, [CallerArgumentExpression(nameof(condition))] string? message = null) => 91public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message) => 95public static void Assert([DoesNotReturnIf(false)] bool condition, string? message, string? detailMessage) 104public static void Assert([DoesNotReturnIf(false)] bool condition, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler message, [InterpolatedStringHandlerArgument(nameof(condition))] ref AssertInterpolatedStringHandler detailMessage) => 108public 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)
Test.Utilities (2)
Debug.cs (2)
12public static void Assert([DoesNotReturnIf(false)] bool b) => Debug.Assert(b); 16public static void Assert([DoesNotReturnIf(false)] bool b, 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))]