15 references to Contract
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (15)
BuildHost.cs (1)
160
Contract
.ThrowIfFalse(TryEnsureMSBuildLoaded(projectFilePath), $"We don't have an MSBuild to use; {nameof(HasUsableMSBuild)} should have been called first to check.");
MSBuild\ProjectFile\ProjectFile.cs (1)
430
Contract
.ThrowIfNull(_loadedProject, "The project was not loaded.");
Program.cs (1)
45
Contract
.ThrowIfFalse(targetObject == 0, "The first object registered should have target 0, which is assumed by the client.");
Rpc\Contracts\MonoMSBuildDiscovery.cs (4)
73
Contract
.ThrowIfTrue(PlatformInformation.IsWindows);
97
Contract
.ThrowIfTrue(PlatformInformation.IsWindows);
134
Contract
.ThrowIfTrue(PlatformInformation.IsWindows);
167
Contract
.ThrowIfTrue(PlatformInformation.IsWindows);
Rpc\RpcServer.cs (7)
71
Contract
.ThrowIfNull(request);
84
_ =>
Contract
.ThrowIfFalse(runningTasks.Remove(runningTask)),
109
Contract
.ThrowIfFalse(
115
Contract
.ThrowIfNull(method, $"The invoked method '{request.Method}' could not be found.");
122
Contract
.ThrowIfFalse(request.Parameters.Length == methodParameters.Length - 1, $"The arguments list should contain every parameter for {request.Method} except the final CancellationToken.");
124
Contract
.ThrowIfFalse(request.Parameters.Length == methodParameters.Length, $"The arguments list should contain every parameter for {request.Method}.");
172
Contract
.ThrowIfTrue(responseJson.Contains("\r") || responseJson.Contains("\n"));
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
64
Contract
.ThrowIfTrue(condition, lineNumber, filePath);