25 references to Contract
Microsoft.CodeAnalysis.InteractiveHost (25)
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)
181Contract.ThrowIfNull(_serviceState, "Service not initialized"); 500Contract.ThrowIfFalse(initializationFilePath == null || PathUtilities.IsAbsolute(initializationFilePath));
Interactive\Core\InteractiveHostOptions.cs (1)
48Contract.ThrowIfNull(hostPath);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (12)
115Contract.ThrowIfNull(asynchronousComputeFunction); 139Contract.ThrowIfTrue(Monitor.IsEntered(SyncObject), "Attempt to take the lock while already holding it!"); 152Contract.ThrowIfFalse(Monitor.IsEntered(asyncLazy.SyncObject)); 161Contract.ThrowIfTrue(_asynchronousComputationCancellationSource != null && 165Contract.ThrowIfTrue(_requests != null && 170Contract.ThrowIfTrue(_requests != null && 174Contract.ThrowIfTrue(_cachedResult != null && 179Contract.ThrowIfTrue(_asynchronousComputeFunction == null && _synchronousComputeFunction != null); 259Contract.ThrowIfNull(_synchronousComputeFunction); 311Contract.ThrowIfNull(_cachedResult, $"We called {nameof(CompleteWithTask)} with a result, there should be a cached result."); 376Contract.ThrowIfTrue(_computationActive); 377Contract.ThrowIfNull(_asynchronousComputeFunction);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
172=> Contract.ThrowIfFalse(LockHeldByMe());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (2)
116Contract.ThrowIfFalse(task.IsCompleted); 132Contract.ThrowIfFalse(task.IsCompleted);