95 references to Assert
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
423RoslynDebug.Assert(!baseObjectCreationExpressionNode.NewKeyword.IsMissing);
Microsoft.CodeAnalysis.CSharp.Features (19)
ChangeSignature\CSharpChangeSignatureService.cs (1)
922RoslynDebug.Assert(parameterSymbol.IsParams);
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (2)
144RoslynDebug.Assert(nameRef.Parent is object); 161RoslynDebug.Assert(nameRef.Parent is object);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (12)
897RoslynDebug.Assert(oldTokens != null); 898RoslynDebug.Assert(newTokens != null); 2083RoslynDebug.Assert(node.Parent.Parent.IsKind(SyntaxKind.IndexerDeclaration)); 2095RoslynDebug.Assert(node.Parent.Parent.IsKind(SyntaxKind.IndexerDeclaration)); 2265RoslynDebug.Assert(((LocalDeclarationStatementSyntax)node.Parent!.Parent!).AwaitKeyword.IsKind(SyntaxKind.AwaitKeyword)); 2296RoslynDebug.Assert(oldNode != null || newNode != null); 2299RoslynDebug.Assert(newNode != null || match != null); 2593RoslynDebug.Assert(current.Parent is object); 2594RoslynDebug.Assert(current.Parent.Kind() == SyntaxKind.TryStatement); 2682RoslynDebug.Assert(tryStatement.Finally != null); 2738RoslynDebug.Assert(node is object); 2739RoslynDebug.Assert(node.Parent is object);
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
100RoslynDebug.Assert(node is object);
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionHelpers.cs (1)
21RoslynDebug.Assert(throwStatement.Expression != null);
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
126RoslynDebug.Assert(semanticModel != null);
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
178RoslynDebug.Assert(parent is object);
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Classification\Worker_DocumentationComments.cs (1)
161RoslynDebug.Assert(token.Parent is object);
Rename\CSharpRenameRewriterLanguageService.cs (2)
117RoslynDebug.Assert(_modifiedSubSpans != null); 524RoslynDebug.Assert(_speculativeModel != null);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
199RoslynDebug.Assert(trivia.HasStructure);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (1)
42RoslynDebug.Assert(node != null);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
45RoslynDebug.Assert(previousToken.Parent != null && currentToken.Parent != null);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (1)
219RoslynDebug.Assert(
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
ITextImageHelpers.cs (1)
77RoslynDebug.Assert(range.HasValue);
Microsoft.CodeAnalysis.Features (23)
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
521RoslynDebug.Assert(_diagnostic != null); 535RoslynDebug.Assert(_categoryToBulkConfigure != null);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (2)
85RoslynDebug.Assert(_switchTargetExpression is object); 461RoslynDebug.Assert(_switchTargetType is null);
Debugging\DebugLocationInfo.cs (1)
16RoslynDebug.Assert(name != null);
Diagnostics\Service\DocumentAnalysisExecutor.cs (8)
154RoslynDebug.Assert(_compilationWithAnalyzers != null); 171RoslynDebug.Assert(analyzer.IsCompilerAnalyzer()); 172RoslynDebug.Assert(_compilationWithAnalyzers != null); 173RoslynDebug.Assert(_compilationBasedProjectAnalyzersInAnalysisScope.Contains(analyzer) || _compilationBasedHostAnalyzersInAnalysisScope.Contains(analyzer)); 174RoslynDebug.Assert(AnalysisScope.TextDocument is Document); 196RoslynDebug.Assert(_compilationWithAnalyzers != null); 197RoslynDebug.Assert(_compilationBasedProjectAnalyzersInAnalysisScope.Contains(analyzer) || _compilationBasedHostAnalyzersInAnalysisScope.Contains(analyzer)); 231RoslynDebug.Assert(_compilationWithAnalyzers != null);
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
151RoslynDebug.Assert(location.SourceTree != null);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (3)
1948RoslynDebug.Assert(newNode != null); 1953RoslynDebug.Assert(oldNode != null); 5342RoslynDebug.Assert(attribute.AttributeClass is object);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingWorkItem.cs (1)
144RoslynDebug.Assert(DocumentId != null);
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs (1)
74RoslynDebug.Assert(options != null);
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
74RoslynDebug.Assert(invocation.Instance is not null); 102RoslynDebug.Assert(conditional.WhenFalse is not null);
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (2)
96RoslynDebug.Assert(!string.IsNullOrEmpty(targetSymbolString)); 97RoslynDebug.Assert(targetValueOperation != null);
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (4)
59RoslynDebug.Assert(_configurationItems.Length == _optionsAndLanguageNamesToRefresh.Length); 93RoslynDebug.Assert(configurationsFromClient.Length == SupportedOptions.Sum(option => option is IPerLanguageValuedOption ? 2 : 1)); 199RoslynDebug.Assert(!string.IsNullOrEmpty(optionGroupName)); 200RoslynDebug.Assert(!string.IsNullOrEmpty(option.Definition.ConfigName));
Handler\RequestContext.cs (3)
181RoslynDebug.Assert(solution is not null); 186RoslynDebug.Assert(solution is null); 187RoslynDebug.Assert(document is null);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\SolutionAssetCache.cs (1)
26RoslynDebug.Assert(Marshal.SizeOf(typeof(SharedStopwatch)) == 8);
Microsoft.CodeAnalysis.Workspaces (34)
Diagnostics\Extensions.cs (2)
147RoslynDebug.Assert(treeToAnalyze != null || additionalFileToAnalyze != null); 283RoslynDebug.Assert(additionalDocumentId != null);
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
234RoslynDebug.Assert(location.IsInSource);
src\Compilers\Core\Portable\AssemblyUtilitiesCore.cs (1)
29RoslynDebug.Assert(PathUtilities.IsAbsolute(filePath));
src\Compilers\Core\Portable\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);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
50RoslynDebug.Assert(searchPaths != null); 51RoslynDebug.Assert(fileExists != null);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
438RoslynDebug.Assert(!RoslynString.IsNullOrEmpty(root)); 495RoslynDebug.Assert(assemblyDisplayNameOrPath != null);
src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
158RoslynDebug.Assert(comparer != null);
src\Compilers\Core\Portable\InternalUtilities\ConsList`1.cs (1)
111RoslynDebug.Assert(_tail is object);
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (1)
121RoslynDebug.Assert((object?)value != null);
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (1)
196RoslynDebug.Assert(_value is V); // Implies value != null
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (2)
21RoslynDebug.Assert(symbol != null); 22RoslynDebug.Assert(generatedCodeAttribute != null);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextLineExtensions.cs (1)
68RoslynDebug.Assert(text is object);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
1179RoslynDebug.Assert(object.Equals(parameter2.ExplicitDefaultValue, 0.0));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
242RoslynDebug.Assert(node.SpilloverEdges is null);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (2)
83RoslynDebug.Assert(beginningNode is object); 84RoslynDebug.Assert(endNode is object);
TemporaryStorage\TemporaryStorageService.DirectMemoryAccessStreamReader.cs (2)
22RoslynDebug.Assert(src != null); 23RoslynDebug.Assert(length >= 0);
Workspace\Solution\Document.cs (2)
499RoslynDebug.Assert(tree is object); 500RoslynDebug.Assert(oldTree is object);
Workspace\Solution\DocumentState.cs (3)
554RoslynDebug.Assert(TreeSource != null); 601RoslynDebug.Assert(TreeSource != null); 613RoslynDebug.Assert(TreeSource != null);
Workspace\Solution\ProjectDependencyGraph.cs (1)
492RoslynDebug.Assert(referencesMap is object);
Workspace\Solution\SolutionState_Checksum.cs (1)
143RoslynDebug.Assert(Equals(projectConeTemp, stateChecksums.ProjectCone));
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (2)
1671RoslynDebug.Assert(attributeNode.Parent is AttributeListSyntax); 1679RoslynDebug.Assert(attributeNode.Parent is AttributeListSyntax);