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