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)
434
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)
72
Contract
.ThrowIfNull(request);
85
_ =>
Contract
.ThrowIfFalse(runningTasks.Remove(runningTask)),
110
Contract
.ThrowIfFalse(
116
Contract
.ThrowIfNull(method, $"The invoked method '{request.Method}' could not be found.");
123
Contract
.ThrowIfFalse(request.Parameters.Length == methodParameters.Length - 1, $"The arguments list should contain every parameter for {request.Method} except the final CancellationToken.");
125
Contract
.ThrowIfFalse(request.Parameters.Length == methodParameters.Length, $"The arguments list should contain every parameter for {request.Method}.");
173
Contract
.ThrowIfTrue(responseJson.Contains("\r") || responseJson.Contains("\n"));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (5)
53
Contract
.ThrowIfTrue(_index + values.Length > _values.Length);
60
Contract
.ThrowIfTrue(_index + values.Count > _values.Length);
67
Contract
.ThrowIfTrue(_index + values.Count > _values.Length);
74
Contract
.ThrowIfTrue(_index + values.Count > _values.Length);
108
Contract
.ThrowIfTrue(_index != _values.Length);