40 references to ThrowIfFalse
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
143Contract.ThrowIfFalse(workspace.TryApplyChanges(solutionWithEventHandler), "Event Hookup could not update the solution.");
Microsoft.CodeAnalysis.EditorFeatures (7)
AutomaticCompletion\BraceCompletionSessionProvider.BraceCompletionSession.cs (2)
433Contract.ThrowIfFalse(SubjectBuffer.CurrentSnapshot[OpeningPoint.GetPosition(SubjectBuffer.CurrentSnapshot)] == OpeningBrace, 435Contract.ThrowIfFalse(SubjectBuffer.CurrentSnapshot[ClosingPoint.GetPosition(SubjectBuffer.CurrentSnapshot) - 1] == ClosingBrace,
EditAndContinue\ActiveStatementTaggerProvider.cs (1)
108Contract.ThrowIfFalse(tag1 == tag2, "ActiveStatementTag is a supposed to be a singleton");
KeywordHighlighting\HighlighterViewTaggerProvider.cs (1)
129Contract.ThrowIfFalse(tag1 == tag2, "KeywordHighlightTag is supposed to be a singleton");
ReferenceHighlighting\NavigateToHighlightReferenceCommandHandler.cs (2)
82Contract.ThrowIfFalse(spans.Any(), "We should have at least found the tag under the cursor!"); 111Contract.ThrowIfFalse(destIndex >= 0, "Expected to find start tag in the collection");
Shared\Utilities\ResettableDelay.cs (1)
30Contract.ThrowIfFalse(delayInMilliseconds >= 50, "Perf, only use delays >= 50ms");
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (3)
Model.cs (2)
45Contract.ThrowIfFalse(items.Count != 0, "Must have at least one item."); 46Contract.ThrowIfFalse(items.Contains(selectedItem), "Selected item must be in list of items.");
SuggestedActionsSource.cs (1)
365Contract.ThrowIfFalse(
Microsoft.CodeAnalysis.EditorFeatures.Wpf (4)
BackgroundWorkIndicator\BackgroundWorkIndicatorContext.cs (1)
195Contract.ThrowIfFalse(
SignatureHelp\Model.cs (2)
45Contract.ThrowIfFalse(items.Count != 0, "Must have at least one item."); 46Contract.ThrowIfFalse(items.Contains(selectedItem), "Selected item must be in list of items.");
Suggestions\SuggestedActionsSource.cs (1)
365Contract.ThrowIfFalse(
Microsoft.CodeAnalysis.ExternalAccess.Debugger (2)
GlassTestsHotReloadService.cs (2)
42Contract.ThrowIfFalse(_sessionId == default, "Session already started"); 49Contract.ThrowIfFalse(sessionId != default, "Session has not started");
Microsoft.CodeAnalysis.Features (11)
Completion\Utilities.cs (1)
54Contract.ThrowIfFalse(document.SupportsSemanticModel, "Should only be called from C#/VB providers.");
EmbeddedLanguages\ExportEmbeddedLanguageFeatureServiceAttribute.cs (1)
62Contract.ThrowIfFalse(name is PredefinedEmbeddedLanguageNames.Regex or PredefinedEmbeddedLanguageNames.Json,
ExternalAccess\UnitTesting\API\UnitTestingHotReloadService.cs (3)
96Contract.ThrowIfFalse(_sessionId == default, "Session already started"); 114Contract.ThrowIfFalse(sessionId != default, "Session has not started"); 155Contract.ThrowIfFalse(_sessionId != default, "Session has not started");
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (1)
66Contract.ThrowIfFalse(item.DocumentId != null, "can only enqueue a document work item");
ExternalAccess\Watch\Api\WatchHotReloadService.cs (3)
84Contract.ThrowIfFalse(_sessionId == default, "Session already started"); 100Contract.ThrowIfFalse(sessionId != default, "Session has not started"); 119Contract.ThrowIfFalse(_sessionId != default, "Session has not started");
SolutionCrawler\WorkCoordinator.HighPriorityProcessor.cs (1)
82Contract.ThrowIfFalse(item.DocumentId != null, "can only enqueue a document work item");
SolutionCrawler\WorkCoordinator.NormalPriorityProcessor.cs (1)
65Contract.ThrowIfFalse(item.DocumentId != null, "can only enqueue a document work item");
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\InlineCompletions\XmlSnippetParser.cs (1)
70Contract.ThrowIfFalse(matchingSnippet.IsExpansionSnippet(), "Only expansion snippets are supported");
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
356Contract.ThrowIfFalse(tokenTypesToIndex.TryGetValue(tokenTypeStr, out var tokenTypeIndex), "No matching token type index found.");
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Simplification\VisualBasicSimplificationService.vb (1)
96Contract.ThrowIfFalse(originalMethod.Statements.Any(), "How did empty method body get reduced?")
Microsoft.CodeAnalysis.Workspaces (5)
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (2)
159Contract.ThrowIfFalse(linkedSymbols.Contains(symbol), "Linked symbols did not contain the very symbol we started with."); 162Contract.ThrowIfFalse(group.Symbols.Contains(symbol), "Symbol group did not contain the very symbol we started with.");
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (1)
229Contract.ThrowIfFalse(projects.Count == 1, "Only a single project should be passed in");
FindSymbols\Shared\AbstractSyntaxIndex.cs (1)
55Contract.ThrowIfFalse(index != null || loadOnly == true, "Result can only be null if 'loadOnly: true' was passed.");
VirtualChar.cs (1)
72Contract.ThrowIfFalse(surrogateChar == 0 || rune == Rune.ReplacementChar,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Remote\TestSerializerService.cs (1)
140Contract.ThrowIfFalse(_sharedTestGeneratorReferences == null ||
Microsoft.VisualStudio.LanguageServices (3)
LanguageService\AbstractLanguageService`2.VsCodeWindowManager.cs (2)
113Contract.ThrowIfFalse(_navigationBarController == null, "We shouldn't have a controller manager if there isn't a dropdown"); 114Contract.ThrowIfFalse(_dropdownBarClient == null, "We shouldn't have a dropdown client if there isn't a dropdown");
ProjectSystem\FileChangeWatcher.cs (1)
450Contract.ThrowIfFalse(_activeFileWatchingTokens.Remove(watchedFile), "This token was no longer being watched.");