171 references to Assert
Microsoft.CodeAnalysis (171)
AssemblyUtilities.cs (2)
62RoslynDebug.Assert(PathUtilities.IsAbsolute(assemblyPath)); 63RoslynDebug.Assert(dependencyFilePaths != null);
AssemblyUtilitiesCore.cs (1)
29RoslynDebug.Assert(PathUtilities.IsAbsolute(filePath));
CaseInsensitiveComparison.cs (1)
359RoslynDebug.Assert(value != null);
CodeAnalysisResourcesLocalizableErrorArgument.cs (1)
18RoslynDebug.Assert(targetResourceId != null);
CodeGen\LocalConstantDefinition.cs (2)
26RoslynDebug.Assert(!RoslynString.IsNullOrEmpty(name)); 27RoslynDebug.Assert(compileTimeValue != null);
CodeGen\MetadataConstant.cs (1)
19RoslynDebug.Assert(type != null);
CodeGen\PermissionSetAttribute.cs (3)
40RoslynDebug.Assert(resolvedPermissionSetFilePath != null); 96RoslynDebug.Assert(resolver != null); 118RoslynDebug.Assert(stream != null);
CodeGen\PrivateImplementationDetails.cs (7)
109RoslynDebug.Assert(systemObject != null); 110RoslynDebug.Assert(systemValueType != null); 497RoslynDebug.Assert(x is object && y is object); 500RoslynDebug.Assert(x.Name != null && y.Name != null); 623RoslynDebug.Assert(name != null); 624RoslynDebug.Assert(containingType != null); 625RoslynDebug.Assert(type != null);
CodeGen\ReferenceDependencyWalker.cs (3)
47RoslynDebug.Assert(typeReference != null); 103RoslynDebug.Assert(methodReference != null); 164RoslynDebug.Assert(fieldReference != null);
CodeGen\SwitchIntegralJumpTableEmitter.cs (6)
144RoslynDebug.Assert(firstConstant != null); 148RoslynDebug.Assert(secondConstant != null); 417RoslynDebug.Assert(constant != null && 419RoslynDebug.Assert(targetLabel != null); 432RoslynDebug.Assert(constant != null && 434RoslynDebug.Assert(targetLabel != null);
CodeGen\SwitchStringJumpTableEmitter.cs (4)
76RoslynDebug.Assert(emitStringCondBranchDelegate != null); 174RoslynDebug.Assert(stringConstant != null && 176RoslynDebug.Assert(targetLabel != null); 187RoslynDebug.Assert(caseLabels != null);
Collections\ByteSequenceComparer.cs (1)
97RoslynDebug.Assert(x != null);
Collections\IdentifierCollection.cs (2)
49RoslynDebug.Assert(identifier != null); 95RoslynDebug.Assert(identifier != null);
Collections\SmallDictionary.cs (7)
203RoslynDebug.Assert(_root is object); 373RoslynDebug.Assert(unbalanced.Right is object); 385RoslynDebug.Assert(unbalanced.Left is object); 397RoslynDebug.Assert(unbalanced.Right is object); 398RoslynDebug.Assert(unbalanced.Right.Left is object); 425RoslynDebug.Assert(unbalanced.Left != null); 426RoslynDebug.Assert(unbalanced.Left.Right != null);
CommandLine\CommandLineArguments.cs (3)
392RoslynDebug.Assert(metadataResolver != null); 427RoslynDebug.Assert(metadataResolver != null); 486RoslynDebug.Assert(analyzerReference is object);
CommandLine\CommandLineParser.cs (2)
29RoslynDebug.Assert(messageProvider != null); 950RoslynDebug.Assert(arg != null);
CommandLine\NoThrowStreamDisposer.cs (2)
36RoslynDebug.Assert(_failed != null); 56RoslynDebug.Assert(_failed == null);
Compilation.EmitStream.cs (9)
60RoslynDebug.Assert(emitStreamProvider != null); 61RoslynDebug.Assert(strongNameProvider != null || emitStreamSignKind == EmitStreamSignKind.None); 107RoslynDebug.Assert(!_created); 108RoslynDebug.Assert(diagnostics != null); 121RoslynDebug.Assert(_strongNameProvider != null); 168RoslynDebug.Assert(_created); 169RoslynDebug.Assert(_emitStreamSignKind != EmitStreamSignKind.SignedWithFile || _tempInfo.HasValue); 175RoslynDebug.Assert(_emitStreamSignKind == EmitStreamSignKind.SignedWithFile); 176RoslynDebug.Assert(_strongNameProvider is object);
Compilation.EmitStreamProvider.cs (1)
63RoslynDebug.Assert(stream != null);
Compilation\Compilation.cs (6)
84RoslynDebug.Assert(!references.IsDefault); 85RoslynDebug.Assert(features != null); 1808RoslynDebug.Assert(EventQueue != null); 1831RoslynDebug.Assert(EventQueue != null); 1855RoslynDebug.Assert(incoming is object); 1864RoslynDebug.Assert(incoming is object);
Compilation\LoadDirective.cs (3)
20RoslynDebug.Assert((resolvedPath != null) || !diagnostics.IsEmpty); 21RoslynDebug.Assert(!diagnostics.IsDefault); 22RoslynDebug.Assert(diagnostics.IsEmpty || diagnostics.All(d => d.Severity == DiagnosticSeverity.Error));
ConstantValue.cs (1)
113RoslynDebug.Assert(value != null);
CvtRes.cs (1)
703RoslynDebug.Assert(keyValuePair.Value != null);
Diagnostic\Diagnostic.cs (2)
470RoslynDebug.Assert(this.ProgrammaticSuppressionInfo == null); 471RoslynDebug.Assert(programmaticSuppressionInfo != null);
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (3)
25RoslynDebug.Assert(!originalUnsuppressedDiagnostic.IsSuppressed); 26RoslynDebug.Assert(originalUnsuppressedDiagnostic.ProgrammaticSuppressionInfo == null); 27RoslynDebug.Assert(programmaticSuppressionInfo != null);
Diagnostic\DiagnosticInfo.cs (1)
101RoslynDebug.Assert(arg != null);
Diagnostic\DiagnosticWithInfo.cs (2)
26RoslynDebug.Assert(info != null); 27RoslynDebug.Assert(location != null);
Diagnostic\MetadataLocation.cs (1)
21RoslynDebug.Assert(module != null);
DiagnosticAnalyzer\AnalysisContextInfo.cs (3)
101RoslynDebug.Assert(_file.Value.AdditionalFile != null); 108RoslynDebug.Assert(_file.HasValue); 109RoslynDebug.Assert(_file.Value.SourceTree != null);
DiagnosticAnalyzer\SourceOrAdditionalFile.cs (1)
53RoslynDebug.Assert(AdditionalFile != null);
EmbeddedText.cs (8)
213RoslynDebug.Assert(stream != null); 214RoslynDebug.Assert(stream.CanRead); 215RoslynDebug.Assert(stream.CanSeek); 266RoslynDebug.Assert(bytes.Array != null); 295RoslynDebug.Assert(text != null); 296RoslynDebug.Assert(text.CanBeEmbedded); 297RoslynDebug.Assert(text.Encoding != null); 298RoslynDebug.Assert(text.PrecomputedEmbeddedTextBlob.IsDefault);
Emit\EditAndContinue\SymbolChanges.cs (1)
138RoslynDebug.Assert(synthesizedSymbol.Method != null);
EncodedStringText.cs (6)
90RoslynDebug.Assert(stream != null); 91RoslynDebug.Assert(stream.CanRead); 134RoslynDebug.Assert(data != null); 135RoslynDebug.Assert(encoding != null); 196RoslynDebug.Assert(stream != null); 197RoslynDebug.Assert(stream.Position == 0);
FileSystem\FileUtilities.cs (2)
49RoslynDebug.Assert(searchPaths != null); 50RoslynDebug.Assert(fileExists != null);
FileSystem\PathUtilities.cs (2)
438RoslynDebug.Assert(!RoslynString.IsNullOrEmpty(root)); 495RoslynDebug.Assert(assemblyDisplayNameOrPath != null);
InternalUtilities\ArrayExtensions.cs (1)
158RoslynDebug.Assert(comparer != null);
InternalUtilities\ConsList`1.cs (1)
111RoslynDebug.Assert(_tail is object);
InternalUtilities\EnumerableExtensions.cs (1)
836RoslynDebug.Assert(comparer != null);
InternalUtilities\EnumField.cs (1)
23RoslynDebug.Assert(name != null);
InternalUtilities\InterlockedOperations.cs (1)
121RoslynDebug.Assert((object?)value != null);
InternalUtilities\JsonWriter.cs (2)
280RoslynDebug.Assert(pooledBuilder == null); 319RoslynDebug.Assert(pooledBuilder is object);
InternalUtilities\MultiDictionary.cs (1)
196RoslynDebug.Assert(_value is V); // Implies value != null
PEWriter\AssemblyReferenceAlias.cs (2)
27RoslynDebug.Assert(name != null); 28RoslynDebug.Assert(assembly != null);
PEWriter\DebugSourceDocument.cs (1)
28RoslynDebug.Assert(location != null);
PEWriter\ManagedResource.cs (1)
30RoslynDebug.Assert(streamProvider == null ^ fileReference == null);
PEWriter\MemberRefComparer.cs (1)
26RoslynDebug.Assert(x is object && y is object);
PEWriter\MethodSpecComparer.cs (1)
26RoslynDebug.Assert(x is object && y is object);
PEWriter\Miscellaneous.cs (2)
243RoslynDebug.Assert(sectionBytes != null); 244RoslynDebug.Assert(relocations != null);
PEWriter\ModifiedTypeReference.cs (1)
21RoslynDebug.Assert(modifiedType != null);
PEWriter\SequencePoint.cs (1)
32RoslynDebug.Assert(document != null);
PEWriter\SourceSpan.cs (1)
28RoslynDebug.Assert(document != null);
PEWriter\UsedNamespaceOrType.cs (5)
38RoslynDebug.Assert(type != null); 44RoslynDebug.Assert(@namespace != null); 50RoslynDebug.Assert(alias != null); 56RoslynDebug.Assert(xmlNamespace != null); 57RoslynDebug.Assert(prefix != null);
ResourceDescription.cs (1)
106RoslynDebug.Assert(resource != null);
SourceGeneration\GeneratedCodeUtilities.cs (2)
21RoslynDebug.Assert(symbol != null); 22RoslynDebug.Assert(generatedCodeAttribute != null);
SpecialTypeExtensions.cs (2)
276RoslynDebug.Assert(value != null); 374RoslynDebug.Assert(value != null);
SpecialTypes.cs (1)
94RoslynDebug.Assert(name is object);
SwitchConstantValueHelper.cs (5)
52RoslynDebug.Assert(first != null); 53RoslynDebug.Assert(second != null); 55RoslynDebug.Assert(IsValidSwitchCaseLabelConstant(first)); 56RoslynDebug.Assert(IsValidSwitchCaseLabelConstant(second)); 101RoslynDebug.Assert(first != null && second != null);
Symbols\Attributes\AttributeDescription.cs (3)
23RoslynDebug.Assert(@namespace != null); 24RoslynDebug.Assert(name != null); 25RoslynDebug.Assert(signatures != null);
Symbols\Attributes\AttributeUsageInfo.cs (1)
175RoslynDebug.Assert(targetResourceIds != null);
Symbols\TypedConstant.cs (1)
160RoslynDebug.Assert(type != null);
Syntax\GreenNode.cs (1)
169RoslynDebug.Assert(node is object);
Syntax\InternalSyntax\SyntaxDiagnosticInfoList.cs (1)
138RoslynDebug.Assert(_stack is object);
Syntax\InternalSyntax\SyntaxList.cs (5)
29RoslynDebug.Assert(child0 != null); 30RoslynDebug.Assert(child1 != null); 48RoslynDebug.Assert(child0 != null); 49RoslynDebug.Assert(child1 != null); 50RoslynDebug.Assert(child2 != null);
Syntax\InternalSyntax\SyntaxList`1.cs (3)
60RoslynDebug.Assert(node is object); 66RoslynDebug.Assert(_node is object); 112RoslynDebug.Assert(_node is object);
Syntax\SyntaxNode.cs (3)
692RoslynDebug.Assert(tree != null); 778RoslynDebug.Assert(syntaxNode is object); 973RoslynDebug.Assert(node is object);
Syntax\SyntaxNodeOrTokenListBuilder.cs (3)
42RoslynDebug.Assert(innerNode is object); 77RoslynDebug.Assert(item.Node is object); 83RoslynDebug.Assert(item.UnderlyingNode is object);
Text\ChangedText.cs (2)
22RoslynDebug.Assert(newText != null); 24RoslynDebug.Assert(oldText != null);
Text\SourceText.cs (7)
292RoslynDebug.Assert(stream != null); 293RoslynDebug.Assert(encoding != null); 335RoslynDebug.Assert(buffer != null); 336RoslynDebug.Assert(encoding != null); 687RoslynDebug.Assert(algorithm != null); 696RoslynDebug.Assert(algorithm != null); 1220RoslynDebug.Assert(source != null);
Text\StringBuilderText.cs (1)
27RoslynDebug.Assert(builder != null);
Text\StringText.cs (1)
31RoslynDebug.Assert(source != null);
TreeDumper.cs (3)
80RoslynDebug.Assert(node != null); 81RoslynDebug.Assert(indent != null); 143RoslynDebug.Assert(node != null);