27 references to Contract
Microsoft.CodeAnalysis.InteractiveHost (27)
Interactive\Core\InteractiveHost.cs (6)
364Contract.ThrowIfNull(code); 379Contract.ThrowIfNull(path); 393Contract.ThrowIfNull(reference); 402Contract.ThrowIfTrue(referenceSearchPaths.IsDefault); 403Contract.ThrowIfTrue(sourceSearchPaths.IsDefault); 404Contract.ThrowIfNull(baseDirectory);
Interactive\Core\InteractiveHost.LazyRemoteService.cs (1)
111Contract.ThrowIfNull(result.InitializationResult);
Interactive\Core\InteractiveHost.Service.cs (2)
183Contract.ThrowIfNull(_serviceState, "Service not initialized"); 502Contract.ThrowIfFalse(initializationFilePath == null || PathUtilities.IsAbsolute(initializationFilePath));
Interactive\Core\InteractiveHostOptions.cs (1)
47Contract.ThrowIfNull(hostPath);
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
62Contract.ThrowIfTrue(condition, lineNumber, filePath);
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
270Contract.ThrowIfFalse(batchResultTask.IsCompleted);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (12)
116Contract.ThrowIfNull(asynchronousComputeFunction); 140Contract.ThrowIfTrue(Monitor.IsEntered(SyncObject), "Attempt to take the lock while already holding it!"); 153Contract.ThrowIfFalse(Monitor.IsEntered(asyncLazy.SyncObject)); 162Contract.ThrowIfTrue(_asynchronousComputationCancellationSource != null && 166Contract.ThrowIfTrue(_requests != null && 171Contract.ThrowIfTrue(_requests != null && 175Contract.ThrowIfTrue(_cachedResult != null && 180Contract.ThrowIfTrue(_asynchronousComputeFunction == null && _synchronousComputeFunction != null); 260Contract.ThrowIfNull(_synchronousComputeFunction); 312Contract.ThrowIfNull(_cachedResult, $"We called {nameof(CompleteWithTask)} with a result, there should be a cached result."); 377Contract.ThrowIfTrue(_computationActive); 378Contract.ThrowIfNull(_asynchronousComputeFunction);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
173=> Contract.ThrowIfFalse(LockHeldByMe());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (2)
69Contract.ThrowIfFalse(task.IsCompleted); 85Contract.ThrowIfFalse(task.IsCompleted);