18 references to Contract
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (18)
BuildHost.cs (1)
133
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)
433
Contract
.ThrowIfNull(_loadedProject, "The project was not loaded.");
Program.cs (1)
58
Contract
.ThrowIfFalse(targetObject == 0, "The first object registered should have target 0, which is assumed by the client.");
Rpc\Contracts\MonoMSBuildDiscovery.cs (3)
71
Contract
.ThrowIfTrue(PlatformInformation.IsWindows);
95
Contract
.ThrowIfTrue(PlatformInformation.IsWindows);
132
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (5)
52
Contract
.ThrowIfTrue(_index + values.Length > _values.Length);
59
Contract
.ThrowIfTrue(_index + values.Count > _values.Length);
66
Contract
.ThrowIfTrue(_index + values.Count > _values.Length);
73
Contract
.ThrowIfTrue(_index + values.Count > _values.Length);
107
Contract
.ThrowIfTrue(_index != _values.Length);