12 references to Contract
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
AbstractBuildHost.cs (2)
113
Contract
.ThrowIfFalse(TryEnsureMSBuildLoaded(projectFilePath), $"We don't have an MSBuild to use; {nameof(HasUsableMSBuild)} should have been called first to check.");
185
Contract
.ThrowIfNull(_buildManager);
MSBuild\ProjectFile\ProjectFile.cs (1)
126
Contract
.ThrowIfNull(project, "The project was not loaded.");
Program.cs (1)
63
Contract
.ThrowIfFalse(targetObject == 0, "The first object registered should have target 0, which is assumed by the client.");
Rpc\RpcServer.cs (7)
80
Contract
.ThrowIfNull(request);
93
_ =>
Contract
.ThrowIfFalse(runningTasks.Remove(runningTask)),
118
Contract
.ThrowIfFalse(
124
Contract
.ThrowIfNull(method, $"The invoked method '{request.Method}' could not be found.");
131
Contract
.ThrowIfFalse(request.Parameters.Length == methodParameters.Length - 1, $"The arguments list should contain every parameter for {request.Method} except the final CancellationToken.");
133
Contract
.ThrowIfFalse(request.Parameters.Length == methodParameters.Length, $"The arguments list should contain every parameter for {request.Method}.");
166
Contract
.ThrowIfTrue(responseJson.Contains("\r") || responseJson.Contains("\n"));
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
MonoMSBuildDiscovery.cs (1)
23
=>
Contract
.ThrowIfTrue(Path.DirectorySeparatorChar == '\\');