26 references to Contract
Microsoft.CodeAnalysis.InteractiveHost (26)
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)
183
Contract
.ThrowIfNull(_serviceState, "Service not initialized");
502
Contract
.ThrowIfFalse(initializationFilePath == null || PathUtilities.IsAbsolute(initializationFilePath));
Interactive\Core\InteractiveHostOptions.cs (1)
48
Contract
.ThrowIfNull(hostPath);
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
272
Contract
.ThrowIfFalse(batchResultTask.IsCompleted);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (12)
116
Contract
.ThrowIfNull(asynchronousComputeFunction);
140
Contract
.ThrowIfTrue(Monitor.IsEntered(SyncObject), "Attempt to take the lock while already holding it!");
153
Contract
.ThrowIfFalse(Monitor.IsEntered(asyncLazy.SyncObject));
162
Contract
.ThrowIfTrue(_asynchronousComputationCancellationSource != null &&
166
Contract
.ThrowIfTrue(_requests != null &&
171
Contract
.ThrowIfTrue(_requests != null &&
175
Contract
.ThrowIfTrue(_cachedResult != null &&
180
Contract
.ThrowIfTrue(_asynchronousComputeFunction == null && _synchronousComputeFunction != null);
260
Contract
.ThrowIfNull(_synchronousComputeFunction);
312
Contract
.ThrowIfNull(_cachedResult, $"We called {nameof(CompleteWithTask)} with a result, there should be a cached result.");
377
Contract
.ThrowIfTrue(_computationActive);
378
Contract
.ThrowIfNull(_asynchronousComputeFunction);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
173
=>
Contract
.ThrowIfFalse(LockHeldByMe());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (2)
117
Contract
.ThrowIfFalse(task.IsCompleted);
133
Contract
.ThrowIfFalse(task.IsCompleted);