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