10 references to ThrowIfFalse
Microsoft.CodeAnalysis.Features (1)
EmbeddedLanguages\ExportEmbeddedLanguageFeatureServiceAttribute.cs (1)
57Contract.ThrowIfFalse(contractType.IsInterface && typeof(IEmbeddedLanguageFeatureService).IsAssignableFrom(contractType),
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Extensions\ProtocolConversions.cs (1)
819Contract.ThrowIfFalse(textSpans.Length == mappedSpanResult.Length,
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
138Contract.ThrowIfFalse(diagnosticMode == DiagnosticMode.LspPull, $"{diagnosticMode} is not pull");
Handler\RequestContext.cs (1)
217Contract.ThrowIfFalse(_trackedDocuments.ContainsKey(documentUri), $"Attempted to get text for {documentUri} which is not open.");
LspServices\ExportLspServiceFactoryAttribute.cs (1)
41Contract.ThrowIfFalse(type.GetInterfaces().Contains(typeof(ILspService)), $"{type.Name} does not inherit from {nameof(ILspService)}");
LspServices\ExportStatelessLspServiceAttribute.cs (1)
41Contract.ThrowIfFalse(type.GetInterfaces().Contains(typeof(ILspService)), $"{type.Name} does not inherit from {nameof(ILspService)}");
Workspaces\LspWorkspaceManager.cs (2)
116Contract.ThrowIfFalse(_trackedDocuments.ContainsKey(uri), $"didClose received for {uri} which is not open."); 136Contract.ThrowIfFalse(_trackedDocuments.ContainsKey(uri), $"didChange received for {uri} which is not open.");
Microsoft.CodeAnalysis.Workspaces (1)
Notification\AbstractGlobalOperationNotificationService.cs (1)
41Contract.ThrowIfFalse(_operations.Count == 0, $"Non-disposed operations: {string.Join(", ", _operations)}");
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\TestComposition.cs (1)
183Contract.ThrowIfFalse(testAssembly == null, $"Test assemblies are not allowed in test composition: {testAssembly}. Specify explicit test parts instead.");