16 references to ThrowIfNull
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Options\OptionSerializerTests.cs (3)
79Contract.ThrowIfNull(defaultValue, $"Option: {option.Name}"); 101Contract.ThrowIfNull(enumType, $"Option: {option.Name}"); 132Contract.ThrowIfNull(defaultValue, $"Option: {option.Name}");
Microsoft.CodeAnalysis.Features (2)
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (2)
124Contract.ThrowIfNull(_expression.Parent, $"Parent of {_expression} is null."); 291Contract.ThrowIfNull(_expression.Parent, $"Parent of {_expression} is null.");
Microsoft.CodeAnalysis.LanguageServer (4)
DotnetCliHelper.cs (1)
109Contract.ThrowIfNull(process, $"Unable to start dotnet CLI at {_dotnetExecutablePath.Value} with arguments {arguments} in directory {workingDirectory}");
Testing\RunTestsHandler.cs (3)
47Contract.ThrowIfNull(projectOutputDirectory, $"Could not get project output directory from {projectOutputPath}"); 125Contract.ThrowIfNull(workingDirectory, $"Unable to get working directory for project {document.Project.Name}"); 128Contract.ThrowIfNull(projectFileName, $"Unable to get project file name for project {document.Project.Name}");
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Extensions\Extensions.cs (1)
63Contract.ThrowIfNull(documentUri.ParsedUri, $"URI {documentUri} could not be parsed");
Extensions\ProtocolConversions.Diagnostics.cs (2)
55Contract.ThrowIfNull(diagnostic.Tags, $"diagnostic {diagnostic.Identifier} was missing tags"); 268Contract.ThrowIfNull(diagnosticData.Language, $"diagnostic {diagnosticData.Id} is missing a language");
Extensions\SourceGeneratedDocumentUri.cs (1)
87Contract.ThrowIfNull(value, $"Could not get {keyName} from {query}");
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (1)
67Contract.ThrowIfNull(snippets, $"Did not find any code snippets in {filePath}");
LspServices\LspServices.cs (1)
90Contract.ThrowIfNull(service, $"Missing required LSP service {typeof(T).FullName}");
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
src\Workspaces\MSBuild\BuildHost\Rpc\RpcServer.cs (1)
116Contract.ThrowIfNull(method, $"The invoked method '{request.Method}' could not be found.");