1291 references to Assert
mscorlib (627)
system\activator.cs (1)
433Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled || securityInfo == null);
system\appdomain.cs (8)
391Contract.Assert(s_flags != 0); 610Contract.Assert(!_compatFlagsInitialized); 635Contract.Assert(attrs.Length == 1); 1746Contract.Assert(IsLegacyCasPolicyEnabled || securityAttributes == null); 1832Contract.Assert(IsLegacyCasPolicyEnabled || securityAttributes == null); 4471Contract.Assert(evidence != null); 4472Contract.Assert(IsHomogenous); 4473Contract.Assert(evidence.GetHostEvidence<GacInstalled>() == null);
system\arraysegment.cs (2)
179Contract.Assert(index == -1 || 241Contract.Assert(index == -1 ||
system\attribute.cs (2)
889Contract.Assert(thisValueArray.Rank == 1 && thatValueArray.Rank == 1); 903Contract.Assert(!(thisValue is Attribute));
system\buffer.cs (6)
330Contract.Assert(len > 16 && len <= 64); 369Contract.Assert(len > 16 && len <= 64); 386Contract.Assert(len >= 8 && len <= 16); 401Contract.Assert(len >= 4 && len < 8); 408Contract.Assert(len < 4); 423Contract.Assert(len > 64 && len <= CopyThreshold);
system\Collections\Concurrent\ConcurrentDictionary.cs (1)
2106Contract.Assert(condition);
system\Collections\Concurrent\ConcurrentQueue.cs (7)
83Contract.Assert(index >= 0 && index < SEGMENT_SIZE); 131Contract.Assert(m_serializationArray != null); 695Contract.Assert(index >= 0); 727Contract.Assert(m_high < SEGMENT_SIZE - 1); 743Contract.Assert(m_high >= SEGMENT_SIZE - 1); 759Contract.Assert(m_source.m_tail == this); 866Contract.Assert(m_source.m_head == this);
system\Collections\Concurrent\ConcurrentStack.cs (1)
147Contract.Assert(m_serializationArray != null);
system\collections\concurrent\PartitionerStatic.cs (23)
439Contract.Assert(m_currentChunkSize == null); 457Contract.Assert(m_localOffset.Value == m_currentChunkSize.Value - 1 || m_currentChunkSize.Value == 0); 478Contract.Assert(requestedChunkSize > 0 && requestedChunkSize <= m_maxChunkSize); 482Contract.Assert(m_currentChunkSize.Value <= requestedChunkSize && m_currentChunkSize.Value > 0); 772Contract.Assert(requestedChunkSize > 0); 811Contract.Assert(m_sharedIndex != null); //already been allocated in MoveNext() before calling GrabNextChunk 948Contract.Assert(requestedChunkSize > 0); 981Contract.Assert(value); 982Contract.Assert(!m_hasNoElementsLeft.Value); 996Contract.Assert(m_localList != null); 997Contract.Assert(m_localOffset.Value >= 0 && m_localOffset.Value < m_currentChunkSize.Value); 1135Contract.Assert(requestedChunkSize > 0); 1139Contract.Assert(m_sharedIndex != null); 1181Contract.Assert(m_sharedIndex != null); 1187Contract.Assert(false); 1276Contract.Assert(m_localOffset.Value >= 0 && m_localOffset.Value < m_currentChunkSize.Value); 1360Contract.Assert(m_localOffset.Value >= 0 && m_localOffset.Value < m_currentChunkSize.Value); 1547Contract.Assert(list != null); 1573Contract.Assert(startIndex >= 0 && endIndex <= list.Count - 1); 1587Contract.Assert(m_offset >= m_startIndex && m_offset <= m_endIndex); 1605Contract.Assert(array != null); 1630Contract.Assert(startIndex >= 0 && endIndex <= array.Length - 1); 1644Contract.Assert(m_offset >= m_startIndex && m_offset <= m_endIndex);
system\collections\generic\dictionary.cs (1)
444Contract.Assert(newSize >= entries.Length);
system\collections\hashtable.cs (1)
1772Contract.Assert(comparer == null || comparer == System.Collections.Generic.EqualityComparer<string>.Default || comparer is IWellKnownStringEqualityComparer);
system\console.cs (1)
1396Contract.Assert(title.Length == titleLength);
system\convert.cs (6)
2424Contract.Assert(0 <= inputLength); 2439Contract.Assert(0 <= resultLength); 2579Contract.Assert(currCode == intEq); 2659Contract.Assert(0 <= inputLength); 2682Contract.Assert(0 <= usefulInputLength); 2686Contract.Assert(0 <= padding);
system\delegate.cs (1)
685Contract.Assert((flags & DelegateBindingFlags.SkipSecurityChecks) == 0);
system\diagnostics\contracts\contracts.cs (2)
295/// At runtime this is equivalent to an <seealso cref="System.Diagnostics.Contracts.Contract.Assert(bool)"/>. 316/// At runtime this is equivalent to an <seealso cref="System.Diagnostics.Contracts.Contract.Assert(bool)"/>.
system\diagnostics\eventing\activitytracker.cs (4)
76Contract.Assert((options & EventActivityOptions.Disable) == 0); 196Contract.Assert(orphan.m_stopped != 0); 527Contract.Assert(0 <= value && value < 16); 528Contract.Assert(ptr < endPtr);
system\diagnostics\eventing\eventprovider.cs (3)
495Contract.Assert(0 <= providerInstance->NextOffset && providerInstance->NextOffset < buffSize); 1110Contract.Assert((EventOpcode)eventDescriptor.Opcode == EventOpcode.Send || 1180Contract.Assert(bitcount(n) == 1);
system\diagnostics\eventing\eventsource.cs (39)
1183Contract.Assert(m_eventData != null); // You must have initialized this if you enabled the source. 1413Contract.Assert(listener == null || (uint)m == (uint)SessionMask.FromId(0)); 1534Contract.Assert(!m_eventSourceEnabled); // We can't be enabled until we are completely initted. 1898Contract.Assert(m_eventData != null); // You must have initialized this if you enabled the source. 2182Contract.Assert(dispatcher.m_EventEnabled != null); 2609Contract.Assert(m_completelyInited); 2619Contract.Assert(m_eventData != null); 2676Contract.Assert(commandArgs.perEventSourceSessionId >= -1 && commandArgs.perEventSourceSessionId <= SessionMask.MAX); 2731Contract.Assert(m_eventData != null); 3017Contract.Assert(Monitor.IsEntered(EventListener.EventListenersLock)); 3021Contract.Assert(m_rawManifest == null); 3023Contract.Assert(m_eventData != null); 3065Contract.Assert(!SelfDescribingEvents); 3168Contract.Assert(data.ConstructorArguments.Count <= 1); 3461Contract.Assert(0 <= startEventId); // Since we reserve id 0, we know that id-1 is <= 0 3721Contract.Assert(eventAttribute.Task != EventTask.None || eventAttribute.Opcode != EventOpcode.Info); 3982Contract.Assert(((m_config & EventSourceSettings.EtwManifestEventFormat) != 0) != 4004Contract.Assert(listener == null || (uint)sessions == (uint)SessionMask.FromId(0)); 4015Contract.Assert(etwSession != null); 4243Contract.Assert(s_Listeners != null); 4484Contract.Assert(Monitor.IsEntered(EventListener.EventListenersLock)); 4831Contract.Assert(EventId != -1); 5261Contract.Assert(Monitor.IsEntered(EventListener.EventListenersLock)); 5329Contract.Assert(Monitor.IsEntered(EventListener.EventListenersLock)); 5424Contract.Assert(filterList != null && filterList.m_activeActivities != null); 5517Contract.Assert(childActivityID != null); 5520Contract.Assert(activeActivities != null); 5577Contract.Assert(Monitor.IsEntered(EventListener.EventListenersLock)); 5604Contract.Assert(existingFilter == null || 5678Contract.Assert(Monitor.IsEntered(EventListener.EventListenersLock)); 5680Contract.Assert(samplingFreq > 0); 5681Contract.Assert(eventId >= 0); 5812Contract.Assert(etwSession != null); 5893Contract.Assert(perEventSourceSessionId < MAX); 5911Contract.Assert(perEventSourceSessionId < MAX); 5916Contract.Assert(perEventSourceSessionId < MAX); 6133Contract.Assert(channel >= EventChannel.Admin && channel <= EventChannel.Debug); 6176Contract.Assert(numParams == 0); 6177Contract.Assert(this.eventName == null);
System\Diagnostics\Eventing\TraceLogging\EventPayload.cs (1)
25Contract.Assert(payloadNames.Count == payloadValues.Count);
system\enum.cs (1)
165Contract.Assert(names.Length == values.Length);
system\globalization\CalendricalCalculationsHelper.cs (7)
157Contract.Assert(gregorianYear < 1620 || 2020 <= gregorianYear); 166Contract.Assert(1988 <= gregorianYear && gregorianYear <= 2019); 172Contract.Assert(1900 <= gregorianYear && gregorianYear <= 1987); 179Contract.Assert(1800 <= gregorianYear && gregorianYear <= 1899); 186Contract.Assert(1700 <= gregorianYear && gregorianYear <= 1799); 193Contract.Assert(1620 <= gregorianYear && gregorianYear <= 1699); 409Contract.Assert(day != upperBoundNewYearDay);
system\globalization\cultureinfo.cs (2)
363Contract.Assert(cultureData != null); 371Contract.Assert(name != null);
system\globalization\Persiancalendar.cs (8)
189Contract.Assert(ordinalDay <= 366); 199Contract.Assert(1 <= month && month <= 12); 229Contract.Assert(y >= 1); 248Contract.Assert(ordinalDay >= 1); 249Contract.Assert(m >= 1 && m <= 12); 256Contract.Assert(1 <= d); 257Contract.Assert(d <= 31); 381Contract.Assert(daysInMonth == 30);
system\globalization\textinfo.cs (1)
305Contract.Assert(end - startIndex >= value.Length);
system\globalization\timespanformat.cs (1)
451Contract.Assert(field == 5);
system\globalization\timespanparse.cs (6)
139Contract.Assert(ttt == TTT.Num); 140Contract.Assert(num > -1); 141Contract.Assert(maxValue > 0); 142Contract.Assert(maxPrecision == maxFractionDigits || maxPrecision == unlimitedDigits); 176Contract.Assert(m_pos > -1); 387Contract.Assert(dtfi != null);
system\iappdomainpausemanager.cs (2)
71Contract.Assert(!isPaused); 89Contract.Assert(isPaused);
system\io\__consolestream.cs (2)
256Contract.Assert(!writeSuccess || count == numBytesWritten); 269Contract.Assert(!writeSuccess || count / BytesPerWChar == charsWritten);
system\io\binaryreader.cs (1)
328Contract.Assert(m_stream != null);
system\io\bufferedstream.cs (54)
175Contract.Assert(_buffer != null); 176Contract.Assert(_bufferSize > 0); 190Contract.Assert(_bufferSize > 0); 299Contract.Assert(_writePos == 0 && _readPos == 0 && _readLen == 0); 320Contract.Assert(_writePos == 0 && _readPos == 0 && _readLen == 0); 350Contract.Assert(stream != null); 359Contract.Assert(_this._writePos == 0 && _this._readPos == 0 && _this._readLen == 0); 379Contract.Assert(_this._writePos == 0 && _this._readPos == 0 && _this._readLen == 0); 388Contract.Assert(_this._writePos == 0 && _this._readPos == _this._readLen); 426Contract.Assert(_readPos < _readLen); 469Contract.Assert(readBytes >= 0); 474Contract.Assert(readBytes > 0); 535Contract.Assert(_readLen == _readPos); 654Contract.Assert(t == null || t.Status == TaskStatus.RanToCompletion); 738Contract.Assert(array != null); 739Contract.Assert(offset >= 0); 740Contract.Assert(count >= 0); 741Contract.Assert(array.Length - offset >= count); 742Contract.Assert(_stream != null); 743Contract.Assert(_stream.CanRead); 744Contract.Assert(_bufferSize > 0); 745Contract.Assert(semaphoreLockTask != null); 763Contract.Assert(_readLen == _readPos); 933Contract.Assert(_writePos < _bufferSize); 948Contract.Assert(count == 0); 952Contract.Assert(count >= 0); 953Contract.Assert(_writePos == _bufferSize); 954Contract.Assert(_buffer != null); 961Contract.Assert(count == 0); 962Contract.Assert(_writePos < _bufferSize); 969Contract.Assert(_buffer != null); 970Contract.Assert(totalUserBytes >= _bufferSize); 1025Contract.Assert(_writePos < _bufferSize); 1032Contract.Assert(count == 0); 1109Contract.Assert(_writePos < _bufferSize); 1118Contract.Assert(count == 0); 1146Contract.Assert(array != null); 1147Contract.Assert(offset >= 0); 1148Contract.Assert(count >= 0); 1149Contract.Assert(array.Length - offset >= count); 1150Contract.Assert(_stream != null); 1151Contract.Assert(_stream.CanWrite); 1152Contract.Assert(_bufferSize > 0); 1153Contract.Assert(semaphoreLockTask != null); 1179Contract.Assert(count == 0); 1183Contract.Assert(count >= 0); 1184Contract.Assert(_writePos == _bufferSize); 1185Contract.Assert(_buffer != null); 1198Contract.Assert(count == 0); 1199Contract.Assert(_writePos < _bufferSize); 1206Contract.Assert(_buffer != null); 1207Contract.Assert(totalUserBytes >= _bufferSize); 1269Contract.Assert(_writePos < _bufferSize); 1297Contract.Assert(oldPos == _stream.Position + (_readPos - _readLen));
system\io\directoryinfo.cs (3)
723Contract.Assert(originalPath != null); 724Contract.Assert(fullPath != null); 746Contract.Assert(fullPath != null);
system\io\filestream.cs (11)
762Contract.Assert(mode != FileMode.Append); 1899Contract.Assert(_isAsync); 2211Contract.Assert(_isAsync); 2723Contract.Assert(task != null); 2732Contract.Assert((!asyncResult.IsWrite && typeof(T) == typeof(int)) || 2734Contract.Assert(asyncResult != null); 2735Contract.Assert(asyncResult.IsAsync); 2754Contract.Assert(asyncResult != null); 2758Contract.Assert(readTask != null); 2790Contract.Assert(asyncResult != null); 2794Contract.Assert(writeTask != null);
system\io\filesystemenumerable.cs (1)
627Contract.Assert(fullSearchString.Length > fullPathMod.Length);
system\io\isolatedstorage\isolatedstoragefile.cs (2)
2880Contract.Assert(m_RootDir[m_nRootDir].Length < Path.MaxPath); 2936Contract.Assert(m_Root.Length < Path.MaxPath);
system\io\memorystream.cs (1)
536Contract.Assert(MemStreamMaxLength == Int32.MaxValue); // Check parameter validation logic in this method if this fails.
system\io\stream.cs (3)
511Contract.Assert(readWriteTask != null); // Should be Contract.Requires, but CCRewrite is doing a poor job with 513Contract.Assert(asyncWaiter != null); // Ditto 584Contract.Assert(writeTask.Status == TaskStatus.RanToCompletion);
system\io\streamreader.cs (6)
656Contract.Assert(charsRead == 0); 966Contract.Assert(n == 0); 994Contract.Assert(n == 0); 1040Contract.Assert(n == 0); 1048Contract.Assert(n > 0); 1057Contract.Assert(n > 0);
system\io\streamwriter.cs (9)
479Contract.Assert(_this.charPos == 0); 492Contract.Assert(_this.charPos == 0); 503Contract.Assert(_this.charPos == 0); 555Contract.Assert(_this.charPos == 0); 578Contract.Assert(_this.charPos == 0); 589Contract.Assert(_this.charPos == 0); 644Contract.Assert(_this.charPos == 0); 666Contract.Assert(_this.charPos == 0); 677Contract.Assert(_this.charPos == 0);
system\io\unmanagedmemorystream.cs (2)
470Contract.Assert(! (ex is OperationCanceledException)); 666Contract.Assert(! (ex is OperationCanceledException));
system\Lazy.cs (4)
329Contract.Assert(m_boxed != null); 384Contract.Assert(m_boxed != null); 398Contract.Assert(exHolder != null); 409Contract.Assert(boxed != null);
system\progress.cs (1)
53Contract.Assert(m_synchronizationContext != null);
system\reflection\assembly.cs (3)
1291Contract.Assert(((MetadataToken)invocableAttribute.MetadataToken).IsTypeDef); 1294Contract.Assert(ctor != null); 1297Contract.Assert(((MetadataToken)token).IsMethodDef);
system\reflection\Associates.cs (2)
49Contract.Assert(declaredType != null); 50Contract.Assert(reflectedType != null);
system\reflection\customattribute.cs (16)
71Contract.Assert(target != null); 94Contract.Assert(target != null); 117Contract.Assert(target != null); 140Contract.Assert(target != null); 148Contract.Assert(target != null); 156Contract.Assert(target != null); 164Contract.Assert(target != null); 175Contract.Assert(target != null); 198Contract.Assert(target != null); 838Contract.Assert(value != null); 1035Contract.Assert(customAttributeCtorParameters != null); 1036Contract.Assert(customAttributeNamedParameters != null); 1391Contract.Assert(type != null); 1607Contract.Assert(attributeCtorToken == 0); 1630Contract.Assert(attributeFilterType == null); 1631Contract.Assert(!MetadataToken.IsNullToken(attributeCtorToken));
system\reflection\emit\assemblybuilder.cs (1)
232Contract.Assert(this.InternalAssembly == module.Assembly);
system\reflection\emit\dynamicmethod.cs (6)
647Contract.Assert(assembly != null); 654Contract.Assert(assembly != null); 673Contract.Assert(assembly != null); 680Contract.Assert(assembly != null); 699Contract.Assert(assembly != null); 706Contract.Assert(assembly != null);
system\reflection\emit\ilgenerator.cs (1)
426Contract.Assert(m_RelocFixupList == null);
system\reflection\emit\methodbuilder.cs (7)
1532Contract.Assert(tryStartOffset >= 0); 1533Contract.Assert(tryEndOffset >= 0); 1534Contract.Assert(filterOffset >= 0); 1535Contract.Assert(handlerStartOffset >= 0); 1536Contract.Assert(handlerEndOffset >= 0); 1537Contract.Assert(IsValidKind((ExceptionHandlingClauseOptions)kind)); 1538Contract.Assert(kind != (int)ExceptionHandlingClauseOptions.Clause || (exceptionTypeToken & 0x00FFFFFF) != 0);
system\reflection\emit\modulebuilder.cs (9)
203Contract.Assert(method != null); 219Contract.Assert(method != null); 241Contract.Assert(runtimeField != null); 707Contract.Assert(method is RuntimeMethodInfo || method is RuntimeConstructorInfo); 711Contract.Assert(masmi != null); 1262Contract.Assert(name == enumBuilder.FullName); 1265Contract.Assert(enumBuilder.m_typeBuilder == m_TypeBuilderDict[name]); 1757Contract.Assert(refedModuleBuilder != null || refedModule is RuntimeModule); 1977Contract.Assert(methodInfo != null);
system\reflection\emit\signaturehelper.cs (2)
331Contract.Assert(!MetadataToken.IsNullToken(token)); 354Contract.Assert(!MetadataToken.IsNullToken(token));
system\reflection\emit\xxxontypebuilderinstantiation.cs (6)
35Contract.Assert(method is MethodBuilder || method is RuntimeMethodInfo); 65Contract.Assert(m_method is RuntimeMethodInfo); 127Contract.Assert(constructor is ConstructorBuilder || constructor is RuntimeConstructorInfo); 162Contract.Assert(m_ctor is RuntimeConstructorInfo); 236Contract.Assert(field is FieldBuilder || field is RuntimeFieldInfo); 263Contract.Assert(m_field is RuntimeFieldInfo);
system\reflection\eventinfo.cs (4)
130Contract.Assert(addMethod.ReturnType == typeof(void)); 147Contract.Assert(parameters != null && parameters.Length == 1); 153Contract.Assert(parameters[0].ParameterType.BaseType == typeof(MulticastDelegate)); 256Contract.Assert(!reflectedTypeCache.IsGlobal);
system\reflection\methodinfo.cs (2)
257Contract.Assert(!handle.IsNullHandle()); 258Contract.Assert(methodAttributes == RuntimeMethodHandle.GetAttributes(handle));
system\reflection\parameterinfo.cs (8)
271Contract.Assert(method is RuntimeMethodInfo || method is RuntimeConstructorInfo); 280Contract.Assert(method is RuntimeMethodInfo || method is RuntimeConstructorInfo); 399Contract.Assert(result != null); 457Contract.Assert(m_originalMember != null); 477Contract.Assert(MdToken.IsNullToken(tkParamDef) == scope.Equals(MetadataImport.EmptyImport)); 478Contract.Assert(MdToken.IsNullToken(tkParamDef) || MdToken.IsTokenOfType(tkParamDef, MetadataTokenType.ParamDef)); 520Contract.Assert(parameterType != null); 603Contract.Assert(!m_noMetadata);
system\reflection\propertyinfo.cs (1)
217Contract.Assert(!reflectedTypeCache.IsGlobal);
system\resources\resourcemanager.cs (11)
287Contract.Assert(!AppDomain.IsAppXModel() || AppDomain.IsAppXDesignMode()); 320Contract.Assert(!AppDomain.IsAppXModel() || AppDomain.IsAppXDesignMode()); 396Contract.Assert(!AppDomain.IsAppXModel() || AppDomain.IsAppXDesignMode()); 990Contract.Assert(_bUsingModernResourceManagement); 991Contract.Assert(_WinRTResourceManager != null); 992Contract.Assert(_PRIonAppXInitialized); 993Contract.Assert(AppDomain.IsAppXModel()); 1093Contract.Assert(_bUsingModernResourceManagement == false); // Only this function writes to this member 1095Contract.Assert(_WinRTResourceManager == null); // Only this function writes to this member 1096Contract.Assert(_PRIonAppXInitialized == false); // Only this function writes to this member 1097Contract.Assert(_PRIExceptionInfo == null); // Only this function writes to this member
system\rttype.cs (55)
244Contract.Assert(retVal || RequiresStringComparison()); 265Contract.Assert(RequiresStringComparison()); 595Contract.Assert(false); 610Contract.Assert(cachedMembers[freeSlotIndex] == null); 628Contract.Assert(declaringType != null); 640Contract.Assert(!filter.Match(RuntimeMethodHandle.GetUtf8Name(methodHandle))); 649Contract.Assert(!methodHandle.IsNullHandle()); 652Contract.Assert( 700Contract.Assert(!filter.Match(RuntimeMethodHandle.GetUtf8Name(methodHandle))); 709Contract.Assert(!methodHandle.IsNullHandle()); 715Contract.Assert( 751Contract.Assert( 768Contract.Assert((methodAttributes & (MethodAttributes.Virtual | MethodAttributes.Abstract)) == 0); 814Contract.Assert(!filter.Match(RuntimeMethodHandle.GetUtf8Name(methodHandle))); 824Contract.Assert(!methodHandle.IsNullHandle()); 830Contract.Assert( 943Contract.Assert(!filter.Match(RuntimeFieldHandle.GetUtf8Name(runtimeFieldHandle))); 951Contract.Assert(!runtimeFieldHandle.IsNullHandle()); 999Contract.Assert(MdToken.IsTokenOfType(tkField, MetadataTokenType.FieldDef)); 1000Contract.Assert(!MdToken.IsNullToken(tkField)); 1107Contract.Assert(interfaceType.IsInterface); 1278Contract.Assert(!MdToken.IsNullToken(tkEvent)); 1279Contract.Assert(MdToken.IsTokenOfType(tkEvent, MetadataTokenType.Event)); 1328Contract.Assert(declaringType != null); 1383Contract.Assert((declaringType.IsInterface && usedSlots == null && csPropertyInfos == null) || 1391Contract.Assert(!MdToken.IsNullToken(tkProperty)); 1392Contract.Assert(MdToken.IsTokenOfType(tkProperty, MetadataTokenType.Property)); 1398Contract.Assert(!filter.Match(declaringType.GetRuntimeModule().MetadataImport.GetName(tkProperty))); 1443Contract.Assert(associateMethod.IsVirtual); 1549Contract.Assert(listType == MemberListType.All); 1738Contract.Assert(enclosingType != typeof(void)); 2003Contract.Assert(!methodHandle.IsNullHandle()); 2286Contract.Assert(fullname.Equals(ns + "." + name)); 2378Contract.Assert(name != null); 2484Contract.Assert(type is RuntimeType); 2569Contract.Assert((callConv & CallingConventions.VarArgs) != 0); 2764Contract.Assert(cache != null); 3143Contract.Assert(i == members.Length); 3166Contract.Assert(ifaceType.IsInterface); // VerifyInterfaceIsImplemented enforces this invariant 3167Contract.Assert(!IsInterface); // VerifyInterfaceIsImplemented enforces this invariant 3188Contract.Assert(ifaceMethodBase is RuntimeMethodInfo); 3201Contract.Assert(rtTypeMethodBase == null || rtTypeMethodBase is RuntimeMethodInfo); 3535Contract.Assert(i == compressMembers.Length); 4370Contract.Assert(!IsGenericParameter); 4669Contract.Assert(IsSetField); 4688Contract.Assert(flds != null); 4811Contract.Assert(!IsSetField); 4818Contract.Assert(isSetProperty); 4820Contract.Assert(!IsGetField); 4842Contract.Assert(semiFinalist != null); 4865Contract.Assert(results.Count > 1); 4873Contract.Assert(finalists == null || finalist != null); 4919Contract.Assert(results.Count > 1); 5314Contract.Assert((invokeMethod.CallingConvention & CallingConventions.VarArgs) == 5525Contract.Assert(ace.m_ctor != null || this.IsValueType);
system\runtime\compilerservices\decimalconstantattribute.cs (2)
67Contract.Assert(parameters.Length == 5); 70Contract.Assert(args.Count == 5);
system\runtime\interopservices\attributes.cs (1)
582Contract.Assert(marshalTypeName != null);
system\runtime\interopservices\windowsruntime\clrireferenceimpl.cs (1)
376Contract.Assert(obj.Rank == 1 && obj.GetLowerBound(0) == 0 && !type.IsArray);
system\runtime\interopservices\windowsruntime\custompropertyimpl.cs (1)
128Contract.Assert(AppDomain.CurrentDomain.PermissionSet.IsUnrestricted());
system\runtime\interopservices\windowsruntime\dictionarytomapadapter.cs (1)
76Contract.Assert(_this != null);
system\runtime\interopservices\windowsruntime\listtovectoradapter.cs (1)
67Contract.Assert(_this != null);
system\runtime\versioning\binarycompatibility.cs (1)
137Contract.Assert(s_AppWasBuiltForFramework != TargetFrameworkId.Unrecognized);
system\security\builtinpermissionsets.cs (1)
308Contract.Assert(!String.IsNullOrEmpty(permissionSetXml));
system\security\codeaccesssecurityengine.cs (3)
732Contract.Assert(evidence != null); 733Contract.Assert(!AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled); // This API does not do CAS policy resolution 764Contract.Assert(evidence != null);
system\security\cryptography\dsacryptoserviceprovider.cs (6)
274Contract.Assert(data != null); 275Contract.Assert(offset >= 0 && offset <= data.Length); 276Contract.Assert(count >= 0 && count <= data.Length - offset); 277Contract.Assert(!String.IsNullOrEmpty(hashAlgorithm.Name)); 290Contract.Assert(data != null); 291Contract.Assert(!String.IsNullOrEmpty(hashAlgorithm.Name));
system\security\cryptography\rfc2898derivebytes.cs (1)
157Contract.Assert(m_blockSize > 0);
system\security\cryptography\rsacryptoserviceprovider.cs (6)
522Contract.Assert(data != null); 523Contract.Assert(offset >= 0 && offset <= data.Length); 524Contract.Assert(count >= 0 && count <= data.Length); 525Contract.Assert(!String.IsNullOrEmpty(hashAlgorithm.Name)); 536Contract.Assert(data != null); 537Contract.Assert(!String.IsNullOrEmpty(hashAlgorithm.Name));
system\security\namedpermissionset.cs (1)
88Contract.Assert(permissionSetXml != null);
system\security\permissionset.cs (2)
2382Contract.Assert(casPset == null || !casPset.IsReadOnly); 2383Contract.Assert(nonCasPset == null || !nonCasPset.IsReadOnly);
system\security\policy\appdomainevidencefactory.cs (1)
24Contract.Assert(target != null);
system\security\policy\applicationdirectory.cs (1)
39Contract.Assert(appDirectory != null);
system\security\policy\assemblyevidencefactory.cs (5)
35Contract.Assert(targetAssembly != null); 36Contract.Assert(peFileFactory != null); 131Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled); 220Contract.Assert(peFileEvidence != null); 221Contract.Assert(targetAssembly != null);
system\security\policy\evidence.cs (46)
211Contract.Assert(target != null); 300Contract.Assert(m_evidenceLock == null || !IsReaderLockHeld); 310Contract.Assert(m_evidenceLock == null || !IsWriterLockHeld); 320Contract.Assert(IsWriterLockHeld); 329Contract.Assert(IsReaderLockHeld); 335Contract.Assert(IsReaderLockHeld); 345Contract.Assert(IsWriterLockHeld); 426Contract.Assert(IsWriterLockHeld); 427Contract.Assert(evidence != null); 428Contract.Assert(evidenceType != null); 476Contract.Assert(evidence != null); 477Contract.Assert(evidenceType != null); 496Contract.Assert(IsWriterLockHeld); 497Contract.Assert(evidence != null); 498Contract.Assert(evidenceType != null); 526Contract.Assert(IsWriterLockHeld); 650Contract.Assert(evidence != null); 679Contract.Assert(IsReaderLockHeld || IsWriterLockHeld); 680Contract.Assert(evidenceType != null); 728Contract.Assert(original != null); 729Contract.Assert(duplicate != null); 730Contract.Assert(original.GetType() == duplicate.GetType() || original.GetType() == typeof(LegacyEvidenceList)); 766Contract.Assert(evidence != null); 981Contract.Assert(IsReaderLockHeld || IsWriterLockHeld); 1111Contract.Assert(IsReaderLockHeld); 1122Contract.Assert(IsReaderLockHeld); 1146Contract.Assert(type != null); 1156Contract.Assert(IsReaderLockHeld || IsWriterLockHeld); 1157Contract.Assert(type != null); 1189Contract.Assert(type != null); 1197Contract.Assert(type != null); 1228Contract.Assert(IsReaderLockHeld || IsWriterLockHeld); 1229Contract.Assert(type != null); 1304Contract.Assert(type != null); 1305Contract.Assert(IsWriterLockHeld); 1541Contract.Assert(target != null); 1542Contract.Assert(lockType == LockType.Reader || lockType == LockType.Writer); 1581Contract.Assert(target != null); 1619Contract.Assert(evidence != null); 1620Contract.Assert(evidenceTypes != null); 1694Contract.Assert(evidence != null); 1695Contract.Assert(evidenceTypes != null); 1805Contract.Assert(evidence != null); 1806Contract.Assert(evidence.IsReaderLockHeld); 1885Contract.Assert(m_evidence != null); 1886Contract.Assert(m_evidence.IsReaderLockHeld);
system\security\policy\evidencebase.cs (2)
91Contract.Assert(legacyEvidence != null); 167Contract.Assert(evidence != null);
system\security\policy\evidencetypedescriptor.cs (3)
48Contract.Assert(descriptor != null); 75Contract.Assert(value != null); 120Contract.Assert(value != null);
system\security\policy\hash.cs (9)
108Contract.Assert(hash != null); 120Contract.Assert(hashType != null); 121Contract.Assert(hashValue != null); 334Contract.Assert(assemblyBytes != null); 362Contract.Assert(assemblyBytes != null); 394Contract.Assert(hashAlgorithm != null && typeof(HashAlgorithm).IsAssignableFrom(hashAlgorithm)); 395Contract.Assert(fallbackImplementation != null && GetHashIndexType(hashAlgorithm).IsAssignableFrom(fallbackImplementation)); 408Contract.Assert(hashAlgorithm != null && typeof(HashAlgorithm).IsAssignableFrom(hashAlgorithm)); 445Contract.Assert(hashType != null && typeof(HashAlgorithm).IsAssignableFrom(hashType));
system\security\policy\pefileevidencefactory.cs (1)
65Contract.Assert(peFile != null &&
system\security\policy\site.cs (1)
40Contract.Assert(name != null);
system\security\policy\url.cs (1)
48Contract.Assert(url != null);
system\security\policy\zone.cs (1)
48Contract.Assert(zone != null);
system\security\policymanager.cs (1)
91Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled);
system\security\readonlypermissionset.cs (1)
137Contract.Assert(permissionSetEnumerator != null);
system\security\securestring.cs (1)
294Contract.Assert(index <= Int32.MaxValue / sizeof(char));
system\security\securitycontext.cs (7)
126Contract.Assert(Thread.CurrentThread.GetExecutionContextReader().SecurityContext.IsSame(prevSC)); 373Contract.Assert(GetCurrentWI(Thread.CurrentThread.GetExecutionContextReader()) == null); 531Contract.Assert(!this.isNewCapture); 642Contract.Assert(cachedAlwaysFlowImpersonationPolicy == _alwaysFlowImpersonationPolicy); 657Contract.Assert(currentEC.IsSame(Thread.CurrentThread.GetExecutionContextReader())); 658Contract.Assert(cachedAlwaysFlowImpersonationPolicy == _alwaysFlowImpersonationPolicy); 666Contract.Assert(_alwaysFlowImpersonationPolicy || currentEC.SecurityContext.WindowsIdentity == targetWI);
system\security\securitymanager.cs (2)
414Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled); 437Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled);
system\string.cs (1)
1166Contract.Assert(arrIndex < maxItems);
system\stubhelpers.cs (3)
600Contract.Assert(Environment.IsWinRTSupported); 943Contract.Assert(Environment.IsWinRTSupported); 1483Contract.Assert(Environment.IsWinRTSupported);
system\text\encoding.cs (1)
1071Contract.Assert(byteCount == bytesReceived);
system\text\stringbuilder.cs (1)
844Contract.Assert(insertingChars + this.Length < Int32.MaxValue);
system\threading\asynclocal.cs (7)
82Contract.Assert(m_valueChangedHandler != null); 138Contract.Assert(asyncLocalValueMap != null); 139Contract.Assert(asyncLocalValueMap == Empty || asyncLocalValueMap.GetType() != typeof(EmptyAsyncLocalValueMap)); 349Contract.Assert(count <= MaxMultiElements); 355Contract.Assert(index < _keyValues.Length); 484Contract.Assert(index == MultiElementAsyncLocalValueMap.MaxMultiElements); 497Contract.Assert(map.Count == count - 1);
system\threading\CancellationTokenSource.cs (4)
89Contract.Assert(source != null); 1029Contract.Assert(callbackInfo != null); 1159Contract.Assert(source != null); 1160Contract.Assert(index >= 0 && index < source.Length);
system\threading\CountdownEvent.cs (2)
192Contract.Assert(m_event != null); 239Contract.Assert(m_event != null);
system\threading\executioncontext.cs (21)
335Contract.Assert(Thread.CurrentThread == this.thread); 532Contract.Assert(!IsPreAllocatedDefault); 547Contract.Assert(!IsPreAllocatedDefault); 572Contract.Assert(this == s_dummyDefaultEC); 711Contract.Assert(current._localChangeNotifications != null); 712Contract.Assert(Array.IndexOf(current._localChangeNotifications, local) >= 0); 804Contract.Assert(this != s_dummyDefaultEC); 821Contract.Assert(this != s_dummyDefaultEC); 837Contract.Assert(this != s_dummyDefaultEC); 852Contract.Assert(this != s_dummyDefaultEC); 866Contract.Assert(this != s_dummyDefaultEC); 882Contract.Assert(this != s_dummyDefaultEC); 937Contract.Assert(executionContext != null); 940Contract.Assert(executionContext.IsDefaultFTContext(preserveSyncCtx)); 944Contract.Assert(executionContext.isNewCapture); 997Contract.Assert(currentThread == Thread.CurrentThread); 1005Contract.Assert(SecurityContext.GetCurrentWI(ecsw.outerEC, ecsw.cachedAlwaysFlowImpersonationPolicy) == null); 1029Contract.Assert(executionContext != null); 1030Contract.Assert(executionContext != s_dummyDefaultEC); 1118Contract.Assert(this._illogicalCallContext == null); 1130Contract.Assert(!this.isNewCapture);
system\threading\LazyInitializer.cs (1)
155Contract.Assert(target != null);
system\threading\ManualResetEventSlim.cs (2)
342Contract.Assert(m_lock != null); //if waiters>0, then m_lock has already been created. 752Contract.Assert(mre.m_lock != null); //the lock should have been created before this callback is registered for use.
system\threading\monitor.cs (1)
61Contract.Assert(lockTaken);
system\threading\SpinLock.cs (4)
398Contract.Assert((newOwner & WAITERS_MASK) >= 0); 440Contract.Assert((newOwner & WAITERS_MASK) >= 0); 502Contract.Assert(!IsThreadOwnerTrackingEnabled); // Make sure the waiters never be negative which will cause the thread tracking bit to be flipped 515Contract.Assert(IsThreadOwnerTrackingEnabled);
system\threading\SpinWait.cs (1)
355Contract.Assert(originalWaitMillisecondsTimeout != Timeout.Infinite);
system\threading\synchronizationcontext.cs (1)
284Contract.Assert(Environment.IsWinRTSupported);
system\threading\Tasks\BeginEndAwaitableAdapter.cs (7)
70Contract.Assert(asyncResult != null); 71Contract.Assert(asyncResult.IsCompleted); 72Contract.Assert(asyncResult.AsyncState is BeginEndAwaitableAdapter); 89Contract.Assert(continuation != CALLBACK_RAN); 119Contract.Assert(continuation != null); 128Contract.Assert(continuation != null); 147Contract.Assert(_asyncResult != null && _asyncResult.IsCompleted);
system\threading\Tasks\Future.cs (2)
512Contract.Assert(success); 676Contract.Assert(m_action != null);
system\threading\Tasks\FutureFactory.cs (4)
1807Contract.Assert(continuationAction != null); 1860Contract.Assert(continuationAction != null); 2206Contract.Assert(continuationAction != null); 2252Contract.Assert(continuationAction != null);
system\threading\Tasks\Parallel.cs (6)
1168Contract.Assert(sharedPStateFlags != null); 1173Contract.Assert(sharedPStateFlags != null); 1482Contract.Assert(sharedPStateFlags != null); 1487Contract.Assert(sharedPStateFlags != null); 2289Contract.Assert(array != null); 2348Contract.Assert(list != null);
system\threading\Tasks\ParallelLoopState.cs (3)
52Contract.Assert(false); 109Contract.Assert(false); 157Contract.Assert(false);
system\threading\Tasks\ParallelRangeManager.cs (4)
193Contract.Assert((nFromInclusiveLocal <= Int32.MaxValue) && (nFromInclusiveLocal >= Int32.MinValue) && 252Contract.Assert((uSpan / uRangeSize) < Int32.MaxValue); 286Contract.Assert(i == nNumRanges - 1); 302Contract.Assert(m_indexRanges != null && m_indexRanges.Length != 0);
system\threading\Tasks\Task.cs (8)
2105Contract.Assert(m_contingentProperties != null); // ExceptionRecorded ==> m_contingentProperties != null 2437Contract.Assert(exceptionHolder != null); 3263Contract.Assert(IsCompleted || millisecondsTimeout != Timeout.Infinite); 3501Contract.Assert(m_contingentProperties.m_cancellationToken == default(CancellationToken)); 5496Contract.Assert(firstCompleted.Status == TaskStatus.RanToCompletion); 5498Contract.Assert(signaledTaskIndex >= 0); 6400Contract.Assert(task.Status == TaskStatus.RanToCompletion); 6626Contract.Assert(continuationTask.m_action == null);
system\threading\Tasks\TaskCompletionSource.cs (1)
215Contract.Assert(exceptions != null);
system\threading\Tasks\TaskContinuation.cs (11)
59Contract.Assert(m_action != null); 107Contract.Assert(m_action != null); 155Contract.Assert(m_action != null); 203Contract.Assert(m_action != null); 245Contract.Assert(task.m_taskScheduler != null); 324Contract.Assert(completedTask != null); 405Contract.Assert(context != null); 496Contract.Assert(scheduler != null); 749Contract.Assert(currentTask == Task.t_currentTask); 796Contract.Assert(currentTask == Task.t_currentTask); 865Contract.Assert(m_action != null);
system\threading\thread.cs (2)
402Contract.Assert(Thread.CurrentThread == this); 765Contract.Assert(ProcessorIdRefreshRate <= ProcessorIdCacheCountDownMask);
system\threading\ThreadLocal.cs (4)
556Contract.Assert(table.Length < minLength); 594Contract.Assert(minSize > 0); 743Contract.Assert(slotArray != null); 771Contract.Assert(linkedSlot.Previous != null);
system\threading\threadpool.cs (26)
180Contract.Assert(m_headIndex <= m_tailIndex); 242Contract.Assert(unused == obj); 442Contract.Assert(upper >= lower); 443Contract.Assert(upper <= nodes.Length); 444Contract.Assert(lower <= nodes.Length); 445Contract.Assert(upper >= 0); 446Contract.Assert(lower >= 0); 451Contract.Assert(newUpper >= newLower); 452Contract.Assert(newUpper <= nodes.Length); 453Contract.Assert(newLower <= nodes.Length); 454Contract.Assert(newUpper >= 0); 455Contract.Assert(newLower >= 0); 456Contract.Assert(newUpper >= prevUpper); 457Contract.Assert(newLower >= prevLower); 458Contract.Assert(newUpper == prevUpper ^ newLower == prevLower); 471Contract.Assert(QueueSegmentLength <= SixteenBits); 494Contract.Assert(null != node); 506Contract.Assert(Volatile.Read(ref nodes[upper]) == null); 665Contract.Assert(null != callback); 674Contract.Assert(null != callback); 702Contract.Assert(null != callback); 862Contract.Assert(false); 902Contract.Assert(null != cb); 1272Contract.Assert(null != wc); 1656Contract.Assert(null != workItem); 1673Contract.Assert(null != workItem);
system\threading\timer.cs (12)
157Contract.Assert(!m_isAppDomainTimerScheduled); 158Contract.Assert(m_appDomainTimer == null); 164Contract.Assert(!m_isAppDomainTimerScheduled); 207Contract.Assert(id == 0); 283Contract.Assert(timer.m_dueTime != Timeout.UnsignedInfinite); 284Contract.Assert(resumedTicks >= timer.m_startTicks); 357Contract.Assert(timer.m_dueTime != Timeout.UnsignedInfinite); 750Contract.Assert((timer is NetCore.TimerQueueTimer) == Timer.UseNetCoreTimer); 785Contract.Assert(!Timer.UseNetCoreTimer); 786Contract.Assert(m_timer is TimerQueueTimer); 797Contract.Assert(Timer.UseNetCoreTimer); 798Contract.Assert(m_timer is NetCore.TimerQueueTimer);
system\typenameparser.cs (4)
143Contract.Assert(asmName != null); 171Contract.Assert(throwOnError == false); 183Contract.Assert(typeArguments[i] != null); 193Contract.Assert(throwOnError == false);
System (35)
net\System\Net\_ChunkParser.cs (7)
305Contract.Assert(result is int); 358Contract.Assert(bufferCurrentPos <= bufferFillLength); 388Contract.Assert(currentPos == 0); 389Contract.Assert(bufferFillLength == buffer.Length); 489Contract.Assert(currentOperationBytesRead < userBufferCount); 547Contract.Assert(currentChunkLength == noChunkLength); 637Contract.Assert(currentChunkBytesRead == currentChunkLength);
net\System\Net\NetworkInformation\SystemUnicastIPAddressInformation.cs (1)
161Contract.Assert(prefixLength < (addressBytes.Length * 8));
net\System\Net\SocketAddress.cs (2)
178Contract.Assert(Size >= IPv6AddressSize); 193Contract.Assert(Size >= IPv4AddressSize);
net\System\Net\WebSockets\WebSocketBase.cs (2)
207Contract.Assert(buffer != null); 308Contract.Assert(buffer != null);
net\System\Net\WebSockets\WebSocketProtocolComponent.cs (4)
706Contract.Assert(dataBufferCount >= 0); 707Contract.Assert((dataBufferCount == 0 && dataBuffers == null) || 860Contract.Assert(httpHeaders != null); 861Contract.Assert(httpHeaders.Length == nativeHeaderCount);
parent\parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (2)
470Contract.Assert(null != ZLibStreamHandle.zlibLibraryHandle); 471Contract.Assert(!ZLibStreamHandle.zlibLibraryHandle.IsInvalid);
sys\system\collections\concurrent\ConcurrentBag.cs (7)
345Contract.Assert(Monitor.IsEntered(GlobalListsLock)); 747Contract.Assert(m_locals != null); 764Contract.Assert(!Monitor.IsEntered(GlobalListsLock)); 798Contract.Assert(Monitor.IsEntered(GlobalListsLock)); 844Contract.Assert(Monitor.IsEntered(GlobalListsLock)); 867Contract.Assert(Monitor.IsEntered(GlobalListsLock)); 889Contract.Assert(Monitor.IsEntered(GlobalListsLock));
sys\System\IO\compression\DeflaterZLib.cs (6)
137Contract.Assert(null != inputBuffer); 138Contract.Assert(startIndex >= 0 && count >= 0 && count + startIndex <= inputBuffer.Length); 139Contract.Assert(!_inputBufferHandle.IsAllocated); 161Contract.Assert(_inputBufferHandle.IsAllocated); 196Contract.Assert(!_inputBufferHandle.IsAllocated); 213Contract.Assert(_inputBufferHandle.IsAllocated);
sys\system\runtime\versioning\FrameworkName.cs (4)
32Contract.Assert(m_identifier != null); 39Contract.Assert(m_version != null); 46Contract.Assert(m_profile != null); 67Contract.Assert(m_fullName != null);
System.AddIn (36)
System\Addin\Hosting\ActivationWorker.cs (2)
202System.Diagnostics.Contracts.Contract.Assert(_pipeline != null); 243System.Diagnostics.Contracts.Contract.Assert(false);
System\Addin\Hosting\AddInActivator.cs (1)
648System.Diagnostics.Contracts.Contract.Assert(_contract != null);
System\Addin\Hosting\AddInStore.cs (1)
1033System.Diagnostics.Contracts.Contract.Assert(serializedData.Length <= Int32.MaxValue);
System\Addin\Hosting\AddInToken.cs (1)
155System.Diagnostics.Contracts.Contract.Assert(AddInStore.Contains(_hostAddinViews, value));
System\Addin\Hosting\Store\PipelineComponent.cs (6)
128System.Diagnostics.Contracts.Contract.Assert(s_IContractInReflectionLoaderContext != null); 135System.Diagnostics.Contracts.Contract.Assert(s_ContractAttrInReflectionLoaderContext != null); 142System.Diagnostics.Contracts.Contract.Assert(s_AddInAdapterAttrInReflectionLoaderContext != null); 149System.Diagnostics.Contracts.Contract.Assert(s_AddInBaseAttrInReflectionLoaderContext != null); 156System.Diagnostics.Contracts.Contract.Assert(s_AddInAttrInReflectionLoaderContext != null); 183System.Diagnostics.Contracts.Contract.Assert(!Path.IsPathRooted(_relativeLocation));
System\Addin\MiniReflection\MiniAssembly.cs (2)
83System.Diagnostics.Contracts.Contract.Assert(attrs == MDFileAttributes.ContainsMetaData); 98System.Diagnostics.Contracts.Contract.Assert(!IsReflectionAssembly); // Can be implemented using Assembly.GetType
System\Addin\MiniReflection\MiniModule.cs (2)
72System.Diagnostics.Contracts.Contract.Assert(_assembly != null); 153System.Diagnostics.Contracts.Contract.Assert(caType.Table == MDTables.Tables.MethodDef);
System\Addin\MiniReflection\TypeInfo.cs (21)
200System.Diagnostics.Contracts.Contract.Assert(_assembly == null); // Don't do this, or we might serialize assemblies! 212System.Diagnostics.Contracts.Contract.Assert((_representation & Representation.ReflectionType) == 0); 237System.Diagnostics.Contracts.Contract.Assert(HasReflectionType); 274System.Diagnostics.Contracts.Contract.Assert(HasReflectionType); 316System.Diagnostics.Contracts.Contract.Assert(HasToken); 357System.Diagnostics.Contracts.Contract.Assert(HasName); 364System.Diagnostics.Contracts.Contract.Assert(HasName); 373System.Diagnostics.Contracts.Contract.Assert(HasName); 377System.Diagnostics.Contracts.Contract.Assert(!HasTypeRef); 391System.Diagnostics.Contracts.Contract.Assert(_assembly != null || HasAssemblyQualifiedName); 400System.Diagnostics.Contracts.Contract.Assert(_assembly != null); 418System.Diagnostics.Contracts.Contract.Assert(HasToken); 419System.Diagnostics.Contracts.Contract.Assert(!HasTypeRef); 480System.Diagnostics.Contracts.Contract.Assert(_mdToken.Table == MDTables.Tables.TypeDef); 725System.Diagnostics.Contracts.Contract.Assert(HasToken || HasReflectionType || HasTypeRef); 729System.Diagnostics.Contracts.Contract.Assert(ifaceType.HasAssemblyQualifiedName); 752System.Diagnostics.Contracts.Contract.Assert(_mdToken.Table == MDTables.Tables.TypeDef); 846System.Diagnostics.Contracts.Contract.Assert(resolutionScope.Table == MDTables.Tables.AssemblyRef); 884System.Diagnostics.Contracts.Contract.Assert(_mdToken.Table == MDTables.Tables.TypeDef); 933System.Diagnostics.Contracts.Contract.Assert(HasName); 976System.Diagnostics.Contracts.Contract.Assert(caType.Table == MDTables.Tables.MethodDef);
System.Core (505)
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (9)
134Contract.Assert(m_ownershipState != OwnershipState.Duplicate); 135Contract.Assert(value.m_ownershipState == OwnershipState.Holder); 230Contract.Assert(m_ownershipState != OwnershipState.Holder); 231Contract.Assert(typeof(T) == this.GetType()); 258Contract.Assert(m_ownershipState == OwnershipState.Duplicate); 259Contract.Assert(typeof(T) == this.GetType()); 294Contract.Assert(m_ownershipState == OwnershipState.Owner); 295Contract.Assert(typeof(T) == this.GetType()); 421Contract.Assert(handle == IntPtr.Zero);
System\Linq\Parallel\Channels\AsynchronousChannel.cs (7)
291Contract.Assert(chunk != null); 386Contract.Assert(1 <= m_producerChunkIndex && m_producerChunkIndex <= m_chunkSize); 413Contract.Assert(m_consumerChunk == null); 491Contract.Assert(m_consumerChunk == null); 611Contract.Assert(!IsChunkBufferEmpty); 670Contract.Assert(m_producerEvent != null); 671Contract.Assert(m_consumerEvent != null);
System\Linq\Parallel\Channels\SynchronousChannel.cs (4)
71Contract.Assert(m_queue != null); 93Contract.Assert(m_queue != null); 119Contract.Assert(array != null); 134Contract.Assert(m_queue != null);
System\Linq\Parallel\Enumerables\AggregationMinMaxHelpers.cs (2)
29Contract.Assert(source != null); 30Contract.Assert(sign == -1 || sign == 1);
System\Linq\Parallel\Enumerables\EnumerableWrapperWeakToStrong.cs (2)
36Contract.Assert(wrappedEnumerable != null); 65Contract.Assert(wrappedEnumerator != null);
System\Linq\Parallel\Enumerables\OrderedParallelQuery.cs (1)
33Contract.Assert(sortOp is IOrderedEnumerable<TSource>);
System\Linq\Parallel\Enumerables\ParallelEnumerableWrapper.cs (2)
36Contract.Assert(source != null); 95Contract.Assert(m_wrappedEnumerable != null);
System\Linq\Parallel\Merging\AsynchronousChannelMergeEnumerator.cs (2)
51Contract.Assert(channels != null); 272Contract.Assert(currChannelIndex == m_channels.Length);
System\Linq\Parallel\Merging\DefaultMergeHelper.cs (5)
52Contract.Assert(partitions != null); 89Contract.Assert(m_asyncChannels == null || m_asyncChannels.Length == partitions.PartitionCount); 90Contract.Assert(m_syncChannels == null || m_syncChannels.Length == partitions.PartitionCount); 120Contract.Assert(m_partitions.PartitionCount == 1); 130Contract.Assert(m_ignoreOutput || m_channelEnumerator != null);
System\Linq\Parallel\Merging\MergeEnumerator.cs (2)
34Contract.Assert(taskGroupState != null); 72Contract.Assert(m_taskGroupState.CancellationState.TopLevelDisposedFlag.Value);
System\Linq\Parallel\Merging\MergeExecutor.cs (6)
58Contract.Assert(partitions != null); 59Contract.Assert(partitions.PartitionCount > 0); 67Contract.Assert(options == ParallelMergeOptions.NotBuffered || options == ParallelMergeOptions.AutoBuffered); 106Contract.Assert(m_mergeHelper != null); 122Contract.Assert(m_mergeHelper != null); 151Contract.Assert(options == ParallelMergeOptions.NotBuffered || options == ParallelMergeOptions.AutoBuffered);
System\Linq\Parallel\Merging\OrderPreservingMergeHelper.cs (2)
45Contract.Assert(partitions != null); 73Contract.Assert(m_results.Value != null);
System\Linq\Parallel\Merging\OrderPreservingPipeliningMergeHelper.cs (6)
122Contract.Assert(partitions != null); 139Contract.Assert(typeof(TKey) == typeof(int)); 409Contract.Assert(m_mergeHelper.m_producerDone[producer]); 446Contract.Assert(gotElement); 465Contract.Assert(m_privateBuffer[producer].Count == 0); 523Contract.Assert(x.MaxKey >= 0 && y.MaxKey >= 0); // Guarantees no overflow on next line
System\Linq\Parallel\Merging\SynchronousChannelMergeEnumerator.cs (4)
42Contract.Assert(channels != null); 84Contract.Assert(m_channels != null); 96Contract.Assert(current != null); 115Contract.Assert(m_channelIndex == m_channels.Length);
System\Linq\Parallel\Partitioning\HashRepartitionEnumerator.cs (10)
72Contract.Assert(source != null); 73Contract.Assert(keySelector != null || typeof(THashKey) == typeof(NoKeyMemoizationRequired)); 74Contract.Assert(repartitionStream != null); 75Contract.Assert(barrier != null); 76Contract.Assert(valueExchangeMatrix != null); 79Contract.Assert(0 <= partitionIndex && partitionIndex < partitionCount); 135Contract.Assert(mutables.m_currentBufferIndex != ENUMERATION_NOT_STARTED); 158Contract.Assert(mutables.m_currentBuffer == null || mutables.m_currentBuffer.Count > 0); 202Contract.Assert(mutables != null); 225Contract.Assert(typeof(THashKey) == typeof(NoKeyMemoizationRequired));
System\Linq\Parallel\Partitioning\HashRepartitionStream.cs (2)
58Contract.Assert(m_keyComparer == null || m_elementComparer == null); 59Contract.Assert(m_elementComparer == null || typeof(THashKey) == typeof(NoKeyMemoizationRequired));
System\Linq\Parallel\Partitioning\OrderedHashRepartitionEnumerator.cs (14)
74Contract.Assert(source != null); 75Contract.Assert(keySelector != null || typeof(THashKey) == typeof(NoKeyMemoizationRequired)); 76Contract.Assert(repartitionStream != null); 77Contract.Assert(barrier != null); 78Contract.Assert(valueExchangeMatrix != null); 81Contract.Assert(0 <= partitionIndex && partitionIndex < partitionCount); 136Contract.Assert(mutables.m_currentBufferIndex != ENUMERATION_NOT_STARTED); 148Contract.Assert(mutables.m_currentKeyBuffer != null); 164Contract.Assert(mutables.m_currentBuffer == null || mutables.m_currentBuffer.Count > 0); 165Contract.Assert((mutables.m_currentBuffer == null) == (mutables.m_currentKeyBuffer == null)); 166Contract.Assert(mutables.m_currentBuffer == null || mutables.m_currentBuffer.Count == mutables.m_currentKeyBuffer.Count); 211Contract.Assert(mutables != null); 235Contract.Assert(typeof(THashKey) == typeof(NoKeyMemoizationRequired)); 252Contract.Assert(keyBuffer == null);
System\Linq\Parallel\Partitioning\PartitionedDataSource.cs (21)
78Contract.Assert(source != null); 79Contract.Assert(partitionCount > 0); 86Contract.Assert(source != null); 145Contract.Assert(partitions.Length == partitionCount); 168Contract.Assert(source != null); 169Contract.Assert(partitionCount > 0); 258Contract.Assert(sectionSize > 0); 288Contract.Assert(mutables != null); 289Contract.Assert(mutables.m_currentPositionInChunk >= mutables.m_currentChunkSize); 436Contract.Assert(sectionSize > 0); 466Contract.Assert(mutables != null); 467Contract.Assert(mutables.m_currentPositionInChunk >= mutables.m_currentChunkSize); 616Contract.Assert(source != null); 617Contract.Assert(sourceSyncLock != null); 618Contract.Assert(currentIndex != null); 639Contract.Assert(mutables.m_chunkBuffer != null); 649Contract.Assert(m_source != null); 650Contract.Assert(chunkBuffer != null); 651Contract.Assert(mutables.m_currentChunkSize > 0); 652Contract.Assert(0 <= currentChunkIndex && currentChunkIndex < chunkBuffer.Length); 666Contract.Assert(0 <= mutables.m_nextChunkMaxSize && mutables.m_nextChunkMaxSize <= chunkBuffer.Length);
System\Linq\Parallel\Partitioning\PartitionedStream.cs (5)
44Contract.Assert(partitionCount > 0); 61Contract.Assert(m_partitions != null); 67Contract.Assert(m_partitions != null); 68Contract.Assert(value != null); 82Contract.Assert(m_partitions != null);
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (7)
112Contract.Assert(m_finalReduce != null); 113Contract.Assert(m_resultSelector != null); 258Contract.Assert(source != null); 259Contract.Assert(reduceOperator != null); 277Contract.Assert(m_reduceOperator != null); 302Contract.Assert(typeof(TInput) == typeof(TIntermediate)); 335Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (11)
60Contract.Assert(leftStream.PartitionCount == rightStream.PartitionCount); 160Contract.Assert(leftSource != null); 161Contract.Assert(rightSource != null); 175Contract.Assert(m_leftSource != null); 176Contract.Assert(m_rightSource != null); 224Contract.Assert(m_leftSource != null && m_rightSource != null); 249Contract.Assert(leftSource != null); 250Contract.Assert(rightSource != null); 265Contract.Assert(m_leftSource != null); 266Contract.Assert(m_rightSource != null); 327Contract.Assert(m_leftSource != null && m_rightSource != null);
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (1)
80Contract.Assert(rightStream.PartitionCount == leftStream.PartitionCount);
System\Linq\Parallel\QueryOperators\Binary\HashJoinQueryOperatorEnumerator.cs (9)
72Contract.Assert(leftSource != null); 73Contract.Assert(rightSource != null); 74Contract.Assert(singleResultSelector != null || groupResultSelector != null); 99Contract.Assert(m_leftSource != null); 100Contract.Assert(m_rightSource != null); 249Contract.Assert(m_singleResultSelector != null); 250Contract.Assert(mutables.m_currentRightMatches != null); 251Contract.Assert(0 <= mutables.m_currentRightMatchesIndex && mutables.m_currentRightMatchesIndex < mutables.m_currentRightMatches.Count); 264Contract.Assert(m_leftSource != null && m_rightSource != null);
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (11)
62Contract.Assert(leftPartitionedStream.PartitionCount == rightPartitionedStream.PartitionCount); 149Contract.Assert(leftSource != null); 150Contract.Assert(rightSource != null); 164Contract.Assert(m_leftSource != null); 165Contract.Assert(m_rightSource != null); 215Contract.Assert(m_leftSource != null && m_rightSource != null); 253Contract.Assert(leftSource != null); 254Contract.Assert(rightSource != null); 269Contract.Assert(m_leftSource != null); 270Contract.Assert(m_rightSource != null); 331Contract.Assert(m_leftSource != null && m_rightSource != null);
System\Linq\Parallel\QueryOperators\Binary\JoinQueryOperator.cs (1)
83Contract.Assert(rightStream.PartitionCount == leftStream.PartitionCount);
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (9)
64Contract.Assert(leftStream.PartitionCount == rightStream.PartitionCount); 208Contract.Assert(leftSource != null); 209Contract.Assert(rightSource != null); 230Contract.Assert(m_hashLookup != null); 325Contract.Assert(leftSource != null); 326Contract.Assert(rightSource != null); 350Contract.Assert(m_leftSource != null); 351Contract.Assert(m_rightSource != null); 412Contract.Assert(m_leftSource != null && m_rightSource != null);
System\Linq\Parallel\QueryOperators\Binary\ZipQueryOperator.cs (2)
182Contract.Assert(m_leftChildResults.IsIndexible); 183Contract.Assert(m_rightChildResults.IsIndexible);
System\Linq\Parallel\QueryOperators\BinaryQueryOperator.cs (2)
46Contract.Assert(leftChild != null && rightChild != null); 109Contract.Assert(IsIndexible == (m_op.OrdinalIndexState == OrdinalIndexState.Indexible));
System\Linq\Parallel\QueryOperators\Inlined\CountAggregationOperator.cs (2)
93Contract.Assert(source != null); 137Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DecimalAverageAggregationOperator.cs (2)
103Contract.Assert(source != null); 152Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DecimalMinMaxAggregationOperator.cs (2)
121Contract.Assert(source != null); 182Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DecimalSumAggregationOperator.cs (2)
91Contract.Assert(source != null); 134Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DoubleAverageAggregationOperator.cs (2)
103Contract.Assert(source != null); 152Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DoubleMinMaxAggregationOperator.cs (2)
127Contract.Assert(source != null); 189Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DoubleSumAggregationOperator.cs (2)
93Contract.Assert(source != null); 135Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\FloatAverageAggregationOperator.cs (2)
103Contract.Assert(source != null); 152Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\FloatMinMaxAggregationOperator.cs (2)
125Contract.Assert(source != null); 186Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\FloatSumAggregationOperator.cs (2)
95Contract.Assert(source != null); 138Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\IntAverageAggregationOperator.cs (2)
103Contract.Assert(source != null); 152Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\IntMinMaxAggregationOperator.cs (2)
121Contract.Assert(source != null); 183Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\IntSumAggregationOperator.cs (2)
95Contract.Assert(source != null); 141Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\LongAverageAggregationOperator.cs (2)
103Contract.Assert(source != null); 152Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\LongCountAggregationOperator.cs (2)
95Contract.Assert(source != null); 140Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\LongMinMaxAggregationOperator.cs (2)
122Contract.Assert(source != null); 184Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\LongSumAggregationOperator.cs (2)
94Contract.Assert(source != null); 140Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalAverageAggregationOperator.cs (2)
99Contract.Assert(source != null); 140Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalMinMaxAggregationOperator.cs (2)
117Contract.Assert(source != null); 179Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalSumAggregationOperator.cs (2)
88Contract.Assert(source != null); 131Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleAverageAggregationOperator.cs (2)
99Contract.Assert(source != null); 140Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleMinMaxAggregationOperator.cs (2)
125Contract.Assert(source != null); 189Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleSumAggregationOperator.cs (2)
88Contract.Assert(source != null); 132Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatAverageAggregationOperator.cs (2)
99Contract.Assert(source != null); 141Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatMinMaxAggregationOperator.cs (2)
125Contract.Assert(source != null); 189Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatSumAggregationOperator.cs (2)
88Contract.Assert(source != null); 131Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableIntAverageAggregationOperator.cs (2)
99Contract.Assert(source != null); 141Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableIntMinMaxAggregationOperator.cs (2)
117Contract.Assert(source != null); 178Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableIntSumAggregationOperator.cs (2)
91Contract.Assert(source != null); 136Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableLongAverageAggregationOperator.cs (2)
100Contract.Assert(source != null); 141Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableLongMinMaxAggregationOperator.cs (2)
118Contract.Assert(source != null); 180Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableLongSumAggregationOperator.cs (2)
92Contract.Assert(source != null); 138Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\PartitionerQueryOperator.cs (3)
136Contract.Assert(m_settings.DegreeOfParallelism.HasValue); 240Contract.Assert(m_sourceEnumerator != null); 270Contract.Assert(m_sourceEnumerator != null);
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (1)
57Contract.Assert(queryOperator != null);
System\Linq\Parallel\QueryOperators\QueryOperator.cs (6)
146Contract.Assert(mergeOptions != null); 186Contract.Assert(querySettings.TaskScheduler != null); 187Contract.Assert(querySettings.DegreeOfParallelism.HasValue); 188Contract.Assert(querySettings.ExecutionMode.HasValue); 305Contract.Assert(source != null); 331Contract.Assert(sourceAsOperator != null);
System\Linq\Parallel\QueryOperators\QueryOperatorEnumerator.cs (1)
66Contract.Assert(operatorEnumerator != null);
System\Linq\Parallel\QueryOperators\QuerySettings.cs (11)
47Contract.Assert(m_cancellationState != null); 100Contract.Assert(m_cancellationState != null); 166Contract.Assert(settings.CancellationState.InternalCancellationTokenSource != null); 167Contract.Assert(settings.CancellationState.MergedCancellationToken.CanBeCanceled); 168Contract.Assert(settings.CancellationState.TopLevelDisposedFlag != null); 209Contract.Assert(settings.TaskScheduler != null); 210Contract.Assert(settings.DegreeOfParallelism.HasValue); 211Contract.Assert(settings.DegreeOfParallelism.Value >= 1 && settings.DegreeOfParallelism <= Scheduling.MAX_SUPPORTED_DOP); 212Contract.Assert(settings.ExecutionMode != null); 213Contract.Assert(settings.MergeOptions != null); 215Contract.Assert(settings.MergeOptions != ParallelMergeOptions.Default);
System\Linq\Parallel\QueryOperators\ScanQueryOperator.cs (2)
38Contract.Assert(data != null); 65Contract.Assert(settings.DegreeOfParallelism.HasValue);
System\Linq\Parallel\QueryOperators\Unary\AnyAllSearchOperator.cs (5)
169Contract.Assert(source != null); 170Contract.Assert(predicate != null); 171Contract.Assert(resultFoundFlag != null); 189Contract.Assert(m_predicate != null); 237Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\ConcatQueryOperator.cs (8)
94Contract.Assert(!ExchangeUtilities.IsWorseThan(leftStream.OrdinalIndexState, OrdinalIndexState.Increasing)); 113Contract.Assert(!ExchangeUtilities.IsWorseThan(rightStream.OrdinalIndexState, OrdinalIndexState.Increasing)); 177Contract.Assert(firstSource != null); 178Contract.Assert(secondSource != null); 194Contract.Assert(m_firstSource != null); 195Contract.Assert(m_secondSource != null); 264Contract.Assert(leftChildQueryResults.IsIndexible && rightChildQueryResults.IsIndexible); 279Contract.Assert(m_leftChildCount >= 0 && m_rightChildCount >= 0);
System\Linq\Parallel\QueryOperators\Unary\ContainsSearchOperator.cs (5)
156Contract.Assert(source != null); 157Contract.Assert(comparer != null); 158Contract.Assert(resultFoundFlag != null); 176Contract.Assert(m_comparer != null); 223Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\DefaultIfEmptyQueryOperator.cs (6)
127Contract.Assert(source != null); 128Contract.Assert(0 <= partitionIndex && partitionIndex < partitionCount); 129Contract.Assert(partitionCount > 0); 130Contract.Assert(sharedEmptyCount != null); 131Contract.Assert(sharedLatch != null); 148Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (8)
139Contract.Assert(source != null); 151Contract.Assert(m_source != null); 152Contract.Assert(m_hashLookup != null); 182Contract.Assert(m_source != null); 215Contract.Assert(source != null); 231Contract.Assert(m_source != null); 232Contract.Assert(m_hashLookup != null); 277Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (5)
79Contract.Assert(intKeyStream.OrdinalIndexState == OrdinalIndexState.Indexible); 185Contract.Assert(source != null); 186Contract.Assert(index >= 0); 187Contract.Assert(resultFoundFlag != null); 228Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\FirstQueryOperator.cs (5)
145Contract.Assert(source != null); 146Contract.Assert(operatorState != null); 147Contract.Assert(sharedBarrier != null); 148Contract.Assert(keyComparer != null); 165Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (5)
51Contract.Assert(m_elementAction != null); 69Contract.Assert(enumerator == null); 139Contract.Assert(source != null); 140Contract.Assert(elementAction != null); 177Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (25)
118Contract.Assert(typeof(TSource) == typeof(TElement)); 158Contract.Assert(typeof(TSource) == typeof(TElement)); 198Contract.Assert(typeof(TElement) == typeof(TSource)); 250Contract.Assert(source != null); 265Contract.Assert(m_source != null); 276Contract.Assert(mutables.m_hashLookup != null); 353Contract.Assert(currentValue != null); 384Contract.Assert(elementSelector != null); 417Contract.Assert(currentValue != null); 457Contract.Assert(source != null); 458Contract.Assert(keySelector != null); 475Contract.Assert(m_source != null); 476Contract.Assert(m_keySelector != null); 487Contract.Assert(mutables.m_hashLookup != null); 594Contract.Assert(currentValue != null); 629Contract.Assert(elementSelector != null); 670Contract.Assert(currentValue != null); 703Contract.Assert(keyValues.Value != null); 725Contract.Assert(m_keyValues.Value != null); 774Contract.Assert(m_values != null); 779Contract.Assert(valueArray.Length >= valueCount); // valueArray.Length may be larger than valueCount 797Contract.Assert(m_values != null); 798Contract.Assert(m_orderKeys != null); 809Contract.Assert(m_values != null); 810Contract.Assert(m_orderKeys != null);
System\Linq\Parallel\QueryOperators\Unary\IndexedSelectQueryOperator.cs (6)
75Contract.Assert(!ExchangeUtilities.IsWorseThan(indexState, OrdinalIndexState.Correct)); 107Contract.Assert(typeof(TKey) == typeof(int)); 150Contract.Assert(source != null); 151Contract.Assert(selector != null); 223Contract.Assert(m_childQueryResults.IsIndexible); 232Contract.Assert(m_childCount >= 0);
System\Linq\Parallel\QueryOperators\Unary\IndexedWhereQueryOperator.cs (4)
101Contract.Assert(typeof(TKey) == typeof(int)); 157Contract.Assert(source != null); 158Contract.Assert(predicate != null); 194Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\LastQueryOperator.cs (5)
141Contract.Assert(source != null); 142Contract.Assert(operatorState != null); 143Contract.Assert(sharedBarrier != null); 144Contract.Assert(keyComparer != null); 161Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\ReverseQueryOperator.cs (6)
124Contract.Assert(source != null); 201Contract.Assert(m_childQueryResults.IsIndexible); 214Contract.Assert(m_count >= 0); 221Contract.Assert(m_count >= 0); 222Contract.Assert(index >= 0); 223Contract.Assert(index < m_count);
System\Linq\Parallel\QueryOperators\Unary\SelectManyQueryOperator.cs (11)
212Contract.Assert(m_indexedRightChildSelector != null); 265Contract.Assert(leftSource != null); 266Contract.Assert(selectManyOperator != null); 302Contract.Assert(rightChild != null); 305Contract.Assert(m_currentRightSource != null); 335Contract.Assert(m_currentRightSourceAsOutput != null); 395Contract.Assert(leftSource != null); 396Contract.Assert(selectManyOperator != null); 432Contract.Assert(rightChild != null); 435Contract.Assert(m_currentRightSource != null); 465Contract.Assert(m_currentRightSourceAsOutput != null);
System\Linq\Parallel\QueryOperators\Unary\SelectQueryOperator.cs (6)
109Contract.Assert(source != null); 110Contract.Assert(selector != null); 168Contract.Assert(op.m_selector != null); 170Contract.Assert(m_childQueryResults.IsIndexible); 186Contract.Assert(index >= 0); 187Contract.Assert(index < ElementsCount);
System\Linq\Parallel\QueryOperators\Unary\SingleQueryOperator.cs (3)
117Contract.Assert(source != null); 118Contract.Assert(totalElementCount != null); 131Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\SortQueryOperator.cs (3)
212Contract.Assert(source != null); 237Contract.Assert(m_source != null); 251Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (10)
176Contract.Assert(source != null); 177Contract.Assert(sharedIndices != null); 178Contract.Assert(sharedBarrier != null); 179Contract.Assert(keyComparer != null); 196Contract.Assert(m_sharedIndices != null); 359Contract.Assert(m_childQueryResults.IsIndexible); 373Contract.Assert(m_childCount >= 0); 387Contract.Assert(m_childCount >= 0); 388Contract.Assert(index >= 0); 389Contract.Assert(index < ElementsCount);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (7)
142Contract.Assert(m_indexedPredicate == null || typeof(TKey) == typeof(int)); 236Contract.Assert(source != null); 237Contract.Assert(predicate != null || indexedPredicate != null); 238Contract.Assert(operatorState != null); 239Contract.Assert(sharedBarrier != null); 240Contract.Assert(keyComparer != null); 307Contract.Assert(m_indexedPredicate != null);
System\Linq\Parallel\QueryOperators\Unary\WhereQueryOperator.cs (3)
121Contract.Assert(source != null); 122Contract.Assert(predicate != null); 158Contract.Assert(m_source != null);
System\Linq\Parallel\QueryOperators\UnaryQueryOperator.cs (1)
115Contract.Assert(IsIndexible == (m_op.OrdinalIndexState == OrdinalIndexState.Indexible));
System\Linq\Parallel\Scheduling\OrderPreservingSpoolingTask.cs (2)
135Contract.Assert(m_sortHelper != null); 147Contract.Assert(sortedOutput != null);
System\Linq\Parallel\Scheduling\QueryTask.cs (2)
40Contract.Assert(groupState != null); 97Contract.Assert(unused == null);
System\Linq\Parallel\Scheduling\QueryTaskGroupState.cs (2)
93Contract.Assert(m_rootTask != null); 164Contract.Assert(m_cancellationState.TopLevelDisposedFlag.Value);
System\Linq\Parallel\Scheduling\SpoolingTask.cs (2)
299Contract.Assert(source != null); 386Contract.Assert(source != null);
System\Linq\Parallel\Utils\ExchangeUtilities.cs (1)
79Contract.Assert(returnValue.PartitionCount == partitionCount);
System\Linq\Parallel\Utils\FixedMaxHeap.cs (3)
44Contract.Assert(comparer != null); 141Contract.Assert(m_count > 0); 152Contract.Assert(m_count > 0);
System\Linq\Parallel\Utils\GrowingArray.cs (1)
60Contract.Assert(newSize > m_array.Length);
System\Linq\Parallel\Utils\ListChunk.cs (2)
35Contract.Assert(size > 0); 85Contract.Assert(curr.m_chunkCount == curr.m_chunk.Length || curr.m_nextChunk == null);
System\Linq\Parallel\Utils\Lookup.cs (1)
125Contract.Assert(!m_dict.ContainsKey(grouping.Key));
System\Linq\Parallel\Utils\Sorting.cs (22)
67Contract.Assert(source != null); 68Contract.Assert(groupState != null); 69Contract.Assert(sharedIndices != null); 70Contract.Assert(sharedkeys != null); 71Contract.Assert(sharedValues != null); 72Contract.Assert(sharedBarriers != null); 73Contract.Assert(groupState.CancellationState.MergedCancellationToken != null); 74Contract.Assert(sharedIndices.Length <= sharedkeys.Length); 75Contract.Assert(sharedIndices.Length == sharedValues.Length); 76Contract.Assert(sharedIndices.Length == sharedBarriers.GetLength(1)); 77Contract.Assert(groupState.CancellationState.MergedCancellationToken != null); 90Contract.Assert(m_sharedKeys.Length >= m_sharedValues.Length); 275Contract.Assert(keys != null); 276Contract.Assert(values != null); 277Contract.Assert(keys.Count == values.Count); 430Contract.Assert(myKeysArr != null); 500Contract.Assert(leftValues != null); 501Contract.Assert(leftKeys != null); 582Contract.Assert(keys.Length >= indices.Length); 583Contract.Assert(left <= right); 584Contract.Assert(0 <= left && left < keys.Length); 585Contract.Assert(0 <= right && right < keys.Length);
System\Linq\Parallel\Utils\WrapperEqualityComparer.cs (2)
42Contract.Assert(m_comparer != null); 48Contract.Assert(m_comparer != null);
System\Linq\ParallelEnumerable.cs (8)
1581Contract.Assert(source != null); 1582Contract.Assert(reduce != null); 1605Contract.Assert(source != null); 1606Contract.Assert(func != null); 1607Contract.Assert(seedIsSpecified || typeof(TSource) == typeof(TAccumulate)); 4927Contract.Assert(input != null); 5199Contract.Assert(groupings is QueryOperator<IGrouping<TKey, TSource>>); 5286Contract.Assert(groupings is QueryOperator<IGrouping<TKey, TElement>>);
System\Security\Cryptography\AesCryptoServiceProvider.cs (3)
370Contract.Assert(m_cspHandle != null); 403Contract.Assert(m_cspHandle != null); 404Contract.Assert(BlockSizeValue % 8 == 0);
System\Security\Cryptography\BCryptHashAlgorithm.cs (3)
115Contract.Assert(m_algorithmHandle != null); 177Contract.Assert(m_hashHandle != null); 215Contract.Assert(m_hashHandle != null);
System\Security\Cryptography\CapiHashAlgorithm.cs (3)
67Contract.Assert(m_cspHandle != null); 109Contract.Assert(m_hashHandle != null); 140Contract.Assert(m_hashHandle != null);
System\Security\Cryptography\CngAlgorithm.cs (3)
78Contract.Assert(m_algorithm != null); 92Contract.Assert(m_algorithm != null); 97Contract.Assert(m_algorithm != null);
System\Security\Cryptography\CngAlgorithmGroup.cs (3)
72Contract.Assert(m_algorithmGroup != null); 86Contract.Assert(m_algorithmGroup != null); 91Contract.Assert(m_algorithmGroup != null);
System\Security\Cryptography\CngKey.cs (23)
59Contract.Assert(m_keyHandle != null); 79Contract.Assert(m_keyHandle != null); 93Contract.Assert(m_keyHandle != null); 118Contract.Assert(m_keyHandle != null); 135Contract.Assert(m_keyHandle != null); 160Contract.Assert(m_keyHandle != null); 175Contract.Assert(m_keyHandle != null); 192Contract.Assert(m_keyHandle != null); 211Contract.Assert(m_keyHandle != null); 241Contract.Assert(m_keyHandle != null); 255Contract.Assert(m_keyHandle != null); 264Contract.Assert(m_keyHandle != null); 278Contract.Assert(m_kspHandle != null); 299Contract.Assert(m_kspHandle != null); 311Contract.Assert(m_keyHandle != null); 331Contract.Assert(m_keyHandle != null); 361Contract.Assert(m_keyHandle != null); 362Contract.Assert(m_kspHandle != null); 464Contract.Assert(m_keyHandle != null); 620Contract.Assert(m_keyHandle != null); 640Contract.Assert(m_keyHandle != null); 662Contract.Assert(m_keyHandle != null); 859Contract.Assert(m_keyHandle != null);
System\Security\Cryptography\CngKeyBlobFormat.cs (3)
73Contract.Assert(m_format != null); 87Contract.Assert(m_format != null); 92Contract.Assert(m_format != null);
System\Security\Cryptography\CngProvider.cs (3)
67Contract.Assert(m_provider != null); 81Contract.Assert(m_provider != null); 86Contract.Assert(m_provider != null);
System\Security\Cryptography\ECDiffieHellmanCng.cs (2)
315Contract.Assert(m_kdf >= ECDiffieHellmanKeyDerivationFunction.Hash && 339Contract.Assert(m_kdf >= ECDiffieHellmanKeyDerivationFunction.Hash &&
System\Security\Cryptography\ECDiffieHellmanCngPublicKey.cs (2)
43Contract.Assert(m_format != null); 119Contract.Assert(m_format != null);
System\Security\Cryptography\ECDiffieHellmanPublicKey.cs (1)
43Contract.Assert(m_keyBlob != null);
System\Security\Cryptography\MD5Cng.cs (3)
41Contract.Assert(m_hashAlgorithm != null); 46Contract.Assert(m_hashAlgorithm != null); 51Contract.Assert(m_hashAlgorithm != null);
System\Security\Cryptography\SHA1Cng.cs (3)
38Contract.Assert(m_hashAlgorithm != null); 43Contract.Assert(m_hashAlgorithm != null); 48Contract.Assert(m_hashAlgorithm != null);
System\Security\Cryptography\SHA256Cng.cs (3)
37Contract.Assert(m_hashAlgorithm != null); 42Contract.Assert(m_hashAlgorithm != null); 47Contract.Assert(m_hashAlgorithm != null);
System\Security\Cryptography\SHA256CryptoServiceProvider.cs (3)
41Contract.Assert(m_hashAlgorithm != null); 49Contract.Assert(m_hashAlgorithm != null); 57Contract.Assert(m_hashAlgorithm != null);
System\Security\Cryptography\SHA384Cng.cs (3)
37Contract.Assert(m_hashAlgorithm != null); 42Contract.Assert(m_hashAlgorithm != null); 47Contract.Assert(m_hashAlgorithm != null);
System\Security\Cryptography\SHA384CryptoServiceProvider.cs (3)
38Contract.Assert(m_hashAlgorithm != null); 43Contract.Assert(m_hashAlgorithm != null); 48Contract.Assert(m_hashAlgorithm != null);
System\Security\Cryptography\SHA512Cng.cs (3)
37Contract.Assert(m_hashAlgorithm != null); 42Contract.Assert(m_hashAlgorithm != null); 47Contract.Assert(m_hashAlgorithm != null);
System\Security\Cryptography\SHA512CryptoServiceProvider.cs (3)
41Contract.Assert(m_hashAlgorithm != null); 49Contract.Assert(m_hashAlgorithm != null); 57Contract.Assert(m_hashAlgorithm != null);
System.Numerics (86)
System\Numerics\BigInteger.cs (12)
67Contract.Assert(_sign == 1 || _sign == -1 /*, "_sign must be +1 or -1 when _bits is non-null"*/); 68Contract.Assert(Length(_bits) > 0 /*, "_bits must contain at least 1 element or be null"*/); 70Contract.Assert(_bits[0] >= kuMaskHighBit /*, "Wasted space _bits[0] could have been packed into _sign"*/); 73Contract.Assert(_sign > int.MinValue /*, "Int32.MinValue should not be stored in the _sign field"*/); 443Contract.Assert(value != 0); 505Contract.Assert(bits.Length == 4 && (bits[3] & DecimalScaleFactorMask) == 0); 1737Contract.Assert(sign == +1 || sign == -1); 1745Contract.Assert(man < (1UL << 53)); 1746Contract.Assert(exp <= 0 || man >= (1UL << 52)); 1775Contract.Assert(0 <= cbit && cbit < kcbitUint); 1776Contract.Assert(cu >= 1); 1798Contract.Assert(cu >= 2 && rgu[cu - 2] != 0);
System\Numerics\BigIntegerBuilder.cs (63)
41Contract.Assert(_iuLast == 0); 42Contract.Assert(!_fWritable || _rgu != null); 45Contract.Assert(_rgu != null && _rgu.Length > _iuLast); 46Contract.Assert(!fTrimmed || _rgu[_iuLast] != 0); 155Contract.Assert(cuExtra >= 0); 219Contract.Assert(cbit < kcbitUint); 237Contract.Assert(_iuLast > 0); 341Contract.Assert(_iuLast > 0); 435Contract.Assert(_iuLast > 0); 443Contract.Assert(uCarry <= 1); 531Contract.Assert(_iuLast > 0); 535Contract.Assert(reg._iuLast > 0); 548Contract.Assert(uBorrow <= 1); 551Contract.Assert(uBorrow == 1 && cuSub <= _iuLast); 560Contract.Assert(0 < _iuLast && _iuLast <= reg._iuLast); 561Contract.Assert(_iuLast < reg._iuLast || _rgu[_iuLast] < reg._rgu[_iuLast]); 568Contract.Assert(_iuLast > 0); 575Contract.Assert(uBorrow <= 1); 578Contract.Assert(uBorrow == 1); 669Contract.Assert(reg1._iuLast > 0 && reg2._iuLast > 0); 791Contract.Assert(regNum._iuLast > 0 && regDen._iuLast > 0); 797Contract.Assert(0 < regDen._iuLast && regDen._iuLast <= regNum._iuLast); 832Contract.Assert((uDen & 0x80000000) != 0); 835Contract.Assert(cuQuo + cuDen == regNum._iuLast + 1 || cuQuo + cuDen == regNum._iuLast + 2); 841Contract.Assert(uNumHi <= regDen._rgu[cuDen - 1]); 855Contract.Assert(uuQuo <= (ulong)uint.MaxValue + 2); 878Contract.Assert(uNumHi == uuBorrow || uNumHi == uuBorrow - 1); 884Contract.Assert(uCarry <= 1); 886Contract.Assert(uCarry == 1); 900Contract.Assert(cuDen > 1 && regNum._iuLast > 0); 920Contract.Assert(cbitShift < kcbitUint); 941Contract.Assert(_rgu.Length > _iuLast); 971Contract.Assert(cbitShift < kcbitUint); 1018Contract.Assert(_iuLast > 0); 1019Contract.Assert(cu > _iuLast); 1032Contract.Assert(_fWritable && _iuLast > 0); 1033Contract.Assert(iu <= _iuLast + 1); 1050Contract.Assert(_fWritable && _iuLast > 0); 1051Contract.Assert(iuMin <= _iuLast); 1129Contract.Assert(cuMax == reg1._iuLast + 1); 1130Contract.Assert(cuMin == reg2._iuLast + 1); 1153Contract.Assert(uu1 != 0 && uu2 != 0); 1171Contract.Assert(uu1 >= uu2); // We ensured this above. 1176Contract.Assert(cuMax == cuMin); 1178Contract.Assert(reg1._iuLast < cuMin - 1); 1193Contract.Assert(uu1 + a > a); // no overflow 1194Contract.Assert(uu2 + d > d); 1195Contract.Assert(uu1 > b); 1196Contract.Assert(uu2 > c); 1197Contract.Assert(uu2 + d <= uu1 - b); 1220Contract.Assert(uQuo == (uu1 + a - 1) / (uu2 - c)); 1221Contract.Assert(uQuo == (uu1 - b) / (uu2 + d)); 1228Contract.Assert(uu1 == b); 1232Contract.Assert(uu1 + a > a); // no overflow 1233Contract.Assert(uu2 + d > d); 1234Contract.Assert(uu2 > c); 1235Contract.Assert(uu1 > b); 1236Contract.Assert(uu1 + a <= uu2 - c); 1259Contract.Assert(uQuo == (uu2 + d - 1) / (uu1 - b)); 1260Contract.Assert(uQuo == (uu2 - c) / (uu1 + a)); 1267Contract.Assert(uu2 == c); 1273Contract.Assert(a == 1 && c == 0 && d == 1); 1274Contract.Assert(uu1 > uu2); // We ensured this above.
System\Numerics\BigNumber.cs (3)
395Contract.Assert(c >= 'a' && c <= 'f'); 554Contract.Assert(rguDst[iuDst] < kuBase); 600Contract.Assert(uDig < kuBase);
System\Numerics\NumericsHelpers.cs (8)
70Contract.Assert((man & 0xFFF0000000000000) == 0x0010000000000000); 89Contract.Assert(du.uu != 0); 152Contract.Assert(u2 <= u1); 165Contract.Assert(u1 < u2); 185Contract.Assert(uu2 <= uu1); 200Contract.Assert(uu1 < uu2); 222Contract.Assert(u2 <= u1); 235Contract.Assert(u1 < u2);
WindowsBase (2)
parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (2)
470Contract.Assert(null != ZLibStreamHandle.zlibLibraryHandle); 471Contract.Assert(!ZLibStreamHandle.zlibLibraryHandle.IsInvalid);