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