132 references to Requires
mscorlib (130)
system\appdomain.cs (1)
885
Contract.
Requires
(fullName != null, "fullName != null");
system\collections\generic\arraysorthelper.cs (2)
190
Contract.
Requires
(array != null, "Check the arguments in the caller!");
191
Contract.
Requires
(index >= 0 && length >= 0 && (array.Length - index >= length), "Check the arguments in the caller!");
system\convert.cs (1)
262
Contract.
Requires
(value != null, "[Convert.DefaultToType]value!=null");
system\datetime.cs (1)
172
Contract.
Requires
(kind == DateTimeKind.Local, "Internal Constructor is for local times only");
system\decimal.cs (2)
572
Contract.
Requires
((buffer != null && buffer.Length >= 16), "[GetBytes]buffer != null && buffer.Length >= 16");
595
Contract.
Requires
((buffer != null && buffer.Length >= 16), "[ToDecimal]buffer != null && buffer.Length >= 16");
system\globalization\datetimeformatinfo.cs (1)
1379
Contract.
Requires
(values != null, "value != null");
system\io\__consolestream.cs (7)
176
Contract.
Requires
(offset >= 0, "offset >= 0");
177
Contract.
Requires
(count >= 0, "count >= 0");
178
Contract.
Requires
(bytes != null, "bytes != null");
238
Contract.
Requires
(offset >= 0, "offset >= 0");
239
Contract.
Requires
(count >= 0, "count >= 0");
240
Contract.
Requires
(bytes != null, "bytes != null");
241
Contract.
Requires
(bytes.Length >= offset + count, "bytes.Length >= offset + count");
system\io\filestream.cs (8)
2488
Contract.
Requires
(handle != null, "handle != null");
2489
Contract.
Requires
(offset >= 0, "offset >= 0");
2490
Contract.
Requires
(count >= 0, "count >= 0");
2491
Contract.
Requires
(bytes != null, "bytes != null");
2543
Contract.
Requires
(handle != null, "handle != null");
2544
Contract.
Requires
(offset >= 0, "offset >= 0");
2545
Contract.
Requires
(count >= 0, "count >= 0");
2546
Contract.
Requires
(bytes != null, "bytes != null");
system\io\path.cs (2)
488
Contract.
Requires
(path != null, "path can't be null");
511
Contract.
Requires
(path != null, "path can't be null");
system\io\pathhelper.cs (3)
392
Contract.
Requires
(useStackAlloc, "This should never be called for PathHelpers wrapping a StringBuilder");
397
Contract.
Requires
(!useStackAlloc, "This should never be called for PathHelpers that wrap a stackalloc'd buffer");
403
Contract.
Requires
(useStackAlloc, "This should never be called for PathHelpers wrapping a StringBuilder");
system\io\stream.cs (2)
1204
Contract.
Requires
(stream != null, "Expected a non-null stream.");
1205
Contract.
Requires
(methodName == "BeginRead" || methodName == "BeginWrite",
system\math.cs (4)
256
Contract.
Requires
(value < 0, "AbsHelper should only be called for negative values! (hack for JIT inlining)");
271
Contract.
Requires
(value < 0, "AbsHelper should only be called for negative values! (hack for JIT inlining)");
286
Contract.
Requires
(value < 0, "AbsHelper should only be called for negative values! (hack for JIT inlining)");
301
Contract.
Requires
(value < 0, "AbsHelper should only be called for negative values! (hack for JIT inlining)");
system\reflection\emit\typebuilderinstantiation.cs (1)
27
Contract.
Requires
(type != null, "this is only called from RuntimeType.MakeGenericType and TypeBuilder.MakeGenericType so 'type' cannot be null");
system\resources\manifestbasedresourcegroveler.cs (5)
56
Contract.
Requires
(mediator != null, "mediator shouldn't be null; check caller");
432
Contract.
Requires
(satellite != null, "satellite shouldn't be null; check caller");
433
Contract.
Requires
(fileName != null, "fileName shouldn't be null; check caller");
457
Contract.
Requires
(satellite != null, "satellite shouldn't be null; check caller");
458
Contract.
Requires
(name != null, "name shouldn't be null; check caller");
system\resources\resourcereader.cs (4)
204
Contract.
Requires
(stream != null, "Need a stream!");
205
Contract.
Requires
(stream.CanRead, "Stream should be readable!");
206
Contract.
Requires
(resCache != null, "Need a Dictionary!");
1247
Contract.
Requires
(typeCode >= 0, "can't be negative");
system\runtime\compilerservices\AsyncMethodBuilder.cs (3)
623
Contract.
Requires
(completedTask != null, "Expected non-null task");
624
Contract.
Requires
(completedTask.Status == TaskStatus.RanToCompletion, "Expected a successfully completed task");
1109
Contract.
Requires
(continuation != null, "Expected non-null continuation");
system\runtime\compilerservices\TaskAwaiter.cs (9)
73
Contract.
Requires
(task != null, "Constructing an awaiter requires a task to await.");
162
Contract.
Requires
(task.IsCompleted, "Task must have been completed by now.");
163
Contract.
Requires
(task.Status != TaskStatus.RanToCompletion, "Task should not be completed successfully.");
233
Contract.
Requires
(task != null, "Need a task to wait on");
234
Contract.
Requires
(continuation != null, "Need a continuation to invoke when the wait completes");
310
Contract.
Requires
(task != null, "Constructing an awaiter requires a task to await.");
370
Contract.
Requires
(task != null, "Constructing an awaitable requires a task to await.");
399
Contract.
Requires
(task != null, "Constructing an awaiter requires a task to await.");
487
Contract.
Requires
(task != null, "Constructing an awaiter requires a task to await.");
system\runtime\interopservices\windowsruntime\clrireferenceimpl.cs (1)
293
Contract.
Requires
(obj != null, "Null should not be boxed.");
system\string.cs (1)
422
Contract.
Requires
(strA.Length == strB.Length, "Lengths of strA and strB must be the same");
system\text\stringbuilder.cs (2)
1964
Contract.
Requires
(Capacity == Length, "Expand expect to be called only when there is no space left"); // We are currently full
1965
Contract.
Requires
(minBlockCharCount > 0, "Expansion request must be positive");
system\threading\SemaphoreSlim.cs (1)
671
Contract.
Requires
(task != null, "Expected non-null task");
system\threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (11)
207
Contract.
Requires
(ReadyToComplete, "The block must be ready to complete to be here.");
234
Contract.
Requires
(faultedTask != null && faultedTask.IsFaulted && faultedTask.Exception.InnerExceptions.Count > 0,
351
Contract.
Requires
(m_processingCount == EXCLUSIVE_PROCESSING_SENTINEL, "Processing exclusive tasks requires being in exclusive mode.");
352
Contract.
Requires
(!m_exclusiveTaskScheduler.m_tasks.IsEmpty, "Processing exclusive tasks requires tasks to be processed.");
401
Contract.
Requires
(m_processingCount > 0, "Processing concurrent tasks requires us to be in concurrent mode.");
509
Contract.
Requires
(pair != null, "Scheduler must be associated with a valid pair.");
510
Contract.
Requires
(processingMode == ProcessingMode.ProcessingConcurrentTasks || processingMode == ProcessingMode.ProcessingExclusiveTask,
512
Contract.
Requires
(
674
Contract.
Requires
(scheduler != null, "Need a scheduler with which to construct the debug view.");
697
Contract.
Requires
(pair != null, "Need a pair with which to construct the debug view.");
740
Contract.
Requires
(syncObj != null, "The monitor object to check must be provided.");
system\threading\Tasks\FutureFactory.cs (12)
540
Contract.
Requires
((endFunction != null) != (endAction != null), "Expected exactly one of endFunction/endAction to be non-null");
699
Contract.
Requires
((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
822
Contract.
Requires
((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
959
Contract.
Requires
((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
1104
Contract.
Requires
((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
1256
Contract.
Requires
((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
1379
Contract.
Requires
(thisRef != null, "Expected a non-null thisRef");
1380
Contract.
Requires
(endMethod != null, "Expected a non-null endMethod");
1779
Contract.
Requires
((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
1826
Contract.
Requires
((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
2180
Contract.
Requires
((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
2227
Contract.
Requires
((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
system\threading\Tasks\ProducerConsumerQueues.cs (9)
180
Contract.
Requires
(segment != null, "Expected a non-null segment.");
235
Contract.
Requires
(segment != null, "Expected a non-null segment.");
236
Contract.
Requires
(array != null, "Expected a non-null item array.");
293
Contract.
Requires
(segment != null, "Expected a non-null segment.");
294
Contract.
Requires
(array != null, "Expected a non-null item array.");
359
Contract.
Requires
(segment != null, "Expected a non-null segment.");
360
Contract.
Requires
(array != null, "Expected a non-null item array.");
485
Contract.
Requires
((size & (size - 1)) == 0, "Size must be a power of 2");
524
Contract.
Requires
(queue != null, "Expected a non-null queue.");
system\threading\Tasks\Task.cs (20)
230
Contract.
Requires
(task != null, "Null Task objects can't be added to the ActiveTasks collection");
1176
Contract.
Requires
(scheduler != null, "Task.InternalRunSynchronously(): null TaskScheduler");
1989
Contract.
Requires
(exceptionObject != null, "Task.AddException: Expected a non-null exception object");
2000
Contract.
Requires
(exceptionObject != null, "Task.AddException: Expected a non-null exception object");
2147
Contract.
Requires
(IsCompleted, "ThrowIfExceptional(): Expected IsCompleted == true");
2371
Contract.
Requires
(childTask.IsCompleted, "ProcessChildCompletion was called for an uncompleted task");
3393
Contract.
Requires
((Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) == 0, "Task.InternalCancel() did not expect promise-style task");
4636
Contract.
Requires
(continuationTask != null, "Task.ContinueWithCore(): null continuationTask");
4637
Contract.
Requires
(scheduler != null, "Task.ContinueWithCore(): null scheduler");
4638
Contract.
Requires
(!continuationTask.IsCompleted, "Did not expect continuationTask to be completed");
4729
Contract.
Requires
(tc != null, "Expected non-null tc object in AddTaskContinuationComplex");
6071
Contract.
Requires
(tasks != null, "Expected a non-null tasks array");
6102
Contract.
Requires
(tasks != null, "Expected a non-null task array");
6103
Contract.
Requires
(tasks.Length > 0, "Expected a non-zero length task array");
6322
Contract.
Requires
(tasks != null, "Expected a non-null tasks array");
6346
Contract.
Requires
(tasks != null, "Expected a non-null task array");
6347
Contract.
Requires
(tasks.Length > 0, "Expected a non-zero length task array");
7152
Contract.
Requires
(outerTask != null, "Expected non-null outerTask");
7238
Contract.
Requires
(task != null && task.IsCompleted, "Expected non-null, completed outer task");
7269
Contract.
Requires
(task != null && task.IsCompleted, "TrySetFromTask: Expected task to have completed.");
system\threading\Tasks\TaskContinuation.cs (6)
37
Contract.
Requires
(action is Action<Task> || action is Action<Task, object>,
85
Contract.
Requires
(function is Func<Task, TResult> || function is Func<Task, object, TResult>,
133
Contract.
Requires
(action is Action<Task<TAntecedentResult>> || action is Action<Task<TAntecedentResult>, object>,
181
Contract.
Requires
(function is Func<Task<TAntecedentResult>, TResult> || function is Func<Task<TAntecedentResult>, object, TResult>,
305
Contract.
Requires
(task != null, "TaskContinuation ctor: task is null");
306
Contract.
Requires
(scheduler != null, "TaskContinuation ctor: scheduler is null");
system\threading\Tasks\TaskExceptionHolder.cs (5)
63
Contract.
Requires
(task != null, "Expected a non-null task.");
189
Contract.
Requires
(exceptionObject != null, "TaskExceptionHolder.Add(): Expected a non-null exceptionObject");
190
Contract.
Requires
(
206
Contract.
Requires
(exceptionObject != null, "Expected exceptionObject to be non-null.");
243
Contract.
Requires
(exceptionObject != null, "AddFaultException(): Expected a non-null exceptionObject");
system\threading\Tasks\TaskFactory.cs (3)
1641
Contract.
Requires
((tasksCopy != null) && (tasksCopy.Length > 0), "Expected non-null task array with at least one element in it");
1719
Contract.
Requires
((tasksCopy != null) && (tasksCopy.Length > 0), "Expected non-null task array with at least one element in it");
2422
Contract.
Requires
(tasks != null, "Expected non-null collection of tasks");
system\threading\Tasks\TaskToApm.cs (1)
175
Contract.
Requires
(!completedSynchronously || task.IsCompleted, "If completedSynchronously is true, the task must be completed.");
system\threading\Tasks\ThreadPoolTaskScheduler.cs (1)
45
Contract.
Requires
(obj != null, "TaskScheduler.LongRunningThreadWork: obj is null");
system\type.cs (1)
1721
Contract.
Requires
(ifaceType.IsInterface, "ifaceType must be an interface type");
System (2)
net\System\Net\_ChunkParser.cs (1)
102
Contract.
Requires
(internalBuffer.Length >= chunkLengthBuffer,
net\System\Net\WebSockets\WebSocketHelpers.cs (1)
542
Contract.
Requires
(!string.IsNullOrEmpty(parameterName), "'parameterName' MUST NOT be NULL or string.Empty");