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