16 references to ThrowIfFalse
Microsoft.CodeAnalysis.Features (2)
EmbeddedLanguages\ExportEmbeddedLanguageFeatureServiceAttribute.cs (1)
55Contract.ThrowIfFalse(contractType.IsInterface && typeof(IEmbeddedLanguageFeatureService).IsAssignableFrom(contractType),
ExternalAccess\UnitTesting\Notification\AbstractGlobalOperationNotificationService.cs (1)
44Contract.ThrowIfFalse(_operations.Count == 0, $"Non-disposed operations: {string.Join(", ", _operations)}");
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\SourceMarkers.cs (1)
84Contract.ThrowIfFalse(end >= 0, $"Missing ending tag for {id}");
Microsoft.CodeAnalysis.LanguageServer (3)
DotnetCliHelper.cs (1)
120Contract.ThrowIfFalse(File.Exists(vstestConsole), $"VSTestConsole was not found at {vstestConsole}");
HostWorkspace\ProjectInitializationHandler.cs (1)
61Contract.ThrowIfFalse(didSubscribe, $"Unable to subscribe to {Descriptors.RemoteProjectInitializationStatusService.Moniker}");
Testing\RunTestsHandler.cs (1)
45Contract.ThrowIfFalse(File.Exists(projectOutputPath), $"Output path {projectOutputPath} is missing");
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Extensions\ProtocolConversions.cs (1)
1025Contract.ThrowIfFalse(textSpans.Length == mappedSpanResult.Length,
Handler\RequestContext.cs (1)
314Contract.ThrowIfFalse(_trackedDocuments.ContainsKey(documentUri), $"Attempted to get text for {documentUri} which is not open.");
LspServices\AbstractExportLspServiceAttribute.cs (1)
60Contract.ThrowIfFalse(serviceType.GetInterfaces().Contains(typeof(ILspService)), $"{serviceType.Name} does not inherit from {nameof(ILspService)}");
Workspaces\LspWorkspaceManager.cs (2)
150Contract.ThrowIfFalse(_trackedDocuments.ContainsKey(uri), $"didClose received for {uri} which is not open."); 204Contract.ThrowIfFalse(_trackedDocuments.ContainsKey(uri), $"didChange received for {uri} which is not open.");
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Rpc\RpcClient.cs (1)
73Contract.ThrowIfFalse(_outstandingRequests.TryRemove(response.Id, out var completionSourceAndExpectedType), $"We got a response for request ID {response.Id} but that was already completed.");
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
src\Workspaces\MSBuild\BuildHost\Rpc\RpcServer.cs (3)
110Contract.ThrowIfFalse( 123Contract.ThrowIfFalse(request.Parameters.Length == methodParameters.Length - 1, $"The arguments list should contain every parameter for {request.Method} except the final CancellationToken."); 125Contract.ThrowIfFalse(request.Parameters.Length == methodParameters.Length, $"The arguments list should contain every parameter for {request.Method}.");
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\TestComposition.cs (1)
191Contract.ThrowIfFalse(testAssembly == null, $"Test assemblies are not allowed in test composition: {testAssembly}. Specify explicit test parts instead.");