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