221 references to Contract
Microsoft.CodeAnalysis.CodeStyle (221)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
59Contract.ThrowIfFalse(option.Value is ForEachExplicitCastInSourcePreference.Always or ForEachExplicitCastInSourcePreference.WhenStronglyTyped);
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (2)
62Contract.ThrowIfNull(change.NewText); 89Contract.ThrowIfNull(change.NewText);
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (3)
213Contract.ThrowIfTrue(additionalLocations.IsEmpty()); 214Contract.ThrowIfTrue(tagIndices.IsEmpty()); 224Contract.ThrowIfFalse(indices.All(idx => idx >= 0 && idx < additionalLocationsLength));
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (2)
124Contract.ThrowIfFalse(context.FilterSpan != symbolStartAnalyzer._symbolStartAnalysisContext.FilterSpan); 125Contract.ThrowIfNull(symbolStartAnalyzer._symbolStartAnalysisContext.FilterTree);
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (3)
79Contract.ThrowIfNull(expression.SemanticModel); 139Contract.ThrowIfNull(operation.SemanticModel); 158Contract.ThrowIfNull(operation.SemanticModel);
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
207Contract.ThrowIfNull(context.FilterTree); 486Contract.ThrowIfFalse(TryGetSyntax(getterField, out var fieldDeclaration, out var variableDeclarator, cancellationToken));
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerAnalyzer.cs (1)
147Contract.ThrowIfTrue(seenInvocation && seenIndexAssignment);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (2)
229Contract.ThrowIfTrue(arguments.Count == 0); 230Contract.ThrowIfFalse(this.SyntaxFacts.IsSimpleMemberAccessExpression(memberAccess));
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
81Contract.ThrowIfNull(semanticModel);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\ImmutableIntervalTree`1.cs (2)
237Contract.ThrowIfTrue(leftMaxEndValue < 0 && rightMaxEndValue < 0); 248Contract.ThrowIfFalse(rightMaxEndValue > leftMaxEndValue);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.NodeEnumerator.cs (2)
78Contract.ThrowIfTrue(_currentNodeHasValue); 79Contract.ThrowIfTrue(_stack.Count == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSeparatedSyntaxNodeList.cs (1)
27Contract.ThrowIfTrue(nodesAndTokens.IsDefault);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
72Contract.ThrowIfFalse(surrogateChar == 0 || rune == Rune.ReplacementChar,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (4)
166Contract.ThrowIfNull(context.FilterTree); 167Contract.ThrowIfFalse(context.FilterSpan.HasValue); 178Contract.ThrowIfNull(context.FilterTree); 179Contract.ThrowIfFalse(context.FilterSpan.HasValue);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (1)
23Contract.ThrowIfFalse(option.Definition.IsEditorConfigOption);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (3)
331Contract.ThrowIfNull(classOrStructType); 332Contract.ThrowIfNull(interfacesOrAbstractClasses); 333Contract.ThrowIfNull(isImplemented);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
498Contract.ThrowIfFalse(symbol.IsNormalAnonymousType());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (7)
88Contract.ThrowIfNull(symbol); 89Contract.ThrowIfNull(within); 177Contract.ThrowIfNull(type); 215Contract.ThrowIfNull(assembly); 252Contract.ThrowIfNull(containingType); 429Contract.ThrowIfNull(withinType); 430Contract.ThrowIfNull(originalContainingType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (1)
15Contract.ThrowIfNull(location.SourceTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (1)
108Contract.ThrowIfTrue(b1 != b2);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (3)
109Contract.ThrowIfNull(semanticModel.ParentModel); 110Contract.ThrowIfTrue(semanticModel.ParentModel.IsSpeculativeSemanticModel); 111Contract.ThrowIfTrue(semanticModel.ParentModel.ParentModel != null);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
19Contract.ThrowIfNull(text);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (2)
49Contract.ThrowIfNull(stack); 50Contract.ThrowIfNull(range);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (10)
16Contract.ThrowIfNull(line); 31Contract.ThrowIfNull(line); 46Contract.ThrowIfNull(lineText); 57Contract.ThrowIfNull(lineText); 208Contract.ThrowIfNull(line); 209Contract.ThrowIfFalse(0 <= endPosition && endPosition <= line.Length); 210Contract.ThrowIfFalse(tabSize > 0); 217Contract.ThrowIfNull(line); 218Contract.ThrowIfFalse(column >= 0); 219Contract.ThrowIfFalse(tabSize > 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
107Contract.ThrowIfNull(node); 179Contract.ThrowIfTrue(node1.RawKind == 0 || node2.RawKind == 0); 298Contract.ThrowIfNull(nodes); 299Contract.ThrowIfFalse(nodes.Any());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
41Contract.ThrowIfTrue(token1.RawKind == 0 || token2.RawKind == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (2)
69Contract.ThrowIfNull(syntaxTree); 131Contract.ThrowIfNull(syntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
34Contract.ThrowIfNull(formattingRules);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (4)
58Contract.ThrowIfNull(engine); 59Contract.ThrowIfNull(tokenStream); 125Contract.ThrowIfNull(operations); 414Contract.ThrowIfFalse(intervals.Length == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (3)
35Contract.ThrowIfNull(tokenStream); 36Contract.ThrowIfNull(formattingRules); 37Contract.ThrowIfNull(rootNode);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
32Contract.ThrowIfNull(node); 33Contract.ThrowIfNull(formattingResults);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (1)
94Contract.ThrowIfTrue(treeData.Root.IsInvalidTokenRange(startToken, endToken));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (6)
52Contract.ThrowIfFalse(triviaInfo.LineBreaks == 0); 85Contract.ThrowIfFalse(triviaInfo.LineBreaks == 0); 123Contract.ThrowIfFalse(triviaInfo.LineBreaks == 0); 262Contract.ThrowIfNull(previousChangesMap); 451Contract.ThrowIfFalse(triviaInfo.SecondTokenIsFirstTokenOnLine); 478Contract.ThrowIfFalse(baseToken.RawKind != 0 && startToken.RawKind != 0 && endToken.RawKind != 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.AbstractComplexTrivia.cs (3)
23Contract.ThrowIfNull(treeInfo); 76Contract.ThrowIfFalse(line > 0); 133Contract.ThrowIfFalse(list.Count > 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (4)
31Contract.ThrowIfNull(treeInfo); 92Contract.ThrowIfFalse(space >= 0); 111Contract.ThrowIfFalse(lineBreaks >= 0); 112Contract.ThrowIfFalse(indentation >= 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.ModifiedWhitespace.cs (1)
27Contract.ThrowIfNull(original);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.Whitespace.cs (2)
27Contract.ThrowIfFalse(space >= 0); 57Contract.ThrowIfFalse(line > 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
34Contract.ThrowIfNull(formattingRules);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (4)
30Contract.ThrowIfNull(tokenStream); 31Contract.ThrowIfFalse((indexInStream == -1) || (0 <= indexInStream && indexInStream < tokenStream.TokenCount)); 64Contract.ThrowIfFalse(this.TokenStream == other.TokenStream); 84Contract.ThrowIfNull(commonRoot);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenPairWithOperations.cs (2)
28Contract.ThrowIfNull(tokenStream); 30Contract.ThrowIfFalse(0 <= tokenPairIndex && tokenPairIndex < tokenStream.TokenCount - 1);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (10)
138Contract.ThrowIfFalse(0 <= index && index < this.TokenCount); 237Contract.ThrowIfNull(data); 243Contract.ThrowIfNull(data); 249Contract.ThrowIfNull(data); 250Contract.ThrowIfFalse(0 <= pairIndex && pairIndex < this.TokenCount - 1); 429Contract.ThrowIfFalse(this.FormatBeginningOfTree); 441Contract.ThrowIfFalse(this.FormatEndOfTree); 453Contract.ThrowIfFalse(0 <= pairIndex && pairIndex < this.TokenCount - 1); 465Contract.ThrowIfFalse(0 <= pairIndex && pairIndex < this.TokenCount - 1); 478Contract.ThrowIfTrue(token.RawKind == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.cs (1)
41Contract.ThrowIfNull(root);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Debug.cs (1)
19Contract.ThrowIfFalse(text == _debugNodeData.GetTextBetween(token1, token2));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (2)
18Contract.ThrowIfFalse(root.GetFirstToken(includeZeroWidth: true).RawKind != 0); 23Contract.ThrowIfTrue(token.RawKind == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (2)
20Contract.ThrowIfNull(text); 26Contract.ThrowIfTrue(token.RawKind == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (1)
22Contract.ThrowIfFalse(trivia.HasStructure);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
184Contract.ThrowIfFalse(lines.Length > 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\AdjustNewLinesOperation.cs (3)
16Contract.ThrowIfFalse(option != AdjustNewLinesOption.ForceLines || line > 0); 17Contract.ThrowIfFalse(option != AdjustNewLinesOption.PreserveLines || line >= 0); 18Contract.ThrowIfFalse(option != AdjustNewLinesOption.ForceLinesIfOnSingleLine || line > 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\AdjustSpacesOperation.cs (1)
16Contract.ThrowIfFalse(space >= 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\AlignTokensOperation.cs (1)
18Contract.ThrowIfNull(tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\AnchorIndentationOperation.cs (3)
18Contract.ThrowIfTrue(anchorToken.RawKind == 0); 19Contract.ThrowIfTrue(textSpan.Start < 0 || textSpan.Length < 0); 21Contract.ThrowIfTrue(endToken.RawKind == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\IndentBlockOperation.cs (10)
17Contract.ThrowIfFalse(option.IsMaskOn(IndentBlockOption.PositionMask)); 19Contract.ThrowIfTrue(textSpan.Start < 0 || textSpan.Length < 0); 20Contract.ThrowIfTrue(startToken.RawKind == 0); 21Contract.ThrowIfTrue(endToken.RawKind == 0); 36Contract.ThrowIfFalse(option.IsMaskOn(IndentBlockOption.PositionMask)); 38Contract.ThrowIfFalse(option.IsMaskOn(IndentBlockOption.RelativePositionMask)); 39Contract.ThrowIfFalse(baseToken.Span.End <= textSpan.Start); 41Contract.ThrowIfTrue(textSpan.Start < 0 || textSpan.Length < 0); 42Contract.ThrowIfTrue(startToken.RawKind == 0); 43Contract.ThrowIfTrue(endToken.RawKind == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\SuppressOperation.cs (3)
22Contract.ThrowIfTrue(textSpan.Start < 0 || textSpan.Length < 0); 23Contract.ThrowIfTrue(startToken.RawKind == 0); 24Contract.ThrowIfTrue(endToken.RawKind == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (6)
72Contract.ThrowIfNull(context); 73Contract.ThrowIfNull(formattingRules); 74Contract.ThrowIfNull(originalString); 76Contract.ThrowIfFalse(lineBreaks >= 0); 77Contract.ThrowIfFalse(spaces >= 0); 79Contract.ThrowIfTrue(token1 == default && token2 == default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (1)
21Contract.ThrowIfNull(s_currentLogger);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
55Contract.ThrowIfTrue(RoslynString.IsNullOrEmpty(editorConfigStringForValue));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
52Contract.ThrowIfNull(documentationComment);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
29Contract.ThrowIfNull(node);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (5)
22Contract.ThrowIfFalse(IsBodyLevelSymbol(symbol)); 23Contract.ThrowIfTrue(symbol.DeclaringSyntaxReferences.IsEmpty && symbol.Locations.IsEmpty); 62Contract.ThrowIfTrue(symbol.DeclaringSyntaxReferences.IsEmpty && symbol.Locations.IsEmpty); 66Contract.ThrowIfFalse(locations.All(loc => loc.IsInSource)); 258Contract.ThrowIfTrue(semanticModel.SyntaxTree != containerDeclaration.SyntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
48Contract.ThrowIfNull(returnTypeSymbol);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ErrorTypeSymbolKey.cs (2)
86Contract.ThrowIfFalse(typeArguments.IsDefault); 91Contract.ThrowIfTrue(typeArguments.IsDefault);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.FunctionPointerTypeSymbolKey.cs (2)
71Contract.ThrowIfFalse(parameterTypes.IsDefault); 76Contract.ThrowIfTrue(parameterTypes.IsDefault);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
64Contract.ThrowIfFalse(typeArguments.IsDefault); 70Contract.ThrowIfTrue(typeArguments.IsDefault);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (5)
126Contract.ThrowIfNull(result); 417Contract.ThrowIfTrue(_methodSymbolStack.Count == 0); 418Contract.ThrowIfFalse(Equals(method, _methodSymbolStack[^1])); 433Contract.ThrowIfTrue(_contextualSymbolStack.Count == 0); 434Contract.ThrowIfFalse(Equals(contextualSymbol, _contextualSymbolStack.Peek()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (2)
518Contract.ThrowIfTrue(_methodSymbolStack.Count == 0); 519Contract.ThrowIfFalse(method.Equals(_methodSymbolStack[^1]));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TypeParameterOrdinalSymbolKey.cs (1)
15Contract.ThrowIfFalse(symbol.TypeParameterKind == TypeParameterKind.Method);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\TestHooks\TaskExtensions.cs (2)
53Contract.ThrowIfNull(task, nameof(task)); 90Contract.ThrowIfNull(task, nameof(task));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
103Contract.ThrowIfNull(ra.Data);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (12)
115Contract.ThrowIfNull(asynchronousComputeFunction); 139Contract.ThrowIfTrue(Monitor.IsEntered(SyncObject), "Attempt to take the lock while already holding it!"); 152Contract.ThrowIfFalse(Monitor.IsEntered(asyncLazy.SyncObject)); 161Contract.ThrowIfTrue(_asynchronousComputationCancellationSource != null && 165Contract.ThrowIfTrue(_requests != null && 170Contract.ThrowIfTrue(_requests != null && 174Contract.ThrowIfTrue(_cachedResult != null && 179Contract.ThrowIfTrue(_asynchronousComputeFunction == null && _synchronousComputeFunction != null); 259Contract.ThrowIfNull(_synchronousComputeFunction); 311Contract.ThrowIfNull(_cachedResult, $"We called {nameof(CompleteWithTask)} with a result, there should be a cached result."); 376Contract.ThrowIfTrue(_computationActive); 377Contract.ThrowIfNull(_asynchronousComputeFunction);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (7)
53Contract.ThrowIfNull(concatenatedLowerCaseWords, nameof(_concatenatedLowerCaseWords)); 54Contract.ThrowIfTrue(nodes.IsDefault, $"{nameof(nodes)}.{nameof(nodes.IsDefault)}"); 55Contract.ThrowIfTrue(edges.IsDefault, $"{nameof(edges)}.{nameof(edges.IsDefault)}"); 66Contract.ThrowIfNull(value, nameof(value)); 67Contract.ThrowIfNull(_concatenatedLowerCaseWords, nameof(_concatenatedLowerCaseWords)); 68Contract.ThrowIfTrue(_nodes.IsDefault, $"{nameof(_nodes)}.{nameof(_nodes.IsDefault)}"); 69Contract.ThrowIfTrue(_edges.IsDefault, $"{nameof(_edges)}.{nameof(_edges.IsDefault)}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (15)
48Contract.ThrowIfNull(root); 49Contract.ThrowIfFalse(spans.Count > 0); 84Contract.ThrowIfNull(root); 85Contract.ThrowIfTrue(textSpan.IsEmpty); 124Contract.ThrowIfFalse(startToken.Equals(endToken) || startToken.Span.End <= endToken.SpanStart); 148Contract.ThrowIfNull(tree); 149Contract.ThrowIfTrue(token.RawKind == 0); 170Contract.ThrowIfTrue(token1.RawKind == 0 && token2.RawKind == 0); 171Contract.ThrowIfTrue(token1.Equals(token2)); 286Contract.ThrowIfFalse(backwardPosition < parentNode.FullSpan.End); 290Contract.ThrowIfTrue(nextToken.RawKind == 0); 311Contract.ThrowIfNull(parentNode); 312Contract.ThrowIfFalse(parentNode.FullSpan.Start < forwardPosition); 316Contract.ThrowIfTrue(previousToken.RawKind == 0); 360Contract.ThrowIfNull(root);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
113Contract.ThrowIfFalse(_table.Remove(key));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (5)
52Contract.ThrowIfTrue(_index + values.Length > _values.Length); 59Contract.ThrowIfTrue(_index + values.Count > _values.Length); 66Contract.ThrowIfTrue(_index + values.Count > _values.Length); 73Contract.ThrowIfTrue(_index + values.Count > _values.Length); 107Contract.ThrowIfTrue(_index != _values.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
172=> Contract.ThrowIfFalse(LockHeldByMe());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposable.cs (1)
292Contract.ThrowIfNull(weakInstance);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (8)
89Contract.ThrowIfNull(continuationAction, nameof(continuationAction)); 108Contract.ThrowIfNull(continuationFunction, nameof(continuationFunction)); 122Contract.ThrowIfNull(continuationAction, nameof(continuationAction)); 154Contract.ThrowIfNull(continuationFunction, nameof(continuationFunction)); 199Contract.ThrowIfNull(continuationFunction, nameof(continuationFunction)); 318Contract.ThrowIfNull(continuationFunction, nameof(continuationFunction)); 381Contract.ThrowIfFalse(task.IsCompleted); 397Contract.ThrowIfFalse(task.IsCompleted);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ValueTaskExtensions.cs (1)
21Contract.ThrowIfFalse(task.IsCompleted, message);