203 references to ThrowIfNull
Microsoft.CodeAnalysis.CodeStyle (79)
AbstractAggregatedFormattingResult.cs (2)
32Contract.ThrowIfNull(node); 33Contract.ThrowIfNull(formattingResults);
AbstractDocumentationCommentService.cs (1)
52Contract.ThrowIfNull(documentationComment);
AbstractFormatEngine.OperationApplier.cs (1)
271Contract.ThrowIfNull(previousChangesMap);
AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
36Contract.ThrowIfNull(options);
AbstractSimplifyInterpolationHelpers.cs (3)
79Contract.ThrowIfNull(expression.SemanticModel); 139Contract.ThrowIfNull(operation.SemanticModel); 158Contract.ThrowIfNull(operation.SemanticModel);
AbstractTriviaDataFactory.AbstractComplexTrivia.cs (1)
27Contract.ThrowIfNull(treeInfo);
AbstractTriviaDataFactory.cs (1)
25Contract.ThrowIfNull(treeInfo);
AbstractTriviaDataFactory.ModifiedWhitespace.cs (1)
27Contract.ThrowIfNull(original);
AbstractTriviaFormatter.cs (3)
72Contract.ThrowIfNull(context); 73Contract.ThrowIfNull(formattingRules); 74Contract.ThrowIfNull(originalString);
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
80Contract.ThrowIfNull(semanticModel);
AlignTokensOperation.cs (1)
18Contract.ThrowIfNull(tokens);
AnnotationTable.cs (1)
108Contract.ThrowIfNull(ra.Data);
AsyncLazy`1.cs (3)
114Contract.ThrowIfNull(asynchronousComputeFunction); 248Contract.ThrowIfNull(_synchronousComputeFunction); 361Contract.ThrowIfNull(_asynchronousComputeFunction);
BottomUpBaseIndentationFinder.cs (1)
34Contract.ThrowIfNull(formattingRules);
ChainedFormattingRules.cs (1)
33Contract.ThrowIfNull(formattingRules);
CommonFormattingHelpers.cs (5)
44Contract.ThrowIfNull(root); 80Contract.ThrowIfNull(root); 144Contract.ThrowIfNull(tree); 307Contract.ThrowIfNull(parentNode); 362Contract.ThrowIfNull(root);
FormattingContext.cs (3)
59Contract.ThrowIfNull(engine); 60Contract.ThrowIfNull(tokenStream); 125Contract.ThrowIfNull(operations);
FormattingContext.InitialContextFinder.cs (3)
32Contract.ThrowIfNull(tokenStream); 33Contract.ThrowIfNull(formattingRules); 34Contract.ThrowIfNull(rootNode);
ImmutableHashMapExtensions.cs (2)
28Contract.ThrowIfNull(valueProvider); 31Contract.ThrowIfNull(map);
INamedTypeSymbolExtensions.cs (3)
338Contract.ThrowIfNull(classOrStructType); 339Contract.ThrowIfNull(interfacesOrAbstractClasses); 340Contract.ThrowIfNull(isImplemented);
ISymbolExtensions_Accessibility.cs (7)
88Contract.ThrowIfNull(symbol); 89Contract.ThrowIfNull(within); 183Contract.ThrowIfNull(type); 221Contract.ThrowIfNull(assembly); 258Contract.ThrowIfNull(containingType); 435Contract.ThrowIfNull(withinType); 436Contract.ThrowIfNull(originalContainingType);
ISyntaxFactsExtensions.cs (1)
29Contract.ThrowIfNull(node);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs\StringExtensions.cs (6)
16Contract.ThrowIfNull(line); 31Contract.ThrowIfNull(line); 46Contract.ThrowIfNull(lineText); 57Contract.ThrowIfNull(lineText); 208Contract.ThrowIfNull(line); 217Contract.ThrowIfNull(line);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
69Contract.ThrowIfNull(syntaxTree); 131Contract.ThrowIfNull(syntaxTree);
ListExtensions.cs (2)
68Contract.ThrowIfNull(list); 69Contract.ThrowIfNull(predicate);
LocationExtensions.cs (1)
15Contract.ThrowIfNull(location.SourceTree);
Logger.LogBlock.cs (1)
21Contract.ThrowIfNull(s_currentLogger);
ReferenceCountedDisposable.cs (1)
294Contract.ThrowIfNull(weakInstance);
SemanticModelExtensions.cs (1)
109Contract.ThrowIfNull(semanticModel.ParentModel);
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
82Contract.ThrowIfNull(options);
SourceTextExtensions_SharedWithCodeStyle.cs (1)
19Contract.ThrowIfNull(text);
StackExtensions.cs (2)
34Contract.ThrowIfNull(stack); 35Contract.ThrowIfNull(range);
SymbolKey.BuiltinOperatorSymbolKey.cs (1)
48Contract.ThrowIfNull(returnTypeSymbol);
SymbolKey.SymbolKeyReader.cs (1)
126Contract.ThrowIfNull(result);
SyntaxNodeExtensions.cs (6)
102Contract.ThrowIfNull(node); 292Contract.ThrowIfNull(root); 293Contract.ThrowIfNull(pairs); 306Contract.ThrowIfNull(root); 307Contract.ThrowIfNull(pairs); 315Contract.ThrowIfNull(nodes);
TokenData.cs (1)
25Contract.ThrowIfNull(tokenStream);
TokenPairWithOperations.cs (1)
28Contract.ThrowIfNull(tokenStream);
TokenStream.cs (3)
237Contract.ThrowIfNull(data); 243Contract.ThrowIfNull(data); 249Contract.ThrowIfNull(data);
TreeData.cs (1)
42Contract.ThrowIfNull(root);
TreeData.NodeAndText.cs (1)
20Contract.ThrowIfNull(text);
Microsoft.CodeAnalysis.CodeStyle.Fixes (31)
AbstractAddAccessibilityModifiersCodeFixProvider.cs (1)
54Contract.ThrowIfNull(symbol);
AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
78Contract.ThrowIfNull(obsoleteAttribute);
AbstractFlagsEnumGenerator.cs (5)
80Contract.ThrowIfNull(enumType.EnumUnderlyingType); 121Contract.ThrowIfNull(finalNode); 151Contract.ThrowIfNull(field.ConstantValue); 174Contract.ThrowIfNull(enumType.EnumUnderlyingType); 190Contract.ThrowIfNull(enumType.EnumUnderlyingType);
AbstractForEachCastCodeFixProvider.cs (2)
70Contract.ThrowIfNull(variableDeclarator.Symbol.Type); 71Contract.ThrowIfNull(enumerableType);
AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
81Contract.ThrowIfNull(symbol);
AbstractMakeMethodAsynchronousCodeFixProvider.cs (2)
110Contract.ThrowIfNull(node); 117Contract.ThrowIfNull(methodSymbol);
AbstractMakeMethodSynchronousCodeFixProvider.cs (2)
59Contract.ThrowIfNull(methodSymbol); 256Contract.ThrowIfNull(currentInvocationExpression);
AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
82Contract.ThrowIfNull(newRoot);
AbstractRemoveUnusedMembersCodeFixProvider.cs (2)
59Contract.ThrowIfNull(symbol); 72Contract.ThrowIfNull(fieldDeclarator);
AbstractRemoveUnusedValuesCodeFixProvider.cs (5)
485Contract.ThrowIfNull(variableDeclarator); 591Contract.ThrowIfNull(type); 592Contract.ThrowIfNull(newLocalNameOpt); 853Contract.ThrowIfNull(declStatement); 894Contract.ThrowIfNull(rootWithRemovedDeclaration);
AbstractUseCollectionInitializerCodeFixProvider.cs (1)
94Contract.ThrowIfNull(statement);
AbstractUseNullPropagationCodeFixProvider.cs (1)
161Contract.ThrowIfNull(newWhenTrueStatement);
AbstractUseObjectInitializerCodeFixProvider.cs (1)
95Contract.ThrowIfNull(statement);
AddAccessibilityModifiersHelpers.cs (1)
17Contract.ThrowIfNull(symbol);
CodeGenerationHelpers.cs (1)
182Contract.ThrowIfNull(attribute);
NamingStyleCodeFixProvider.cs (1)
53Contract.ThrowIfNull(serializedNamingStyle);
SimplificationHelpers.cs (1)
66Contract.ThrowIfNull(expression);
UseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
73Contract.ThrowIfNull(expression); // checked in analyzer.
UseExplicitTupleNameCodeFixProvider.cs (1)
50Contract.ThrowIfNull(preferredName);
Microsoft.CodeAnalysis.CSharp.CodeStyle (46)
AnalyzedPattern.cs (1)
31Contract.ThrowIfNull(operation.SemanticModel);
ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (3)
45Contract.ThrowIfNull(dataFlow); 64Contract.ThrowIfNull(declaration); 70Contract.ThrowIfNull(beforeSwitch);
CSharpAddBracesDiagnosticAnalyzer.cs (1)
58Contract.ThrowIfNull(embeddedStatement);
CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
133Contract.ThrowIfNull(isPatternExpression);
CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (7)
35Contract.ThrowIfNull(semanticModel); 36Contract.ThrowIfNull(localSymbol); 37Contract.ThrowIfNull(comparison); 38Contract.ThrowIfNull(operand); 283Contract.ThrowIfNull(statement); 309Contract.ThrowIfNull(scope); 377Contract.ThrowIfNull(dataFlow);
CSharpInferredMemberNameSimplifier.cs (2)
64Contract.ThrowIfNull(toRemove.NameColon); 86Contract.ThrowIfNull(toRemove.NameEquals);
CSharpInlineDeclarationDiagnosticAnalyzer.cs (2)
260Contract.ThrowIfNull(nextStatement); 265Contract.ThrowIfNull(dataFlow);
CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
128Contract.ThrowIfNull(semanticModel);
CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (2)
125Contract.ThrowIfNull(currentOptionsDirective); 157Contract.ThrowIfNull(currentOptionsDirective);
CSharpSmartTokenFormatter.cs (1)
36Contract.ThrowIfNull(root);
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
38Contract.ThrowIfNull(options);
CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
199Contract.ThrowIfNull(semanticModel);
CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
91Contract.ThrowIfNull(semanticModel);
CSharpUseRangeOperatorDiagnosticAnalyzer.cs (4)
85Contract.ThrowIfNull(semanticModel); 148Contract.ThrowIfNull(invocation.Instance); 165Contract.ThrowIfNull(invocation.Instance); 214Contract.ThrowIfNull(invocation.Instance);
FormattingHelpers.cs (1)
486Contract.ThrowIfNull(node);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
489Contract.ThrowIfNull(syntaxTree);
SemanticModelExtensions.cs (1)
170Contract.ThrowIfNull(@using.NamespaceOrType);
SyntaxTriviaExtensions.cs (2)
121Contract.ThrowIfNull(trivia); 137Contract.ThrowIfNull(trivia);
TriviaDataFactory.FormattedComplexTrivia.cs (3)
32Contract.ThrowIfNull(context); 33Contract.ThrowIfNull(formattingRules); 34Contract.ThrowIfNull(originalString);
TriviaDataFactory.ModifiedComplexTrivia.cs (1)
24Contract.ThrowIfNull(original);
TriviaRewriter.cs (2)
34Contract.ThrowIfNull(node); 35Contract.ThrowIfNull(map);
TypeStyleHelper.cs (1)
133Contract.ThrowIfNull(containingType);
UseExpressionBodyHelper`1.cs (1)
84Contract.ThrowIfNull(body);
UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
87Contract.ThrowIfNull(semanticModel);
UsingsAndExternAliasesDirectiveComparer.cs (2)
128Contract.ThrowIfNull(using1!.Name); 129Contract.ThrowIfNull(using2!.Name);
UsingsAndExternAliasesOrganizer.cs (2)
84Contract.ThrowIfNull(using1.Name); 85Contract.ThrowIfNull(using2.Name);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (30)
AbstractAssignOutParametersCodeFixProvider.cs (1)
111Contract.ThrowIfNull(parameterList);
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
113Contract.ThrowIfNull(nextStatement);
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (6)
94Contract.ThrowIfNull(_assignmentTarget); 210Contract.ThrowIfNull(result); 237Contract.ThrowIfNull(armExpression); 279Contract.ThrowIfNull(node.Expression); 285Contract.ThrowIfNull(node.Expression); 294Contract.ThrowIfNull(result);
CSharpAddImportsService.cs (1)
140Contract.ThrowIfNull(rewritten);
CSharpAsAndMemberAccessCodeFixProvider.cs (2)
66Contract.ThrowIfNull(parent); 126Contract.ThrowIfNull(binaryExpression);
CSharpCodeGenerationHelpers.cs (2)
114Contract.ThrowIfNull(syntax); 268Contract.ThrowIfNull(symbol);
CSharpConvertTypeOfToNameOfCodeFixProvider.cs (1)
35Contract.ThrowIfNull(typeSymbol);
CSharpForEachCastCodeFixProvider.cs (1)
33Contract.ThrowIfNull(result);
CSharpIndentationService.cs (2)
54Contract.ThrowIfNull(formattingRules); 55Contract.ThrowIfNull(root);
CSharpIndentationService.Indenter.cs (2)
76Contract.ThrowIfNull(indenter.Tree); 127Contract.ThrowIfNull(interpolatedExpression);
CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (1)
79Contract.ThrowIfNull(currentAccessorList);
CSharpRemoveUnnecessaryImportsService.cs (1)
57Contract.ThrowIfNull(formattingOptions);
CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
46Contract.ThrowIfNull(compilationOptions);
CSharpUseNameofInAttributeCodeFixProvider.cs (1)
52Contract.ThrowIfNull(name);
CSharpUseRangeOperatorCodeFixProvider.cs (2)
147Contract.ThrowIfNull(instance); 199Contract.ThrowIfNull(result.Op2);
MakeLocalFunctionStaticCodeFixHelper.cs (1)
219Contract.ThrowIfNull(symbolType);
NamedTypeGenerator.cs (1)
228Contract.ThrowIfNull(invokeMethod);
TypeDeclarationSyntaxExtensions.cs (1)
71Contract.ThrowIfNull(typeNode);
UseUtf8StringLiteralCodeFixProvider.cs (2)
53Contract.ThrowIfNull(readOnlySpanType); 61Contract.ThrowIfNull(arrayOp.Initializer);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (2)
CSharpRemoveRedundantNullableDirectiveTests.cs (1)
255Contract.ThrowIfNull(compilationOptions);
CSharpRemoveUnnecessaryNullableDirectiveTests.cs (1)
242Contract.ThrowIfNull(compilationOptions);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (12)
SyntaxNodeExtensions.vb (1)
114Contract.ThrowIfNull(node)
SyntaxTreeExtensions.vb (1)
239Contract.ThrowIfNull(syntaxTree)
TriviaDataFactory.ComplexTrivia.vb (1)
22Contract.ThrowIfNull(treeInfo)
TriviaDataFactory.FormattedComplexTrivia.vb (3)
27Contract.ThrowIfNull(context) 28Contract.ThrowIfNull(formattingRules) 29Contract.ThrowIfNull(originalString)
TriviaDataFactory.ModifiedComplexTrivia.vb (1)
19Contract.ThrowIfNull(original)
TriviaDataFactory.TriviaRewriter.vb (2)
24Contract.ThrowIfNull(node) 25Contract.ThrowIfNull(map)
VisualBasicFormatEngine.vb (1)
34Contract.ThrowIfNull(tokenStream)
VisualBasicSemanticFacts.vb (1)
134Contract.ThrowIfNull(model)
VisualBasicSmartTokenFormatter.vb (1)
26Contract.ThrowIfNull(root)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
StringExtensions.vb (2)
62Contract.ThrowIfNull(text) 91Contract.ThrowIfNull(text)
VisualBasicRemoveUnnecessaryImportsService.vb (1)
32Contract.ThrowIfNull(formattingOptions)