130 references to Assert
WindowsBase (130)
Base\MS\Internal\IO\Packaging\CaseInsensitiveOrdinalStringComparer.cs (3)
32Invariant.Assert((x is String) && (y is String)); 39Invariant.Assert((x is String) && (y is String)); 48Invariant.Assert(str is String);
Base\MS\Internal\IO\Packaging\CompoundFile\CompoundFileDeflateTransform.cs (3)
79Invariant.Assert(source.CanRead); 213Invariant.Assert(source.CanRead); 276Invariant.Assert(bytesRead <= sourceBufferSize);
Base\MS\Internal\IO\Packaging\CompoundFile\UserUseLicenseDictionaryLoader.cs (1)
54Invariant.Assert(rmet != null);
Base\MS\Internal\IO\Packaging\CompoundFile\VersionedStreamOwner.cs (1)
159Invariant.Assert(temp >= 0); // catch any math errors
Base\MS\Internal\IO\Packaging\InterleavedZipPartStream.cs (4)
79Invariant.Assert(_dir.GetStartOffset(GetCurrentPieceNumber()) == 0); 137Invariant.Assert(_dir.GetStartOffset(pieceNumber) == _currentOffset + totalBytesRead); 309Invariant.Assert(totalBytesWritten == count); 440Invariant.Assert(CanSeek);
Base\MS\Internal\IO\Packaging\InternalRelationshipCollection.cs (4)
117Invariant.Assert(!_package.InStreamingCreation); 130Invariant.Assert(!_package.InStreamingCreation); 145Invariant.Assert(!_package.InStreamingCreation); 731Invariant.Assert(_relationships.Count > 0);
Base\MS\Internal\IO\Packaging\PartBasedPackageProperties.cs (2)
503Invariant.Assert(_propertyPart == null); // This gets called exclusively from constructor. 762Invariant.Assert(_xmlWriter == null);
Base\MS\Internal\IO\Packaging\PartManifestEntry.cs (4)
73Invariant.Assert(uri != null); 74Invariant.Assert(contentType != null); 75Invariant.Assert(hashAlgorithm != null); 87Invariant.Assert(relationshipSelectors.Count > 0);
Base\MS\Internal\IO\Packaging\PieceDirectory.cs (5)
71Invariant.Assert(stream != null); 72Invariant.Assert(pieceStart >= 0); 168Invariant.Assert(sortedPieceInfoList.Count > 0); 297Invariant.Assert(pieceNumber <= _lastPieceIndex); 495Invariant.Assert(_pieceStreamInfoList.Count == 0);
Base\MS\Internal\IO\Packaging\PieceNameHelper.cs (3)
208Invariant.Assert(zipFileInfo != null); 453Invariant.Assert(pieceInfoA != null); 454Invariant.Assert(pieceInfoB != null);
Base\MS\Internal\IO\Packaging\SparseMemoryStream.cs (3)
381Invariant.Assert(lowWaterMark >=0 && highWaterMark >=0); // both of them must be positive or 0 382Invariant.Assert(lowWaterMark < highWaterMark); // low water mark must below high water mark 383Invariant.Assert(lowWaterMark <= Int32.MaxValue); // low water mark must fit single memory stream 2G
Base\MS\Internal\IO\Packaging\XmlDigitalSignatureProcessor.cs (7)
121Invariant.Assert(signer != null); 604Invariant.Assert(transformName != null); 631Invariant.Assert(transformName != null); 747Invariant.Assert(manager != null); 748Invariant.Assert(signaturePart != null); 967Invariant.Assert(_signedXml != null); 1198Invariant.Assert(!signer.HasPrivateKey);
Base\MS\Internal\IO\Packaging\XmlSignatureManifest.cs (2)
118Invariant.Assert(manager != null); 119Invariant.Assert(reader != null);
Base\MS\Internal\IO\Packaging\XmlSignatureProperties.cs (2)
103Invariant.Assert(xDoc != null); 104Invariant.Assert(signatureId != null);
Base\MS\Internal\IO\Zip\ZipIOBlockManager.cs (1)
835Invariant.Assert(_blockList.Count >= _requiredBlockCount);
Base\MS\Internal\IO\Zip\ZipIOLocalFileBlock.cs (4)
224Invariant.Assert(!_blockManager.Streaming); 576Invariant.Assert(_localFileDataDescriptor != null); 600Invariant.Assert(_localFileDataDescriptor != null); 624Invariant.Assert(_localFileDataDescriptor != null);
Base\MS\Internal\IO\Zip\ZipIOLocalFileDataDescriptor.cs (1)
155Invariant.Assert(_size == _fixedMinimalRecordSizeWithSignatureZip64);
Base\MS\Internal\Security\RightsManagement\ClientSession.cs (26)
58Invariant.Assert(user != null); 59Invariant.Assert((userActivationMode == UserActivationMode.Permanent) || 76Invariant.Assert((_hSession != null) && (!_hSession.IsInvalid)); 302Invariant.Assert(_envHandle == null); 407Invariant.Assert((certificateType == EnumerateLicenseFlags.SpecifiedClientLicensor) || 487Invariant.Assert(index >= 0); 547Invariant.Assert(issuanceLicense != null); 548Invariant.Assert(!_envHandle.IsInvalid); 601Invariant.Assert(!_envHandle.IsInvalid); 666Invariant.Assert((oldList != null) && (newList != null)); 791Invariant.Assert(serializedUseLicense != null); 878Invariant.Assert(theFirstHrFailureCode != 0); // it must contain an error as a succesfull return above should take of non-failure cases 1082Invariant.Assert(!issuanceLicenseHandle.IsInvalid); 1106Invariant.Assert(index >= 0); 1107Invariant.Assert(certificateChain != null); 1284Invariant.Assert(certificateChain != null); 1294Invariant.Assert(certificateChain != null); 1376Invariant.Assert(certificateChain != null); 1405Invariant.Assert(useLicenseChain != null); 1411Invariant.Assert(useLicense != null); 1455Invariant.Assert(useLicenseChain != null); 1459Invariant.Assert(useLicense != null); 1611Invariant.Assert(useLicenseChain != null); 1614Invariant.Assert(useLicense != null); 1764Invariant.Assert(publishLicense != null); 1845Invariant.Assert(publishLicense != null);
Base\MS\Internal\Security\RightsManagement\IssuanceLicense.cs (10)
109Invariant.Assert((boundLicenseHandle.IsInvalid) || (issuanceLicense != null)); 157Invariant.Assert((_issuanceLicenseHandle != null) && 250Invariant.Assert(unsignedPublishLicense != null); 416Invariant.Assert(grant != null); 417Invariant.Assert(grant.User != null); 647Invariant.Assert(index >= 0); 673Invariant.Assert(index >= 0); 730Invariant.Assert(index >= 0); 797Invariant.Assert(index >= 0); 1047Invariant.Assert((_issuanceLicenseHandle != null) &&
Base\MS\Internal\WeakReferenceKey.cs (1)
26Invariant.Assert(item != null);
Base\System\IO\Packaging\CompoundFile\StorageInfo.cs (3)
558Invariant.Assert(streamArray != null); 588Invariant.Assert(storageArray != null); 680Invariant.Assert( null != newStorage);
Base\System\IO\Packaging\CompoundFile\StorageRoot.cs (1)
497Invariant.Assert(root != null);
Base\System\IO\Packaging\ZipPackagePart.cs (1)
82Invariant.Assert(_pieces != null);
Base\System\Security\RightsManagement\CryptoProvider.cs (8)
372Invariant.Assert(boundLicenseHandleList != null); 373Invariant.Assert(boundLicenseHandleList.Count > 0); 375Invariant.Assert(rightsInfoList != null); 376Invariant.Assert(rightsInfoList.Count > 0); 380Invariant.Assert(rightsInfoList.Count == boundLicenseHandleList.Count); 382Invariant.Assert(owner != null); 398Invariant.Assert(serializedPublishLicense != null); 441Invariant.Assert(attributeSize == 4);
Base\System\Security\RightsManagement\SecureEnvironment.cs (4)
272Invariant.Assert(_clientSession != null); 398Invariant.Assert(applicationManifest != null); 399Invariant.Assert(user != null); 400Invariant.Assert(clientSession != null);
Base\System\Security\RightsManagement\UnsignedPublishLicense.cs (2)
296Invariant.Assert(!boundLicenseHandle.IsInvalid); 297Invariant.Assert(publishLicenseTemplate != null);
Base\System\Windows\Data\DataSourceProvider.cs (2)
287Invariant.Assert(Dispatcher != null); 362Invariant.Assert(args.Length == 5);
Base\System\Windows\Freezable.cs (1)
846Invariant.Assert(false);
Shared\MS\Internal\IO\Packaging\PackagingUtilities.cs (21)
69Invariant.Assert(reader != null && reader.ReadState == ReadState.Initial); 208Invariant.Assert(stream != null); 209Invariant.Assert(buffer != null); 210Invariant.Assert(buffer.Length > 0); 211Invariant.Assert(offset >= 0); 212Invariant.Assert(requestedCount >= 0); 213Invariant.Assert(requiredCount >= 0); 214Invariant.Assert(checked(offset + requestedCount <= buffer.Length)); 215Invariant.Assert(requiredCount <= requestedCount); 263Invariant.Assert(reader != null); 264Invariant.Assert(buffer != null); 265Invariant.Assert(buffer.Length > 0); 266Invariant.Assert(offset >= 0); 267Invariant.Assert(requestedCount >= 0); 268Invariant.Assert(requiredCount >= 0); 269Invariant.Assert(checked(offset + requestedCount <= buffer.Length)); 270Invariant.Assert(requiredCount <= requestedCount); 302Invariant.Assert(sourceStream != null); 303Invariant.Assert(targetStream != null); 304Invariant.Assert(bytesToCopy >= 0); 305Invariant.Assert(bufferSize > 0);