19 references to ThrowIfNull
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
87Contract.ThrowIfNull(typeInferenceService, nameof(typeInferenceService));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
ReassignedVariable\CSharpReassignedVariableService.cs (1)
84Contract.ThrowIfNull(current, "Couldn't find a suitable parent of this local declaration");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (2)
273Contract.ThrowIfNull(nonTerminalNode, @"Malformed code or bug in parser???"); 286Contract.ThrowIfNull(nonTerminalNode, @"Malformed code or bug in parser???");
Microsoft.CodeAnalysis.Features (4)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
546Contract.ThrowIfNull(containingMember,
EditAndContinue\EditAndContinueService.cs (1)
184Contract.ThrowIfNull(debuggingSession, "Debugging session has not started.");
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
439Contract.ThrowIfNull(parameterSymbol, "We filtered out varags methods earlier.");
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
395Contract.ThrowIfNull(compilation, "We are trying to produce a key for a language that doesn't support compilations.");
Microsoft.CodeAnalysis.Workspaces (11)
Remote\RemoteArguments.cs (1)
63Contract.ThrowIfNull(project, WorkspacesResources.Symbols_project_could_not_be_found_in_the_provided_solution);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
312Contract.ThrowIfNull(_cachedResult, $"We called {nameof(CompleteWithTask)} with a result, there should be a cached result.");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (3)
54Contract.ThrowIfNull(concatenatedLowerCaseWords, nameof(_concatenatedLowerCaseWords)); 67Contract.ThrowIfNull(value, nameof(value)); 68Contract.ThrowIfNull(_concatenatedLowerCaseWords, nameof(_concatenatedLowerCaseWords));
TemporaryStorage\TemporaryStorageService.cs (2)
187Contract.ThrowIfNull(storageIdentifier.Name, $"{nameof(GetStreamHandle)} should only be called for VS on Windows (where named memory mapped files as supported)"); 198Contract.ThrowIfNull(storageIdentifier.Name, $"{nameof(GetTextHandle)} should only be called for VS on Windows (where named memory mapped files as supported)");
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
454Contract.ThrowIfNull(documentInfo.FilePath, "We shouldn't be adding documents without file paths.");
Workspace\Solution\Solution.cs (2)
338Contract.ThrowIfNull(generatedDocument, "The call to GetDocumentState found a SourceGeneratedDocumentState, so we should have found it now."); 1678Contract.ThrowIfNull(newDocumentState, "Because we just froze this document, it should always exist.");
Workspace\Workspace_Editor.cs (1)
272Contract.ThrowIfNull(currentContextId, "The document is open, so we should have had some context ID.");