46 references to Assert
WindowsBase (46)
Base\MS\Internal\IO\Packaging\CompoundFile\CompoundFileDeflateTransform.cs (5)
80
Invariant.
Assert
(sink.CanWrite, "Logic Error - Cannot decompress into a read-only stream");
214
Invariant.
Assert
(sink.CanWrite, "Logic Error - Cannot compress into a read-only stream");
293
Invariant.
Assert
(compressedSize > 0, "compressing non-zero bytes creates a non-empty block");
297
Invariant.
Assert
(zStream.AvailIn == 0, "Expecting all data to be compressed!");
355
Invariant.
Assert
(size >= 0, "Cannot allocate negative number of bytes");
Base\MS\Internal\IO\Packaging\CompoundFile\NativeCompoundFileAPIs.cs (5)
96
Invariant.
Assert
(s != null, "s cannot be null");
127
Invariant.
Assert
(s != null, "s cannot be null");
437
Invariant.
Assert
(ppstg != null, "ppstg cannot be null");
454
Invariant.
Assert
(pstgDest != null, "pstgDest cannot be null");
745
Invariant.
Assert
(pstm != null, "pstm cannot be null");
Base\MS\Internal\IO\Packaging\InternalRelationshipCollection.cs (1)
209
Invariant.
Assert
(id != null, "id should not be null");
Base\MS\Internal\IO\Packaging\PartBasedPackageProperties.cs (1)
672
Invariant.
Assert
(false, "Unknown value type for properties");
Base\MS\Internal\IO\Packaging\PieceDirectory.cs (1)
248
Invariant.
Assert
(pieceNumber <= _lastPieceIndex, "We should have found the valid pieceNumber earlier");
Base\MS\Internal\IO\Packaging\PieceNameHelper.cs (1)
189
Invariant.
Assert
(pieceNumber >= 0, "Negative piece number.");
Base\MS\Internal\IO\Packaging\XmlSignatureManifest.cs (1)
705
Invariant.
Assert
(false, "This option should never be executed");
Base\MS\Internal\IO\Zip\ZipIOLocalFileDataDescriptor.cs (2)
192
Invariant.
Assert
((value >= 0), "CompressedSize must be non-negative");
206
Invariant.
Assert
((value >= 0), "UncompressedSize must be non-negative");
Base\MS\Internal\PlatformCulture.cs (1)
36
Invariant.
Assert
(!string.IsNullOrEmpty(uiLanguage), "No UILanguage was specified in stringtable.");
Base\System\ComponentModel\GroupDescription.cs (1)
221
Invariant.
Assert
(_sort.Count == 0, "must be empty SortDescription collection");
Base\System\IO\Packaging\EncryptedPackage.cs (3)
620
Invariant.
Assert
(_root != null, "The envelope cannot be null");
720
Invariant.
Assert
(!_handedOutPackageStream, "Copy of package stream has been already handed out");
791
Invariant.
Assert
(!_handedOutPackage, "Copy of package has been already handed out");
Base\System\IO\Packaging\Package.cs (1)
1164
Invariant.
Assert
(index >= 0, "Given uri must be present in the dictionary");
Base\System\IO\Packaging\ZipPackage.cs (3)
838
Invariant.
Assert
(extensionA != null, "extenstion should not be null");
839
Invariant.
Assert
(extensionB != null, "extenstion should not be null");
850
Invariant.
Assert
(extension != null, "extenstion should not be null");
Base\System\Security\RightsManagement\User.cs (3)
238
Invariant.
Assert
(false, "AuthenticationProviderType can only be queried for Windows or Passport authentication");
284
Invariant.
Assert
(user1 != null, "user1 should not be null");
290
Invariant.
Assert
(user != null, "user should not be null");
Base\System\Windows\DependencyProperty.cs (2)
431
Invariant.
Assert
(!valueAsISealable.IsSealed,
436
Invariant.
Assert
(dispatcherObject.Dispatcher == null,
Base\System\Windows\Freezable.cs (6)
1960
Invariant.
Assert
(clone != original, "CloneCore should not return the same instance as the original.");
1963
Invariant.
Assert
(!cloneAsFreezable.HasHandlers, "CloneCore should not have handlers attached on construction.");
1971
Invariant.
Assert
(originalAsIList.Count == cloneAsIList.Count, "CloneCore didn't clone all of the elements in the list.");
1979
Invariant.
Assert
(originalItemAsFreezable != cloneItemAsFreezable, "CloneCore didn't clone the elements in the list correctly.");
1991
Invariant.
Assert
(newInstance.GetType() == original.GetType(),
2044
Invariant.
Assert
(owner != null,
Base\System\Windows\Threading\DispatcherOperation.cs (1)
513
Invariant.
Assert
(false, "Operation should be either Aborted or Completed!");
Base\System\Windows\WeakEventManager.cs (6)
610
Invariant.
Assert
(_users == 0, "Cannot modify a ListenerList that is in use");
619
Invariant.
Assert
(_users == 0, "Cannot modify a ListenerList that is in use");
632
Invariant.
Assert
(_users == 0, "Cannot modify a ListenerList that is in use");
679
Invariant.
Assert
(_users == 0, "Cannot modify a ListenerList that is in use");
730
Invariant.
Assert
(_users == 0, "Cannot modify a ListenerList that is in use");
825
Invariant.
Assert
(_users == 0, "Cannot modify a ListenerList that is in use");
Shared\MS\Internal\TextServicesLoader.cs (1)
111
Invariant.
Assert
(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Load called on MTA thread!");
Shared\MS\Win32\HwndWrapper.cs (1)
416
Invariant.
Assert
(handle != null && handle.Value != IntPtr.Zero,