135 references to 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)
GenerateDocumentationAndConfigFiles (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)
53private 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.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.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.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.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)
53private 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.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.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)
53private 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)
53private 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)
199private void RequireForSingleExportProvider([DoesNotReturnIf(false)] bool condition)
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)
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)
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)
Test.Utilities (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)
53private 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)
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,