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