9900 references to Assert
Aspire.Azure.AI.OpenAI (1)
Aspire.Azure.Data.Tables (1)
Aspire.Azure.Messaging.EventHubs (1)
Aspire.Azure.Messaging.ServiceBus (1)
Aspire.Azure.Messaging.WebPubSub (1)
Aspire.Azure.Search.Documents (1)
Aspire.Azure.Security.KeyVault (1)
Aspire.Azure.Storage.Blobs (1)
Aspire.Azure.Storage.Queues (1)
Aspire.Dashboard (19)
Aspire.Hosting (9)
Aspire.Hosting.Analyzers (1)
CodeGenerator (1)
CodeStyleConfigFileGenerator (1)
ConfigurationSchemaGenerator (1)
csc (3)
DesignSurface (1)
dotnet-dev-certs (1)
dotnet-svcutil-lib (202)
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathNode.cs (10)
158Debug.Assert(HasCollapsedText, "Do not call CollapsedLinePosition unless HasCollapsedText is true.");
213Debug.Assert(localName == null || (object)Document.NameTable.Get(localName) == (object)localName, "localName must be atomized.");
225Debug.Assert(localName == null || (object)Document.NameTable.Get(localName) == (object)localName, "localName must be atomized.");
374Debug.Assert(lineNumOffset >= 0 && lineNumOffset <= MaxLineNumberOffset, "Line number offset too large or small: " + lineNumOffset);
375Debug.Assert(linePosOffset >= 0 && linePosOffset <= MaxLinePositionOffset, "Line position offset too large or small: " + linePosOffset);
385Debug.Assert(posOffset >= 0 && posOffset <= MaxCollapsedPositionOffset, "Collapsed text line position offset too large or small: " + posOffset);
441Debug.Assert(pageSibling != null && idxSibling != 0 && idxSibling <= UInt16.MaxValue, "Bad argument");
442Debug.Assert(_idxSibling == 0, "SetSibling should not be called more than once.");
460Debug.Assert(pageSimilar != null && idxSimilar != 0 && idxSimilar <= UInt16.MaxValue, "Bad argument");
461Debug.Assert(_idxSimilar == 0, "SetSimilarElement should not be called more than once.");
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathNodeHelper.cs (23)
74Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
93Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
113Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
141Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
164Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
182Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
197Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
231Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
264Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
302Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
334Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
397Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
427Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
454Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
516Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)");
613Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)");
614Debug.Assert(typ != XPathNodeType.Text, "Text should be handled by GetTextFollowing in order to take into account collapsed text.");
615Debug.Assert(page[idx].NodeType != XPathNodeType.Attribute, "Current node should never be an attribute or namespace--caller should handle this case.");
652Debug.Assert(!page[idx].IsAttrNmsp, "GetContentFollowing should never return attributes or namespaces.");
671Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)");
672Debug.Assert(!page[idx].IsAttrNmsp, "Current node should never be an attribute or namespace--caller should handle this case.");
749Debug.Assert(pageNode[idxNode].HasAttribute || pageNode[idxNode].HasContentChild, "Caller must check HasAttribute/HasContentChild on parent before calling GetChild.");
750Debug.Assert(pageNode[idxNode].HasAttribute || !pageNode[idxNode].HasCollapsedText, "Text child is virtualized and therefore is not present in the physical node page.");
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (32)
774Debug.Assert(baseUriStr == string.Empty, "BaseURI can come either from XmlParserContext or from the constructor argument, not from both");
1218Debug.Assert(false, "Invalid InitInputType");
2071Debug.Assert(_v1Compat, "XmlTextReaderImpl.Normalization property cannot be accessed on reader created via XmlReader.Create.");
2076Debug.Assert(_v1Compat, "XmlTextReaderImpl.Normalization property cannot be changed on reader created via XmlReader.Create.");
2104Debug.Assert(_v1Compat, "XmlTextReaderImpl.WhitespaceHandling property cannot be accessed on reader created via XmlReader.Create.");
2109Debug.Assert(_v1Compat, "XmlTextReaderImpl.WhitespaceHandling property cannot be changed on reader created via XmlReader.Create.");
2128Debug.Assert(_v1Compat, "XmlTextReaderImpl.DtdProcessing property cannot be accessed on reader created via XmlReader.Create.");
2133Debug.Assert(_v1Compat, "XmlTextReaderImpl.DtdProcessing property cannot be changed on reader created via XmlReader.Create.");
2185Debug.Assert(_v1Compat, "XmlTextReaderImpl.ResetState cannot be called on reader created via XmlReader.Create.");
2226Debug.Assert(_v1Compat, "XmlTextReaderImpl.GetRemainder cannot be called on reader created via XmlReader.Create.");
2268Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadChars cannot be called on reader created via XmlReader.Create.");
2310Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadBase64 cannot be called on reader created via XmlReader.Create.");
2347Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadBinHex cannot be called on reader created via XmlReader.Create.");
3123Debug.Assert(false, "Unhandled DtdProcessing enumeration value.");
3352Debug.Assert(_ps.appendMode, "UnDecodeChars cannot be called after ps.appendMode has been changed to false");
3354Debug.Assert(_ps.charsUsed >= _ps.charPos, "The current position must be in the valid character range.");
3362Debug.Assert(_charactersInDocument >= _ps.charsUsed - _ps.charPos,
3370Debug.Assert(_charactersFromEntities >= _ps.charsUsed - _ps.charPos,
3587Debug.Assert(false, "We should get an exception again.");
4724Debug.Assert(false, "We should never get to this point.");
5015Debug.Assert(val == XmlComplianceUtil.CDataNormalize(val), "The attribute value is not CDATA normalized!");
5438Debug.Assert(false, "We should never get to this point.");
7166Debug.Assert(false, "We should never get to this point.");
7272Debug.Assert(false, "We should never get to this point.");
8110Debug.Assert(_xmlResolver.SupportsType(uri, typeof(Stream)), "Stream must always be a supported type in XmlResolver");
8653Debug.Assert(count == charsParsed || _incReadDecoder.IsFull, "Check if decoded consumed all characters unless it's full.");
8670Debug.Assert(IncrementalRead() == 0, "Previous call of IncrementalRead should eat up all characters!");
8734Debug.Assert(_ps.eolNormalized, "Entity replacement text for attribute values should be EOL-normalized!");
8788Debug.Assert(false, "We should never get to this point.");
8843Debug.Assert(false, "We should never get to this point.");
9143Debug.Assert(context.NameTable == null || context.NameTable == nt, "This check should have been done in XmlParserContext constructor.");
9246Debug.Assert(_curNode.type == XmlNodeType.Whitespace && newNodeType == XmlNodeType.SignificantWhitespace, "Incorrect node type change!");
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (7)
287Debug.Assert(schemaType != null && datatype != null, "schemaType or schemaType.Datatype may not be null");
297Debug.Assert(schemaType.Datatype.Variety != XmlSchemaDatatypeVariety.List, "schemaType must be list's item type, not list itself");
321Debug.Assert(false, "Type code " + typeCode + " is not supported.");
529Debug.Assert(_typeCode == XmlTypeCode.Item, "If SchemaType is null, then TypeCode may only be Item, Node, or AnyAtomicType");
3451Debug.Assert(!(atomicConverter is XmlListConverter) || ((XmlListConverter)atomicConverter).atomicConverter == null,
3583Debug.Assert(enumSrc != null, "Value passed to ToArray must implement IEnumerable");
3611Debug.Assert(enumSrc != null, "Value passed to ToArray must implement IEnumerable");
Extensibility.MessageInterceptor.IntegrationTests (1)
http2cat (7)
IIS.FunctionalTests (7)
IIS.LongTests (7)
IIS.NewHandler.FunctionalTests (7)
IIS.NewShim.FunctionalTests (7)
IIS.ShadowCopy.Tests (3)
IISExpress.FunctionalTests (7)
illink (6)
ILLink.RoslynAnalyzer (10)
InMemory.FunctionalTests (2)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore (3)
Microsoft.AspNetCore.App.Analyzers (11)
Microsoft.AspNetCore.App.CodeFixes (2)
Microsoft.AspNetCore.Authentication.Negotiate (2)
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Components.Server (14)
Microsoft.AspNetCore.Components.Server.Tests (2)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Cryptography.Internal (1)
Microsoft.AspNetCore.DataProtection (7)
Microsoft.AspNetCore.DataProtection.Abstractions (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
Microsoft.AspNetCore.Diagnostics (2)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (3)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Microsoft.AspNetCore.Hosting (6)
Microsoft.AspNetCore.Http.Abstractions (2)
Microsoft.AspNetCore.Http.Connections (3)
Microsoft.AspNetCore.Http.Extensions (12)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.Mvc.Abstractions (2)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
Microsoft.AspNetCore.Mvc.Core (10)
Microsoft.AspNetCore.Mvc.Localization (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
Microsoft.AspNetCore.Mvc.RazorPages (2)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.AspNetCore.OpenApi (7)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.ResponseCompression (1)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Routing (5)
Microsoft.AspNetCore.Server.HttpSys (25)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
Microsoft.AspNetCore.Server.IIS (20)
Microsoft.AspNetCore.Server.IISIntegration (3)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.Server.Kestrel.Core (75)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
Microsoft.AspNetCore.Shared.Tests (26)
Microsoft.AspNetCore.SignalR.Common.Tests (2)
Microsoft.AspNetCore.SignalR.Core (6)
Microsoft.AspNetCore.WebSockets (1)
Microsoft.AspNetCore.WebUtilities (3)
Microsoft.Build (29)
Microsoft.Build.Framework (20)
SegmentedDictionary`2.cs (10)
236Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
237Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
337Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
482Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
618Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
650Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
687Debug.Assert(_entries.Length > 0, "entries should be non-empty");
709Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
759Debug.Assert(_entries.Length > 0, "entries should be non-empty");
783Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
Microsoft.Build.Tasks.CodeAnalysis (13)
Microsoft.Build.Tasks.Core (39)
BootstrapperUtil\BootstrapperBuilder.cs (10)
801Debug.Assert(filePath != null, "null filePath?");
802Debug.Assert(schemaPath != null, "null schemaPath?");
803Debug.Assert(schemaNamespace != null, "null schemaNamespace?");
848Debug.Assert(_document != null, "our document should have been created by now!");
867Debug.Assert(xmlDocument.DocumentElement != null &&
944Debug.Assert(langDoc != null, "we couldn't load package.xml in '" + strLangManifestFilename + "'...?");
951Debug.Assert(langNode != null, string.Format(CultureInfo.CurrentCulture, "Unable to find a package node in {0}", strLangManifestFilename));
1258Debug.Assert(false, "Specified key does not exist for node " + nextNode.InnerXml);
1564Debug.Assert(sourceAttribute != null, "we should not be here if there is no ProductCode attribute");
1986Debug.Assert(s != null, String.Format(CultureInfo.CurrentCulture, "EmbeddedResource '{0}' not found", name));
ResolveManifestFiles.cs (4)
349Debug.Assert(!String.IsNullOrEmpty(itemCulture), String.Format(CultureInfo.CurrentCulture, "Satellite item '{0}' is missing expected attribute '{1}'", item.ItemSpec, "Culture"));
865Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same key '{0}' detected", key));
924Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same key '{0}' detected", key));
965Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same '{0}' attribute detected", ItemMetadataNames.targetPath));
Microsoft.Build.Tasks.UnitTests (1)
Microsoft.Build.Utilities.Core (6)
Microsoft.CodeAnalysis (99)
src\Dependencies\Collections\SegmentedDictionary`2.cs (10)
299Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
300Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
406Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
519Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
614Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
646Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
705Debug.Assert(_entries.Length > 0, "entries should be non-empty");
732Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
782Debug.Assert(_entries.Length > 0, "entries should be non-empty");
811Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\Dependencies\Collections\SegmentedHashSet`1.cs (10)
202Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
203Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
225Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
294Debug.Assert(entries.Length > 0, "entries should be non-empty");
324Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
899Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
1024Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1089Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1170Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1327Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
Microsoft.CodeAnalysis.CodeStyle (57)
src\Dependencies\Collections\SegmentedDictionary`2.cs (10)
299Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
300Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
406Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
519Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
614Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
646Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
705Debug.Assert(_entries.Length > 0, "entries should be non-empty");
732Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
782Debug.Assert(_entries.Length > 0, "entries should be non-empty");
811Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\Dependencies\Collections\SegmentedHashSet`1.cs (10)
202Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
203Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
225Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
294Debug.Assert(entries.Length > 0, "entries should be non-empty");
324Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
899Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
1024Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1089Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1170Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1327Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.Collections.Package (26)
SegmentedDictionary`2.cs (10)
299Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
300Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
406Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
519Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
614Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
646Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
705Debug.Assert(_entries.Length > 0, "entries should be non-empty");
732Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
782Debug.Assert(_entries.Length > 0, "entries should be non-empty");
811Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
SegmentedHashSet`1.cs (10)
202Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
203Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
225Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
294Debug.Assert(entries.Length > 0, "entries should be non-empty");
324Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
899Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
1024Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1089Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1170Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1327Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
Microsoft.CodeAnalysis.CSharp (294)
Binder\Binder_Statements.cs (11)
151Debug.Assert(result.WasCompilerGenerated == false ||
156Debug.Assert(result.Syntax is StatementSyntax, "BoundStatement should be associated with a statement syntax.");
158Debug.Assert(System.Linq.Enumerable.Contains(result.Syntax.AncestorsAndSelf(), node), @"Bound statement (or one of its parents)
2239Debug.Assert(false, "Missing case in lambda conversion error reporting");
2293Debug.Assert(originalUserDefinedConversions.Length == 0,
2456Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting");
2726Debug.Assert(resultKind == LookupResultKind.Empty, "How could overload resolution fail if a user-defined true operator was found?");
2727Debug.Assert(originalUserDefinedOperators.IsEmpty, "How could overload resolution fail if a user-defined true operator was found?");
3726Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3794Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3811Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
Binder\Binder_Symbols.cs (8)
1657Debug.Assert((object)typeSymbol != null, "Expect an error type if special type isn't found");
1665Debug.Assert((object)typeSymbol != null, "Expect an error type if special type isn't found");
1794Debug.Assert((object)typeSymbol != null, "Expect an error type if well-known type isn't found");
1806Debug.Assert((object)typeSymbol != null, "Expect an error type if well-known type isn't found");
2032Debug.Assert(!Symbol.Equals(originalSymbols[best.Index], originalSymbols[secondBest.Index], TypeCompareKind.ConsiderEverything) || options.IsAttributeTypeLookup(),
2035Debug.Assert(!Symbol.Equals(first, second, TypeCompareKind.ConsiderEverything) || !Symbol.Equals(originalSymbols[best.Index], originalSymbols[secondBest.Index], TypeCompareKind.ConsiderEverything),
2190Debug.Assert(originalSymbols[best.Index].Name != originalSymbols[secondBest.Index].Name ||
2648Debug.Assert((object)forwardedType.ContainingAssembly != null, "How did we find a cycle if there was no forwarding?");
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (6)
159Debug.Assert(false, "How did we manage to get two methods in the overload resolution results that were both better than every other method?");
206Debug.Assert(!this.Succeeded, "Don't ask for diagnostic info on a successful overload resolution result.");
612Debug.Assert(bad.Member.GetUseSiteInfo().DiagnosticInfo.Severity == DiagnosticSeverity.Error,
1318Debug.Assert((object)parameter == unwrapIfParamsCollection(badArg, parameter, isLastParameter), "If they ever differ, just call the method when constructing the diagnostic.");
1401Debug.Assert(nWorse == 0, "How is it that there is exactly one applicable but worse method, and exactly zero applicable best methods? What was better than this thing?");
1460Debug.Assert(nValid == 0, "Why are we doing error reporting on an overload resolution problem that had one valid result?");
BoundTree\BoundNode.cs (11)
139Debug.Assert((_attributes & BoundNodeAttributes.HasErrors) == 0,
185Debug.Assert((_attributes & BoundNodeAttributes.WasCompilerGeneratedIsChecked) == 0,
195Debug.Assert((_attributes & BoundNodeAttributes.CompilerGenerated) == 0,
207Debug.Assert((_attributes & BoundNodeAttributes.WasCompilerGeneratedIsChecked) == 0,
240Debug.Assert((_attributes & BoundNodeAttributes.WasTopLevelNullabilityChecked) == 0,
304Debug.Assert((_attributes & BoundNodeAttributes.IsSuppressed) == 0, "flag should not be set twice or reset");
326Debug.Assert((_attributes & BoundNodeAttributes.WasConverted) == 0, "WasConverted flag should not be set twice or reset");
342Debug.Assert((_attributes & BoundNodeAttributes.WasPropertyBackingFieldAccessChecked) == 0, "should not be set twice or reset");
506Debug.Assert(false, "duplicate local " + local.GetDebuggerDisplay());
517Debug.Assert(false, "missing local " + local.GetDebuggerDisplay());
526Debug.Assert(false, "undeclared local " + local.GetDebuggerDisplay());
CodeGen\EmitExpression.cs (27)
411Debug.Assert(!receiverType.IsValueType ||
677Debug.Assert(temp == null, "makeref should not create temps");
737Debug.Assert(argument.Type.IsDynamic() || argument is BoundFieldAccess { FieldSymbol.RefKind: not RefKind.None }, "passing args byref should not clone them into temps");
750Debug.Assert(temp == null, "If the operand is addressable, then a temp shouldn't be required.");
949Debug.Assert(arguments.Length == parameters.Length ||
951Debug.Assert(parameters.All(p => p.RefKind == RefKind.None) || !argRefKindsOpt.IsDefault, "there are nontrivial parameters, so we must have argRefKinds");
953Debug.Assert(argRefKindsOpt.IsDefault || argRefKindsOpt.Length == arguments.Length ||
977Debug.Assert(argRefKind == parameters[i].RefKind ||
988Debug.Assert(parameters[i].RefKind != RefKind.RefReadOnlyParameter,
1139Debug.Assert(!field.IsConst || field.ContainingType.SpecialType == SpecialType.System_Decimal,
1182Debug.Assert(FieldLoadMustUseRef(receiver), "only clr-ambiguous structs use temps here");
1249Debug.Assert(!field.IsVolatile, "volatile valuetype fields are unexpected");
1515Debug.Assert(receiver.Type.IsVerifierReference(), "this is not a reference");
1516Debug.Assert(receiver.Kind != BoundKind.BaseReference, "base should always use call");
2184Debug.Assert(methodContainingType.IsVerifierValue(), "only struct calls can be readonly");
2299Debug.Assert(method.ContainingType.IsVerifierValue(), "this is not a value type");
2675Debug.Assert(temp == null, "in-place init target should not create temps");
2682Debug.Assert(TargetIsNotOnHeap(target), "cannot read-back the target since it could have been modified");
2689Debug.Assert(TargetIsNotOnHeap(target), "in-place construction target should not be on heap");
2704Debug.Assert(temp == null, "in-place ctor target should not create temps");
2791Debug.Assert(temp == null, "temp is unexpected when assigning to a field");
2875Debug.Assert(temp == null, "taking ref of this should not create a temp");
2886Debug.Assert(temp == null, "taking ref of Dup should not create a temp");
2898Debug.Assert(temp == null, "taking ref of this should not create a temp");
3866Debug.Assert(expr.LeftConversion is null, "coalesce with nontrivial left conversions are lowered into conditional.");
4080Debug.Assert(useKind == UseKind.Unused, "Using the return value of a void method.");
4081Debug.Assert(_method.GenerateDebugInfo, "Implied by this.emitSequencePoints");
CodeGen\Optimizer.cs (18)
615Debug.Assert(EvalStackIsEmpty(), "entering blocks when evaluation stack is not empty?");
794Debug.Assert(localUsedWalker.IsLocalUsedIn(assignment.Right), "who assigns the temp?");
929Debug.Assert(_context != ExprContext.AssignmentTarget, "assignment expression cannot be a target of another assignment");
939Debug.Assert(_context == ExprContext.Value ||
973Debug.Assert(
979Debug.Assert(!isIndirectAssignment, "indirect assignment is a read, not a write");
1030Debug.Assert(!node.IsRef ||
1037Debug.Assert(lhs.Type.IsValueType, "'this' is assignable only in structs");
1057Debug.Assert(((BoundCall)lhs).Method.RefKind == RefKind.Ref, "only ref returning methods are assignable");
1061Debug.Assert(((BoundFunctionPointerInvocation)lhs).FunctionPointer.Signature.RefKind == RefKind.Ref, "only ref returning function pointers are assignable");
1065Debug.Assert(((BoundConditionalOperator)lhs).IsRef, "only ref ternaries are assignable");
1069Debug.Assert(((BoundAssignmentOperator)lhs).IsRef, "only ref assignments are assignable");
1073Debug.Assert(!IsIndirectAssignment(node.Update(((BoundSequence)node.Left).Value, node.Right, node.IsRef, node.Type)),
1389Debug.Assert(false, "we should not have label expressions at this stage");
1395Debug.Assert(false, "we should not have is-pattern expressions at this stage");
1401Debug.Assert(node.CaseExpressionOpt == null, "we should not have label expressions at this stage");
1874Debug.Assert(local.RefKind == RefKind.None, "cannot take a ref of a ref");
2010Debug.Assert(local.SynthesizedKind == SynthesizedLocalKind.LoweringTemp, "only lowering temps may be sometimes reused");
Compiler\ClsComplianceChecker.cs (12)
122System.Diagnostics.Debug.Assert(warningLocation != null || !moduleDeclaredCompliance.HasValue || (i == 0 && _filterTree != null),
279System.Diagnostics.Debug.Assert(IsAccessibleOutsideAssembly(constructor), "Should be implied by IsAccessibleIfContainerIsAccessible");
499System.Diagnostics.Debug.Assert(!IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on non-compliant symbols");
514System.Diagnostics.Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols");
532System.Diagnostics.Debug.Assert((object)baseType != null || symbol.SpecialType == SpecialType.System_Object, "Only object has no base.");
543System.Diagnostics.Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols");
555System.Diagnostics.Debug.Assert(typeParameters.IsEmpty || IsTrue(GetDeclaredOrInheritedCompliance(context)), "Only call on compliant symbols");
574System.Diagnostics.Debug.Assert(parameters.IsEmpty || IsTrue(GetDeclaredOrInheritedCompliance(context)), "Only call on compliant symbols");
587System.Diagnostics.Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols");
713System.Diagnostics.Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols");
1116System.Diagnostics.Debug.Assert(symbol.Kind == SymbolKind.NamedType || !((symbol is TypeSymbol)),
1209System.Diagnostics.Debug.Assert(args.Length == 1, "We already checked the signature and HasErrors.");
Parser\Lexer.cs (8)
1719Debug.Assert(consumedSurrogate == SlidingTextWindow.InvalidCharacter, "Since consumedChar == '\\'");
3283Debug.Assert(false, "Should have picked up leading indentationTrivia, but didn't.");
3299Debug.Assert(false, "Should have picked up leading indentationTrivia, but didn't.");
3691Debug.Assert(TextWindow.Position > beforeConsumed, "First character or entity has been consumed.");
3802Debug.Assert(info.Text == null, "Haven't tried to set it yet.");
3803Debug.Assert(info.StringValue == null, "Haven't tried to set it yet.");
4606Debug.Assert(info == null, "Never produce a diagnostic while peeking.");
4614Debug.Assert(ch != SlidingTextWindow.InvalidCharacter, "Precondition established by all callers; required for correctness of AdvanceChar() call.");
Symbols\Source\SourceAssemblySymbol.cs (10)
651Debug.Assert((object)compilationRelaxationsAttribute != null, "GetWellKnownType unexpectedly returned null");
660Debug.Assert((object)runtimeCompatibilityAttribute != null, "GetWellKnownType unexpectedly returned null");
693Debug.Assert((object)unverifiableCodeAttribute != null, "GetWellKnownType unexpectedly returned null");
705Debug.Assert((object)securityPermissionAttribute != null, "GetWellKnownType unexpectedly returned null");
712Debug.Assert((object)securityAction != null, "GetWellKnownType unexpectedly returned null");
2642Debug.Assert(
2650Debug.Assert(_unusedFieldWarnings.IsDefault, "We shouldn't have computed the diagnostics if we're still noting definitions.");
2671Debug.Assert(this.HasComplete(CompletionPart.Module),
2693Debug.Assert(success, "Once CompletionPart.Module is set, no-one should be modifying the map.");
2838Debug.Assert((object)originalDefinition.ContainingType == null, "How did a nested type get forwarded?");
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.CSharp.Features (10)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Microsoft.CodeAnalysis.EditorFeatures (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (6)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (15)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (26)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Microsoft.CodeAnalysis.Features (12)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.InteractiveHost (9)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.PooledObjects.Package (3)
Microsoft.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic (457)
Generated\BoundNodes.xml.Generated.vb (427)
241Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
249Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
310Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
317Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
329Debug.Assert(underlyingLValue IsNot Nothing, "Field 'underlyingLValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
330Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
369Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
376Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
388Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
395Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
407Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
414Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
440Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
447Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
473Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
485Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
513Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
525Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
589Debug.Assert(Not (symbols.IsDefault), "Field 'symbols' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
590Debug.Assert(Not (childBoundNodes.IsDefault), "Field 'childBoundNodes' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
645Debug.Assert(Not (childBoundNodes.IsDefault), "Field 'childBoundNodes' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
679Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
718Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
760Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
761Debug.Assert(Not (indices.IsDefault), "Field 'indices' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
762Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
817Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
818Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
852Debug.Assert(sourceType IsNot Nothing, "Field 'sourceType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
853Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
895Debug.Assert(field IsNot Nothing, "Field 'field' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
896Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
904Debug.Assert(field IsNot Nothing, "Field 'field' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
905Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
939Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
940Debug.Assert(getMethodFromHandle IsNot Nothing, "Field 'getMethodFromHandle' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
941Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
950Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
951Debug.Assert(getMethodFromHandle IsNot Nothing, "Field 'getMethodFromHandle' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
952Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
994Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1036Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1044Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1078Debug.Assert(namespaceSymbol IsNot Nothing, "Field 'namespaceSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1133Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1134Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1142Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1143Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1177Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1184Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1210Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1219Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1261Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1269Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1303Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1310Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1336Debug.Assert(document IsNot Nothing, "Field 'document' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1337Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1345Debug.Assert(document IsNot Nothing, "Field 'document' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1346Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1380Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1381Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1444Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1445Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1492Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1493Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1532Debug.Assert(left IsNot Nothing, "Field 'left' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1533Debug.Assert(right IsNot Nothing, "Field 'right' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1534Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1605Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1606Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1661Debug.Assert(bitwiseOperator IsNot Nothing, "Field 'bitwiseOperator' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1662Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1725Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1732Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1758Debug.Assert(left IsNot Nothing, "Field 'left' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1759Debug.Assert(right IsNot Nothing, "Field 'right' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1760Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1823Debug.Assert(byRefLocal IsNot Nothing, "Field 'byRefLocal' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1824Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1879Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1880Debug.Assert(methodGroup IsNot Nothing, "Field 'methodGroup' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1930Debug.Assert(condition IsNot Nothing, "Field 'condition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1931Debug.Assert(whenTrue IsNot Nothing, "Field 'whenTrue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1932Debug.Assert(whenFalse IsNot Nothing, "Field 'whenFalse' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1933Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1996Debug.Assert(testExpression IsNot Nothing, "Field 'testExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1997Debug.Assert(elseExpression IsNot Nothing, "Field 'elseExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1998Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2069Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2076Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2088Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2089Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2181Debug.Assert(lambda IsNot Nothing, "Field 'lambda' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2223Debug.Assert(Not (elementPlaceholders.IsDefault), "Field 'elementPlaceholders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2224Debug.Assert(Not (convertedElements.IsDefault), "Field 'convertedElements' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2271Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2272Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2319Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2320Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2391Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2392Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2455Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2456Debug.Assert(targetType IsNot Nothing, "Field 'targetType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2457Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2551Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2685Debug.Assert(Not (methods.IsDefault), "Field 'methods' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2743Debug.Assert(Not (properties.IsDefault), "Field 'properties' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2837Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2907Debug.Assert(Not (clauses.IsDefault), "Field 'clauses' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2941Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2942Debug.Assert(Not (indices.IsDefault), "Field 'indices' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3005Debug.Assert(Not (clauses.IsDefault), "Field 'clauses' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3039Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3040Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3041Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3136Debug.Assert(Not (constructorArguments.IsDefault), "Field 'constructorArguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3137Debug.Assert(Not (namedArguments.IsDefault), "Field 'namedArguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3138Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3204Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3275Debug.Assert(member IsNot Nothing, "Field 'member' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3276Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3347Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3348Debug.Assert(memberAccess IsNot Nothing, "Field 'memberAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3390Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3410Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3460Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3461Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3495Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3520Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3521Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3584Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3618Debug.Assert(Not (declarations.IsDefault), "Field 'declarations' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3619Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3669Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3678Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3720Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3721Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3763Debug.Assert(Not (initializers.IsDefault), "Field 'initializers' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3791Debug.Assert(Not (initializers.IsDefault), "Field 'initializers' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3830Debug.Assert(Not (initializers.IsDefault), "Field 'initializers' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3861Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3892Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3893Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3959Debug.Assert(Not (bounds.IsDefault), "Field 'bounds' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3960Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4031Debug.Assert(inferredType IsNot Nothing, "Field 'inferredType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4032Debug.Assert(Not (bounds.IsDefault), "Field 'bounds' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4033Debug.Assert(initializer IsNot Nothing, "Field 'initializer' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4034Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4108Debug.Assert(Not (initializers.IsDefault), "Field 'initializers' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4142Debug.Assert(fieldSymbol IsNot Nothing, "Field 'fieldSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4143Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4214Debug.Assert(propertySymbol IsNot Nothing, "Field 'propertySymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4215Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4216Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4311Debug.Assert(eventSymbol IsNot Nothing, "Field 'eventSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4312Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4354Debug.Assert(Not (locals.IsDefault), "Field 'locals' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4355Debug.Assert(Not (statements.IsDefault), "Field 'statements' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4405Debug.Assert(Not (fields.IsDefault), "Field 'fields' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4406Debug.Assert(statement IsNot Nothing, "Field 'statement' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4461Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4524Debug.Assert(Not (localDeclarations.IsDefault), "Field 'localDeclarations' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4525Debug.Assert(initializer IsNot Nothing, "Field 'initializer' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4526Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4576Debug.Assert(Not (localDeclarations.IsDefault), "Field 'localDeclarations' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4644Debug.Assert(initialValue IsNot Nothing, "Field 'initialValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4680Debug.Assert(Not (initializedFields.IsDefault), "Field 'initializedFields' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4681Debug.Assert(initialValue IsNot Nothing, "Field 'initialValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4715Debug.Assert(Not (initializedProperties.IsDefault), "Field 'initializedProperties' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4716Debug.Assert(initialValue IsNot Nothing, "Field 'initialValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4750Debug.Assert(parameter IsNot Nothing, "Field 'parameter' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4751Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4793Debug.Assert(statement IsNot Nothing, "Field 'statement' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4827Debug.Assert(Not (locals.IsDefault), "Field 'locals' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4828Debug.Assert(Not (sideEffects.IsDefault), "Field 'sideEffects' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4829Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4884Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4918Debug.Assert(condition IsNot Nothing, "Field 'condition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4919Debug.Assert(consequence IsNot Nothing, "Field 'consequence' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4969Debug.Assert(expressionStatement IsNot Nothing, "Field 'expressionStatement' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4970Debug.Assert(Not (caseBlocks.IsDefault), "Field 'caseBlocks' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4971Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5037Debug.Assert(caseStatement IsNot Nothing, "Field 'caseStatement' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5038Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5080Debug.Assert(Not (caseClauses.IsDefault), "Field 'caseClauses' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5284Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5285Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5294Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5295Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5323Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5324Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5325Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5391Debug.Assert(condition IsNot Nothing, "Field 'condition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5392Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5393Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5394Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5436Debug.Assert(controlVariable IsNot Nothing, "Field 'controlVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5437Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5438Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5439Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5483Debug.Assert(leftOperandPlaceholder IsNot Nothing, "Field 'leftOperandPlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5484Debug.Assert(rightOperandPlaceholder IsNot Nothing, "Field 'rightOperandPlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5485Debug.Assert(addition IsNot Nothing, "Field 'addition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5486Debug.Assert(subtraction IsNot Nothing, "Field 'subtraction' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5487Debug.Assert(lessThanOrEqual IsNot Nothing, "Field 'lessThanOrEqual' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5488Debug.Assert(greaterThanOrEqual IsNot Nothing, "Field 'greaterThanOrEqual' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5567Debug.Assert(initialValue IsNot Nothing, "Field 'initialValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5568Debug.Assert(limitValue IsNot Nothing, "Field 'limitValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5569Debug.Assert(stepValue IsNot Nothing, "Field 'stepValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5570Debug.Assert(controlVariable IsNot Nothing, "Field 'controlVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5571Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5572Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5573Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5639Debug.Assert(collection IsNot Nothing, "Field 'collection' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5640Debug.Assert(enumeratorInfo IsNot Nothing, "Field 'enumeratorInfo' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5641Debug.Assert(controlVariable IsNot Nothing, "Field 'controlVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5642Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5643Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5644Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5686Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5694Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5728Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5736Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5770Debug.Assert(tryBlock IsNot Nothing, "Field 'tryBlock' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5771Debug.Assert(Not (catchBlocks.IsDefault), "Field 'catchBlocks' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5829Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5903Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5916Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5952Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5959Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5985Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5997Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6025Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6032Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6058Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6065Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6091Debug.Assert(sourceType IsNot Nothing, "Field 'sourceType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6092Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6100Debug.Assert(sourceType IsNot Nothing, "Field 'sourceType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6101Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6135Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6142Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6168Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6169Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6183Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6184Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6228Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6229Debug.Assert(emitExpressions IsNot Nothing, "Field 'emitExpressions' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6230Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6245Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6246Debug.Assert(emitExpressions IsNot Nothing, "Field 'emitExpressions' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6247Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6299Debug.Assert(parameterSymbol IsNot Nothing, "Field 'parameterSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6300Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6310Debug.Assert(parameterSymbol IsNot Nothing, "Field 'parameterSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6311Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6361Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6369Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6403Debug.Assert(originalArgument IsNot Nothing, "Field 'originalArgument' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6404Debug.Assert(inConversion IsNot Nothing, "Field 'inConversion' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6405Debug.Assert(inPlaceholder IsNot Nothing, "Field 'inPlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6406Debug.Assert(outConversion IsNot Nothing, "Field 'outConversion' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6407Debug.Assert(outPlaceholder IsNot Nothing, "Field 'outPlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6478Debug.Assert(originalArgument IsNot Nothing, "Field 'originalArgument' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6479Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6526Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6534Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6568Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6576Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6610Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6652Debug.Assert(Not (statements.IsDefault), "Field 'statements' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6686Debug.Assert(condition IsNot Nothing, "Field 'condition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6687Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6737Debug.Assert(originalExpression IsNot Nothing, "Field 'originalExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6738Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6739Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6789Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6790Debug.Assert(Not (parameters.IsDefault), "Field 'parameters' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6791Debug.Assert(bindingCache IsNot Nothing, "Field 'bindingCache' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6808Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6809Debug.Assert(Not (parameters.IsDefault), "Field 'parameters' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6810Debug.Assert(bindingCache IsNot Nothing, "Field 'bindingCache' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6878Debug.Assert(lambdaSymbol IsNot Nothing, "Field 'lambdaSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6879Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6958Debug.Assert(lastOperator IsNot Nothing, "Field 'lastOperator' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6959Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6993Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7000Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7012Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7013Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7047Debug.Assert(conversionCall IsNot Nothing, "Field 'conversionCall' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7048Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7082Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7083Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7084Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7085Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7095Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7096Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7097Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7098Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7134Debug.Assert(source IsNot Nothing, "Field 'source' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7135Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7136Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7137Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7138Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7185Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7186Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7187Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7188Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7189Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7223Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7224Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7258Debug.Assert(lambdaSymbol IsNot Nothing, "Field 'lambdaSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7259Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7260Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7318Debug.Assert(rangeVariable IsNot Nothing, "Field 'rangeVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7319Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7320Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7362Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7363Debug.Assert(Not (parameters.IsDefault), "Field 'parameters' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7364Debug.Assert(compilation IsNot Nothing, "Field 'compilation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7374Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7375Debug.Assert(Not (parameters.IsDefault), "Field 'parameters' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7376Debug.Assert(compilation IsNot Nothing, "Field 'compilation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7426Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7427Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7428Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7429Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7430Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7480Debug.Assert(group IsNot Nothing, "Field 'group' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7481Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7515Debug.Assert(rangeVariable IsNot Nothing, "Field 'rangeVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7516Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7524Debug.Assert(rangeVariable IsNot Nothing, "Field 'rangeVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7525Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7559Debug.Assert(eventAccess IsNot Nothing, "Field 'eventAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7560Debug.Assert(handler IsNot Nothing, "Field 'handler' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7588Debug.Assert(eventAccess IsNot Nothing, "Field 'eventAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7589Debug.Assert(handler IsNot Nothing, "Field 'handler' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7615Debug.Assert(eventAccess IsNot Nothing, "Field 'eventAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7616Debug.Assert(handler IsNot Nothing, "Field 'handler' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7642Debug.Assert(eventSymbol IsNot Nothing, "Field 'eventSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7643Debug.Assert(eventInvocation IsNot Nothing, "Field 'eventInvocation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7685Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7686Debug.Assert(usingInfo IsNot Nothing, "Field 'usingInfo' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7687Debug.Assert(Not (locals.IsDefault), "Field 'locals' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7753Debug.Assert(lockExpression IsNot Nothing, "Field 'lockExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7754Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7796Debug.Assert(xmlNamespace IsNot Nothing, "Field 'xmlNamespace' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7797Debug.Assert(localName IsNot Nothing, "Field 'localName' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7798Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7799Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7849Debug.Assert(xmlNamespace IsNot Nothing, "Field 'xmlNamespace' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7850Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7851Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7893Debug.Assert(declaration IsNot Nothing, "Field 'declaration' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7894Debug.Assert(Not (childNodes.IsDefault), "Field 'childNodes' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7895Debug.Assert(rewriterInfo IsNot Nothing, "Field 'rewriterInfo' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7896Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7946Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7947Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8005Debug.Assert(target IsNot Nothing, "Field 'target' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8006Debug.Assert(data IsNot Nothing, "Field 'data' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8007Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8008Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8058Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8059Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8060Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8102Debug.Assert(name IsNot Nothing, "Field 'name' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8103Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8104Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8105Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8168Debug.Assert(argument IsNot Nothing, "Field 'argument' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8169Debug.Assert(Not (childNodes.IsDefault), "Field 'childNodes' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8170Debug.Assert(rewriterInfo IsNot Nothing, "Field 'rewriterInfo' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8171Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8221Debug.Assert(memberAccess IsNot Nothing, "Field 'memberAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8222Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8256Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8257Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8291Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8292Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8293Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8439Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8510Debug.Assert(activeHandlerLocal IsNot Nothing, "Field 'activeHandlerLocal' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8511Debug.Assert(resumeTargetLocal IsNot Nothing, "Field 'resumeTargetLocal' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8512Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8559Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8560Debug.Assert(Not (jumps.IsDefault), "Field 'jumps' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8607Debug.Assert(resumeTargetTemporary IsNot Nothing, "Field 'resumeTargetTemporary' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8608Debug.Assert(resumeLabel IsNot Nothing, "Field 'resumeLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8609Debug.Assert(resumeNextLabel IsNot Nothing, "Field 'resumeNextLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8610Debug.Assert(Not (jumps.IsDefault), "Field 'jumps' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8673Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8674Debug.Assert(awaitableInstancePlaceholder IsNot Nothing, "Field 'awaitableInstancePlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8675Debug.Assert(getAwaiter IsNot Nothing, "Field 'getAwaiter' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8676Debug.Assert(awaiterInstancePlaceholder IsNot Nothing, "Field 'awaiterInstancePlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8677Debug.Assert(isCompleted IsNot Nothing, "Field 'isCompleted' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8678Debug.Assert(getResult IsNot Nothing, "Field 'getResult' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8679Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8758Debug.Assert(Not (locals.IsDefault), "Field 'locals' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8759Debug.Assert(Not (spillFields.IsDefault), "Field 'spillFields' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8760Debug.Assert(Not (statements.IsDefault), "Field 'statements' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8859Debug.Assert(original IsNot Nothing, "Field 'original' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8860Debug.Assert(start IsNot Nothing, "Field 'start' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8861Debug.Assert(source IsNot Nothing, "Field 'source' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8862Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8925Debug.Assert(receiver IsNot Nothing, "Field 'receiver' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8926Debug.Assert(placeholder IsNot Nothing, "Field 'placeholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8927Debug.Assert(accessExpression IsNot Nothing, "Field 'accessExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8977Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8991Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9035Debug.Assert(receiver IsNot Nothing, "Field 'receiver' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9036Debug.Assert(whenNotNull IsNot Nothing, "Field 'whenNotNull' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9037Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9108Debug.Assert(valueTypeReceiver IsNot Nothing, "Field 'valueTypeReceiver' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9109Debug.Assert(referenceTypeReceiver IsNot Nothing, "Field 'referenceTypeReceiver' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9110Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9157Debug.Assert(argument IsNot Nothing, "Field 'argument' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9158Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9205Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9206Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9245Debug.Assert(Not (contents.IsDefault), "Field 'contents' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9246Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9293Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
Semantics\TypeInference\TypeInferenceCollection.vb (9)
190Debug.Assert(numberOfStrictCandidates = 0, "code logic error: since every strict candidate is also an unstrict candidate.")
197Debug.Assert(numberOfUnstrictCandidates > 1, "code logic error: we should already have covered this case")
211Debug.Assert(numberOfStrictCandidates > 1, "code logic error: we should have >1 widening candidates; all other possibilities have already been covered")
251Debug.Assert(False, "How can a typeless hint be a candidate?")
392Debug.Assert(False, "unexpected: how can there be multiple strict candidates and no widest ones??? please tell lwischik if you find such a case.")
424Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update CheckHintSatisfaction()")
535Debug.Assert(False, "code logic error: inferenceRestrictions; we should have dealt with all of them already")
548Debug.Assert(False, "code logic error: ConversionClass; we should have dealt with them already")
593Debug.Assert(Not foundInList, "List is supposed to be unique: how can we already find two of the same type in this list.")
Microsoft.CodeAnalysis.Workspaces (70)
src\Dependencies\Collections\SegmentedDictionary`2.cs (10)
299Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
300Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
406Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
519Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
614Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
646Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
705Debug.Assert(_entries.Length > 0, "entries should be non-empty");
732Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
782Debug.Assert(_entries.Length > 0, "entries should be non-empty");
811Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\Dependencies\Collections\SegmentedHashSet`1.cs (10)
202Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
203Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
225Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
294Debug.Assert(entries.Length > 0, "entries should be non-empty");
324Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
899Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
1024Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1089Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1170Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1327Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (37)
src\Dependencies\Collections\SegmentedDictionary`2.cs (10)
299Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
300Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
406Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
519Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
614Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
646Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
705Debug.Assert(_entries.Length > 0, "entries should be non-empty");
732Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
782Debug.Assert(_entries.Length > 0, "entries should be non-empty");
811Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\Dependencies\Collections\SegmentedHashSet`1.cs (10)
202Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
203Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
225Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
294Debug.Assert(entries.Length > 0, "entries should be non-empty");
324Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
899Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
1024Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1089Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1170Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1327Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
Microsoft.CSharp (7)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs (1)
40Debug.Assert(
Microsoft.Data.Analysis (24)
TextFieldParser.cs (21)
627Debug.Assert(_buffer != null, "There's no buffer");
628Debug.Assert(_reader != null, "There's no StreamReader");
631Debug.Assert(BufferLength >= DEFAULT_BUFFER_LENGTH, "Buffer shrunk to below default");
643Debug.Assert(_buffer != null, "There's no buffer");
644Debug.Assert(_reader != null, "There's no StreamReader");
645Debug.Assert((_position >= 0) && (_position <= _buffer.Length), "The cursor is out of range");
662Debug.Assert(_buffer != null, "There's no buffer");
663Debug.Assert(_reader != null, "There's no StreamReader");
675Debug.Assert(_charsRead <= bufferSize, "We've read more chars than we have space for");
712Debug.Assert(_buffer != null, "There's no buffer");
713Debug.Assert((cursor >= 0) && (cursor <= _charsRead), "The cursor is out of range");
878Debug.Assert(_fieldWidths != null, "No field widths");
910Debug.Assert(line != null, "We are parsing null");
912Debug.Assert(length > 0, "A blank line shouldn't be parsed");
915Debug.Assert(!line[0].Equals('\r') && !line[0].Equals('\n'), "A blank line shouldn't be parsed");
934Debug.Assert(line != null, "No Line sent");
960Debug.Assert(_fieldWidths[i] > 0, "Bad field width, this should have been caught on input");
972Debug.Assert(widths != null, "There are no field widths");
1080Debug.Assert(((_delimitersCopy == null) && (_delimiters == null)) || ((_delimitersCopy != null) && (_delimiters != null)), "Delimiters and copy are not both Nothing or both not Nothing");
1100Debug.Assert(((_fieldWidthsCopy == null) && (_fieldWidths == null)) || ((_fieldWidthsCopy != null) && (_fieldWidths != null)), "FieldWidths and copy are not both Nothing or both not Nothing");
1142Debug.Assert(_delimiters != null, "No delimiters set!");
Microsoft.Data.Analysis.Tests (21)
src\Microsoft.Data.Analysis\TextFieldParser.cs (21)
627Debug.Assert(_buffer != null, "There's no buffer");
628Debug.Assert(_reader != null, "There's no StreamReader");
631Debug.Assert(BufferLength >= DEFAULT_BUFFER_LENGTH, "Buffer shrunk to below default");
643Debug.Assert(_buffer != null, "There's no buffer");
644Debug.Assert(_reader != null, "There's no StreamReader");
645Debug.Assert((_position >= 0) && (_position <= _buffer.Length), "The cursor is out of range");
662Debug.Assert(_buffer != null, "There's no buffer");
663Debug.Assert(_reader != null, "There's no StreamReader");
675Debug.Assert(_charsRead <= bufferSize, "We've read more chars than we have space for");
712Debug.Assert(_buffer != null, "There's no buffer");
713Debug.Assert((cursor >= 0) && (cursor <= _charsRead), "The cursor is out of range");
878Debug.Assert(_fieldWidths != null, "No field widths");
910Debug.Assert(line != null, "We are parsing null");
912Debug.Assert(length > 0, "A blank line shouldn't be parsed");
915Debug.Assert(!line[0].Equals('\r') && !line[0].Equals('\n'), "A blank line shouldn't be parsed");
934Debug.Assert(line != null, "No Line sent");
960Debug.Assert(_fieldWidths[i] > 0, "Bad field width, this should have been caught on input");
972Debug.Assert(widths != null, "There are no field widths");
1080Debug.Assert(((_delimitersCopy == null) && (_delimiters == null)) || ((_delimitersCopy != null) && (_delimiters != null)), "Delimiters and copy are not both Nothing or both not Nothing");
1100Debug.Assert(((_fieldWidthsCopy == null) && (_fieldWidths == null)) || ((_fieldWidthsCopy != null) && (_fieldWidths != null)), "FieldWidths and copy are not both Nothing or both not Nothing");
1142Debug.Assert(_delimiters != null, "No delimiters set!");
Microsoft.Extensions.AI (13)
Microsoft.Extensions.AI.Abstractions (21)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.Ollama (1)
Microsoft.Extensions.AI.OpenAI (8)
src\Shared\ServerSentEvents\SseParser_1.cs (7)
282Debug.Assert(searchOffset >= _lineOffset, $"{searchOffset}, {_lineLength}");
283Debug.Assert(searchOffset <= _lineOffset + _lineLength, $"{searchOffset}, {_lineOffset}, {_lineLength}");
284Debug.Assert(searchOffset <= _lineBuffer.Length, $"{searchOffset}, {_lineBuffer.Length}");
286Debug.Assert(searchLength >= 0, $"{searchLength}");
287Debug.Assert(searchLength <= _lineLength, $"{searchLength}, {_lineLength}");
292Debug.Assert(_newlineIndex - _lineOffset < _lineLength, "Expected to be positioned at a non-empty newline");
548Debug.Assert(_lineOffset == 0, $"Expected _lineOffset == 0, got {_lineOffset}");
Microsoft.Extensions.Caching.Hybrid (27)
Internal\BufferChunk.cs (10)
29Debug.Assert(array is not null, "expected valid array input");
38Debug.Assert(!ReturnToPool, "do not return right-sized arrays");
39Debug.Assert(Length == array.Length, "array length not respected");
44Debug.Assert(array is not null, "expected valid array input");
45Debug.Assert(length >= 0, "expected valid length");
48Debug.Assert(ReturnToPool == returnToPool, "return-to-pool not respected");
49Debug.Assert(Length == length, "length not respected");
80Debug.Assert(Array is null && !ReturnToPool, "expected clean slate after recycle");
90Debug.Assert(copy.Length == Length, "same length expected");
91Debug.Assert(!copy.ReturnToPool, "do not return to pool");
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.DependencyInjection (6)
Microsoft.Extensions.FileProviders.Physical (2)
Microsoft.Extensions.Hosting (2)
Microsoft.Extensions.Http (3)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Primitives (2)
Microsoft.Extensions.TimeProvider.Testing (1)
Microsoft.Gen.Logging (1)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.JSInterop (1)
Microsoft.Maui (3)
Microsoft.Maui.Controls (1)
Microsoft.ML.Tokenizers (2)
Microsoft.Net.Http.Headers (2)
Microsoft.VisualBasic.Core (223)
Microsoft\VisualBasic\Collection.vb (11)
58Debug.Assert(m_KeyedNodesHash.ContainsKey(Key), "We got an argumentexception from a hashtable add, but it wasn't a duplicate key.")
162Debug.Assert(node.m_Key IsNot Nothing, "How can that be? We just found it by its key.")
178Debug.Assert(node IsNot Nothing, "Should have thrown exception rather than return Nothing")
197Debug.Assert(node IsNot Nothing, "Should have thrown rather than returning Nothing")
385Debug.Assert(NodeToBeDeleted IsNot Nothing, "How can we remove a non-existent node ?")
448Debug.Assert(NodeToInsertBefore IsNot Nothing, "FastList.InsertBefore: NodeToInsertBefore may not be nothing")
456Debug.Assert(NodeToInsertAfter IsNot Nothing, "FastList.InsertAfter: NodeToInsertAfter may not be nothing")
514Debug.Assert(NodeToBeDeleted IsNot Nothing, "How can we delete a non-existent node ?")
518Debug.Assert(NodeToBeDeleted Is m_StartOfList, "How can any node besides the first node not have a previous node ?")
571Debug.Assert(NewOrRemovedNode IsNot Nothing, "AdjustIndexes: Node shouldn't be Nothing")
681Debug.Assert(node IsNot Nothing, "Should have thrown exception rather than return Nothing")
Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (23)
160Debug.Assert(TypeCode.Empty = 0, "wrong value!")
161Debug.Assert(TypeCode.Object = 1, "wrong value!")
162Debug.Assert(TypeCode.Boolean = 3, "yte is wrong value!")
163Debug.Assert(TypeCode.Char = 4, "wrong value!")
164Debug.Assert(TypeCode.SByte = 5, "wrong value!")
165Debug.Assert(TypeCode.Byte = 6, "wrong value!")
166Debug.Assert(TypeCode.Int16 = 7, "wrong value!")
167Debug.Assert(TypeCode.UInt16 = 8, "wrong value!")
168Debug.Assert(TypeCode.Int32 = 9, "wrong value!")
169Debug.Assert(TypeCode.UInt32 = 10, "wrong value!")
170Debug.Assert(TypeCode.Int64 = 11, "wrong value!")
171Debug.Assert(TypeCode.UInt64 = 12, "wrong value!")
172Debug.Assert(TypeCode.Single = 13, "wrong value!")
173Debug.Assert(TypeCode.Double = 14, "wrong value!")
174Debug.Assert(TypeCode.Decimal = 15, "wrong value!")
175Debug.Assert(TypeCode.DateTime = 16, "wrong value!")
176Debug.Assert(TypeCode.String = 18, "wrong value!")
250Debug.Assert(False, "all conversions from interface should have been handled by now")
590Debug.Assert(types.Count > 0, "unexpected empty set")
616Debug.Assert(types.Count > 0, "unexpected empty set")
839Debug.Assert(Not wideningOnly AndAlso sourceDeriveds.Count > 0, "unexpected state")
848Debug.Assert(Not wideningOnly AndAlso targetBases.Count > 0, "unexpected state")
979Debug.Assert(operatorSet.Count > 0, "expected operators")
Microsoft\VisualBasic\CompilerServices\LikeOperator.vb (29)
78Debug.Assert(Options <> CompareOptions.Ordinal, "Char expansion check unexpected during binary compare")
455Debug.Assert(Comparer IsNot Nothing, "Like Operator - Comparer expected for option compare text")
456Debug.Assert(Not MatchBothCharsOfExpandedCharInRight OrElse Not UseUnexpandedCharForRight, "Conflicting compare options")
493Debug.Assert(LeftEnd < LeftLength AndAlso RightEnd < RightLength, "Comparing chars beyond end of string")
517Debug.Assert(Comparer IsNot Nothing, "Like Operator - Comparer expected for option compare text")
537Debug.Assert(Comparer IsNot Nothing, "Like Operator - Comparer expected for option compare text")
567Debug.Assert(RangeList Is Nothing OrElse ValidatePatternWithoutMatching, "Unexpected options to MatchRange")
784Debug.Assert(Not ValidatePatternWithoutMatching, "Unexpected string matching when validating pattern string")
912Debug.Assert(PatType = PatternType.STRING, "Unexpected pattern group type")
916Debug.Assert(PatType = PatternType.STRING, "Unexpected pattern group type")
924Debug.Assert(PatType = PatternType.STRING, "Unexpected pattern group type")
928Debug.Assert(PatType = PatternType.STRING, "Unexpected pattern group type")
942Debug.Assert(PatType = PatternType.STAR OrElse PatType = PatternType.NONE, "Unexpected pattern group type")
946Debug.Assert(PatType = PatternType.STAR OrElse PatType = PatternType.NONE, "Unexpected pattern group type")
958Debug.Assert(PatType = PatternType.EXCLIST OrElse PatType = PatternType.INCLIST, "Unexpected pattern group type")
962Debug.Assert(PatType = PatternType.EXCLIST OrElse PatType = PatternType.INCLIST, "Unexpected pattern group type")
971Debug.Assert(PatType = PatternType.EXCLIST OrElse PatType = PatternType.INCLIST, "Unexpected pattern group type")
975Debug.Assert(PatType = PatternType.EXCLIST OrElse PatType = PatternType.INCLIST, "Unexpected pattern group type")
1165Debug.Assert(False, "Unexpected pattern kind")
1229Debug.Assert(PatternGroups IsNot Nothing AndAlso
1281Debug.Assert(PatternGroups(PGIndex).PatType = PatternType.NONE, "Unexpected pattern end")
1310Debug.Assert(False, "Unexpected pattern kind")
1356Debug.Assert(PatternGroups(PGIndex).PatType = PatternType.STAR, "Unexpected start of pattern groups list")
1498Debug.Assert(SourceIndex <= PGCurrent.MaxSourceIndex, "Pattern matching lost")
1524Debug.Assert(PatternGroups(PGPrevMismatchIndex).PatType <> PatternType.NONE, "Bad previous mismatch index")
1605Debug.Assert(PG.PatType = PatternType.EXCLIST OrElse PG.PatType = PatternType.INCLIST, "Unexpected pattern group")
1611Debug.Assert(RangeList IsNot Nothing AndAlso RangeList.Count > 0, "Empty RangeList unexpected")
1617Debug.Assert(Range.Start >= 0, "NULL Range start unexpected")
1729Debug.Assert(Options <> CompareOptions.Ordinal, "This method should not be invoked in Option compare binary mode")
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (22)
522Debug.Assert(False, "the resolution should have thrown an exception")
720Debug.Assert(False, "the resolution should have thrown an exception - should never reach here")
1096Debug.Assert(False, "the resolution should have thrown an exception")
1182Debug.Assert(baseReference IsNot Nothing, "Nothing unexpected")
1183Debug.Assert(arguments IsNot Nothing, "Nothing unexpected")
1184Debug.Assert(argumentNames IsNot Nothing, "Nothing unexpected")
1185Debug.Assert(typeArguments IsNot Nothing, "Nothing unexpected")
1217Debug.Assert(False, "If ReportErrors is True, GetMembers should have thrown above")
1259Debug.Assert(propInfo.GetSetMethod Is Nothing OrElse HasIsExternalInitModifier(propInfo.GetSetMethod), "expected error condition")
1263Debug.Assert(propInfo.GetGetMethod Is Nothing, "expected error condition")
1293Debug.Assert(baseReference IsNot Nothing, "expected a base reference")
1294Debug.Assert(methodName IsNot Nothing, "expected method name")
1295Debug.Assert(members IsNot Nothing AndAlso members.Length > 0, "expected members")
1296Debug.Assert(arguments IsNot Nothing AndAlso
1353Debug.Assert(failure = OverloadResolution.ResolutionFailure.None OrElse Not reportErrors,
1357Debug.Assert(resolutionResult Is Nothing, "resolution failed so should have no result")
1361Debug.Assert(resolutionResult IsNot Nothing, "resolution didn't fail, so should have result")
1384Debug.Assert(result = False AndAlso errors.Count > 0, "expected this candidate to fail")
1460Debug.Assert(result = False AndAlso errors.Count > 0, "expected this candidate to fail")
1483Debug.Assert(False, "not a method or property??")
1493Debug.Assert(targetProcedure IsNot Nothing AndAlso arguments IsNot Nothing, "expected arguments")
1504Debug.Assert(arguments.Length > 0, "must have an argument for property set Value")
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (31)
105Debug.Assert(GetTypeCode(leftType) <> GetTypeCode(rightType),
414Debug.Assert(False, "Unexpected comparison type!!!")
424Debug.Assert(Not (leftWinsAtLeastOnce AndAlso rightWinsAtLeastOnce),
493Debug.Assert(arguments Is Nothing OrElse arguments.Length = argumentCount, "Inconsistency in arguments!!!")
686Debug.Assert(False, "unexpected code path")
728Debug.Assert(arguments Is Nothing OrElse arguments.Length = argumentCount, "Inconsistency in arguments!!!")
790Debug.Assert(setMethod IsNot Nothing, "must have set here")
813Debug.Assert(False, "what is this? just ignore it.")
822Debug.Assert(candidateSignature IsNot Nothing, "must have signature if we have a method")
876Debug.Assert(Not collectOnlyOperators, "didn't expect operator with paramarray")
1116Debug.Assert(Not parameterType.IsByRef, "didn't expect byref parameter type here")
1171Debug.Assert(parameterTypeParameters.Length = argumentTypeArguments.Length,
1527Debug.Assert(arguments.Length - argIndex <= 1,
1578Debug.Assert(parameters.Length > 0, "expected some parameters here") 'Candidate collection guarantees this.
1717Debug.Assert(matchedArguments.Length = parameters.Length OrElse
1775Debug.Assert(arguments.Length - argIndex = 1,
1803Debug.Assert(parameters.Length > 0, "expected some parameters here") 'Candidate collection guarantees this.
1822Debug.Assert(Not matchedParameters(paramIndex), "named argument match collision")
1834Debug.Assert(parameters(index).IsOptional,
1915Debug.Assert(arguments.Length - argIndex <= 1,
1942Debug.Assert(parameters.Length > 0, "expected some parameters here") 'Candidate collection guarantees this.
2006Debug.Assert(copyBack.Length = arguments.Length, "array sizes must match")
2217Debug.Assert(False, "Unexpected comparison type!!!")
2296Debug.Assert(Not (leftWinsAtLeastOnce AndAlso rightWinsAtLeastOnce),
2357Debug.Assert(candidateCount = 1, "Surprising overload candidate remains.")
2462Debug.Assert(errors IsNot Nothing, "expected error table")
2477Debug.Assert(errors IsNot Nothing, "expected error table")
2490Debug.Assert(errors IsNot Nothing, "expected error table")
2499Debug.Assert(errors IsNot Nothing, "expected error table")
2552Debug.Assert(result = False AndAlso errors.Count > 0, "expected this candidate to fail")
2565Debug.Assert(candidateReportCount > 0, "expected at least one candidate")
Microsoft\VisualBasic\CompilerServices\Symbols.vb (20)
181Debug.Assert(IsUserDefinedOperator(method), "expected operator here")
517Debug.Assert(type.GetGenericTypeDefinition IsNot Nothing, "expected bound generic type")
542Debug.Assert(genericMethodDef IsNot Nothing AndAlso IsRawGeneric(genericMethodDef), "Uninstantiated generic expected!!!")
563Debug.Assert(referringType.DeclaringMethod.IsGenericMethodDefinition, "Unexpected generic method instantiation!!!")
626Debug.Assert(method1 IsNot Nothing AndAlso IsRawGeneric(method1), "Generic method def expected!!!")
627Debug.Assert(method2 IsNot Nothing AndAlso IsRawGeneric(method2), "Generic method def expected!!!")
666Debug.Assert(False, "unexpected membertype")
708Debug.Assert(parameters IsNot Nothing, "expected parameter array")
938Debug.Assert(Me.IsWindowsRuntimeObject(), "Expected a Windows Runtime Object")
1002Debug.Assert(Me.IsWindowsRuntimeObject(), "Expected a Windows Runtime Object")
1149Debug.Assert(Me.IsArray, "expected array when getting array value")
1150Debug.Assert(indices IsNot Nothing, "expected valid indices")
1198Debug.Assert(Me.IsArray, "expected array when setting array value")
1199Debug.Assert(arguments IsNot Nothing, "expected valid indices")
1261Debug.Assert(callTarget IsNot Nothing, "must have valid MethodBase")
1263Debug.Assert(Not targetProcedure.IsGeneric OrElse
1481Debug.Assert(Me.ArgumentsValidated, "can't bind without validating arguments")
1482Debug.Assert(Me.IsMethod, "binding to a non-method")
1494Debug.Assert(Me.IsMethod, "casting a non-method to a method")
1499Debug.Assert(Me.IsProperty, "casting a non-property to a property")
Microsoft\VisualBasic\FileIO\FileSystem.vb (41)
685Debug.Assert(GetParentPath(FullNewPath).Equals(GetParentPath(directory),
722Debug.Assert(GetParentPath(FullNewPath).Equals(GetParentPath(file),
863Debug.Assert(StrCollection IsNot Nothing, "StrCollection is NULL")
895Debug.Assert([Enum].IsDefined(operation), "Invalid Operation")
936Debug.Assert(TargetDirectoryFullPath.Length > SourceDirectoryFullPath.Length, "Target path should be longer")
964Debug.Assert([Enum].IsDefined(operation), "Invalid Operation")
965Debug.Assert(sourceDirectoryPath <> "" And IO.Path.IsPathRooted(sourceDirectoryPath), "Invalid Source")
966Debug.Assert(targetDirectoryPath <> "" And IO.Path.IsPathRooted(targetDirectoryPath), "Invalid Target")
987Debug.Assert(IO.Directory.Exists(targetDirectoryPath), "Should be able to create Target Directory")
1013Debug.Assert([Enum].IsDefined(Operation), "Invalid Operation")
1014Debug.Assert(Exceptions IsNot Nothing, "Null exception list")
1015Debug.Assert(SourceDirectoryNode IsNot Nothing, "Null source node")
1032Debug.Assert(IO.Directory.Exists(SourceDirectoryNode.TargetPath), "TargetPath should have existed or exception should be thrown")
1095Debug.Assert([Enum].IsDefined(operation), "Invalid Operation")
1267Debug.Assert(FilePath <> "" AndAlso IO.Path.IsPathRooted(FilePath), FilePath)
1268Debug.Assert(Text <> "", "Empty text")
1330Debug.Assert(Not (TypeOf ex Is ArgumentException Or TypeOf ex Is ArgumentOutOfRangeException Or
1382Debug.Assert(Results IsNot Nothing, "Results is NULL")
1449Debug.Assert(Path <> "" AndAlso IO.Path.IsPathRooted(Path), Path)
1450Debug.Assert(Path.Equals(IO.Path.GetFullPath(Path)), Path)
1451Debug.Assert(NewName <> "", "Null NewName")
1452Debug.Assert(ArgumentName <> "", "Null argument name")
1485Debug.Assert(Not FullPath = "" AndAlso IO.Path.IsPathRooted(FullPath), "Must be full path")
1497Debug.Assert(DInfo.GetFiles(IO.Path.GetFileName(FullPath)).Length = 1, "Must found exactly 1")
1500Debug.Assert(DInfo.GetDirectories(IO.Path.GetFileName(FullPath)).Length = 1,
1517Debug.Assert(Not (TypeOf ex Is ArgumentException OrElse
1602Debug.Assert(FullSourcePath <> "" And IO.Path.IsPathRooted(FullSourcePath), "Invalid FullSourcePath")
1603Debug.Assert(FullTargetPath <> "" And IO.Path.IsPathRooted(FullTargetPath), "Invalid FullTargetPath")
1604Debug.Assert(ShowUI <> UIOptionInternal.NoUI, "Why call ShellDelete if ShowUI is NoUI???")
1667Debug.Assert(FullPath <> "" And IO.Path.IsPathRooted(FullPath), "FullPath must be a full path")
1668Debug.Assert(ShowUI <> UIOptionInternal.NoUI, "Why call ShellDelete if ShowUI is NoUI???")
2096Debug.Assert(IO.Directory.Exists(DirectoryPath), "Directory does not exist")
2097Debug.Assert(TargetDirectoryPath <> "" And IO.Path.IsPathRooted(TargetDirectoryPath), "Invalid TargetPath")
2157Debug.Assert(Encoding IsNot Nothing, "Null Decoder")
2158Debug.Assert(Text <> "", "Empty Text")
2179Debug.Assert(ByteBuffer IsNot Nothing, "Null ByteBuffer")
2180Debug.Assert(Count > 0, Count.ToString(CultureInfo.InvariantCulture))
2181Debug.Assert(m_Decoder IsNot Nothing, "Null Decoder")
2182Debug.Assert(m_Preamble IsNot Nothing, "Null Preamble")
2211Debug.Assert(CharCount = ExpectedCharCount, "Should read all characters")
2245Debug.Assert(BigBuffer.Length > SmallBuffer.Length, "BigBuffer should be longer")
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (21)
656Debug.Assert(m_Buffer IsNot Nothing, "There's no buffer")
657Debug.Assert(m_Reader IsNot Nothing, "There's no StreamReader")
662Debug.Assert(BufferLength >= DEFAULT_BUFFER_LENGTH, "Buffer shrunk to below default")
688Debug.Assert(m_Buffer IsNot Nothing, "There's no buffer")
689Debug.Assert(m_Reader IsNot Nothing, "There's no StreamReader")
690Debug.Assert(m_Position >= 0 And m_Position <= m_Buffer.Length, "The cursor is out of range")
717Debug.Assert(m_Buffer IsNot Nothing, "There's no buffer")
718Debug.Assert(m_Reader IsNot Nothing, "There's no StreamReader")
719Debug.Assert(m_Position = 0, "Non-zero position")
739Debug.Assert(CharsRead <= m_Buffer.Length - m_CharsRead, "We've read more chars than we have space for")
811Debug.Assert(m_Buffer IsNot Nothing, "There's no buffer")
812Debug.Assert(Cursor >= 0 And Cursor <= m_CharsRead, "The cursor is out of range")
1007Debug.Assert(m_FieldWidths IsNot Nothing, "No field widths")
1070Debug.Assert(Line IsNot Nothing, "We are parsing a Nothing")
1073Debug.Assert(Length > 0, "A blank line shouldn't be parsed")
1098Debug.Assert(Line IsNot Nothing, "No Line sent")
1128Debug.Assert(m_FieldWidths(i) > 0, "Bad field width, this should have been caught on input")
1150Debug.Assert(Widths IsNot Nothing, "There are no field widths")
1281Debug.Assert((m_DelimitersCopy Is Nothing And m_Delimiters Is Nothing) Or (m_DelimitersCopy IsNot Nothing And m_Delimiters IsNot Nothing), "Delimiters and copy are not both Nothing or both not Nothing")
1299Debug.Assert((m_FieldWidthsCopy Is Nothing And m_FieldWidths Is Nothing) Or (m_FieldWidthsCopy IsNot Nothing And m_FieldWidths IsNot Nothing), "FieldWidths and copy are not both Nothing or both not Nothing")
1414Debug.Assert(m_Delimiters IsNot Nothing, "No delimiters set!")
Microsoft.VisualStudio.LanguageServices (12)
MSBuild (11)
MSBuildTaskHost (8)
PresentationBuildTasks (121)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (20)
688Debug.Assert(false,"Assembly, Type and Attribute records are not cached, so don't ask for one.");
713Debug.Assert(false,"Unknown RecordType");
856set { Debug.Assert (value == -1, "Setting fixed record to an invalid size"); }
865Debug.Assert(false, "Must override RecordType");
1501Debug.Assert(_valuePositionPosition != -1,
1684Debug.Assert(_valuePositionPosition != -1,
2049set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2119set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2180set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2407set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
2984set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
3198set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3285set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3434Debug.Assert(_contentSizePosition != -1,
3479set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3639set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3737set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3815set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
4000Debug.Assert(FilePos != -1,"UpdateWrite called but Write Never was");
4696Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (11)
464Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
563Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
599Debug.Assert(!InStaticResourceSection, "We do not support x:Shared within a StaticResource Section");
783Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
839Debug.Assert(keyRecord.RecordList.Count == 0, "Should have empty record list");
865Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
1627Debug.Assert(keyRecord != null, "Unknown key record type in defer load dictionary");
1635Debug.Assert(keyIndex == _deferKeys.Count,
1658Debug.Assert(_deferElementDepth > 0 && CollectingValues,
1666Debug.Assert(valueDeferRecord.Record != null &&
1678Debug.Assert(valueDeferRecord.Record != null && valueDeferRecord.Record.RecordType == BamlRecordType.ElementEnd,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (37)
116Debug.Assert(xamlParser != null, "Cannot have null xaml parser");
117Debug.Assert(parserContext != null, "Cannot have null parser context");
118Debug.Assert(xmlReader != null, "Cannot have null xmlReader");
331Debug.Assert(null != xamlNode, "null returned from the collection");
399Debug.Assert(!IsMoreData(), "Setting state to done but not done parsing.");
432Debug.Assert(null != xamlNode, "null returned from the collection");
1178Debug.Assert(null != typeFullName, "type name not set");
1179Debug.Assert(null != dynamicObjectName, "dynamicObject name not set");
1180Debug.Assert(null != assemblyName, "assembly name not set");
1831Debug.Assert(null == dynamicObject,"DynamicObject should be null for code");
1999Debug.Assert(false == endTagHasBeenRead, "Read past end tag on end tag");
3181Debug.Assert(null != assemblyName, "property without an AssemblyName");
3182Debug.Assert(null != declaringTypeFullName, "property without a type name");
3183Debug.Assert(null != dynamicObjectName, "property without a field Name");
3757Debug.Assert(CurrentContext.ContextType == ElementContextType.PropertyComplex ||
4136Debug.Assert(null != assemblyName, "property without an AssemblyName");
4137Debug.Assert(null != typeFullName, "property without a type name");
4138Debug.Assert(null != dynamicObjectName, "property without a field Name");
5089Debug.Assert( isWhitespace,
5267Debug.Assert(null != XmlReader, "XmlReader is not yet set");
5313Debug.Assert(false, "XmlReader doesn't support LineNumber");
5344Debug.Assert(false, "XmlReader doesn't support LinePosition");
5571Debug.Assert(null != text, "String passed to CollapseText cannot be null");
5572Debug.Assert(textLength > 0, "String passed to Collapsed Text cannot be empty");
5832Debug.Assert((_nodeIndex == 0 && _xamlNodes.Count == 0 ) || (_nodeIndex < _xamlNodes.Count),
5852Debug.Assert((_nodeIndex == 0 && _xamlNodes.Count == 0 ) || (_nodeIndex < _xamlNodes.Count),
5879Debug.Assert(!value || _insertionIndex == -1, "Attribute node collection is already marked for insertion.");
5938Debug.Assert(_nodeIndex == _xamlNodes.Count, "NodeIndex is larger than node count.");
6006Debug.Assert( _typeConverterDecisionState == TypeConverterDecisionState.ElementEnd,
6069Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex]).TokenType==XamlNodeType.ElementStart,
6088Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex])==xamlNode,
6112Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex])==xamlNode,
6128Debug.Assert( _typeConverterTextWrittenAndNotProcessed != null,
6157Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex]).TokenType==XamlNodeType.ElementStart,
6433Debug.Assert(null != textFlowData, "No data for TextFlow");
6455Debug.Assert(null != typeRightTag, "ElementType not yet assigned to Node");
6576Debug.Assert(0 == textFlowData.InlineCount, "Text stack still has an inline count");
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (15)
936Debug.Assert(null != localName, "null localName");
937Debug.Assert(null != xmlNamespace, "null xmlNamespace");
1907Debug.Assert(typeInfo != null, "Must have cached type info at this point");
2399Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace");
2400Debug.Assert(null != localName,"null value passed for localName");
2438Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace");
2439Debug.Assert(null != localName,"null value passed for localName");
2591Debug.Assert(namespaceMap.ClrNamespace != null,"Null CLR Namespace");
2592Debug.Assert(localName != null,"Null localName");
3151Debug.Assert(false, "Should initialize cache prior to compiling");
3422Debug.Assert(false, "Should initialize cache prior to compiling");
3441Debug.Assert(null != type, "Null passed for type to GetTypeConverterType");
3516Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverterType");
3745Debug.Assert(null != type, "null value for type passed to GetWhitespace");
4007Debug.Assert(_dpLookupHashtable != null,
PresentationCore (522)
MS\Internal\TextFormatting\Bidi.cs (30)
685Debug.Assert(CharProperty[1, (int) startClass]==1 || (startClass == DirectionClass.ArabicLetter),
688Debug.Assert(CharProperty[1, (int) endClass]==1, ("Cannot use non strong type to resolve neutrals"));
711Debug.Assert(CharProperty[2, (int) characterClass[counter + classIndex]]==0,
736Debug.Assert(CharProperty[2, (int) characterClass[counter + classIndex]]==0, "Changing class of a fixed class");
847Debug.Assert(startOfNeutrals == PositionInvalid,
892Debug.Assert(startOfDelayed != PositionInvalid,
937Debug.Assert(startOfNeutrals == PositionInvalid,
942Debug.Assert(startOfDelayed != PositionInvalid,
1042Debug.Assert(startOfNeutrals != PositionInvalid,
1081Debug.Assert(startOfNeutrals != PositionInvalid,
1114Debug.Assert(startOfNeutrals == PositionInvalid,
1132Debug.Assert(startOfNeutrals == PositionInvalid,
1145Debug.Assert(startOfDelayed != PositionInvalid,
1159Debug.Assert(startOfNeutrals == PositionInvalid,
1164Debug.Assert(startOfDelayed != PositionInvalid,
1175Debug.Assert(startOfNeutrals != PositionInvalid,
1184Debug.Assert(startOfNeutrals == PositionInvalid,
1202Debug.Assert(startOfDelayed != PositionInvalid,
1206Debug.Assert(lastClass == DirectionClass.EuropeanTerminator,
1213Debug.Assert(startOfNeutrals == PositionInvalid,
1218Debug.Assert(startOfDelayed != PositionInvalid,
1267Debug.Assert(startOfNeutrals != PositionInvalid,
1281Debug.Assert(startOfNeutrals == PositionInvalid,
1286Debug.Assert(startOfDelayed != PositionInvalid,
1318Debug.Assert(startOfNeutrals == PositionInvalid,
1345Debug.Assert(startOfNeutrals == PositionInvalid,
1390Debug.Assert(startOfNeutrals == PositionInvalid,
1426Debug.Assert(startOfDelayed != PositionInvalid,
1568Debug.Assert(startOfNeutrals == PositionInvalid,
2459Debug.Assert(runLengthResolved == runLength,
System\Windows\Media\Animation\AnimationStorage.cs (10)
510Debug.Assert(index > -1,
539Debug.Assert(_hasStickySnapshotValue,
589Debug.Assert(animationClocks != null,
591Debug.Assert(animationClocks.Count > 0,
593Debug.Assert(!animationClocks.Contains(null),
595Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior),
707Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior),
780Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior),
896Debug.Assert(storage != null,
1145Debug.Assert(type == typeof(Vector3D), "Application is trying to create independent animation storage for an unsupported type.");
System\Windows\Media\Animation\Clock.cs (24)
1396Debug.Assert(_resolvedDuration != Duration.Automatic, "_resolvedDuration should never be set to Automatic.");
1944Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic.");
2170Debug.Assert(_currentDuration == Duration.Forever, "_currentDuration has an invalid enum value.");
2189Debug.Assert(this is ClockGroup, "ComputeCurrentIterationWithGrow should only run on ClockGroups.");
2190Debug.Assert(CanGrow, "ComputeCurrentIterationWithGrow should only run on clocks with CanGrow.");
2191Debug.Assert(_currentIterationBeginTime.HasValue, "ComputeCurrentIterationWithGrow should only be called when _currentIterationBeginTime has a value.");
2192Debug.Assert(_resolvedDuration.HasTimeSpan, "ComputeCurrentIterationWithGrow should only be called when _resolvedDuration has a value."); // We must have a computed duration
2193Debug.Assert(_currentDuration.HasTimeSpan, "ComputeCurrentIterationWithGrow should only be called when _currentDuration has a value.");
2340Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic.");
2344Debug.Assert(_currentDuration.TimeSpan > TimeSpan.Zero, "ComputeCurrentTime was entered with _currentDuration <= 0");
2351Debug.Assert(transitionTime <= 1, "The values of the accel and decel attributes incorrectly add to more than 1.0");
2352Debug.Assert(transitionTime >= 0, "The values of the accel and decel attributes incorrectly add to less than 0.0");
2415Debug.Assert(_currentDuration == Duration.Forever, "_currentDuration has an invalid enum value.");
2443Debug.Assert(_resolvedDuration == Duration.Forever, "_resolvedDuration should be Forever when NaturalDuration is Automatic.");
2476Debug.Assert(_resolvedDuration != Duration.Automatic, "_resolvedDuration should never be Automatic.");
2477Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic.");
2499Debug.Assert(_currentDuration.HasTimeSpan, "_currentDuration is invalid, neither Forever nor a TimeSpan.");
2500Debug.Assert(_currentDuration == _resolvedDuration, "For clocks which cannot grow, _currentDuration must equal _resolvedDuration.");
2512Debug.Assert(_resolvedDuration.HasTimeSpan, "_resolvedDuration is invalid, neither Forever nor a TimeSpan.");
2513Debug.Assert(_currentDuration.HasTimeSpan, "_currentDuration is invalid, neither Forever nor a TimeSpan.");
2653Debug.Assert(!_currentIterationBeginTime.HasValue, "_currentIterationBeginTime should not have a value when _beginTime has no value.");
3079Debug.Assert(_rootData != null, "A root Clock must have the _rootData structure initialized.");
3393Debug.Assert(!current.IsRoot, "Root nodes never should reset their Slip amounts with ResetSlipOnSubtree(), even when seeking.");
4170Debug.Assert(Math.Abs(optimizedInputTime - inputTime) <= error,
System\Windows\Media\MediaContext.cs (11)
604Debug.Assert(InterlockIsEnabled,
701Debug.Assert(_interlockState == InterlockState.WaitingForResponse,
778Debug.Assert(!InterlockIsWaiting,
843Debug.Assert(InterlockIsWaiting,
1078Debug.Assert(IsClockSupported, "MediaContext.CurrentTime called when QueryPerformaceCounter is not supported");
1337Debug.Assert(_interlockState == InterlockState.Disabled,
1367Debug.Assert(dispatcher != null, "Dispatcher required");
2121Debug.Assert(_needToCommitChannel, "CommitChannel called with nothing on the channel");
2125Debug.Assert(!InterlockIsWaiting,
2191Debug.Assert(InterlockIsEnabled,
2523Debug.Assert(_interlockState == InterlockState.WaitingForNextFrame
System\Windows\Media\Visual.cs (7)
157Debug.Assert(false, "TYPE_VISUAL or TYPE_VIEWPORT3DVISUAL expected.");
1946Debug.Assert(Point.Equals(pointParams.HitPoint, backupHitPoint),
1977Debug.Assert(Matrix.Equals(geometryParams.InternalHitGeometry.Transform.Value, originalMatrix),
3036Debug.Assert(bed != null, "Must be non-null because otherwise the code would have earlied out where new value is compared against old value.");
3281Debug.Assert(EffectField.GetValue(this) == null, "Not expecting both BitmapEffect and Effect to be set on the same node");
3956Debug.Assert(_parent != null, "If oldParent is null, current parent should != null.");
5219Debug.Assert(cyclicBrushToChannelsMap != null, "Visual brush roots need to have the visual brush to channels map!");
System\Windows\Media3D\Visual3D.cs (10)
458Debug.Assert(VisualTreeHelper.GetParent(this) != null, "If oldParent is null, current parent should != null.");
1058Debug.Assert(boundsAreEqual, errorString);
1212Debug.Assert((flags & VisualProxyFlags.IsContentNodeConnected) == 0,
1583Debug.Assert(child.InheritanceContext == this,
1829Debug.Assert(_2DParent.GetValue(this) == null,
1837Debug.Assert(parent2D == null || parent2D is Viewport3DVisual,
2041Debug.Assert(!e.CheckFlagsOr(VisualFlags.ShouldPostRender),
2043Debug.Assert(!e.CheckFlagsOr(VisualFlags.NodeIsCyclicBrushRoot),
2055Debug.Assert((viewport == null) == (e.InternalVisualParent == null),
2093Debug.Assert(_inheritanceContext.GetValue(this) == UseParentAsContext,
PresentationFramework (1097)
MS\Internal\Annotations\Anchoring\LocatorManager.cs (13)
308Debug.Assert(attachedAnchor != null, "AttachedAnchor cannot be null if attachmentLevel is not Unresolved.");
358Debug.Assert(processor != null, "SubtreeProcessor can not be null");
635Debug.Assert(startNode != null, "startNode can not be null");
747Debug.Assert(node != null, "node can not be null");
814Debug.Assert(data != null, "dataBlob is either null or not of ProcessingTreeState type");
819Debug.Assert(processor != null, "SubtreeProcessor can not be null"); // There is always a default processor
841Debug.Assert(data != null, "dataBlob is either null or not of ProcessingTreeState type");
845Debug.Assert(processor != null, "SubtreeProcessor can not be null");
880Debug.Assert(locator != null, "locator can not be null");
881Debug.Assert(startNode != null, "startNode can not be null");
917Debug.Assert(offset >= 0 && offset < realLocator.Parts.Count, "offset out of range");
1090Debug.Assert(locator != null, "locator can not be null");
1091Debug.Assert(data.LocatorPartIndex >= 0 && data.LocatorPartIndex < locator.Parts.Count,
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (21)
73Debug.Assert(start != null, "start pointer is null");
74Debug.Assert(end != null, "end pointer is null");
75Debug.Assert(start.CompareTo(end) <= 0, "end pointer before start");
111Debug.Assert(highlightRange != null, "null range data");
341Debug.Assert(highlightRange != null, " null highlight range");
343Debug.Assert((rangeSegments != null) && (rangeSegments.Count > 0), "invalid rangeSegments");
354Debug.Assert(highlightSegment != null, "null highlight segment");
378Debug.Assert(rangeEnumerator.Current.IsNull || !next ||
513Debug.Assert(false, "Mismatched segment data");
636Debug.Assert(start != null, "start pointer is null");
637Debug.Assert(end != null, "end pointer is null");
638Debug.Assert(owners != null, "null owners list");
639Debug.Assert(owners.Count > 0, "empty owners list");
641Debug.Assert(owners[i] != null, "null owner");
792Debug.Assert((ps1 != null) && (ps2 != null) && (ps1.CompareTo(ps2) <= 0), "invalid splitting points");
866Debug.Assert(res.Count == 2, "unexpected resulting segment count after split");
919Debug.Assert(textViews != null, "geometry text view not found");
938Debug.Assert((view != null) && (parentView != null), "null text view");
980Debug.Assert(!_segment.IsNull, "null TextSegment");
1099Debug.Assert(TopOwner != null, "invalid TopOwner");
1101Debug.Assert(parentView != null, "geometry parent text view not found");
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (26)
364Debug.Assert(anchor != null, "undefined anchor");
365Debug.Assert(marker.Data != null || marker.Data == Geometry.Empty, "undefined geometry");
369Debug.Assert(geometry != null, "unexpected geometry type");
370Debug.Assert(geometry.Children.Count == 3, "unexpected geometry children count");
437Debug.Assert(_uiParent != null, "No selection container");
479Debug.Assert(textContainer != null, "TextAnchor does not belong to a TextContainer");
631Debug.Assert(componentsRegister != null, "The selection is not registered");
657Debug.Assert(anchor != null, "wrong attachedAnchor");
890Debug.Assert(selection != null, "Unexpected sender of Changed event");
900Debug.Assert(components != null, "No SN registered for this selection");
908Debug.Assert(components[i].HighlightAnchor != null, "Missing highlight anchor component");
929Debug.Assert(sender != null, "undefined sender");
956Debug.Assert(pos != null, "null text pointer");
970Debug.Assert((components != null) && (components.Count > 0), "invalid component registry");
997Debug.Assert(selectionHandler != null, "SelectionHandler handler can not be null");
998Debug.Assert(mouseMoveHandler != null, "MouseMoveHandler handler can not be null");
1011Debug.Assert(component != null, "component is null");
1012Debug.Assert(_components != null, "_components are null");
1046Debug.Assert(component != null, "component is null");
1047Debug.Assert(_components != null, "_components are null");
1102Debug.Assert(first != null, "first component is null");
1103Debug.Assert((first.AttachedAnnotations != null) && (first.AttachedAnnotations.Count > 0), "first AttachedAnchor is null");
1104Debug.Assert(second != null, "second component is null");
1105Debug.Assert((second.AttachedAnnotations != null) && (second.AttachedAnnotations.Count > 0), "second AttachedAnchor is null");
1110Debug.Assert(firstAnchor != null, " first TextAnchor is null");
1111Debug.Assert(secondAnchor != null, " second TextAnchor is null");
MS\Internal\Ink\EditingCoordinator.cs (19)
73Debug.Assert(ActiveEditingBehavior == SelectionEditor,
166Debug.Assert(currentBehavior is StylusEditingBehavior,
188Debug.Assert(currentBehavior is StylusEditingBehavior,
302Debug.Assert(_activationStack.Count == 1, "The behavior stack has to contain one behavior.");
358Debug.Assert(behavior == LassoSelectionBehavior || behavior == SelectionEditingBehavior,
369Debug.Assert(behavior != LassoSelectionBehavior && behavior != SelectionEditingBehavior,
438Debug.Assert((_capturedStylus != null && _capturedMouse == null)
769Debug.Assert(stylusEditingBehavior != null || ActiveEditingBehavior == null,
852Debug.Assert(ActiveEditingBehavior == null || ActiveEditingBehavior is IStylusEditing,
921Debug.Assert(inputDevice != null, "A null device is passed in.");
922Debug.Assert(stylusEditingBehavior != null, "stylusEditingBehavior cannot be null.");
923Debug.Assert(!IsInMidStroke, "The previous device hasn't been released yet.");
968Debug.Assert(!resetDynamicRenderer, "The dynamic renderer shouldn't be reset for Mouse");
1004Debug.Assert(IsInMidStroke || !releaseDevice, "The captured device has been release unexpectly.");
1046Debug.Assert(_capturedStylus == null || _capturedMouse == null, "InkCanvas cannot capture both stylus and mouse at the same time.");
1179Debug.Assert(false, "Unknown behavior");
1216Debug.Assert(false, "Unknown behavior");
1224Debug.Assert(!IsInMidStroke, "ChangeEditingBehavior cannot be called in a mid-stroke");
1225Debug.Assert(_activationStack.Count <= 1, "The behavior stack has to contain at most one behavior when user is not editing.");
MS\Internal\PtsHost\PtsHost.cs (19)
570Debug.Assert(false, "PTS.GetSegmentDefinedColumnSpanAreaInfo is not implemented.");
582Debug.Assert(false, "PTS.GetHeightDefinedColumnSpanAreaInfo is not implemented.");
870Debug.Assert(false, "PTS.GetNumberEndnoteColumns is not implemented.");
882Debug.Assert(false, "PTS.GetEndnoteColumnInfo is not implemented.");
893Debug.Assert(false, "PTS.GetFootnoteSeparators is not implemented.");
902Debug.Assert(false, "PTS.FFootnoteBeneathText is not implemented.");
911Debug.Assert(false, "PTS.GetNumberFootnoteColumns is not implemented.");
923Debug.Assert(false, "PTS.GetFootnoteColumnInfo is not implemented.");
932Debug.Assert(false, "PTS.GetFootnoteSegment is not implemented.");
946Debug.Assert(false, "PTS.GetFootnotePresentationAndRejectionOrder is not implemented.");
955Debug.Assert(false, "PTS.FAllowFootnoteSeparation is not implemented.");
1253Debug.Assert(false, "PTS.GetFootnotes is not implemented.");
1272Debug.Assert(false, "PTS.FormatDropCap is not implemented.");
1290Debug.Assert(false, "PTS.GetDropCapPolygons is not implemented.");
1298Debug.Assert(false, "PTS.DestroyDropCap is not implemented.");
1706Debug.Assert(false, "PTS.SnapGridVertical is not implemented.");
1807Debug.Assert(false, "PTS.UpdGetDropCapChange is not implemented.");
1908Debug.Assert(false, "PTS.GetOptimalLineDcpCache is not implemented.");
2934Debug.Assert(false, "PTS.ObjGetFootnoteInfo is not implemented.");
MS\Internal\PtsHost\TextParaClient.cs (10)
132Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
230Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
319Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
372Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
714Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
795Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
858Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
908Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
1065Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
1367Debug.Assert(false, "Should not get here. ParaCache is not currently used.");
MS\Internal\Text\ComplexLine.cs (11)
64Debug.Assert(run != null, "TextRun has not been created.");
65Debug.Assert(run.Length > 0, "TextRun has to have positive length.");
155Debug.Assert(runs != null, "Cannot retrieve runs collection.");
178Debug.Assert(DoubleUtil.GreaterThanOrClose(rect.Width, 0), "Negative inline object's width.");
230Debug.Assert(runs != null, "Cannot retrieve runs collection.");
334Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters.");
381Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge.");
386Debug.Assert(element != null, "Cannot use ITextContainer that does not provide TextElement instances.");
472Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge.");
477Debug.Assert(element != null, "Element should be here.");
522Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
System\Windows\Controls\DataGrid.cs (14)
1637Debug.Assert(info != null, "info is null.");
1638Debug.Assert(column != null, "column is null.");
1749Debug.Assert(_isDraggingSelection, "DoAutoScroll should only be called when dragging selection.");
3543Debug.Assert(CanUserAddRows, "AddNewItem called when the end-user cannot add new rows.");
3544Debug.Assert(!IsAddingNewItem, "AddNewItem called when a pending add is taking place.");
6373Debug.Assert(RelativeMousePosition != RelativeMousePositions.Over, "The mouse is not supposed to be over the DataGrid.");
7093Debug.Assert(sortColumn != null, "column should not be null");
7251Debug.Assert(e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time");
7262Debug.Assert(e.OldItems.Count == 1, "SortDescriptionCollection should handle one element at a time");
7282Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time");
7396Debug.Assert(e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time");
7404Debug.Assert(e.OldItems.Count == 1, "GroupDescriptionCollection should handle one element at a time");
7415Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time");
7835Debug.Assert(dataGrid != null || columnCollection != null, "Both dataGrid and columnCollection cannot not be null at the same time");
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (1)
106Debug.Assert(
System\Windows\Controls\DataGridCellsPanel.cs (17)
167Debug.Assert(blockList != null, "RealizedColumnsBlockList shouldn't be null at this point.");
634Debug.Assert(!children.Contains(child), "we incorrectly identified a recycled container");
649Debug.Assert(child == InternalChildren[childIndex], "Wrong child was generated");
679Debug.Assert(container != null, "Null container was generated");
715Debug.Assert(children[visualTreeIndex] != null, "MoveVisualChild interprets a null destination as 'move to end'");
776Debug.Assert(false, "We should have found a child");
1071Debug.Assert(columnIndex < columnCount, "columnIndex should be less than column count");
1147Debug.Assert(children == _realizedChildren, "the given child list must be the _realizedChildren list when recycling");
1332Debug.Assert(
1338Debug.Assert(
1417Debug.Assert(i >= arrangeState.FrozenColumnCount, "Frozen cells should have been realized or not visible");
1451Debug.Assert(child != null, "child cannot be null.");
1466Debug.Assert(cell.Column != null, "column cannot be null.");
1571Debug.Assert(children.Count > blockElementCount, "Element count from blocks can't be less than total children count");
1612Debug.Assert(columnIndex <= block.EndIndex, "Missing children for index in block list");
1974Debug.Assert(ParentDataGrid != null, "ParentDataGrid should not be null");
2092Debug.Assert((itemCount == itemUICount) || (itemUICount == 0), "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0.");
System\Windows\Controls\DataGridColumnCollection.cs (16)
21Debug.Assert(dataGridOwner != null, "We should have a valid DataGrid");
227Debug.Assert(displayIndex >= 0 && displayIndex < DisplayIndexMap.Count, "displayIndex should have already been validated");
325Debug.Assert(newDisplayIndex >= 0 && newDisplayIndex < Count, "The new DisplayIndex should have already been validated");
358Debug.Assert(oldDisplayIndex != newDisplayIndex, "A column's display index must have changed for us to call OnColumnDisplayIndexChanged");
359Debug.Assert(oldDisplayIndex >= 0 && oldDisplayIndex < Count, "The old DisplayIndex should be valid");
410Debug.Assert(
413Debug.Assert(IsUpdatingDisplayIndex == false, "We don't add new columns as part of a display index update operation");
470Debug.Assert(DisplayIndexMap.Count == 0, "DisplayIndexMap should be empty until first measure call.");
554Debug.Assert(
557Debug.Assert(IsUpdatingDisplayIndex == false, "We don't remove columns as part of a display index update operation");
562Debug.Assert(DisplayIndexMap.Count > Count, "Columns were just removed: the display index map shouldn't have yet been updated");
598Debug.Assert(oldColumns.Count == 1 && newColumns.Count == 1, "Multi replace isn't possible with ObservableCollection");
726Debug.Assert(Count == DisplayIndexMap.Count, "Display Index map is of the wrong size");
729Debug.Assert(DisplayIndexMap[i] >= 0 && DisplayIndexMap[i] < Count, "DisplayIndex map entry doesn't point to a valid column");
730Debug.Assert(ColumnFromDisplayIndex(i).DisplayIndex == i, "DisplayIndex map doesn't match column indices");
897Debug.Assert(
System\Windows\Controls\GridViewColumnCollectionChangedEventArgs.cs (12)
45Debug.Assert(action == NotifyCollectionChangedAction.Add || action == NotifyCollectionChangedAction.Remove,
47Debug.Assert(changedItem != null, "changedItem can't be null");
48Debug.Assert(index >= 0, "index must >= 0");
49Debug.Assert(actualIndex >= 0, "actualIndex must >= 0");
60Debug.Assert(newItem != null, "newItem can't be null");
61Debug.Assert(oldItem != null, "oldItem can't be null");
62Debug.Assert(index >= 0, "index must >= 0");
63Debug.Assert(actualIndex >= 0, "actualIndex must >= 0");
74Debug.Assert(changedItem != null, "changedItem can't be null");
75Debug.Assert(index >= 0, "index must >= 0");
76Debug.Assert(oldIndex >= 0, "oldIndex must >= 0");
77Debug.Assert(actualIndex >= 0, "actualIndex must >= 0");
System\Windows\Controls\GridViewHeaderRowPresenter.cs (12)
301Debug.Assert(_paddingHeader != null, "padding header is null");
311Debug.Assert(_indicator != null, "_indicator is null");
312Debug.Assert(_floatingHeader != null, "_floatingHeader is null");
385Debug.Assert(_paddingHeader != null, "padding header is null");
454Debug.Assert(_draggingSrcHeader != null, "_draggingSrcHeader is null");
855Debug.Assert(index >= 0 && index < InternalChildren.Count, "Error index when GetVisualIndex");
938Debug.Assert(false, "Head is container for itself, but parent is neither GridViewHeaderRowPresenter nor null.");
1194Debug.Assert(header != null, "Cannot instantiate GridViewColumnHeader in AddFloatingHeader");
1207Debug.Assert(srcHeader != null, "srcHeader is null");
1208Debug.Assert(_floatingHeader != null, "floating header is null");
1374Debug.Assert(index >= 0 && index < HeadersPositionList.Count, "wrong index");
1561Debug.Assert(Columns != null, "Columns is null in OnHeaderDragCompleted");
System\Windows\Controls\InkCanvas.cs (14)
576Debug.Assert(e.Property == InkCanvas.RightProperty || e.Property == InkCanvas.BottomProperty,
1042Debug.Assert(e != null, "EventArg can not be null");
1261Debug.Assert(e != null, "EventArg can not be null");
1318Debug.Assert(e != null, "EventArg can not be null");
1372Debug.Assert(e != null, "EventArg can not be null");
1406Debug.Assert(e != null, "EventArg can not be null");
1437Debug.Assert(e != null, "EventArg can not be null");
1473Debug.Assert(e != null, "EventArg can not be null");
1549Debug.Assert(e != null, "EventArg can not be null");
1579Debug.Assert(e != null, "EventArg can not be null");
1613Debug.Assert(e != null, "EventArg can not be null");
1643Debug.Assert(e != null, "EventArg can not be null");
2340Debug.Assert(strokes != null
2667Debug.Assert(removeSelectedStrokes || removeSelectedElements, "At least either Strokes or Elements should be removed!");
System\Windows\Controls\ItemContainerGenerator.cs (9)
280Debug.Assert(false, "Unexpected reentrant call to ICG.Remove");
326Debug.Assert(!_recyclableContainers.Contains(container), "trying to add a container to the collection twice");
931Debug.Assert(item == null || ItemsControl.EqualsEx(item, target),
2208Debug.Assert(ItemsControl.EqualsEx(rib.ItemAt(rib.ContainerCount - 1),
2274Debug.Assert(!container.HasExpression(entryIndex, dp), "DataContext set by expression (unexpectedly)");
2339Debug.Assert(!container.HasExpression(entryIndex, dp), "DataContext set by expression (unexpectedly)");
2372Debug.Assert(ItemsControl.EqualsEx(item, ItemsInternal[index]), "Event contains the wrong index");
2447Debug.Assert(false, "unexpected reentrant call to OnItemAdded");
2637Debug.Assert(false, "unexpected reentrant call to OnItemMoved");
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
346Debug.Assert(
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (11)
227Debug.Assert(column != null, "We shouldn't have generated this column header if we don't have a column.");
263Debug.Assert(HeaderCollection != null, "This is a helper method for preparing and clearing a container; if it's called we must have a valid ItemSource");
699Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null");
746Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null");
760Debug.Assert(_columnHeaderDragIndicator != null, "Drag indicator is null");
761Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null");
779Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null");
793Debug.Assert(_columnHeaderDropLocationIndicator != null, "Drag indicator is null");
794Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null");
811Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null");
924Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null");
System\Windows\Controls\Primitives\Popup.cs (11)
177Debug.Assert(popup != null, "Popup must be non-null");
178Debug.Assert(placementTarget != null, "Placement target must be non-null.");
208Debug.Assert(popup != null, "Popup must be non-null");
209Debug.Assert(placementTarget != null, "Placement target must be non-null.");
885Debug.Assert(!bindTreatMousePlacementAsBottomProperty || child is ToolTip, "child must be a Tooltip to bind TreatMousePlacementAsBottomProperty");
1109Debug.Assert( Mouse.Captured == _popupRoot, "_cacheValid[(int)CacheBits.CaptureEngaged] == true but Mouse.Captured != _popupRoot");
1401Debug.Assert(popup != null, "popup should be non-null.");
1402Debug.Assert(child != null, "child should be non-null.");
1425Debug.Assert(child != null, "child should be non-null");
1939Debug.Assert(CheckAccess(), "AsyncReposition not called on the dispatcher thread.");
3297Debug.Assert(!IsChildPopup || (IsChildPopup && !transparent), "Child popups cannot be transparent");
System\Windows\Controls\Primitives\Selector.cs (13)
1035Debug.Assert(CanSelectMultiple, "CanSelectMultiple should be true when calling SelectAllImpl");
1423Debug.Assert(!SelectionChange.IsActive, "SelectionChange is already active -- use SelectionChange.Select or Unselect");
1497Debug.Assert(!((SelectedIndex >= 0) && (_selectedItems.Count == 0)), "SelectedIndex >= 0 implies _selectedItems nonempty");
1595Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true");
1677Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true");
2040Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true");
2272Debug.Assert(!_active, SR.SelectionChangeActive);
2285Debug.Assert(_active, "There must be a selection change active when you call SelectionChange.End()");
2319Debug.Assert(_toSelect.Count <= 1, "_toSelect.Count was > 1");
2494Debug.Assert(_active, SR.SelectionChangeNotActive);
2495Debug.Assert(info != null, "parameter info should not be null");
2551Debug.Assert(_active, SR.SelectionChangeNotActive);
2552Debug.Assert(info != null, "info should not be null");
System\Windows\Controls\VirtualizedCellInfoCollection.cs (20)
24Debug.Assert(owner != null, "owner must not be null.");
37Debug.Assert(owner != null, "owner must not be null.");
87Debug.Assert(IsValidCell(cell), "The cell should be valid.");
88Debug.Assert(!Contains(cell), "VirtualizedCellInfoCollection does not support duplicate items.");
471Debug.Assert(left >= 0, "left must be positive.");
472Debug.Assert(top >= 0, "top must be positive.");
473Debug.Assert(width >= 0, "width must be positive.");
474Debug.Assert(height >= 0, "height must be positive.");
491Debug.Assert(value >= 0, "Value must be positive.");
505Debug.Assert(value >= 0, "Value must be positive.");
519Debug.Assert(value >= _left, "Right must be greater than or equal to Left.");
533Debug.Assert(value >= _top, "Bottom must be greater than or equal to Top.");
547Debug.Assert(value >= 0, "Value must be positive.");
561Debug.Assert(value >= 0, "Value must be positive.");
787Debug.Assert(!IsEmpty, "Don't call GetBoundingRegion when IsEmpty is true.");
819Debug.Assert(left <= right, "left should be less than or equal to right.");
820Debug.Assert(top <= bottom, "top should be less than or equal to bottom.");
830Debug.Assert(rowCount > 0, "rowCount should be greater than 0.");
831Debug.Assert(columnCount > 0, "columnCount should be greater than 0.");
1634Debug.Assert(list != null, "list should not be null.");
System\Windows\Controls\VirtualizingStackPanel.cs (73)
402Debug.Assert(!IsPixelBased && IsScrolling &&
479Debug.Assert(IsScrolling, "setting offset on non-scrolling panel");
607Debug.Assert(IsScrolling, "setting offset on non-scrolling panel");
798Debug.Assert(AnchorOperationField.GetValue(this) == null, "There is already a pending AnchorOperation.");
830Debug.Assert(_scrollData._firstContainerInViewport != null, "Must have an anchor element");
856Debug.Assert(AnchorOperationField.GetValue(this) != null, "anchor state is inconsistent");
887Debug.Assert(currFirstContainerInViewport != null, "Cannot find container in viewport");
1142Debug.Assert(!IsPixelBased || !findTopContainer, "find 'top' container only makes sense when item-scrolling");
1699Debug.Assert(IsVirtualizing && InRecyclingMode, "We should only modify the visual order when in recycling mode");
2389Debug.Assert(!adjustToChangeInFirstItem || foundFirstItemInViewport, "This loop should only happen twice at most");
3850Debug.Assert(info != null, "Expected state from previous measure not found");
3958Debug.Assert(IsScrolling && IsVirtualizing, "Only check viewport on scrolling panel when virtualizing");
4353Debug.Assert(retryCount >=0, "retry MeasureCaches too often");
4510Debug.Assert(effectiveOffsetInfo.ScrollGeneration <= scrollGeneration,
4709Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page cacheUnit is not expected here.");
4965Debug.Assert(IsScrolling, "The scrolling panel is the only one that should extend the viewport");
5023Debug.Assert(virtualizationInfoProvider != null, "This method should only be invoked for a virtualizing owner");
5024Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page after cache size is not expected here.");
5652Debug.Assert(itemIndex < items.Count, "index out of range");
5752Debug.Assert(IsVirtualizing, "We should only need to extend the viewport beyond the generated items when virtualizing");
6086Debug.Assert(!containerSize.IsEmpty, "We can't estimate an empty size");
6102Debug.Assert(!IsVSP45Compat, "this method should not be called in VSP45Compat mode");
6170Debug.Assert(!containerSize.IsEmpty, "We can't estimate an empty size");
6382Debug.Assert(parentItemStorageProvider != null || container != null,
6425Debug.Assert(!IsVSP45Compat, "SetItemsHostInset should not be called in VSP45-compat mode");
6461Debug.Assert(false, "SetInset should only be called for a container");
6606Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page cacheUnit is not expected here.");
6816Debug.Assert(virtualizingChild != null, "This method should only be invoked for a virtualizing child");
7254Debug.Assert(DoubleUtil.AreClose(pixelSizeInViewport + pixelSizeBeforeViewport + pixelSizeAfterViewport, childPixelSize.Width), "The computed sizes within and outside the viewport should add up to the childPixelSize.");
7346Debug.Assert(DoubleUtil.AreClose(pixelSizeInViewport + pixelSizeBeforeViewport + pixelSizeAfterViewport, childPixelSize.Height), "The computed sizes within and outside the viewport should add up to the childPixelSize.");
7441Debug.Assert(IsVSP45Compat, "this method should only be called in VSP45Compat mode");
7447Debug.Assert(evaluateAreContainersUniformlySized || !computedAreContainersUniformlySized, "AreContainersUniformlySized starts off true and can only be flipped to false.");
7593Debug.Assert(!IsVSP45Compat, "this method should not be called in VSP45Compat mode");
7599Debug.Assert(evaluateAreContainersUniformlySized || !computedAreContainersUniformlySized, "AreContainersUniformlySized starts off true and can only be flipped to false.");
7882Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available.");
7883Debug.Assert(item != null, "An item must be available.");
7907Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available.");
7908Debug.Assert(item != null, "An item must be available.");
7951Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available.");
7952Debug.Assert(item != null, "An item must be available.");
8009Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available.");
8010Debug.Assert(item != null, "An item must be available.");
8732Debug.Assert(container != null, "Null container was generated");
8777Debug.Assert(children[visualTreeIndex] != null, "MoveVisualChild interprets a null destination as 'move to end'");
8902Debug.Assert(!children.Contains(child), "we incorrectly identified a recycled container");
8923Debug.Assert(child == InternalChildren[childIndex], "Wrong child was generated");
8945Debug.Assert(args.ItemUICount == args.ItemCount, "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0.");
8955Debug.Assert(child != null, "Null child was generated");
8956Debug.Assert(!newlyRealized, "newlyRealized should be false after Replace");
8985Debug.Assert((itemCount == itemUICount) || (itemUICount == 0), "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0.");
9026Debug.Assert(IsVirtualizing, "Can't clean up containers if not virtualizing");
9027Debug.Assert(itemsControl != null, "We can't cleanup if we aren't the itemshost");
9172Debug.Assert(InRecyclingMode, "This method only applies to recycling mode");
9191Debug.Assert(IsVirtualizing && InRecyclingMode, "Realized children only exist when recycling");
9192Debug.Assert(_realizedChildren != null, "Realized children must exist to verify it");
9205Debug.Assert(!_realizedChildren.Contains(child), "_realizedChildren should not contain recycled containers");
9211Debug.Assert(_realizedChildren[position.Index] == child, "_realizedChildren is corrupt!");
9223Debug.Assert(_realizedChildren.Count == children.Count, "Realized and visual children must match");
9227Debug.Assert(_realizedChildren[i] == children[i], "Realized and visual children must match");
9257Debug.Assert(false, "We should have found a child");
9373Debug.Assert(!InRecyclingMode, "This method only applies to standard virtualization");
9441Debug.Assert(children == _realizedChildren, "the given child list must be the _realizedChildren list when recycling");
9587Debug.Assert(IsScrolling, "ScrollData must only be set on a scrolling panel.");
9714Debug.Assert(DoubleUtil.AreClose(viewportSize.Width - Math.Floor(viewportSize.Width), 0.0), "The viewport size must not contain fractional values when in item scrolling mode.");
9715Debug.Assert(DoubleUtil.AreClose(extentSize.Width - Math.Floor(extentSize.Width), 0.0), "The extent size must not contain fractional values when in item scrolling mode.");
9719Debug.Assert(DoubleUtil.AreClose(viewportSize.Height - Math.Floor(viewportSize.Height), 0.0), "The viewport size must not contain fractional values when in item scrolling mode.");
9720Debug.Assert(DoubleUtil.AreClose(extentSize.Height - Math.Floor(extentSize.Height), 0.0), "The extent size must not contain fractional values when in item scrolling mode.");
10438Debug.Assert(IsScrolling, "ScrollData must only be set on a scrolling panel.");
10563Debug.Assert(DoubleUtil.AreClose(viewportSize.Width - Math.Floor(viewportSize.Width), 0.0), "The viewport size must not contain fractional values when in item scrolling mode.");
10564Debug.Assert(DoubleUtil.AreClose(extentSize.Width - Math.Floor(extentSize.Width), 0.0), "The extent size must not contain fractional values when in item scrolling mode.");
10568Debug.Assert(DoubleUtil.AreClose(viewportSize.Height - Math.Floor(viewportSize.Height), 0.0), "The viewport size must not contain fractional values when in item scrolling mode.");
10569Debug.Assert(DoubleUtil.AreClose(extentSize.Height - Math.Floor(extentSize.Height), 0.0), "The extent size must not contain fractional values when in item scrolling mode.");
12213Debug.Assert(tracer != null, "Trace called when not tracing");
System\Windows\Input\KeyboardNavigation.cs (18)
495Debug.Assert(adornedElement != null, "adornedElement should not be null");
496Debug.Assert(focusVisualStyle != null, "focusVisual should not be null");
512Debug.Assert(adornedElement != null, "adornedElement should not be null");
513Debug.Assert(adornedElementParent != null, "adornedElementParent should not be null");
514Debug.Assert(contentHostParent != null, "contentHostParent should not be null");
515Debug.Assert(contentHostParent is Visual, "contentHostParent should be Visual");
516Debug.Assert(focusVisualStyle != null, "focusVisual should not be null");
979Debug.Assert(currentElement != null, "currentElement should not be null");
1339Debug.Assert(container != null, "container cannot be null");
1790Debug.Assert(e != null, "e should not be null");
1791Debug.Assert(container != null, "container should not be null");
1869Debug.Assert(e != null, "e cannot be null");
2083Debug.Assert(container != null, "container should not be null");
2119Debug.Assert(IsTabStopOrGroup(nextTabElement), "nextTabElement should be IsTabStop or group");
2258Debug.Assert(e != null || container != null, "e or container should not be null");
2637Debug.Assert(sourceElement != null, "sourceElement must not be null");
2887Debug.Assert(!(sourceElement == null && container == null), "Both sourceElement and container cannot be null");
2892Debug.Assert(container != null, "container cannot be null");
System\Windows\Interop\ActiveXHost.cs (20)
218Debug.Assert(args.Key.Length > 0, "got an empty access key");
410Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Failed transition");
415Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Failed transition");
420Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Failed transition");
425Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.UIActive, "Failed transition");
466Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Failed transition");
471Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Failed transition");
476Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Failed transition");
481Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Passive, "Failed transition");
552Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Passive, "Wrong start state to transition from");
557Debug.Assert(_axInstance == null, "_axInstance must be null");
560Debug.Assert(_axInstance != null, "w/o an exception being thrown we must have an object...");
575Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Wrong start state to transition from");
609Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Wrong start state to transition from");
634Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Wrong start state to transition from");
651Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Wrong start state to transition from");
678Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Wrong start state to transition from");
693Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Wrong start state to transition from");
706Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.UIActive, "Wrong start state to transition from");
942Debug.Assert(_axInstance != null, "The native control is null");
System\Windows\Markup\BamlRecordReader.cs (10)
227Debug.Assert(false == XamlReaderStream.IsWriteComplete,
1201Debug.Assert(!CurrentContext.CheckFlag(ReaderFlags.NeedToAddToTree), "Failed to add Element to tree before popping stack");
1498Debug.Assert(param != null && paramList == null, "Must have a single param");
1512Debug.Assert(param == null && paramList != null, "Must have a paramList");
1886Debug.Assert(staticResourceValues != null, "Must have a list of StaticResourceValues for lookup");
1959Debug.Assert(staticResourceValues != null, "Must have a list of StaticResourceValues for lookup");
2227Debug.Assert(element is DependencyObject, "Guaranteed by PropertyDefinition constructor");
2697Debug.Assert( attributeUsage == BamlAttributeUsage.XmlSpace,
3441Debug.Assert( CurrentContext.ObjectData == null && CurrentContext.ExpectedType != null,
4987Debug.Assert(false, "The only remaining option is attached property, which is not allowed in xaml for content properties");
System\Windows\Markup\BamlRecords.cs (21)
688Debug.Assert(false,"Assembly, Type and Attribute records are not cached, so don't ask for one.");
713Debug.Assert(false,"Unknown RecordType");
856set { Debug.Assert (value == -1, "Setting fixed record to an invalid size"); }
865Debug.Assert(false, "Must override RecordType");
1501Debug.Assert(_valuePositionPosition != -1,
1684Debug.Assert(_valuePositionPosition != -1,
2049set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2119set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2180set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2407set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
2796Debug.Assert (false, "Unknown custom serializer");
2984set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
3198set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3285set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3434Debug.Assert(_contentSizePosition != -1,
3479set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3639set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3737set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3815set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
4000Debug.Assert(FilePos != -1,"UpdateWrite called but Write Never was");
4696Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo)
System\Windows\Markup\BamlRecordWriter.cs (11)
464Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
563Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
599Debug.Assert(!InStaticResourceSection, "We do not support x:Shared within a StaticResource Section");
783Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
839Debug.Assert(keyRecord.RecordList.Count == 0, "Should have empty record list");
865Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
1627Debug.Assert(keyRecord != null, "Unknown key record type in defer load dictionary");
1635Debug.Assert(keyIndex == _deferKeys.Count,
1658Debug.Assert(_deferElementDepth > 0 && CollectingValues,
1666Debug.Assert(valueDeferRecord.Record != null &&
1678Debug.Assert(valueDeferRecord.Record != null && valueDeferRecord.Record.RecordType == BamlRecordType.ElementEnd,
System\Windows\Markup\XamlStream.cs (14)
75Debug.Assert(!WriteComplete,"Write called after close");
77Debug.Assert(null != buffer,"Null buffer past to the Writer");
89Debug.Assert(null != writeBuffer,"Null writeBuffer returned");
109Debug.Assert(0 < bufferWriteCount,"Not writing any bytes to the buffer");
114Debug.Assert(bufferOffset < BufferSize,"Trying to Read past bufer");
180Debug.Assert(!WriteComplete,"UpdateReaderLength called after close");
225Debug.Assert(bufferOffset < BufferSize,"Calculated bufferOffset is greater than buffer");
245Debug.Assert(0 < bufferReadCount,"Not reading any bytes to the buffer");
250Debug.Assert(bufferOffset < BufferSize,"Trying ot read past buffer");
373Debug.Assert(bufferOffset < BufferSize,"Calculated bufferOffset is greater than buffer");
378Debug.Assert(bufferArray.Count == bufferIndex,"Need to allocate more than one buffer");
379Debug.Assert(false == reader,"Allocating a buffer on Read");
784Debug.Assert(false,"Close called on ReaderStream");
792Debug.Assert(false,"Flush called on ReaderStream");
System\Windows\Markup\XamlTypeMapper.cs (26)
817Debug.Assert(null != attribInfo, "null attribInfo");
818Debug.Assert(null != currentParentType, "null currentParentType");
936Debug.Assert(null != localName, "null localName");
937Debug.Assert(null != xmlNamespace, "null xmlNamespace");
1588Debug.Assert(null != eventName, "null eventName");
1589Debug.Assert(null != owner, "null owner");
1633Debug.Assert(null != localName, "null localName");
1634Debug.Assert(null != xmlNamespace, "null xmlNamespace");
1671Debug.Assert(null != baseType, "baseType not set");
1764Debug.Assert(null != localName, "null localName");
1765Debug.Assert(null != xmlNamespace, "null xmlNamespace");
1907Debug.Assert(typeInfo != null, "Must have cached type info at this point");
2399Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace");
2400Debug.Assert(null != localName,"null value passed for localName");
2438Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace");
2439Debug.Assert(null != localName,"null value passed for localName");
2591Debug.Assert(namespaceMap.ClrNamespace != null,"Null CLR Namespace");
2592Debug.Assert(localName != null,"Null localName");
3441Debug.Assert(null != type, "Null passed for type to GetTypeConverterType");
3472Debug.Assert(null != type, "Null passed for type to GetTypeConverter");
3516Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverterType");
3560Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverter");
3679Debug.Assert(_constructors != null, "This operation is legal only after the constructors have been fetched");
3745Debug.Assert(null != type, "null value for type passed to GetWhitespace");
3757Debug.Assert(1 == trimAttribute.Length,"More than one TrimWhitespace Attribute");
4007Debug.Assert(_dpLookupHashtable != null,
System\Windows\Navigation\NavigationService.cs (15)
90Debug.Assert(e != null, "Hyperlink fired Navigate event with null NavigateEventArgs");
103Debug.Assert(dobj != null, "RequestNavigateEventArgs.OriginalSource should be DependencyObject");
238Debug.Assert(_bp != null, "NavigationService should not handle a nav from a hyperlink thats not in its hosted tree");
612Debug.Assert(ChildNavigationServices.Contains(ncChild), "Child NavigationService must already exist");
672Debug.Assert(fe != null, "INavigatorHost needs to be FrameworkElement");
1105Debug.Assert(bpu == null ||
1135Debug.Assert(navMode == NavigationMode.Refresh,
1897Debug.Assert(PendingNavigationList.Count == 0,
2007Debug.Assert(this.Application != null &&
2059Debug.Assert(source == null ||
2109Debug.Assert(PendingNavigationList.Count == 0,
2119Debug.Assert(_navigateQueueItem == null, "Previous nav queue item should be cleared by now.");
3049Debug.Assert(navigationMode == NavigationMode.New ||
3662Debug.Assert(_navigateQueueItem == null,
4458Debug.Assert(node != null, "Trying to dispose a null Logical Tree Node");
System\Windows\StyleHelper.cs (40)
707Debug.Assert(freezable.IsFrozen, "Freezable within a Style or Template should have been frozen by now");
1125Debug.Assert(action.IsSealed, "TriggerAction should have already been sealed by this point.");
1494Debug.Assert((container is FrameworkElement) || (container is FrameworkContentElement), "Caller has queried with non-framework element. Bad caller, bad!");
1495Debug.Assert(dataType < InstanceStyleData.ArraySize, "Caller has queried using a value outside the range of the Enum. Bad caller, bad!");
1598Debug.Assert(!freezable.CanFreeze, "If a freezable could have been frozen it would have been done by now.");
1625Debug.Assert(instanceValues != null, "InstanceValues hashtable should have been created at initialization time.");
1810Debug.Assert(treeRoot is FrameworkElement || treeRoot is FrameworkContentElement,
1858Debug.Assert(treeRoot == null || treeRoot is FrameworkElement || treeRoot is FrameworkContentElement,
1886Debug.Assert( feContainer._buildVisualTreeVerification == VerificationState.WaitingForBuildVisualTree,
1894Debug.Assert(frameworkTemplate != null, "Only FrameworkTemplate has the ability to build a VisualTree by this means");
1906Debug.Assert( feContainer._buildVisualTreeVerification == VerificationState.WaitingForBuildVisualTreeCompletion,
1911Debug.Assert( feContainer._buildVisualTreeVerification == VerificationState.WaitingForAddCustomTemplateRoot,
1946Debug.Assert( container._buildVisualTreeVerification != VerificationState.WaitingForBuildVisualTreeCompletion,
1948Debug.Assert( container._buildVisualTreeVerification == VerificationState.WaitingForAddCustomTemplateRoot,
1969Debug.Assert( null == VisualTreeHelper.GetParent(child),
2057Debug.Assert( feWalkNode != null || fceWalkNode != null,
2130Debug.Assert(feContainer != null || fceContainer != null,
2149Debug.Assert(templatedChildren.Count > 0,
2390Debug.Assert(sender is FrameworkElement || sender is FrameworkContentElement,
2445Debug.Assert(sender is FrameworkElement || sender is FrameworkContentElement,
2479Debug.Assert(templatedParentTemplate != null, "Must have a VisualTree owner");
2524Debug.Assert(action.ContainingTrigger is EventTrigger,
2615Debug.Assert(child.IsValid, "child should either be an FE or an FCE");
2967Debug.Assert(value != NotYetApplied, "attempt to retrieve instance value that was never set");
3486Debug.Assert( oldTemplate == null || oldTemplate is FrameworkTemplate,
3488Debug.Assert( newTemplate == null || newTemplate is FrameworkTemplate,
3490Debug.Assert( (oldTemplate == null || newTemplate == null ) ||
4082Debug.Assert(styledChildren != null, "Should reach here only if the template tree has already been created");
4211Debug.Assert(dp != null, "dp must not be null");
4443Debug.Assert( triggerBase is MultiDataTrigger,
4479Debug.Assert( triggerBase is MultiTrigger,
4822Debug.Assert(!(action.ContainingTrigger is EventTrigger),
4838Debug.Assert( trigger.Property == changedProperty,
4845Debug.Assert( frameworkTemplate != null,
4853Debug.Assert( conditions != null && conditions.Length == 1,
4883Debug.Assert( conditions != null && conditions.Length == 1,
4916Debug.Assert( frameworkTemplate != null,
4927Debug.Assert(evaluationNode != null,
4989Debug.Assert( evaluationBinding != null,
5803Debug.Assert(false, "GetHashCode for value types will use reflection to generate the hashcode. Write a better hash code generation algorithm if this struct is to be used in a hashtable, or remove this assert if it's decided that reflection is OK.");
System\Windows\TreeWalkHelper.cs (14)
40Debug.Assert(fe != null || fce != null, "Node with the tree change notification must be an FE or an FCE.");
41Debug.Assert(parent != null, "Must have a parent that the current node is connected to or disconnected from.");
242Debug.Assert(fe != null || fce != null, "Must have non-null current node");
265Debug.Assert(inheritableProperty.IsPotentiallyInherited, "if we got here, it means that this property is inheritable by someone");
282Debug.Assert(!currentInheritableProperties.Contains(inheritableProperty), "InheritableProperties list should not have duplicates");
317Debug.Assert(d != null, "Must have non-null current node");
320Debug.Assert(fMetadata.IsInherited == true, "This must be an inherited dependency property");
323Debug.Assert(!wasSelfInheritanceParent || isSelfInheritanceParent, "IsSelfInheritanceParent changed from true to false");
454Debug.Assert(fe != null || fce != null, "Node with the resources change notification must be an FE or an FCE.");
523Debug.Assert(d != null, "Must have non-null current node");
685Debug.Assert(d != null, "Must have non-null current node");
748Debug.Assert(d != null, "Must have non-null current node");
910Debug.Assert(fo.IsValid, "Node with the resources change notification must be an FE or an FCE.");
942Debug.Assert(d != null, "Must have non-null current node");
System\Windows\Window.cs (40)
337Debug.Assert(_threadWindowHandles == null, "_threadWindowHandles must be null before enumerating the thread windows");
1366Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull cannot be true when _showingAsDialog is true");
3020Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull cannot be true when calling this function");
3247Debug.Assert(Manager != null, "HwndStyleManager must have a valid value here");
3580Debug.Assert(w != null, "Target must be of type Window.");
3603Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point");
3626Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point");
3763Debug.Assert(IsSourceWindowNull == false, "_swh should not be null here");
3913Debug.Assert(workAreaWidthDeviceUnits >= 0, string.Create(CultureInfo.InvariantCulture, $"workAreaWidth ({hMonitor})for monitor ({workAreaWidthDeviceUnits}) is negative"));
3914Debug.Assert(workAreaHeightDeviceUnits >= 0, string.Create(CultureInfo.InvariantCulture, $"workAreaHeight ({hMonitor}) for monitor ({workAreaHeightDeviceUnits}) is negative"));
3924Debug.Assert(IsSourceWindowNull == false, "_swh should not be null here");
4053Debug.Assert(false, "Invalid value for ResizeMode");
4428Debug.Assert(_showingAsDialog == true, "_showingAsDialog must be true when DoDialogHide is called");
4469Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point");
4510Debug.Assert(ownedWindows.Count == 0, "All owned windows should now be gone");
5068Debug.Assert(w != null, "DependencyObject must be of type Window.");
5094Debug.Assert(w != null, "DependencyObject must be of type Window.");
5113Debug.Assert(w != null, "DependencyObject must be of type Window.");
5173Debug.Assert(w != null, "DependencyObject must be of type Window.");
5300Debug.Assert(w != null, "DependencyObject must be of type Window.");
5320Debug.Assert(w != null, "DependencyObject must be of type Window.");
5581Debug.Assert(_dispatcherFrame == null, "_dispatcherFrame must be null here");
5640Debug.Assert(w != null, "DependencyObject must be of type Window.");
5651Debug.Assert(w != null, "DependencyObject must be of type Window.");
5711Debug.Assert(w != null, "d must be typeof Window");
5734Debug.Assert(w != null, "d must be typeof Window");
5773Debug.Assert(w != null, "d must be typeof Window");
5811Debug.Assert(w != null, "d must be typeof Window");
5832Debug.Assert(w != null, "d must be typeof Window");
5873Debug.Assert(w != null, "d must be typeof Window");
6103Debug.Assert( w != null, "DependencyObject must be of type Window." );
6178Debug.Assert( w != null, "DependencyObject must be of type Window." );
6235Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull cannot be true when calling this function");
6257Debug.Assert( w != null, "DependencyObject must be of type Window." );
6289Debug.Assert(w != null, "DependencyObject must be of type Window.");
7446Debug.Assert(IsSourceWindowNull != true, "IsSourceWindowNull cannot be true here");
7537Debug.Assert( IsSourceWindowNull == false , "Should only be invoked when we know Handle is non-null" );
7547Debug.Assert( IsSourceWindowNull == false , "Should only be invoked when we know Handle is non-null" );
7572Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull can't be true here");
7591Debug.Assert( IsSourceWindowNull == false , "IsSourceWindowNull can't be true here");
PresentationFramework.Aero (3)
PresentationFramework.Aero2 (3)
PresentationFramework.AeroLite (3)
PresentationFramework.Classic (21)
Microsoft\Windows\Themes\ClassicBorderDecorator.cs (18)
232Debug.Assert(rgbColor.Red >= 0 && rgbColor.Red <= 1, "Red must be between 0 and 1.");
233Debug.Assert(rgbColor.Green >= 0 && rgbColor.Green <= 1, "Green must be between 0 and 1.");
234Debug.Assert(rgbColor.Blue >= 0 && rgbColor.Blue <= 1, "Blue must be between 0 and 1.");
296Debug.Assert(hue >= 0 && hue <= 1, "Output hue should be between 0 and 1.");
297Debug.Assert(lightness >= 0 && lightness <= 1, "Output lightness should be between 0 and 1.");
298Debug.Assert(saturation >= 0 && saturation <= 1, "Output saturation should be between 0 and 1.");
300Debug.Assert(!isHueDefined || isSaturationDefined, "If hue is defined, saturation must also be defined.");
312Debug.Assert(hlsColor.Lightness >= 0 && hlsColor.Lightness <= 1, "Lightness must be between 0 and 1.");
313Debug.Assert(hlsColor.Saturation >= 0 && hlsColor.Saturation <= 1, "Saturation must be between 0 and 1.");
338Debug.Assert(red >= 0 && red <= 1, "Output red should be between 0 and 1.");
339Debug.Assert(green >= 0 && green <= 1, "Output green should be between 0 and 1.");
340Debug.Assert(blue >= 0 && blue <= 1, "Output blue should be between 0 and 1.");
347Debug.Assert(n1 >= 0 && n1 <= 1, "n1 must be between 0 and 1.");
348Debug.Assert(n2 >= 0 && n2 <= 1, "n2 must be between 0 and 1.");
349Debug.Assert(hue >= -6 && hue < 12, "Hue must be between -6 (inclusive) and 12 (exclusive).");
1155Debug.Assert(_tabCache != null, "_tabCache is null. GetShadow1 should only be called after GetHighlight1");
1168Debug.Assert(_tabCache != null, "_tabCache is null. GetHighlight2 should only be called after GetHighlight1");
1181Debug.Assert(_tabCache != null, "_tabCache is null. GetHighlight2 should only be called after GetHighlight1");
PresentationFramework.Luna (3)
PresentationFramework.Royale (3)
PresentationUI (5)
ReachFramework (80)
AlphaFlattener\BrushProxy.cs (37)
164Debug.Assert(pen != null, "pen expected");
165Debug.Assert(brush != null, "brush expected");
188Debug.Assert(_brush.BrushList == null, "Simple brush expected");
270Debug.Assert(pen != null, "pen expected");
271Debug.Assert(pen.Brush != null, "pen expected to have a brush");
303Debug.Assert(pen != null, "pen expected");
304Debug.Assert(pen.Brush != null, "pen expected to have a brush");
541Debug.Assert(bp._opacityOnly == _opacityOnly, "Brush and OpacityMask can't mix in a single list");
669Debug.Assert(Utility.IsRenderVisible(vb), "TileBrush.Viewbox area must be positive");
676Debug.Assert(false, "IsOpaque(" + _brush.GetType() + ") not handled");
736Debug.Assert(Utility.IsRenderVisible(vb), "TileBrush.Viewbox must be visible");
772Debug.Assert(false, "IsTransparent not handled " + _brush.GetType());
1076Debug.Assert(false, "Unexpected brush type");
1249Debug.Assert(drawingBrush.Drawing != null, "DrawingBrush where Drawing == null should've been culled");
1315Debug.Assert(_drawing != null, "_drawing primitive changed, but it's null");
1934Debug.Assert(false, "Unhandled GradientBrush type");
2131Debug.Assert(b._brush is SolidColorBrush, "SolidColorBrush expected");
2132Debug.Assert(!b._opacityOnly, "OpacityMask not expected");
2144Debug.Assert(first, "prefix only");
2372Debug.Assert(bp != null, "Blending visible ImageBrush with another brush should yield non-empty brush");
2649Debug.Assert(brush != null, "null brush");
2692Debug.Assert(gb.MappingMode == BrushMappingMode.Absolute, "absolute brush");
2700Debug.Assert(tb.ViewportUnits == BrushMappingMode.Absolute, "absolute brush required for BrushProxy");
2890Debug.Assert(false, "Unhandled GradientBrush type");
2915Debug.Assert(false, "Unandled Brush type");
2945Debug.Assert(gsc != null && gsc.Count > 0, "BrushProxy.IsEmpty should return true upon GradientBrush with zero stops");
2986Debug.Assert(!bounds.IsEmpty, "Bounds must not be empty for BitmapCacheBrush");
3064Debug.Assert(!bounds.IsEmpty, "Bounds must not be empty for VisualBrush");
3204Debug.Assert(false, "Unhandled ImageBrush.ImageSource type");
3259Debug.Assert(brushB.Brush != null, "null brush not expected");
3346Debug.Assert(false, "Brush type not expected");
3371Debug.Assert(Utility.NormalizeOpacity(value) == value, "BrushProxy.Opacity must always be normalized");
3499Debug.Assert(false, "Unexpected brush type");
3619Debug.Assert(false, "Single brush expected");
3644Debug.Assert(
3711Debug.Assert(Utility.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
4180Debug.Assert(Utility.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
AlphaFlattener\DrawingContext.cs (11)
252Debug.Assert(b != null, "LinearGradientBrush expected");
375Debug.Assert(b != null, "RadialGradientBrush expected");
496Debug.Assert(one.BrushList.Count == 2, "Only two brushes allowed here");
598Debug.Assert(brush != null, "brush expected");
599Debug.Assert(shape != null, "shape expected");
600Debug.Assert(!_costing, "in costing mode DrawImage");
683Debug.Assert(false, "Opacity invalid at BrushProxyDecomposer");
688Debug.Assert(false, "Opacity invalid at BrushProxyDecomposer");
693Debug.Assert(brushTrans.IsIdentity, "brushTrans not supported");
722Debug.Assert(pen == null, "no pen");
930Debug.Assert(!_costing, "in costing mode DrawyGlyphs");
Replay (7)
Roslyn.Test.PdbUtilities (1)
SemanticSearch.BuildTask (1)
Shared (1)
System.CodeDom (4)
System.Collections (12)
System.Collections.Concurrent (15)
System.Collections.Immutable (12)
System.Collections.NonGeneric (1)
System.ComponentModel.Annotations (4)
System.ComponentModel.EventBasedAsync (1)
System.ComponentModel.TypeConverter (70)
System\ComponentModel\MaskedTextProvider.cs (14)
635Debug.Assert(AssignedEditPositionCount >= 0, "Invalid count of assigned chars.");
647Debug.Assert(AssignedEditPositionCount >= 0, "Invalid count of assigned chars.");
1266Debug.Assert(input != null && position >= 0 && position < _testString.Length, "input param out of range.");
1554Debug.Assert(startPosition >= 0 && startPosition <= endPosition && endPosition < _testString.Length, "Out of range input value.");
1946Debug.Assert(AssignedEditPositionCount >= 0, "Invalid count of assigned chars.");
1956Debug.Assert(startPosition >= 0 && endPosition >= 0 && endPosition >= startPosition && endPosition < _testString.Length, "position out of range.");
2025Debug.Assert(position >= 0 && position < _testString.Length, "Position out of range.");
2037Debug.Assert(position >= 0 && position < _testString.Length, "Position out of range.");
2038Debug.Assert(charDescriptor != null, "Null character descriptor.");
2051Debug.Assert(!IsLiteralPosition(charDex), "Setting char in literal position.");
2084Debug.Assert(AssignedEditPositionCount <= EditPositionCount, "Invalid count of assigned chars.");
2162Debug.Assert(position >= 0 && position < _testString.Length, "Position out of range.");
2420Debug.Assert(input != null, "null input.");
2421Debug.Assert(position >= 0, "Position out of range.");
System\ComponentModel\TypeDescriptor.cs (16)
846Debug.Assert(converter != null, "Unexpected null TypeConverter.");
856Debug.Assert(converter != null, "Unexpected null TypeConverter.");
1649Debug.Assert(type != null, "Caller should validate");
1737Debug.Assert(instance != null, "Caller should validate");
1836Debug.Assert(target.Next == null, "Delegating provider should always be the last provider in the chain.");
1876Debug.Assert(pipelineType != PIPELINE_ATTRIBUTES, "PipelineAttributeFilter is not supported for attributes");
1966Debug.Assert(cache == null || list == null || !cache.Contains(s_pipelineFilterKeys[pipelineType]), "Earlier pipeline stage should have removed our cache");
2024Debug.Assert(suffix != null, "Name collision with non-extender property.");
2927Debug.Assert(newAttrs[idx] != null, "_attributes contains a null member");
3094Debug.Assert(attrs != null, "Someone should have handled this");
3105Debug.Assert(className != null, "Someone should have handled this");
3125Debug.Assert(converter != null, "Someone should have handled this");
3167Debug.Assert(events != null, "Someone should have handled this");
3179Debug.Assert(events != null, "Someone should have handled this");
3191Debug.Assert(properties != null, "Someone should have handled this");
3205Debug.Assert(properties != null, "Someone should have handled this");
System.Composition.Hosting (2)
System.Configuration.ConfigurationManager (91)
System\Configuration\BaseConfigurationRecord.cs (26)
454Debug.Assert(inputsPerConfigKey.Count > 0, "We won't get here unless we have inputs.");
546Debug.Assert(!_parent.IsInitDelayed, "!_parent.IsInitDelayed");
652Debug.Assert(!sectionRecord.HasIndirectLocationInputs,
777Debug.Assert(requestIsHere || !checkPermission, "requestIsHere || !checkPermission");
780Debug.Assert(getRuntimeObject, "getRuntimeObject == true");
781Debug.Assert(requestIsHere, "requestIsHere == true");
797Debug.Assert(!sectionRecord.HasErrors, "!sectionRecord.HasErrors");
944Debug.Assert(factoryRecord != null, "factoryRecord != null");
957Debug.Assert(factoryRecord != null, "factoryRecord != null");
963Debug.Assert(!checkPermission || (factoryRecord != null),
1016Debug.Assert(success || getLkg, "success || getLkg");
1020Debug.Assert(getLkg, "getLkg == true");
1049Debug.Assert(!requestIsHere, "!requestIsHere");
1089Debug.Assert(getLkg, "getLkg == true");
1162Debug.Assert(!factoryRecord.HasErrors, "!factoryRecord.HasErrors");
1165Debug.Assert(sectionRecord.HasInput, "sectionRecord.HasInput");
1173Debug.Assert(!(IsLocationConfig && getLkg),
1183Debug.Assert(!sectionRecord.HasErrors, "!sectionRecord.HasErrors");
1223Debug.Assert(IsLocationConfig,
1276Debug.Assert((locationInputs != null) || (indirectLocationInputs != null),
1297Debug.Assert(getLkg, "getLkg == true");
1612Debug.Assert(_protectedConfig != null,
1674Debug.Assert(tConfigRecord._parent.IsRootConfig,
1728Debug.Assert(!rootFactoryRecord.HasErrors, "!rootFactoryRecord.HasErrors");
2622Debug.Assert(!positionedAtNextElement, "!positionedAtNextElement");
3668Debug.Assert(factoryRecord.HasErrors,
System\Configuration\MgmtConfigurationRecord.cs (25)
342Debug.Assert(input.HasResult, "input.HasResult");
349Debug.Assert(IsLocationConfig, "Indirect location inputs exist only in location config record");
352Debug.Assert(input.HasResult, "input.HasResult");
381Debug.Assert(!current.IsRootConfig, "An immediate parent result should have been found");
965Debug.Assert(filename.Length > 0, "The caller should make sure that filename is not empty");
1397Debug.Assert(!factoryRecord.IsUndeclared, "!factoryRecord.IsUndeclared");
1398Debug.Assert(!IsImplicitSection(factoryRecord.ConfigKey),
1427Debug.Assert(!IsImplicitSection(sectionRecord.ConfigKey),
1429Debug.Assert(!factoryRecord.IsUndeclared, "!factoryRecord.IsUndeclared");
1799Debug.Assert(sectionRecord.HasFileInput || sectionRecord.HasLocationInputs,
1821Debug.Assert(sectionRecord.HasFileInput || sectionRecord.HasLocationInputs,
1984Debug.Assert(!IsImplicitSection(configKey), "We should never write out an implicit section");
2080Debug.Assert(IsLocationConfig, "IsLocationConfig");
2209Debug.Assert((reader.NodeType == XmlNodeType.Element) && (reader.Name == ConfigurationTag),
2270Debug.Assert(
2345Debug.Assert(
2350Debug.Assert(!l.SectionUpdates.HasUnretrievedSections(),
2410Debug.Assert(!IsImplicitSection(configKey), "We should never write out an implicit section");
2469Debug.Assert(!IsImplicitSection(configKey), "We should never write out an implicit section");
2551Debug.Assert(groupUpdate.UpdatedXml == null, "groupUpdate.UpdatedXml == null");
2552Debug.Assert(!declarationUpdatesChild.HasUnretrievedSections(),
2638Debug.Assert(locationPathApplies, nameof(locationPathApplies));
2731Debug.Assert(allowOverrideAttribute == null,
2983Debug.Assert(update.SectionRecord.HasFileInput, "update.SectionRecord.HasFileInput");
3024Debug.Assert(hasFile, "hasFile");
System.Console (5)
System.Data.Common (553)
System\Data\Common\DataStorage.cs (11)
142Debug.Assert(storageType == GetStorageType(type), "Incorrect storage type specified");
297Debug.Assert(typeCode == GetStorageType(dataType), "Incorrect storage type specified");
465Debug.Assert(result == dataType.IsValueType, "typeCode mismatches dataType");
478Debug.Assert(typeCode == GetStorageType(dataType), "typeCode mismatches dataType");
505Debug.Assert(nullable == typeof(INullable).IsAssignableFrom(dataType), "INullable");
506Debug.Assert(changeTracking == typeof(System.ComponentModel.IChangeTracking).IsAssignableFrom(dataType), "IChangeTracking");
507Debug.Assert(revertibleChangeTracking == typeof(System.ComponentModel.IRevertibleChangeTracking).IsAssignableFrom(dataType), "IRevertibleChangeTracking");
508Debug.Assert(xmlSerializable == typeof(IXmlSerializable).IsAssignableFrom(dataType), "IXmlSerializable");
513Debug.Assert(dataType != null, "Type should not be null");
524Debug.Assert(typeCode == GetStorageType(dataType), "typeCode mismatches dataType");
595Debug.Assert(null != type, "null type");
System\Data\Common\DbDataAdapter.cs (22)
775Debug.Assert(DbType.Int32 == parameter.DbType, "unexpected DbType");
937Debug.Assert(null != tableMapping, "null TableMapping when MissingMappingAction.Error");
966Debug.Assert((null != dataRows) && (0 < dataRows.Length), "Update: bad dataRows");
967Debug.Assert(null != tableMapping, "Update: bad DataTableMapping");
1451Debug.Assert(null == rowUpdatedEvent.Errors, "Continue - but contains an exception");
1462Debug.Assert(null != connection, "unexpected null connection");
1497Debug.Assert(null != rowUpdatedEvent, "null rowUpdatedEvent");
1498Debug.Assert(null != dataCommand, "null dataCommand");
1499Debug.Assert(rowUpdatedEvent.Command == dataCommand, "dataCommand differs from rowUpdatedEvent");
1585Debug.Assert(null == rowUpdatedEvent.Errors, "Continue - but contains an exception");
1597Debug.Assert(null != rowUpdatedEvent, "null rowUpdatedEvent");
1619Debug.Assert(null != batchCommands, "null batchCommands?");
1638Debug.Assert(null != row, "null dataRow?");
1654Debug.Assert(null != batchCommands, "null batchCommands?");
1670Debug.Assert(null != row, "null dataRow?");
1706Debug.Assert(null != batchCommands, "null batchCommands?");
1713Debug.Assert(null != row, "null dataRow?");
1724Debug.Assert(null != dataRow, "null dataRow");
1771Debug.Assert(null != command, "GetConnection3: null command");
1772Debug.Assert(!string.IsNullOrEmpty(method), "missing method name");
1783Debug.Assert(null != command, "GetConnection4: null command");
1824Debug.Assert(null != connection, "QuietOpen: null connection");
System\Data\Common\SQLConvert.cs (16)
14Debug.Assert(value != null, "null argument in ConvertToSqlByte");
32Debug.Assert(value != null, "null argument in ConvertToSqlInt16");
51Debug.Assert(value != null, "null argument in ConvertToSqlInt32");
74Debug.Assert(value != null, "null argument in ConvertToSqlInt64");
99Debug.Assert(value != null, "null argument in ConvertToSqlDouble");
132Debug.Assert(value != null, "null argument in ConvertToSqlDecimal");
162Debug.Assert(value != null, "null argument in ConvertToSqlSingle");
193Debug.Assert(value != null, "null argument in ConvertToSqlMoney");
223Debug.Assert(value != null, "null argument in ConvertToSqlDateTime");
241Debug.Assert(value != null, "null argument in ConvertToSqlBoolean");
259Debug.Assert(value != null, "null argument in ConvertToSqlGuid");
277Debug.Assert(value != null, "null argument in ConvertToSqlBinary");
295Debug.Assert(value != null, "null argument in ConvertToSqlString");
313Debug.Assert(value != null, "null argument in ConvertToSqlChars");
329Debug.Assert(value != null, "null argument in ConvertToSqlBytes");
561Debug.Assert(value is string || type == typeof(string), "invalid call to ChangeTypeForXML");
System\Data\DataColumn.cs (38)
647Debug.Assert(_defaultValue != null, "It should not have been set to null.");
859Debug.Assert(null != _storage, "no storage");
868Debug.Assert(null != _storage, "no storage");
877Debug.Assert(null != _storage, "no storage");
888Debug.Assert(_simpleType.CanHaveMaxLength(), "expected simpleType to be string");
1028Debug.Assert(2 <= _sortIndex.RefCount, "bad sortIndex refcount");
1131Debug.Assert(null != _storage, "null storage");
1139Debug.Assert(null != _storage, "no storage");
1140Debug.Assert(null != value, "setting null, expecting dbnull");
1142Debug.Assert(null != _table, "storage with no DataTable on column");
1172Debug.Assert(null != _storage, "no storage");
1181Debug.Assert(null != value, "setting null, expecting dbnull");
1182Debug.Assert(null != _table, "storage with no DataTable on column");
1183Debug.Assert(null != _storage, "no storage");
1201Debug.Assert(null != _storage, "no storage");
1240Debug.Assert(oldConstraint != null, "Should have found a column to remove from the collection.");
1255Debug.Assert(_table.Constraints.FindKeyConstraint(this) == null, "Should not be a duplication constraint in collection");
1377Debug.Assert(IsStringType, "not a String or SqlString column");
1397Debug.Assert(IsStringType, "not a String or SqlString column");
1452Debug.Assert(null != _storage, "no storage");
1472Debug.Assert(null != _storage, "null storage");
1503Debug.Assert(null != _storage, "null storage");
1509Debug.Assert(null != _storage, "null storage");
1515Debug.Assert(null != _storage, "null storage");
1592Debug.Assert(null != _storage, "no storage");
1602Debug.Assert(null != _storage, "no storage");
1637Debug.Assert(null != _storage, "no storage");
1649Debug.Assert(rels != null, "Invalid ParentRelations");
1653Debug.Assert(key.HasValue, "Invalid child key (null)");
1661Debug.Assert(rels != null, "Invalid ChildRelations");
1665Debug.Assert(key.HasValue, "Invalid parent key (null)");
1762Debug.Assert(s != null, "Caller is responsible for missing element/attribute case");
1777Debug.Assert(value != null && (value != DBNull.Value), "Caller is responsible for checking on DBNull");
1785Debug.Assert(value != null && (value != DBNull.Value), "Caller is responsible for checking on DBNull");
1796Debug.Assert(null != _storage, "no storage");
1810Debug.Assert(!_dependentColumns.Contains(expressionColumn), "duplicate column - expected to be unique");
1835Debug.Assert(null != col, "null datacolumn in expression dependencies");
1964Debug.Assert(null != value && DataColumn.IsAutoIncrementType(value.GetType()) && !(value is BigInteger), "unexpected value for autoincrement");
System\Data\DataRow.cs (15)
340Debug.Assert(!_inChangingEvent, "how are we in a changing event to cancel?");
341Debug.Assert(-1 != _tempRecord, "how no propsed record to cancel?");
357Debug.Assert(!_inChangingEvent, "how are we in a changing event to end?");
512Debug.Assert(!_inChangingEvent, "how are we in a changing event to cancel?");
513Debug.Assert(-1 != _tempRecord, "how no propsed record to cancel?");
530Debug.Assert(!_inChangingEvent, "how are we in a changing event to end?");
608Debug.Assert(-1 != _tempRecord, "missing temp record");
609Debug.Assert(0 == _countColumnChange, "unexpected column change count");
610Debug.Assert(null == _lastChangedColumn, "unexpected last column change");
626Debug.Assert(-1 == _tempRecord, "unexpected temp record");
1033Debug.Assert(0 != (DataViewRowState.Added & viewState), "not DataViewRowState.Added");
1038Debug.Assert(_action == DataRowAction.Rollback || 0 != (DataViewRowState.Deleted & viewState), "not DataViewRowState.Deleted");
1047Debug.Assert(0 != (DataViewRowState.ModifiedOriginal & viewState), "not DataViewRowState.ModifiedOriginal");
1352Debug.Assert(relation != null, "The relation should not be null here.");
1447Debug.Assert(valueFromStorage.Equals(column.DataExpression.Evaluate(this, version)),
System\Data\DataTable.cs (55)
279Debug.Assert(ds.RemotingFormat == SerializationFormat.Xml, "RemotingFormat must be SerializationFormat.Xml");
329Debug.Assert(ds.Tables.Count == 1, "There should be exactly 1 table here");
455Debug.Assert(Columns.Count == 0, "There is column in Table");
1409Debug.Assert(null != _culture, "null culture");
1480Debug.Assert(null != culture, "SetLocaleValue: no locale");
1569Debug.Assert(nRel.Length == _nestedParentRelations.Length, "nestedParent cache is broken");
1572Debug.Assert(null != nRel[i], "null relation");
1573Debug.Assert(null != _nestedParentRelations[i], "null relation");
1574Debug.Assert(nRel[i] == _nestedParentRelations[i], "unequal relations");
1636Debug.Assert(2 <= primayKeyConstraint.ConstraintIndex.RefCount, "bad primaryKey index RefCount");
1730Debug.Assert(_primaryKey == null || Constraints.FindConstraint(_primaryKey) == _primaryKey, "PrimaryKey is not in ConstraintCollection");
2098Debug.Assert(value != null, "Value should not be null ??");
2099Debug.Assert(value.ColumnMapping == MappingType.SimpleContent, "should be text node here");
2163Debug.Assert(action == DataRowAction.Delete, "Unexpected SetNewRecord action in merge function.");
2250Debug.Assert(saveIdxRecord == ((saveRowState == DataRowState.Added) ? targetRow._newRecord : targetRow._oldRecord), "oops, you change index record without noticing it");
2400Debug.Assert(clone != null, "The table passed in has to be newly created empty DataTable.");
2842Debug.Assert(null == _rowDiffId, "wasn't previously cleared");
3131Debug.Assert(Enum.GetUnderlyingType(typeof(DataRowState)) == typeof(int), "Invalid DataRowState type");
3556Debug.Assert(e != null, "e should not be null");
3566Debug.Assert(e != null, "e should not be null");
3622Debug.Assert((null != e) && ((null != _onRowChangedDelegate) || IsTypedDataTable), "OnRowChanged arguments");
3635Debug.Assert((null != e) && ((null != _onRowChangingDelegate) || IsTypedDataTable), "OnRowChanging arguments");
3648Debug.Assert((null != e) && ((null != _onRowDeletingDelegate) || IsTypedDataTable), "OnRowDeleting arguments");
3661Debug.Assert((null != e) && ((null != _onRowDeletedDelegate) || IsTypedDataTable), "OnRowDeleted arguments");
3764Debug.Assert(record != -1, "Record number must be given");
3790Debug.Assert(oldIndex.Length == newIndex.Length, "Size oldIndexes and newIndexes should be the same");
3791Debug.Assert(oldIndex.Length == _shadowIndexes!.Count, "Size of OldIndexes should be the same as size of Live indexes");
4065Debug.Assert(null != _indexes, "unexpected null indexes");
4284Debug.Assert(row != null, "Row can't be null.");
4299Debug.Assert(fireEvent, "SetNewRecord is called with wrong parameter");
4305Debug.Assert(!row._inChangingEvent, "How can this row be in an infinite loop?");
4556Debug.Assert(1 <= _shadowCount, "unexpected negative shadow count");
4568Debug.Assert(0 == _shadowCount, "unexpected count");
4574Debug.Assert(1 <= _shadowCount, "unexpected negative shadow count");
4583Debug.Assert(0 < _indexes.Count, "unexpected");
4606Debug.Assert(null == _loadIndex, "loadIndex should already be null");
4695Debug.Assert(2 <= _loadIndex.RefCount, "bad loadIndex.RefCount");
4702Debug.Assert(row != null, "Row can't be null for index record");
4758Debug.Assert(_loadIndexwithCurrentDeleted != null, "loadIndexwithCurrentDeleted should not be null");
4769Debug.Assert(_loadIndexwithOriginalAdded != null, "loadIndexwithOriginalAdded should not be null");
4775Debug.Assert(2 <= indextoUse!.RefCount, "bad indextoUse.RefCount");
4810Debug.Assert(row != null, "Row can't be null for index record");
4883Debug.Assert(parentKey != null, "AddForeignKey: Invalid parameter.. related primary key is null");
5201Debug.Assert(dataRow._tempRecord == recordNo, "tempRecord has been changed in event handler");
5537Debug.Assert(tableList != null, "tableList shouldnot be null");
6830Debug.Assert(_targetTable == null, "do not reuse this section");
6832Debug.Assert(table._rowDiffId == null, "rowDiffId wasn't previously cleared");
6834Debug.Assert(t_usedTables == null || !t_usedTables.Contains(table),
6852Debug.Assert(t_usedTables != null && t_usedTables.Contains(_targetTable), "missing Prepare before Cleanup");
6870Debug.Assert(t_usedTables != null, message);
6881Debug.Assert(_targetDS == null, "do not reuse this section");
6894Debug.Assert(!RowDiffIdUsageSection.t_usedTables.Contains(table), "Nested call with same table can cause data corruption!");
6897Debug.Assert(table._rowDiffId == null, "rowDiffId wasn't previously cleared");
6909Debug.Assert(RowDiffIdUsageSection.t_usedTables != null, "missing Prepare before Cleanup");
7075Debug.Assert(column.Computed, "Only computed columns should be re-evaluated.");
System\Data\DataView.cs (20)
275Debug.Assert(_rowViewCache.Count == CountFromIndex, "DataView.Count mismatch");
360Debug.Assert(null != predicate, "null predicate");
367Debug.Assert(DataRowVersion.Default != version, "not expecting Default");
368Debug.Assert(DataRowVersion.Proposed != version, "not expecting Proposed");
549Debug.Assert(null == _addNewRow, "AddNew addNewRow is not null");
784Debug.Assert(null != _addNewRow, "null addNewRow");
808Debug.Assert(flag, "didn't remove addNewRow");
1099Debug.Assert(property != null, "property is null");
1291Debug.Assert(null != row, "MaintainDataView.ItemAdded with null DataRow");
1298Debug.Assert(flag, "row actually removed");
1305Debug.Assert(0 <= index, "ItemAdded was actually deleted");
1320Debug.Assert(null != row, "MaintainDataView.ItemDeleted with null DataRow");
1321Debug.Assert(row != _addNewRow, "addNewRow being deleted");
1342Debug.Assert(null == row, "MaintainDataView.Reset with non-null DataRow");
1376Debug.Assert(((ListChangedType.ItemChanged == e.ListChangedType) && ((e.NewIndex == e.OldIndex) || (-1 == e.OldIndex))) ||
1380Debug.Assert(0 <= e.NewIndex, "negative NewIndex");
1471Debug.Assert(null != drv, "didn't contain addNewRow");
1474Debug.Assert(rvc.Count == CountFromIndex, "didn't add expected count");
1535Debug.Assert((0 == (DataViewRowState.ModifiedCurrent & newRowStates)) ||
1552Debug.Assert(null == _comparison, "RelatedView should not have a comparison function");
System\Data\Filter\ExpressionParser.cs (32)
294Debug.Assert(_text[_start] == '\'' && _text[_pos - 1] == '\'', "The expression contains an invalid string constant");
295Debug.Assert(_pos - _start > 1, "The expression contains an invalid string constant");
301Debug.Assert(_text[_start] == '#' && _text[_pos - 1] == '#', "The expression contains invalid date constant.");
302Debug.Assert(_pos - _start > 2, "The expression contains invalid date constant '{0}'.");
322Debug.Assert(_topOperator > 0, "Empty operator stack!!");
393Debug.Assert(_topOperator > 1, "melformed operator stack.");
403Debug.Assert(opInfo._priority == Operators.PriParen, "melformed operator stack.");
415Debug.Assert(_topNode > 0 && NodePeek()!.GetType() == typeof(FunctionNode), "The function node should be created on '('");
549Debug.Assert(_topNode == 1 || _topNode == 0, "Invalid Node Stack");
562Debug.Assert(_token == Tokens.LeftParen, "ParseAggregateArgument(): Invalid argument, token <> '('");
618Debug.Assert(_topNode > 0, "NodePop(): Corrupted node stack");
620Debug.Assert(null != node, "null NodePop");
640Debug.Assert(null != node, "null NodePush");
658Debug.Assert(pri > Operators.PriStart && pri <= Operators.PriMax, "Invalid priority value");
664Debug.Assert(_topOperator > 0, "Empty operator stack!!");
670Debug.Assert(opInfo._priority >= pri, "Invalid prioriry value");
710Debug.Assert(opInfo._op == Operators.Plus ||
719Debug.Assert(nodeLeft != null, "Invalid left operand");
720Debug.Assert(nodeRight != null, "Invalid right operand");
751Debug.Assert(nodeLeft == null, "Invalid left operand");
752Debug.Assert(nodeRight != null, "Invalid right operand");
766Debug.Assert(expr != null, "Failed to create expression");
992Debug.Assert(_pos != 0, "We have at least one digit in the buffer, ScanNumeric()");
993Debug.Assert(IsDigit(text[_pos - 1]), "We have at least one digit in the buffer, ScanNumeric(), not a digit");
1053Debug.Assert(chEnd != '\0', "Invalid bracket value");
1054Debug.Assert(esc != '\0', "Invalid escape value");
1072Debug.Assert(text[_pos] == chEnd, "Invalid bracket value");
1111Debug.Assert(_token == Tokens.Name, "Exprecing an identifier.");
1112Debug.Assert(_pos > _start, "Exprecing an identifier.");
1115Debug.Assert(name != null, "Make sure the arguments for Compare method are OK");
1125Debug.Assert(s_reservedwords[i]._word != null, "Make sure the arguments for Compare method are OK");
1145Debug.Assert(_token == Tokens.Name, "Exprecing an identifier.");
System\Data\Filter\FunctionNode.cs (5)
123Debug.Assert(_info < s_funcs.Length && _info >= 0, "Invalid function info.");
127Debug.Assert(_argumentCount == s_funcs[_info]._argumentCount || s_funcs[_info]._isVariantArgumentList, "Invalid argument argumentCount.");
198Debug.Assert(_info > -1, "All function nodes should be bound at this point."); // default info is -1, it means if not bounded, it should be -1, not 0!!
258Debug.Assert(_info > -1, "Optimizing unbound function "); // default info is -1, it means if not bounded, it should be -1, not 0!!
396Debug.Assert(_argumentCount == 2, "Invalid argument argumentCount: ");
System\Data\ProviderBase\SchemaMapping.cs (18)
64Debug.Assert(null != adapter, nameof(adapter));
65Debug.Assert(null != dataReader, nameof(dataReader));
66Debug.Assert(0 < dataReader.FieldCount, "FieldCount");
67Debug.Assert(null != dataset || null != datatable, "SchemaMapping - null dataSet");
68Debug.Assert(SchemaType.Mapped == schemaType || SchemaType.Source == schemaType, "SetupSchema - invalid schemaType");
284Debug.Assert(_mappedLength == _indexMap!.Length, "incorrect precomputed length");
299Debug.Assert(_mappedLength == Math.Min(_readerDataValues!.Length, _mappedDataValues!.Length), "incorrect precomputed length");
363Debug.Assert(0 == _mappedMode, "incorrect mappedMode");
364Debug.Assert((null == _chapterMap) && (null == _indexMap) && (null == _mappedDataValues), "incorrect MappedValues");
367Debug.Assert((null == _chapterMap) && (null == _indexMap) && (null != _mappedDataValues), "incorrect MappedValues");
371Debug.Assert((null == _chapterMap) && (null != _indexMap) && (null != _mappedDataValues), "incorrect MappedValues");
375Debug.Assert((null != _chapterMap) && (null == _indexMap) && (null != _mappedDataValues), "incorrect MappedValues");
379Debug.Assert((null != _chapterMap) && (null != _indexMap) && (null != _mappedDataValues), "incorrect MappedValues");
472Debug.Assert(null != _dataSet, "if chapters, then Fill(DataSet,...) not Fill(DataTable,...)");
523Debug.Assert(rgcol != null, "invalid call to ResizeArray");
524Debug.Assert(len <= rgcol.Length, "invalid len passed to ResizeArray");
769Debug.Assert(null != schemaRows, "SchemaSetup - null DbSchemaRow[]");
770Debug.Assert(_dataReader.FieldCount <= schemaRows.Length, "unexpected fewer rows in Schema than FieldCount");
System\Data\RbTree.cs (30)
321Debug.Assert(_inUseNodeCount - 1 == SubTreeSize(root), "count mismatch");
371Debug.Assert(page._slots[slotId]._leftId == NIL, "node not cleared");
372Debug.Assert(page._slots[slotId]._rightId == NIL, "node not cleared");
373Debug.Assert(page._slots[slotId]._parentId == NIL, "node not cleared");
374Debug.Assert(page._slots[slotId]._nextId == NIL, "node not cleared");
377Debug.Assert(page._slots[slotId]._nodeColor == NodeColor.red, "node not cleared");
550Debug.Assert(NIL != x_id, "nil left");
551Debug.Assert(NIL != z_id, "nil right");
580Debug.Assert(-1 == position, "KEY_SEARCH_AND_INDEX with bad position");
591Debug.Assert((NIL == Left(z_id)) || (0 > Compare(root_id, Left(z_id), z_id)), "Left is not left");
598Debug.Assert((NIL == Right(z_id)) || (0 < Compare(root_id, Right(z_id), z_id)), "Right is not right");
841Debug.Assert(_accessMethod == TreeAccessMethod.INDEX_ONLY, "not expecting anything else");
1229Debug.Assert((NIL == Left(x_id)) || (0 > Compare(root_id, Left(x_id), x_id)), "Search duplicate Left is not left");
1236Debug.Assert((NIL == Right(x_id)) || (0 < Compare(root_id, Right(x_id), x_id)), "Search duplicate Right is not right");
1259Debug.Assert((NIL == Left(x_id)) || (0 > Compare(NIL, Left(x_id), x_id)), "Search Left is not left");
1266Debug.Assert((NIL == Right(x_id)) || (0 < Compare(NIL, Right(x_id), x_id)), "Search Right is not right");
1347Debug.Assert(NIL != node, "GetIndexByNode(NIL)");
1513Debug.Assert(NIL == Next(x_id), "has unexpected satellite tree");
1698Debug.Assert(nodeId != NIL, " in SetParent nodeId == NIL");
1709Debug.Assert(nodeId != NIL, " in SetColor nodeId == NIL");
1740Debug.Assert(nodeId != NIL &&
1786Debug.Assert(myCorrectSize == size, "VerifySize");
1907Debug.Assert(null != tree, "null tree");
1908Debug.Assert((NIL == _nodeID && NIL == _mainTreeNodeID) || (NIL != _nodeID), "MainTreeNodeID is not NIL");
1912Debug.Assert(NIL != tree.Next(_mainTreeNodeID), "MainTreeNodeID should have a Next");
1918Debug.Assert(tree.root == node, "MainTreeNodeID parent change doesn't align");
1922Debug.Assert(NIL == tree.Next(_nodeID), "NodeID should not have a Next");
1935Debug.Assert(NIL == tree.Next(node), "duplicate node should not have a next");
1939Debug.Assert((NIL == _mainTreeNodeID && tree.root == node) ||
1989Debug.Assert((_slotMap[segmentPos] & freeSlot) == 0, "Slot position segment[segmentPos ]: [freeSlot] is in use. Expected to be empty");
System\Data\Selection.cs (26)
19Debug.Assert(column != null, "null column");
114Debug.Assert(null != table, "null table");
175Debug.Assert(recordIndex >= 0 && recordIndex < _recordCount, "recordIndex out of range");
233Debug.Assert(0 <= _refCount, "AddRef on disposed index");
234Debug.Assert(null != _records, "null records");
298Debug.Assert(_records.CheckUnique(_records.root) != HasDuplicates, "CheckUnique difference");
326Debug.Assert(null != row1, "record1 no datarow");
327Debug.Assert(null != row2, "record2 no datarow");
350Debug.Assert(0 == CompareDataRows(record1, record2), "duplicate record not a duplicate by user function");
357Debug.Assert(0 == c, "duplicate record not a duplicate");
362Debug.Assert(null != row1, "record1 no datarow");
363Debug.Assert(null != row2, "record2 no datarow");
448Debug.Assert(null != _comparison, "missing comparison");
475Debug.Assert(record == row._newRecord, "newRecord has change during GetIndex");
479Debug.Assert(record == row._oldRecord, "oldRecord has change during GetIndex");
859Debug.Assert(DoListChanged, "supposed to check DoListChanged before calling to delay create ListChangedEventArgs");
870Debug.Assert(-1 <= record, "bad record#");
942Debug.Assert((-1 == oldRecord) || (-1 == newRecord) ||
1073Debug.Assert(null != listener, "null listener");
1074Debug.Assert(!Index.ContainsReference(_listeners, listener), "already contains reference");
1086Debug.Assert(null != listener, "null listener");
1089Debug.Assert(0 <= index, "listeners don't contain listener");
1104Debug.Assert(null != action, "no action");
1105Debug.Assert(0 <= _listenerReaderCount, "negative _listEventCount");
1147Debug.Assert((-1 == nullIndex) || (null == _listeners[nullIndex]), "non-null listener");
1148Debug.Assert(0 == _listenerReaderCount, "0 < _listenerReaderCount");
System\Data\XDRSchema.cs (5)
40Debug.Assert(FEqualIdentity(schemaRoot, Keywords.XDR_SCHEMA, Keywords.XDRNS), "Illegal node");
74Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENT, Keywords.XDRNS) ||
184Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENTTYPE, Keywords.XDRNS) ||
275Debug.Assert((s_mapNameTypeXdr[i - 1].CompareTo(s_mapNameTypeXdr[i].name)) < 0, "incorrect sorting");
345Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENT, Keywords.XDRNS) ||
System\Data\XMLSchema.cs (15)
332Debug.Assert(val is PropertyCollection, "We can set values only for classes that have ExtendedProperties");
363Debug.Assert(dc != null, "HandleColumnExpression is supposed to be called for DataColumn");
403Debug.Assert(val is PropertyCollection, "We can set values only for classes that have ExtendedProperties");
417Debug.Assert(table != null, "ref table should have been already created");
851Debug.Assert(schemaSet.Count == 1, "there should be one schema");
923Debug.Assert(child == table, "table not the same");
1072Debug.Assert(ct.BaseXmlSchemaType is XmlSchemaSimpleType, "Expected SimpleType or ComplexType");
1090Debug.Assert(cContent is XmlSchemaComplexContentRestriction, "Expected complexContent extension or restriction");
1102Debug.Assert(ct.ContentModel is XmlSchemaSimpleContent, "expected simpleContent or complexContent");
1113Debug.Assert(ct.BaseXmlSchemaType is XmlSchemaSimpleType, "Expected SimpleType or ComplexType");
1119Debug.Assert(cContent is XmlSchemaSimpleContentRestriction, "Expected SimpleContent extension or restriction");
1156Debug.Assert(cContent is XmlSchemaComplexContentRestriction, "Expected complexContent extension or restriction");
1162Debug.Assert(ct.ContentModel is XmlSchemaSimpleContent, "expected simpleContent or complexContent");
1537Debug.Assert((node is XmlSchemaElement) || (node is XmlSchemaAttribute), "GetInstanceName should only be called on attribute or elements");
1548Debug.Assert((instanceName != null) && (instanceName.Length != 0), "instanceName cannot be null or empty. There's an error in the XSD compiler");
System\Data\XmlToDatasetMap.cs (10)
107Debug.Assert(dataSet != null, "DataSet can't be null");
108Debug.Assert(nameTable != null, "NameTable can't be null");
116Debug.Assert(dataSet != null, "DataSet can't be null");
117Debug.Assert(nameTable != null, "NameTable can't be null");
125Debug.Assert(dataTable != null, "DataTable can't be null");
126Debug.Assert(nameTable != null, "NameTable can't be null");
134Debug.Assert(dataTable != null, "DataTable can't be null");
135Debug.Assert(nameTable != null, "NameTable can't be null");
438Debug.Assert(node != null, "Argument validation");
506Debug.Assert(col.ColumnName.StartsWith("xml", StringComparison.OrdinalIgnoreCase), "column name should start with xml");
System.Data.Odbc (194)
Common\System\Data\Common\DBConnectionString.cs (13)
67Debug.Assert(null != connectionOptions, "null connectionOptions");
286Debug.Assert(!_hasPassword || ContainsKey(KEY.Password) || ContainsKey(KEY.Pwd), "OnDeserialized password mismatch this");
287Debug.Assert(null == entry || !entry._hasPassword || entry.ContainsKey(KEY.Password) || entry.ContainsKey(KEY.Pwd), "OnDeserialized password mismatch entry");
299Debug.Assert(combinedSet != null, "The combined connection string should not be null");
309Debug.Assert(!combinedSet._restrictionValues.Except(componentSet._restrictionValues).Any(), "Combined set allows values not allowed by component set");
328Debug.Assert(!combinedSet._restrictionValues.Intersect(componentSet._restrictionValues).Any(), "Combined values allows values prevented by component set");
335Debug.Assert(!componentSet._restrictionValues.Except(combinedSet._restrictionValues).Any(), "Combined values does not prevent all of the values prevented by the component set");
357Debug.Assert(!_hasPassword || ContainsKey(KEY.Password) || ContainsKey(KEY.Pwd), "OnDeserialized password mismatch this");
358Debug.Assert(!entry._hasPassword || entry.ContainsKey(KEY.Password) || entry.ContainsKey(KEY.Pwd), "OnDeserialized password mismatch entry");
442Debug.Assert(null != a && 0 < a.Length, "empty a");
443Debug.Assert(null != b && 0 < b.Length, "empty b");
537Debug.Assert(!string.IsNullOrEmpty(restrictionValues[i - 1]), "empty restriction");
538Debug.Assert(!string.IsNullOrEmpty(restrictionValues[i]), "empty restriction");
Common\System\Data\ProviderBase\DbBuffer.cs (38)
61Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
89Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
115Debug.Assert(0 == offset % 4, "invalid alignment");
147Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
148Debug.Assert(null != destination, "null destination");
149Debug.Assert(startIndex + length <= destination.Length, "destination too small");
180Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
181Debug.Assert(null != destination, "null destination");
182Debug.Assert(startIndex + length <= destination.Length, "destination too small");
213Debug.Assert(0 == offset % 2, "invalid alignment");
239Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
240Debug.Assert(null != destination, "null destination");
241Debug.Assert(startIndex + length <= destination.Length, "destination too small");
265Debug.Assert(0 == offset % 4, "invalid alignment");
291Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
292Debug.Assert(null != destination, "null destination");
293Debug.Assert(startIndex + length <= destination.Length, "destination too small");
317Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
343Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
385Debug.Assert(null != structure, "null structure");
388Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
412Debug.Assert(0 == offset % 4, "invalid alignment");
436Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
437Debug.Assert(null != source, "null source");
438Debug.Assert(startIndex + length <= source.Length, "source too small");
462Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
463Debug.Assert(null != source, "null source");
464Debug.Assert(startIndex + length <= source.Length, "source too small");
493Debug.Assert(0 == offset % 2, "invalid alignment");
517Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
518Debug.Assert(null != source, "null source");
519Debug.Assert(startIndex + length <= source.Length, "source too small");
543Debug.Assert(0 == offset % 4, "invalid alignment");
567Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
568Debug.Assert(null != source, "null source");
569Debug.Assert(startIndex + length <= source.Length, "source too small");
593Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
617Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
Common\System\Data\ProviderBase\DbConnectionPool.cs (16)
139Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup");
300Debug.Assert(obj != null, "null connection is not expected");
330Debug.Assert(obj != null, "null connection is not expected");
333Debug.Assert(!obj.IsEmancipated, "pooled object not in pool");
334Debug.Assert(obj.CanBePooled, "pooled object is not poolable");
363Debug.Assert(obj != null, "null connection is not expected");
368Debug.Assert(obj != null, "null connection is not expected");
417Debug.Assert(oldConnectionPool._state == State.ShuttingDown, "Old connections pool should be shutting down");
457Debug.Assert(timerIsNotDisposed, "ErrorCallback timer has been disposed");
556Debug.Assert(removed, "attempt to DestroyObject not in list");
645Debug.Assert(connection != null, "connection should never be null in success case");
789Debug.Assert(2 == CREATION_HANDLE, "creation handle changed value");
907Debug.Assert(obj != null, "null connection is not expected");
912Debug.Assert(obj != null, "null connection is not expected");
1012Debug.Assert(null != obj, "why are we adding a null object to the pool?");
1022Debug.Assert(null != obj, "null obj?");
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (17)
64Debug.Assert(key != null, "key cannot be null");
83Debug.Assert(null != owningConnection, "null owningConnection?");
84Debug.Assert(null != poolGroup, "null poolGroup?");
97Debug.Assert(null != pool, "null pool?");
119Debug.Assert(key != null, "key cannot be null");
134Debug.Assert(Monitor.IsEntered(s_pendingOpenNonPooled), $"Expected {nameof(s_pendingOpenNonPooled)} lock to be held.");
142Debug.Assert(null != owningObject, "null owningObject?");
143Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup?");
161Debug.Assert(null != connectionOptions, "prevent expansion of connectionString");
164Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup?");
234Debug.Assert(!connectionPoolGroup.IsDisabled, "Disabled pool entry discovered");
237Debug.Assert(null != connectionPoolGroup, "how did we not create a pool entry?");
238Debug.Assert(null != userConnectionOptions, "how did we not have user connection options?");
309Debug.Assert(!entry.Value.IsDisabled, "Disabled pool entry discovered");
333Debug.Assert(null != pool, "null pool?");
352Debug.Assert(null != poolGroup, "null poolGroup?");
367Debug.Assert(connectionPoolGroup != null, "connectionPoolGroup may not be null.");
System\Data\Odbc\OdbcConnectionHelper.cs (10)
124Debug.Assert(null != value, "null poolGroup");
199Debug.Assert(DbConnectionClosedConnecting.SingletonInstance == _innerConnection, "not connecting");
207Debug.Assert(null != userConnectionOptions, "null UserConnectionOptions");
217Debug.Assert(null != _innerConnection, "null InnerConnection");
218Debug.Assert(null != to, "to null InnerConnection");
248Debug.Assert(null != _innerConnection, "null InnerConnection");
249Debug.Assert(null != from, "from null InnerConnection");
250Debug.Assert(null != to, "to null InnerConnection");
257Debug.Assert(null != _innerConnection, "null InnerConnection");
258Debug.Assert(null != to, "to null InnerConnection");
System\Data\Odbc\OdbcDataReader.cs (20)
61Debug.Assert(command != null, "Command null on OdbcDataReader ctor");
359Debug.Assert(null != Connection, "null cmd connection");
966Debug.Assert(lengthOrIndicator >= 0 || lengthOrIndicator == ODBC32.SQL_NO_TOTAL, "unexpected lengthOrIndicator value");
1009Debug.Assert(lengthOrIndicator >= 0 || lengthOrIndicator == ODBC32.SQL_NO_TOTAL, "unexpected lengthOrIndicator value");
1148Debug.Assert((cachedObj != null), "internalGetString should always return non-null or raise exception");
1153Debug.Assert((cachedObj != null), "internalGetBytes should always return non-null or raise exception");
1339Debug.Assert(bufferIndex >= 0, "Negative buffer index");
1340Debug.Assert(bytesOrCharsLength >= 0, "Negative number of bytes or chars to read");
1343Debug.Assert(buffer == null || bytesOrCharsLength <= (buffer.Length - bufferIndex), "Not enough space in user's buffer");
1409Debug.Assert((cbTotal > 0), "GetData returned negative value, which is not SQL_NO_TOTAL");
1486Debug.Assert(flag, "internalGetBytes - unexpected invalid result inside if-block");
1725Debug.Assert(null != StatementHandle, "Statement handle is null in DateReader");
1728Debug.Assert(_dataCache == null || !Convert.IsDBNull(_dataCache[i]), "Cannot call GetData without checking for cache first!");
1733Debug.Assert(cb <= Buffer.Length - 2, "GetData needs to Reallocate. Perf bug");
1911Debug.Assert(!disposing || !allresults, "both disposing & allresults are true");
1989Debug.Assert(!disposing, "errors while disposing");
2324Debug.Assert(buffer.Length >= 264, "Native buffer to small (_buffer.Length < 264)");
2505Debug.Assert(buffer.Length >= 544, "Native buffer to small (_buffer.Length < 544)");
2851Debug.Assert(str.Length > 1, "Illegal string, only one char that is a quote");
2852Debug.Assert(str[str.Length - 1] == quoteChar, "Missing quote at end of string that begins with quote");
System\Data\Odbc\OdbcUtils.cs (12)
37Debug.Assert((cb > 0), "Character count negative ");
38Debug.Assert((Length >= cb), "Native buffer too small ");
45Debug.Assert((cb > 0), "Character count negative ");
46Debug.Assert((Length >= cb), "Native buffer too small ");
168Debug.Assert(value is string || value is char[], "Only string or char[] can be marshaled to WCHAR");
180Debug.Assert(rgChars.Length < (base.Length - valueOffset), "attempting to extend parameter buffer!");
193Debug.Assert(rgChars.Length < (base.Length - valueOffset), "attempting to extend parameter buffer!");
207Debug.Assert((valueOffset <= length), "Offset out of Range");
222Debug.Assert(length < (base.Length - valueOffset), "attempting to extend parameter buffer!");
456Debug.Assert((_sqlstatement[curidx] == '['), "GetTokenFromQuote: character at starting position must be same as quotechar");
472Debug.Assert(_quote != ' ', "ODBC driver doesn't support quoted identifiers -- GetTokenFromQuote should not be used in this case");
473Debug.Assert((_sqlstatement[curidx] == _quote), "GetTokenFromQuote: character at starting position must be same as quotechar");
System.Diagnostics.DiagnosticSource (5)
System.Diagnostics.Process (18)
System.Diagnostics.TextWriterTraceListener (1)
System.Diagnostics.TraceSource (1)
System.Formats.Asn1 (3)
System.Formats.Cbor (6)
System.Formats.Nrbf (12)
System.Formats.Tar (6)
System.IO.Compression (23)
System.IO.Compression.ZipFile (1)
System.IO.FileSystem.DriveInfo (1)
System.IO.FileSystem.Watcher (4)
System.IO.Hashing (4)
System.IO.IsolatedStorage (3)
System.IO.MemoryMappedFiles (4)
System.IO.Packaging (34)
System.IO.Pipelines (9)
System.IO.Pipes (15)
System.IO.Ports (18)
System\IO\Ports\SerialPort.cs (13)
689Debug.Assert(CachedBytesToRead == 0, "there should be nothing left in our internal buffer");
721Debug.Assert(IsOpen, "ReadOneChar - port not open");
817Debug.Assert(IsOpen, "port not open!");
818Debug.Assert(buffer != null, "invalid buffer!");
819Debug.Assert(offset >= 0, "invalid offset!");
820Debug.Assert(count >= 0, "invalid count!");
821Debug.Assert(buffer.Length - offset >= count, "invalid offset/count!");
889Debug.Assert(count != 0, "Count should never be zero. We will probably see bugs further down if count is 0.");
933Debug.Assert((lastFullCharPos + currentBytesToExamine) <= _readLen, "We should never be attempting to read more bytes than we have");
951Debug.Assert((buffer.Length - offset - totalCharsFound) >= currentCharsFound, "internal buffer to read one full unicode char sequence is not sufficient!");
1102Debug.Assert((char.IsSurrogate(_singleCharBuffer[i])), "number of chars read should be more than one only for surrogate characters!");
1105Debug.Assert((numCharsRead > 0), "possible bug in ReadBufferIntoChars, reading surrogate char?");
1332Debug.Assert(_inBuffer.Length >= _readLen, "ResizeBuffer - readLen > inBuffer.Length");
System.Linq (10)
System.Linq.AsyncEnumerable (1)
System.Linq.Expressions (36)
System.Linq.Parallel (147)
System\Linq\Parallel\Channels\AsynchronousChannel.cs (10)
118Debug.Assert(chunkSize > 0, "chunk size must be greater than 0");
119Debug.Assert(capacity > 1, "this impl doesn't support capacity of 1 or 0");
290Debug.Assert(!_done, "can't continue producing after the production is over");
294Debug.Assert(!IsFull, "expected a non-full buffer");
418Debug.Assert(_consumerChunk != null, "consumer chunk is null");
419Debug.Assert(0 <= _consumerChunkIndex && _consumerChunkIndex < _consumerChunk.Length, "chunk index out of bounds");
496Debug.Assert(_consumerChunk != null, "consumer chunk is null");
497Debug.Assert(0 <= _consumerChunkIndex && _consumerChunkIndex < _consumerChunk.Length, "chunk index out of bounds");
587Debug.Assert(!IsChunkBufferEmpty, "single-consumer should never witness an empty queue here");
663Debug.Assert(_done, "Expected channel to be done before disposing");
System\Linq\Parallel\Partitioning\PartitionedDataSource.cs (20)
238Debug.Assert(data != null, "data mustn't be null");
239Debug.Assert(partitionCount > 0, "partitionCount must be positive");
240Debug.Assert(partitionIndex >= 0, "partitionIndex can't be negative");
241Debug.Assert(partitionIndex < partitionCount, "partitionIndex must be less than partitionCount");
242Debug.Assert(maxChunkSize > 0, "maxChunkSize must be positive or -1");
340Debug.Assert(data != null, "data must not be null");
341Debug.Assert(partitionCount > 0, "partitionCount must be positive");
342Debug.Assert(partitionIndex >= 0, "partitionIndex can't be negative");
343Debug.Assert(partitionIndex < partitionCount, "partitionIndex must be less than partitionCount");
360Debug.Assert(_currentIndex == null, "Expected deferred allocation to ensure it happens on correct thread");
409Debug.Assert(data != null, "data must not be null");
410Debug.Assert(partitionCount > 0, "partitionCount must be positive");
411Debug.Assert(partitionIndex >= 0, "partitionIndex can't be negative");
412Debug.Assert(partitionIndex < partitionCount, "partitionIndex must be less than partitionCount");
413Debug.Assert(maxChunkSize > 0, "maxChunkSize must be positive or -1");
511Debug.Assert(data != null, "data must not be null");
512Debug.Assert(partitionCount > 0, "partitionCount must be positive");
513Debug.Assert(partitionIndex >= 0, "partitionIndex can't be negative");
514Debug.Assert(partitionIndex < partitionCount, "partitionIndex must be less than partitionCount");
531Debug.Assert(_currentIndex == null, "Expected deferred allocation to ensure it happens on correct thread");
System.Linq.Queryable (1)
System.Memory (2)
System.Net.Http (77)
System\Net\Http\Headers\HttpHeaders.cs (18)
340Debug.Assert(_count != 0 && entries is not null, "Caller should have validated the collection is not empty");
380Debug.Assert(descriptor.Parser != null, "Can't add parsed value if there is no parser available.");
394Debug.Assert(descriptor.Parser != null, "Can't add parsed value if there is no parser available.");
428Debug.Assert(descriptor.Parser != null, "Can't add parsed value if there is no parser available.");
429Debug.Assert(descriptor.Parser.SupportsMultipleValues,
447Debug.Assert(parsedValue.GetType() == value.GetType(),
463Debug.Assert(item.GetType() == value.GetType(),
506Debug.Assert(descriptor.Parser != null, "Can't add parsed value if there is no parser available.");
507Debug.Assert(descriptor.Parser.SupportsMultipleValues,
525Debug.Assert(parsedValue.GetType() == value.GetType(),
537Debug.Assert(item.GetType() == value.GetType(),
557Debug.Assert(GetType() == sourceHeaders.GetType(), "Can only copy headers from an instance of the same type.");
880Debug.Assert(index < value.Length, "Parser must return an index value within the string length.");
933Debug.Assert(!(value is List<object>),
1048Debug.Assert(index < value.Length, "Parser must return an index value within the string length.");
1166Debug.Assert(length > 1, "The header should have been removed when it became empty");
1286Debug.Assert(parser != null, "There should be no reason to call CanAddValue if there is no parser for the current header.");
1358Debug.Assert(count == 1, "Only a single parsed value should be stored for this parser");
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (16)
437Debug.Assert(headerValuesCount > 0, "No values for header??");
534Debug.Assert(_currentRequest == null, $"Expected null {nameof(_currentRequest)}.");
535Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in read buffer");
536Debug.Assert(_readAheadTaskStatus != ReadAheadTask_Started,
1767Debug.Assert(_readAheadTask == default, "Read ahead task should have been consumed as part of the headers.");
1785Debug.Assert(_readAheadTask == default, "Read ahead task should have been consumed as part of the headers.");
1806Debug.Assert(_readAheadTask == default, "Read ahead task should have been consumed as part of the headers.");
1844Debug.Assert(_readAheadTask == default, "Read ahead task should have been consumed as part of the headers.");
1934Debug.Assert(_readBuffer.ActiveLength == 0, "HttpConnection's buffer should have been empty.");
2038Debug.Assert(_currentRequest != null, "Expected the connection to be associated with a request.");
2039Debug.Assert(_writeBuffer.ActiveLength == 0, "Everything in write buffer should have been flushed.");
2100Debug.Assert(_currentRequest == null, "Connection should no longer be associated with a request.");
2101Debug.Assert(_readAheadTask == default, "Expected a previous initial read to already be consumed.");
2102Debug.Assert(_readAheadTaskStatus == ReadAheadTask_NotStarted, "Expected SendAsync to reset the read-ahead task status.");
2103Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in connection read buffer.");
2120Debug.Assert(!_detachedFromPool, "Should not be detached from pool unless _connectionClose is true");
System.Net.HttpListener (28)
System\Net\HttpListenerRequestUriBuilder.cs (11)
49Debug.Assert(!string.IsNullOrEmpty(rawUri), "Empty raw URL.");
50Debug.Assert(!string.IsNullOrEmpty(cookedUriScheme), "Empty cooked URL scheme.");
51Debug.Assert(!string.IsNullOrEmpty(cookedUriHost), "Empty cooked URL host.");
52Debug.Assert(!string.IsNullOrEmpty(cookedUriPath), "Empty cooked URL path.");
136Debug.Assert(encoding != null, "'encoding' must be assigned.");
137Debug.Assert(!string.IsNullOrEmpty(_rawPath), "'rawPath' must have at least one character.");
150Debug.Assert(_rawOctets.Count == 0,
172Debug.Assert(encoding != null, "'encoding' must be assigned.");
365Debug.Assert(uriString != null, "uriString must not be null");
366Debug.Assert(uriString.Length > 0, "uriString must not be empty");
434Debug.Assert(path != null, "'path' must not be null");
System.Net.Mail (40)
System.Net.NetworkInformation (11)
System.Net.Ping (1)
System.Net.Primitives (4)
System.Net.Quic (10)
System.Net.Requests (14)
System.Net.Security (40)
System.Net.ServerSentEvents (1)
System.Net.Sockets (26)
System\Net\Sockets\SocketAsyncContext.Unix.cs (15)
169Debug.Assert(_state is State.Running or State.RunningWithPendingCancellation, "Unexpected operation state");
724Debug.Assert(success, "Timed out waiting for queue lock");
857Debug.Assert(observedSequenceNumber - _sequenceNumber < 10000, "Very large sequence number increase???");
869Debug.Assert(operation.Next == operation, "Expected operation.Next == operation");
957Debug.Assert(_tail == null, "State == Ready but queue is not empty!");
963Debug.Assert(_tail != null, "State == Waiting but queue is empty!");
978Debug.Assert(_tail != null, "State == Processing but queue is empty!");
1013Debug.Assert(op.Event == null, "Sync operation encountered in ProcessAsyncOperation");
1047Debug.Assert(_tail != null, "Unexpected empty queue while processing I/O");
1048Debug.Assert(op == _tail.Next, "Operation is not at head of queue???");
1080Debug.Assert(observedSequenceNumber - _sequenceNumber < 10000, "Very large sequence number increase???");
1106Debug.Assert(_tail.Next == op, "Queue modified while processing queue");
1148Debug.Assert(_tail != null, "Unexpected empty queue in CancelAndContinueProcessing");
1477Debug.Assert(callback != null, "Expected non-null callback");
1542Debug.Assert(callback != null, "Expected non-null callback");
System.Net.WebClient (4)
System.Net.WebSockets (18)
System\Net\WebSockets\ManagedWebSocket.cs (14)
142Debug.Assert(StateUpdateLock != null, $"Expected {nameof(StateUpdateLock)} to be non-null");
143Debug.Assert(stream != null, $"Expected non-null {nameof(stream)}");
144Debug.Assert(stream.CanRead, $"Expected readable {nameof(stream)}");
145Debug.Assert(stream.CanWrite, $"Expected writeable {nameof(stream)}");
236Debug.Assert(Monitor.IsEntered(StateUpdateLock), $"Expected {nameof(StateUpdateLock)} to be held");
465Debug.Assert(Monitor.IsEntered(StateUpdateLock), $"Expected {nameof(StateUpdateLock)} to be held");
505Debug.Assert(_sendMutex.IsHeld, $"Caller should hold the {nameof(_sendMutex)}");
1173Debug.Assert(_receiveMutex.IsHeld, $"Caller should hold the {nameof(_receiveMutex)}");
1299Debug.Assert(_receiveBufferCount >= 2, "Expected to at least have the first two bytes of the header.");
1317Debug.Assert(_receiveBufferCount >= 2, "Expected to have two bytes for the payload length.");
1323Debug.Assert(_receiveBufferCount >= 8, "Expected to have eight bytes for the payload length.");
1535Debug.Assert(count - 2 == encodedLength, $"{nameof(s_textEncoding.GetByteCount)} and {nameof(s_textEncoding.GetBytes)} encoded count didn't match");
1633Debug.Assert(_sendMutex.IsHeld, $"Caller should hold the {nameof(_sendMutex)}");
1783Debug.Assert((b & 0x80) != 0, "Should have already skipped past ASCII");
System.Net.WebSockets.Client (2)
System.Numerics.Tensors (4)
System.ObjectModel (1)
System.Private.CoreLib (1150)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (10)
679Debug.Assert(isValid, "Unwind and intercept failed unexpectedly");
751Debug.Assert(exInfo._passNumber == 1, "expected asm throw routine to set the pass");
775Debug.Assert(isValid, "RhThrowEx called with an unexpected context");
862Debug.Assert(pCatchHandler != null || pReversePInvokePropagationCallback != IntPtr.Zero || unwoundReversePInvoke || isExceptionIntercepted, "We should have a handler if we're starting the second pass");
863Debug.Assert(!isExceptionIntercepted || (pCatchHandler == null), "No catch handler should be returned for intercepted exceptions in the first pass");
887Debug.Assert(isValid, "second-pass EH unwind failed unexpectedly");
902Debug.Assert(frameIter.SP == handlingFrameSP, "Encountered a different reverse P/Invoke frame in the second pass.");
960Debug.Assert(ip != null, "IP address must not be null");
966Debug.Assert(handlingFrameSP != MaxSP, "Handling frame must have an SP value");
967Debug.Assert(((UIntPtr*)handlingFrameSP) > &handlingFrameSP,
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (13)
67Debug.Assert(InitialSegmentSize > 0, "Initial segment size must be > 0.");
68Debug.Assert((InitialSegmentSize & (InitialSegmentSize - 1)) == 0, "Initial segment size must be a power of 2");
69Debug.Assert(InitialSegmentSize <= MaxSegmentSize, "Initial segment size should be <= maximum.");
70Debug.Assert(MaxSegmentSize < int.MaxValue / 2, "Max segment size * 2 must be < int.MaxValue, or else overflow could occur.");
102Debug.Assert(segment != null, "Expected a non-null segment.");
112Debug.Assert(newSegmentSize > 0, "The max size should always be small enough that we don't overflow.");
179Debug.Assert(segment != null, "Expected a non-null segment.");
180Debug.Assert(array != null, "Expected a non-null item array.");
253Debug.Assert(segment != null, "Expected a non-null segment.");
254Debug.Assert(array != null, "Expected a non-null item array.");
368Debug.Assert(syncObj != null, "The syncObj parameter is null.");
390Debug.Assert((size & (size - 1)) == 0, "Size must be a power of 2");
429Debug.Assert(queue != null, "Expected a non-null queue.");
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (18)
199Debug.Assert(_comparer is not null, "The comparer should never be null for a reference type.");
285Debug.Assert(_buckets != null, "_buckets should be non-null");
286Debug.Assert(_entries != null, "_entries should be non-null");
407Debug.Assert(_entries != null, "expected entries to be != null");
522Debug.Assert(entries != null, "expected entries to be non-null");
602Debug.Assert((StartOfFreeList - entries[_freeList].next) >= -1, "shouldn't overflow because `next` cannot underflow");
808Debug.Assert(dictionary._entries != null, "expected entries to be != null");
878Debug.Assert(dictionary._entries != null, "entries should be non-null");
905Debug.Assert((StartOfFreeList - dictionary._freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
973Debug.Assert(entries != null, "expected entries to be non-null");
1012Debug.Assert((StartOfFreeList - entries[dictionary._freeList].next) >= -1, "shouldn't overflow because `next` cannot underflow");
1087Debug.Assert(entries != null, "expected entries to be non-null");
1149Debug.Assert((StartOfFreeList - entries[dictionary._freeList].next) >= -1, "shouldn't overflow because `next` cannot underflow");
1251Debug.Assert(_entries != null, "_entries should be non-null");
1304Debug.Assert(_entries != null, "entries should be non-null");
1331Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
1377Debug.Assert(_entries != null, "entries should be non-null");
1406Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (16)
202Debug.Assert(_buckets != null, "_buckets should be non-null");
203Debug.Assert(_entries != null, "_entries should be non-null");
225Debug.Assert(entries != null, "Expected _entries to be initialized");
297Debug.Assert(entries != null, "entries should be non-null");
327Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
465Debug.Assert(entries != null, "expected entries to be non-null");
502Debug.Assert((StartOfFreeList - entries![set._freeList].Next) >= -1, "shouldn't overflow because `next` cannot underflow");
549Debug.Assert(entries != null, "entries should be non-null");
574Debug.Assert((StartOfFreeList - set._freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
634Debug.Assert(set._entries != null, "expected entries to be != null");
1245Debug.Assert(_comparer is not null, "The comparer should never be null for a reference type.");
1290Debug.Assert(_entries != null, "_entries should be non-null");
1420Debug.Assert(entries != null, "expected entries to be non-null");
1484Debug.Assert((StartOfFreeList - entries![_freeList].Next) >= -1, "shouldn't overflow because `next` cannot underflow");
1575Debug.Assert(_buckets != null, "_buckets shouldn't be null; callers should check first");
1733Debug.Assert((_buckets != null) && (_count > 0), "_buckets was null but count greater than 0");
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (15)
912Debug.Assert(_sRealName != null, "[CultureData.CultureName] Expected _sRealName to be populated by already");
1092Debug.Assert(_sSpecificCulture != null, "[CultureData.SpecificCultureName] Expected this.sSpecificCulture to be populated by culture data initialization already");
1654Debug.Assert(_sWindowsName != null, "[CultureData.CalendarIds] Expected _sWindowsName to be populated by already");
1722Debug.Assert(calendarId > 0 && calendarId <= CalendarId.LAST_CALENDAR,
1738Debug.Assert(_sWindowsName != null, "[CultureData.GetCalendar] Expected _sWindowsName to be populated by already");
1767Debug.Assert(_sRealName != null, "[CultureData.IsRightToLeft] Expected _sRealName to be populated by already");
1791Debug.Assert(_sRealName != null, "[CultureData.TextInfoName] Expected _sRealName to be populated by already");
1803Debug.Assert(_sRealName != null, "[CultureData.SortName] Expected _sRealName to be populated by already");
1876Debug.Assert(_sRealName != null, "[CultureData.LCID] Expected this.sRealName to be populated already");
1919Debug.Assert(calendarId > 0, "[CultureData.saEraNames] Expected Calendar.ID > 0");
1925Debug.Assert(calendarId > 0, "[CultureData.saAbbrevEraNames] Expected Calendar.ID > 0");
1931Debug.Assert(calendarId > 0, "[CultureData.saAbbrevEraNames] Expected Calendar.ID > 0");
2096Debug.Assert(startIndex >= 0, "startIndex cannot be negative");
2097Debug.Assert(!timeParts.AsSpan().ContainsAny('\'', '\\'), "timeParts cannot include quote characters");
2217Debug.Assert(_sWindowsName != null, "[CultureData.GetNFIValues] Expected _sWindowsName to be populated by already");
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (38)
172Debug.Assert(abbreviatedDayNames.Length == 7, "[DateTimeFormatInfo.GetAbbreviatedDayOfWeekNames] Expected 7 day names in a week");
186Debug.Assert(m_superShortDayNames.Length == 7, "[DateTimeFormatInfo.InternalGetSuperShortDayNames] Expected 7 day names in a week");
200Debug.Assert(dayNames.Length == 7, "[DateTimeFormatInfo.GetDayOfWeekNames] Expected 7 day names in a week");
214Debug.Assert(abbreviatedMonthNames.Length == 12 || abbreviatedMonthNames.Length == 13,
229Debug.Assert(monthNames.Length == 12 || monthNames.Length == 13,
255Debug.Assert(calendarId != CalendarId.UNINITIALIZED_VALUE, "[DateTimeFormatInfo.Populate] Expected initialized calendarId");
272Debug.Assert(allLongTimePatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some long time patterns");
275Debug.Assert(allShortTimePatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some short time patterns");
278Debug.Assert(allLongDatePatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some long date patterns");
281Debug.Assert(allShortDatePatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some short date patterns");
284Debug.Assert(allYearMonthPatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some year month patterns");
351Debug.Assert(amDesignator != null, "DateTimeFormatInfo.AMDesignator, amDesignator != null");
380Debug.Assert(calendar != null, "DateTimeFormatInfo.Calendar: calendar != null");
584Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.AbbreviatedEnglishEraNames] Expected Calendar.ID > 0");
600Debug.Assert(dateSeparator != null, "DateTimeFormatInfo.DateSeparator, dateSeparator != null");
633Debug.Assert(firstDayOfWeek != -1, "DateTimeFormatInfo.FirstDayOfWeek, firstDayOfWeek != -1");
665Debug.Assert(calendarWeekRule != -1, "DateTimeFormatInfo.CalendarWeekRule, calendarWeekRule != -1");
779Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.MonthDayPattern] Expected calID > 0");
783Debug.Assert(monthDayPattern != null, "DateTimeFormatInfo.MonthDayPattern, monthDayPattern != null");
803Debug.Assert(pmDesignator != null, "DateTimeFormatInfo.PMDesignator, pmDesignator != null");
985Debug.Assert(timeSeparator != null, "DateTimeFormatInfo.TimeSeparator, timeSeparator != null");
1048Debug.Assert(values != null, "value != null");
1207Debug.Assert(m_genitiveAbbreviatedMonthNames.Length == 13,
1217Debug.Assert(genitiveMonthNames.Length == 13,
1233Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.InternalGetLeapYearMonthNames] Expected Calendar.ID > 0");
1235Debug.Assert(leapYearMonthNames.Length == 13,
1377Debug.Assert(patterns != null && patterns.Length > 0,
1379Debug.Assert(defaultPattern != null,
1455Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.UnclonedYearMonthPatterns] Expected Calendar.ID > 0");
1457Debug.Assert(allYearMonthPatterns.Length > 0,
1476Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.UnclonedShortDatePatterns] Expected Calendar.ID > 0");
1478Debug.Assert(allShortDatePatterns.Length > 0,
1497Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.UnclonedLongDatePatterns] Expected Calendar.ID > 0");
1499Debug.Assert(allLongDatePatterns.Length > 0,
1519Debug.Assert(allShortTimePatterns.Length > 0,
1539Debug.Assert(allLongTimePatterns.Length > 0,
2257Debug.Assert(state == HebrewNumberParsingState.ContinueParsing || state == HebrewNumberParsingState.FoundEndOfHebrewNumber,
2306Debug.Assert(str.Index < str.Value.Length, "DateTimeFormatInfo.Tokenize(): start < value.Length");
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (12)
201Debug.Assert(count >= 1, "[IdnMapping.GetAscii] Expected 0 length strings to fail before now.");
372Debug.Assert(!char.IsLowSurrogate(unicode, basicCount), "[IdnMapping.punycode_encode]Unexpected low surrogate");
449Debug.Assert(delta > 0, "[IdnMapping.cs]1 punycode_encode - delta overflowed int");
463Debug.Assert(delta > 0, "[IdnMapping.cs]2 punycode_encode - delta overflowed int");
474Debug.Assert(c_punycodeBase != t, "[IdnMapping.punycode_encode]Expected c_punycodeBase (36) to be != t");
493Debug.Assert(delta > 0, "[IdnMapping.cs]3 punycode_encode - delta overflowed int");
693Debug.Assert(w > 0, "[IdnMapping.punycode_decode]Expected w > 0");
701Debug.Assert(c_punycodeBase != t, "[IdnMapping.punycode_decode]Expected t != c_punycodeBase (36)");
711Debug.Assert((output.Length - iOutputAfterLastDot - numSurrogatePairs) + 1 > 0,
835Debug.Assert(numpoints != 0, "[IdnMapping.adapt]Expected non-zero numpoints.");
843Debug.Assert(delta + c_skew != 0, "[IdnMapping.adapt]Expected non-zero delta+skew.");
868Debug.Assert(d >= 0 && d < c_punycodeBase, "[IdnMapping.encode_digit]Expected 0 <= d < punycodeBase");
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (10)
551Debug.Assert((field == 0 && sb.Length == 0) || field == 1, "field == 0 || field == 1, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
559Debug.Assert((field == 1 && sb.Length == 0) || field == 2, "field == 1 || field == 2, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
567Debug.Assert((field == 2 && sb.Length == 0) || field == 3, "field == 2 || field == 3, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
575Debug.Assert((field == 3 && sb.Length == 0) || field == 4, "field == 3 || field == 4, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
584Debug.Assert((field == 4 && sb.Length == 0) || field == 5, "field == 4 || field == 5, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
600Debug.Assert(0 < dd && dd < 3, "0 < dd && dd < 3, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
601Debug.Assert(0 < hh && hh < 3, "0 < hh && hh < 3, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
602Debug.Assert(0 < mm && mm < 3, "0 < mm && mm < 3, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
603Debug.Assert(0 < ss && ss < 3, "0 < ss && ss < 3, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
604Debug.Assert(0 < ff && ff < 8, "0 < ff && ff < 8, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
src\libraries\System.Private.CoreLib\src\System\IO\BufferedStream.cs (10)
199Debug.Assert(!(_writePos > 0 && _readPos != _readLen), "Read and Write buffers cannot both have data in them at the same time.");
368Debug.Assert(_writePos == 0, "BufferedStream: Write buffer must be empty in FlushRead!");
407Debug.Assert(_readPos == 0 && _readLen == 0,
409Debug.Assert(_buffer != null && _bufferSize >= _writePos,
420Debug.Assert(_readPos == 0 && _readLen == 0,
422Debug.Assert(_buffer != null && _bufferSize >= _writePos,
499Debug.Assert(_readLen == _readPos, "The read buffer must now be empty");
549Debug.Assert(_readLen == _readPos, "The read buffer must now be empty");
1256Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer");
1295Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer");
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (22)
28Debug.Assert(bufferSize > 1, "Buffering must not be enabled for smaller buffer sizes");
62Debug.Assert(!(_writePos > 0 && _readPos != _readLen), "Read and Write buffers cannot both have data in them at the same time.");
162Debug.Assert((_readPos == 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 && _readPos <= _readLen),
233Debug.Assert(_readPos == _readLen, "Read buffer should be empty!");
301Debug.Assert(!_strategy.IsClosed, "FileStream ensures that strategy is not closed");
302Debug.Assert((_readPos == 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 && _readPos <= _readLen),
380Debug.Assert(_writePos == 0, "Win32FileStream must not have buffered write data here! Pipes should be unidirectional.");
427Debug.Assert(_readLen == _readPos, "The read buffer must now be empty");
518Debug.Assert(_writePos == 0, "FlushWrite must set _writePos to 0");
524Debug.Assert(_writePos == 0, "FileStream cannot have buffered data to write here! Your stream will be corrupted.");
598Debug.Assert(!_strategy.IsClosed, "FileStream ensures that strategy is not closed");
599Debug.Assert((_readPos == 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 && _readPos <= _readLen),
601Debug.Assert(_strategy.CanSeek || (_readPos == 0 && _readLen == 0),
721Debug.Assert(_writePos == 0, "FileStream cannot have buffered data to write here! Your stream will be corrupted.");
758Debug.Assert(!_strategy.IsClosed, "FileStream responsibility");
759Debug.Assert((_readPos == 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 && _readPos <= _readLen),
854Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer");
885Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer");
952Debug.Assert(_writePos == 0, "Write buffer must be empty in FlushRead!");
965Debug.Assert(_readPos == 0 && _readLen == 0, "Read buffer must be empty in FlushWrite!");
966Debug.Assert(_buffer != null && _bufferSize >= _writePos, "Write buffer must be allocated and write position must be in the bounds of the buffer in FlushWrite!");
1044Debug.Assert(!_strategy.IsClosed, "FileStream ensures that strategy is not closed");
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (27)
461Debug.Assert(_byteLen >= n, "CompressBuffer was called with a number of bytes greater than the current buffer length. Are two threads using this StreamReader at the same time?");
470Debug.Assert(_byteLen >= 2, "Caller should've validated that at least 2 bytes were available.");
551Debug.Assert(_bytePos < preamble.Length, "_compressPreamble was called with the current bytePos greater than the preamble buffer length. Are two threads using this StreamReader at the same time?");
565Debug.Assert(_bytePos <= preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
596Debug.Assert(_bytePos <= _encoding.Preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
598Debug.Assert(len >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
610Debug.Assert(_bytePos == 0, "bytePos can be non zero only when we are trying to _checkPreamble. Are two threads using this StreamReader at the same time?");
612Debug.Assert(_byteLen >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
641Debug.Assert(_charPos == 0 && _charLen == 0, "We shouldn't be trying to decode more data if we made progress in an earlier iteration.");
651Debug.Assert(_charPos == 0 && _charLen == 0, "We shouldn't be looking for EOF unless we have an empty char buffer.");
700Debug.Assert(_bytePos <= _encoding.Preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
702Debug.Assert(len >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
714Debug.Assert(_bytePos == 0, "bytePos can be non zero only when we are trying to _checkPreamble. Are two threads using this StreamReader at the same time?");
716Debug.Assert(_byteLen >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
748Debug.Assert(charsRead == 0 && _charPos == 0 && _charLen == 0, "We shouldn't be trying to decode more data if we made progress in an earlier iteration.");
766Debug.Assert(charsRead == 0 && _charPos == 0 && _charLen == 0, "We shouldn't be looking for EOF unless we have an empty char buffer.");
922Debug.Assert(charPos < charLen, "ReadBuffer returned > 0 but didn't bump _charLen?");
1138Debug.Assert(_bytePos <= _encoding.Preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
1141Debug.Assert(len >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
1174Debug.Assert(_bytePos == 0, "_bytePos can be non zero only when we are trying to _checkPreamble. Are two threads using this StreamReader at the same time?");
1178Debug.Assert(_byteLen >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
1333Debug.Assert(_bytePos <= _encoding.Preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
1336Debug.Assert(len >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
1348Debug.Assert(_bytePos == 0, "_bytePos can be non zero only when we are trying to _checkPreamble. Are two threads using this StreamReader at the same time?");
1350Debug.Assert(_byteLen >= 0, "Stream.Read returned a negative number! Bug in stream class.");
1379Debug.Assert(_charPos == 0 && _charLen == 0, "We shouldn't be trying to decode more data if we made progress in an earlier iteration.");
1389Debug.Assert(_charPos == 0 && _charLen == 0, "We shouldn't be looking for EOF unless we have an empty char buffer.");
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (15)
31Debug.Assert(mediator != null, "mediator shouldn't be null; check caller");
37Debug.Assert(culture != null, "culture shouldn't be null; check caller");
38Debug.Assert(localResourceSets != null, "localResourceSets shouldn't be null; check caller");
90Debug.Assert(satellite != null, "satellite should not be null when stream is set");
128Debug.Assert(a != null, "assembly != null");
168Debug.Assert(store != null, "I need a Stream!");
225Debug.Assert(readerTypeName != null, "Reader Type name should be set");
226Debug.Assert(resSetTypeName != null, "ResourceSet Type name should be set");
300Debug.Assert(resSetTypeName != null, "We should have a ResourceSet type name from the custom resource file here.");
315Debug.Assert(satellite != null, "satellite shouldn't be null; check caller");
316Debug.Assert(fileName != null, "fileName shouldn't be null; check caller");
328Debug.Assert(satellite != null, "satellite shouldn't be null; check caller");
329Debug.Assert(name != null, "name shouldn't be null; check caller");
392Debug.Assert(readerTypeName != null, "readerTypeName shouldn't be null; check caller");
393Debug.Assert(resSetTypeName != null, "resSetTypeName shouldn't be null; check caller");
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (20)
46Debug.Assert(value >= 0, "negative ResourceTypeCode. What?");
202Debug.Assert(_nameHashes != null && _nameHashesPtr == null, "Internal state mangled.");
207Debug.Assert(_nameHashes == null && _nameHashesPtr != null, "Internal state mangled.");
218Debug.Assert(_namePositions != null && _namePositionsPtr == null, "Internal state mangled.");
223Debug.Assert(_namePositions == null && _namePositionsPtr != null, "Internal state mangled.");
259Debug.Assert(_store != null, "ResourceReader is closed!");
340Debug.Assert(_store != null, "ResourceReader is closed!");
383Debug.Assert(_store != null, "ResourceReader is closed!");
454Debug.Assert(_store != null, "ResourceReader is closed!");
478Debug.Assert(_store != null, "ResourceReader is closed!");
540Debug.Assert(_store != null, "ResourceReader is closed!");
541Debug.Assert(_version == 1, ".resources file was not a V1 .resources file!");
622Debug.Assert(_store != null, "ResourceReader is closed!");
623Debug.Assert(_version >= 2, ".resources file was not a V2 (or higher) .resources file!");
730Debug.Assert(r == len, "ResourceReader needs to use a blocking read here. (Call _store.ReadBytes(len)?)");
783Debug.Assert(_store != null, "ResourceReader is closed!");
1002Debug.Assert(_typeTable[typeIndex] != null, "Should have found a type!");
1033Debug.Assert(typeCode >= 0, "can't be negative");
1038Debug.Assert(!string.Equals(typeCode.ToString(), "LastPrimitive"), "Change ResourceTypeCode metadata order so LastPrimitive isn't what Enum.ToString prefers.");
1044Debug.Assert(typeIndex >= 0 && typeIndex < _typeTable.Length, "TypeCode is broken or corrupted!");
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs (10)
32Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
107Debug.Assert(taskCompleted, "With an infinite timeout, the task should have always completed.");
129Debug.Assert(task.IsCompleted, "Task must have been completed by now.");
130Debug.Assert(task.Status != TaskStatus.RanToCompletion, "Task should not be completed successfully.");
217Debug.Assert(task != null, "Need a task to wait on");
218Debug.Assert(continuation != null, "Need a continuation to invoke when the wait completes");
298Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
366Debug.Assert(task != null, "Constructing an awaitable requires a task to await.");
394Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
476Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (14)
105Debug.Assert(_names.Length == _count, "[SerializationInfo.ExpandArrays]_names.Length == _count");
267Debug.Assert(null != name, "[SerializationInfo.UpdateValue]name!=null");
268Debug.Assert(null != value, "[SerializationInfo.UpdateValue]value!=null");
269Debug.Assert(type is not null, "[SerializationInfo.UpdateValue]type!=null");
310Debug.Assert(index < _values.Length, "[SerializationInfo.GetElement]index<_values.Length");
311Debug.Assert(index < _types.Length, "[SerializationInfo.GetElement]index<_types.Length");
314Debug.Assert(foundType is not null, "[SerializationInfo.GetElement]foundType!=null");
327Debug.Assert(index < _values.Length, "[SerializationInfo.GetElement]index<_values.Length");
328Debug.Assert(index < _types.Length, "[SerializationInfo.GetElement]index<_types.Length");
331Debug.Assert(foundType is not null, "[SerializationInfo.GetElement]foundType!=null");
349Debug.Assert(_converter != null, "[SerializationInfo.GetValue]_converter!=null");
355Debug.Assert(type is not null, "[SerializationInfo.GetValue]type ==null");
356Debug.Assert(type is RuntimeType, "[SerializationInfo.GetValue]type is not a runtime type");
367Debug.Assert(_converter != null, "[SerializationInfo.GetValue]_converter!=null");
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (12)
345Debug.Assert(searchSpaceLength >= Vector256<short>.Count, "We expect that the input is long enough for us to load a whole vector.");
398Debug.Assert(searchSpaceLength >= Vector128<short>.Count, "We expect that the input is long enough for us to load a whole vector.");
477Debug.Assert(searchSpaceLength >= Vector256<short>.Count, "We expect that the input is long enough for us to load a whole vector.");
528Debug.Assert(searchSpaceLength >= Vector128<short>.Count, "We expect that the input is long enough for us to load a whole vector.");
627Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128.");
676Debug.Assert(searchSpaceLength >= sizeof(ulong), "We expect that the input is long enough for us to load a ulong.");
752Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128.");
801Debug.Assert(searchSpaceLength >= sizeof(ulong), "We expect that the input is long enough for us to load a ulong.");
899Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128.");
951Debug.Assert(searchSpaceLength >= sizeof(ulong), "We expect that the input is long enough for us to load a ulong.");
1027Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128.");
1079Debug.Assert(searchSpaceLength >= sizeof(ulong), "We expect that the input is long enough for us to load a ulong.");
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (32)
1059Debug.Assert(length >= 0, "Expected non-negative length");
1074Debug.Assert(length >= 0, "Expected non-negative length");
1089Debug.Assert(length >= 0, "Expected non-negative length");
1105Debug.Assert(length >= 0, "Expected non-negative length");
1121Debug.Assert(length >= 0, "Expected non-negative length");
1139Debug.Assert(length >= 0, "Expected non-negative length");
1157Debug.Assert(length >= 0, "Expected non-negative length");
1176Debug.Assert(length >= 0, "Expected non-negative length");
1316Debug.Assert(length >= 0, "Expected non-negative length");
1317Debug.Assert(value is byte or short or int or long, "Expected caller to normalize to one of these types");
1496Debug.Assert(length >= 0, "Expected non-negative length");
1497Debug.Assert(value is byte or short or int or long, "Expected caller to normalize to one of these types");
1702Debug.Assert(length >= 0, "Expected non-negative length");
1703Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
1909Debug.Assert(length >= 0, "Expected non-negative length");
1910Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2101Debug.Assert(length >= 0, "Expected non-negative length");
2102Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2263Debug.Assert(length >= 0, "Expected non-negative length");
2264Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2429Debug.Assert(length >= 0, "Expected non-negative length");
2430Debug.Assert(value is byte or short or int or long, "Expected caller to normalize to one of these types");
2549Debug.Assert(length >= 0, "Expected non-negative length");
2550Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2734Debug.Assert(length >= 0, "Expected non-negative length");
2735Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2920Debug.Assert(length >= 0, "Expected non-negative length");
2921Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
3092Debug.Assert(Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported, "Vector128 is not HW-accelerated or not supported");
3149Debug.Assert(Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported, "Vector512 is not HW-accelerated or not supported");
3187Debug.Assert(length >= 0, "Expected non-negative length");
3188Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (64)
144Debug.Assert(0 < numBytesRead && numBytesRead <= Vector512.Size, "We should've made forward progress of at least one byte.");
145Debug.Assert((nuint)numBytesRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
148Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
152Debug.Assert((nuint)pBuffer % Vector512.Size == 0, "Vector read should be aligned.");
180Debug.Assert(0 < numBytesRead && numBytesRead <= Vector256.Size, "We should've made forward progress of at least one byte.");
181Debug.Assert((nuint)numBytesRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
184Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
188Debug.Assert((nuint)pBuffer % Vector256.Size == 0, "Vector read should be aligned.");
216Debug.Assert(0 < numBytesRead && numBytesRead <= Vector128.Size, "We should've made forward progress of at least one byte.");
217Debug.Assert((nuint)numBytesRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
220Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
224Debug.Assert((nuint)pBuffer % Vector128.Size == 0, "Vector read should be aligned.");
324Debug.Assert(!AllBytesInUInt32AreAscii(currentUInt32), "Shouldn't have reached this point if we have an all-ASCII input.");
358Debug.Assert(Sse2.IsSupported || AdvSimd.Arm64.IsSupported, "Sse2 or AdvSimd64 required.");
359Debug.Assert(BitConverter.IsLittleEndian, "This SSE2/Arm64 implementation assumes little-endian.");
416Debug.Assert(0 < numBytesRead && numBytesRead <= SizeOfVector128, "We should've made forward progress of at least one byte.");
417Debug.Assert((nuint)numBytesRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
583Debug.Assert(ContainsNonAsciiByte_Sse2(currentSseMask), "Shouldn't be here unless we see non-ASCII data.");
588Debug.Assert(ContainsNonAsciiByte_AdvSimd(currentAdvSimdIndex), "Shouldn't be here unless we see non-ASCII data.");
601Debug.Assert(!AllBytesInUInt32AreAscii(currentDWord), "Shouldn't be here unless we see non-ASCII data.");
760Debug.Assert(0 < numCharsRead && numCharsRead <= SizeOfVector512InChars, "We should've made forward progress of at least one char.");
761Debug.Assert((nuint)numCharsRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
764Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
768Debug.Assert((nuint)pBuffer % Vector512.Size == 0, "Vector read should be aligned.");
796Debug.Assert(0 < numCharsRead && numCharsRead <= SizeOfVector256InChars, "We should've made forward progress of at least one char.");
797Debug.Assert((nuint)numCharsRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
800Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
804Debug.Assert((nuint)pBuffer % Vector256.Size == 0, "Vector read should be aligned.");
831Debug.Assert(0 < numCharsRead && numCharsRead <= SizeOfVector128InChars, "We should've made forward progress of at least one char.");
832Debug.Assert((nuint)numCharsRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
835Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
839Debug.Assert((nuint)pBuffer % Vector128.Size == 0, "Vector read should be aligned.");
918Debug.Assert(totalNumBytesRead % sizeof(char) == 0, "Total number of bytes read should be even since we're working with chars.");
923Debug.Assert(!AllCharsInUInt32AreAscii(currentUInt32), "Shouldn't have reached this point if we have an all-ASCII input.");
951Debug.Assert(Sse2.IsSupported || AdvSimd.Arm64.IsSupported, "Should've been checked by caller.");
952Debug.Assert(BitConverter.IsLittleEndian, "This SSE2/Arm64 assumes little-endian.");
998Debug.Assert(0 < numCharsRead && numCharsRead <= SizeOfVector128InChars, "We should've made forward progress of at least one char.");
999Debug.Assert((nuint)numCharsRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
1077Debug.Assert(((nuint)pBuffer - (nuint)pOriginalBuffer) % 2 == 0, "Shouldn't have incremented any pointer by an odd byte count.");
1120Debug.Assert(currentMask != 0, "Shouldn't be here unless we see non-ASCII data.");
1145Debug.Assert(!AllCharsInUInt32AreAscii(currentDWord), "Shouldn't be here unless we see non-ASCII data.");
1481Debug.Assert(!AllCharsInUInt32AreAscii(utf16Data32BitsHigh), "Shouldn't have reached this point if we have an all-ASCII input.");
1697Debug.Assert(Vector128.IsHardwareAccelerated, "Vector128 is required.");
1698Debug.Assert(BitConverter.IsLittleEndian, "This implementation assumes little-endian.");
1750Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= SizeOfVector128, "We wrote at least 1 byte but no more than a whole vector.");
1751Debug.Assert(currentOffsetInElements <= elementCount, "Shouldn't have overrun the destination buffer.");
1752Debug.Assert(elementCount - currentOffsetInElements >= SizeOfVector128, "We should be able to run at least one whole vector.");
1770Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % SizeOfVector128 == 0, "Write should be aligned.");
1793Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % sizeof(ulong) == 0, "Destination should be ulong-aligned.");
1815Debug.Assert(Vector256.IsHardwareAccelerated, "Vector256 is required.");
1816Debug.Assert(BitConverter.IsLittleEndian, "This implementation assumes little-endian.");
1867Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= Vector256.Size, "We wrote at least 1 byte but no more than a whole vector.");
1868Debug.Assert(currentOffsetInElements <= elementCount, "Shouldn't have overrun the destination buffer.");
1869Debug.Assert(elementCount - currentOffsetInElements >= Vector256.Size, "We should be able to run at least one whole vector.");
1887Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector256.Size == 0, "Write should be aligned.");
1910Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector128.Size == 0, "Destination should be 128-bit-aligned.");
1932Debug.Assert(Vector512.IsHardwareAccelerated, "Vector512 is required.");
1933Debug.Assert(BitConverter.IsLittleEndian, "This implementation assumes little-endian.");
1985Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= Vector512.Size, "We wrote at least 1 byte but no more than a whole vector.");
1986Debug.Assert(currentOffsetInElements <= elementCount, "Shouldn't have overrun the destination buffer.");
1987Debug.Assert(elementCount - currentOffsetInElements >= Vector512.Size, "We should be able to run at least one whole vector.");
2005Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector512.Size == 0, "Write should be aligned.");
2028Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector256.Size == 0, "Destination should be 256-bit-aligned.");
2135Debug.Assert(!AllBytesInUInt32AreAscii(asciiData), "Shouldn't have reached this point if we have an all-ASCII input.");
src\libraries\System.Private.CoreLib\src\System\Text\ASCIIEncoding.cs (14)
156Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
157Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
349Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
350Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
351Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
352Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
408Debug.Assert(idx <= numElementsToConvert, "Somehow went beyond bounds of source or destination buffer?");
498Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
499Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
640Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
641Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
642Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
643Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
696Debug.Assert(idx <= numElementsToConvert, "Somehow went beyond bounds of source or destination buffer?");
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (59)
123Debug.Assert(encoder != null, "This code path should only be called from EncoderNLS.");
124Debug.Assert(charCount >= 0, "Caller should've checked this condition.");
125Debug.Assert(pChars != null || charCount == 0, "Cannot provide a null pointer and a non-zero count.");
231Debug.Assert(0 <= charsConsumedSoFar && charsConsumedSoFar < originalCharCount, "Invalid arguments provided to method.");
257Debug.Assert(encoder != null, "This code path should only be called from EncoderNLS.");
258Debug.Assert(0 <= charsConsumedSoFar && charsConsumedSoFar <= originalCharCount, "Caller should've checked this condition.");
313Debug.Assert(originalCharsLength >= 0, "Caller provided invalid parameter.");
347Debug.Assert(byteCountThisIteration >= 0, "Fallback shouldn't have returned a negative value.");
348Debug.Assert(charsConsumedThisIteration >= 0, "Fallback shouldn't have returned a negative value.");
370Debug.Assert(byteCountThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
371Debug.Assert(charsConsumedThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
385Debug.Assert(fallbackBuffer.Remaining == 0, "There should be no data in the fallback buffer after GetByteCount.");
400Debug.Assert(encoder != null, "This code path should only be called from EncoderNLS.");
401Debug.Assert(charCount >= 0, "Caller should've checked this condition.");
402Debug.Assert(pChars != null || charCount == 0, "Cannot provide a null pointer and a non-zero count.");
403Debug.Assert(byteCount >= 0, "Caller should've checked this condition.");
404Debug.Assert(pBytes != null || byteCount == 0, "Cannot provide a null pointer and a non-zero count.");
494Debug.Assert(0 <= charsConsumedSoFar && charsConsumedSoFar < originalCharCount, "Invalid arguments provided to method.");
495Debug.Assert(0 <= bytesWrittenSoFar && bytesWrittenSoFar <= originalByteCount, "Invalid arguments provided to method.");
524Debug.Assert(encoder != null, "This code path should only be called from EncoderNLS.");
525Debug.Assert(0 <= charsConsumedSoFar && charsConsumedSoFar <= originalCharCount, "Caller should've checked this condition.");
526Debug.Assert(0 <= bytesWrittenSoFar && bytesWrittenSoFar <= originalByteCount, "Caller should've checked this condition.");
589Debug.Assert(originalCharsLength >= 0, "Caller provided invalid parameter.");
590Debug.Assert(originalBytesLength >= 0, "Caller provided invalid parameter.");
608Debug.Assert(charsConsumedThisIteration == chars.Length, "If returning NeedMoreData, should out the entire buffer length as chars consumed.");
658Debug.Assert(bytesWrittenThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
659Debug.Assert(charsConsumedThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
697Debug.Assert(originalCharsLength >= chars.Length, "About to report a negative number of chars used?");
701Debug.Assert(fallbackBuffer.Remaining == 0 || encoder != null, "Shouldn't have any leftover data in fallback buffer unless an EncoderNLS is in use.");
716Debug.Assert(decoder != null, "This code path should only be called from DecoderNLS.");
717Debug.Assert(byteCount >= 0, "Caller should've checked this condition.");
718Debug.Assert(pBytes != null || byteCount == 0, "Cannot provide a null pointer and a non-zero count.");
725Debug.Assert(!decoder.InternalHasFallbackBuffer || decoder.FallbackBuffer.Remaining == 0, "Fallback buffer can't hold data between GetChars invocations.");
825Debug.Assert(0 <= bytesConsumedSoFar && bytesConsumedSoFar < originalByteCount, "Invalid arguments provided to method.");
851Debug.Assert(decoder != null, "This code path should only be called from DecoderNLS.");
852Debug.Assert(0 <= bytesConsumedSoFar && bytesConsumedSoFar <= originalByteCount, "Caller should've checked this condition.");
913Debug.Assert(originalBytesLength >= 0, "Caller provided invalid parameter.");
944Debug.Assert(charCountThisIteration >= 0, "Fallback shouldn't have returned a negative value.");
966Debug.Assert(charCountThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
967Debug.Assert(bytesConsumedThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
981Debug.Assert(fallbackBuffer.Remaining == 0, "There should be no data in the fallback buffer after GetCharCount.");
996Debug.Assert(decoder != null, "This code path should only be called from DecoderNLS.");
997Debug.Assert(byteCount >= 0, "Caller should've checked this condition.");
998Debug.Assert(pBytes != null || byteCount == 0, "Cannot provide a null pointer and a non-zero count.");
999Debug.Assert(charCount >= 0, "Caller should've checked this condition.");
1000Debug.Assert(pChars != null || charCount == 0, "Cannot provide a null pointer and a non-zero count.");
1090Debug.Assert(0 <= bytesConsumedSoFar && bytesConsumedSoFar < originalByteCount, "Invalid arguments provided to method.");
1091Debug.Assert(0 <= charsWrittenSoFar && charsWrittenSoFar <= originalCharCount, "Invalid arguments provided to method.");
1120Debug.Assert(decoder != null, "This code path should only be called from DecoderNLS.");
1121Debug.Assert(0 <= bytesConsumedSoFar && bytesConsumedSoFar <= originalByteCount, "Caller should've checked this condition.");
1122Debug.Assert(0 <= charsWrittenSoFar && charsWrittenSoFar <= originalCharCount, "Caller should've checked this condition.");
1146Debug.Assert(!decoder.InternalHasFallbackBuffer || decoder.FallbackBuffer.Remaining == 0, "Should be no remaining fallback data at this point.");
1190Debug.Assert(originalBytesLength >= 0, "Caller provided invalid parameter.");
1191Debug.Assert(originalCharsLength >= 0, "Caller provided invalid parameter.");
1210Debug.Assert(bytesConsumedThisIteration == bytes.Length, "If returning NeedMoreData, should out the entire buffer length as bytes consumed.");
1227Debug.Assert(charsWrittenThisIteration >= 0, "Fallback shouldn't have returned a negative value.");
1258Debug.Assert(charsWrittenThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
1259Debug.Assert(bytesConsumedThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
1294Debug.Assert(originalBytesLength >= bytes.Length, "About to report a negative number of bytes used?");
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (10)
108Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
109Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
295Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
296Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
297Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
298Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
601Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
602Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
603Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
604Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (22)
63Debug.Assert(0 < numCharsRead && numCharsRead <= SizeOfVectorInChars, "We should've made forward progress of at least one char.");
64Debug.Assert((nuint)numCharsRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
67Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
71Debug.Assert((nuint)pBuffer % SizeOfVectorInChars == 0, "Vector read should be aligned.");
149Debug.Assert(totalNumBytesRead % sizeof(char) == 0, "Total number of bytes read should be even since we're working with chars.");
154Debug.Assert(!AllCharsInUInt32AreLatin1(currentUInt32), "Shouldn't have reached this point if we have an all-Latin-1 input.");
184Debug.Assert(Sse2.IsSupported, "Should've been checked by caller.");
185Debug.Assert(BitConverter.IsLittleEndian, "SSE2 assumes little-endian.");
240Debug.Assert(0 < numCharsRead && numCharsRead <= SizeOfVector128InChars, "We should've made forward progress of at least one char.");
241Debug.Assert((nuint)numCharsRead <= bufferLength, "We shouldn't have read past the end of the input buffer.");
370Debug.Assert(((nuint)pBuffer - (nuint)pOriginalBuffer) % 2 == 0, "Shouldn't have incremented any pointer by an odd byte count.");
425Debug.Assert(currentMask != 0, "Shouldn't be here unless we see non-Latin-1 data.");
433Debug.Assert(!AllCharsInUInt32AreLatin1(currentDWord), "Shouldn't be here unless we see non-Latin-1 data.");
550Debug.Assert(BitConverter.IsLittleEndian, "Assume little endian if SSE2 is supported.");
746Debug.Assert(!AllCharsInUInt32AreLatin1(utf16Data32BitsHigh), "Shouldn't have reached this point if we have an all-Latin-1 input.");
862Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= SizeOfVector128, "We wrote at least 1 byte but no more than a whole vector.");
864Debug.Assert(currentOffsetInElements <= elementCount, "Shouldn't have overrun the destination buffer.");
865Debug.Assert(elementCount - currentOffsetInElements >= SizeOfVector128, "We should be able to run at least one whole vector.");
898Debug.Assert(((nuint)pLatin1Buffer + currentOffsetInElements) % SizeOfVector128 == 0, "Write should be aligned.");
933Debug.Assert(((nuint)pLatin1Buffer + currentOffsetInElements) % sizeof(ulong) == 0, "Destination should be ulong-aligned.");
1027Debug.Assert(elementCount - currentOffset < SizeOfVector128, "Case where 2 vectors remained should've been in the hot loop.");
1098Debug.Assert(elementCount - currentOffset < SizeOfVector, "Vectorized logic should result in less than a vector's length of data remaining.");
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (25)
238Debug.Assert(m_ChunkOffset + m_ChunkChars.Length >= m_ChunkOffset, "The length of the string is greater than int.MaxValue.");
431Debug.Assert(newLen == chunk.m_ChunkChars.Length, "The new chunk should be larger or equal to the one it is replacing.");
441Debug.Assert(Length == value, "Something went wrong setting Length.");
684Debug.Assert(repeatCount > 0, "Invalid length; should have been validated by caller.");
706Debug.Assert(m_ChunkLength == 0, "A new block was not created.");
1025Debug.Assert(m_ChunkLength == 0, "A new block was not created.");
1058Debug.Assert(typeof(T).Assembly.Equals(typeof(object).Assembly), "Implementation trusts the results of TryFormat because T is expected to be something known");
1071Debug.Assert(typeof(T).Assembly.Equals(typeof(object).Assembly), "Implementation trusts the results of TryFormat because T is expected to be something known");
1414Debug.Assert(typeof(T).Assembly.Equals(typeof(object).Assembly), "Implementation trusts the results of TryFormat because T is expected to be something known");
2103Debug.Assert(chunk != null, "chunk was null in replace");
2127Debug.Assert(count >= 0, "count should never go negative");
2183Debug.Assert(chunk != null || count == 0, "Chunks ended prematurely!");
2269Debug.Assert(valueCount >= 0, "Invalid length; should have been validated by caller.");
2321Debug.Assert(m_ChunkLength == 0, "A new block was not created.");
2338Debug.Assert((uint)index <= (uint)Length, "Callers should check that index is a legal value.");
2392Debug.Assert(gapStart < sourceChunk.m_ChunkChars.Length, "gap starts at end of buffer. Should not happen");
2393Debug.Assert(gapStart <= gapEnd, "negative gap size");
2394Debug.Assert(gapEnd <= sourceChunk.m_ChunkLength, "gap too big");
2403Debug.Assert(targetIndexInChunk <= targetChunk.m_ChunkLength, "gap not in chunk");
2472Debug.Assert(chunk != null, "chunk should not be null at this point");
2474Debug.Assert(lengthInChunk >= 0, "Index isn't in the chunk.");
2548Debug.Assert(Capacity == Length, nameof(ExpandByABlock) + " should only be called when there is no space left.");
2765Debug.Assert(chunk != null, "We fell off the beginning of the string!");
2797Debug.Assert(chunk != null, "We fell off the beginning of the string!");
3139Debug.Assert(formatter != null, "An incorrectly written provider said it implemented ICustomFormatter, and then didn't");
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Transcoding.cs (10)
22Debug.Assert(inputLength >= 0, "Input length must not be negative.");
23Debug.Assert(pInputBuffer != null || inputLength == 0, "Input length must be zero if input buffer pointer is null.");
25Debug.Assert(outputCharsRemaining >= 0, "Destination length must not be negative.");
26Debug.Assert(pOutputBuffer != null || outputCharsRemaining == 0, "Destination length must be zero if destination buffer pointer is null.");
72Debug.Assert(pLastBufferPosProcessed < pInputBuffer, "Algorithm should've made forward progress since last read.");
842Debug.Assert(inputLength >= 0, "Input length must not be negative.");
843Debug.Assert(pInputBuffer != null || inputLength == 0, "Input length must be zero if input buffer pointer is null.");
845Debug.Assert(outputBytesRemaining >= 0, "Destination length must not be negative.");
846Debug.Assert(pOutputBuffer != null || outputBytesRemaining == 0, "Destination length must be zero if destination buffer pointer is null.");
906Debug.Assert(pLastBufferPosProcessed < pInputBuffer, "Algorithm should've made forward progress since last read.");
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (32)
347Debug.Assert(chars is not null, "[UnicodeEncoding.GetByteCount]chars!=null");
348Debug.Assert(count >= 0, "[UnicodeEncoding.GetByteCount]count >=0");
491Debug.Assert(chars > charStart,
559Debug.Assert(chars > charStart,
626Debug.Assert(fallbackBuffer is null || fallbackBuffer.Remaining == 0,
636Debug.Assert(chars is not null, "[UnicodeEncoding.GetBytes]chars!=null");
637Debug.Assert(byteCount >= 0, "[UnicodeEncoding.GetBytes]byteCount >=0");
638Debug.Assert(charCount >= 0, "[UnicodeEncoding.GetBytes]charCount >=0");
639Debug.Assert(bytes is not null, "[UnicodeEncoding.GetBytes]bytes!=null");
776Debug.Assert(chars > charStart,
844Debug.Assert(chars > charStart + 1 || bytes == byteStart,
873Debug.Assert(chars > charStart,
908Debug.Assert(chars > charStart,
975Debug.Assert((encoder is not null && !encoder.MustFlush) || charLeftOver == (char)0,
978Debug.Assert(fallbackBuffer is null || fallbackBuffer.Remaining == 0 ||
987Debug.Assert(bytes is not null, "[UnicodeEncoding.GetCharCount]bytes!=null");
988Debug.Assert(count >= 0, "[UnicodeEncoding.GetCharCount]count >=0");
1022Debug.Assert(!decoder.InternalHasFallbackBuffer || decoder.FallbackBuffer.Remaining == 0,
1293Debug.Assert(fallbackBuffer is null || fallbackBuffer.Remaining == 0,
1302Debug.Assert(chars is not null, "[UnicodeEncoding.GetChars]chars!=null");
1303Debug.Assert(byteCount >= 0, "[UnicodeEncoding.GetChars]byteCount >=0");
1304Debug.Assert(charCount >= 0, "[UnicodeEncoding.GetChars]charCount >=0");
1305Debug.Assert(bytes is not null, "[UnicodeEncoding.GetChars]bytes!=null");
1321Debug.Assert(!decoder.InternalHasFallbackBuffer || decoder.FallbackBuffer.Remaining == 0,
1473Debug.Assert(bytes >= byteStart + 2 || chars == charStart,
1522Debug.Assert(bytes >= byteStart + 2 || chars == charStart,
1539Debug.Assert(bytes >= byteStart + 2 || chars == charStart,
1581Debug.Assert(bytes >= byteStart + 2 || chars == charStart,
1598Debug.Assert(bytes >= byteStart + 2 || chars == charStart,
1643Debug.Assert(bytes >= byteStart + 2 || chars == charStart,
1699Debug.Assert(!decoder.MustFlush || ((lastChar == (char)0) && (lastByte == -1)),
1709Debug.Assert(fallbackBuffer is null || fallbackBuffer.Remaining == 0,
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (25)
355Debug.Assert(chars is not null, "[UTF32Encoding.GetByteCount]chars!=null");
356Debug.Assert(count >= 0, "[UTF32Encoding.GetByteCount]count >=0");
419Debug.Assert(chars > charStart,
477Debug.Assert(fallbackBuffer.Remaining == 0,
487Debug.Assert(chars is not null, "[UTF32Encoding.GetBytes]chars!=null");
488Debug.Assert(bytes is not null, "[UTF32Encoding.GetBytes]bytes!=null");
489Debug.Assert(byteCount >= 0, "[UTF32Encoding.GetBytes]byteCount >=0");
490Debug.Assert(charCount >= 0, "[UTF32Encoding.GetBytes]charCount >=0");
560Debug.Assert(chars > charStart + 1 || bytes == byteStart,
588Debug.Assert(chars > charStart,
633Debug.Assert(chars > charStart,
670Debug.Assert(highSurrogate == 0 || (encoder is not null && !encoder.MustFlush),
688Debug.Assert(bytes is not null, "[UTF32Encoding.GetCharCount]bytes!=null");
689Debug.Assert(count >= 0, "[UTF32Encoding.GetCharCount]count >=0");
714Debug.Assert(fallbackBuffer.Remaining == 0,
821Debug.Assert(fallbackBuffer.Remaining == 0,
831Debug.Assert(chars is not null, "[UTF32Encoding.GetChars]chars!=null");
832Debug.Assert(bytes is not null, "[UTF32Encoding.GetChars]bytes!=null");
833Debug.Assert(byteCount >= 0, "[UTF32Encoding.GetChars]byteCount >=0");
834Debug.Assert(charCount >= 0, "[UTF32Encoding.GetChars]charCount >=0");
863Debug.Assert(fallbackBuffer.Remaining == 0,
928Debug.Assert(bytes >= byteStart + 4 || chars == charStart,
951Debug.Assert(bytes >= byteStart + 4 || chars == charStart,
968Debug.Assert(bytes >= byteStart + 4 || chars == charStart,
1036Debug.Assert(fallbackBuffer.Remaining == 0,
src\libraries\System.Private.CoreLib\src\System\Text\UTF7Encoding.cs (14)
391Debug.Assert(chars is not null, "[UTF7Encoding.GetByteCount]chars!=null");
392Debug.Assert(count >= 0, "[UTF7Encoding.GetByteCount]count >=0");
401Debug.Assert(byteCount >= 0, "[UTF7Encoding.GetBytes]byteCount >=0");
402Debug.Assert(chars is not null, "[UTF7Encoding.GetBytes]chars!=null");
403Debug.Assert(charCount >= 0, "[UTF7Encoding.GetBytes]charCount >=0");
540Debug.Assert(count >= 0, "[UTF7Encoding.GetCharCount]count >=0");
541Debug.Assert(bytes is not null, "[UTF7Encoding.GetCharCount]bytes!=null");
550Debug.Assert(byteCount >= 0, "[UTF7Encoding.GetChars]byteCount >=0");
551Debug.Assert(bytes is not null, "[UTF7Encoding.GetChars]bytes!=null");
552Debug.Assert(charCount >= 0, "[UTF7Encoding.GetChars]charCount >=0");
571Debug.Assert(!firstByte || decoder.bitCount <= 0,
849Debug.Assert(iCount < 0, "[DecoderUTF7FallbackBuffer.Fallback] Can't have recursive fallbacks");
850Debug.Assert(bytesUnknown.Length == 1, "[DecoderUTF7FallbackBuffer.Fallback] Only possible fallback case should be 1 unknown byte");
902Debug.Assert(iCount < 0, "[DecoderUTF7FallbackBuffer.InternalFallback] Can't have recursive fallbacks");
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (12)
206Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
207Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
396Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
397Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
398Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
399Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
598Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
599Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
600Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
601Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
716Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
717Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (13)
370Debug.Assert(m_asyncTail is not null, "tail should not be null if head isn't");
402Debug.Assert(!waitSuccessful || m_currentCount > 0,
652Debug.Assert(m_currentCount == 0, "m_currentCount should never be negative");
665Debug.Assert(Monitor.IsEntered(m_lockObjAndDisposed), "Requires the lock be held");
673Debug.Assert(m_asyncTail is null, "If head is null, so too should be tail");
679Debug.Assert(m_asyncTail is not null, "If head is not null, neither should be tail");
694Debug.Assert(task is not null, "Expected non-null task");
695Debug.Assert(Monitor.IsEntered(m_lockObjAndDisposed), "Requires the lock be held");
705Debug.Assert((m_asyncHead is null) == (m_asyncTail is null), "Head is null iff tail is null");
721Debug.Assert(asyncWaiter is not null, "Waiter should have been constructed");
722Debug.Assert(Monitor.IsEntered(m_lockObjAndDisposed), "Requires the lock be held");
839Debug.Assert(m_asyncTail is not null, "tail should not be null if head isn't null");
913Debug.Assert(obj is SemaphoreSlim, "Expected a SemaphoreSlim");
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (25)
200Debug.Assert(ReadyToComplete, "The block must be ready to complete to be here.");
213Debug.Assert(!localThis.m_completionState!.IsCompleted, "Completion should only happen once.");
219Debug.Assert(success, "Expected to complete completion task.");
230Debug.Assert(faultedTask != null && faultedTask.IsFaulted && faultedTask.Exception!.InnerExceptionCount > 0,
340else Debug.Assert(m_processingCount == EXCLUSIVE_PROCESSING_SENTINEL, "The processing count must be the sentinel if it's not >= 0.");
364Debug.Assert(m_processingCount == EXCLUSIVE_PROCESSING_SENTINEL, "Processing exclusive tasks requires being in exclusive mode.");
365Debug.Assert(!m_exclusiveTaskScheduler.m_tasks.IsEmpty, "Processing exclusive tasks requires tasks to be processed.");
370Debug.Assert(m_threadProcessingMode.Value == ProcessingMode.NotCurrentlyProcessing,
388Debug.Assert(m_threadProcessingMode.Value == ProcessingMode.ProcessingExclusiveTask,
399Debug.Assert(m_processingCount == EXCLUSIVE_PROCESSING_SENTINEL, "The processing mode should not have deviated from exclusive.");
412Debug.Assert(m_processingCount > 0, "Processing concurrent tasks requires us to be in concurrent mode.");
417Debug.Assert(m_threadProcessingMode.Value == ProcessingMode.NotCurrentlyProcessing,
446Debug.Assert(m_threadProcessingMode.Value == ProcessingMode.ProcessingConcurrentTasks,
457Debug.Assert(m_processingCount > 0, "The procesing mode should not have deviated from concurrent.");
524Debug.Assert(pair != null, "Scheduler must be associated with a valid pair.");
525Debug.Assert(processingMode == ProcessingMode.ProcessingConcurrentTasks || processingMode == ProcessingMode.ProcessingExclusiveTask,
527Debug.Assert(
547Debug.Assert(task != null, "Infrastructure should have provided a non-null task.");
563Debug.Assert(task != null, "Infrastructure should have provided a non-null task.");
573Debug.Assert(task != null, "Infrastructure should have provided a non-null task.");
647Debug.Assert(t.IsFaulted, "Task should be faulted due to the scheduler faulting it and throwing the exception.");
671Debug.Assert(scheduler != null, "Need a scheduler with which to construct the debug view.");
694Debug.Assert(pair != null, "Need a pair with which to construct the debug view.");
734Debug.Assert(syncObj != null, "The monitor object to check must be provided.");
735Debug.Assert(Monitor.IsEntered(syncObj) == held, "The locking scheme was not correctly followed.");
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (22)
497Debug.Assert((endFunction != null) != (endAction != null), "Expected exactly one of endFunction/endAction to be non-null");
641Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
761Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
783Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
878Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
900Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
1003Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
1025Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
1136Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
1158Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
1197Debug.Assert(thisRef != null, "Expected a non-null thisRef");
1198Debug.Assert(beginMethod != null, "Expected a non-null beginMethod");
1199Debug.Assert(endMethod != null, "Expected a non-null endMethod");
1212Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
1240Debug.Assert(thisRef != null, "Expected a non-null thisRef");
1241Debug.Assert(endMethod != null, "Expected a non-null endMethod");
1287Debug.Assert(!IsCompleted, "The task should not have been completed yet.");
1316Debug.Assert(successfullySet, "Expected the task to not yet be completed");
1608Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
1655Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
1979Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
2029Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (86)
187Debug.Assert(task != null, "Null Task objects can't be added to the ActiveTasks collection");
328Debug.Assert(promiseStyle, "Promise CTOR: promiseStyle was false");
521Debug.Assert(m_contingentProperties == null || m_contingentProperties.m_capturedContext == null,
565Debug.Assert(illegalInternalOptions == 0, "TaskConstructorCore: Illegal internal options");
569Debug.Assert(m_stateFlags == 0, "TaskConstructorCore: non-zero m_stateFlags");
570Debug.Assert((((int)creationOptions) | (int)TaskStateFlags.OptionsMask) == (int)TaskStateFlags.OptionsMask, "TaskConstructorCore: options take too many bits");
597Debug.Assert((internalOptions & InternalTaskOptions.ContinuationTask) == 0, "TaskConstructorCore: Did not expect to see cancelable token for continuation task.");
685Debug.Assert(((int)TaskStateFlags.OptionsMask & 1) == 1, "OptionsMask needs a shift in Options.get");
740Debug.Assert((Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) != 0,
748Debug.Assert(success, "Tried to set enabled on completed Task");
778Debug.Assert(tasks != null, "Expected non-null array of tasks");
815Debug.Assert(isWaitNotificationEnabled, "Should only be called if the wait completion bit is set.");
834Debug.Assert(IsWaitNotificationEnabled, "Should only be called if the wait completion bit is set.");
875Debug.Assert(InternalCurrent == this, "Task.AddNewChild(): Called from an external context");
896Debug.Assert(InternalCurrent == this, "Task.DisregardChild(): Called from an external context");
899Debug.Assert(props.m_completionCountdown >= 2, "Task.DisregardChild(): Expected parent count to be >= 2");
1044Debug.Assert(scheduler != null, "Task.InternalRunSynchronously(): null TaskScheduler");
1114Debug.Assert(
1131Debug.Assert((m_stateFlags & (int)TaskStateFlags.Canceled) != 0, "Task.RunSynchronously: expected TaskStateFlags.Canceled to be set");
1261Debug.Assert((e == null) || IsFaulted, "Task.Exception_get(): returning non-null value when not Faulted");
1661Debug.Assert(m_taskScheduler != null, "expected a task scheduler to have been selected");
1662Debug.Assert((m_stateFlags & (int)TaskStateFlags.Started) == 0, "task has already started");
1684Debug.Assert(m_action != null, "Must have a delegate to be in ScheduleAndStart");
1709Debug.Assert(
1729Debug.Assert(exceptionObject != null, "Task.AddException: Expected a non-null exception object");
1740Debug.Assert(exceptionObject != null, "Task.AddException: Expected a non-null exception object");
1748Debug.Assert(
1754Debug.Assert(
1846Debug.Assert(m_contingentProperties != null && m_contingentProperties.m_exceptionsHolder != null, "ExceptionRecorded should imply this");
1864Debug.Assert(IsFaulted && ExceptionRecorded, "Must only be used when the task has faulted with exceptions.");
1872Debug.Assert(IsCanceled, "Must only be used when the task has canceled.");
1887Debug.Assert(IsCompleted, "ThrowIfExceptional(): Expected IsCompleted == true");
2155Debug.Assert(childTask.IsCompleted, "ProcessChildCompletion was called for an uncompleted task");
2157Debug.Assert(childTask.m_contingentProperties?.m_parent == this, "ProcessChildCompletion should only be called for a child of this task");
2217Debug.Assert(task.IsCompleted, "Expected all tasks in list to be completed");
2394Debug.Assert(m_action != null, "Null action in InnerInvoke()");
2531Debug.Assert(!flowExecutionContext, "We already determined we're not required to flow context.");
2630Debug.Assert(waitResult, "expected wait to succeed");
2786Debug.Assert((m_stateFlags & (int)TaskStateFlags.Faulted) == 0, "Task.Wait() completing when in Faulted state.");
3172Debug.Assert((Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) == 0, "Task.InternalCancel() did not expect promise-style task");
3244Debug.Assert((m_stateFlags & IllegalFlags) == 0, "The continuation was in an invalid state.");
3245Debug.Assert((m_stateFlags & (int)TaskStateFlags.WaitingForActivation) != 0, "Expected continuation to be waiting for activation");
3264Debug.Assert((Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) != 0, "Task.RecordInternalCancellationRequest(CancellationToken) only valid for promise-style task");
3284Debug.Assert(edi != null, "Expected either an OCE or an EDI");
3286Debug.Assert(oce != null, "Expected EDI to contain an OCE");
3288Debug.Assert(oce.CancellationToken == tokenToRecord,
3299Debug.Assert((m_stateFlags & ((int)TaskStateFlags.Canceled | (int)TaskStateFlags.CompletionReserved)) != 0, "Task.CancellationCleanupLogic(): Task not canceled or reserved.");
3331Debug.Assert(this == InternalCurrent, "SetCancellationAcknowledged() should only be called while this is still the current task");
3332Debug.Assert(IsCancellationRequested, "SetCancellationAcknowledged() should not be called if the task's CT wasn't signaled");
3369Debug.Assert(exceptionObject != null, "Expected non-null exceptionObject argument");
3372Debug.Assert(
3414Debug.Assert(
4458Debug.Assert(continuationTask != null, "Task.ContinueWithCore(): null continuationTask");
4459Debug.Assert(scheduler != null, "Task.ContinueWithCore(): null scheduler");
4460Debug.Assert(!continuationTask.IsCompleted, "Did not expect continuationTask to be completed");
4542Debug.Assert(tc != null, "Expected non-null tc object in AddTaskContinuationComplex");
4545Debug.Assert(oldValue is not null, "Expected non-null m_continuationObject object");
4581Debug.Assert(oldValue == s_taskCompletionSentinel, "Expected m_continuationObject to be list or sentinel");
4718Debug.Assert(waitResult, "expected wait to succeed");
4741Debug.Assert(waitResult, "expected wait to succeed");
5063Debug.Assert(exceptions != null, "Should have seen at least one exception");
5092Debug.Assert(tasks != null, "Expected a non-null list of tasks");
5093Debug.Assert(tasks.Count > 0, "Expected at least one task");
5139Debug.Assert(count > 0, "Expected count > 0");
5146Debug.Assert(_count >= 0, "Count should never go below 0");
5189Debug.Assert(tasks.Length == 0 || waitResult != -1, "expected wait to succeed");
5451Debug.Assert(succeeded, "This should always succeed on a new task.");
5465Debug.Assert(succeeded, "This should always succeed on a new task.");
5499Debug.Assert(succeeded, "This should always succeed on a new task.");
5513Debug.Assert(succeeded, "This should always succeed on a new task.");
6042Debug.Assert(tasks.Length != 0, "Expected a non-zero length task array");
6043Debug.Assert(m_stateObject is null, "Expected to be able to use the state object field for faulted/canceled tasks.");
6188Debug.Assert(observedExceptions.Count > 0, "Expected at least one exception");
6203Debug.Assert(_remainingToComplete >= 0, "Count should never go below 0");
6396Debug.Assert(tasks != null, "Expected a non-null task array");
6397Debug.Assert(tasks.Length > 0, "Expected a non-zero length task array");
6435Debug.Assert(task != null, "Constituent task in WhenAll should never be null");
6460Debug.Assert(observedExceptions.Count > 0, "Expected at least one exception");
6481Debug.Assert(m_count >= 0, "Count should never go below 0");
6682Debug.Assert(success, "Only one task should have gotten to this point, and thus this must be successful.");
7394Debug.Assert(outerTask != null, "Expected non-null outerTask");
7448Debug.Assert(result, "Expected TrySetFromTask from inner task to succeed");
7475Debug.Assert(task != null && task.IsCompleted, "Expected non-null, completed outer task");
7476Debug.Assert(_state == STATE_WAITING_ON_OUTER_TASK, "We're in the wrong state!");
7488Debug.Assert(result, "Expected TrySetFromTask from outer task to succeed");
7505Debug.Assert(task != null && task.IsCompleted, "TrySetFromTask: Expected task to have completed.");
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (11)
18Debug.Assert(action is Action<Task> || action is Action<Task, object?>,
31Debug.Assert(antecedent != null,
64Debug.Assert(function is Func<Task, TResult> || function is Func<Task, object?, TResult>,
77Debug.Assert(antecedent != null,
110Debug.Assert(action is Action<Task<TAntecedentResult>> || action is Action<Task<TAntecedentResult>, object?>,
123Debug.Assert(antecedent != null,
156Debug.Assert(function is Func<Task<TAntecedentResult>, TResult> || function is Func<Task<TAntecedentResult>, object?, TResult>,
169Debug.Assert(antecedent != null,
274Debug.Assert(task != null, "TaskContinuation ctor: task is null");
275Debug.Assert(scheduler != null, "TaskContinuation ctor: scheduler is null");
292Debug.Assert(completedTask.IsCompleted, "ContinuationTask.Run(): completedTask not completed");
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (17)
47Debug.Assert(task != null, "Expected a non-null task.");
92Debug.Assert(exceptionObject != null, "TaskExceptionHolder.Add(): Expected a non-null exceptionObject");
93Debug.Assert(
109Debug.Assert(exceptionObject != null, "Expected exceptionObject to be non-null.");
111Debug.Assert(m_cancellationException == null,
116Debug.Assert(m_faultExceptions == null,
129Debug.Assert(edi != null && edi.SourceException is OperationCanceledException,
145Debug.Assert(exceptionObject != null, "AddFaultException(): Expected a non-null exceptionObject");
173Debug.Assert(exc != null, "No exceptions should be null");
179Debug.Assert(numExceptions > 0, "Collection should contain at least one exception.");
189Debug.Assert(exceptions.Count > 0, "There should be at least one dispatch info.");
192Debug.Assert(tmp != null, "No dispatch infos should be null");
255Debug.Assert(exceptions != null, "Expected an initialized list.");
256Debug.Assert(exceptions.Count > 0, "Expected at least one exception.");
284Debug.Assert(exceptions != null, "Expected an initialized list.");
285Debug.Assert(exceptions.Count > 0, "Expected at least one exception.");
300Debug.Assert(edi == null || edi.SourceException is OperationCanceledException,
System.Private.CoreLib.Generators (1)
System.Private.DataContractSerialization (19)
System.Private.Uri (9)
System.Private.Windows.Core (4)
System.Private.Windows.GdiPlus (2)
System.Private.Xml (437)
System\Xml\Cache\XPathNodeHelper.cs (21)
70Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
89Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
109Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
138Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
161Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
179Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
194Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
228Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
261Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
299Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
331Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
394Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
428Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)");
527Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)");
528Debug.Assert(typ != XPathNodeType.Text, "Text should be handled by GetTextFollowing in order to take into account collapsed text.");
529Debug.Assert(page[idx].NodeType != XPathNodeType.Attribute, "Current node should never be an attribute or namespace--caller should handle this case.");
566Debug.Assert(!page[idx].IsAttrNmsp, "GetContentFollowing should never return attributes or namespaces.");
585Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)");
586Debug.Assert(!page[idx].IsAttrNmsp, "Current node should never be an attribute or namespace--caller should handle this case.");
662Debug.Assert(pageNode[idxNode].HasAttribute || pageNode[idxNode].HasContentChild, "Caller must check HasAttribute/HasContentChild on parent before calling GetChild.");
663Debug.Assert(pageNode[idxNode].HasAttribute || !pageNode[idxNode].HasCollapsedText, "Text child is virtualized and therefore is not present in the physical node page.");
System\Xml\Core\XmlTextReaderImpl.cs (23)
763Debug.Assert(baseUriStr == string.Empty, "BaseURI can come either from XmlParserContext or from the constructor argument, not from both");
2008Debug.Assert(_v1Compat, "XmlTextReaderImpl.Normalization property cannot be accessed on reader created via XmlReader.Create.");
2013Debug.Assert(_v1Compat, "XmlTextReaderImpl.Normalization property cannot be changed on reader created via XmlReader.Create.");
2041Debug.Assert(_v1Compat, "XmlTextReaderImpl.WhitespaceHandling property cannot be accessed on reader created via XmlReader.Create.");
2046Debug.Assert(_v1Compat, "XmlTextReaderImpl.WhitespaceHandling property cannot be changed on reader created via XmlReader.Create.");
2066Debug.Assert(_v1Compat, "XmlTextReaderImpl.DtdProcessing property cannot be accessed on reader created via XmlReader.Create.");
2071Debug.Assert(_v1Compat, "XmlTextReaderImpl.DtdProcessing property cannot be changed on reader created via XmlReader.Create.");
2123Debug.Assert(_v1Compat, "XmlTextReaderImpl.ResetState cannot be called on reader created via XmlReader.Create.");
2165Debug.Assert(_v1Compat, "XmlTextReaderImpl.GetRemainder cannot be called on reader created via XmlReader.Create.");
2206Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadChars cannot be called on reader created via XmlReader.Create.");
2242Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadBase64 cannot be called on reader created via XmlReader.Create.");
2276Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadBinHex cannot be called on reader created via XmlReader.Create.");
3286Debug.Assert(_ps.appendMode, "UnDecodeChars cannot be called after ps.appendMode has been changed to false");
3288Debug.Assert(_ps.charsUsed >= _ps.charPos, "The current position must be in the valid character range.");
3296Debug.Assert(_charactersInDocument >= _ps.charsUsed - _ps.charPos,
3305Debug.Assert(_charactersFromEntities >= _ps.charsUsed - _ps.charPos,
4887Debug.Assert(val == XmlComplianceUtil.CDataNormalize(val), "The attribute value is not CDATA normalized!");
7967Debug.Assert(_xmlResolver.SupportsType(uri, typeof(Stream)), "Stream must always be a supported type in XmlResolver");
8511Debug.Assert(count == charsParsed || _incReadDecoder.IsFull, "Check if decoded consumed all characters unless it's full.");
8528Debug.Assert(IncrementalRead() == 0, "Previous call of IncrementalRead should eat up all characters!");
8590Debug.Assert(_ps.eolNormalized, "Entity replacement text for attribute values should be EOL-normalized!");
9023Debug.Assert(context.NameTable == null || context.NameTable == nt, "This check should have been done in XmlParserContext constructor.");
9122Debug.Assert(_curNode.type == XmlNodeType.Whitespace && newNodeType == XmlNodeType.SignificantWhitespace, "Incorrect node type change!");
System\Xml\Schema\XmlValueConverter.cs (6)
235Debug.Assert(schemaType != null && datatype != null, "schemaType or schemaType.Datatype may not be null");
242Debug.Assert(schemaType.Datatype!.Variety != XmlSchemaDatatypeVariety.List, "schemaType must be list's item type, not list itself");
435Debug.Assert(_typeCode == XmlTypeCode.Item, "If SchemaType is null, then TypeCode may only be Item, Node, or AnyAtomicType");
2919Debug.Assert(!(atomicConverter is XmlListConverter) || ((XmlListConverter)atomicConverter).atomicConverter == null,
3051Debug.Assert(enumSrc != null, "Value passed to ToArray must implement IEnumerable");
3079Debug.Assert(enumSrc != null, "Value passed to ToArray must implement IEnumerable");
System\Xml\Xsl\IlGen\XmlILConstructAnalyzer.cs (15)
130Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
143Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
156Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
169Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
182Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
195Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
219Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
243Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
268Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
297Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
311Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
325Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
339Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
353Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
1095Debug.Assert(nd.NodeType != QilNodeType.NamespaceDecl || !_nsmgr.HasNamespace(prefix) || _nsmgr.LookupNamespace(prefix) == ns,
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (32)
76Debug.Assert(_iterCurr.Storage.Location == ItemLocation.None, "Root expression should have been pushed to the writer.");
97Debug.Assert(methGlobal != null, "Metadata for global value should have already been computed");
149Debug.Assert(iter.XmlType == TypeFactory.ItemS, "IlGen currently only supports parameters of type item*.");
193Debug.Assert(iter.NodeType == QilNodeType.Parameter, "Only parameters may not have a default value");
253Debug.Assert(iter.XmlType == TypeFactory.ItemS, "IlGen currently only supports default values in parameters of type item*.");
318Debug.Assert(nd.XmlType!.IsSingleton || CachesResult(nd) || _iterCurr.HasLabelNext,
981Debug.Assert(ndBranch.XmlType!.IsSingleton, "Conditional must produce a singleton");
1144Debug.Assert(XmlILConstructInfo.Read(nd).PullFromIteratorFirst, "VisitEmpty should only be called if items are iterated");
1165Debug.Assert(XmlILConstructInfo.Read(ndSeq).ConstructMethod == XmlILConstructMethod.Iterator, "This method should only be called if items in list are pulled from a code iterator.");
1509Debug.Assert(!ndStrConcat.Values.XmlType!.IsSingleton, "Optimizer should have folded StrConcat of a singleton value");
1713Debug.Assert(ndComp.Left.XmlType!.IsAtomicValue && ndComp.Right.XmlType!.IsAtomicValue, "Operands to compare must be atomic values.");
1714Debug.Assert(ndComp.Left.XmlType.IsSingleton && ndComp.Right.XmlType.IsSingleton, "Operands to compare must be cardinality one.");
1715Debug.Assert(ndComp.Left.XmlType == ndComp.Right.XmlType, "Operands to compare may not be heterogenous.");
2330Debug.Assert(ndKey.Key.XmlType!.IsAtomicValue, "Sort key must be an atomic value.");
2437Debug.Assert(pattStep.MatchesPattern(OptimizerPatternName.Axis), "Dod patterns should only match if step is FilterElements or FilterKindTest or Axis");
2523Debug.Assert(_iterCurr.Storage.IsCached, "DodMerge pattern should only be matched when cached sequences are returned from loop");
2600Debug.Assert(ndName != null, "Attribute node must have a literal QName as its second argument");
2780Debug.Assert(XmlILConstructInfo.Read(ndElem).PushToWriterFirst, "Element construction should always be pushed to writer.");
2830Debug.Assert(XmlILConstructInfo.Read(ndAttr).PushToWriterFirst, "Attribute construction should always be pushed to writer.");
2864Debug.Assert(XmlILConstructInfo.Read(ndComment).PushToWriterFirst, "Comment construction should always be pushed to writer.");
2884Debug.Assert(XmlILConstructInfo.Read(ndPI).PushToWriterFirst, "PI construction should always be pushed to writer.");
2924Debug.Assert(info.PushToWriterFirst, "Text construction should always be pushed to writer.");
2984Debug.Assert(XmlILConstructInfo.Read(ndDoc).PushToWriterFirst, "Document root construction should always be pushed to writer.");
3007Debug.Assert(info.PushToWriterFirst, "Namespace construction should always be pushed to writer.");
3181Debug.Assert(!typDerived!.NeverSubtypeOf(typBase), "Normalizer should have eliminated IsType where source can never be a subtype of destination type.");
3187Debug.Assert(_iterCurr.Storage.ItemStorageType == typeof(XPathItem), "If !IsNode, then storage type should be Item");
3263Debug.Assert((typDerived.NodeKinds & kinds) != XmlNodeKindFlags.None, "Normalizer should have taken care of case where node kinds are disjoint.");
3439Debug.Assert(ndVal.Child.XmlType!.IsNode, "XPathNodeValue node may only be applied to a sequence of Nodes.");
3649Debug.Assert(ndActualArg.XmlType!.IsSubtypeOf(xmlTypeFormalArg), "Xml type of actual arg must be a subtype of the Xml type of the formal arg");
3779Debug.Assert(XmlILConstructInfo.Read(ndCopyOf).PushToWriterFirst, "XsltCopyOf should always be pushed to writer.");
4105Debug.Assert(ndName.XmlType!.TypeCode == XmlTypeCode.QName, "Element or attribute name must have QName type.");
4853Debug.Assert(_iterCurr.Storage.IsCached, "Expression result should be cached. CachesResult() might have a bug in it.");
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (14)
162Debug.Assert(prefix != null && !string.IsNullOrEmpty(localName) && ns != null, "Invalid argument");
163Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Element, ValidateNames.Flags.All), "Name validation failed");
221Debug.Assert(prefix != null && localName != null && ns != null, "Invalid argument");
595Debug.Assert(_depth == 0, "Root node can only be constructed at top-level.");
608Debug.Assert(_depth == 1, "Root node can only be constructed at top-level.");
746Debug.Assert(prefix != null, "Invalid argument");
884Debug.Assert(_xstate == XmlState.WithinSequence, "Values can only be written at the top-level.");
938Debug.Assert(navigator.NodeType == XPathNodeType.Element, "StartCopy should return true only for Element nodes.");
957Debug.Assert(navigator.NodeType == XPathNodeType.Root, "EndCopy should only be called for Element and Document nodes.");
980Debug.Assert(text != null, "Invalid argument");
1044Debug.Assert(nodeType == XPathNodeType.Element, "StartCopy should return true only for Element nodes.");
1175Debug.Assert(_xstate != XmlState.WithinSequence, "StartCopy should not called if state is WithinSequence");
1219Debug.Assert(navigator.NodeType == XPathNodeType.Element, "Only elements have namespaces to copy");
1224Debug.Assert(navigator.LocalName.Length != 0, "xmlns:foo='' isn't allowed");
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (9)
174Debug.Assert(IsGlobalComputed(idx), "Cannot get the value of a global value until it has been computed.");
175Debug.Assert(_globalValues![idx] is IList<XPathItem>, "Only debugger should call this method, and all global values should have type item* in debugging scenarios.");
191Debug.Assert(IsGlobalComputed(idx), "Cannot get the value of a global value until it has been computed.");
192Debug.Assert(_globalValues![idx] is IList<XPathItem>, "Only debugger should call this method, and all global values should have type item* in debugging scenarios.");
250Debug.Assert(_earlyObjects != null && index < _earlyObjects.Length, "Early bound object does not exist");
300Debug.Assert(IsGlobalComputed(index), "Cannot get the value of a global value until it has been computed.");
310Debug.Assert(!IsGlobalComputed(index), "Global value should only be set once.");
480Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()),
499Debug.Assert(xmlType != XmlQueryTypeFactory.Node && xmlType != XmlQueryTypeFactory.NodeS,
System\Xml\Xsl\XmlQueryType.cs (10)
487Debug.Assert(Count == 1 && IsSingleton, "This method should only be called for item types.");
488Debug.Assert(baseType.Count == 1 && baseType.IsSingleton, "This method should only be called for item types.");
489Debug.Assert(!IsDod && !baseType.IsDod, "Singleton types may not have DocOrderDistinct property");
528Debug.Assert(this.Count == 1 && this.IsSingleton, "this should be an item");
529Debug.Assert(other.Count == 1 && other.IsSingleton, "other should be an item");
562Debug.Assert(Count == 1, "Do not pass a Union type to this method.");
563Debug.Assert(IsSingleton, "Do not pass a Sequence type to this method.");
885Debug.Assert(count < 64, "BitMatrix currently only handles up to 64x64 matrix.");
903Debug.Assert(index1 < _bits.Length && index2 < _bits.Length, "Index out of range.");
908Debug.Assert(index1 < _bits.Length && index2 < _bits.Length, "Index out of range.");
System\Xml\Xsl\XmlQueryTypeFactory.cs (10)
265Debug.Assert(itemType.IsSingleton, "All types should be prime.");
351Debug.Assert(arrEnum[arrEnum.Length - 1] == XmlTypeCode.DayTimeDuration,
437Debug.Assert(schemaType.Datatype!.Variety == XmlSchemaDatatypeVariety.Atomic, "List or Union Xsd types should have been handled by caller.");
504Debug.Assert(nameTest != null, "nameTest cannot be null");
505Debug.Assert(schemaType != null, "schemaType cannot be null");
554Debug.Assert((object)this == (object)Create(_code, _isStrict), "Unknown type");
741Debug.Assert(members != null && members.Count != 1, "ChoiceType must contain a list with 0 or >1 types.");
749Debug.Assert(t.Cardinality == XmlQueryCardinality.One, "ChoiceType member types must be prime types.");
972Debug.Assert(prime != null, "SequenceType can only modify the cardinality of a non-null XmlQueryType.");
973Debug.Assert(prime.IsSingleton, "Prime type must have cardinality one.");
System\Xml\Xsl\Xslt\InvokeGenerator.cs (6)
60Debug.Assert(formalArg.Name.LocalName == "namespaces", "Cur,Pos,Last don't have default values and should be always added to by caller in AddImplicitArgs()");
61Debug.Assert(formalArg.DefaultValue != null, "PrecompileProtoTemplatesHeaders() set it");
71Debug.Assert(formalArg.Name!.NamespaceUri != XmlReservedNs.NsXslDebug, "Cur,Pos,Last don't have default values and should be always added to by caller in AddImplicitArgs(). We don't have $namespaces in !debug.");
86Debug.Assert(invokeType == T.ItemS, "Actual argument type is not a subtype of formal argument type");
132Debug.Assert(_formalArgs![prevArg] != null, "formalArg must be in the list");
133Debug.Assert(_invokeArgs![prevArg] != null, "This arg should be compiled already");
System\Xml\Xsl\Xslt\QilGenerator.cs (18)
234Debug.Assert(!_curLoop.IsFocusSet && !_funcFocus.IsFocusSet, "Must be compiled using singleton focus");
432Debug.Assert(IsDebug, "This is debug only logic");
602Debug.Assert((template != null) == (tmpl.SourceLine != null), "Templates must have line information, and attribute sets must not");
610Debug.Assert(!IsDebug, "In debug mode we don't generate parumWithCalls functions. Otherwise focus flags should be adjusted");
653Debug.Assert(tmpl is Template, "Only templates can have explicit arguments");
656Debug.Assert(arg.DefaultValue == null, "Argument must not be compiled yet");
747Debug.Assert(result != null, "Result of compilation should not be null");
1216Debug.Assert(!_curLoop.IsFocusSet, "xsl:apply-imports cannot be inside of xsl:for-each");
1246Debug.Assert(tmpl.Function != null, "All templates should be already compiled");
1281Debug.Assert(attSet.Function != null, "All templates should be already compiled");
1421Debug.Assert(result == null, "xsl:otherwise must be the last child of xsl:choose");
1818Debug.Assert(0 < list.Count, "Pattern should have at least one filter");
2581Debug.Assert(actualArgs[actArg].NodeType == XslNodeType.WithParam, "All Sorts was removed in CompileSorts()");
2662Debug.Assert(actualArgs[i].NodeType == XslNodeType.WithParam, "All Sorts was removed in CompileSorts()");
2689Debug.Assert(actualArgs[0].Name == _nameCurrent, "Caller should always pass $current as a first argument to apply-* calls.");
2753Debug.Assert(
2794Debug.Assert(!IsDebug, "Attempt to override SourceLineInfo in debug mode");
2886Debug.Assert(_vars.Count == 0, "Accumulated variables left unclaimed");
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (15)
44Debug.Assert(!_inTheBuild, "XPathBuilder is busy!");
52Debug.Assert(filter.NodeType == QilNodeType.Filter, "XPathPatternBuilder expected to generate list of Filters on top level");
67Debug.Assert(_inTheBuild, "StartBuild() wasn't called");
71Debug.Assert(_predicateEnvironment.numFixupCurrent >= 0, "Context fixup error");
72Debug.Assert(_predicateEnvironment.numFixupPosition >= 0, "Context fixup error");
73Debug.Assert(_predicateEnvironment.numFixupLast >= 0, "Context fixup error");
84Debug.Assert(right.NodeType == QilNodeType.Filter, "LocationPathPattern must be compiled into a filter");
92Debug.Assert(left.NodeType == QilNodeType.Filter, "LocationPathPattern must be compiled into a filter");
133Debug.Assert(nodeType == XPathNodeType.All && prefix == null && name == null, " // is the only d-o-s axes that we can have in pattern");
199Debug.Assert(GetLastParent(left) == left, "Left is always single axis and never the step");
297Debug.Assert(
305Debug.Assert(name == "key", "Unexpected function");
306Debug.Assert(
376Debug.Assert(context != null, "Predicate always has step so it can't have context == null");
377Debug.Assert(context.Variable.NodeType == QilNodeType.For, "It shouldn't be Let, becaus predicates in PatternBuilder don't produce cached tuples.");
System\Xml\Xsl\Xslt\XsltInput.cs (16)
77Debug.Assert(tr.Settings == null, "XmlReader created with XmlReader.Create should always expand entities.");
273Debug.Assert(_reader.NodeType == XmlNodeType.Attribute, "reader.NodeType == XmlNodeType.Attribute");
323Debug.Assert(_reader.NodeType == XmlNodeType.Text, "Unexpected node type inside attribute value");
348Debug.Assert(_nodeType == XmlNodeType.Element, "To call MoveToFirstChild() XsltInut should be positioned on an Element.");
358Debug.Assert(_nodeType != XmlNodeType.Element || IsEmptyElement, "On non-empty elements we should call MoveToFirstChild()");
518Debug.Assert(_nodeType == XmlNodeType.Element, "For MoveToElement() we should be positioned on Element or Attribute");
524Debug.Assert(_nodeType == XmlNodeType.Element, "For MoveToLiteralAttribute() we should be positioned on Element or Attribute");
539Debug.Assert(_nodeType == XmlNodeType.Element, "For MoveToLiteralAttribute() we should be positioned on Element or Attribute");
554Debug.Assert(_attributes != null && _attributes[attNum].name == attName, "Attribute numbering error.");
566Debug.Assert(_attributes != null && _attributes[attNum].name == attName, "Attribute numbering error.");
589Debug.Assert(_nodeType == XmlNodeType.Element || _nodeType == XmlNodeType.EndElement, "Input is positioned on element or attribute");
620Debug.Assert(_nodeType != XmlNodeType.Element || _attributesRead, "Should first read attributes");
628Debug.Assert(_nodeType != XmlNodeType.Element || _attributesRead, "Should first read attributes");
637Debug.Assert(_nodeType != XmlNodeType.Element || _attributesRead, "Should first read attributes");
750Debug.Assert(SS, "First we parse xsl:stylesheet element");
1099Debug.Assert(Ref.Equal(_atoms.NameTable.Get(nsUri), nsUri), "Namespaces must be atomized");
System\Xml\Xsl\Xslt\XsltLoader.cs (11)
177Debug.Assert(_compiler.Version != 0, "Version should be already decided at this point");
236Debug.Assert(!_documentUriInUse.Contains(baseUri), "Circular references must be checked while processing xsl:include and xsl:import");
973Debug.Assert(dummy, "One of the attrs should have lineInfo. If both are default they can't conflict.");
1067Debug.Assert(setName != null, "Required attribute always != null");
2800Debug.Assert(_input.IsRequiredAttribute(attNum), "It happened that @name as NCName is always required attribute");
2890Debug.Assert(_input.LocalName == "use-attribute-sets", "we are positioned on this attribute");
2891Debug.Assert(list != null && list.Count == 0, "It happened that we always add use-attribute-sets first. Otherwise we can't call list.Clear()");
2954Debug.Assert(!_input.IsRequiredAttribute(attNum), "All Yes/No attributes are optional.");
2974Debug.Assert(!_input.IsRequiredAttribute(attNum), "All 'type' attributes are optional.");
2983Debug.Assert(!_input.IsRequiredAttribute(attNum), "All 'validation' attributes are optional.");
3009Debug.Assert(!_input.IsRequiredAttribute(attNum), "All 'input-type-validation' attributes are optional.");
System\Xml\Xsl\XsltOld\Processor.cs (11)
142Debug.Assert(_resolver != null, "Constructor should create it if null passed");
151Debug.Assert(_sortArray != null, "InitSortArray() wasn't called");
202Debug.Assert(_sortArray != null, "InitSortArray() wasn't called");
828Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State,
1019Debug.Assert(result != null, "Variable was just calculated and result can't be null");
1058Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
1070Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
1076Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
1078Debug.Assert(dbgFrame != null, "PushDebuggerStack() wasn't ever called");
1085Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
1092Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
System.Private.Xml.Linq (13)
System.Reflection.Emit (3)
System.Reflection.Metadata (8)
System.Reflection.MetadataLoadContext (2)
System.Resources.Extensions (30)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (20)
46Debug.Assert(value >= 0, "negative ResourceTypeCode. What?");
202Debug.Assert(_nameHashes != null && _nameHashesPtr == null, "Internal state mangled.");
207Debug.Assert(_nameHashes == null && _nameHashesPtr != null, "Internal state mangled.");
218Debug.Assert(_namePositions != null && _namePositionsPtr == null, "Internal state mangled.");
223Debug.Assert(_namePositions == null && _namePositionsPtr != null, "Internal state mangled.");
259Debug.Assert(_store != null, "ResourceReader is closed!");
340Debug.Assert(_store != null, "ResourceReader is closed!");
383Debug.Assert(_store != null, "ResourceReader is closed!");
454Debug.Assert(_store != null, "ResourceReader is closed!");
478Debug.Assert(_store != null, "ResourceReader is closed!");
540Debug.Assert(_store != null, "ResourceReader is closed!");
541Debug.Assert(_version == 1, ".resources file was not a V1 .resources file!");
622Debug.Assert(_store != null, "ResourceReader is closed!");
623Debug.Assert(_version >= 2, ".resources file was not a V2 (or higher) .resources file!");
730Debug.Assert(r == len, "ResourceReader needs to use a blocking read here. (Call _store.ReadBytes(len)?)");
783Debug.Assert(_store != null, "ResourceReader is closed!");
1002Debug.Assert(_typeTable[typeIndex] != null, "Should have found a type!");
1033Debug.Assert(typeCode >= 0, "can't be negative");
1038Debug.Assert(!string.Equals(typeCode.ToString(), "LastPrimitive"), "Change ResourceTypeCode metadata order so LastPrimitive isn't what Enum.ToString prefers.");
1044Debug.Assert(typeIndex >= 0 && typeIndex < _typeTable.Length, "TypeCode is broken or corrupted!");
System.Resources.Writer (4)
System.Runtime.Caching (117)
System\Runtime\Caching\CacheExpires.cs (47)
27Debug.Assert((pageIndex & 0x00ffffff) == pageIndex, "(pageIndex & 0x00ffffff) == pageIndex");
28Debug.Assert((entryIndex & ENTRY_MASK) == entryIndex, "(entryIndex & ENTRY_MASK) == entryIndex");
29Debug.Assert(entryIndex != 0 || pageIndex == 0, "entryIndex != 0 || pageIndex == 0");
118Debug.Assert(_cPagesInUse == 0, "_cPagesInUse == 0");
119Debug.Assert(_cEntriesInUse == 0, "_cEntriesInUse == 0");
120Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
182Debug.Assert((list._head == -1) == (list._tail == -1), "(list._head == -1) == (list._tail == -1)");
188Debug.Assert((_pages[(list._head)]._pagePrev) == -1, "PagePrev(list._head) == -1");
201Debug.Assert((list._head == -1) == (list._tail == -1), "(list._head == -1) == (list._tail == -1)");
207Debug.Assert((_pages[(list._tail)]._pageNext) == -1, "PageNext(list._tail) == -1");
220Debug.Assert(list._head != -1, "list._head != -1");
229Debug.Assert((list._head == -1) == (list._tail == -1), "(list._head == -1) == (list._tail == -1)");
233Debug.Assert((_pages[((_pages[(pageIndex)]._pagePrev))]._pageNext) == pageIndex, "PageNext(PagePrev(pageIndex)) == pageIndex");
238Debug.Assert(list._head == pageIndex, "list._head == pageIndex");
244Debug.Assert((_pages[((_pages[(pageIndex)]._pageNext))]._pagePrev) == pageIndex, "PagePrev(PageNext(pageIndex)) == pageIndex");
249Debug.Assert(list._tail == pageIndex, "list._tail == pageIndex");
259Debug.Assert(list._head != -1, "list._head != -1");
260Debug.Assert(list._tail != -1, "list._tail != -1");
272Debug.Assert(list._head != -1, "list._head != -1");
273Debug.Assert(list._tail != -1, "list._tail != -1");
293Debug.Assert(capacity > 0, "capacity > 0");
294Debug.Assert(MIN_LOAD_FACTOR < 1.0, "MIN_LOAD_FACTOR < 1.0");
307Debug.Assert((((_pages[(pageIndex)]._entries))[0]._cFree) == NUM_ENTRIES, "FreeEntryCount(EntriesI(pageIndex)) == NUM_ENTRIES");
312Debug.Assert((_pages[(pageIndex)]._entries) != null, "EntriesI(pageIndex) != null");
328Debug.Assert(_freeEntryList._head >= 0, "_freeEntryList._head >= 0");
338Debug.Assert(((entries)[0]._next).IsInvalid, "FreeEntryHead(entries).IsInvalid");
349Debug.Assert(entries[entryIndex]._cacheEntry == null, "entries[entryIndex]._cacheEntry == null");
370Debug.Assert(_cPagesInUse * NUM_ENTRIES == _cEntriesInUse, "_cPagesInUse * NUM_ENTRIES == _cEntriesInUse");
371Debug.Assert(_freeEntryList._head == -1, "_freeEntryList._head == -1");
372Debug.Assert(_freeEntryList._tail == -1, "_freeEntryList._tail == -1");
386Debug.Assert(_cPagesInUse == oldLength, "_cPagesInUse == oldLength");
387Debug.Assert(_cEntriesInUse == oldLength * NUM_ENTRIES, "_cEntriesInUse == oldLength * ExpiresEntryRef.NUM_ENTRIES");
392Debug.Assert(newLength > oldLength, "newLength > oldLength");
439Debug.Assert(_freeEntryList._head != -1, "_freeEntryList._head != -1");
440Debug.Assert(_freeEntryList._tail != -1, "_freeEntryList._tail != -1");
441Debug.Assert(_freeEntryList._head != _freeEntryList._tail, "_freeEntryList._head != _freeEntryList._tail");
476Debug.Assert(((entries)[0]._cFree) > 0, "FreeEntryCount(entries) > 0");
486Debug.Assert(_freeEntryList._head != _freeEntryList._tail, "_freeEntryList._head != _freeEntryList._tail");
488Debug.Assert(newRef.PageIndex != _freeEntryList._tail, "newRef.PageIndex != _freeEntryList._tail");
512Debug.Assert((cacheEntry.ExpiresBucket == 0xff) == entryRef.IsInvalid, "(cacheEntry.ExpiresBucket == 0xff) == entryRef.IsInvalid");
522Debug.Assert(cacheEntry.ExpiresBucket == 0xff, "cacheEntry.ExpiresBucket == 0xff");
523Debug.Assert(cacheEntry.ExpiresEntryRef.IsInvalid, "cacheEntry.ExpiresEntryRef.IsInvalid");
610Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
628Debug.Assert(_blockReduce == false, "_blockReduce == false");
695Debug.Assert(!inFlushHead.IsInvalid, "!inFlushHead.IsInvalid");
709Debug.Assert(cacheEntry.ExpiresEntryRef.IsInvalid, "cacheEntry.ExpiresEntryRef.IsInvalid");
738Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
System\Runtime\Caching\CacheUsage.cs (59)
27Debug.Assert((pageIndex & 0x00ffffff) == pageIndex, "(pageIndex & 0x00ffffff) == pageIndex");
28Debug.Assert((Math.Abs(entryIndex) & ENTRY_MASK) == (Math.Abs(entryIndex)), "(Math.Abs(entryIndex) & ENTRY_MASK) == Math.Abs(entryIndex)");
29Debug.Assert(entryIndex != 0 || pageIndex == 0, "entryIndex != 0 || pageIndex == 0");
52Debug.Assert(result > 0, "result > 0");
62Debug.Assert(result < 0, "result < 0");
148Debug.Assert(_cPagesInUse == 0, "_cPagesInUse == 0");
149Debug.Assert(_cEntriesInUse == 0, "_cEntriesInUse == 0");
150Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
151Debug.Assert(_lastRefHead.IsInvalid, "_lastRefHead.IsInvalid");
152Debug.Assert(_lastRefTail.IsInvalid, "_lastRefTail.IsInvalid");
153Debug.Assert(_addRef2Head.IsInvalid, "_addRef2Head.IsInvalid");
165Debug.Assert((list._head == -1) == (list._tail == -1), "(list._head == -1) == (list._tail == -1)");
171Debug.Assert((_pages[(list._head)]._pagePrev) == -1, "PagePrev(list._head) == -1");
184Debug.Assert((list._head == -1) == (list._tail == -1), "(list._head == -1) == (list._tail == -1)");
190Debug.Assert((_pages[(list._tail)]._pageNext) == -1, "PageNext(list._tail) == -1");
203Debug.Assert(list._head != -1, "list._head != -1");
212Debug.Assert((list._head == -1) == (list._tail == -1), "(list._head == -1) == (list._tail == -1)");
216Debug.Assert((_pages[((_pages[(pageIndex)]._pagePrev))]._pageNext) == pageIndex, "PageNext(PagePrev(pageIndex)) == pageIndex");
221Debug.Assert(list._head == pageIndex, "list._head == pageIndex");
227Debug.Assert((_pages[((_pages[(pageIndex)]._pageNext))]._pagePrev) == pageIndex, "PagePrev(PageNext(pageIndex)) == pageIndex");
232Debug.Assert(list._tail == pageIndex, "list._tail == pageIndex");
242Debug.Assert(list._head != -1, "list._head != -1");
243Debug.Assert(list._tail != -1, "list._tail != -1");
254Debug.Assert(list._head != -1, "list._head != -1");
255Debug.Assert(list._tail != -1, "list._tail != -1");
273Debug.Assert(capacity > 0, "capacity > 0");
274Debug.Assert(MIN_LOAD_FACTOR < 1.0, "MIN_LOAD_FACTOR < 1.0");
287Debug.Assert((((_pages[(pageIndex)]._entries))[0]._cFree) == NUM_ENTRIES, "FreeEntryCount(EntriesI(pageIndex)) == NUM_ENTRIES");
292Debug.Assert((_pages[(pageIndex)]._entries) != null, "EntriesI(pageIndex) != null");
308Debug.Assert(_freeEntryList._head >= 0, "_freeEntryList._head >= 0");
318Debug.Assert(((entries)[0]._ref1._next).IsInvalid, "FreeEntryHead(entries).IsInvalid");
326Debug.Assert(entryRef.IsRef1, "entryRef.IsRef1");
331Debug.Assert(entries[entryIndex]._cacheEntry == null, "entries[entryIndex]._cacheEntry == null");
355Debug.Assert(_cPagesInUse * NUM_ENTRIES == _cEntriesInUse, "_cPagesInUse * NUM_ENTRIES == _cEntriesInUse");
356Debug.Assert(_freeEntryList._head == -1, "_freeEntryList._head == -1");
357Debug.Assert(_freeEntryList._tail == -1, "_freeEntryList._tail == -1");
371Debug.Assert(_cPagesInUse == oldLength, "_cPagesInUse == oldLength");
372Debug.Assert(_cEntriesInUse == oldLength * NUM_ENTRIES, "_cEntriesInUse == oldLength * ExpiresEntryRef.NUM_ENTRIES");
377Debug.Assert(newLength > oldLength, "newLength > oldLength");
424Debug.Assert(_freeEntryList._head != -1, "_freeEntryList._head != -1");
425Debug.Assert(_freeEntryList._tail != -1, "_freeEntryList._tail != -1");
426Debug.Assert(_freeEntryList._head != _freeEntryList._tail, "_freeEntryList._head != _freeEntryList._tail");
459Debug.Assert(((entries)[0]._cFree) > 0, "FreeEntryCount(entries) > 0");
469Debug.Assert(_freeEntryList._head != _freeEntryList._tail, "_freeEntryList._head != _freeEntryList._tail");
472Debug.Assert(newRef1.PageIndex != _freeEntryList._tail, "newRef1.PageIndex != _freeEntryList._tail");
478Debug.Assert(cacheEntry.UsageEntryRef == oldRef1, "cacheEntry.UsageEntryRef == oldRef1");
487Debug.Assert(prev != oldRef2, "prev != oldRef2");
505Debug.Assert(next != oldRef1, "next != oldRef1");
531Debug.Assert(cacheEntry.UsageEntryRef.IsInvalid, "cacheEntry.UsageEntryRef.IsInvalid");
583Debug.Assert(entryRef.IsRef1, "entryRef.IsRef1");
683Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
700Debug.Assert(_blockReduce == false, "_blockReduce == false");
709Debug.Assert(_cEntriesInUse > 0, "_cEntriesInUse > 0");
723Debug.Assert(utcDate != DateTime.MinValue, "utcDate != DateTime.MinValue");
731Debug.Assert(cacheEntry.UsageEntryRef == prev1, "cacheEntry.UsageEntryRef == prev1");
761Debug.Assert(!inFlushHead.IsInvalid, "!inFlushHead.IsInvalid");
775Debug.Assert(cacheEntry.UsageEntryRef.IsInvalid, "cacheEntry.UsageEntryRef.IsInvalid");
801Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
851Debug.Assert(bucket != 0xff, "bucket != 0xff");
System.Runtime.Numerics (14)
System.Runtime.Serialization.Formatters (36)
System.Runtime.Serialization.Schema (2)
System.Security.Cryptography (36)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Dsa.cs (1)
92Debug.Assert(
System\Security\Cryptography\X509Certificates\OpenSslCrlCache.cs (1)
164Debug.Assert(
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (1)
34Debug.Assert(
System.Security.Cryptography.Cose (3)
System.Security.Cryptography.Pkcs (7)
System.Security.Cryptography.Xml (54)
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (52)
212Debug.Assert(key != null, "key != null");
255Debug.Assert(o != null, "o != null");
265Debug.Assert(oid != null, "oid != null");
281Debug.Assert(signedXml != null, "signedXml != null");
282Debug.Assert(canonicalizationTransform != null, "canonicalizationTransform != null");
316Debug.Assert(signedXml != null, "signedXml != null");
317Debug.Assert(formatValidator != null, "formatValidator != null");
339Debug.Assert(signedXml != null, "signedXml != null");
340Debug.Assert(signedInfo != null, " signedInfo != null");
358Debug.Assert(signedXml != null, "signedXml != null");
388Debug.Assert(signedXml != null, "signedXml != null");
418Debug.Assert(signedXml != null, "signedXml != null");
419Debug.Assert(canonicalizationTransform != null, "canonicalizationTransform != null");
443Debug.Assert(signedXml != null, "signedXml != null");
462Debug.Assert(signedXml != null, "signedXml != null");
463Debug.Assert(validAlgorithms != null, "validAlgorithms != null");
501Debug.Assert(signedXml != null, "signedXml != null");
502Debug.Assert(validC14nAlgorithms != null, "validC14nAlgorithms != null");
503Debug.Assert(validTransformAlgorithms != null, "validTransformAlgorithms != null");
544Debug.Assert(signedXml != null, "signedXml != null");
635Debug.Assert(signedXml != null, "signedXml != null");
636Debug.Assert(signatureDescription != null, "signatureDescription != null");
637Debug.Assert(hash != null, "hash != null");
638Debug.Assert(asymmetricSignatureFormatter != null, "asymmetricSignatureFormatter != null");
663Debug.Assert(signedXml != null, "signedXml != null");
664Debug.Assert(key != null, "key != null");
687Debug.Assert(signedXml != null, "signedXml != null");
688Debug.Assert(reference != null, "reference != null");
738Debug.Assert(signedXml != null, "signedXml != null");
739Debug.Assert(key != null, "key != null");
764Debug.Assert(signedXml != null, "signedXml != null");
765Debug.Assert(certificate != null, "certificate != null");
789Debug.Assert(signedXml != null, "signedXml != null");
790Debug.Assert(reference != null, "reference != null");
821Debug.Assert(signedXml != null, "signedXml != null");
822Debug.Assert(reference != null, "reference != null");
823Debug.Assert(actualHash != null, "actualHash != null");
824Debug.Assert(expectedHash != null, "expectedHash != null");
864Debug.Assert(signedXml != null, "signedXml != null");
865Debug.Assert(signatureDescription != null, "signatureDescription != null");
866Debug.Assert(hashAlgorithm != null, "hashAlgorithm != null");
867Debug.Assert(asymmetricSignatureDeformatter != null, "asymmetricSignatureDeformatter != null");
910Debug.Assert(signedXml != null, "signedXml != null");
911Debug.Assert(mac != null, "mac != null");
946Debug.Assert(signedXml != null, "signedXml != null");
947Debug.Assert(certificate != null, "certificate != null");
948Debug.Assert(chain != null, "chain != null");
1038Debug.Assert(signedXml != null, "signedXml != null");
1039Debug.Assert(reference != null, "reference != null");
1067Debug.Assert(source != null, "source != null");
1068Debug.Assert(!string.IsNullOrEmpty(data), "!string.IsNullOrEmpty(data)");
1069Debug.Assert(InformationLoggingEnabled, "InformationLoggingEnabled");
System.ServiceModel.Federation (1)
System.ServiceModel.Syndication (20)
System.Text.Encoding.CodePages (149)
System\Text\DBCSCodePageEncoding.cs (37)
94Debug.Assert(pCodePage->CodePage == dataTableCodePage,
116Debug.Assert(_bytesUnknown == 0x3f,
139Debug.Assert(bytesRead == m_dataSize, "s_codePagesEncodingDataStream.Read should have read a full buffer.");
179Debug.Assert(bytePosition < 0x100, "[DBCSCodePageEncoding.LoadManagedCodePage]expected lead byte to be < 0x100");
262Debug.Assert(bytesRead == m_dataSize, "s_codePagesEncodingDataStream.Read should have read a full buffer.");
525Debug.Assert(count >= 0, "[DBCSCodePageEncoding.GetByteCount]count is negative");
526Debug.Assert(chars != null, "[DBCSCodePageEncoding.GetByteCount]chars is null");
529Debug.Assert(EncoderFallback != null, "[DBCSCodePageEncoding.GetByteCount]Attempting to use null fallback");
556Debug.Assert(char.IsHighSurrogate(charLeftOver), "[DBCSCodePageEncoding.GetByteCount]leftover character should be high surrogate");
557Debug.Assert(encoder != null,
621Debug.Assert(bytes != null, "[DBCSCodePageEncoding.GetBytes]bytes is null");
622Debug.Assert(byteCount >= 0, "[DBCSCodePageEncoding.GetBytes]byteCount is negative");
623Debug.Assert(chars != null, "[DBCSCodePageEncoding.GetBytes]chars is null");
624Debug.Assert(charCount >= 0, "[DBCSCodePageEncoding.GetBytes]charCount is negative");
627Debug.Assert(EncoderFallback != null, "[DBCSCodePageEncoding.GetBytes]Attempting to use null encoder fallback");
647Debug.Assert(charLeftOver == 0 || char.IsHighSurrogate(charLeftOver),
662Debug.Assert(encoder != null,
695Debug.Assert(encoder == null,
718Debug.Assert(chars > charStart,
737Debug.Assert(chars > charStart,
770Debug.Assert(bytes != null, "[DBCSCodePageEncoding.GetCharCount]bytes is null");
771Debug.Assert(count >= 0, "[DBCSCodePageEncoding.GetCharCount]byteCount is negative");
787Debug.Assert(decoder == null ||
807Debug.Assert(fallbackBuffer == null,
832Debug.Assert(fallbackBuffer == null,
907Debug.Assert(decoder == null || !decoder.m_throwOnOverflow ||
919Debug.Assert(bytes != null, "[DBCSCodePageEncoding.GetChars]bytes is null");
920Debug.Assert(byteCount >= 0, "[DBCSCodePageEncoding.GetChars]byteCount is negative");
921Debug.Assert(chars != null, "[DBCSCodePageEncoding.GetChars]chars is null");
922Debug.Assert(charCount >= 0, "[DBCSCodePageEncoding.GetChars]charCount is negative");
940Debug.Assert(decoder == null || !decoder.m_throwOnOverflow ||
961Debug.Assert(fallbackBuffer == null,
987Debug.Assert(fallbackBuffer == null,
1065Debug.Assert(bytes >= byteStart + byteBuffer.Length,
1079Debug.Assert(bytes > byteStart,
1084Debug.Assert(bytes > byteStart,
1110Debug.Assert(decoder == null || !decoder.m_throwOnOverflow ||
System\Text\ISCIIEncoding.cs (26)
129Debug.Assert(chars != null, "[ISCIIEncoding.GetBytes]chars!=null");
131Debug.Assert(charCount >= 0, "[ISCIIEncoding.GetBytes]charCount >=0");
132Debug.Assert(byteCount >= 0, "[ISCIIEncoding.GetBytes]byteCount >=0");
228Debug.Assert(indicScript != 0, "[ISCIIEncoding.GetBytes]expected an indic script value");
318Debug.Assert(bytes != null, "[ISCIIEncoding.GetChars]bytes is null");
319Debug.Assert(byteCount >= 0, "[ISCIIEncoding.GetChars]byteCount is negative");
321Debug.Assert(charCount >= 0, "[ISCIIEncoding.GetChars]charCount is negative");
431Debug.Assert(bLastVirama == false, "[ISCIIEncoding.GetChars] Expected no bLastVirama in bLastATR mode");
432Debug.Assert(bLastDevenagariStressAbbr == false, "[ISCIIEncoding.GetChars] Expected no bLastDevenagariStressAbbr in bLastATR mode");
433Debug.Assert(cLastCharForNextNukta == (char)0, "[ISCIIEncoding.GetChars] Expected no cLastCharForNextNukta in bLastATR mode");
434Debug.Assert(cLastCharForNoNextNukta == (char)0, "[ISCIIEncoding.GetChars] Expected no cLastCharForNoNextNukta in bLastATR mode");
462Debug.Assert(bLastATR == false, "[ISCIIEncoding.GetChars] Expected no bLastATR in bLastVirama mode");
463Debug.Assert(bLastDevenagariStressAbbr == false, "[ISCIIEncoding.GetChars] Expected no bLastDevenagariStressAbbr in bLastVirama mode");
464Debug.Assert(cLastCharForNextNukta == (char)0, "[ISCIIEncoding.GetChars] Expected no cLastCharForNextNukta in bLastVirama mode");
465Debug.Assert(cLastCharForNoNextNukta == (char)0, "[ISCIIEncoding.GetChars] Expected no cLastCharForNoNextNukta in bLastVirama mode");
498Debug.Assert(bLastATR == false, "[ISCIIEncoding.GetChars] Expected no bLastATR in bLastDevenagariStressAbbr mode");
499Debug.Assert(bLastVirama == false, "[ISCIIEncoding.GetChars] Expected no bLastVirama in bLastDevenagariStressAbbr mode");
500Debug.Assert(cLastCharForNextNukta == (char)0, "[ISCIIEncoding.GetChars] Expected no cLastCharForNextNukta in bLastDevenagariStressAbbr mode");
501Debug.Assert(cLastCharForNoNextNukta == (char)0, "[ISCIIEncoding.GetChars] Expected no cLastCharForNoNextNukta in bLastDevenagariStressAbbr mode");
506Debug.Assert(cLastCharForNextNukta > 0 && cLastCharForNoNextNukta > 0,
528Debug.Assert(bLastATR == false, "[ISCIIEncoding.GetChars] Expected no bLastATR in cLastCharForNextNukta mode");
529Debug.Assert(bLastVirama == false, "[ISCIIEncoding.GetChars] Expected no bLastVirama in cLastCharForNextNukta mode");
530Debug.Assert(bLastDevenagariStressAbbr == false, "[ISCIIEncoding.GetChars] Expected no bLastDevenagariStressAbbr in cLastCharForNextNukta mode");
535Debug.Assert(!bLastSpecial && !bLastDevenagariStressAbbr && !bLastVirama && !bLastATR &&
554Debug.Assert(currentCodePageIndex != -1, "[ISCIIEncoding.GetChars]Expected valid currentCodePageIndex != -1");
652Debug.Assert(!decoder.MustFlush || !decoder.m_throwOnOverflow,
System\Text\ISO2022Encoding.cs (23)
226Debug.Assert(count >= 0, "[ISO2022Encoding.GetByteCount]count is negative");
227Debug.Assert(chars != null, "[ISO2022Encoding.GetByteCount]chars is null");
237Debug.Assert(chars != null, "[ISO2022Encoding.GetBytes]chars is null");
238Debug.Assert(byteCount >= 0, "[ISO2022Encoding.GetBytes]byteCount is negative");
239Debug.Assert(charCount >= 0, "[ISO2022Encoding.GetBytes]charCount is negative");
242Debug.Assert(EncoderFallback != null, "[ISO2022Encoding.GetBytes]Attempting to use null encoder fallback");
277Debug.Assert(bytes != null, "[ISO2022Encoding.GetCharCount]bytes is null");
278Debug.Assert(count >= 0, "[ISO2022Encoding.GetCharCount]byteCount is negative");
288Debug.Assert(bytes != null, "[ISO2022Encoding.GetChars]bytes is null");
289Debug.Assert(byteCount >= 0, "[ISO2022Encoding.GetChars]byteCount is negative");
290Debug.Assert(charCount >= 0, "[ISO2022Encoding.GetChars]charCount is negative");
376Debug.Assert(char.IsHighSurrogate(charLeftOver), "[ISO2022Encoding.GetBytesCP5022xJP]leftover character should be high surrogate");
437Debug.Assert(CodePage == 50221, "[ISO2022Encoding.GetBytesCP5022xJP]Expected Code Page 50221");
617Debug.Assert(char.IsHighSurrogate(charLeftOver), "[ISO2022Encoding.GetBytesCP50225KR]leftover character should be high surrogate");
717Debug.Assert(!encoder.MustFlush || !encoder.m_throwOnOverflow,
763Debug.Assert(char.IsHighSurrogate(charLeftOver), "[ISO2022Encoding.GetBytesCP52936]leftover character should be high surrogate");
1086Debug.Assert(!decoder.MustFlush || !decoder.m_throwOnOverflow,
1180Debug.Assert(count > 0, "[ISO2022Encoding.DecrementEscapeBytes]count > 0");
1385Debug.Assert(!decoder.MustFlush || !decoder.m_throwOnOverflow,
1443Debug.Assert(byteCount >= 0, "[ISO2022Encoding.GetCharsCP52936]count >=0");
1444Debug.Assert(bytes != null, "[ISO2022Encoding.GetCharsCP52936]bytes!=null");
1553Debug.Assert(currentMode == ISO2022Modes.ModeHZ, "[ISO2022Encoding.GetCharsCP52936]Expected ModeHZ");
1677Debug.Assert(!decoder.MustFlush || !decoder.m_throwOnOverflow,
System\Text\SBCSCodePageEncoding.cs (34)
68Debug.Assert(pCodePage->CodePage == dataTableCodePage,
103Debug.Assert(bytesRead == buffer.Length, "s_codePagesEncodingDataStream.Read should have read a full buffer.");
167Debug.Assert(bytesRead == buffer.Length, "s_codePagesEncodingDataStream.Read should have read a full buffer.");
301Debug.Assert(count >= 0, "[SBCSCodePageEncoding.GetByteCount]count is negative");
302Debug.Assert(chars != null, "[SBCSCodePageEncoding.GetByteCount]chars is null");
305Debug.Assert(EncoderFallback != null, "[SBCSCodePageEncoding.GetByteCount]Attempting to use null fallback");
317Debug.Assert(charLeftOver == 0 || char.IsHighSurrogate(charLeftOver),
322Debug.Assert(!encoder.m_throwOnOverflow || !encoder.InternalHasFallbackBuffer ||
363Debug.Assert(encoder != null, "[SBCSCodePageEncoding.GetByteCount]Expect to have encoder if we have a charLeftOver");
416Debug.Assert(fallbackBuffer == null || fallbackBuffer.Remaining == 0,
426Debug.Assert(bytes != null, "[SBCSCodePageEncoding.GetBytes]bytes is null");
427Debug.Assert(byteCount >= 0, "[SBCSCodePageEncoding.GetBytes]byteCount is negative");
428Debug.Assert(chars != null, "[SBCSCodePageEncoding.GetBytes]chars is null");
429Debug.Assert(charCount >= 0, "[SBCSCodePageEncoding.GetBytes]charCount is negative");
432Debug.Assert(EncoderFallback != null, "[SBCSCodePageEncoding.GetBytes]Attempting to use null encoder fallback");
444Debug.Assert(charLeftOver == 0 || char.IsHighSurrogate(charLeftOver),
449Debug.Assert(!encoder.m_throwOnOverflow || !encoder.InternalHasFallbackBuffer ||
548Debug.Assert(encoder != null, "[SBCSCodePageEncoding.GetBytes]Expect to have encoder if we have a charLeftOver");
607Debug.Assert(chars > charStart, "[SBCSCodePageEncoding.GetBytes]Expected chars to have advanced (fallback)");
623Debug.Assert(fallbackBuffer == null || fallbackHelper.bFallingBack == false, "[SBCSCodePageEncoding.GetBytes]Expected to NOT be falling back");
626Debug.Assert(chars > charStart, "[SBCSCodePageEncoding.GetBytes]Expected chars to have advanced (normal)");
651Debug.Assert(fallbackBuffer == null || fallbackBuffer.Remaining == 0, "[SBCSEncoding.GetBytes]Expected Empty fallback buffer at end");
660Debug.Assert(bytes != null, "[SBCSCodePageEncoding.GetCharCount]bytes is null");
661Debug.Assert(count >= 0, "[SBCSCodePageEncoding.GetCharCount]byteCount is negative");
680Debug.Assert(!decoder.m_throwOnOverflow || !decoder.InternalHasFallbackBuffer ||
738Debug.Assert(fallbackBuffer == null || fallbackBuffer.Remaining == 0,
749Debug.Assert(bytes != null, "[SBCSCodePageEncoding.GetChars]bytes is null");
750Debug.Assert(byteCount >= 0, "[SBCSCodePageEncoding.GetChars]byteCount is negative");
751Debug.Assert(chars != null, "[SBCSCodePageEncoding.GetChars]chars is null");
752Debug.Assert(charCount >= 0, "[SBCSCodePageEncoding.GetChars]charCount is negative");
776Debug.Assert(!decoder.m_throwOnOverflow || !decoder.InternalHasFallbackBuffer ||
861Debug.Assert(bytes > byteStart,
880Debug.Assert(bytes > byteStart,
897Debug.Assert(fallbackBuffer == null || fallbackBuffer.Remaining == 0,
System.Text.Encodings.Web (13)
System.Text.Json (87)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (11)
528Debug.Assert(EffectiveConverter != null, "Must have calculated the effective converter.");
565Debug.Assert(DeclaringTypeInfo != null, "We should have ensured parent is assigned in JsonTypeInfo");
593Debug.Assert(DeclaringTypeInfo != null, "We should have ensured parent is assigned in JsonTypeInfo");
594Debug.Assert(!IsConfigured, "Should not be called post-configuration.");
595Debug.Assert(_jsonTypeInfo != null, "Must have already been determined on configuration.");
620Debug.Assert(EffectiveConverter != null, "Must have calculated the effective converter.");
621Debug.Assert(DeclaringTypeInfo != null, "We should have ensured parent is assigned in JsonTypeInfo");
622Debug.Assert(!IsConfigured, "Should not be called post-configuration.");
947Debug.Assert(EffectiveConverter.CanPopulate, "Property is marked with Populate but converter cannot populate. This should have been validated in Configure");
948Debug.Assert(state.Parent.ReturnValue != null, "Parent object is null");
949Debug.Assert(!state.Current.IsPopulating, "We've called TryGetPrePopulatedValue more than once");
System.Text.Json.SourceGeneration (6)
System.Text.RegularExpressions (53)
System.Text.RegularExpressions.Generator (77)
RegexGenerator.Emitter.cs (42)
1484Debug.Assert(node.Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
1485Debug.Assert(node.ChildCount() == 1, "Capture nodes should have one child");
1666Debug.Assert(node.Kind is RegexNodeKind.Alternate, $"Unexpected type: {node.Kind}");
1667Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
1804Debug.Assert(startingLiteralNode is not null, "Unexpectedly couldn't find the branch starting node.");
2106Debug.Assert(node.Kind is RegexNodeKind.Backreference, $"Unexpected type: {node.Kind}");
2175Debug.Assert(node.Kind is RegexNodeKind.BackreferenceConditional, $"Unexpected type: {node.Kind}");
2176Debug.Assert(node.ChildCount() == 2, $"Expected 2 children, found {node.ChildCount()}");
2348Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
2349Debug.Assert(node.ChildCount() == 3, $"Expected 3 children, found {node.ChildCount()}");
2535Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}");
2536Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2628Debug.Assert(node.Kind is RegexNodeKind.PositiveLookaround, $"Unexpected type: {node.Kind}");
2629Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2676Debug.Assert(node.Kind is RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}");
2677Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2787Debug.Assert(sliceStaticPos == 0, "This should be the first node and thus static position shouldn't have advanced.");
2951Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround or RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
2980Debug.Assert(node.Kind is RegexNodeKind.UpdateBumpalong, $"Unexpected type: {node.Kind}");
2992Debug.Assert(node.Kind is RegexNodeKind.Concatenate, $"Unexpected type: {node.Kind}");
2993Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
3166Debug.Assert(node.Kind is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary or RegexNodeKind.ECMABoundary or RegexNodeKind.NonECMABoundary, $"Unexpected kind: {node.Kind}");
3193Debug.Assert(node.Kind is RegexNodeKind.Beginning or RegexNodeKind.Start or RegexNodeKind.Bol or RegexNodeKind.End or RegexNodeKind.EndZ or RegexNodeKind.Eol, $"Unexpected type: {node.Kind}");
3259Debug.Assert(node.Kind is RegexNodeKind.Multi, $"Unexpected type: {node.Kind}");
3308Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop, $"Unexpected type: {node.Kind}");
3446Debug.Assert(node.Kind is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy, $"Unexpected type: {node.Kind}");
3693Debug.Assert(node.Kind is RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
3694Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
3695Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
3696Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
3719Debug.Assert(!isAtomic, "An atomic lazy should have had its upper bound lowered to its lower bound.");
4117Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}");
4249Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}");
4287Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
4288Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4289Debug.Assert(node.M == node.N, $"Unexpected M={node.M} == N={node.N}");
4290Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
4307Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
4308Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4309Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
4310Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
4931Debug.Assert(!negate, "Negation isn't appropriate for a multi");
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (8)
324Debug.Assert(
331Debug.Assert(string.Compare(s_propTable[i][0], s_propTable[i + 1][0], StringComparison.Ordinal) < 0, $"RegexCharClass s_propTable is out of order at ({s_propTable[i][0]}, {s_propTable[i + 1][0]})");
371Debug.Assert(cc.CanMerge && CanMerge, "Both character classes added together must be able to merge");
427Debug.Assert(_subtractor == null, "Can't add two subtractions to a char class. ");
601Debug.Assert(IsSingleton(set) || IsSingletonInverse(set), "Tried to get the singleton char out of a non singleton character class");
1270Debug.Assert(asciiLazyCache is null || asciiLazyCache.Length == CacheArrayLength, "set lookup should be able to store two bits for each of the first 128 characters");
1377Debug.Assert((SetStartIndex & 0x1) == 1, "If SetStartIndex is not odd, the calculation below this will be reversed");
1840Debug.Assert(!string.IsNullOrEmpty(set), "Found a null/empty element in RegexCharClass prop table");
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (17)
203Debug.Assert(Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
216Debug.Assert(child.Parent == node, $"{child.Describe()} missing reference to parent {node.Describe()}");
222Debug.Assert(Kind != RegexNodeKind.Group, "All Group nodes should have been removed.");
258Debug.Assert(childCount == 0, $"Expected zero children for {node.Kind}, got {childCount}.");
267Debug.Assert(childCount == 1, $"Expected one and only one child for {node.Kind}, got {childCount}.");
271Debug.Assert(childCount == 2, $"Expected two children for {node.Kind}, got {childCount}");
275Debug.Assert(childCount == 3, $"Expected three children for {node.Kind}, got {childCount}");
280Debug.Assert(childCount >= 2, $"Expected at least two children for {node.Kind}, got {childCount}.");
292Debug.Assert(node.Str is not null, "Expect non-null multi string");
293Debug.Assert(node.Str.Length >= 2, $"Expected {node.Str} to be at least two characters");
300Debug.Assert(!string.IsNullOrEmpty(node.Str), $"Expected non-null, non-empty string for {node.Kind}.");
304Debug.Assert(node.Str is null, $"Expected null string for {node.Kind}, got \"{node.Str}\".");
315Debug.Assert((node.Options & RegexOptions.IgnoreCase) == 0, $"{node.Kind} node should not have RegexOptions.IgnoreCase");
1798Debug.Assert((Options & RegexOptions.NonBacktracking) == 0, "Atomic groups aren't supported and don't help performance with NonBacktracking");
2220Debug.Assert(currentIndex >= 0, "Node should have been in its parent's child list");
2516Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
2632Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
System.Threading (1)
System.Threading.Channels (50)
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (13)
67Debug.Assert(InitialSegmentSize > 0, "Initial segment size must be > 0.");
68Debug.Assert((InitialSegmentSize & (InitialSegmentSize - 1)) == 0, "Initial segment size must be a power of 2");
69Debug.Assert(InitialSegmentSize <= MaxSegmentSize, "Initial segment size should be <= maximum.");
70Debug.Assert(MaxSegmentSize < int.MaxValue / 2, "Max segment size * 2 must be < int.MaxValue, or else overflow could occur.");
102Debug.Assert(segment != null, "Expected a non-null segment.");
112Debug.Assert(newSegmentSize > 0, "The max size should always be small enough that we don't overflow.");
179Debug.Assert(segment != null, "Expected a non-null segment.");
180Debug.Assert(array != null, "Expected a non-null item array.");
253Debug.Assert(segment != null, "Expected a non-null segment.");
254Debug.Assert(array != null, "Expected a non-null item array.");
368Debug.Assert(syncObj != null, "The syncObj parameter is null.");
390Debug.Assert((size & (size - 1)) == 0, "Size must be a power of 2");
429Debug.Assert(queue != null, "Expected a non-null queue.");
System\Threading\Channels\BoundedChannel.cs (14)
458Debug.Assert(waitingReadersTail == null, "Shouldn't have any waiters to wake up");
462Debug.Assert(success, "We should always be able to complete the reader.");
651Debug.Assert(success, "We should always be able to complete the reader.");
678Debug.Assert(SyncObj != null, "The sync obj must not be null.");
679Debug.Assert(Monitor.IsEntered(SyncObj), "Invariants can only be validated while holding the lock.");
683Debug.Assert(_blockedReaders.IsEmpty, "There are items available, so there shouldn't be any blocked readers.");
684Debug.Assert(_waitingReadersTail == null, "There are items available, so there shouldn't be any waiting readers.");
688Debug.Assert(_blockedWriters.IsEmpty, "There's space available, so there shouldn't be any blocked writers.");
689Debug.Assert(_waitingWritersTail == null, "There's space available, so there shouldn't be any waiting writers.");
693Debug.Assert(_items.IsEmpty, "There shouldn't be queued items if there's a blocked reader.");
694Debug.Assert(_blockedWriters.IsEmpty, "There shouldn't be any blocked writer if there's a blocked reader.");
698Debug.Assert(_items.Count == _bufferedCapacity, "We should have a full buffer if there's a blocked writer.");
699Debug.Assert(_blockedReaders.IsEmpty, "There shouldn't be any blocked readers if there's a blocked writer.");
703Debug.Assert(_doneWriting != null, "We can only complete if we're done writing.");
System\Threading\Channels\UnboundedChannel.cs (7)
329Debug.Assert(SyncObj != null, "The sync obj must not be null.");
330Debug.Assert(Monitor.IsEntered(SyncObj), "Invariants can only be validated while holding the lock.");
336Debug.Assert(_blockedReaders.IsEmpty, "There's data available, so there shouldn't be any blocked readers.");
337Debug.Assert(_waitingReadersTail == null, "There's data available, so there shouldn't be any waiting readers.");
339Debug.Assert(!_completion.Task.IsCompleted, "We still have data available, so shouldn't be completed.");
343Debug.Assert(_items.IsEmpty, "There are blocked/waiting readers, so there shouldn't be any data available.");
347Debug.Assert(_doneWriting != null, "We're completed, so we must be done writing.");
System\Threading\Channels\UnboundedPriorityChannel.cs (7)
334Debug.Assert(SyncObj != null, "The sync obj must not be null.");
335Debug.Assert(Monitor.IsEntered(SyncObj), "Invariants can only be validated while holding the lock.");
341Debug.Assert(_blockedReaders.IsEmpty, "There's data available, so there shouldn't be any blocked readers.");
342Debug.Assert(_waitingReadersTail == null, "There's data available, so there shouldn't be any waiting readers.");
344Debug.Assert(!_completion.Task.IsCompleted, "We still have data available, so shouldn't be completed.");
348Debug.Assert(_items.Count == 0, "There are blocked/waiting readers, so there shouldn't be any data available.");
352Debug.Assert(_doneWriting != null, "We're completed, so we must be done writing.");
System.Threading.Tasks.Dataflow (400)
Base\DataflowBlock.cs (49)
126Debug.Assert(source != null, "Filtered link requires a source to filter on.");
127Debug.Assert(target != null, "Filtered link requires a target to filter to.");
128Debug.Assert(predicate != null, "Filtered link requires a predicate to filter with.");
141Debug.Assert(_userProvidedPredicate != null, "User-provided predicate is required.");
173Debug.Assert(messageHeader.IsValid, "Only valid messages may be consumed.");
182Debug.Assert(messageHeader.IsValid, "Only valid messages may be consumed.");
191Debug.Assert(messageHeader.IsValid, "Only valid messages may be consumed.");
228Debug.Assert(filter != null, "Need a filter with which to construct the debug view.");
358Debug.Assert(source != null, "The SendAsyncSource instance must have been constructed.");
414Debug.Assert(target != null, "A valid target to send to is required.");
518Debug.Assert(completionAction != null, "Completion action to run is required.");
527Debug.Assert(_cancellationRegistration != default(CancellationTokenRegistration),
567Debug.Assert(source._cancellationState != CANCELLATION_STATE_NONE,
608Debug.Assert(_cancellationState == CANCELLATION_STATE_COMPLETING,
663Debug.Assert(
764Debug.Assert(source != null, "Need a source with which to construct the debug view.");
1007Debug.Assert(source != null, "Need a source from which to receive.");
1261Debug.Assert(Volatile.Read(ref _cleanupReserved), "Should only be called once by whomever reserved the right.");
1569Debug.Assert(target != null, "The target should never be null; this should be checked by all internal usage.");
1570Debug.Assert(source != null, "The source should never be null; this should be checked by all internal usage.");
1667Debug.Assert(propagator != null, "Need a block with which to construct the debug view.");
1906Debug.Assert(source1 != null && action1 != null, "The first source and action should not be null.");
1907Debug.Assert(source2 != null && action2 != null, "The second source and action should not be null.");
1908Debug.Assert((source3 == null) == (action3 == null), "The third action should be null iff the third source is null.");
1909Debug.Assert(dataflowBlockOptions != null, "Options are required.");
1953Debug.Assert(source != null, "Expected a non-null source");
1954Debug.Assert(action != null, "Expected a non-null action");
1955Debug.Assert(branchId >= 0, "Expected a valid branch ID (> 0)");
1956Debug.Assert(scheduler != null, "Expected a non-null scheduler");
1991Debug.Assert(source1 != null && action1 != null, "The first source and action should not be null.");
1992Debug.Assert(source2 != null && action2 != null, "The second source and action should not be null.");
1993Debug.Assert((source3 == null) == (action3 == null), "The third action should be null iff the third source is null.");
1994Debug.Assert(dataflowBlockOptions != null, "Options are required.");
2040Debug.Assert(resultBranchId < tasks.Length, "Expected a valid branch ID");
2041Debug.Assert(successfulBranchId == -1, "There should be at most one successful branch.");
2044else Debug.Assert(resultBranchId == -1, "Expected -1 as a signal of a non-successful branch");
2166Debug.Assert(completed != null, "Requires a shared target to complete.");
2266Debug.Assert(source != null, "Requires a source for which to retrieve the observable.");
2284Debug.Assert(source != null, "The observable requires a source to wrap.");
2333Debug.Assert(_observersState.Unlinker == null, "The source should not be linked to the target.");
2358Debug.Assert(observer != null, "Expected an observer.");
2364Debug.Assert(currentState != null, "Observer state should never be null.");
2392Debug.Assert(currentState != null, "Observer state should never be null.");
2393Debug.Assert(currentState.Unlinker != null, "The target should be linked.");
2394Debug.Assert(currentState.Canceler != null, "The target should have set up continuations.");
2426Debug.Assert(observable != null, "Need a block with which to construct the debug view.");
2461Debug.Assert(observable != null, "Observe state must be mapped to a source observable.");
2555Debug.Assert(Target.Completion.IsCompleted, "The target must have already completed in order to notify of completion.");
2627Debug.Assert(target != null, "A target to observe is required.");
Blocks\BatchBlock.cs (34)
84Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
202Debug.Assert(batchBlock != null, "Need a block with which to construct the debug view");
293Debug.Assert(batchSize > 0, "A positive batch size is required");
309Debug.Assert(owningBatch != null, "This batch target core must be associated with a batch block.");
310Debug.Assert(batchSize >= 1, "Batch sizes must be positive.");
311Debug.Assert(batchCompletedAction != null, "Completion action must be specified.");
312Debug.Assert(dataflowBlockOptions != null, "Options required to configure the block.");
381Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
409Debug.Assert(_nonGreedyState != null, "_nonGreedyState must have been initialized during construction in non-greedy mode.");
461Debug.Assert(_nonGreedyState != null && _nonGreedyState.TaskForInputProcessing != null,
622Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
637Debug.Assert(BatchesNeedProcessing, "There must be a batch that needs processing.");
666Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
755Debug.Assert(!_dataflowBlockOptions.Greedy, "This method may only be used in non-greedy mode.");
756Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
773Debug.Assert(_messages.Count == 0, "The queue must be empty between batches in non-greedy mode");
785Debug.Assert(allowFewerThanBatchSize ? poppedInitially > 0 : poppedInitially == _batchSize,
819Debug.Assert(reserved.Count <= _batchSize, "Expected the number of reserved sources to be <= the number needed for a batch.");
872Debug.Assert(_dataflowBlockOptions.Greedy, "This method may only be used in greedy mode.");
873Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
874Debug.Assert(_boundingState != null, "Bounding state is required when in bounded mode.");
902Debug.Assert(poppedInitially > 0, "We received fewer than we expected based on the previous check.");
931Debug.Assert(reserved.Count <= itemCountNeededToCompleteBatch, "Expected the number of reserved sources to be <= the number needed for a batch.");
981Debug.Assert(!_dataflowBlockOptions.Greedy, "This method may only be used in non-greedy mode.");
982Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
983Debug.Assert(_nonGreedyState.ReservedSourcesTemp != null, "ReservedSourcesTemp should have been initialized.");
1031Debug.Assert(_dataflowBlockOptions.Greedy, "This method may only be used in greedy mode.");
1032Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
1033Debug.Assert(_nonGreedyState.ReservedSourcesTemp != null, "ReservedSourcesTemp should have been initialized.");
1034Debug.Assert(_boundingState != null, "Bounded state is required for bounded mode.");
1086Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
1087Debug.Assert(_nonGreedyState.ReservedSourcesTemp != null, "Should have been initialized");
1117Debug.Assert(numItemsRemoved > 0, "Should only be called for a positive number of items removed.");
1128Debug.Assert(_boundingState.CurrentCount - numItemsRemoved >= 0,
Blocks\BatchedJoinBlock.cs (21)
102Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
149Debug.Assert(_target1 != null, "_target1 not initialized");
150Debug.Assert(_target2 != null, "_target2 not initialized");
164Debug.Assert(_sharedResources != null, "_sharedResources not initialized");
165Debug.Assert(_sharedResources._incomingLock != null, "_sharedResources._incomingLock not initialized");
166Debug.Assert(_source != null, "_source not initialized");
230Debug.Assert(batchedJoinBlock != null, "Need a block with which to construct the debug view.");
354Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
404Debug.Assert(_target1 != null, "_target1 not initialized");
405Debug.Assert(_target2 != null, "_target2 not initialized");
406Debug.Assert(_target3 != null, "_target3 not initialized");
421Debug.Assert(_sharedResources != null, "_sharedResources not initialized");
422Debug.Assert(_sharedResources._incomingLock != null, "_sharedResources._incomingLock not initialized");
423Debug.Assert(_source != null, "_source not initialized");
488Debug.Assert(batchedJoinBlock != null, "Need a block with which to construct the debug view.");
546Debug.Assert(sharedResources != null, "Targets require a shared resources through which to communicate.");
586Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
652Debug.Assert(batchedJoinBlockTarget != null, "Need a block with which to construct the debug view.");
685Debug.Assert(batchSize >= 1, "A positive batch size is required.");
686Debug.Assert(batchSizeReachedAction != null, "Need an action to invoke for each batch.");
687Debug.Assert(allTargetsDecliningAction != null, "Need an action to invoke when all targets have declined.");
Blocks\BroadcastBlock.cs (25)
79Debug.Assert(dataflowBlockOptions.BoundedCapacity > 0, "Positive bounding count expected; should have been verified by options ctor");
94Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
127Debug.Assert(storeExceptionEvenIfAlreadyCompleting || !revertProcessingState,
142Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
194Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
209Debug.Assert(_boundingState != null && _boundingState.PostponedMessages != null,
224Debug.Assert(numItemsRemoved > 0, "Should only be called for a positive number of items removed.");
235Debug.Assert(_boundingState.CurrentCount - numItemsRemoved >= 0,
250Debug.Assert(_boundingState != null, "Must be in bounded mode.");
285Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
287Debug.Assert(_boundingState.TaskForInputProcessing.Id == Task.CurrentId,
331Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
333Debug.Assert(_boundingState.TaskForInputProcessing.Id == Task.CurrentId,
464Debug.Assert(broadcastBlock != null, "Need a block with which to construct the debug view.");
553Debug.Assert(owningSource != null, "Must be associated with a broadcast block.");
554Debug.Assert(dataflowBlockOptions != null, "Options are required to configure this block.");
674Debug.Assert(target != null, "Target required to offer messages to.");
711else Debug.Assert(result != DataflowMessageStatus.NotAvailable, "Messages from a Broadcast should never be missed.");
744Debug.Assert(_messages.Count > 0, "There must be at least one message to dequeue.");
944Debug.Assert(_taskForOutputProcessing == null, "There must be no processing tasks.");
945Debug.Assert(
1162Debug.Assert(exception != null, "An exception to add is required.");
1163Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
1174Debug.Assert(exceptions != null, "A list of exceptions to add is required.");
1175Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
Blocks\BufferBlock.cs (13)
76Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
119Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
135Debug.Assert(_boundingState != null && _boundingState.PostponedMessages != null,
162Debug.Assert(storeExceptionEvenIfAlreadyCompleting || !revertProcessingState,
177Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
225Debug.Assert(numItemsRemoved > 0, "A positive number of items to remove is required.");
236Debug.Assert(_boundingState.CurrentCount - numItemsRemoved >= 0,
251Debug.Assert(_boundingState != null, "Must be in bounded mode.");
287Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
289Debug.Assert(_boundingState.TaskForInputProcessing.Id == Task.CurrentId,
333Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
335Debug.Assert(_boundingState.TaskForInputProcessing.Id == Task.CurrentId,
448Debug.Assert(bufferBlock != null, "Need a block with which to construct the debug view.");
Blocks\JoinBlock.cs (42)
98Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
136Debug.Assert(_target1 != null, "_target1 not initialized");
137Debug.Assert(_target2 != null, "_target2 not initialized");
151Debug.Assert(_sharedResources != null, "_sharedResources not initialized");
152Debug.Assert(_sharedResources._exceptionAction != null, "_sharedResources._exceptionAction not initialized");
211Debug.Assert(joinBlock != null, "Need a block with which to construct the debug view.");
323Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
361Debug.Assert(_target1 != null, "_target1 not initialized");
362Debug.Assert(_target2 != null, "_target2 not initialized");
363Debug.Assert(_target3 != null, "_target3 not initialized");
378Debug.Assert(_sharedResources != null, "_sharedResources not initialized");
379Debug.Assert(_sharedResources._exceptionAction != null, "_sharedResources._exceptionAction not initialized");
441Debug.Assert(joinBlock != null, "Need a block with which to construct the debug view.");
514Debug.Assert(sharedResources != null, "Targets need shared resources through which to communicate.");
530Debug.Assert(_messages != null, "_messages must have been initialized in greedy mode");
531Debug.Assert(_messages.Count >= 0, "A message must have been consumed by this point.");
536Debug.Assert(_nonGreedy!.ConsumedMessage.Key, "A message must have been consumed by this point.");
561Debug.Assert(_messages != null, "_messages must have been initialized in greedy mode");
596Debug.Assert(_sharedResources._dataflowBlockOptions.Greedy, "This is only valid in greedy mode");
613Debug.Assert(!_sharedResources._dataflowBlockOptions.Greedy, "This is only used in non-greedy mode");
620Debug.Assert(!HasAtLeastOneMessageAvailable, "The queue must be empty between joins in non-greedy mode");
653Debug.Assert(!_sharedResources._dataflowBlockOptions.Greedy, "This is only used in non-greedy mode");
654Debug.Assert(_nonGreedy!.ReservedMessage.Key != null, "This target must have a reserved message");
680Debug.Assert(!_nonGreedy.ConsumedMessage.Key, "There must be no other consumed message");
695Debug.Assert(_sharedResources._dataflowBlockOptions.Greedy, "This is only used in greedy mode");
696Debug.Assert(_sharedResources._boundingState != null, "This is only used in bounding mode");
780Debug.Assert(_nonGreedy != null, "Only valid in non-greedy mode.");
791Debug.Assert(_nonGreedy == null || _nonGreedy.ReservedMessage.Key == null,
855Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
879Debug.Assert(_nonGreedy != null, "_nonGreedy must have been initialized during construction in non-greedy mode.");
910Debug.Assert(_messages != null, "_messages must be initialized in greedy mode.");
977Debug.Assert(joinBlockTarget != null, "Need a target with which to construct the debug view.");
1043Debug.Assert(ownerJoin != null, "Resources must be associated with a join.");
1044Debug.Assert(targets != null, "Resources must be shared between multiple targets.");
1045Debug.Assert(joinFilledAction != null, "An action to invoke when a join is created must be provided.");
1046Debug.Assert(exceptionAction != null, "An action to invoke for faults must be provided.");
1047Debug.Assert(dataflowBlockOptions != null, "Options must be provided to configure the resources.");
1277Debug.Assert(JoinNeedsProcessing, "There must be a join that needs processing.");
1358Debug.Assert(!_dataflowBlockOptions.Greedy || _boundingState != null, "This only makes sense in non-greedy or bounding mode");
1397Debug.Assert(_targets.Length > 0, "A join must have targets.");
1424Debug.Assert(numItemsRemoved > 0, "Number of items removed needs to be positive.");
1435Debug.Assert(_boundingState.CurrentCount - numItemsRemoved >= 0,
Blocks\TransformManyBlock.cs (10)
153Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
256Debug.Assert(completed != null, "A task should have been provided.");
257Debug.Assert(completed.IsCompleted, "The task should have been in a final state.");
350Debug.Assert(_reorderingBuffer != null, "Expected a reordering buffer");
351Debug.Assert(id != Common.INVALID_REORDERING_ID, "This ID should never have been handed out.");
438Debug.Assert(_reorderingBuffer == null, "Expected not to have a reordering buffer");
439Debug.Assert(outputItems is TOutput[] || outputItems is List<TOutput>, "outputItems must be a list we've already vetted as trusted");
538Debug.Assert(_target.IsBounded, "Expected to be in bounding mode.");
541else Debug.Assert(count == 1, "Count shouldn't be negative.");
629Debug.Assert(transformManyBlock != null, "Need a block with which to construct the debug view.");
Internal\Common.cs (40)
48Debug.Assert(syncObj != null, "The monitor object to check must be provided.");
49Debug.Assert(Monitor.IsEntered(syncObj) == held, "The locking scheme was not correctly followed.");
71Debug.Assert(predicate != null, "Non-null predicate to execute is required.");
95Debug.Assert(wr != null, "Expected a WeakReference<T> as the state argument");
104Debug.Assert(block != null, "Block required to extract an Id.");
120Debug.Assert(block != null, "Should only be used with valid objects being displayed in the debugger.");
121Debug.Assert(options == null || options.NameFormat != null, "If options are provided, NameFormat must be valid.");
152Debug.Assert(exception != null, "An exception to check for cancellation must be provided.");
178Debug.Assert(completionTask != null, "A task to wire up for completion is needed.");
179Debug.Assert(completeAction != null, "An action to invoke upon cancellation is required.");
214Debug.Assert(exception != null && exception.StackTrace == null,
230Debug.Assert(exc != null, "The exception into which data should be stored must be provided.");
274Debug.Assert(exception != null, "An exception is needed to store the data into.");
275Debug.Assert(key != null, "A key into the exception's data collection is needed.");
276Debug.Assert(value != null, "The value to store must be provided.");
313Debug.Assert(exception != null, "An exception to add is required.");
314Debug.Assert(!unwrapInnerExceptions || exception.InnerException != null,
374Debug.Assert(cancellationToken.IsCancellationRequested,
377Debug.Assert(t.IsCanceled, "Task's constructor should cancel the task synchronously in the ctor.");
386Debug.Assert(block != null, "We need a block from which to retrieve a cancellation task.");
407Debug.Assert(outgoingLock != null, "Monitor object needed to protect the operation.");
408Debug.Assert(targetRegistry != null, "Registry from which to remove is required.");
409Debug.Assert(targetBlock != null, "Target block to unlink is required.");
454Debug.Assert(task != null, "Task to start is required.");
455Debug.Assert(scheduler != null, "Scheduler on which to start the task is required.");
472Debug.Assert(task != null, "Task to start is needed.");
473Debug.Assert(scheduler != null, "Scheduler on which to start the task is required.");
484Debug.Assert(task.IsFaulted, "The task should have been faulted if it failed to start.");
501Debug.Assert(target != null, "There must be a subject target.");
502Debug.Assert(postponedMessages != null, "The stacked map of postponed messages must exist.");
519Debug.Assert(sourceAndMessage.Key != null, "Postponed messages must have an associated source.");
533Debug.Assert(processedCount == initialCount,
548Debug.Assert(sourceCompletionTask != null, "sourceCompletionTask may not be null.");
549Debug.Assert(target != null, "The target where completion is to be propagated may not be null.");
550Debug.Assert(sourceCompletionTask.IsCompleted, "sourceCompletionTask must be completed in order to propagate its completion.");
571Debug.Assert(sourceCompletionTask != null, "sourceCompletionTask may not be null.");
572Debug.Assert(target != null, "The target where completion is to be propagated may not be null.");
582Debug.Assert(sourceCompletionTask != null, "sourceCompletionTask may not be null.");
583Debug.Assert(target != null, "The target where completion is to be propagated may not be null.");
628Debug.Assert(boundedCapacity > 0, "Bounded is only supported with positive values.");
Internal\DataflowEtwProvider.cs (11)
66Debug.Assert(block != null, "Block needed for the ETW event.");
67Debug.Assert(dataflowBlockOptions != null, "Options needed for the ETW event.");
94Debug.Assert(block != null, "Block needed for the ETW event.");
95Debug.Assert(task != null, "Task needed for the ETW event.");
96Debug.Assert(reason == TaskLaunchedReason.ProcessingInputMessages || reason == TaskLaunchedReason.OfferingOutputMessages,
130Debug.Assert(block != null, "Block needed for the ETW event.");
135Debug.Assert(blockIsCompleted, "Block must be completed for this event to be valid.");
181Debug.Assert(source != null, "Source needed for the ETW event.");
182Debug.Assert(target != null, "Target needed for the ETW event.");
203Debug.Assert(source != null, "Source needed for the ETW event.");
204Debug.Assert(target != null, "Target needed for the ETW event.");
Internal\QueuedMap.cs (11)
78Debug.Assert(0 <= _freeIndex && _freeIndex < _storage.Count, "Index is out of range.");
93Debug.Assert(_tailIndex == TERMINATOR_INDEX, "If head indicates empty, so too should tail.");
99Debug.Assert(_tailIndex != TERMINATOR_INDEX, "If head does not indicate empty, neither should tail.");
116Debug.Assert(_tailIndex == TERMINATOR_INDEX, "If head indicates empty, so too should tail.");
122Debug.Assert(0 <= _headIndex && _headIndex < _storage.Count, "Head is out of range.");
140Debug.Assert(0 <= index && index < _storage.Count, "Index is out of range.");
144Debug.Assert(idx != index, "Index should not belong to the list of free slots.");
211Debug.Assert(items != null, "Requires non-null array to store into.");
212Debug.Assert(count >= 0 && arrayOffset >= 0, "Count and offset must be non-negative");
213Debug.Assert(arrayOffset + count >= 0, "Offset plus count overflowed");
214Debug.Assert(arrayOffset + count <= items.Length, "Range must be within array size");
Internal\SourceCore.cs (19)
108Debug.Assert(owningSource != null, "Core must be associated with a source.");
109Debug.Assert(dataflowBlockOptions != null, "Options must be provided to configure the core.");
110Debug.Assert(completeAction != null, "Action to invoke on completion is required.");
264Debug.Assert(!_enableOffering, "Offering should have been disabled if there was a valid reservation");
412Debug.Assert(items != null, "Items list must be valid.");
462Debug.Assert(exception != null, "Valid exception must be provided to be added.");
463Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
474Debug.Assert(exceptions != null, "Valid exceptions must be provided to be added.");
475Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
489Debug.Assert(aggregateException != null && aggregateException.InnerExceptions.Count > 0, "Aggregate must be valid and contain inner exceptions to unwrap.");
490Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
579Debug.Assert(linkToTarget != null, "Must have a valid target to offer to.");
673Debug.Assert(target != null, "Valid target to offer to is required.");
678Debug.Assert(result != DataflowMessageStatus.NotAvailable, "Messages are not being offered concurrently, so nothing should be missed.");
696Debug.Assert(result == DataflowMessageStatus.Postponed,
741Debug.Assert(_taskForOutputProcessing == null && _enableOffering && !_messages.IsEmpty,
800Debug.Assert(_taskForOutputProcessing != null && _taskForOutputProcessing.Id == Task.CurrentId,
858Debug.Assert(_taskForOutputProcessing != null && _taskForOutputProcessing.Id == Task.CurrentId,
912Debug.Assert(
Internal\TargetCore.cs (30)
114Debug.Assert(owningTarget != null, "Core must be associated with a target block.");
115Debug.Assert(dataflowBlockOptions != null, "Options must be provided to configure the core.");
116Debug.Assert(callAction != null, "Action to invoke for each item is required.");
129Debug.Assert(_dataflowBlockOptions.BoundedCapacity > 0, "Positive bounding count expected; should have been verified by options ctor");
143Debug.Assert(storeExceptionEvenIfAlreadyCompleting || !revertProcessingState,
153Debug.Assert(_numberOfOutstandingOperations > 0 || !storeExceptionEvenIfAlreadyCompleting,
168Debug.Assert(_numberOfOutstandingOperations > 0 && (!UsesAsyncCompletion || _numberOfOutstandingServiceTasks > 0),
208Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
218Debug.Assert(messageId != Common.INVALID_REORDERING_ID, "The assigned message ID is invalid.");
227Debug.Assert(_boundingState != null && _boundingState.PostponedMessages != null,
259Debug.Assert(_numberOfOutstandingOperations > 0, "Operations may only be completed if any are outstanding.");
265Debug.Assert(boundingCountChange <= 0 && _boundingState.CurrentCount + boundingCountChange >= 0,
295Debug.Assert(_numberOfOutstandingOperations >= 0, "Number of outstanding operations should never be negative.");
296Debug.Assert(_numberOfOutstandingServiceTasks >= 0, "Number of outstanding service tasks should never be negative.");
297Debug.Assert(_numberOfOutstandingOperations >= _numberOfOutstandingServiceTasks, "Number of outstanding service tasks should never exceed the number of outstanding operations.");
311Debug.Assert(_numberOfOutstandingOperations >= 0, "Number of outstanding operations should never be negative.");
312Debug.Assert(_numberOfOutstandingServiceTasks >= 0, "Number of outstanding service tasks should never be negative.");
313Debug.Assert(_numberOfOutstandingOperations >= _numberOfOutstandingServiceTasks, "Number of outstanding service tasks should never exceed the number of outstanding operations.");
354Debug.Assert(HasRoomForMoreServiceTasks, "There must be room to process asynchronously.");
424Debug.Assert(
495Debug.Assert(_numberOfOutstandingOperations > 0, "Expected a positive number of outstanding operations, since we're completing one here.");
502Debug.Assert(_numberOfOutstandingServiceTasks > 0, "Expected a positive number of outstanding service tasks, since we're completing one here.");
523Debug.Assert(UsesAsyncCompletion, "Only valid to use when in async mode.");
615Debug.Assert(
660Debug.Assert(messageId != Common.INVALID_REORDERING_ID, "The assigned message ID is invalid.");
664Debug.Assert(_boundingState.OutstandingTransfers >= 0, "Expected TryConsumePostponedMessage to not be negative.");
730Debug.Assert((_decliningPermanently && _messages.IsEmpty) || CanceledOrFaulted, "There must be no more messages.");
758lock (IncomingLock) Debug.Assert(_numberOfOutstandingOperations == 0, "Everything must be done by now.");
811Debug.Assert(count != 0, "Should only be called when the count is actually changing.");
817Debug.Assert(count > 0 || (count < 0 && _boundingState.CurrentCount + count >= 0),
Internal\TargetRegistry.cs (29)
37Debug.Assert(target != null, "The target that is supposed to be linked must not be null.");
38Debug.Assert(linkOptions != null, "The linkOptions must not be null.");
74Debug.Assert(owningSource != null, "The TargetRegistry instance must be owned by a source block.");
85Debug.Assert(target != null, "The target that is supposed to be linked must not be null.");
86Debug.Assert(linkOptions != null, "The link options must not be null.");
97Debug.Assert(_linksWithRemainingMessages >= 0, "_linksWithRemainingMessages must be non-negative at any time.");
121Debug.Assert(target != null, "Target to remove is required.");
124Debug.Assert(_linksWithRemainingMessages >= 0, "_linksWithRemainingMessages must be non-negative at any time.");
138Debug.Assert(target != null, "Target to remove is required.");
141Debug.Assert(_linksWithRemainingMessages >= 0, "_linksWithRemainingMessages must be non-negative at any time.");
142Debug.Assert(!onlyIfReachedMaxMessages || _linksWithRemainingMessages > 0, "We shouldn't have ended on the slow path.");
148Debug.Assert(node != null, "The LinkedTargetInfo node referenced in the Dictionary must be non-null.");
159Debug.Assert(_linksWithRemainingMessages >= 0, "_linksWithRemainingMessages must be non-negative at any time.");
169Debug.Assert(node.RemainingMessages > 1, "The target should have been removed, because there are no remaining messages.");
184Debug.Assert(_linksWithRemainingMessages >= 0, "_linksWithRemainingMessages must be non-negative at any time.");
194Debug.Assert(_owningSource.Completion.IsCompleted, "The owning source must have completed before propagating completion.");
214Debug.Assert(node != null, "Requires a node to be added.");
223Debug.Assert(_firstTarget != null && _lastTarget != null, "Both first and last node must either be null or non-null.");
224Debug.Assert(_lastTarget.Next == null, "The last node must not have a successor.");
225Debug.Assert(_firstTarget.Previous == null, "The first node must not have a predecessor.");
243Debug.Assert(_firstTarget != null && _lastTarget != null, "Both first and last node must be non-null after AddToList.");
250Debug.Assert(node != null, "Node to remove is required.");
251Debug.Assert(_firstTarget != null && _lastTarget != null, "Both first and last node must be non-null before RemoveFromList.");
273Debug.Assert((_firstTarget != null) == (_lastTarget != null), "Both first and last node must either be null or non-null after RemoveFromList.");
312Debug.Assert(owningSource != null, "Propagator must be associated with a source.");
313Debug.Assert(target != null, "Target to propagate to is required.");
323Debug.Assert(source == _owningSource, "Only valid to be used with the source for which it was created.");
378Debug.Assert(passthrough != null, "Need a propagator with which to construct the debug view.");
398Debug.Assert(registry != null, "Need a registry with which to construct the debug view.");
src\libraries\Common\src\System\Collections\Concurrent\SingleProducerSingleConsumerQueue.cs (13)
67Debug.Assert(InitialSegmentSize > 0, "Initial segment size must be > 0.");
68Debug.Assert((InitialSegmentSize & (InitialSegmentSize - 1)) == 0, "Initial segment size must be a power of 2");
69Debug.Assert(InitialSegmentSize <= MaxSegmentSize, "Initial segment size should be <= maximum.");
70Debug.Assert(MaxSegmentSize < int.MaxValue / 2, "Max segment size * 2 must be < int.MaxValue, or else overflow could occur.");
102Debug.Assert(segment != null, "Expected a non-null segment.");
112Debug.Assert(newSegmentSize > 0, "The max size should always be small enough that we don't overflow.");
179Debug.Assert(segment != null, "Expected a non-null segment.");
180Debug.Assert(array != null, "Expected a non-null item array.");
253Debug.Assert(segment != null, "Expected a non-null segment.");
254Debug.Assert(array != null, "Expected a non-null item array.");
368Debug.Assert(syncObj != null, "The syncObj parameter is null.");
390Debug.Assert((size & (size - 1)) == 0, "Size must be a power of 2");
429Debug.Assert(queue != null, "Expected a non-null queue.");
System.Threading.Tasks.Parallel (12)
System.Transactions.Local (36)
System\Transactions\TransactionState.cs (24)
163Debug.Assert(tx.State != this, "Changing to the same state.");
788Debug.Assert(tx._promoterType != Guid.Empty, "InternalTransaction.PromoterType was not set in PSPEInitialize");
835Debug.Assert(tx._promoter != null, "Transaction Promoter is Null entering SubordinateActive");
1077Debug.Assert(tx._promoterType != Guid.Empty, "InternalTransaction.PromoterType was not set in Phase0PSPEInitialize");
1266Debug.Assert(tx._phase1Volatiles._volatileEnlistmentCount == 1,
1668Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
1697Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
1727Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
1768Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
1803Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
2007Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
2101Debug.Assert(tx.promotedToken != null, "InternalTransaction.promotedToken is null in TransactionStateDelegatedNonMSDTCBase or one of its derived classes.");
2145Debug.Assert((tx._promoterType == Guid.Empty) || (tx._promoterType == TransactionInterop.PromoterTypeDtc), "Promoted to MSTC but PromoterType is not TransactionInterop.PromoterTypeDtc");
2536Debug.Assert(tx._phase0Volatiles.VolatileDemux != null, "Volatile Demux must exist for VolatilePrepareDone when promoted.");
2644Debug.Assert(tx._phase1Volatiles.VolatileDemux != null, "Volatile Demux must exist for VolatilePrepareDone when promoted.");
2801Debug.Assert(tx._phase1Volatiles.VolatileDemux != null, "Volatile Demux must exist.");
2864Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
3494Debug.Assert(tx._durableEnlistment != null, "PromotedNonMSDTC state is not valid for transaction");
3633Debug.Assert(tx.promotedToken != null, "InternalTransaction.promotedToken is null in TransactionStateDelegatedNonMSDTCBase or one of its derived classes.");
4265Debug.Assert((distributedTx == null), "PSPEPromote for non-MSDTC promotion returned a distributed transaction.");
4266Debug.Assert((tx.promotedToken != null), "PSPEPromote for non-MSDTC promotion did not set InternalTransaction.PromotedToken.");
4351Debug.Assert(tx.State == TransactionStateActive, "PSPEPromote called from state other than TransactionStateActive");
4378Debug.Assert(tx.State == TransactionStatePhase0, "Phase0PSPEInitialize called from state other than TransactionStatePhase0");
4401Debug.Assert(returnState == TransactionStateDelegated ||
System.Web.HttpUtility (3)
System.Windows.Controls.Ribbon (22)
System.Windows.Forms (715)
System\Windows\Forms\ActiveX\AxHost.cs (25)
1031Debug.Assert(!Visible, "If we were visible we would not be need a fake window.");
1048Debug.Assert(!IsHandleCreated, "if we need a fake window, we can't have a real one");
1263Debug.Assert(!OwnWindow(), "Why are we here if we own our window?");
1327Debug.Assert(GetOcState() == OC_LOADED, " failed transition");
1332Debug.Assert(GetOcState() == OC_PASSIVE, " failed transition");
1366Debug.Assert(GetOcState() == OC_LOADED, " failed transition");
1371Debug.Assert(GetOcState() == OC_RUNNING, " failed transition");
1383Debug.Assert(!_axState[s_fOwnWindow], "If we are invis at runtime, we should never be going beyond OC_RUNNING");
1432Debug.Assert(GetOcState() == OC_UIACTIVE, " failed transition");
1485Debug.Assert(CanUIActivate, "we have to be able to uiactivate");
1494Debug.Assert(_axState[s_fFakingWindow], "have to be faking it in order to destroy it...");
1577Debug.Assert(!_axState[s_fFakingWindow], "if we were visible, we could not have had a fake window...");
1621Debug.Assert(!_axState[s_fOwnWindow], "can't own our window when hiding");
1622Debug.Assert(IsHandleCreated, "gotta have a window to hide");
1623Debug.Assert(GetOcState() >= OC_INPLACE, "have to be in place in order to hide.");
1628Debug.Assert(!IsHandleCreated, "if we are inplace deactivated we should not have a window.");
1825Debug.Assert(!_axState[s_disposed], "we could not be asking for the object when we are axState[disposed]...");
2016Debug.Assert(_storageType != StorageType.Unknown, "if we are loaded, out storage type must be set!");
2180Debug.Assert(_freezeCount >= 0, "invalid freeze count!");
2303Debug.Assert(_instance is null, "instance must be null");
2307Debug.Assert(_instance is not null, "w/o an exception being thrown we must have an object...");
2389Debug.Assert(selectionStyle is >= 0 and <= 2, "Invalid selection style");
2405Debug.Assert((_flags & AxFlags.PreventEditMode) == 0, "edit mode should have been disabled");
2710Debug.Assert(dispid != PInvokeCore.DISPID_UNKNOWN, "Wrong dispid sent to GetPropertyDescriptorFromDispid");
3234Debug.Assert(IsHandleCreated, "we got to have a handle to be here...");
System\Windows\Forms\Control.cs (27)
436Debug.Assert(accessibleObject is not null, "Failed to create accessibility object");
455Debug.Assert(ncAccessibleObject is not null, "Failed to create NON-CLIENT accessibility object");
707Debug.Assert(!backBrush.IsNull, "Failed to create brushHandle");
1565Debug.Assert(s_defaultFont is not null, "defaultFont wasn't set!");
2450Debug.Assert(Margin == value, "Error detected while setting Margin.");
2474Debug.Assert(MaximumSize == DefaultMaximumSize, "Error detected while resetting MaximumSize.");
2480Debug.Assert(MaximumSize == value, "Error detected while setting MaximumSize.");
2499Debug.Assert(MinimumSize == value, "Error detected while setting MinimumSize.");
4511Debug.Assert((cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_MDICHILD) == 0, "Can't put MDI child forms on the parking form");
4960Debug.Assert(this == entry._caller, "Called BeginInvoke on one control, and the corresponding EndInvoke on a different control");
4976Debug.Assert(asyncResult.IsCompleted, "Why isn't this asyncResult done yet?");
4986Debug.Assert(IsHandleCreated, "Handle should be created by now");
5047Debug.Assert(c.IsHandleCreated, "FindMarshalingControl chose a bad control.");
5698Debug.Assert(window is not null, "window is null in Control.GetSafeHandle");
6080Debug.Assert(tme._args!.Length == 1, "Arguments are wrong for WaitCallback");
6085Debug.Assert(tme._args!.Length == 1, "Arguments are wrong for SendOrPostCallback");
8362Debug.Assert(args is not null, "This method should never be called with null args.");
8710Debug.Assert((OBJ_TYPE)PInvokeCore.GetObjectType(hDC) == OBJ_TYPE.OBJ_ENHMETADC,
8712Debug.Assert((lParam & (long)PInvoke.PRF_CHILDREN) != 0,
8722Debug.Assert(success, "GetViewportOrgEx() failed.");
8730Debug.Assert(!hClippingRegion.IsNull, "CreateRectRgn() failed.");
8734Debug.Assert(
8752Debug.Assert(success, "GetWindowRect() failed.");
10166Debug.Assert(value != -1, "Outdated call to SetParentHandle");
10174Debug.Assert(Handle != value, "Cycle created in SetParentHandle");
10676Debug.Assert(LayoutSuspendCount > 0, "SuspendLayout: layoutSuspendCount overflowed.");
12630Debug.Assert(sizeProperty is not null && locationProperty is not null, "Error retrieving Size/Location properties on Control.");
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (1)
210Debug.Assert(
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
190Debug.Assert(
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
123Debug.Assert(
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (17)
163Debug.Assert(CurrencyManager.AllowAdd, "why did we call AddNew on the currency manager when the currency manager does not allow new rows?");
341Debug.Assert(DataBoundRowsCount() == CurrencyManager!.List!.Count || (_owner.Columns.Count == 0 && dataGridViewRowsCount == 0),
348Debug.Assert(sender == CurrencyManager, "did we forget to unregister our ListChanged event handler?");
388Debug.Assert(!_dataConnectionState[DATACONNECTIONSTATE_inAddNew] || !_dataConnectionState[DATACONNECTIONSTATE_finishedAddNew],
414Debug.Assert(_owner.AllowUserToAddRowsInternal, "how did we start the add new transaction when the AllowUserToAddRowsInternal is false?");
488Debug.Assert(DataBoundRowsCount() != -1, "the data bound data grid view rows count should be at least 0");
529Debug.Assert(CurrencyManager!.List!.Count == 0, "we deleted the row that the Child table forcefully added");
616Debug.Assert(e.OldIndex > -1, "the currency manager should have taken care of this case");
617Debug.Assert(e.NewIndex > -1, "how can we move an item outside of the list?");
623Debug.Assert(e.NewIndex != -1, "the item changed event does not cover changes to the entire list");
678Debug.Assert(sender == CurrencyManager, "did we forget to unregister our events?");
766Debug.Assert(_owner.NewRowIndex != -1, "the NewRowIndex is -1 only when AllowUserToAddRows is false");
826Debug.Assert(_owner.AllowUserToAddRowsInternal, "how did we start an add new row transaction if the dataGridView control has AllowUserToAddRows == false?");
1207Debug.Assert(!_props[i].IsBrowsable || typeof(IList).IsAssignableFrom(_props[i].PropertyType), "if the DGV does not have any columns then the properties in the currency manager should be Browsable(false) or point to sub lists");
1394Debug.Assert(DataBoundRowsCount() == CurrencyManager.List!.Count, "if the back end was changed while in AddNew the DGV should have updated its rows collection");
1541Debug.Assert(dataGridViewColumn.IsDataBound && dataGridViewColumn.BoundColumnIndex != -1, "we need a bound column index to perform the sort");
1542Debug.Assert(List is IBindingList, "you should have checked by now that we are bound to an IBindingList");
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (19)
4716Debug.Assert(numVisibleScrollingCols <= visibleScrollingColumnsTmp, "the number of displayed columns can only grow");
4896Debug.Assert(firstDisplayedFrozenRow < nRows, "firstDisplayedFrozenRow larger than number of rows");
4897Debug.Assert(lastDisplayedFrozenRow < nRows, "lastDisplayedFrozenRow larger than number of rows");
4898Debug.Assert(lastDisplayedScrollingRow < nRows, "lastDisplayedScrollingRow larger than number of rows");
4906Debug.Assert(DisplayedBandsInfo.NumTotallyDisplayedFrozenRows >= 0, "the number of visible frozen rows can't be negative");
4907Debug.Assert(DisplayedBandsInfo.NumDisplayedScrollingRows >= 0, "the number of visible scrolling rows can't be negative");
4908Debug.Assert(DisplayedBandsInfo.NumTotallyDisplayedScrollingRows >= 0, "the number of totally visible scrolling rows can't be negative");
4909Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow < nRows, "firstDisplayedScrollingRow larger than number of rows");
8327Debug.Assert(RightToLeftInternal || (x >= data.X - 1 && x < data.Right), "x must be inside the horizontal bounds of this.layout.Data");
8328Debug.Assert(!RightToLeftInternal || (x >= data.X && x <= data.Right), "x must be inside the horizontal bounds of this.layout.Data");
9113Debug.Assert(y >= data.Y - 1 && y < data.Bottom, "y must be inside the vertical bounds of the data area.");
10452Debug.Assert(DataSource is not null, "this method should only be called when we have a data connection");
10453Debug.Assert(dataGridViewColumn.DataPropertyName.Length != 0, "this method should be called only for columns which have DataPropertyName set");
17154Debug.Assert(Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time");
17155Debug.Assert(Columns[i].HeaderCell.SortGlyphDirection == dataGridViewColumn.HeaderCell.SortGlyphDirection, "DataBound columns should have the same SortGlyphDirection as the one on the DataGridView");
17702Debug.Assert(NewRowIndex == -1, "newRowIndex and AllowUserToAddRowsInternal became out of sync");
18968Debug.Assert(Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time");
19981Debug.Assert(rowCount == dataGridViewRowsCount, "out of sync in AddNewTransaction when the user did not type in the 'add new row'");
19989Debug.Assert(rowCount == dataGridViewRowsCount, "out of sync");
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
668Debug.Assert(
System\Windows\Forms\Controls\ListView\ListView.cs (46)
849Debug.Assert(!_listViewState[LISTVIEWSTATE_flipViewToLargeIconAndSmallIcon] || View == View.SmallIcon, "we need this bit only in SmallIcon view");
850Debug.Assert(!_listViewState[LISTVIEWSTATE_flipViewToLargeIconAndSmallIcon] || Application.ComCtlSupportsVisualStyles, "we need this bit only when loading ComCtl 6.0");
857Debug.Assert(!value || View == View.SmallIcon, "we need this bit only in SmallIcon view");
858Debug.Assert(!value || Application.ComCtlSupportsVisualStyles, "we need this bit only when loading ComCtl 6.0");
1690Debug.Assert(result != 0, "LVM_SETTILEVIEWINFO failed");
2404Debug.Assert(Columns[i].DisplayIndex > -1 && Columns[i].DisplayIndex < Columns.Count, "display indices out of whack");
2408Debug.Assert(sumOfDisplayIndices == (colsCount - 1) * colsCount / 2, "display indices out of whack");
2461Debug.Assert(_listItemSorter is not null, "null sorter!");
2760Debug.Assert(item is not null, "Item was null in ITEMPREPAINT");
3096Debug.Assert(fi.Exists, "who deleted our temp file?");
3121Debug.Assert(fi.Exists, "who deleted our temp file?");
3259Debug.Assert(false, "these are all the search directions");
3398Debug.Assert(item._listView == this, "Can't GetDisplayIndex if the list item doesn't belong to us");
3399Debug.Assert(item._id != -1, "ListViewItem has no ID yet");
3422Debug.Assert(displayIndex != -1, "This item is in the list view -- why can't we find a display index for it?");
3429Debug.Assert(_listViewItems is not null, "listItemsArray is null, but the handle isn't created");
3560Debug.Assert(IsHandleCreated, "How did we add items without a handle?");
3931Debug.Assert(_groups is not null && _groups.Count > 0, "this method should be used only when the user adds a group, not when we add our own DefaultGroup");
3932Debug.Assert(group != DefaultGroup, "this method should be used only when the user adds a group, not when we add our own DefaultGroup");
3969Debug.Assert(lvItem.iGroupId != -1, "there is a list view item which is not parented");
3978Debug.Assert(IsHandleCreated, "InsertGroupNative precondition: list-view handle must be created");
3979Debug.Assert(group == DefaultGroup || Groups.Contains(group), "Make sure ListView.Groups contains this group before adding the native LVGROUP. Otherwise, custom-drawing may break.");
3982Debug.Assert(result != -1, "Failed to insert group");
4018Debug.Assert(itemList is not null, "In Begin/EndUpdate with no delayed array!");
4045Debug.Assert(!_listItemsTable.ContainsKey(itemID), "internal hash table inconsistent -- inserting item, but it's already in the hash table");
4054Debug.Assert(_listViewItems is not null, "listItemsArray is null, but the handle isn't created");
4078Debug.Assert(!FlipViewToLargeIconAndSmallIcon, "if we added even 1 item then we should have been done w/ FlipViewToLargeIconAndSmallIcon");
4093Debug.Assert(IsHandleCreated, "InsertItemsNative precondition: list-view handle must be created");
4118Debug.Assert(Items.Contains(li), "Make sure ListView.Items contains this item before adding the native LVITEM. Otherwise, custom-drawing may break.");
4139Debug.Assert(result != IntPtr.Zero, "Groups not enabled");
4685Debug.Assert(_listViewItems is null, "listItemsArray not null, even though handle created");
5100Debug.Assert(IsHandleCreated, "RemoveGroupNative precondition: list-view handle must be created");
5197Debug.Assert((mask & ~(LVCOLUMNW_MASK.LVCF_FMT | LVCOLUMNW_MASK.LVCF_TEXT | LVCOLUMNW_MASK.LVCF_IMAGE)) == 0, "Unsupported mask in setColumnInfo");
5358Debug.Assert(_savedCheckedItems.Contains(item), "somehow we lost track of one item");
5430Debug.Assert(IsHandleCreated, "How did we add items without a handle?");
5467Debug.Assert(IsHandleCreated, "SetItemText with no handle");
5680Debug.Assert(IsHandleCreated, "UpdateGroupNative precondition: list-view handle must be created");
5789Debug.Assert(retval != -1, "Error enabling group view");
5796Debug.Assert(Application.ComCtlSupportsVisualStyles, "this function works only when ComCtl 6.0 and higher is loaded");
5797Debug.Assert(_viewStyle == View.Tile, "this function should be called only in Tile view");
5810Debug.Assert(retval != 0, "LVM_SETTILEVIEWINFO failed");
6148Debug.Assert(_listViewState[LISTVIEWSTATE_headerControlTracking], "HDN_ENDTRACK and HDN_BEGINTRACK are out of sync.");
6295Debug.Assert(header->iItem == 0, "we only need to compensate for the first column resize");
6296Debug.Assert(_columnHeaders!.Length > 0, "there should be a column that we need to compensate for");
6409Debug.Assert(_labelEdit is null,
6468Debug.Assert(_labelEdit is not null, "There is no active label edit to end");
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (14)
91Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created");
105Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item.");
140Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item.");
192Debug.Assert(!_owner.VirtualMode, "in virtual mode, this method does not make any sense");
259Debug.Assert(_owner._listViewItems is null, "listItemsArray not null, even though handle created");
273Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon, "we only set this when comctl 6.0 is loaded");
289Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created");
317Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created");
342Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item.");
366Debug.Assert(!_owner.VirtualMode, "in virtual mode, this function does not make any sense");
382Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item.");
405Debug.Assert(!_owner.FlipViewToLargeIconAndSmallIcon || Count == 0, "the FlipView... bit is turned off after adding 1 item.");
420Debug.Assert(_owner._listViewItems is null, "listItemsArray not null, even though handle created");
428Debug.Assert(_owner._listViewItems is not null, "listItemsArray is null, but the handle isn't created");
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (21)
148Debug.Assert(maskedTextProvider is not null, "Initializing from a null MaskProvider ref.");
1227Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
1505Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
1507Debug.Assert(startPosition >= 0 && ((startPosition + selectionLen) <= _maskedTextProvider.Length), "Invalid position range.");
1700Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
1778Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2064Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2164Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2165Debug.Assert(text is not null, "text is null.");
2283Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2390Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2501Debug.Assert(newProvider is not null, "Initializing from a null MaskProvider ref.");
2550Debug.Assert(srcPos != MaskedTextProvider.InvalidIndex, "InvalidIndex unexpected at this time.");
2705Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2724Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2762Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2768Debug.Assert(ImeMode == ImeMode.Disable, "IME enabled when in RO or Pwd mode.");
2811Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2868Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
3004Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
3023Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (20)
600Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Loaded, "Failed transition");
604Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Running, "Failed transition");
608Debug.Assert(ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Failed transition");
612Debug.Assert(ActiveXState == WebBrowserHelper.AXState.UIActive, "Failed transition");
641Debug.Assert(ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Failed transition");
645Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Running, "Failed transition");
649Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Loaded, "Failed transition");
653Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Passive, "Failed transition");
835Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Passive, "Wrong start state to transition from");
839Debug.Assert(_activeXInstance is null, "activeXInstance must be null");
852Debug.Assert(_activeXInstance is not null, "w/o an exception being thrown we must have an object...");
864Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Loaded, "Wrong start state to transition from");
893Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Loaded, "Wrong start state to transition from");
918Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Running, "Wrong start state to transition from");
937Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Running, "Wrong start state to transition from");
959Debug.Assert(ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Wrong start state to transition from");
980Debug.Assert(ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Wrong start state to transition from");
1000Debug.Assert(ActiveXState == WebBrowserHelper.AXState.UIActive, "Wrong start state to transition from");
1004Debug.Assert(hr.Succeeded, "Failed to UIDeactivate");
1016Debug.Assert(_activeXInstance is not null, "The native control is null");
System\Windows\Forms\Form.cs (32)
180Debug.Assert(_formState[s_formStateAllowTransparency] == 0, "Failed to set formState[FormStateAllowTransparency]");
181Debug.Assert(_formState[s_formStateBorderStyle] == (int)FormBorderStyle.Sizable, "Failed to set formState[FormStateBorderStyle]");
182Debug.Assert(_formState[s_formStateTaskBar] == 1, "Failed to set formState[FormStateTaskBar]");
183Debug.Assert(_formState[s_formStateControlBox] == 1, "Failed to set formState[FormStateControlBox]");
184Debug.Assert(_formState[s_formStateKeyPreview] == 0, "Failed to set formState[FormStateKeyPreview]");
185Debug.Assert(_formState[s_formStateLayered] == 0, "Failed to set formState[FormStateLayered]");
186Debug.Assert(_formState[s_formStateMaximizeBox] == 1, "Failed to set formState[FormStateMaximizeBox]");
187Debug.Assert(_formState[s_formStateMinimizeBox] == 1, "Failed to set formState[FormStateMinimizeBox]");
188Debug.Assert(_formState[s_formStateHelpButton] == 0, "Failed to set formState[FormStateHelpButton]");
189Debug.Assert(_formState[s_formStateStartPos] == (int)FormStartPosition.WindowsDefaultLocation, "Failed to set formState[FormStateStartPos]");
190Debug.Assert(_formState[s_formStateWindowState] == (int)FormWindowState.Normal, "Failed to set formState[FormStateWindowState]");
191Debug.Assert(_formState[s_formStateShowWindowOnCreate] == 0, "Failed to set formState[FormStateShowWindowOnCreate]");
192Debug.Assert(_formState[s_formStateAutoScaling] == 1, "Failed to set formState[FormStateAutoScaling]");
193Debug.Assert(_formState[s_formStateSetClientSize] == 0, "Failed to set formState[FormStateSetClientSize]");
194Debug.Assert(_formState[s_formStateTopMost] == 0, "Failed to set formState[FormStateTopMost]");
195Debug.Assert(_formState[s_formStateSWCalled] == 0, "Failed to set formState[FormStateSWCalled]");
196Debug.Assert(_formState[s_formStateMdiChildMax] == 0, "Failed to set formState[FormStateMdiChildMax]");
197Debug.Assert(_formState[s_formStateRenderSizeGrip] == 0, "Failed to set formState[FormStateRenderSizeGrip]");
198Debug.Assert(_formState[s_formStateSizeGripStyle] == 0, "Failed to set formState[FormStateSizeGripStyle]");
199Debug.Assert(_formState[s_formStateIsWindowActivated] == 0, "Failed to set formState[FormStateIsWindowActivated]");
200Debug.Assert(_formState[s_formStateIsTextEmpty] == 0, "Failed to set formState[FormStateIsTextEmpty]");
201Debug.Assert(_formState[s_formStateIsActive] == 0, "Failed to set formState[FormStateIsActive]");
202Debug.Assert(_formState[s_formStateIconSet] == 0, "Failed to set formState[FormStateIconSet]");
462Debug.Assert(!DesignMode, "Form designer should not allow base size set in design mode.");
511Debug.Assert(AutoSize == value, "Error detected setting Form.AutoSize.");
1108Debug.Assert(_ctlClient is null, "why isn't ctlClient null");
1114Debug.Assert(_ctlClient is not null, "why is ctlClient null");
3707Debug.Assert(IsHandleCreated, "Attempt to set focus to a form that has not yet created its handle.");
6080Debug.Assert(IsMdiContainer, "Not an MDI container!");
6240Debug.Assert(numWindowListItems == MdiWindowListStrip.MergedMenu.MdiWindowListItem.DropDownItems.Count, "Calling RevertMerge modified the mdiwindowlistitem");
6833Debug.Assert(Properties.ContainsKey(s_propFormMdiParent), "how is formMdiParent null?");
6834Debug.Assert(IsHandleCreated, "how is handle 0?");
System\Windows\Forms\Layout\CommonProperties.cs (28)
167Debug.Assert(value != GetAutoSize(element), "PERF: Caller should guard against setting AutoSize to original value.");
178Debug.Assert(GetAutoSize(element) == value, "Error detected setting AutoSize.");
186Debug.Assert(value != GetMargin(element), "PERF: Caller should guard against setting Margin to original value.");
190Debug.Assert(GetMargin(element) == value, "Error detected setting Margin.");
200Debug.Assert(value != GetMaximumSize(element, new Size(-7109, -7107)),
214Debug.Assert(GetMaximumSize(element, new Size(-7109, -7107)) == value, "Error detected setting MaximumSize.");
222Debug.Assert(value != GetMinimumSize(element, new Size(-7109, -7107)),
236Debug.Assert(GetMinimumSize(element, new Size(-7109, -7107)) == value, "Error detected setting MinimumSize.");
250Debug.Assert(value != GetPadding(element, new Padding(-7105)),
256Debug.Assert(GetPadding(element, new Padding(-7105)) == value, "Error detected setting Padding.");
348Debug.Assert(xGetPreferredSizeCache(element) == Size.Empty, "Error detected in xClearPreferredSizeCache.");
390Debug.Assert(
394Debug.Assert(xGetPreferredSizeCache(element) == value, "Error detected in xGetPreferredSizeCache.");
423Debug.Assert(
441Debug.Assert(
458Debug.Assert(((xGetDock(element) != DockStyle.None) && element.ParticipatesInLayout) == result,
519Debug.Assert(value != GetSelfAutoSizeInDefaultLayout(element), "PERF: Caller should guard against setting AutoSize to original value.");
525Debug.Assert(GetSelfAutoSizeInDefaultLayout(element) == value, "Error detected setting AutoSize.");
541Debug.Assert(mode == DockAnchorMode.Anchor || value == DefaultAnchor, "xGetAnchor needs to return DefaultAnchor when docked.");
559Debug.Assert(result == (GetAutoSize(element) && xGetDock(element) == DockStyle.None),
578Debug.Assert(mode == DockAnchorMode.Dock || value == DefaultDock,
589Debug.Assert(value != xGetAnchor(element), "PERF: Caller should guard against setting Anchor to original value.");
599Debug.Assert(GetLayoutState(element)[s_dockModeSection] == (int)DockAnchorMode.Anchor,
608Debug.Assert(value != xGetDock(element), "PERF: Caller should guard against setting Dock to original value.");
618Debug.Assert(xGetDock(element) == value, "Error detected setting Dock.");
619Debug.Assert((GetLayoutState(element)[s_dockModeSection] == (int)DockAnchorMode.Dock)
652Debug.Assert(value != GetFlowBreak(element), "PERF: Caller should guard against setting FlowBreak to original value.");
660Debug.Assert(GetFlowBreak(element) == value, "Error detected setting SetFlowBreak.");
System\Windows\Forms\Layout\DefaultLayout.cs (18)
83Debug.Assert(CommonProperties.GetAutoSizeMode(element) == AutoSizeMode.GrowAndShrink || (newSize.Height >= oldBounds.Height && newSize.Width >= oldBounds.Width),
100Debug.Assert(CommonProperties.GetAutoSizeMode(element) == AutoSizeMode.GrowAndShrink || newBounds.Contains(oldBounds), "How did we resize in such a way we no longer contain our old bounds?");
137Debug.Assert((growthDirection & GrowthDirection.Left) == GrowthDirection.None
140Debug.Assert((growthDirection & GrowthDirection.Upward) == GrowthDirection.None
368Debug.Assert(GetAnchorInfo(element) is not null, "AnchorInfo should be initialized before LayoutAnchorControls().");
375Debug.Assert(!HasCachedBounds(container), "Do not call this method with an active cached bounds list.");
390Debug.Assert(element.Bounds == GetCachedBounds(element), "Why do we have cachedBounds for a docked element?");
451Debug.Assert(mdiClient is null, "How did we end up with multiple MdiClients?");
527Debug.Assert(
548Debug.Assert((measureOnly && (newSize.Width >= remainingSize.Width)) || (newSize.Width == remainingSize.Width),
565Debug.Assert((measureOnly && (newSize.Height >= remainingSize.Height)) || (newSize.Height == remainingSize.Height),
585Debug.Assert(desiredSize.Width >= 0 && desiredSize.Height >= 0, "Error detected in xGetDockSize: Element size was negative.");
711Debug.Assert(!HasCachedBounds(element.Container), "Do not call this method with an active cached bounds list.");
934Debug.Assert(!HasCachedBounds(element.Container), "Do not call this method with an active cached bounds list.");
969Debug.Assert(GetDock(element) == value, "Error setting Dock value.");
1051Debug.Assert(element.Container == container, "We have non-children in our containers cached bounds store.");
1092Debug.Assert(specified == BoundsSpecified.None || GetCachedBounds(element) == element.Bounds,
1104Debug.Assert(!HasCachedBounds(container), "Do not call this method with an active cached bounds list.");
System\Windows\Forms\Layout\LayoutUtils.cs (22)
89Debug.Assert((topBits != 0 && (middleBits == 0 && bottomBits == 0))
99Debug.Assert(result is >= 0x00 and <= 0x0A, "ContentAlignmentToIndex result out of range.");
100Debug.Assert(result != 0x00 || alignment == ContentAlignment.TopLeft, "Error detected in ContentAlignmentToIndex.");
101Debug.Assert(result != 0x01 || alignment == ContentAlignment.TopCenter, "Error detected in ContentAlignmentToIndex.");
102Debug.Assert(result != 0x02 || alignment == ContentAlignment.TopRight, "Error detected in ContentAlignmentToIndex.");
103Debug.Assert(result != 0x03, "Error detected in ContentAlignmentToIndex.");
104Debug.Assert(result != 0x04 || alignment == ContentAlignment.MiddleLeft, "Error detected in ContentAlignmentToIndex.");
105Debug.Assert(result != 0x05 || alignment == ContentAlignment.MiddleCenter, "Error detected in ContentAlignmentToIndex.");
106Debug.Assert(result != 0x06 || alignment == ContentAlignment.MiddleRight, "Error detected in ContentAlignmentToIndex.");
107Debug.Assert(result != 0x07, "Error detected in ContentAlignmentToIndex.");
108Debug.Assert(result != 0x08 || alignment == ContentAlignment.BottomLeft, "Error detected in ContentAlignmentToIndex.");
109Debug.Assert(result != 0x09 || alignment == ContentAlignment.BottomCenter, "Error detected in ContentAlignmentToIndex.");
110Debug.Assert(result != 0x0A || alignment == ContentAlignment.BottomRight, "Error detected in ContentAlignmentToIndex.");
118Debug.Assert(threeBitFlag is >= 0x00 and <= 0x04 and not 0x03, "threeBitFlag out of range.");
120Debug.Assert((result & 0x03) == result, "Result out of range.");
478Debug.Assert(align != ContentAlignment.MiddleCenter, "Result is ambiguous with an alignment of MiddleCenter.");
533Debug.Assert(Rectangle.Union(region1, region2) == bounds,
543Debug.Assert(region1.Right == region2.Left, "Adjacency error.");
548Debug.Assert(region2.Right == region1.Left, "Adjacency error.");
553Debug.Assert(region1.Bottom == region2.Top, "Adjacency error.");
558Debug.Assert(region2.Bottom == region1.Top, "Adjacency error.");
567Debug.Assert(Rectangle.Union(region1, region2) == bounds, "region1 and region2 do not add up to bounds.");
System\Windows\Forms\Layout\TableLayout.cs (16)
320Debug.Assert(maxColumns > 0, "maxColumn must be positive");
450Debug.Assert(numRows <= maxRows, "number of rows allocated shouldn't exceed max number of rows");
451Debug.Assert(numColumns <= maxColumns, "number of columns allocated shouldn't exceed max number of columns");
512Debug.Assert(fixedLayoutInfo.IsAbsolutelyPositioned, "should only check for those elements which are absolutely positioned");
1036Debug.Assert((strip.MinSize == style.Size), "absolutely sized strip's size should be set before we call ApplyStyles");
1169Debug.Assert((dontHonorConstraint || (usedSpace == SumStrips(strips, 0, strips.Length))), "Error computing usedSpace.");
1201Debug.Assert(currentRow <= layoutInfo.RowStart, "RowStart should increase in forward Z-order.");
1214Debug.Assert(currentCol <= layoutInfo.ColumnStart, "ColumnStart should increase in forward Z-order.");
1364Debug.Assert(GetLayoutInfo(element) == value, "GetLayoutInfo should return the same value as we set it to");
1428Debug.Assert((containerInfo.Columns is null && cols is null) || containerInfo.Columns!.Length == cols.Length,
1430Debug.Assert((containerInfo.Rows is null && rows is null) || containerInfo.Rows!.Length == rows.Length,
1481Debug.Assert(!cellsOccupied1.IntersectsWith(cellsOccupied2), "controls overlap in the same cell");
1486Debug.Assert(containerInfo.ColumnStyles.Count >= layoutInfo1.ColumnStart + layoutInfo1.ColumnSpan, "length of column style too short");
1487Debug.Assert(containerInfo.ColumnStyles.Count >= layoutInfo1.ColumnStart + layoutInfo2.ColumnSpan, "length of column style too short");
1503Debug.Assert(containerInfo.RowStyles.Count >= layoutInfo1.RowStart + layoutInfo1.RowSpan, "length of row style too short");
1504Debug.Assert(containerInfo.RowStyles.Count >= layoutInfo2.RowStart + layoutInfo2.RowSpan, "length of row style too short");
System\Windows\Forms\SendKeys\SendKeys.SendKeysHookProc.cs (1)
53Debug.Assert(
System.Windows.Forms.Design (342)
System.Windows.Forms.Primitives (6)
System.Windows.Input.Manipulations (36)
System.Xaml (59)
System\Xaml\InfosetObjects\XamlNodes.cs (7)
51Debug.Assert(false, "XamlNode Ctor missing data argument");
66Debug.Assert(data is XamlType, "XamlNode ctor, StartObject data is not a XamlType");
70Debug.Assert(data is XamlMember, "XamlNode ctor, StartMember data is not a XamlMember");
74Debug.Assert(data is NamespaceDeclaration, "XamlNode ctor, NamespaceDeclaration data is not a NamespaceDeclaration");
84Debug.Assert(data is null, "XamlNode ctor, Internal XamlNode data must be null for this Node type");
88Debug.Assert(false, "XamlNode ctor, incorrect ctor called.");
99Debug.Assert(internalNodeType == InternalNodeType.EndOfAttributes ||
System\Xaml\Schema\TypeReflector.cs (11)
315Debug.Assert(_positionalParameterTypes is not null, "TryGetPositionalParameters should have been called first");
442Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
454Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
468Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
469Debug.Assert(_nonAttachableMemberCache is not null, "Members property should have been invoked before this");
481Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
482Debug.Assert(_nonAttachableMemberCache is not null, "Members property should have been invoked before this");
709Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
726Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
987Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
988Debug.Assert(_attachableMemberCache is not null, "AttachableMembers property should have been invoked before this");
System\Xaml\XamlType.cs (21)
202Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsDictionary");
221Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind");
242Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind");
262Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsCollection");
338Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsMarkupExtension");
524Debug.Assert(_reflector is not null, "_reflector should have been initialized by ItemType");
598Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind");
825Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
862Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
956Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
970Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1031Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1209Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1223Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1234Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1281Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1325Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1344Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1424Debug.Assert(UnderlyingTypeInternal.IsSet, "EnsureReflector should have caused UnderlyingType to be initialized");
1675Debug.Assert(GetType() != typeof(XamlType), "Default GetAllMembers logic should have already captured all writeable properties");
1813Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
UIAutomationClient (28)
UIAutomationClientSideProviders (51)
MS\Internal\AutomationProxies\WindowsEditBox.cs (13)
437Debug.Assert(point.x >= 0 && point.x < 65536, "WindowsEditBox.CharFromPos() x coordinate out of range.");
438Debug.Assert(point.y >= 0 && point.y < 65536, "WindowsEditBox.CharFromPos() y coordinate out of range.");
552Debug.Assert(hfont != IntPtr.Zero, "WindowsEditBox.GetLogfont got null HFONT");
557Debug.Assert(false, "WindowsEditBox.GetObject unexpected return value");
678Debug.Assert(index >= 0, "WindowsEditBox.LineFromChar negative index.");
679Debug.Assert(index <= GetTextLength(), "WindowsEditBox.LineFromChar index out of range.");
740Debug.Assert(index >= 0, "WindowsEditBox.PosFromChar negative index.");
741Debug.Assert(index < GetTextLength(), "WindowsEditBox.PosFromChar index out of range.");
744Debug.Assert(result!=-1, "WindowsEditBox.PosFromChar index out of bounds.");
799Debug.Assert(start >= 0, "WindowsEditBox.SetSel negative start.");
800Debug.Assert(start <= GetTextLength(), "WindowsEditBox.SetSel start out of range.");
801Debug.Assert(end >= 0, "WindowsEditBox.SetSel negative end.");
802Debug.Assert(end <= GetTextLength(), "WindowsEditBox.SetSel end out of range.");
UIAutomationTypes (3)
vbc (3)
VBCSCompiler (3)
WindowsFormsIntegration (6)