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