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