12 references to ThrowIfNull
Microsoft.CodeAnalysis.Workspaces (12)
Remote\RemoteArguments.cs (1)
63Contract.ThrowIfNull(project, WorkspacesResources.Symbols_project_could_not_be_found_in_the_provided_solution);
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (3)
53Contract.ThrowIfNull(concatenatedLowerCaseWords, nameof(_concatenatedLowerCaseWords)); 66Contract.ThrowIfNull(value, nameof(value)); 67Contract.ThrowIfNull(_concatenatedLowerCaseWords, nameof(_concatenatedLowerCaseWords));
TemporaryStorage\TemporaryStorageService.cs (2)
177Contract.ThrowIfNull(storageIdentifier.Name, $"{nameof(GetStreamHandle)} should only be called for VS on Windows (where named memory mapped files as supported)"); 188Contract.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 (2)
481Contract.ThrowIfNull(fileInfo, "We previously received a dynamic file for this path, and we're responding to a change, so we expect to get a new one."); 576Contract.ThrowIfNull(documentInfo.FilePath, "We shouldn't be adding documents without file paths.");
Workspace\Solution\Solution.cs (2)
339Contract.ThrowIfNull(generatedDocument, "The call to GetDocumentState found a SourceGeneratedDocumentState, so we should have found it now."); 1641Contract.ThrowIfNull(newDocumentState, "Because we just froze this document, it should always exist.");
Workspace\Workspace_Editor.cs (1)
271Contract.ThrowIfNull(currentContextId, "The document is open, so we should have had some context ID.");