26 references to Contract
Microsoft.CodeAnalysis.InteractiveHost (26)
Interactive\Core\InteractiveHost.cs (6)
365Contract.ThrowIfNull(code); 380Contract.ThrowIfNull(path); 394Contract.ThrowIfNull(reference); 403Contract.ThrowIfTrue(referenceSearchPaths.IsDefault); 404Contract.ThrowIfTrue(sourceSearchPaths.IsDefault); 405Contract.ThrowIfNull(baseDirectory);
Interactive\Core\InteractiveHost.LazyRemoteService.cs (1)
113Contract.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)
48Contract.ThrowIfNull(hostPath);
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
272Contract.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)
117Contract.ThrowIfFalse(task.IsCompleted); 133Contract.ThrowIfFalse(task.IsCompleted);