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