68306 references to Debug
aspire (49)
Aspire.Azure.AI.Extensions.OpenAI (1)
Aspire.Azure.AI.Projects (1)
Aspire.Azure.Data.Tables (1)
Aspire.Azure.Messaging.EventHubs (1)
Aspire.Azure.Messaging.ServiceBus (1)
Aspire.Azure.Messaging.WebPubSub (1)
Aspire.Azure.Npgsql (2)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL (2)
Aspire.Azure.Search.Documents (1)
Aspire.Azure.Security.KeyVault (1)
Aspire.Azure.Storage.Blobs (1)
Aspire.Azure.Storage.Files.DataLake (1)
Aspire.Azure.Storage.Queues (1)
Aspire.Confluent.Kafka (2)
Aspire.Dashboard (48)
Aspire.Hosting (46)
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Azure (4)
Aspire.Hosting.Azure.ApiManagement (3)
Aspire.Hosting.Azure.AppContainers (3)
Aspire.Hosting.Azure.CosmosDB (2)
Aspire.Hosting.Azure.PostgreSQL (1)
Aspire.Hosting.Azure.Redis (2)
Aspire.Hosting.Browsers (4)
Aspire.Hosting.Browsers.Tests (4)
Aspire.Hosting.Docker (3)
Aspire.Hosting.Integration.Analyzers (1)
Aspire.Hosting.Kubernetes (3)
Aspire.Hosting.Native.CodeGeneration (1)
Aspire.Hosting.RemoteHost (5)
Aspire.Microsoft.Azure.Cosmos (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (1)
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration (1)
Aspire.Playground.Tests (4)
Aspire.RabbitMQ.Client (5)
Aspire.StackExchange.Redis (1)
Aspire.TestUtilities (3)
CodeStyleConfigFileGenerator (5)
ConfigurationSchemaGenerator (31)
crossgen2 (9)
csc (16)
CSharpSyntaxGenerator (7)
dotnet-aot (28)
dotnet-dev-certs (3)
dotnet-format (4)
dotnet-sourcelink (1)
dotnet-svcutil-lib (1435)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\SqlUtils.cs (24)
143Debug.Assert(rguiData.Length == 4);
168Debug.Assert(rgulU.Length == s_cNumeMax);
175Debug.Assert(iulD != 0, "iulD != 0", "Divided by zero!");
176Debug.Assert(iulD > 0, "iulD > 0", "Invalid data: less than zero");
177Debug.Assert(ciulU > 0, "ciulU > 0", "No data in the array");
313Debug.Assert(dwlAccum < s_ulInt32Base, "dwlAccum < x_lInt32Base", "");
338Debug.Assert(dwlAccum < s_ulInt32Base);
357Debug.Assert(dwlAccum < s_ulInt32Base, "dwlAccum < x_dwlBaseUI4", "Integer overflow");
407Debug.Assert(dwlAccum < dwlDivisor);
409Debug.Assert((dwlAccum / dwlDivisor) < s_ulInt32Base);
433Debug.Assert(dwlAccum < s_ulInt32Base);
452Debug.Assert(bPrec <= s_maxPrecision && bPrec > 0, "bPrec <= MaxPrecision && bPrec > 0", "Invalid numeric precision");
458Debug.Assert(uiDigit < 10);
572Debug.Assert(m_bScale <= s_NUMERIC_MAX_PRECISION, "m_bScale <= NUMERIC_MAX_PRECISION", "In AssertValid");
573Debug.Assert(m_bScale <= m_bPrec, "m_bScale <= m_bPrec", "In AssertValid");
574Debug.Assert(m_bScale >= 0, "m_bScale >= 0", "In AssertValid");
575Debug.Assert(m_bPrec > 0, "m_bPrec > 0", "In AssertValid");
576Debug.Assert(CLenFromPrec(m_bPrec) >= m_bLen, "CLenFromPrec(m_bPrec) >= m_bLen", "In AssertValid");
577Debug.Assert(m_bLen <= s_cNumeMax, "m_bLen <= x_cNumeMax", "In AssertValid");
584Debug.Assert(m_bLen == 1, "m_bLen == 1", "In AssertValid");
589Debug.Assert(rglData[iulData] == 0, "rglData[iulData] == 0", "In AssertValid");
644Debug.Assert(val >= 0 && val < 100);
650Debug.Assert(val > -10000 && val < 10000);
662Debug.Assert(val >= 0 && val < 1000);
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathNode.cs (13)
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.");
363Debug.Assert(info != null && idxParent <= UInt16.MaxValue);
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);
402Debug.Assert(NodeType == XPathNodeType.Element);
413Debug.Assert(NodeType == XPathNodeType.Element);
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 (32)
30Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element);
74Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
79Debug.Assert(pageNode[idxNode].NodeType == XPathNodeType.Attribute);
93Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
113Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
123Debug.Assert(idx != 0);
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)");
183Debug.Assert(idxNode <= UInt16.MaxValue);
184Debug.Assert(pageNode[0].PageInfo.PageNumber <= Int16.MaxValue);
197Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
203Debug.Assert(idx != 0);
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)");
315Debug.Assert(typ != XPathNodeType.Attribute && typ != XPathNodeType.Namespace);
334Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
335Debug.Assert(pageNode[idxNode].NodeType != XPathNodeType.Attribute);
371Debug.Assert(idxAnc != 0 && pageAnc != null);
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 (200)
323Debug.Assert(nt != null);
343Debug.Assert(_index == 0);
387Debug.Assert(_nameTableFromSettings == false);
408Debug.Assert(_index == 0);
457Debug.Assert(false);
621Debug.Assert(baseUri == null);
714Debug.Assert(baseUri == null);
774Debug.Assert(baseUriStr == string.Empty, "BaseURI can come either from XmlParserContext or from the constructor argument, not from both");
822Debug.Assert(xmlFragment != null);
848default: Debug.Assert(false); goto case XmlNodeType.None;
1218Debug.Assert(false, "Invalid InitInputType");
1242Debug.Assert(_nextParsingFunction == ParsingFunction.DocumentContent);
1245Debug.Assert(!_ps.appendMode);
1273Debug.Assert(_parsingFunction == ParsingFunction.ElementContent ||
1278Debug.Assert(_curNode.type == XmlNodeType.Element);
1342Debug.Assert(false);
1370Debug.Assert(false);
1402Debug.Assert(_curNode.type == XmlNodeType.EndElement);
1403Debug.Assert(_parsingFunction != ParsingFunction.Eof);
1505Debug.Assert(_parsingMode == ParsingMode.Full);
1524Debug.Assert(false);
1550Debug.Assert(false);
1566Debug.Assert(value is XmlTextReader);
1585Debug.Assert(_outerReader is XmlTextReaderImpl);
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.");
2228Debug.Assert(_stringBuilder.Length == 0);
2268Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadChars cannot be called on reader created via XmlReader.Create.");
2269Debug.Assert(_outerReader is XmlTextReader);
2310Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadBase64 cannot be called on reader created via XmlReader.Create.");
2311Debug.Assert(_outerReader is XmlTextReader);
2347Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadBinHex cannot be called on reader created via XmlReader.Create.");
2348Debug.Assert(_outerReader is XmlTextReader);
2479Debug.Assert(value >= 0 && value <= _ps.charsUsed);
2566Debug.Assert(_parsingMode == ParsingMode.Full);
2655Debug.Assert(_parsingStatesStackTop == -1);
2656Debug.Assert((systemId != null && systemId.Length > 0) || (publicId != null && publicId.Length > 0));
2671Debug.Assert(_ps.appendMode);
2687Debug.Assert(_parsingStatesStackTop == -1);
2688Debug.Assert(internalDtd != null);
2845Debug.Assert(InAttributeValueIterator);
2881Debug.Assert(baseUriStr != null);
2887Debug.Assert(baseUri != null);
2898Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.textReader == null);
2899Debug.Assert(baseUriStr != null);
2900Debug.Assert(baseUri == null || (baseUri.ToString().Equals(baseUriStr)));
2991Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.stream == null);
2992Debug.Assert(baseUriStr != null);
3022Debug.Assert(_ps.stream == null && _ps.textReader == null);
3023Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0);
3024Debug.Assert(baseUriStr != null);
3025Debug.Assert(str != null);
3080Debug.Assert(_parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl);
3084Debug.Assert(_parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl);
3085Debug.Assert(_nextParsingFunction == ParsingFunction.DocumentContent);
3109Debug.Assert(context != null && context.HasDtdInfo);
3123Debug.Assert(false, "Unhandled DtdProcessing enumeration value.");
3133Debug.Assert(_url != null && _url.Length > 0);
3140Debug.Assert(_xmlResolver != null || !Microsoft.Xml.XmlReaderSettings.EnableLegacyXmlSettings());
3166Debug.Assert(_ps.bytes != null);
3167Debug.Assert(_ps.bytePos == 0);
3251Debug.Assert(_ps.charPos == 0);
3279Debug.Assert(_ps.stream != null);
3337Debug.Assert(newEncoding.EncodingName != "UTF-8");
3351Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null);
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,
3533Debug.Assert(_ps.charsUsed < _ps.chars.Length);
3543Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null);
3544Debug.Assert(maxCharsCount <= _ps.chars.Length - _ps.charsUsed - 1);
3568Debug.Assert(maxCharsCount >= charsCount);
3587Debug.Assert(false, "We should get an exception again.");
3660Debug.Assert(_stringBuilder.Length == 0 || isTextDecl);
3881Debug.Assert(!isTextDecl);
3891Debug.Assert(false);
4147Debug.Assert(pos == _ps.charsUsed && !_ps.isEof);
4171Debug.Assert(_index == 0);
4545Debug.Assert(_curNode.type == XmlNodeType.Element);
4724Debug.Assert(false, "We should never get to this point.");
4733Debug.Assert(_index > 0);
4738Debug.Assert(_curNode == startTagNode);
4765Debug.Assert(startTag.type == XmlNodeType.EntityReference);
4777Debug.Assert(_attrCount == 0);
4837Debug.Assert(_curNode.type == XmlNodeType.Element);
4845Debug.Assert(_curNode.type == XmlNodeType.Element);
4966Debug.Assert(attrNameLineNo == _ps.LineNo);
5015Debug.Assert(val == XmlComplianceUtil.CDataNormalize(val), "The attribute value is not CDATA normalized!");
5090Debug.Assert(_curNode.type == XmlNodeType.Element);
5227Debug.Assert(_stringBuilder.Length == 0);
5438Debug.Assert(false, "We should never get to this point.");
5441Debug.Assert(_ps.isEof);
5459Debug.Assert(false);
5499Debug.Assert(attr.nextAttrValueChunk == null);
5528Debug.Assert(_stringBuilder.Length == 0);
5542Debug.Assert(endPos - startPos > 0);
5565Debug.Assert(_stringBuilder.Length > 0);
5586Debug.Assert(endPos - startPos > 0);
5853Debug.Assert(_ps.isEof);
5895Debug.Assert(_stringBuilder.Length == 0);
5896Debug.Assert(_parsingFunction == ParsingFunction.PartialTextValue ||
5910Debug.Assert(_stringBuilder.Length > 0);
5964Debug.Assert(_parsingFunction == ParsingFunction.PartialTextValue || _parsingFunction == ParsingFunction.InReadValueChunk ||
5976Debug.Assert(_parsingFunction == ParsingFunction.InReadValueChunk);
5981Debug.Assert((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
5993Debug.Assert(_parsingFunction == ParsingFunction.InReadContentAsBinary || _parsingFunction == ParsingFunction.InReadElementContentAsBinary);
5998Debug.Assert((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
6026Debug.Assert(_stringBuilder.Length == 0);
6067Debug.Assert(_ps.chars[_ps.charPos] == '&');
6076Debug.Assert(_ps.chars[_ps.charPos] == '&');
6091Debug.Assert(entityType == EntityType.CharacterDec || entityType == EntityType.CharacterHex);
6243Debug.Assert(false);
6284Debug.Assert(_lastEntity != null);
6290Debug.Assert(_curNode.depth == _index);
6303Debug.Assert(_curNode.type == XmlNodeType.EntityReference);
6304Debug.Assert(Ref.Equal(_lastEntity.Name, _curNode.localName));
6323Debug.Assert(_stringBuilder.Length == 0);
6349Debug.Assert(_ps.charPos < _ps.charsUsed);
6393Debug.Assert(_stringBuilder.Length == 0);
6451Debug.Assert(!_ps.eolNormalized);
6598Debug.Assert(_stringBuilder.Length == 0);
6659Debug.Assert(!_ps.eolNormalized);
6838Debug.Assert(_dtdProcessing == DtdProcessing.Ignore);
7166Debug.Assert(false, "We should never get to this point.");
7169Debug.Assert(_ps.isEof);
7272Debug.Assert(false, "We should never get to this point.");
7275Debug.Assert(_ps.isEof);
7284Debug.Assert(_ps.chars[startPos] == '&');
7316Debug.Assert(_ps.chars[_ps.charPos] == '&');
7336Debug.Assert(_ps.chars[startPos] == '&' && _ps.chars[startPos + 1] == '#');
7449Debug.Assert(pos > 0);
7485Debug.Assert(_ps.chars[_ps.charPos] == '&');
7505Debug.Assert(startPos < _ps.charsUsed);
7506Debug.Assert(_ps.chars[startPos] == '&');
7507Debug.Assert(_ps.chars[startPos + 1] != '#');
7615Debug.Assert(pos > 0);
7771Debug.Assert(nodeIndex < _nodes.Length);
7772Debug.Assert(_nodes[_nodes.Length - 1] == null);
7785Debug.Assert(nodeIndex < _nodes.Length);
7792Debug.Assert(nodeIndex < _nodes.Length);
7865Debug.Assert(attr.type == XmlNodeType.Attribute);
7899Debug.Assert(_ps.isEof);
7960Debug.Assert(_xmlContext.defaultNamespace == uri);
7996Debug.Assert(_curNode.xmlContextPushed);
8093Debug.Assert(_xmlResolver != null);
8110Debug.Assert(_xmlResolver.SupportsType(uri, typeof(Stream)), "Stream must always be a supported type in XmlResolver");
8131Debug.Assert(entity.IsExternal);
8144Debug.Assert(_ps.appendMode);
8173Debug.Assert(!entity.IsExternal);
8243Debug.Assert(_parsingStatesStackTop == -1);
8259Debug.Assert(_parsingStatesStackTop >= 0);
8360Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.charPos - 2, 2, "?>"));
8368Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.charPos - 3, 3, "-->"));
8376Debug.Assert(XmlConvert.StrEqual(_ps.chars, _ps.charPos - 3, 3, "]]>"));
8400Debug.Assert(false);
8403Debug.Assert(_incReadState == IncrementalReadState.Text ||
8515Debug.Assert(_ps.charPos - pos == 0);
8516Debug.Assert(_ps.charPos - startPos == 0);
8555Debug.Assert(_ps.charPos - pos == 0);
8556Debug.Assert(_ps.charPos - startPos == 0);
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!");
8676Debug.Assert(_fragmentType == XmlNodeType.Attribute);
8693Debug.Assert(_parsingFunction == ParsingFunction.InReadAttributeValue);
8720Debug.Assert(_stringBuilder.Length == 0);
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.");
8931Debug.Assert(_ps.charPos < _ps.charsUsed);
9000Debug.Assert(_dtdInfo == null && _fragmentParserContext != null && _fragmentParserContext.HasDtdInfo);
9016Debug.Assert(_parsingFunction != ParsingFunction.InReadContentAsBinary);
9042Debug.Assert(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
9043Debug.Assert(_curNode.type == XmlNodeType.Element);
9121Debug.Assert(context != null);
9142Debug.Assert(nt != null);
9143Debug.Assert(context.NameTable == null || context.NameTable == nt, "This check should have been done in XmlParserContext constructor.");
9159Debug.Assert(_nameTableFromSettings == false);
9187Debug.Assert(_dtdInfo == null);
9246Debug.Assert(_curNode.type == XmlNodeType.Whitespace && newNodeType == XmlNodeType.SignificantWhitespace, "Incorrect node type change!");
9348Debug.Assert(attr != null);
9373Debug.Assert(prefix != null);
9394Debug.Assert(attr != null);
9426Debug.Assert(_nodes[_index].type == XmlNodeType.Element);
9444Debug.Assert(_nodes[_index].type == XmlNodeType.Element);
9478Debug.Assert(_incReadDecoder != null);
9587Debug.Assert(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
9646Debug.Assert(characters >= 0);
9688Debug.Assert(startPos >= 0);
9689Debug.Assert(endPos < chars.Length);
9690Debug.Assert(startPos <= endPos);
9700Debug.Assert(startPos >= 0);
9701Debug.Assert(endPos < str.Length);
9702Debug.Assert(startPos <= endPos);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (8)
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");
3678Debug.Assert(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union);
dotnet-watch (11)
DotNetWatchTasks (1)
GenerateDocumentationAndConfigFiles (524)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
263Debug.Assert(
GetDocument.Insider (1)
ilc (11)
ILCompiler.Compiler (1437)
Compiler\DependencyAnalysis\GenericLookupResult.cs (49)
30Debug.Assert(owningTypeDefinition.Instantiation.Length == TypeInstantiation.Length);
31Debug.Assert(MethodInstantiation.IsNull || MethodInstantiation.Length == 0);
36Debug.Assert(_canonicalOwner is MethodDesc);
38Debug.Assert(owningMethodDefinition.Instantiation.Length == MethodInstantiation.Length);
44Debug.Assert(owningType.Instantiation.Length == TypeInstantiation.Length);
49Debug.Assert(owningMethodDefinition.OwningType.Instantiation.IsNull
120Debug.Assert(InstantiationIsConcrete(dictionary.TypeInstantiation));
121Debug.Assert(InstantiationIsConcrete(dictionary.MethodInstantiation));
167Debug.Assert(x.GetType() == y.GetType());
172Debug.Assert(result != 0);
178Debug.Assert(x.GetType() != y.GetType());
196Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete type in a generic dictionary?");
208Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
255Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete type in a generic dictionary?");
266Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
313Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete type in a generic dictionary?");
324Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
371Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete type in a generic dictionary?");
387Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
434Debug.Assert(method.IsRuntimeDeterminedExactMethod, "Concrete method in a generic dictionary?");
447Debug.Assert(instantiatedMethod.IsCanonicalMethod(CanonicalFormKind.Any));
499Debug.Assert(field.OwningType.IsRuntimeDeterminedSubtype, "Concrete field in a generic dictionary?");
510Debug.Assert(!instantiatedField.OwningType.IsCanonicalSubtype(CanonicalFormKind.Any));
555Debug.Assert(method.IsRuntimeDeterminedExactMethod, "Concrete method in a generic dictionary?");
569Debug.Assert(instantiatedMethod.IsCanonicalMethod(CanonicalFormKind.Any));
620Debug.Assert(method.IsRuntimeDeterminedExactMethod);
638Debug.Assert(instantiatedMethod.IsCanonicalMethod(CanonicalFormKind.Any));
703Debug.Assert(method.IsRuntimeDeterminedExactMethod);
704Debug.Assert(method.IsVirtual);
705Debug.Assert(method.HasInstantiation || method.OwningType.IsInterface);
733Debug.Assert(instantiatedMethod.IsCanonicalMethod(CanonicalFormKind.Any));
783Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete static base in a generic dictionary?");
784Debug.Assert(type is MetadataType);
795Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
840Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete static base in a generic dictionary?");
841Debug.Assert(type is MetadataType);
852Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
896Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete static base in a generic dictionary?");
897Debug.Assert(type is MetadataType);
908Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
953Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete type in a generic dictionary?");
964Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
1005Debug.Assert(type.IsRuntimeDeterminedSubtype, "Concrete type in a generic dictionary?");
1016Debug.Assert(!instantiatedType.IsCanonicalSubtype(CanonicalFormKind.Any));
1064Debug.Assert(_constraintType.IsRuntimeDeterminedSubtype || _constrainedMethod.IsRuntimeDeterminedExactMethod, "Concrete type in a generic dictionary?");
1065Debug.Assert(!_constrainedMethod.HasInstantiation || !_directCall, "Direct call to constrained generic method isn't supported");
1094Debug.Assert(!instantiatedConstrainedMethod.IsCanonicalMethod(CanonicalFormKind.Any));
1095Debug.Assert(!instantiatedConstraintType.IsCanonicalSubtype(CanonicalFormKind.Any));
1134Debug.Assert(instantiatedConstraintType.IsValueType || (instantiatedConstrainedMethod.OwningType.IsInterface && instantiatedConstrainedMethod.Signature.IsStatic));
Compiler\DependencyAnalysis\NativeLayoutVertexNode.cs (46)
39Debug.Assert(Marked);
85Debug.Assert(SavedVertex == null || ReferenceEquals(SavedVertex, value));
157Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
165Debug.Assert(_instantiationArgsSig == null || (_instantiationArgsSig != null && _method.Instantiation.Length == _instantiationArgsSig.Length));
275Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
286Debug.Assert(_signature.Length == _parametersSig.Length);
328Debug.Assert(type.IsDefType);
352Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
377Debug.Fail("UNREACHABLE");
396Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
412Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
423Debug.Fail("UNREACHABLE");
435Debug.Assert(type.HasInstantiation && !type.IsGenericDefinition);
452Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
467Debug.Assert(!type.IsRuntimeDeterminedSubtype);
468Debug.Assert(!type.HasInstantiation || type.IsGenericDefinition);
482Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
509Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
622Debug.Assert(method.HasInstantiation);
644Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
652Debug.Assert(NeedsEntrypoint(_method));
686Debug.Assert(nodeFactory.LazyGenericsPolicy.UsesLazyGenerics(owningMethod));
687Debug.Assert(owningMethod.IsCanonicalMethod(CanonicalFormKind.Any));
688Debug.Assert(owningMethod.HasInstantiation);
693Debug.Assert(nodeFactory.LazyGenericsPolicy.UsesLazyGenerics(owningType));
694Debug.Assert(owningType.IsCanonicalSubtype(CanonicalFormKind.Any));
704Debug.Assert(owningMethod.HasInstantiation);
737Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
742Debug.Assert(associatedLayout.Marked);
781Debug.Assert(method.HasInstantiation);
782Debug.Assert(!method.IsGenericMethodDefinition);
783Debug.Assert(method.IsCanonicalMethod(CanonicalFormKind.Any));
784Debug.Assert(method.GetCanonMethodTarget(CanonicalFormKind.Specific) == method, "Assert that the canonical method passed in is in standard canonical form");
816Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
853Debug.Assert(type.IsCanonicalSubtype(CanonicalFormKind.Any));
854Debug.Assert(type.ConvertToCanonForm(CanonicalFormKind.Specific) == type, "Assert that the canonical type passed in is in standard canonical form");
864Debug.Assert(GenericTypesTemplateMap.IsArrayTypeEligibleForTemplate(type));
866Debug.Assert(defType.Instantiation.Length == 1);
969Debug.Assert(Marked, "WriteVertex should only happen for marked vertices");
1245Debug.Assert(method.HasInstantiation);
1285Debug.Assert(method.HasInstantiation);
1322Debug.Assert(field.OwningType.IsRuntimeDeterminedSubtype);
1408Debug.Assert(_constrainedMethod.OwningType.IsInterface);
1409Debug.Assert(!_constrainedMethod.HasInstantiation || !directCall);
1474Debug.Assert(SignatureKind is FixupSignatureKind.GenericConstrainedMethod);
1480Debug.Assert(SignatureKind is FixupSignatureKind.NonGenericStaticConstrainedMethod or FixupSignatureKind.NonGenericInstanceConstrainedMethod);
ILCompiler.DependencyAnalysisFramework (14)
ILCompiler.MetadataTransform (158)
ILCompiler.ReadyToRun (959)
parent\parent\Common\Compiler\ObjectWriter\WebCilObjectWriter.cs (30)
59Debug.Assert(added,
81Debug.Assert(section != null || alignment == 1, $"Section: {sectionIndex} is not a WebcilSection but alignment {alignment} requested");
164Debug.Assert(BitOperations.IsPow2(webcilSection.Alignment));
198Debug.Assert(peCliHeaderRva != 0);
204Debug.Assert(peDebugRva != 0);
211Debug.Assert(webcilSections.Length > 0);
212Debug.Assert(webcilSections[webcilSections.Length - 1].SectionName.ToString() == "reloc");
272Debug.Assert(tableSlot == expectedTableSlot,
287Debug.Assert(MethodCount == totalMethodCount);
302Debug.Assert(writer.SectionIndex == _sections.Count - 1, "The .reloc section must be the last section we emit.");
469Debug.Assert(outputFileStream.CanSeek, $"EmitObjectFile requires seekable output stream");
633Debug.Assert(_sections[sectionIndex] is WebcilSection);
648Debug.Assert(_sections[pending.SectionIndex] is WebcilSection);
650Debug.Assert(pending.Offset >= 0, "Pending base relocation has a negative offset.");
656Debug.Assert(targetRva != 0); // this section should have been assigned a non-zero VirtualAddress at this point.
692Debug.Assert(sectionStream.Position + (long)decoded <= sectionStream.Length);
735Debug.Assert(writeCursor <= blobs[b].Start, $"Write cursor {writeCursor} is beyond the start of blob {blobs[b].Start}");
753Debug.Assert(sectionStream.Position == firstReloc.Offset, $"Section stream position sectionStream.Position does not match first reloc offset {firstReloc.Offset}");
772Debug.Assert(nextStart == sectionStream.Position);
779Debug.Assert(tempStream.Position <= blob.Size && blob.Size <= tempStream.Length, $"Temp stream position {tempStream.Position} exceeds blob size {blob.Size}");
859Debug.Assert(IsWithinSection(virtualRelocOffset, curSectionAsWebcil));
870Debug.Assert(IsWithinSection(virtualSymbolImageOffset, symbolWebcilSection));
943Debug.Assert(symbolWebcilSection != null);
947Debug.Assert(symbolWebcilSection != null);
952Debug.Assert(symbolWebcilSection != null);
956Debug.Assert(symbolWebcilSection != null);
1013Debug.Assert(symbol.IndexSpace == WasmIndexSpace.Tag);
1051Debug.Assert(sectionStream.CanSeek);
1052Debug.Assert(sectionStream.Length >= 0);
1142Debug.Assert(_definedGlobals.ContainsKey("webcilVersion"));
parent\parent\Common\Internal\Runtime\RiscVLoongArch64FpStruct.cs (30)
61Debug.Assert(index < 2);
63Debug.Assert(size == sizeof(float) || size == sizeof(double));
65Debug.Assert(size >= 1 && size <= 8);
66Debug.Assert((size & (size - 1)) == 0, "size needs to be a power of 2");
72Debug.Assert((int)PosIntFloat == (int)PosFloatInt + 1, "FloatInt and IntFloat need to be adjacent");
73Debug.Assert((int)PosSizeShift2nd == (int)PosSizeShift1st + 2, "SizeShift1st and 2nd need to be adjacent");
87Debug.Assert(nElements == 1, "HasImpliedRepeatedFields must have returned a false, it can't be an array");
91Debug.Assert(nFlattenedFieldsPerElement == 1 || nFlattenedFieldsPerElement == 2);
101Debug.Assert(elementTypeIndex == 0);
102Debug.Assert(typeIndex == 1);
105Debug.Assert((int)FpStruct.IntFloat == ((int)FpStruct.FloatInt << 1),
107Debug.Assert((int)FpStruct.SizeShift2ndMask == ((int)FpStruct.SizeShift1stMask << 2),
115Debug.Assert(info.Size1st() == info.Size2nd());
176Debug.Assert(nFields == 1);
182Debug.Assert(nElements > 0, "InlineArray length must be > 0");
196Debug.Assert(arch is TargetArchitecture.RiscV64 or TargetArchitecture.LoongArch64);
209Debug.Assert(nFields == 1 || nFields == 2);
221Debug.Assert((info.flags & (OnlyOne | BothFloat)) == 0);
222Debug.Assert((info.flags & FloatInt) == 0 || info.Size1st() == sizeof(float) || info.Size1st() == sizeof(double));
223Debug.Assert((info.flags & IntFloat) == 0 || info.Size2nd() == sizeof(float) || info.Size2nd() == sizeof(double));
227Debug.Assert(nFields == 2);
232Debug.Assert((info.flags & FloatInt) != 0);
233Debug.Assert((info.flags & (IntFloat | SizeShift2ndMask)) == 0);
234Debug.Assert(info.offset2nd == 0);
237Debug.Assert(nFields == ((info.flags & OnlyOne) != 0 ? 1 : 2));
239Debug.Assert(floatFlags != 0);
240Debug.Assert(((uint)floatFlags & ((uint)floatFlags - 1)) == 0,
246Debug.Assert(end1st <= info.offset2nd || end2nd <= info.offset1st, "fields must not overlap");
248Debug.Assert(info.offset1st + info.Size1st() <= td.GetElementSize().AsInt);
249Debug.Assert(info.offset2nd + info.Size2nd() <= td.GetElementSize().AsInt);
ILCompiler.RyuJit (218)
parent\parent\Common\Internal\Runtime\RiscVLoongArch64FpStruct.cs (30)
61Debug.Assert(index < 2);
63Debug.Assert(size == sizeof(float) || size == sizeof(double));
65Debug.Assert(size >= 1 && size <= 8);
66Debug.Assert((size & (size - 1)) == 0, "size needs to be a power of 2");
72Debug.Assert((int)PosIntFloat == (int)PosFloatInt + 1, "FloatInt and IntFloat need to be adjacent");
73Debug.Assert((int)PosSizeShift2nd == (int)PosSizeShift1st + 2, "SizeShift1st and 2nd need to be adjacent");
87Debug.Assert(nElements == 1, "HasImpliedRepeatedFields must have returned a false, it can't be an array");
91Debug.Assert(nFlattenedFieldsPerElement == 1 || nFlattenedFieldsPerElement == 2);
101Debug.Assert(elementTypeIndex == 0);
102Debug.Assert(typeIndex == 1);
105Debug.Assert((int)FpStruct.IntFloat == ((int)FpStruct.FloatInt << 1),
107Debug.Assert((int)FpStruct.SizeShift2ndMask == ((int)FpStruct.SizeShift1stMask << 2),
115Debug.Assert(info.Size1st() == info.Size2nd());
176Debug.Assert(nFields == 1);
182Debug.Assert(nElements > 0, "InlineArray length must be > 0");
196Debug.Assert(arch is TargetArchitecture.RiscV64 or TargetArchitecture.LoongArch64);
209Debug.Assert(nFields == 1 || nFields == 2);
221Debug.Assert((info.flags & (OnlyOne | BothFloat)) == 0);
222Debug.Assert((info.flags & FloatInt) == 0 || info.Size1st() == sizeof(float) || info.Size1st() == sizeof(double));
223Debug.Assert((info.flags & IntFloat) == 0 || info.Size2nd() == sizeof(float) || info.Size2nd() == sizeof(double));
227Debug.Assert(nFields == 2);
232Debug.Assert((info.flags & FloatInt) != 0);
233Debug.Assert((info.flags & (IntFloat | SizeShift2ndMask)) == 0);
234Debug.Assert(info.offset2nd == 0);
237Debug.Assert(nFields == ((info.flags & OnlyOne) != 0 ? 1 : 2));
239Debug.Assert(floatFlags != 0);
240Debug.Assert(((uint)floatFlags & ((uint)floatFlags - 1)) == 0,
246Debug.Assert(end1st <= info.offset2nd || end2nd <= info.offset1st, "fields must not overlap");
248Debug.Assert(info.offset1st + info.Size1st() <= td.GetElementSize().AsInt);
249Debug.Assert(info.offset2nd + info.Size2nd() <= td.GetElementSize().AsInt);
ILCompiler.TypeSystem (311)
illink (210)
ILLink.RoslynAnalyzer (123)
Infrastructure.Tests (3)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore (6)
Microsoft.AspNetCore.Analyzers (3)
Microsoft.AspNetCore.Antiforgery (25)
Microsoft.AspNetCore.App.Analyzers (104)
Microsoft.AspNetCore.App.CodeFixes (2)
Microsoft.AspNetCore.Authentication (10)
Microsoft.AspNetCore.Authentication.Cookies (2)
Microsoft.AspNetCore.Authentication.Negotiate (5)
Microsoft.AspNetCore.Components (59)
Microsoft.AspNetCore.Components.Endpoints (40)
Microsoft.AspNetCore.Components.Media (1)
Microsoft.AspNetCore.Components.QuickGrid (2)
Microsoft.AspNetCore.Components.Server (30)
Microsoft.AspNetCore.Components.Web (9)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.CookiePolicy (1)
Microsoft.AspNetCore.Cryptography.Internal (6)
Microsoft.AspNetCore.Cryptography.KeyDerivation (17)
Microsoft.AspNetCore.DataProtection (70)
Microsoft.AspNetCore.DataProtection.Abstractions (12)
Microsoft.AspNetCore.DataProtection.Extensions (9)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (15)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (3)
Microsoft.AspNetCore.Diagnostics (10)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (8)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (3)
Microsoft.AspNetCore.Grpc.JsonTranscoding (5)
Microsoft.AspNetCore.Hosting (19)
Microsoft.AspNetCore.Html.Abstractions (2)
Microsoft.AspNetCore.Http (12)
Microsoft.AspNetCore.Http.Abstractions (27)
Microsoft.AspNetCore.Http.Connections (7)
Microsoft.AspNetCore.Http.Connections.Client (10)
Microsoft.AspNetCore.Http.Connections.Common (3)
Microsoft.AspNetCore.Http.Extensions (34)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
Microsoft.AspNetCore.Http.Results (7)
Microsoft.AspNetCore.HttpLogging (21)
Microsoft.AspNetCore.Identity (114)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\GeneratedRouteBuilderExtensions.g.cs (108)
72Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
73Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
85Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
86Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
87Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
88Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
191Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
192Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
205Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
206Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
207Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
208Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
377Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
378Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
388Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
389Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
390Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
391Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
492Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
493Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
506Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
507Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
508Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
509Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
678Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
679Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
690Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
691Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
692Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
693Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
794Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
795Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
807Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
808Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
809Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
810Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
940Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
941Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
953Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
954Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
955Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
956Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1059Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1060Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1071Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1072Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1073Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
1074Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1175Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1176Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1187Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1188Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1189Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
1190Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1291Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1292Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1302Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1303Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1304Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
1305Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1393Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1394Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1406Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1407Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1408Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
1409Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1512Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1513Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1523Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1524Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1525Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
1526Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1614Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1615Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1628Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1629Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1630Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
1631Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1753Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1754Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1765Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1766Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1767Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
1768Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1875Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1876Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1888Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1889Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
1890Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
1891Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
1994Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
1995Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
2005Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
2006Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
2007Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
2008Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
2096Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
2097Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
2110Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
2111Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
2112Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
2113Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
2219Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
2220Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
2229Debug.Assert(options != null, "RequestDelegateFactoryOptions not found.");
2230Debug.Assert(options.EndpointBuilder != null, "EndpointBuilder not found.");
2231Debug.Assert(options.EndpointBuilder.ApplicationServices != null, "ApplicationServices not found.");
2232Debug.Assert(options.EndpointBuilder.FilterFactories != null, "FilterFactories not found.");
Microsoft.AspNetCore.Mvc.Abstractions (11)
Microsoft.AspNetCore.Mvc.Analyzers (3)
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
Microsoft.AspNetCore.Mvc.Core (245)
Microsoft.AspNetCore.Mvc.Formatters.Xml (3)
Microsoft.AspNetCore.Mvc.Localization (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
Microsoft.AspNetCore.Mvc.Razor (7)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (17)
Microsoft.AspNetCore.Mvc.RazorPages (80)
Microsoft.AspNetCore.Mvc.TagHelpers (9)
Microsoft.AspNetCore.Mvc.Testing (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (47)
Microsoft.AspNetCore.OpenApi (23)
Microsoft.AspNetCore.OpenApi.SourceGenerators (2)
Microsoft.AspNetCore.OutputCaching (20)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (7)
Microsoft.AspNetCore.Razor (1)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (85)
Microsoft.AspNetCore.ResponseCompression (2)
Microsoft.AspNetCore.Rewrite (9)
Microsoft.AspNetCore.Routing (91)
Microsoft.AspNetCore.Routing.Abstractions (19)
Microsoft.AspNetCore.Server.HttpSys (54)
Microsoft.AspNetCore.Server.IIS (47)
Microsoft.AspNetCore.Server.IISIntegration (3)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.Server.Kestrel.Core (376)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (10)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (21)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (8)
Microsoft.AspNetCore.SignalR.Client.Core (8)
Microsoft.AspNetCore.SignalR.Common (5)
Microsoft.AspNetCore.SignalR.Core (26)
Microsoft.AspNetCore.SignalR.Protocols.Json (4)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (3)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (5)
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (16)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.StaticAssets (10)
Microsoft.AspNetCore.StaticFiles (2)
Microsoft.AspNetCore.TestHost (3)
Microsoft.AspNetCore.WebSockets (11)
Microsoft.AspNetCore.WebUtilities (22)
Microsoft.Build (220)
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (10)
235Debug.Assert(String.Equals(name, value.Key, StringComparison.Ordinal));
263Debug.Assert(_buckets != null, "m_buckets was null but m_lastIndex > 0");
284Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal));
398Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal));
604Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal));
703Debug.Assert(_count >= 0, "m_count is negative");
714Debug.Assert(_buckets != null, "m_buckets was null but m_count > 0");
740Debug.Assert(newSlots.Length <= _slots.Length, "capacity increased after TrimExcess");
760Debug.Assert(_buckets == null, "Initialize was called but m_buckets was non-null");
776Debug.Assert(_buckets != null, "IncreaseCapacity called on a set with no elements");
src\5057ed6cf5d6323b\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
Microsoft.Build.Framework (41)
Collections\RefArrayBuilder.cs (13)
77Debug.Assert(value >= 0, "Count must be non-negative.");
78Debug.Assert(value <= _scope.Length, "Count must not exceed the span length.");
93Debug.Assert(index < _count, "Index must be less than Count.");
138Debug.Assert(_count == _scope.Length, "AddWithResize should only be called when the span is full.");
195Debug.Assert(index >= 0, "Insert index must be non-negative.");
196Debug.Assert(index <= _count, "Insert index must not exceed Count.");
220Debug.Assert(_count == _scope.Length, "InsertWithResize should only be called when the span is full.");
237Debug.Assert(index >= 0, "Insert index must be non-negative.");
238Debug.Assert(index <= _count, "Insert index must not exceed Count.");
279Debug.Assert(startIndex >= -1, "Start index must be -1 or non-negative.");
280Debug.Assert(startIndex <= _count, "Start index must not exceed Count.");
336Debug.Assert(index >= 0, "Remove index must be non-negative.");
337Debug.Assert(index < _count, "Remove index must be less than Count.");
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\ExceptionUtilities.cs (1)
24Debug.Assert(false, output);
Microsoft.Build.Tasks.CodeAnalysis (37)
Microsoft.Build.Tasks.Core (78)
BootstrapperUtil\BootstrapperBuilder.cs (21)
554Debug.Fail(ex.Message);
579Debug.Fail("Already found resources for culture " + stringNode.InnerText);
803Debug.Assert(filePath != null, "null filePath?");
804Debug.Assert(schemaPath != null, "null schemaPath?");
805Debug.Assert(schemaNamespace != null, "null schemaNamespace?");
819Debug.Fail("Could not locate schema '" + schemaPath + "', so no validation of '" + filePath + "' is possible.");
828Debug.Fail("Could not locate data file '" + filePath + "'.");
850Debug.Assert(_document != null, "our document should have been created by now!");
856Debug.Fail("Failed to load document '" + filePath + "' due to the following exception:\r\n" + ex.Message);
861Debug.Fail("Failed to load document '" + filePath + "' due to the following exception:\r\n" + ex.Message);
869Debug.Assert(xmlDocument.DocumentElement != null &&
946Debug.Assert(langDoc != null, "we couldn't load package.xml in '" + strLangManifestFilename + "'...?");
953Debug.Assert(langNode != null, $"Unable to find a package node in {strLangManifestFilename}");
1045Debug.WriteLine($"Validation results already added for Product Code '{productCodeAttribute}'");
1054Debug.Fail(ex.Message);
1058Debug.Fail(ex.Message);
1062Debug.Fail(ex.Message);
1260Debug.Assert(false, "Specified key does not exist for node " + nextNode.InnerXml);
1566Debug.Assert(sourceAttribute != null, "we should not be here if there is no ProductCode attribute");
1901Debug.Fail(ex.Message);
1995Debug.Assert(s != null, $"EmbeddedResource '{name}' not found");
Microsoft.Build.Tasks.Git (20)
Microsoft.Build.Utilities.Core (5)
Microsoft.CodeAnalysis (2249)
DiagnosticAnalyzer\AnalyzerDriver.cs (60)
78Debug.Assert(_lazyAnalyzerExecutor != null);
88Debug.Assert(_lazyCurrentCompilationData != null);
106Debug.Assert(_lazyUnsuppressedAnalyzers != null);
123Debug.Assert(_lazyPerSymbolAnalyzerActionsCache != null);
142Debug.Assert(_lazyCompilationEndAnalyzers != null);
164Debug.Assert(_lazyAnalyzerGateMap != null);
178Debug.Assert(!_lazyGeneratedCodeAnalysisFlagsMap.IsDefault);
198Debug.Assert(_lazyNonConfigurableAndCustomConfigurableAnalyzers != null);
212Debug.Assert(_lazySymbolStartAnalyzers != null);
226Debug.Assert(_lazyTreatAllCodeAsNonGeneratedCode.HasValue);
245Debug.Assert(_lazyGeneratedCodeFilesMap != null);
259Debug.Assert(_lazyGeneratedCodeSymbolsForTreeMap != null);
273Debug.Assert(_lazySuppressedAnalyzersForTreeMap != null);
289Debug.Assert(_lazySuppressedDiagnosticIdsForUnsuppressedAnalyzers != null);
303Debug.Assert(_lazyIsGeneratedCodeSymbolMap != null);
348Debug.Assert(_lazyCompilationEventQueue != null);
362Debug.Assert(_lazyDiagnosticQueue != null);
376Debug.Assert(!severityFilter.Contains(ReportDiagnostic.Suppress));
377Debug.Assert(!severityFilter.Contains(ReportDiagnostic.Default));
404Debug.Assert(_lazyInitializeTask == null);
473Debug.Assert(_lazyInitializeTask == null);
474Debug.Assert(compilation.SemanticModelProvider != null);
706Debug.Assert(analysisScope != null);
728Debug.Assert(faultedTask.IsFaulted);
993Debug.Assert(severity != ReportDiagnostic.Default);
1017Debug.Assert(compilation.ContainsSyntaxTree(tree));
1024Debug.Assert(!reportedDiagnostics.IsEmptyWithoutResolution);
1048Debug.Assert(HasDiagnosticSuppressors);
1049Debug.Assert(!reportedDiagnostics.IsEmpty);
1050Debug.Assert(_programmaticSuppressions != null);
1051Debug.Assert(_diagnosticsProcessedForProgrammaticSuppressions != null);
1081Debug.Assert(suppressableDiagnostics.Contains(diagnostic));
1082Debug.Assert(!diagnostic.IsSuppressed);
1084Debug.Assert(suppressedDiagnostic.IsSuppressed);
1262Debug.Assert(location.SourceTree != null);
1282Debug.Assert(declaredSymbols != null);
1299Debug.Assert(GeneratedCodeSymbolsForTreeMap != null);
1300Debug.Assert(_lazyGeneratedCodeAttribute != null);
1322Debug.Assert(existingGeneratedCodeSymbols.SetEquals(generatedCodeSymbols));
1443Debug.Assert(_lazyInitializeTask != null);
1455Debug.Assert(_lazyPrimaryTask != null);
1618Debug.Assert(CompilationEventQueue.IsCompleted, "TryDequeueAsync should provide a value unless the AsyncQueue<T> is completed.");
1794Debug.Assert(!subsetProcessedAnalyzers.IsDefault);
1832Debug.Assert(AnalyzerActions.SymbolStartActionsCount > 0);
1883Debug.Assert(completedAnalyzers.Count < analysisScope.Analyzers.Length);
1964Debug.Assert(compilationEvent is CompilationStartedEvent || compilationEvent is CompilationCompletedEvent);
2171Debug.Assert(AnalyzerActions.SymbolStartActionsCount > 0);
2172Debug.Assert(SymbolStartAnalyzers.Contains(analyzer));
2262Debug.Assert(!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken));
2287Debug.Assert(!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken));
2352Debug.Assert(_lazyDoNotAnalyzeGeneratedCode.HasValue);
2621Debug.Assert(shouldExecuteSyntaxNodeActions || shouldExecuteOperationActions || shouldExecuteCodeBlockActions || shouldExecuteOperationBlockActions);
2622Debug.Assert(!isInGeneratedCode || !DoNotAnalyzeGeneratedCode);
3032Debug.Assert(!operationBlock.Parent.IsImplicit);
3039Debug.Assert(operationBlock.Kind is OperationKind.Invocation or OperationKind.Invalid);
3040Debug.Assert(operationBlock.Parent.IsImplicit);
3041Debug.Assert(operationBlock.Parent.Parent is IConstructorBodyOperation ctorBody &&
3043Debug.Assert(!operationBlock.Parent.Parent.IsImplicit);
3050Debug.Fail($"Expected operation with kind '{operationBlock.Kind}' to be the root operation with null 'Parent', but instead it has a non-null Parent with kind '{operationBlock.Parent.Kind}'");
3061Debug.Assert(operationsToAnalyze.ToImmutableHashSet().Count == operationsToAnalyze.Count);
DiagnosticAnalyzer\AnalyzerExecutor.cs (40)
136Debug.Assert((addNonCategorizedDiagnostic != null) ^ (addCategorizedLocalDiagnostic != null));
137Debug.Assert((addCategorizedLocalDiagnostic != null) == (addCategorizedNonLocalDiagnostic != null));
233Debug.Assert(_analyzerExecutionTimeMap != null);
339Debug.Assert(startAction.Analyzer == symbolScope.Analyzer);
362Debug.Assert(_addSuppression != null);
403Debug.Assert(compilationEvent is CompilationStartedEvent || compilationEvent is CompilationCompletedEvent);
450Debug.Assert(getTopMostNodeForAnalysis != null);
451Debug.Assert(!filterSpan.HasValue || filterTree != null);
573Debug.Assert(getTopMostNodeForAnalysis != null);
574Debug.Assert(!isGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(analyzer));
575Debug.Assert(!IsAnalyzerSuppressedForSymbol(analyzer, symbolDeclaredEvent.Symbol, cancellationToken));
576Debug.Assert(!filterSpan.HasValue || filterTree != null);
687Debug.Assert(file.SourceTree != null);
743Debug.Assert(file.AdditionalFile != null);
787Debug.Assert(!executionData.IsGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(syntaxNodeAction.Analyzer));
788Debug.Assert(!IsAnalyzerSuppressedForTree(syntaxNodeAction.Analyzer, node.SyntaxTree, cancellationToken));
811Debug.Assert(!executionData.IsGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(operationAction.Analyzer));
812Debug.Assert(!IsAnalyzerSuppressedForTree(operationAction.Analyzer, executionData.SemanticModel.SyntaxTree, cancellationToken));
861Debug.Assert(!executableCodeBlocks.IsEmpty);
975Debug.Assert(!operationBlocks.IsEmpty);
1056Debug.Assert(declaredNode != null);
1057Debug.Assert(executionData.DeclaredSymbol != null);
1058Debug.Assert(CanHaveExecutableCodeBlock(executionData.DeclaredSymbol));
1059Debug.Assert(startActions.Any() || endActions.Any() || actions.Any());
1181Debug.Assert(nodeActionsByKind.Any());
1182Debug.Assert(!executionData.IsGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(executionData.Analyzer));
1183Debug.Assert(!IsAnalyzerSuppressedForTree(executionData.Analyzer, executionData.SemanticModel.SyntaxTree, cancellationToken));
1284Debug.Assert(operationActionsByKind != null);
1285Debug.Assert(operationActionsByKind.Any());
1286Debug.Assert(!executionData.IsGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(executionData.Analyzer));
1287Debug.Assert(!IsAnalyzerSuppressedForTree(executionData.Analyzer, executionData.SemanticModel.SyntaxTree, cancellationToken));
1327Debug.Assert(((IFieldSymbol)symbol).AssociatedSymbol == null);
1386Debug.Assert(false);
1538Debug.Assert(IsAnalyzerExceptionDiagnostic(exceptionDiagnostic));
1576Debug.Assert(_addNonCategorizedDiagnostic != null);
1581Debug.Assert(_addNonCategorizedDiagnostic == null);
1582Debug.Assert(_addCategorizedNonLocalDiagnostic != null);
1618Debug.Assert(_addNonCategorizedDiagnostic != null);
1690Debug.Assert(_analyzerExecutionTimeMap != null);
1701Debug.Assert(operation.Parent == null);
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
Microsoft.CodeAnalysis.Analyzers (569)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
263Debug.Assert(
Microsoft.CodeAnalysis.AnalyzerUtilities (960)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAbstractValue.cs (1)
154Debug.Assert(index >= 0);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityMapAbstractDomain.cs (16)
99Debug.Assert(!map2.ContainsKey(key1));
100Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
164Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
165Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
185Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
186Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
194Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
206Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
213Debug.Assert(!map1.ContainsKey(newKey));
214Debug.Assert(!map2.ContainsKey(newKey));
226Debug.Assert(Compare(map1, resultMap) <= 0);
227Debug.Assert(Compare(map2, resultMap) <= 0);
247Debug.Assert(values.Count > 0);
259Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
260Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
267Debug.Assert(isNewKey == (!map1.ContainsKey(key) && !map2.ContainsKey(key)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
263Debug.Assert(
Microsoft.CodeAnalysis.BuildClient.Package (16)
Microsoft.CodeAnalysis.CodeStyle (546)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
263Debug.Assert(
Microsoft.CodeAnalysis.CodeStyle.Fixes (33)
Microsoft.CodeAnalysis.CSharp (8404)
Binder\Binder_Conversions.cs (141)
69Debug.Assert(result is BoundConversion || (conversion.IsIdentity && ((object)result == source) || source.NeedsToBeConverted()) || hasErrors);
234Debug.Assert(destination.SpecialType != SpecialType.System_String);
258Debug.Assert(!conversion.Exists);
277Debug.Assert(conversion.IsCollectionExpression
300Debug.Assert(source.Type is null);
301Debug.Assert(!conversion.Exists);
311Debug.Assert(inConversionGroupFlags == InConversionGroupFlags.Unspecified);
344Debug.Assert(source == (object)methodGroup || !conversion.IsValid);
363Debug.Assert(!conversion.IsMethodGroup);
379Debug.Assert(conversion.UnderlyingConversions.Length == 1);
442Debug.Assert(elementConversions.Length == sourceTypes.Length);
465Debug.Assert(conversion.UnderlyingConversions.IsDefault);
474Debug.Assert(syntax.SyntaxTree is object);
482Debug.Assert(conversion.ConstrainedToTypeOpt is TypeParameterSymbol);
523Debug.Assert(source.Type is { });
526Debug.Assert(elementField is { });
545Debug.Assert(destination.OriginalDefinition.Equals(Compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.AllIgnoreOptions));
562Debug.Assert(source.Type is not null);
563Debug.Assert(destination.IsSpan() || destination.IsReadOnlySpan());
584Debug.Assert(destination.IsReadOnlySpan());
596Debug.Assert(destination.IsReadOnlySpan());
653Debug.Assert(type.IsSpan() || type.IsReadOnlySpan());
654Debug.Assert(type.IsDefinition);
663Debug.Assert(spanType.IsSpan() && readonlySpanType.IsReadOnlySpan());
664Debug.Assert(spanType.IsDefinition && readonlySpanType.IsDefinition);
686Debug.Assert(source.IsSpan() || source.IsReadOnlySpan());
687Debug.Assert(destination.IsReadOnlySpan());
688Debug.Assert(!source.IsDefinition && !destination.IsDefinition);
695Debug.Assert(!source.IsReadOnlySpan() || !sameElementTypes);
703Debug.Assert(source.IsReadOnlySpan() && destination.IsReadOnlySpan());
704Debug.Assert(source.IsDefinition && destination.IsDefinition);
731Debug.Assert(readOnlySpanType.IsReadOnlySpan());
732Debug.Assert(!readOnlySpanType.IsDefinition);
733Debug.Assert(((NamedTypeSymbol)readOnlySpanType).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].SpecialType is SpecialType.System_Char);
786Debug.Assert(destination.Equals(Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) ||
826Debug.Assert(expr is BoundObjectCreationExpressionBase { WasTargetTyped: true } or
831Debug.Assert(expr is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node.Syntax, node));
942Debug.Assert(_conversion.Kind is ConversionKind.NoConversion);
950Debug.Assert(elementType is { });
961Debug.Assert(result.WasCompilerGenerated == _node.IsParamsArrayOrCollection);
962Debug.Assert(result.IsParamsArrayOrCollection == _node.IsParamsArrayOrCollection);
972Debug.Assert(elementType is { });
1038Debug.Assert(_node.WithElement is null);
1039Debug.Assert(inProgressConstructor is not null);
1047Debug.Assert(collectionCreation is BoundObjectCreationExpressionBase or BoundBadExpression);
1159Debug.Assert(elements.Length == elementConversions.Length);
1160Debug.Assert(elementConversions.All(c => c.Exists));
1191Debug.Assert(enumeratorInfo is { });
1192Debug.Assert(enumeratorInfo.ElementType is { }); // ElementType is set always, even for IEnumerable.
1268Debug.Assert(@this._targetType.IsArrayInterface(out _));
1280Debug.Assert(isMutableArray);
1370Debug.Assert(projection.Arity == 0);
1371Debug.Assert(projection.ParameterCount == 0 || !projection.Parameters.Last().IsParams);
1387Debug.Assert(collectionBuilderMethods.All(t => t.Name == methodName));
1420Debug.Assert(!projectionCall.Expanded);
1503Debug.Assert(result);
1507Debug.Assert(result);
1637Debug.Assert(parameterType.OriginalDefinition.Equals(Compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions));
1649Debug.Assert(!collectionBuilderMethod.IsExtensionBlockMember());
1690Debug.Assert(!hasWithElement);
1835Debug.Assert(!targetType.IsDynamic());
1914Debug.Assert(boundExpression.HasErrors);
1954Debug.Assert(methodGroup.ReceiverOpt is not null);
1955Debug.Assert(methodGroup.ReceiverOpt.Type is not null);
1971Debug.Assert(false); // Should not get here given the 'acceptOnlyMethods' argument value used in 'ResolveMethodGroup' call above
1995Debug.Assert(resolution.AnalyzedArguments.HasDynamicArgument);
2011Debug.Assert(finalApplicableCandidates.Length != 1 || finalApplicableCandidates[0].IsApplicable);
2032Debug.Assert(!IsDisallowedExtensionInOlderLangVer(addMethods[0]));
2038Debug.Assert(!resolution.OverloadResolutionResult.Succeeded);
2061Debug.Assert(methodGroup.ReceiverOpt is not null);
2091Debug.Assert(receiverType is not null);
2152Debug.Assert(constructed is not null);
2185Debug.Assert(node != null);
2186Debug.Assert(methodGroup != null);
2187Debug.Assert(methodGroup.Error == null);
2188Debug.Assert(methodGroup.Methods.Count > 0);
2249Debug.Assert(call.HasErrors);
2250Debug.Assert(call.Method.Name == "Add");
2253Debug.Assert(false); // Add test if we hit this assert.
2266Debug.Assert(!collectionInitializer.DefaultArguments[argIndex]);
2281Debug.Assert(false);
2364Debug.Assert(elementTypeWithAnnotations.Type is null); // GetCollectionExpressionTypeKind() does not set elementType for these cases.
2376Debug.Assert(elementTypeWithAnnotations.HasType);
2386Debug.Assert(elementType is { });
2434Debug.Assert(reportedErrors);
2456Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
2495Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
2528Debug.Assert(conversionGroup != null);
2529Debug.Assert(conversionGroup.Conversion == conversion);
2530Debug.Assert(conversion.IsUserDefined);
2579Debug.Assert(conversion.BestUserDefinedConversionAnalysis is object); // All valid user-defined conversions have this populated
2601Debug.Assert(toParameterTypeConversion.IsNullable);
2602Debug.Assert(toParameterTypeConversion.IsExplicit);
2603Debug.Assert(toParameterTypeConversion.UnderlyingConversions[0].IsIdentity);
2647Debug.Assert(toConversion.Exists);
2651Debug.Assert(false, "Please add test coverage for this code path. Consider covering SemanticModel, Nullable Analysis and IOperation behavior too.");
2654Debug.Assert(fromReturnTypeConversion.IsNullable);
2655Debug.Assert(fromReturnTypeConversion.IsImplicit);
2656Debug.Assert(!fromReturnTypeConversion.UnderlyingConversions[0].IsIdentity);
2718Debug.Assert(conversionGroup != null);
2719Debug.Assert(conversionGroup.Conversion == conversion);
2720Debug.Assert(conversion.IsUnion);
2743Debug.Assert(conversion.BestUnionConversionAnalysis is object); // All valid union conversions have this populated
2747Debug.Assert(analysis.Kind == UserDefinedConversionAnalysisKind.ApplicableInNormalForm);
2748Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.IsInterface: true }));
2749Debug.Assert(TypeSymbol.Equals(analysis.FromType, analysis.Operator.GetParameterType(0), TypeCompareKind.AllIgnoreOptions));
2750Debug.Assert(TypeSymbol.Equals(destination.StrippedType(), analysis.Operator.MethodKind == MethodKind.Constructor ? analysis.Operator.ContainingType : analysis.Operator.ReturnType, TypeCompareKind.AllIgnoreOptions));
2751Debug.Assert(TypeSymbol.Equals(destination.StrippedType(), analysis.ToType, TypeCompareKind.AllIgnoreOptions));
2752Debug.Assert(analysis.TargetConversion is { IsIdentity: true } or { IsNullable: true, IsImplicit: true });
2753Debug.Assert(source.Type?.IsDynamic() != true);
2842Debug.Assert(conversion.Kind == ConversionKind.FunctionType);
2843Debug.Assert(source.Kind is BoundKind.MethodGroup or BoundKind.UnboundLambda);
2844Debug.Assert(syntax.IsFeatureEnabled(MessageID.IDS_FeatureInferredDelegateType));
2848Debug.Assert(delegateType is { });
2864Debug.Assert((inConversionGroupFlags & InConversionGroupFlags.FunctionTypeDelegate) == 0);
2894Debug.Assert((inConversionGroupFlags & InConversionGroupFlags.FunctionTypeDelegateToTarget) == 0);
2948Debug.Assert(conversion.UnderlyingConversions.IsDefault);
3005Debug.Assert(delegateType is not null);
3009Debug.Assert(lambdaSymbol.ParameterCount == delegateParameters.Length);
3095Debug.Assert(conversion.IsStackAlloc);
3128Debug.Assert(conversion.IsTupleLiteralConversion ||
3133Debug.Assert(conversion.IsNullable == destination.IsNullableType());
3145Debug.Assert(conversionWithoutNullable.IsTupleLiteralConversion);
3183Debug.Assert(targetElementTypes.Length == arguments.Length, "converting a tuple literal to incompatible type?");
3205Debug.Assert((inConversionGroupFlags & InConversionGroupFlags.TupleLiteral) == 0);
3223Debug.Assert((inConversionGroupFlags & InConversionGroupFlags.TupleLiteralExplicitIdentity) == 0);
3365Debug.Assert(memberSymbol is not MethodSymbol { MethodKind: not MethodKind.Constructor } ||
3376Debug.Assert(!invokedAsExtensionMethod);
3380Debug.Assert(!invokedAsExtensionMethod || (receiverOpt != null));
3519Debug.Assert(delegateType is NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { HasUseSiteError: false } }
3530Debug.Assert(!isExtensionMethod || (receiverOpt != null));
3537Debug.Assert(methodParameters.Length == numParams + (isExtensionMethod ? 1 : 0));
3543Debug.Assert(!(isExtensionMethod || (method.IsExtensionBlockMember() && !method.IsStatic)) ||
3626Debug.Fail("This method should have been eliminated in overload resolution!");
3686Debug.Assert(method.IsExtensionBlockMember());
3710Debug.Assert(Conversions.IsAssignableFromMulticastDelegate(delegateOrFuncPtrType, ref discardedUseSiteInfo) || delegateOrFuncPtrType.TypeKind == TypeKind.Delegate || delegateOrFuncPtrType.TypeKind == TypeKind.FunctionPointer);
3711Debug.Assert(conversion.Method is object);
3756Debug.Assert(!selectedMethod.HasUseSiteError, "Shouldn't have reached this point if there were use site errors.");
3793Debug.Assert(conversion.IsValid); // i.e. if it exists, then it is valid.
3908Debug.Assert(!sourceValue.IsBad);
3915Debug.Assert(underlyingType.SpecialType != SpecialType.None);
Binder\Binder_Expressions.cs (301)
220Debug.Assert(expr != null);
221Debug.Assert(resultKind != LookupResultKind.Viable);
343Debug.Assert(op.NoCommonTypeError != 0);
448Debug.Assert(expr.Kind is BoundKind.UnboundLambda or BoundKind.MethodGroup);
478Debug.Assert((object)this.ContainingMemberOrLambda == field);
486Debug.Assert(initializerBinder != null);
536Debug.Assert(this.InParameterDefaultValue);
537Debug.Assert(this.ContainingMemberOrLambda.Kind == SymbolKind.Method
543Debug.Assert(defaultValueBinder != null);
561Debug.Assert(initializerBinder != null);
629Debug.Assert(node != null);
877Debug.Assert(false, "Unexpected SyntaxKind " + node.Kind());
1185Debug.Assert(elementNames.Count == inferredElementNames.Count);
1482Debug.Assert(ContainingType is { });
1506Debug.Assert((this.Flags & BinderFlags.InContextualAttributeBinder) != 0);
1533Debug.Assert(!result || lookupResult.Symbols.Count > 0);
1566Debug.Assert(symbol is null or LocalSymbol or LocalFunctionSymbol or RangeVariableSymbol or TypeParameterSymbol);
1649Debug.Assert(node != null);
1687Debug.Assert(node.Arity == typeArgumentList.Count);
1708Debug.Assert(members.Count > 0);
1711Debug.Assert(!IsTypeOrValueExpression(receiver));
1740Debug.Assert(isError); // Should have been reported by GetSymbolOrMethodOrPropertyGroup.
1885Debug.Assert(!primaryConstructor.GetCapturedParameters().ContainsKey(shadowedParameter)); // How could we capture a shadowed parameter?
1912Debug.Assert((options & LookupOptions.NamespacesOrTypesOnly) == 0);
1941Debug.Assert(node.Identifier.IsUnderscoreToken());
2006Debug.Assert(members.Count > 0);
2049Debug.Assert(!symbol.ContainingSymbol.Equals(containingMethod));
2116Debug.Assert(primaryCtor is null ||
2135Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType());
2158Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType());
2518Debug.Assert(node.ContainsDiagnostics);
2535Debug.Assert(result.IsSingleViable, "If this happens, we need to deal with multiple label definitions.");
2579Debug.Assert(node != null);
2607Debug.Assert(location is not null);
2617Debug.Assert(this.ContainingMemberOrLambda is not null);
2681Debug.Assert(node.OperatorToken.IsKind(SyntaxKind.CaretToken));
2880Debug.Assert(conversion.IsUserDefined || conversion.IsUnion);
2889Debug.Assert(originalUserDefinedConversions.Length == 0,
2965Debug.Assert((object)operand.Type != null);
3006Debug.Assert(targetTypeWithAnnotations.HasType && targetTypeWithAnnotations.IsNullableType());
3007Debug.Assert((object)operand.Type != null && !operand.Type.IsNullableType());
3256Debug.Assert(isVar != declType.HasType);
3272Debug.Assert(declarationExpression.IsOutVarDeclaration());
3296Debug.Assert(localSymbol.DeclarationKind == LocalDeclarationKind.OutVariable);
3414Debug.Assert(argumentSyntax is ArgumentSyntax || argumentSyntax is AttributeArgumentSyntax);
3526Debug.Assert(result.ConversionForArg(arg).IsIdentity);
3527Debug.Assert(!argument.NeedsToBeConverted());
3528Debug.Assert(!expanded || result.ParameterFromArgument(arg) != parameters.Length - 1);
3537Debug.Assert(paramsArgsBuilder is null);
3554Debug.Assert(analyzedArguments.RefKinds.Count == 0 || analyzedArguments.RefKinds.Count == arguments.Count);
3555Debug.Assert(analyzedArguments.Names.Count == 0 || analyzedArguments.Names.Count == arguments.Count);
3556Debug.Assert(argsToParamsOpt.IsDefault || argsToParamsOpt.Length == arguments.Count);
3577Debug.Assert(argument is BoundUnconvertedInterpolatedString or BoundBinaryOperator { IsUnconvertedInterpolatedStringAddition: true });
3598Debug.Assert(parameterTypeWithAnnotations.HasType);
3603Debug.Assert(kind.IsIdentity);
3631Debug.Assert(arguments[arg].Kind is not
3660Debug.Assert(methodResult.Result.ParamsElementTypeOpt.HasType);
3661Debug.Assert(methodResult.Result.ParamsElementTypeOpt.Type != (object)ErrorTypeSymbol.EmptyParamsCollectionElementTypeSentinel);
3683Debug.Assert(collectionArgs.Length != 0);
3688Debug.Assert(firstParamsArgument != -1);
3689Debug.Assert(collectionArgs.Length == 1 || firstParamsArgument + collectionArgs.Length == arguments.Count);
3702Debug.Assert(argsToParamsBuilder is not null || argsToParamsOpt.IsDefault);
3753Debug.Assert(unconvertedString is BoundUnconvertedInterpolatedString or BoundBinaryOperator { IsUnconvertedInterpolatedStringAddition: true });
3755Debug.Assert(interpolatedStringConversion.IsInterpolatedStringHandler);
3756Debug.Assert(handlerType is NamedTypeSymbol { IsInterpolatedStringHandlerType: true });
3763Debug.Assert(handlerParameterIndexes.IsEmpty);
3777Debug.Assert(arguments is not null);
3810Debug.Assert(handlerParameterIndexes.All((index, paramLength) => index >= BoundInterpolatedStringArgumentPlaceholder.ExtensionReceiver && index < paramLength,
3829Debug.Assert(handlerArgumentIndexesBuilder[handlerParameterIndex] is BoundInterpolatedStringArgumentPlaceholder.UnspecifiedParameter);
3862Debug.Assert(argumentIndex != interpolatedStringArgNum);
3869Debug.Assert(receiver!.Type is not null);
3874Debug.Assert(methodResult.Member.IsExtensionBlockMember());
3876Debug.Assert(receiverParameter is not null);
3930Debug.Assert(receiver != null);
3995Debug.Assert(!available);
4008Debug.Assert(argNumber > 0);
4020Debug.Assert(argNumber >= 0); // can be 0 for receiver of extension method
4029Debug.Assert(argNumber > 0);
4289Debug.Assert(rank > 0);
4290Debug.Assert(dimension > 0 && dimension <= rank);
4291Debug.Assert(exprBuilder != null);
4362Debug.Assert(!boundInitExpr.IsDefault);
4372Debug.Assert(boundInitExprIndex >= 0 && boundInitExprIndex < boundInitExpr.Length);
4397Debug.Assert(boundInitExprIndex >= 0 && boundInitExprIndex < boundInitExpr.Length);
4400Debug.Assert(init.HasAnyErrors);
4401Debug.Assert(init.Type.IsErrorType());
4510Debug.Assert(creationSyntax == null ||
4513Debug.Assert(initSyntax != null);
4514Debug.Assert((object)type != null);
4515Debug.Assert(boundInitExprOpt.IsDefault || creationSyntax.Kind() == SyntaxKind.ImplicitArrayCreationExpression);
4667Debug.Assert(node is StackAllocArrayCreationExpressionSyntax || node is ImplicitStackAllocArrayCreationExpressionSyntax);
4692Debug.Assert(node is StackAllocArrayCreationExpressionSyntax or ImplicitStackAllocArrayCreationExpressionSyntax);
4730Debug.Assert(node != null);
4769Debug.Assert(node.IsKind(SyntaxKind.ImplicitStackAllocArrayCreationExpression) || node.IsKind(SyntaxKind.StackAllocArrayCreationExpression));
4815Debug.Assert(expression != null);
4833Debug.Assert(expression != null);
4859Debug.Assert(type == SpecialType.System_UInt32 || type == SpecialType.System_UInt64);
4894Debug.Assert(argumentListBinder.IsSemanticModelBinder);
4926Debug.Assert((object)constructor != null);
4927Debug.Assert(constructor.MethodKind == MethodKind.Constructor ||
4929Debug.Assert(diagnostics != null);
4943Debug.Assert(constructorReturnType.IsVoidType()); //true of all constructors
4962Debug.Assert((object)initializerType != null ||
4998Debug.Assert(initializerArgumentListOpt.Parent.Kind() == SyntaxKind.ThisConstructorInitializer);
5104Debug.Assert(initializerType.IsErrorType() ||
5165Debug.Assert(!resultMember.IsExtensionBlockMember());
5294Debug.Assert(result is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node, node));
5422Debug.Assert(expression.Type is { });
5429Debug.Assert(conversion.IsValid);
5437Debug.Assert(length > 0);
5584Debug.Assert(!type.IsGenericOrNonGenericExpressionType(out _));
5671Debug.Assert(!conv.IsExtensionMethod);
5672Debug.Assert(conv.IsValid); // i.e. if it exists, then it is valid.
5739Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct);
5783Debug.Assert(typeSyntax is not null);
5802Debug.Assert(syntax != null);
5803Debug.Assert((object)type != null);
5833Debug.Assert(syntax != null);
5834Debug.Assert((object)type != null);
5840Debug.Assert(syntax.Parent.Parent.Kind() != SyntaxKind.WithInitializerExpression);
5841Debug.Assert(rhsValueKind == BindValueKind.RValue);
5860Debug.Assert(initializerSyntax.Kind() == SyntaxKind.ObjectInitializerExpression ||
5862Debug.Assert((object)initializerType != null);
5906Debug.Assert((object)boundLeft.Type != null);
6235Debug.Assert(!boundMember.NeedsToBeConverted());
6257Debug.Assert(boundMember.HasAnyErrors);
6271Debug.Assert(memberNameMap != null);
6281Debug.Assert(memberInitializerSyntax.Kind() == SyntaxKind.SimpleAssignmentExpression);
6415Debug.Assert(initializerSyntax.Kind() == SyntaxKind.CollectionInitializerExpression);
6416Debug.Assert(initializerSyntax.Expressions.Any());
6417Debug.Assert((object)initializerType != null);
6569Debug.Assert(node.Kind() == SyntaxKind.ComplexElementInitializerExpression);
6600Debug.Assert(!boundElementInitializerExpressions.IsEmpty);
6633Debug.Assert(collectionInitializerAddMethodBinder != null);
6634Debug.Assert(collectionInitializerAddMethodBinder.Flags.Includes(BinderFlags.CollectionInitializerAddMethod));
6635Debug.Assert(implicitReceiver != null);
6636Debug.Assert((object)implicitReceiver.Type != null);
6702Debug.Assert(addMethodInvocation.Kind == BoundKind.BadExpression);
6748Debug.Assert(enumeratorInfo.ElementType is { }); // ElementType is set always, even for IEnumerable.
6795Debug.Assert((object)constructor != null);
6796Debug.Assert(constructor.MethodKind == MethodKind.Constructor || constructor.MethodKind == MethodKind.StaticConstructor);
6823Debug.Assert((object)this.Compilation.Assembly != null);
6879Debug.Assert(finalApplicableCandidates[0].IsApplicable);
6967Debug.Assert(!method.IsExtensionBlockMember());
7102Debug.Assert((object)type != null);
7128Debug.Assert((object)interfaceType != null);
7129Debug.Assert(interfaceType.IsInterfaceType());
7130Debug.Assert((object)coClassType != null);
7131Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2));
7132Debug.Assert(coClassType.TypeKind == TypeKind.Class || coClassType.TypeKind == TypeKind.Error);
7571Debug.Assert(!value.GetType().GetTypeInfo().IsEnum);
7576Debug.Assert(
7597Debug.Assert(node.Kind() == SyntaxKind.Utf8StringLiteralExpression);
7598Debug.Assert(node.Token.Kind() is SyntaxKind.Utf8StringLiteralToken or SyntaxKind.Utf8SingleLineRawStringLiteralToken or SyntaxKind.Utf8MultiLineRawStringLiteralToken);
7642Debug.Assert(node != null);
7643Debug.Assert(invoked == SyntaxFacts.IsInvoked(node));
7655Debug.Assert(node.Kind() == SyntaxKind.PointerMemberAccessExpression);
7709Debug.Assert((left.Parent is MemberAccessExpressionSyntax { RawKind: (int)SyntaxKind.SimpleMemberAccessExpression } memberAccess && memberAccess.Expression == left) ||
7721Debug.Assert(left.Arity == 0);
7780Debug.Assert(!leftType.IsDynamic());
7781Debug.Assert(IsPotentialColorColorReceiver(left, leftType));
7787Debug.Assert(!IsPotentialColorColorReceiver(left, leftType));
7790Debug.Assert(leftType.Equals(boundValue.Type, TypeCompareKind.ConsiderEverything));
7791Debug.Assert(leftSymbol == (boundValue.ExpressionSymbol ?? ((BoundConversion)boundValue).Operand.ExpressionSymbol));
7913Debug.Assert(node != null);
7914Debug.Assert(boundLeft != null);
7948Debug.Assert((object)leftType == null);
8090Debug.Assert(sym.Kind == SymbolKind.NamedType);
8106Debug.Assert(symbols.Count > 0);
8107Debug.Assert(symbols[0].Kind == SymbolKind.NamedType);
8116Debug.Assert(lookupResult.IsClear, "If there's a legitimate reason for having candidates without a reason, then we should produce something intelligent in such cases.");
8117Debug.Assert(lookupResult.Error == null);
8142Debug.Assert(boundLeft is BoundTypeExpression);
8143Debug.Assert((object)leftType != null);
8218Debug.Assert(!resolution.IsNonMethodExtensionMember(out _));
8226Debug.Assert(!resolution.IsEmpty);
8271Debug.Assert(typeArgumentsOpt.IsDefault);
8294Debug.Assert(propertySymbol.ContainingType.ExtensionParameter is not null);
8326Debug.Assert(rightArity == (typeArgumentsWithAnnotations.IsDefault ? 0 : typeArgumentsWithAnnotations.Length));
8606Debug.Assert(receiver != null);
8607Debug.Assert(extensionMethodArguments.Arguments.Count == 0);
8608Debug.Assert(extensionMethodArguments.Names.Count == 0);
8609Debug.Assert(extensionMethodArguments.RefKinds.Count == 0);
8651Debug.Assert(node != null);
8652Debug.Assert(left != null);
8653Debug.Assert(lookupResult.IsMultiViable);
8654Debug.Assert(lookupResult.Symbols.Any());
8664Debug.Assert(members.Count > 0);
8690Debug.Assert(symbol.Kind != SymbolKind.Method);
8773Debug.Assert(left.Type is not null);
8774Debug.Assert(!left.Type.IsDynamic());
8775Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
8868Debug.Assert(left.Type is not null);
8889Debug.Assert(arity == 0 || lookupResult.Symbols.All(s => s.Kind != SymbolKind.Property));
8902Debug.Assert(actualReceiverArguments is not null);
8937Debug.Assert(actualReceiverArguments is not null);
8946Debug.Assert(propertyResult?.HasAnyApplicableMember == true);
8957Debug.Assert(actualReceiverArguments is not null);
9004Debug.Assert(propertyResult is not null);
9029Debug.Assert(lookupResult.Kind == LookupResultKind.Viable);
9060Debug.Assert(receiverType is not null);
9185Debug.Assert(left is not null);
9193Debug.Assert(left.Type is not null);
9194Debug.Assert(!left.Type.IsDynamic());
9195Debug.Assert(!left.Type.IsArray());
9196Debug.Assert(left.Type.SpecialType != SpecialType.System_String);
9246Debug.Assert(receiver.Type is not null);
9247Debug.Assert(lookupResult.IsClear);
9282Debug.Assert(left is not null);
9290Debug.Assert(left.Type is not null);
9291Debug.Assert(!left.Type.IsDynamic());
9292Debug.Assert(!left.Type.IsArray());
9293Debug.Assert(left.Type.SpecialType != SpecialType.System_String);
9330Debug.Assert(receiver.Type is not null);
9350Debug.Assert(actualExtensionIntIndexerOrSliceArguments is null);
9368Debug.Assert(!argumentPlaceholders.IsDefault);
9406Debug.Assert(lengthOrCountProperty.ContainingType.ExtensionParameter is not null);
9426Debug.Assert(receiver.Type is not null);
9547Debug.Assert(receiver.Type is not null);
9556Debug.Assert(argKind is IndexOrRangeArgKind.Range);
9575Debug.Assert(receiver.Type is not null);
9669Debug.Assert(receiver.Type is not null);
9730Debug.Assert(!candidate.IsStatic);
9783Debug.Assert(resolutionResult.Result.ConversionForArg(0).Exists);
9966Debug.Assert((object)underlyingType != null);
9991Debug.Assert(propertySymbol.GetRequiresUnsafeMode(ConsList<FieldSymbol>.Empty) == RequiresUnsafeMode.None ||
10013Debug.Assert(symbol is not TypeSymbol);
10079Debug.Assert(eventSymbol.GetRequiresUnsafeMode(ConsList<FieldSymbol>.Empty) == RequiresUnsafeMode.None ||
10175Debug.Assert(!methodOrPropertyGroup.Any());
10180Debug.Assert(result.Kind != LookupResultKind.Empty);
10181Debug.Assert(!result.Symbols.Any(s => s.IsIndexer()));
10227Debug.Assert(methodOrPropertyGroup.Any() || ((object)other != null));
10257Debug.Assert(members.Count > 0);
10262Debug.Assert(members.All(m => m.Kind == member.Kind));
10270Debug.Assert(members.All(m => !m.IsIndexer()));
10299Debug.Assert(receiver.Type?.IsFunctionPointer() != true, "There should have been an error reported for indexing into a function pointer.");
10316Debug.Assert(propertyGroup.ReceiverOpt is not null);
10366Debug.Assert(expr.Type.TryGetInlineArrayElementField() is not null);
10382Debug.Assert(tryInlineArrayAccess);
10383Debug.Assert(diagnosticsForBindElementAccessCore.DiagnosticBag is { });
10610Debug.Assert(node != null);
10611Debug.Assert(expr != null);
10612Debug.Assert((object)expr.Type != null);
10613Debug.Assert(arguments != null);
10641Debug.Assert(node != null);
10642Debug.Assert(expr != null);
10643Debug.Assert(arguments != null);
10702Debug.Assert(convertedArguments.Length == 1);
10724Debug.Assert(index != null);
10829Debug.Assert(expr != null);
10830Debug.Assert((object)targetType != null);
10846Debug.Assert(result != null); // If this ever fails (it shouldn't), then put a null-check around the diagnostics update.
10853Debug.Assert(node != null);
10854Debug.Assert(expr != null);
10855Debug.Assert(analyzedArguments != null);
10869Debug.Assert(expr.Type.IsPointerType());
10915Debug.Assert(node != null);
10916Debug.Assert(expr != null);
10917Debug.Assert((object?)expr.Type != null);
10918Debug.Assert(analyzedArguments != null);
10934Debug.Assert(symbol.IsIndexer());
11005Debug.Assert(property.ParameterCount > 0);
11023Debug.Assert(receiver is not null);
11051Debug.Assert(receiver is not null);
11117Debug.Assert(receiver is not null);
11134Debug.Assert(finalApplicableCandidates[0].IsApplicable);
11260Debug.Assert(receiver is not null);
11261Debug.Assert(receiver.Type is not null);
11299Debug.Assert(argKind != IndexOrRangeArgKind.None);
11300Debug.Assert(lengthOrCountAccess is BoundPropertyAccess);
11301Debug.Assert(indexerOrSliceAccess is BoundIndexerAccess or BoundCall);
11302Debug.Assert(indexerOrSliceAccess.Type is not null);
11365Debug.Assert(argKind != IndexOrRangeArgKind.None);
11376Debug.Assert(actualExtensionIntIndexerOrSliceArguments is null);
11496Debug.Assert(receiverPlaceholder.Type is not null);
11499Debug.Assert(receiverPlaceholder.Type is not null);
11524Debug.Assert(lookupResult.IsClear);
11604Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
11636Debug.Assert(node.LookupError == null);
11696Debug.Assert(!methodResolution.HasAnyApplicableMethod);
11697Debug.Assert(!extensionMethodResolution.HasAnyApplicableMethod);
11698Debug.Assert(!methodResolution.IsEmpty);
11699Debug.Assert(!extensionMethodResolution.IsEmpty);
11713Debug.Assert(!extensionMethodResolution.IsEmpty);
11731Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
11864Debug.Assert(node.ReceiverOpt!.Type is not null); // extensions are only considered on member access
11882Debug.Assert(extensionMember is not null);
11921Debug.Assert(methods.Count != 0);
12080Debug.Assert(node.ReceiverOpt!.Type is not null); // extensions are only considered on member access
12096Debug.Assert(extensionMember is not null);
12209Debug.Assert(ContainingMemberOrLambda is { });
12210Debug.Assert(parameterRefKinds.IsDefault || parameterRefKinds.Length == parameterTypes.Length);
12211Debug.Assert(parameterDefaultValues.IsDefault || parameterDefaultValues.Length == parameterTypes.Length);
12212Debug.Assert(returnType.Type is { }); // Expecting System.Void rather than null return type.
12213Debug.Assert(!hasParams || parameterTypes.Length != 0);
12302Debug.Assert((location == null) ^ (node == null));
12356Debug.Assert((object)receiverType != null);
12475Debug.Assert(node != null);
12476Debug.Assert(node.Expression != null);
12482Debug.Assert(receiver != null);
12491Debug.Assert(conditionalAccessNode != null);
Binder\Binder_Statements.cs (94)
59Debug.Assert(node != null);
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)
189Debug.Assert(fixedBinder != null);
203Debug.Assert(!declarations.IsEmpty);
298Debug.Assert(lockBinder != null);
310Debug.Assert(usingBinder != null);
339Debug.Assert(binder != null);
348Debug.Assert(binder != null);
354Debug.Assert(binder != null);
593Debug.Assert(blockBody != null || expressionBody != null || (localSymbol.IsExtern && localSymbol.IsStatic) || hasErrors);
703Debug.Assert(usingDeclaration is BoundUsingLocalDeclarations);
763Debug.Assert(expr is object);
764Debug.Assert(expr.Type is object);
765Debug.Assert(expr.Type.IsRefLikeType || hasAwait); // pattern dispose lookup is only valid on ref structs or asynchronous usings
793Debug.Assert(
803Debug.Assert(typeSyntax is not ScopedTypeSyntax);
805Debug.Assert(declType.HasType || isVar);
965Debug.Assert(declarator != null);
991Debug.Assert(declarator != null);
992Debug.Assert(declTypeOpt.HasType || isVar);
993Debug.Assert(typeSyntax != null);
1076Debug.Assert(declTypeOpt.HasType);
1229Debug.Assert(!ReferenceEquals(declType, null));
1230Debug.Assert(declType.IsPointerType());
1366Debug.Assert(initializer != null);
1410Debug.Assert(node != null);
1411Debug.Assert(node.Left != null);
1412Debug.Assert(node.Right != null);
1486Debug.Assert(op1 != null);
1487Debug.Assert(op2 != null);
1493Debug.Assert(!op1.NeedsToBeConverted()
1555Debug.Assert(op1 != null);
1556Debug.Assert(op2 != null);
1560Debug.Assert(op1.Type is { });
1593Debug.Assert(leftEscape.Equals(rightEscape) || op1.Type.IsRefLikeOrAllowsRefLikeType());
1601Debug.Assert(op1.Kind != BoundKind.Parameter); // If the assert fails, add a corresponding test.
1649Debug.Assert(false);
1657Debug.Assert(methodInvocationInfo.MethodInfo.Method is not null);
1861Debug.Assert((object)receiver.Type != null);
1872Debug.Assert(node != null);
1917Debug.Assert(binder != null);
1968Debug.Assert((object)targetType != null);
1969Debug.Assert(expression != null);
2048Debug.Assert((object)targetType != null);
2049Debug.Assert(anonymousFunction != null);
2105Debug.Assert(targetType.IsExpressionTree());
2112Debug.Assert(targetType.IsGenericOrNonGenericExpressionType(out _));
2150Debug.Assert(delegateType is not null);
2208Debug.Assert(diagnostics.DiagnosticBag?.Count is not 0);
2231Debug.Assert(anonymousFunction.HasExplicitlyTypedParameterList);
2235Debug.Assert(anonymousFunction.ParameterCount == delegateParameters.Length);
2241Debug.Assert(!lambdaParameterType.IsErrorType());
2263Debug.Assert(ErrorFacts.PreventsSuccessfulDelegateConversion(bindingResult.Diagnostics.Diagnostics));
2270Debug.Assert(false, "Missing case in lambda conversion error reporting");
2281Debug.Assert(!conversion.IsImplicit || !conversion.IsValid);
2315Debug.Assert(conversion.IsUserDefined || conversion.IsUnion);
2324Debug.Assert(originalUserDefinedConversions.Length == 0,
2353Debug.Assert(operand != null);
2354Debug.Assert((object)targetType != null);
2445Debug.Assert(reportedError);
2465Debug.Assert(reportedError);
2487Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting");
2605Debug.Assert(b != null);
2790Debug.Assert(node != null);
2807Debug.Assert(node != null);
2810Debug.Assert(loopBinder != null);
2822Debug.Assert(loopBinder != null);
2835Debug.Assert(loopBinder != null);
2853Debug.Assert(typeSyntax is not ScopedTypeSyntax || localKind is LocalDeclarationKind.RegularVariable or LocalDeclarationKind.UsingVariable);
2873Debug.Assert(declType.HasType || isVar);
2877Debug.Assert(count > 0);
2965Debug.Assert(name != null);
3215Debug.Assert(returnRefKind == RefKind.None);
3292Debug.Assert(node != null);
3340Debug.Assert((object)type != null);
3376Debug.Assert(((object)type == null) || !type.IsErrorType());
3418Debug.Assert(binder != null);
3426Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2)));
3568Debug.Assert(expressionSyntax != null || !IsValidExpressionBody(expressionSyntax, expression));
3658Debug.Assert(bodyBinder != null);
3679Debug.Assert(bodyBinder != null);
3691Debug.Assert(bodyBinder != null);
3693Debug.Assert(body.Kind() != SyntaxKind.RefExpression);
3771Debug.Assert(typeDecl.ParameterList is object);
3772Debug.Assert(typeDecl.Kind() is SyntaxKind.RecordDeclaration or SyntaxKind.ClassDeclaration or SyntaxKind.RecordStructDeclaration or SyntaxKind.StructDeclaration);
3779Debug.Assert(initializerBinder != null);
3800Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3813Debug.Assert(bodyBinder != null);
3878Debug.Assert(!this.ContainingMember().IsImplicitlyDeclared);
3880Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3897Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3921Debug.Assert(sourceConstructor?.SyntaxNode is TypeDeclarationSyntax
Binder\Binder_Symbols.cs (44)
42Debug.Assert(isVar == symbol.IsDefault);
62Debug.Assert((keyword != ConstraintContextualKeyword.None) == symbol.IsDefault);
83Debug.Assert(isVar == symbol.IsDefault);
277Debug.Assert(UnwrapAliasNoDiagnostics(symbol) is NamespaceSymbol);
325Debug.Assert(diagnostics != null);
400Debug.Assert(!result.IsDefault);
1136Debug.Assert(syntax != null);
1137Debug.Assert(diagnostics != null);
1319Debug.Assert(lookupResult.Error != null);
1362Debug.Assert(typeArguments.Count > 0);
1458Debug.Assert(members.Count > 0);
1563Debug.Assert(lookupResult?.IsClear != false);
1602Debug.Assert(symbol.IsExtensionBlockMember());
1639Debug.Assert(!typeArguments.IsEmpty);
1721Debug.Assert((object)typeSymbol != null, "Expect an error type if special type isn't found");
1729Debug.Assert((object)typeSymbol != null, "Expect an error type if special type isn't found");
1794Debug.Assert(symbol.IsDefinition);
1859Debug.Assert((object)typeSymbol != null, "Expect an error type if well-known type isn't found");
1867Debug.Assert((object)typeSymbol != null, "Expect an error type if well-known type isn't found");
1889Debug.Assert((object)typeSymbol != null, "Expect an error type if well-known type isn't found");
1905Debug.Assert((syntax != null) ^ (location != null));
2027Debug.Assert(where != null);
2028Debug.Assert(diagnostics != null);
2050Debug.Assert(!best.IsNone);
2051Debug.Assert(!secondBest.IsNone);
2066Debug.Assert(best.IsFromAddedModule);
2109Debug.Assert(!(srcSymbol.Kind == SymbolKind.Namespace && mdSymbol.Kind == SymbolKind.Namespace));
2117Debug.Assert(!Symbol.Equals(originalSymbols[best.Index], originalSymbols[secondBest.Index], TypeCompareKind.ConsiderEverything) || options.IsAttributeTypeLookup(),
2120Debug.Assert(!Symbol.Equals(first, second, TypeCompareKind.ConsiderEverything) || !Symbol.Equals(originalSymbols[best.Index], originalSymbols[secondBest.Index], TypeCompareKind.ConsiderEverything),
2161Debug.Assert(!best.IsFromCorLibrary);
2173Debug.Assert(best.IsFromCompilation);
2209Debug.Assert(secondBest.IsFromAddedModule);
2220Debug.Assert(best.IsFromAddedModule);
2244Debug.Assert(arg2.ContainingAssembly == Compilation.Assembly);
2275Debug.Assert(originalSymbols[best.Index].Name != originalSymbols[secondBest.Index].Name ||
2404Debug.Assert(symbols.Count > 0);
2524Debug.Assert(location != BestSymbolLocation.None);
2551Debug.Assert(secondLocation != 0);
2598Debug.Assert(!first.IsNone);
2599Debug.Assert(!second.IsNone);
2661Debug.Assert(qualifierOpt.IsNamespace);
2667Debug.Assert(aliasOpt == null || aliasOpt == SyntaxFacts.GetText(SyntaxKind.GlobalKeyword));
2733Debug.Assert((object)forwardedType.ContainingAssembly != null, "How did we find a cycle if there was no forwarding?");
2764Debug.Assert(false);
Binder\Binder.ValueChecks.cs (102)
94Debug.Assert(method is ErrorMethodSymbol or { HasUnsupportedMetadata: true });
157Debug.Assert(indexerAccess.AccessorKind != AccessorKind.Set);
173Debug.Assert(objectCreation.Constructor is not null);
189Debug.Assert(unaryOperator.MethodOpt is not null);
206Debug.Assert(binaryOperatorMethod is not null);
261Debug.Assert(incrementOperator.MethodOpt is not null);
278Debug.Assert(method is not null);
307Debug.Assert(propertyAccess.AutoPropertyAccessorKind != AccessorKind.Set);
354Debug.Assert(parameter.RefKind.IsWritableReference() && parameter.Type.IsRefLikeOrAllowsRefLikeType());
355Debug.Assert(GetParameterValEscapeLevel(parameter).HasValue);
396Debug.Assert(!isArgList || parameter is null);
663Debug.Assert(parameters.Length == indexer.Parameters.Length);
744Debug.Assert(expr.Syntax.Kind() != SyntaxKind.Argument || valueKind == BindValueKind.RefOrOut);
749Debug.Assert(valueKind == BindValueKind.RefOrOut);
753Debug.Assert(valueKind is (BindValueKind.Assignable or BindValueKind.RefOrOut or BindValueKind.RefAssignable) || diagnostics.DiagnosticBag is null || diagnostics.HasAnyResolvedErrors());
839Debug.Assert(!resolution.IsNonMethodExtensionMember(out _));
858Debug.Assert(methodGroup.ResultKind != LookupResultKind.Viable);
865Debug.Assert(methodGroup.LookupError != null);
923Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
1094Debug.Assert(!RequiresRefAssignableVariable(valueKind));
1389Debug.Assert(!RequiresAssignableVariable(BindValueKind.AddressOf));
1408Debug.Assert(parameterSymbol.RefKind != RefKind.None || !RequiresRefAssignableVariable(valueKind));
1416Debug.Assert(backingField.RefKind == RefKind.None);
1417Debug.Assert(!RequiresRefAssignableVariable(valueKind));
1421Debug.Assert(backingField.RefKind == RefKind.None);
1454Debug.Assert(valueKind != BindValueKind.AddressOf); // If this assert fails, we probably should report ErrorCode.ERR_InvalidAddrOp
1558Debug.Assert(parameterSymbol.RefKind == RefKind.None || isRefScoped || refSafeToEscape.IsReturnOnly);
1640Debug.Assert(valueKind == BindValueKind.RefAssignable);
1651Debug.Assert(fieldAccess.ReceiverOpt is null or BoundTypeExpression);
1656Debug.Assert(fieldAccess.ReceiverOpt is not null);
1790Debug.Assert(fieldAccess.ReceiverOpt is { });
1847Debug.Assert(!RequiresVariableReceiver(receiver, eventSymbol));
1897Debug.Assert(receiver != null);
1982Debug.Assert((object)propertySymbol != null);
1983Debug.Assert(propertySyntax != null);
1995Debug.Assert(propertySymbol.TypeWithAnnotations.HasType);
2199Debug.Assert(member.Kind != SymbolKind.Property);
2200Debug.Assert(member.Kind != SymbolKind.Event);
2415Debug.Assert(extensionParameter is not null);
2425Debug.Assert(methodInvocationInfo.HasAnyErrors, "Got a null receiver for a non-static extension method without errors?");
2653Debug.Assert(receiver.Type is { });
2654Debug.Assert(methodInvocationInfo.ReceiverIsSubjectToCloning != ThreeState.Unknown);
2658Debug.Assert(receiver is not BoundValuePlaceholderBase && method is not null && receiver.Type?.IsReferenceType == false);
2686Debug.Assert(argIndex == argsOpt.Length - 1);
2869Debug.Assert(methodInfo.Method?.IsExtensionMethod != false);
2898Debug.Assert(parameter?.IsThis != true);
2903Debug.Assert(escapeLevel == EscapeLevel.ReturnOnly);
3129Debug.Assert(symbol is null or SourceLocalSymbol or GlobalExpressionVariable);
3344Debug.Assert(underlyingParameter.IsThis);
3345Debug.Assert(underlyingParameter.RefKind != RefKind.Out); // Shouldn't get here for a constructor
3346Debug.Assert(underlyingParameter.ContainingSymbol is MethodSymbol);
3421Debug.Assert((object)local != null);
3422Debug.Assert(kind != BindValueKind.RValue);
3583Debug.Assert((object)field != null);
3584Debug.Assert(field.RefKind == RefKind.None ? RequiresAssignableVariable(kind) : RequiresRefAssignableVariable(kind));
3585Debug.Assert(field.Type != (object)null);
3589Debug.Assert(kind != BindValueKind.AddressOf); // If this assert fails, we probably should report ErrorCode.ERR_InvalidAddrOp
3619Debug.Assert((object)symbol != null);
3620Debug.Assert(RequiresAssignableVariable(kind));
3656Debug.Assert(expr.Type is not null);
3737Debug.Assert(false);
3742Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
3870Debug.Assert(GetInlineArrayAccessEquivalentSignatureMethod(elementAccess, out _, out _).RefKind == RefKind.None);
3878Debug.Assert(equivalentSignatureMethod.RefKind != RefKind.None);
3906Debug.Assert(expr is BoundConversion conversion &&
3913Debug.Assert(expr is BoundUnaryOperator unaryOperator &&
3920Debug.Assert(expr is BoundBinaryOperator binaryOperator &&
3927Debug.Assert(expr is BoundUserDefinedConditionalLogicalOperator logicalOperator &&
3933Debug.Assert(expr is BoundCompoundAssignmentOperator compoundAssignmentOperator &&
3940Debug.Assert(expr is BoundIncrementOperator incrementOperator &&
3962Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
3966Debug.Assert(GetRefEscape(expr).IsConvertibleTo(escapeTo));
4036Debug.Assert(false);
4041Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
4171Debug.Assert(GetInlineArrayAccessEquivalentSignatureMethod(elementAccess, out _, out _).RefKind == RefKind.None);
4179Debug.Assert(equivalentSignatureMethod.RefKind != RefKind.None);
4249Debug.Assert((!conversion.Conversion.IsUserDefined && !conversion.Conversion.IsUnion) ||
4255Debug.Assert(expr is BoundUnaryOperator unaryOperator &&
4262Debug.Assert(expr is BoundBinaryOperator binaryOperator &&
4269Debug.Assert(expr is BoundUserDefinedConditionalLogicalOperator logicalOperator &&
4275Debug.Assert(expr is BoundCompoundAssignmentOperator compoundAssignmentOperator &&
4282Debug.Assert(expr is BoundIncrementOperator incrementOperator &&
4353Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
4401Debug.Assert(false);
4579Debug.Assert(conversion.ConversionKind != ConversionKind.StackAllocToSpanType, "StackAllocToSpanType unexpected");
4605Debug.Assert(operatorMethod is not null);
4627Debug.Assert(increment.OperatorKind.IsUserDefined());
4630Debug.Assert(prefix || increment.OperatorKind.Operator() is UnaryOperatorKind.PostfixIncrement or UnaryOperatorKind.PostfixDecrement);
4775Debug.Assert(elementType.Type is { });
4784Debug.Assert(elementType.Type is { });
4788Debug.Assert(expr.CollectionCreation is not null);
4833Debug.Assert(spreadElement.HasErrors
4848Debug.Assert(element.HasErrors);
5022Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
5026Debug.Assert(GetValEscape(expr).IsConvertibleTo(escapeTo));
5054Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
5159Debug.Assert(false);
5358Debug.Assert(conversion.ConversionKind != ConversionKind.StackAllocToSpanType, "StackAllocToSpanType unexpected");
5394Debug.Assert(operatorMethod is not null);
5421Debug.Assert(increment.OperatorKind.IsUserDefined());
5424Debug.Assert(prefix || increment.OperatorKind.Operator() is UnaryOperatorKind.PostfixIncrement or UnaryOperatorKind.PostfixDecrement);
5750Debug.Assert(conversion.Conversion.IsInlineArray);
Binder\DecisionDagBuilder.cs (98)
373Debug.Assert(!pattern.IsUnionMatching);
374Debug.Assert(input.UnionValue is null ?
388Debug.Assert(input.UnionValue is null);
436Debug.Assert(unionValue.Symbol is PropertySymbol);
441Debug.Assert(IsUnionValue(result, out _));
570Debug.Assert(input.Index == 0);
603Debug.Assert(variableAccess.Type!.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || variableAccess.Type.IsErrorType());
759Debug.Assert(IsUnionHasValue(temp, out _));
762Debug.Assert(test is Tests.One { Test: BoundDagValueTest });
804Debug.Assert(IsUnionTryGetValueReturn(boolResult, out _, out _, out _));
807Debug.Assert(test is Tests.One { Test: var tryGetValueResultTest } && IsUnionTryGetValueTest(tryGetValueResultTest, out _, out _, out _));
845Debug.Assert(!conversion.IsUserDefined);
846Debug.Assert(!conversion.IsUnion);
905Debug.Assert(constant.Value.Type is not null || constant.HasErrors);
924Debug.Assert(input.Source is BoundDagPropertyEvaluation { IsLengthOrCount: true });
1010Debug.Assert(subpattern is { IsLengthOrCount: false });
1068Debug.Assert(subpattern.HasAnyErrors);
1096Debug.Assert(subpattern.HasAnyErrors);
1171Debug.Assert(bin.HasErrors ||
1186Debug.Assert(type is { });
1234Debug.Assert(_suitableForLowering || !_forLowering);
1240Debug.Assert(kvp.Key == kvp.Value);
1386Debug.Assert(!first.IsImpossible);
1461Debug.Assert(state.SelectedTest is null);
1489Debug.Assert(state.FalseBranch is null);
1490Debug.Assert(trueBranch is not null);
1491Debug.Assert(state.TrueBranch is not null);
1501Debug.Assert(stateForCases.Index == state.TrueBranch.Cases[case2].Index);
1506Debug.Assert(case2 >= state.TrueBranch.Cases.Count || stateForCases.Index != state.TrueBranch.Cases[case2].Index);
1545Debug.Assert(trueBranch is not null);
1546Debug.Assert(falseBranch is not null);
1611Debug.Assert(_defaultLabel != null);
1612Debug.Assert(defaultDecision != null);
1622Debug.Assert(wasAcyclic, "wasAcyclic"); // force failure in debug builds
1894Debug.Assert(e.IsLengthOrCount);
1900Debug.Assert(input.Index == 0);
1915Debug.Assert(input.Index == 0);
2211Debug.Assert(testUnionInstance != null);
2212Debug.Assert(testKind != UnionTestKind.TypeTest || testTargetType is not null);
2223Debug.Assert(otherUnionInstance != null);
2224Debug.Assert(otherKind != UnionTestKind.TypeTest || otherTargetType is not null);
2266Debug.Assert(testTargetType is not null);
2267Debug.Assert(otherTargetType is not null);
2378Debug.Assert((hasValueTest.Value == ConstantValue.True || hasValueTest.Value == ConstantValue.False));
2397Debug.Assert(isTrue); // The only form of the test that we construct
2523Debug.Assert(s1LengthTemp.IsEquivalentTo(s2LengthTemp));
2590Debug.Assert(s1.Input.Source is BoundDagTypeEvaluation);
2591Debug.Assert(s2.Input.Source is BoundDagTypeEvaluation);
2677Debug.Assert(input.Index == 0);
2962Debug.Assert(arrayBuilder != null);
3279Debug.Assert((conditionToUseFinalResult is null) == (tempsUpdatedResult is null));
3280Debug.Assert((conditionToUseFinalResult is null) || (tempsUpdatedResult is One(BoundDagIndexerEvaluation)));
3317Debug.Assert(rewriteResult.TempsUpdatedResult is not null);
3355Debug.Assert(!b.TempContainingValue.Equals(useValueFrom));
3524Debug.Assert(t.Value.Discriminator == ConstantValueTypeDiscriminator.Int32);
3525Debug.Assert(t.Relation == BinaryOperatorKind.GreaterThanOrEqual);
3526Debug.Assert(t.Value.Int32Value >= 0);
3539Debug.Assert(t.Value.Discriminator == ConstantValueTypeDiscriminator.Int32);
3543Debug.Assert(t.Value.Discriminator == ConstantValueTypeDiscriminator.Int32);
3567Debug.Assert(value >= 0); // Tests with negative values should never be created.
3568Debug.Assert(offset >= 0); // The number of elements in a list is always non-negative.
3582Debug.Assert(tempMap.IsEmpty);
3608Debug.Assert(savedTempMap == tempsUpdatedResultTempMap);
3619Debug.Assert(removeEvaluationLeavesInputUnchanged(tempsUpdatedResult, builder, state, tempMap, e));
3624Debug.Assert(!finalResult.Equals(tempsUpdatedResult) || tempsUpdatedResultTempMap == tempMap);
3625Debug.Assert(condition is null ||
3629Debug.Assert(Test is not BoundDagIndexerEvaluation ||
3647Debug.Fail("Unexpected change in temp map during conditional removal of indexer evaluation.");
3714Debug.Assert(!eval.Input.Equals(e1.Input));
3763Debug.Assert(oldTemp.Type.Equals(newTemp.Type, TypeCompareKind.AllIgnoreOptions));
3795Debug.Assert(!typeEval.Equals(e1));
3861Debug.Fail("Do not expect to get in a situation when a type evaluation removal initiates a temp rewrite.");
3883Debug.Assert(s1LengthTemp.IsEquivalentTo(s2LengthTemp));
3893Debug.Assert(state.RemainingValues.ContainsKey(s1LengthTemp));
3897Debug.Assert(!lengthValues.IsEmpty);
3936Debug.Assert(passThrough.Input.Source is BoundDagTypeEvaluation);
4019Debug.Assert(test is not BoundDagEvaluation);
4047Debug.Assert(!values.IsEmpty);
4106Debug.Assert(test is BoundDagTypeTest, "New type of non-evaluation test added, please update filter for this");
4152Debug.Assert(sample is not null);
4175Debug.Assert(Input.Source is not BoundDagPropertyEvaluation { IsLengthOrCount: true } e ||
4245Debug.Assert(remainingTests.Length > 1);
4377Debug.Assert(tempMapToRestore == tempMap);
4387Debug.Assert(testsToAssemble.Count != 0); // If we have a child to rewrite, we must have a parent to reassemble.
4433Debug.Assert(testsToAssemble.Peek().Kind == ReassembleKind.And);
4443Debug.Assert(rewriteResult.TempsUpdatedResult is not null);
4449Debug.Assert(leftToRewriteBuilder.Count < childCount);
4476Debug.Assert(rewriteResult.ConditionToUseFinalResult is not null);
4477Debug.Assert(rewriteResult.TempsUpdatedResult is not null);
4548Debug.Assert(!skip);
4549Debug.Assert(!skip);
4617Debug.Assert(obj is SequenceTests);
4645Debug.Assert(t2 is SequenceTests seq && seq.RemainingTests.Length == sequence.RemainingTests.Length);
4779Debug.Assert(!remainingTests.Any(t => t is AndSequence));
4786Debug.Assert(t2 is not (True or False));
4885Debug.Assert(!remainingTests.Any(t => t is OrSequence));
4892Debug.Assert(t2 is not (True or False));
4944Debug.Assert(builder.Count == count);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (142)
65Debug.Assert(instance.Count == 0);
285Debug.Assert(!methodTypeParameters.IsDefault);
286Debug.Assert(methodTypeParameters.Length > 0);
287Debug.Assert(!formalParameterTypes.IsDefault);
288Debug.Assert(formalParameterRefKinds.IsDefault || formalParameterRefKinds.Length == formalParameterTypes.Length);
289Debug.Assert(!arguments.IsDefault);
345Debug.Assert(ordinals is null || ordinals.Values.Count() == ordinals.Values.Distinct().Count());
346Debug.Assert(ordinals is null || methodTypeParameters.All(tp => ordinals.ContainsKey(tp)));
354Debug.Assert(_nullableAnnotationLowerBounds.All(annotation => annotation.IsNotAnnotated()));
443Debug.Assert(0 <= index && index < _formalParameterTypes.Length);
498Debug.Assert(ValidIndex(methodTypeParameterIndex));
504Debug.Assert(type.HasType);
539Debug.Assert(IsUnfixedTypeParameter(methodTypeParameterWithAnnotations));
554Debug.Assert(ValidIndex(methodTypeParameterIndex));
562Debug.Assert((object)delegateOrFunctionPointerType != null);
563Debug.Assert(delegateOrFunctionPointerType.IsDelegateType() || delegateOrFunctionPointerType is FunctionPointerTypeSymbol);
603Debug.Assert(!_formalParameterTypes.IsDefault);
604Debug.Assert(!_arguments.IsDefault);
671Debug.Assert(targetType is { });
705Debug.Assert(target.Type is { });
744Debug.Assert(sourceArguments.Length == destTypes.Length);
802Debug.Assert(res != InferenceResult.NoProgress);
931Debug.Assert((object)argument.Type == null, "should not need to dig into elements if tuple has natural type");
941Debug.Assert(sourceArguments.Length == destTypes.Length);
1128Debug.Assert(ValidIndex(iParam));
1129Debug.Assert(ValidIndex(jParam));
1141Debug.Assert(IsUnfixed(iParam));
1142Debug.Assert(IsUnfixed(jParam));
1194Debug.Assert(_dependencies == null);
1198Debug.Assert(0 == (int)Dependency.Unknown);
1215Debug.Assert(_dependencies != null);
1221Debug.Assert(0 <= iParam && iParam < _methodTypeParameters.Length);
1222Debug.Assert(0 <= jParam && jParam < _methodTypeParameters.Length);
1234Debug.Assert(_dependencies != null);
1235Debug.Assert(ValidIndex(iParam));
1236Debug.Assert(ValidIndex(jParam));
1270Debug.Assert(_dependencies != null);
1291Debug.Assert(_dependencies != null);
1306Debug.Assert(_dependencies != null);
1324Debug.Assert(ValidIndex(iParam));
1339Debug.Assert(ValidIndex(iParam));
1352Debug.Assert(ValidIndex(iParam));
1371Debug.Assert(expression != null);
1372Debug.Assert(target.HasType);
1404Debug.Assert(source != null);
1405Debug.Assert(target.HasType);
1418Debug.Assert((object)delegateType.DelegateInvokeMethod != null && !delegateType.DelegateInvokeMethod.HasUseSiteError,
1432Debug.Assert(inferredReturnType.Type is not FunctionTypeSymbol);
1440Debug.Assert(source != null);
1441Debug.Assert((object)target != null);
1472Debug.Assert(method is { HasUseSiteError: false },
1523Debug.Assert(!resolution.IsNonMethodExtensionMember(out _));
1549Debug.Assert(source != null);
1550Debug.Assert(target.HasType);
1604Debug.Assert(source != null);
1605Debug.Assert(target.HasType);
1640Debug.Assert(source.HasType);
1641Debug.Assert(target.HasType);
1694Debug.Assert(source.HasType);
1695Debug.Assert(target.HasType);
1709Debug.Assert(source.HasType);
1710Debug.Assert(target.HasType);
1741Debug.Assert(source is not null);
1742Debug.Assert(target is not null);
1768Debug.Assert(type.IsSpan() || type.IsReadOnlySpan());
1804Debug.Assert(source.HasType);
1805Debug.Assert(target.HasType);
1833Debug.Assert(source.HasType);
1834Debug.Assert(target.HasType);
1860Debug.Assert(source.HasType);
1861Debug.Assert(target.HasType);
1944Debug.Assert((object)source != null);
1945Debug.Assert((object)target != null);
1946Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2));
1954Debug.Assert(sourceTypeArguments.Count == targetTypeArguments.Count);
1971Debug.Assert(source.HasType);
1972Debug.Assert(target.HasType);
2065Debug.Assert(source.HasType);
2066Debug.Assert(target.HasType);
2080Debug.Assert((object)source != null);
2081Debug.Assert((object)target != null);
2115Debug.Assert((object)source != null);
2116Debug.Assert((object)target != null);
2153Debug.Assert(source is not null);
2154Debug.Assert(target is not null);
2196Debug.Assert((object)source != null);
2197Debug.Assert((object)target != null);
2260Debug.Assert((object)source != null);
2261Debug.Assert((object)target != null);
2305Debug.Assert((object)source != null);
2306Debug.Assert((object)target != null);
2386Debug.Assert((object)source != null);
2387Debug.Assert((object)target != null);
2388Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2));
2398Debug.Assert(typeParameters.Count == sourceTypeArguments.Count);
2399Debug.Assert(typeParameters.Count == targetTypeArguments.Count);
2480Debug.Assert(source.HasType);
2481Debug.Assert(target.HasType);
2514Debug.Assert(source.Type.IsReferenceType || source.Type.IsFunctionPointer());
2541Debug.Assert(source.HasType);
2542Debug.Assert(target.HasType);
2555Debug.Assert(source.HasType);
2556Debug.Assert(target.HasType);
2597Debug.Assert(sourceWithAnnotations.HasType);
2598Debug.Assert(targetWithAnnotations.HasType);
2657Debug.Assert((object)source != null);
2658Debug.Assert((object)target != null);
2686Debug.Assert((object)source != null);
2687Debug.Assert((object)target != null);
2736Debug.Assert((object)source != null);
2737Debug.Assert((object)target != null);
2738Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2));
2748Debug.Assert(typeParameters.Count == sourceTypeArguments.Count);
2749Debug.Assert(typeParameters.Count == targetTypeArguments.Count);
2829Debug.Assert(IsUnfixed(iParam));
2883Debug.Assert(!containsFunctionTypes(exact));
2884Debug.Assert(!containsFunctionTypes(upper));
2974Debug.Assert(!best.Equals(candidate, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
2994Debug.Assert(compilation is not null); // Tracked by https://github.com/dotnet/roslyn/issues/80658
3062Debug.Assert((object)target != null);
3063Debug.Assert(target.IsDelegateType());
3064Debug.Assert((object)target.DelegateInvokeMethod != null && !target.DelegateInvokeMethod.HasUseSiteError,
3066Debug.Assert(!target.DelegateInvokeMethod.ReturnsVoid);
3070Debug.Assert(!HasUnfixedParamInInputType(source, target));
3156Debug.Assert(target.IsInterface);
3194Debug.Assert(extension is not null);
3195Debug.Assert(extension.Arity > 0);
3196Debug.Assert(extension.ExtensionParameter is not null);
3197Debug.Assert(!extension.ExtensionParameter.Type.IsDynamic());
3198Debug.Assert(extension.IsDefinition);
3199Debug.Assert(receiver is not null);
3263Debug.Assert((object)method != null);
3264Debug.Assert(method.Arity > 0);
3265Debug.Assert(!arguments.IsDefault);
3274Debug.Assert(!method.GetParameterType(0).IsDynamic());
3301Debug.Assert(!_formalParameterTypes.IsDefault);
3302Debug.Assert(_formalParameterTypes.Length >= 1);
3303Debug.Assert(!_arguments.IsDefault);
3304Debug.Assert(_arguments.Length >= 1);
3323Debug.Assert(IsUnfixed(iParam));
3393Debug.Assert(conversions.IncludeNullability ||
3424Debug.Assert(variance == VarianceKind.In || variance == VarianceKind.Out);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (41)
68Debug.Assert(_bestResultState == ThreeState.True && _bestResult.Result.IsValid);
93Debug.Assert(_bestResultState == ThreeState.True);
133Debug.Assert(HasAnyApplicableMember);
176Debug.Assert(false, "How did we manage to get two methods in the overload resolution results that were both better than every other method?");
224Debug.Assert(!this.Succeeded, "Don't ask for diagnostic info on a successful overload resolution result.");
227Debug.Assert(arguments.Arguments.All(a => a.Display != null));
432Debug.Assert(!supportedRequiredParameterMissingConflicts);
495Debug.Assert(arguments.Names[badArg].HasValue);
535Debug.Assert(firstSupported.Member is MethodSymbol { MethodKind: MethodKind.Constructor });
544Debug.Assert(firstSupported.Member is MethodSymbol { Name: "Add" });
606Debug.Assert(diagInfo != null);
607Debug.Assert(diagInfo.Severity == DiagnosticSeverity.Error);
620Debug.Assert(firstSupported.Result.Kind == MemberResolutionKind.WrongCallingConvention);
635Debug.Assert(bad.Member.GetUseSiteInfo().DiagnosticInfo.Severity == DiagnosticSeverity.Error,
792Debug.Assert(arguments.Arguments.Count > 0);
832Debug.Assert(arguments.Names.Count > badArg);
833Debug.Assert(arguments.Names[badArg].HasValue);
835Debug.Assert(badName != null);
852Debug.Assert(arguments.Names.Count > badArg);
853Debug.Assert(arguments.Names[badArg].HasValue);
855Debug.Assert(badName != null);
866Debug.Assert(result.Result.BadArgumentsOpt.TrueBits().Count() == 1);
867Debug.Assert(arguments.Names[result.Result.FirstBadArgument].HasValue);
869Debug.Assert(name != null);
892Debug.Assert(arguments.Names.Count > badArg);
893Debug.Assert(arguments.Names[badArg].HasValue);
895Debug.Assert(badName != null);
938Debug.Assert(badMember.Kind == SymbolKind.Method);
939Debug.Assert(((MethodSymbol)(object)badMember).IsVararg);
1235Debug.Assert(refArg == RefKind.None);
1340Debug.Assert(argument.Kind != BoundKind.OutDeconstructVarPendingInference);
1341Debug.Assert(argument.Kind != BoundKind.OutVariablePendingInference);
1342Debug.Assert(argument.Kind != BoundKind.DiscardExpression || argument.HasExpressionType());
1343Debug.Assert(argument.Display != null);
1347Debug.Assert((arg == 0) && (parm == arg));
1348Debug.Assert(!badArg.Result.ConversionForArg(parm).IsImplicit);
1359Debug.Assert((object)parameter == unwrapIfParamsCollection(badArg, parameter, isLastParameter), "If they ever differ, just call the method when constructing the diagnostic.");
1423Debug.Assert(badArg.Result.ParamsElementTypeOpt.Type != (object)ErrorTypeSymbol.EmptyParamsCollectionElementTypeSentinel);
1442Debug.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?");
1503Debug.Assert(nValid == 0, "Why are we doing error reporting on an overload resolution problem that had one valid result?");
1507Debug.Assert(false, "Add tests if this is triggered. https://github.com/dotnet/roslyn/issues/80507");
CodeGen\EmitExpression.cs (120)
79Debug.Assert(_recursionDepth == 1);
84Debug.Assert(_recursionDepth == 1);
230Debug.Assert(used);
235Debug.Assert(used);
240Debug.Assert(!used);
245Debug.Assert(used);
250Debug.Assert(used);
255Debug.Assert(used);
260Debug.Assert(used);
265Debug.Assert(used);
270Debug.Assert(used);
275Debug.Assert(used);
310Debug.Assert(used);
356Debug.Assert(expression.Kind != BoundKind.BadExpression);
387Debug.Assert(!expression.Type.IsReferenceType);
388Debug.Assert(!expression.Type.IsValueType);
419Debug.Assert(!receiverType.IsValueType ||
426Debug.Assert(receiverType.IsVerifierReference());
530Debug.Assert(receiver.Type.IsNullableType());
583Debug.Assert(receiverTemp == null);
586Debug.Assert(receiverTemp == null || receiver.IsDefaultValue());
624Debug.Assert(walker._result.HasValue);
642Debug.Assert(!_result.HasValue);
651Debug.Assert(!_result.HasValue);
662Debug.Assert(!expression.Type.IsValueType);
685Debug.Assert(temp == null, "makeref should not create temps");
702Debug.Assert((object)getTypeMethod != null);
732Debug.Assert(refKind is RefKind.In or RefKind.Ref or RefKind.Out or RefKindExtensions.StrictIn);
738Debug.Assert(refKind is RefKind.In || argument.Type.IsDynamic() || argument is BoundFieldAccess { FieldSymbol.RefKind: not RefKind.None }, "passing args byref should not clone them into temps");
756Debug.Assert(refKind is RefKind.Ref or RefKind.Out or RefKindExtensions.StrictIn);
769Debug.Assert(temp == null, "If the operand is addressable, then a temp shouldn't be required.");
825Debug.Assert((object)meth != null);
832Debug.Assert(thisType.TypeKind != TypeKind.TypeParameter);
893Debug.Assert(sequence.Value.Kind != BoundKind.TypeExpression || !used);
983Debug.Assert(arguments.Length == parameters.Length ||
985Debug.Assert(parameters.All(p => p.RefKind == RefKind.None) || !argRefKindsOpt.IsDefault, "there are nontrivial parameters, so we must have argRefKinds");
987Debug.Assert(argRefKindsOpt.IsDefault || argRefKindsOpt.Length == arguments.Length ||
1011Debug.Assert(argRefKind == parameters[i].RefKind ||
1022Debug.Assert(parameters[i].RefKind != RefKind.RefReadOnlyParameter,
1036Debug.Assert(arguments[i].Kind == BoundKind.ArgListOperator);
1184Debug.Assert(!field.IsConst || field.ContainingType.SpecialType == SpecialType.System_Decimal,
1218Debug.Assert(!result, "No test coverage for this scenario.");
1326Debug.Assert(!field.IsVolatile, "volatile valuetype fields are unexpected");
1498Debug.Assert(parameter.Type.Equals(parameter.ParameterSymbol.Type, TypeCompareKind.AllIgnoreOptions) ||
1606Debug.Assert(receiver.Type.IsVerifierReference(), "this is not a reference");
1607Debug.Assert(receiver.Kind != BoundKind.BaseReference, "base should always use call");
1735Debug.Assert(method.IsImplicitlyDeclared);
1736Debug.Assert(TypeSymbol.Equals(method.ContainingType, receiver.Type, TypeCompareKind.ConsiderEverything2));
1737Debug.Assert(receiver.Kind == BoundKind.ThisReference);
1752Debug.Assert(method.IsStatic);
1821Debug.Assert(!box);
1829Debug.Assert(addressKind.GetValueOrDefault() != AddressKind.Constrained);
1830Debug.Assert(!parentCallReceiverType.IsVerifierValue());
1831Debug.Assert(parentCallKind != CallKind.ConstrainedCallVirt);
1835Debug.Assert(!box);
1836Debug.Assert(!parentCallReceiverType.IsVerifierReference());
1871Debug.Assert(receiverUseKind == UseKind.UsedAsValue);
1881Debug.Assert(receiverUseKind == UseKind.UsedAsValue);
1886Debug.Assert(!parentCallReceiverType.IsVerifierReference());
1890Debug.Assert(receiverUseKind == UseKind.UsedAsValue);
1891Debug.Assert(!HasHome(nested, addressKind.GetValueOrDefault()));
1934Debug.Assert(!method.IsStatic && !method.IsDefaultValueTypeConstructor() && method.RequiresInstanceReceiver);
1974Debug.Assert(TypeSymbol.Equals(receiverType, methodContainingType, TypeCompareKind.ObliviousNullableModifierMatchesAny));
2019Debug.Assert((callKind != CallKind.ConstrainedCallVirt) || (addressKind.GetValueOrDefault() == AddressKind.Constrained) || receiverType.IsVerifierValue());
2042Debug.Assert(!box);
2043Debug.Assert(!receiverType.IsVerifierReference());
2088Debug.Assert(receiver.Type.IsVerifierReference());
2099Debug.Assert(receiver.Type.IsVerifierReference());
2112Debug.Assert(false, "Taking this code path is likely unexpected.");
2271Debug.Assert(!b.OperatorKind.IsUserDefined());
2284Debug.Assert(!conv.ConversionKind.IsUserDefinedConversion());
2285Debug.Assert(!conv.ConversionKind.IsUnionConversion());
2302Debug.Assert(methodContainingType.IsVerifierValue(), "only struct calls can be readonly");
2435Debug.Assert(method.ContainingType.IsVerifierValue(), "this is not a value type");
2483Debug.Assert(expression.Type.SpecialType == SpecialType.System_Int32 ||
2816Debug.Assert(temp == null, "in-place init target should not create temps");
2823Debug.Assert(TargetIsNotOnHeap(target), "cannot read-back the target since it could have been modified");
2830Debug.Assert(TargetIsNotOnHeap(target), "in-place construction target should not be on heap");
2845Debug.Assert(temp == null, "in-place ctor target should not create temps");
2939Debug.Assert(temp == null, "temp is unexpected when assigning to a field");
3023Debug.Assert(temp == null, "taking ref of this should not create a temp");
3039Debug.Assert(temp == null, "taking ref of Dup should not create a temp");
3048Debug.Assert(left.IsRef);
3051Debug.Assert(temp == null, "taking ref of this should not create a temp");
3084Debug.Assert(left.Method.RefKind != RefKind.None);
3095Debug.Assert(left.FunctionPointer.Signature.RefKind != RefKind.None);
3150Debug.Assert(lhs.Kind != BoundKind.Parameter || exprTempsAfter <= exprTempsBefore);
3273Debug.Assert(((BoundDup)expression).RefKind != RefKind.None);
3284Debug.Assert(((BoundConditionalOperator)expression).IsRef);
3302Debug.Assert(((BoundCall)expression).Method.RefKind != RefKind.None);
3307Debug.Assert(((BoundFunctionPointerInvocation)expression).FunctionPointer.Signature.RefKind != RefKind.None);
3358Debug.Assert(thisRef.Type.IsValueType);
3554Debug.Assert((object)operand.Type != null);
3573Debug.Assert(asOp.OperandPlaceholder is null);
3574Debug.Assert(asOp.OperandConversion is null);
3583Debug.Assert((object)targetType != null);
3635Debug.Assert(expression.Type.SpecialType == SpecialType.System_Decimal ||
3680Debug.Assert((object)getTypeMethod != null); // Should have been checked during binding
3701Debug.Assert(node.Method.IsDefinition);
3702Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32);
3719Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32);
3733Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32);
3747Debug.Assert(field.IsDefinition);
3756Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32);
3792Debug.Assert(throwMethod != null);
3835Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32);
3846Debug.Assert((object)getMethod != null);
3854Debug.Assert(getMethod.ParameterCount == 2);
3873Debug.Assert((object)getField != null);
3881Debug.Assert(getField.ParameterCount == 2);
3910Debug.Assert(expr.ConstantValueOpt == null, "Constant value should have been emitted directly");
4008Debug.Assert(expr.LeftConversion is null, "coalesce with nontrivial left conversions are lowered into conditional.");
4009Debug.Assert(expr.Type.IsReferenceType);
4089Debug.Assert(conversionKind != ConversionKind.NullLiteral && conversionKind != ConversionKind.DefaultLiteral);
4156Debug.Assert(to.IsVerifierReference());
4176Debug.Assert(!type.IsRefLikeType);
4229Debug.Assert(useKind == UseKind.Unused, "Using the return value of a void method.");
4230Debug.Assert(_method.GenerateDebugInfo, "Implied by this.emitSequencePoints");
4269Debug.Assert(method.RefKind != RefKind.None);
4275Debug.Assert(load.Type is { TypeKind: TypeKind.FunctionPointer });
CodeGen\Optimizer.cs (44)
298Debug.Assert(instance._localDefs == null);
450Debug.Assert(expr.Kind != BoundKind.Label);
520Debug.Assert(_recursionDepth == 1);
525Debug.Assert(_recursionDepth == 1);
541Debug.Assert(result != null || context == ExprContext.None);
567Debug.Assert(node == null || EvalStackIsEmpty());
614Debug.Assert(EvalStackIsEmpty(), "entering blocks when evaluation stack is not empty?");
793Debug.Assert(localUsedWalker.IsLocalUsedIn(assignment.Right), "who assigns the temp?");
868Debug.Assert(_assignmentLocal == null);
928Debug.Assert(_context != ExprContext.AssignmentTarget, "assignment expression cannot be a target of another assignment");
938Debug.Assert(_context == ExprContext.Value ||
972Debug.Assert(
978Debug.Assert(!isIndirectAssignment, "indirect assignment is a read, not a write");
1039Debug.Assert(!node.IsRef ||
1046Debug.Assert(lhs.Type.IsValueType, "'this' is assignable only in structs");
1066Debug.Assert(((BoundCall)lhs).Method.RefKind == RefKind.Ref, "only ref returning methods are assignable");
1070Debug.Assert(((BoundFunctionPointerInvocation)lhs).FunctionPointer.Signature.RefKind == RefKind.Ref, "only ref returning function pointers are assignable");
1074Debug.Assert(((BoundConditionalOperator)lhs).IsRef, "only ref ternaries are assignable");
1078Debug.Assert(((BoundAssignmentOperator)lhs).IsRef, "only ref assignments are assignable");
1084Debug.Assert(!IsIndirectAssignment(node.Update(((BoundSequence)node.Left).Value, node.Right, node.IsRef, node.Type)),
1179Debug.Assert(method.IsStatic);
1268Debug.Assert(!arguments.IsDefault);
1269Debug.Assert(!parameters.IsDefault);
1271Debug.Assert(arguments.Length == parameters.Length || arguments.Length == parameters.Length + 1);
1331Debug.Assert(node.InitializerExpressionOpt == null);
1400Debug.Assert(false, "we should not have label expressions at this stage");
1406Debug.Assert(false, "we should not have is-pattern expressions at this stage");
1412Debug.Assert(node.CaseExpressionOpt == null, "we should not have label expressions at this stage");
1431Debug.Assert(EvalStackIsEmpty());
1538Debug.Assert(!binary.OperatorKind.IsDynamic());
1552Debug.Assert((object)binary == node);
1573Debug.Assert(!node.OperatorKind.IsDynamic());
1582Debug.Assert(node.LeftPlaceholder is null);
1583Debug.Assert(node.LeftConversion is null);
1893Debug.Assert(local.RefKind == RefKind.None, "cannot take a ref of a ref");
1940Debug.Assert(local == empty || locInfo.StackAtDeclaration == StackDepth());
1961Debug.Assert(local.SynthesizedKind == SynthesizedLocalKind.OptimizerTemp);
1966Debug.Assert(local == empty || locInfo.StackAtDeclaration == StackDepth());
1974Debug.Assert(local.SynthesizedKind != SynthesizedLocalKind.OptimizerTemp);
2029Debug.Assert(local.SynthesizedKind == SynthesizedLocalKind.LoweringTemp, "only lowering temps may be sometimes reused");
2168Debug.Assert(!binary.OperatorKind.IsDynamic());
2179Debug.Assert((object)binary == node);
2212Debug.Assert(node.InitializerExpressionOpt == null);
2252Debug.Assert(locInfo.LocalDefs.Any((d) => _nodeCounter == d.Start && _nodeCounter <= d.End));
Compilation\CSharpSemanticModel.cs (73)
62Debug.Assert(node != null);
206Debug.Assert(expression != null);
255Debug.Assert(binder != null);
256Debug.Assert(binder.IsSemanticModelBinder);
257Debug.Assert(expression != null);
258Debug.Assert(bindingOption != SpeculativeBindingOption.BindAsTypeOrNamespace || expression is TypeSyntax);
267Debug.Assert(bindingOption == SpeculativeBindingOption.BindAsExpression);
739Debug.Assert(boundNode == null || crefSymbols.IsDefault);
765Debug.Assert(CanGetSemanticInfo(attribute, isSpeculative: true));
793Debug.Assert(CanGetSemanticInfo(constructorInitializer, isSpeculative: true));
865Debug.Assert(CanGetSemanticInfo(constructorInitializer, isSpeculative: true));
926Debug.Assert(CanGetSemanticInfo(cref, isSpeculative: true));
1069Debug.Assert(boundNode == null || crefSymbols.IsDefault);
1216Debug.Assert(boundNode == null || crefSymbols.IsDefault);
1236Debug.Assert(result == null || result.IsSemanticModelBinder);
1328Debug.Assert(IsInTree(node));
1346Debug.Assert(position == fullSpan.Start);
1354Debug.Assert(node.Width == 0);
1373Debug.Assert(position == CheckAndAdjustPosition(position), "Expected adjusted position");
1581Debug.Assert((options & LookupOptions.UseBaseReferenceAccessibility) == 0, "Use the useBaseReferenceAccessibility parameter.");
1586Debug.Assert(!options.IsAttributeTypeLookup()); // Not exposed publicly.
1606Debug.Assert((object)container == null);
1677Debug.Assert((options & LookupOptions.NamespacesOrTypesOnly) == 0);
1678Debug.Assert((options & LookupOptions.NamespaceAliasesOnly) == 0);
1679Debug.Assert((options & LookupOptions.LabelsOnly) == 0);
1696Debug.Assert(symbol.IsExtensionBlockMember());
1755Debug.Assert(results != null);
1758Debug.Assert((options & LookupOptions.AllMethodsOnArityZero) == 0);
2323Debug.Assert((object)symbol != null);
2361Debug.Assert((object)symbol != null);
3314Debug.Assert(catchClause.Kind() == SyntaxKind.CatchClause);
3438Debug.Assert(boundNode is not BoundTypeOrValueExpression, "The Binder is expected to resolve the member access in the most appropriate way, even in an error scenario.");
3495Debug.Assert((object)indexerAccess.Indexer != null);
3544Debug.Assert((object)symbol != null);
3595Debug.Assert(conditional.ExpressionSymbol is null);
3601Debug.Assert(boundNodeForSyntacticParent == null);
3613Debug.Assert(resultKind != LookupResultKind.Viable);
3647Debug.Assert(dynamicInvocation.ExpressionSymbol is null);
3655Debug.Assert(collectionInit.ExpressionSymbol is null);
3663Debug.Assert(dynamicIndexer.ExpressionSymbol is null);
3670Debug.Assert((object)boundNode.ExpressionSymbol == null);
3686Debug.Assert(boundObjectCreation.ConstructorsGroup.Contains(boundObjectCreation.Constructor));
3832Debug.Assert((object)unaryOperator.MethodOpt == null && unaryOperator.OriginalUserDefinedOperatorsOpt.IsDefaultOrEmpty);
3855Debug.Assert((object)increment.MethodOpt == null && increment.OriginalUserDefinedOperatorsOpt.IsDefaultOrEmpty);
3880Debug.Assert((object)binaryOperator.BinaryOperatorMethod == null && binaryOperator.OriginalUserDefinedOperatorsOpt.IsDefaultOrEmpty);
3919Debug.Assert(returnType.IsDynamic());
3923Debug.Assert(rightType.IsDynamic());
3928Debug.Assert(leftType.IsDynamic());
3953Debug.Assert((object)compoundAssignment.Operator.Method == null && compoundAssignment.OriginalUserDefinedOperatorsOpt.IsDefaultOrEmpty);
4012Debug.Assert(resultKind != LookupResultKind.Viable ||
4047Debug.Assert(lowestBoundNode != null);
4048Debug.Assert(binderOpt != null || IsInTree(lowestBoundNode.Syntax));
4052Debug.Assert(lowestBoundNode.Syntax != null);
4073Debug.Assert(resultKind != LookupResultKind.Viable);
4084Debug.Assert(candidateConstructors.Contains(constructorOpt));
4090Debug.Assert(resultKind != LookupResultKind.Viable);
4108Debug.Assert(binderOpt != null || IsInTree(boundNode.Syntax));
4139Debug.Assert(symbol.IsIndexer(), "Only indexers can have name " + WellKnownMemberNames.Indexer);
4265Debug.Assert(binderOpt != null || IsInTree(boundNode.Syntax));
4417Debug.Assert(binderOpt != null || IsInTree(boundNode.Syntax));
4500Debug.Assert(SyntaxFacts.IsNamedArgumentName(identifierNameSyntax));
4600Debug.Assert(nonHiddenMethods.Any()); // Something must be hiding, so can't all be hidden.
4636Debug.Assert(receiver != null);
4750Debug.Assert(members.Count > 0);
4757Debug.Assert((members.Count == 0) == (resultKind == LookupResultKind.Empty));
4758Debug.Assert(members.Count == filteredMembers.Count);
4769Debug.Assert(!methods.IsDefault);
4783Debug.Assert((object)receiverType != null);
4804Debug.Assert((object)method != null);
4808Debug.Assert(call.Arguments.Length > 0);
4821Debug.Assert((object)method != null);
4956Debug.Assert(((options & SymbolInfoOptions.PreferConstructorsToType) != 0) !=
4958Debug.Assert(((options & SymbolInfoOptions.ResolveAliases) != 0) !=
Compiler\ClsComplianceChecker.cs (40)
44Debug.Assert(diagnostics.DependenciesBag is null || diagnostics.DependenciesBag is ConcurrentSet<AssemblySymbol>);
93System.Diagnostics.Debug.Assert(symbol is SourceAssemblySymbol);
122System.Diagnostics.Debug.Assert(warningLocation != null || !moduleDeclaredCompliance.HasValue || (i == 0 && _filterTree != null),
243Debug.Assert(!symbol.IsImplicitClass);
279System.Diagnostics.Debug.Assert(IsAccessibleOutsideAssembly(constructor), "Should be implied by IsAccessibleIfContainerIsAccessible");
424System.Diagnostics.Debug.Assert(
430System.Diagnostics.Debug.Assert(!symbol.IsAccessor());
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 || symbol.IsExtension, "Only object or extension has no base.");
543System.Diagnostics.Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols");
546System.Diagnostics.Debug.Assert((object)containingType == null || !containingType.IsImplicitClass);
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");
665System.Diagnostics.Debug.Assert(syntaxRef.SyntaxTree.HasCompilationUnitRoot);
713System.Diagnostics.Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols");
738System.Diagnostics.Debug.Assert(method.ContainingType.TypeKind == TypeKind.Delegate);
743System.Diagnostics.Debug.Assert(!method.IsAccessor());
804System.Diagnostics.Debug.Assert(IsAccessibleOutsideAssembly(symbol));
805System.Diagnostics.Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)));
886Debug.Assert(sameNameSymbols.Count > 0);
887Debug.Assert(symbol.Name == symbolName);
929System.Diagnostics.Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)));
930System.Diagnostics.Debug.Assert(IsAccessibleOutsideAssembly(symbol));
952System.Diagnostics.Debug.Assert(name.Length == 0 || name[0] != '\uFF3F');
1116System.Diagnostics.Debug.Assert(symbol.Kind == SymbolKind.NamedType || !((symbol is TypeSymbol)),
1136Debug.Assert(symbol.Kind != SymbolKind.Alias);
1137Debug.Assert(symbol.Kind != SymbolKind.Label);
1138Debug.Assert(symbol.Kind != SymbolKind.Namespace);
1139Debug.Assert(symbol.Kind != SymbolKind.Parameter);
1140Debug.Assert(symbol.Kind != SymbolKind.RangeVariable);
1172System.Diagnostics.Debug.Assert(symbol.Kind != SymbolKind.Assembly);
1175System.Diagnostics.Debug.Assert((object)containing != null);
1209System.Diagnostics.Debug.Assert(args.Length == 1, "We already checked the signature and HasErrors.");
1246System.Diagnostics.Debug.Assert(symbol.Kind == SymbolKind.ErrorType);
1318System.Diagnostics.Debug.Assert((object)x != null);
1319System.Diagnostics.Debug.Assert((object)y != null);
1320System.Diagnostics.Debug.Assert((object)x != (object)y);
1321System.Diagnostics.Debug.Assert(x.Kind == y.Kind);
FlowAnalysis\NullableWalker.cs (361)
82Debug.Assert(variables.Id == variableNullableStates.Id);
149Debug.Assert(TypeSymbol.Equals(RValueType.Type, LValueType.Type, TypeCompareKind.ConsiderEverything));
166Debug.Assert(!StateForLambda.HasValue);
369Debug.Assert(TypeAllowsConditionalState(visitResult.RValueType.Type)
490Debug.Assert(_targetTypedAnalysisCompletionOpt is null or { Count: 0 });
514Debug.Assert(!TrackingRegions);
515Debug.Assert(!useDelegateInvokeParameterTypes || delegateInvokeMethodOpt is object);
516Debug.Assert(baseOrThisInitializer is null or { MethodKind: MethodKind.Constructor });
572Debug.Assert(GetOwningSymbolAndContainingSlot(identifier.Symbol, identifier.ContainingSlot) == ((object)identifier.Symbol, identifier.ContainingSlot));
586Debug.Assert(_resultForPlaceholdersOpt.Count == 0);
603Debug.Assert(_resultForPlaceholdersOpt is { });
605Debug.Assert(removed);
611Debug.Assert(placeholder is { });
693Debug.Assert(_useConstructorExitWarnings);
1049Debug.Assert(requiredMember.IsRequired());
1544Debug.Assert(node.SyntaxTree is object);
1590Debug.Assert(method.IsConstructor());
1911Debug.Assert(diagnostics != null);
1912Debug.Assert(getterNullResilienceData is null || symbol is SourcePropertyAccessorSymbol { MethodKind: MethodKind.PropertyGet });
1913Debug.Assert(getterNullResilienceData is null || !useConstructorExitWarnings);
1937Debug.Assert(!walker.IsConditionalState);
1955Debug.Assert(snapshotBuilderOpt is null || symbol is object);
1968Debug.Assert(!badRegion);
1989Debug.Assert(result.RequiredAnalysis == requiredAnalysis);
2005Debug.Assert(!IsConditionalState);
2078Debug.Assert(slot > 0);
2166Debug.Assert(member?.RequiresInstanceReceiver() ?? true);
2315Debug.Assert(containingSlot == 0);
2721Debug.Assert(!IsConditionalState);
2775Debug.Assert(ErrorFacts.NullableWarnings.Contains(MessageProvider.Instance.GetIdForErrorCode((int)errorCode)));
2784Debug.Assert(targetSlot > 0);
2785Debug.Assert(EmptyStructTypeCache.IsTrackableStructType(targetType));
2811Debug.Assert(false, "If this assert fires, please add a unit test for the scenario.");
2827Debug.Assert(targetContainerSlot > 0);
2828Debug.Assert(skipSlot > 0);
2912Debug.Assert(slot > 0);
2933Debug.Assert(targetSlot > 0);
2978Debug.Assert(false);
3006Debug.Assert(targetSlot > 0);
3007Debug.Assert(valueSlot > 0);
3015Debug.Assert(member.Kind == SymbolKind.Field || member.Kind == SymbolKind.Property || member.Kind == SymbolKind.Event);
3089Debug.Assert(!IsConditionalState);
3143Debug.Assert(!IsConditionalState);
3249Debug.Assert((object)returnType != LambdaSymbol.ReturnTypeIsBeingInferred);
3298Debug.Assert(node.Type.ContainsErrorType() || type.Type.ContainsErrorType());
3330Debug.Assert(!TrackingRegions);
3397Debug.Assert(newBodiesVisited);
3487Debug.Assert((object?)variables.Container == container);
3499Debug.Assert(!useDelegateInvokeParameterTypes || delegateInvokeMethod is object);
3500Debug.Assert(!useDelegateInvokeReturnType || delegateInvokeMethod is object);
3622Debug.Assert(!IsConditionalState);
3648Debug.Assert(!IsConditionalState);
3762Debug.Assert(!IsConditionalState);
3797Debug.Assert(type.Type.IsErrorType());
3816Debug.Assert(node is BoundExpression or BoundPattern);
3817Debug.Assert(!IsConditionalState);
4042Debug.Assert(reinferenceResult.Completion != null);
4058Debug.Assert(collectionBuilderElementsPlaceholder != null);
4080Debug.Assert(reinferenceResult.Completion != null);
4101Debug.Assert(allTypeArguments.Length == call.Method.Arity, "Guaranteed by GetCollectionBuilderMethods");
4140Debug.Assert(node.Placeholder is { });
4144Debug.Assert(initializer.ArgsToParamsOpt.IsDefault);
4215Debug.Assert(completion is not null);
4229Debug.Assert(TypeSymbol.Equals(strippedTargetCollectionType, node.Type, TypeCompareKind.AllIgnoreOptions));
4288Debug.Assert(foundIterationType);
4293Debug.Assert(!targetElementType.HasType);
4307Debug.Assert(node.ExpressionPlaceholder is { });
4308Debug.Assert(node.EnumeratorInfoOpt is { });
4320Debug.Assert(node.HasErrors);
4321Debug.Assert(node.Conversion is null);
4322Debug.Assert(node.EnumeratorInfoOpt is null);
4330Debug.Assert(!IsConditionalState);
4343Debug.Assert(isTargetTyped == argumentsCompletion is not null);
4374Debug.Assert(argumentsCompletion is not null);
4375Debug.Assert(initialStateInferenceCompletion is not null);
4380Debug.Assert(argumentsCompletion is null);
4381Debug.Assert(initialStateInferenceCompletion is null);
4382Debug.Assert(initializerCompletion is null);
4398Debug.Assert(resultState == NullableFlowState.NotNull);
4403Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4441Debug.Assert(node.Kind is BoundKind.ObjectCreationExpression or BoundKind.DynamicObjectCreationExpression or BoundKind.NewT or BoundKind.NoPiaObjectCreationExpression);
4543Debug.Assert(completion is null);
4544Debug.Assert(resultState == NullableFlowState.NotNull);
4552Debug.Assert(containingSlot > 0);
4571Debug.Assert(iUnionValuePropertySlot > 0);
4584Debug.Assert(!delayCompletionForType || containingSlot == -1);
4634Debug.Assert(!delayCompletionForType || containingSlot == -1);
4674Debug.Assert(symbol is not null);
4697Debug.Assert(argumentsCompletion is null);
4698Debug.Assert(initializationCompletion is null);
4708Debug.Assert(objectInitializer.MemberSymbol is not null);
4726Debug.Assert(argumentResults[0].LValueType.Type.Equals(containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4735Debug.Assert(initializationCompletion is null || symbol is not null);
4739Debug.Assert(result is null);
4751Debug.Assert(!delayCompletionForType || slot == -1);
4767Debug.Assert(nestedCompletion is null);
4792Debug.Assert(!delayCompletionForType || conversionCompletion is null);
4799Debug.Assert(GetTypeOrReturnTypeWithAnnotations(symbol).HasType);
4811Debug.Assert(conversionCompletion is not null);
4815Debug.Assert(conversionCompletion is null);
4828Debug.Assert(result is null);
4845Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, GetTypeOrReturnType(symbol), TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4873Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, GetTypeOrReturnType(symbol), TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4937Debug.Assert(visitArgumentsCompletion is not null);
4941Debug.Assert(visitArgumentsCompletion is null);
4942Debug.Assert(reinferredMethod is object);
4978Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4979Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
5056Debug.Assert(node.Type is object);
5074Debug.Assert((object)placeholder != null);
5080Debug.Assert(!IsConditionalState);
5081Debug.Assert(node.Type.IsAnonymousType);
5258Debug.Assert(namedType.Name == "Span");
5259Debug.Assert(namedType.OriginalDefinition.Arity == 1);
5265Debug.Assert(namedType.Name == "Span");
5266Debug.Assert(namedType.OriginalDefinition.Arity == 1);
5375Debug.Assert(!IsConditionalState);
5379Debug.Assert(!IsConditionalState);
5380Debug.Assert(!node.Expression.Type!.IsValueType);
5409Debug.Assert(!IsConditionalState);
5413Debug.Assert(!IsConditionalState);
5414Debug.Assert(expressionType is not null);
5415Debug.Assert(expressionType.IsValueType);
5489Debug.Assert(!IsConditionalState);
5663Debug.Assert(binary.Type.SpecialType == SpecialType.System_Boolean);
5696Debug.Assert(!IsConditionalState);
5731Debug.Assert(operand == expr);
5749Debug.Assert(!IsConditionalState);
5753Debug.Assert(binary.Type!.SpecialType == SpecialType.System_Boolean);
5879Debug.Assert(!IsConditionalState);
5980Debug.Assert(operand != null);
6228Debug.Assert(targetType.Type.ContainsErrorType() ||
6240Debug.Assert(TypeSymbol.Equals(targetType.Type, rightResult.Type, TypeCompareKind.AllIgnoreOptions));
6251Debug.Assert(!IsConditionalState);
6302Debug.Assert(rightType is object);
6309Debug.Assert(!conversion.IsUserDefined);
6310Debug.Assert(!conversion.IsUnion);
6315Debug.Assert(!conversion.IsUserDefined);
6316Debug.Assert(!conversion.IsUnion);
6339Debug.Assert(conversionResult.Type is not null);
6368Debug.Assert(targetType.HasType);
6380Debug.Assert(!IsConditionalState);
6418Debug.Assert(!IsConditionalState);
6464Debug.Assert(innerCondAccess.Receiver is not (BoundConditionalAccess or BoundConversion));
6476Debug.Assert(expr is BoundExpression);
6486Debug.Assert(expr is BoundExpression);
6557Debug.Assert(node is not BoundConditionalOperator { WasTargetTyped: true }, """
6647Debug.Assert(!wasTargetTyped);
6654Debug.Assert(node is BoundUnconvertedConditionalOperator);
6655Debug.Assert(node.HasErrors || _returnTypesOpt is not null || _disableDiagnostics);
6747Debug.Assert(!isRef);
6759Debug.Assert(isRef);
6891Debug.Assert(node.InvokedAsExtensionMethod);
6911Debug.Assert(node.InvokedAsExtensionMethod || isExtensionBlockMethod);
6918Debug.Assert(node.Method.ContainingType.ExtensionParameter is not null);
6958Debug.Assert(node.ReceiverOpt is null);
7011Debug.Assert(reinferenceResult.Member is not null);
7075Debug.Assert(reinferenceResult.Completion is null);
7077Debug.Assert(newMethod is not null);
7102Debug.Assert(extensionParameter is not null);
7115Debug.Assert(member.IsExtensionBlockMember());
7136Debug.Assert(extensionParameter is not null);
7207Debug.Assert(arguments.Length == 2);
7218Debug.Assert(arguments.Length == 1);
7307Debug.Assert(baseType is object);
7379Debug.Assert(!compareExchangeInfo.IsDefault);
7401Debug.Assert(argsToParamsOpt is { IsDefault: true } or { Length: 3 });
7627Debug.Assert(reinferenceResult.Completion is null);
7641Debug.Assert(reinferenceResult.Completion is null);
7675Debug.Assert(!arguments.IsDefault);
7676Debug.Assert(!expanded || !parametersOpt.IsDefault);
7677Debug.Assert(refKindsOpt.IsDefaultOrEmpty || refKindsOpt.Length == arguments.Length);
7678Debug.Assert(argsToParamsOpt.IsDefault || argsToParamsOpt.Length == arguments.Length);
7686Debug.Assert(!arguments.Any(a => a.IsParamsArrayOrCollection));
7786Debug.Assert(method is ErrorMethodSymbol);
7910Debug.Assert(result.Completion is null);
7922Debug.Assert(arguments.Count(a => a.IsParamsArrayOrCollection) <= 1);
7929Debug.Assert(parametersOpt.IsDefault || arguments.Length == parametersOpt.Length);
7957Debug.Assert(defaultArguments.IsNull || elements.Length == 1);
7958Debug.Assert(elements.Length == 1 || a == arguments.Length - 1);
7963Debug.Assert(argumentsBuilder.Count == arguments.Length + elements.Length - 1);
8067Debug.Assert(receiverSlot >= 0);
8174Debug.Assert(!IsConditionalState);
8238Debug.Assert(!IsConditionalState);
8286Debug.Assert(!IsConditionalState);
8305Debug.Assert(!this.IsConditionalState);
8322Debug.Assert(argumentResultType is not null);
8378Debug.Assert(!this.IsConditionalState);
8564Debug.Assert(!IsConditionalState);
8569Debug.Assert(!IsConditionalState);
8748Debug.Assert(variables.Id == localState.Id);
8767Debug.Assert(!expanded);
8777Debug.Assert(paramsIterationType.HasType);
8794Debug.Assert(member.GetMemberArityIncludingExtension() != 0);
8930Debug.Assert(false); // unexpected value
8969Debug.Assert(lambdaState.HasValue);
8982Debug.Assert(collectionExpressionVisitResults is not null);
8983Debug.Assert(collectionExpressionVisitResults.Length == collection.Elements.Length);
9123Debug.Assert(group != null || !conversion.ExplicitCastInCode); // Explicit conversions should include a group.
9236Debug.Assert((object)symbol != null);
9237Debug.Assert(!symbol.IsExtensionBlockMember(), symbol.ToDisplayString());
9271Debug.Assert(symbol.ContainingType.IsDefinition);
9308Debug.Assert(false);
9338Debug.Assert(targetType.HasType);
9383Debug.Assert(completion is null);
9414Debug.Assert(targetTypeOpt.HasType);
9443Debug.Assert(result.completion is null);
9473Debug.Assert(!IsConditionalState);
9509Debug.Assert(diagnostics.DiagnosticBag is { });
9535Debug.Assert(tupleType.IsTupleType);
9536Debug.Assert(values.Length == types.Length);
9537Debug.Assert(values.Length == (useRestField ? Math.Min(tupleType.TupleElements.Length, NamedTypeSymbol.ValueTupleRestPosition) : tupleType.TupleElements.Length));
9570Debug.Assert(index != -1);
9577Debug.Assert(containingType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T);
9578Debug.Assert(containingSlot > 0);
9579Debug.Assert(valueSlot > 0);
9601Debug.Assert(conversion.Kind == ConversionKind.ImplicitTuple || conversion.Kind == ConversionKind.ExplicitTuple);
9602Debug.Assert(slot > 0);
9603Debug.Assert(valueSlot > 0);
9692Debug.Assert(targetField.TypeWithAnnotations.Type.StrippedType() is NamedTypeSymbol { IsUnionType: true });
9712Debug.Assert(conversionOperandSlot > 0);
9762Debug.Assert(diagnostics.DiagnosticBag is { });
9818Debug.Assert(diagnostics.DiagnosticBag is { });
9873Debug.Assert(conversionOpt is null
9921Debug.Assert(!trackMembers || !IsConditionalState);
9922Debug.Assert(conversionOperand != null);
9923Debug.Assert(conversionOpt is null || targetInstanceSlotOpt < 0);
9949Debug.Assert(conversionOpt is null);
9998Debug.Assert(targetInstanceSlotOpt < 0);
10037Debug.Assert(targetInstanceSlotOpt < 0);
10042Debug.Assert(targetInstanceSlotOpt < 0);
10104Debug.Assert(containingSlot > 0);
10139Debug.Assert(targetInstanceSlotOpt < 0);
10153Debug.Assert(conversionOperand != null);
10161Debug.Assert(containingSlot > 0);
10198Debug.Assert(targetInstanceSlotOpt < 0);
10201Debug.Assert(conversionOperand != null);
10228Debug.Assert(conversionOperand != null);
10278Debug.Assert(targetType.IsValueType || targetType.IsErrorType());
10381Debug.Assert(dependsOn); // If this case fails, add a corresponding test.
10454Debug.Assert(handlerData.ArgumentPlaceholders.IsEmpty
10476Debug.Assert(extensionBlockFormOffset == 1);
10533Debug.Assert(!IsConditionalState);
10534Debug.Assert(conversionOperand != null);
10535Debug.Assert(targetTypeWithNullability.HasType);
10536Debug.Assert(diagnosticLocation != null);
10537Debug.Assert(conversion.Kind == ConversionKind.ExplicitUserDefined || conversion.Kind == ConversionKind.ImplicitUserDefined);
10569Debug.Assert(method is object);
10570Debug.Assert(method.ParameterCount == 1);
10571Debug.Assert(operandType.Type is object);
10687Debug.Assert(!IsConditionalState);
10688Debug.Assert(conversionOperand != null);
10689Debug.Assert(targetTypeWithNullability.HasType);
10690Debug.Assert(diagnosticLocation != null);
10691Debug.Assert(conversion.IsUnion);
10692Debug.Assert(conversionOpt is null || targetInstanceSlotOpt < 0);
10701Debug.Assert(conversion.BestUnionConversionAnalysis is { });
10704Debug.Assert(analysis.Kind == UserDefinedConversionAnalysisKind.ApplicableInNormalForm);
10705Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.IsInterface: true }));
10706Debug.Assert(TypeSymbol.Equals(analysis.FromType, analysis.Operator.GetParameterType(0), TypeCompareKind.AllIgnoreOptions));
10707Debug.Assert(TypeSymbol.Equals(targetTypeWithNullability.Type.StrippedType(), analysis.Operator.MethodKind == MethodKind.Constructor ? analysis.Operator.ContainingType : analysis.Operator.ReturnType, TypeCompareKind.AllIgnoreOptions));
10708Debug.Assert(TypeSymbol.Equals(targetTypeWithNullability.Type.StrippedType(), analysis.ToType, TypeCompareKind.AllIgnoreOptions));
10709Debug.Assert(analysis.TargetConversion is { IsIdentity: true } or { IsNullable: true, IsImplicit: true });
10717Debug.Assert(unionConstructionConversion is not null, "Unexpected conversion group structure for union conversion.");
10718Debug.Assert(sourceToParameterConversion is not null || analysis.SourceConversion.IsIdentity);
10722Debug.Assert(conversionOpt is null);
10742Debug.Assert(i < candidates.Length);
10749Debug.Assert(TypeSymbol.Equals(analysis.FromType, parameterType.Type, TypeCompareKind.AllIgnoreOptions));
10750Debug.Assert(TypeSymbol.Equals(toType, analysis.ToType, TypeCompareKind.AllIgnoreOptions));
10768Debug.Assert(operandType.Type is object);
10788Debug.Assert(factory.MethodKind == MethodKind.Constructor);
10793Debug.Assert(factory is { IsStatic: true, ContainingType.IsInterface: true });
10807Debug.Assert(conversionOperand != null);
10809Debug.Assert(containingSlot > 0);
10849Debug.Assert(conversionOpt.ConversionGroupOpt == conversionGroup);
10862Debug.Assert(conversionOpt.ConversionGroupOpt == conversionGroup);
10927Debug.Assert(operandType.Type is object);
10928Debug.Assert(diagnosticLocation != null);
10961Debug.Assert(node.Type.IsDelegateType());
11008Debug.Assert(analysisCompletion is null);
11020Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
11097Debug.Assert(arg.Type is not null);
11116Debug.Assert(arg.Type is not null);
11137Debug.Assert(!IsConditionalState);
11203Debug.Assert(_binder is object);
11212Debug.Assert(receiverParameter is not null);
11246Debug.Assert(delegateTypeOpt?.IsDelegateType() != false);
11314Debug.Assert(!IsConditionalState);
11386Debug.Assert(_getterNullResilienceData is null);
11533Debug.Assert(conversion.Kind == ConversionKind.Deconstruction);
11559Debug.Assert(invocation is object);
11560Debug.Assert(rightResult.Type is object);
11586Debug.Assert(invocation.DefaultArguments.IsNull);
11598Debug.Assert(parameters.Length - offset == n);
11605Debug.Assert(receiverParameter is not null);
11650Debug.Assert(rightParts.Length == n);
11817Debug.Assert(!IsConditionalState);
11845Debug.Assert(reinferenceResult.Member is not null);
11913Debug.Assert(!operandConversion.IsUnion);
12010Debug.Assert(!IsConditionalState);
12038Debug.Assert(reinferenceResult.Member is not null);
12137Debug.Assert(MakeSlot(node) == -1);
12225Debug.Assert(property.Parameters.IsEmpty);
12239Debug.Assert(reinferenceResult.Completion is null);
12256Debug.Assert(property.IsExtensionBlockMember());
12278Debug.Assert(node.ReceiverOpt is not null);
12280Debug.Assert(reinferenceResult.Member is not null);
12319Debug.Assert(node.ReceiverOpt is not null);
12325Debug.Assert(reinferrenceResult.Member is not null);
12399Debug.Assert(!IsConditionalState);
12400Debug.Assert(!member.IsExtensionBlockMember());
12440Debug.Assert(!IsConditionalState);
12487Debug.Assert(containingType.IsNullableType());
12488Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
12509Debug.Assert(node.HasErrors);
12559Debug.Assert(resultType is object);
12609Debug.Assert(!foundMultiple);
12610Debug.Assert(targetTypeWithAnnotations.HasType);
12616Debug.Assert(node.HasErrors);
12623Debug.Assert(node.HasErrors);
12674Debug.Assert(wellKnownSpan is WellKnownType.System_Span_T or WellKnownType.System_ReadOnlySpan_T);
12895Debug.Assert(!IsConditionalState);
13045Debug.Assert(stack.Count > 0);
13073Debug.Assert(leftOperand is not null);
13098Debug.Assert(isAnd || op == BinaryOperatorKind.Or);
13103Debug.Assert(IsConditionalState);
13129Debug.Assert(!isBool);
13202Debug.Assert(placeholder is object);
13257Debug.Assert(!this.IsConditionalState);
13277Debug.Assert(!this.IsConditionalState);
13296Debug.Assert(node.Type.SpecialType == SpecialType.System_Boolean);
13348Debug.Assert(node.Type.SpecialType == SpecialType.System_RuntimeArgumentHandle);
13356Debug.Assert(node.Type is null);
13363Debug.Assert(!IsConditionalState);
13371Debug.Assert(!IsConditionalState);
13380Debug.Assert(node.WasCompilerGenerated);
13388Debug.Assert(node.WasCompilerGenerated);
13427Debug.Assert(node.Type.IsDynamic());
13446Debug.Assert(node.Type.IsDynamic());
13447Debug.Assert(node.Type.IsReferenceType);
13457Debug.Assert(!IsConditionalState);
13553Debug.Assert(node.Type.IsDynamic());
13566Debug.Assert(!this.IsConditionalState);
13697Debug.Assert(node.Type is null || node.Type.IsErrorType() || node.Type.IsRefLikeType);
13717Debug.Assert(node.Type is not null);
13896Debug.Assert(node.AwaitableInstancePlaceholder is not null);
13900Debug.Assert(node.RuntimeAsyncAwaitCallPlaceholder is not null);
13906Debug.Assert(node.GetResult is null);
13937Debug.Assert(ResultType is TypeWithState { Type: FunctionPointerTypeSymbol { }, State: NullableFlowState.NotNull });
14009Debug.Assert(!otherIsConditional);
14146Debug.Assert(Id == variables.Container!.Id);
14205Debug.Assert(state.Id > id);
14219Debug.Assert(Id < variables.Id);
14265Debug.Assert(Id > id);
14278Debug.Assert(index < Capacity);
14280Debug.Assert((_state[index], _state[index + 1]) != (false, false));
14297Debug.Assert(Id > id);
14352Debug.Assert(Id == other.Id);
14359Debug.Assert(_state.Capacity == other._state.Capacity);
14381Debug.Assert(Id == other.Id);
14388Debug.Assert(_state.Capacity == other._state.Capacity);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (74)
118Debug.Assert(node.Type.SpecialType == SpecialType.System_String, "Non-string binary addition should have been handled by VisitConversion or VisitArguments");
125Debug.Assert(applyParentUnaryOperator is null);
131Debug.Assert(applyParentUnaryOperator is null);
147Debug.Assert(stack.Count >= 1);
169Debug.Assert(node.OperatorKind == BinaryOperatorKind.StringConcatenation);
170Debug.Assert(node.InterpolatedStringHandlerData is not null);
209Debug.Assert(oldNode == null || (oldNode.Syntax == syntax));
234Debug.Assert(!isPointerElementAccess);
242Debug.Assert(method is null);
340Debug.Assert(loweredLeft.Type is { });
341Debug.Assert(loweredRight.Type is { });
354Debug.Assert(loweredLeft.Type is { });
355Debug.Assert(loweredRight.Type is { });
368Debug.Assert(loweredLeft.Type is { });
369Debug.Assert(loweredRight.Type is { });
539Debug.Assert(!operatorKind.IsDynamic());
577Debug.Assert(loweredLeft.Type is { });
614Debug.Assert(operatorKind.Operator() == BinaryOperatorKind.And || operatorKind.Operator() == BinaryOperatorKind.Or);
631Debug.Assert(applyParentUnaryOperator == null || applyParentUnaryOperator.OperatorKind == testOperator);
637Debug.Assert(leftTruthOperator == null);
712Debug.Assert(temp is { });
737Debug.Assert(leftTruthOperator == null);
750Debug.Assert(leftTruthOperator == null);
768Debug.Assert(leftTruthOperator != null);
772Debug.Assert(conversion.IsImplicit);
795Debug.Assert(!operatorKind.IsLogical());
803Debug.Assert(method is { });
804Debug.Assert(TypeSymbol.Equals(method.ReturnType, type, TypeCompareKind.ConsiderEverything2));
822Debug.Assert(left != null);
823Debug.Assert(right != null);
865Debug.Assert(nonNull is { });
909Debug.Assert(expression.Type is { });
932Debug.Assert(expression.Type is { });
946Debug.Assert(expression.Type is { });
1023Debug.Assert(yNonNull is null, "Handled by trivial optimization above; otherwise we should use yNonNull here.");
1036Debug.Assert(xNonNull is null, "Handled by trivial optimization above; otherwise we should use xNonNull here.");
1324Debug.Assert(left != null);
1325Debug.Assert(right != null);
1392Debug.Assert(!(leftAlwaysNull && rightAlwaysNull)); // We've already optimized this case.
1633Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
1634Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
1635Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
1685Debug.Assert(!(leftAlwaysNull && rightAlwaysNull)); // We've already optimized this case.
1708Debug.Assert(alwaysNull.Type is { });
1750Debug.Assert(conditionalExpression.Type is { });
1784Debug.Assert(leftNonNull == null || rightNonNull == null); // We've already optimized the case where they are both non-null.
1785Debug.Assert(!NullableNeverHasValue(left) && !NullableNeverHasValue(right)); // We've already optimized the case where one is null.
1926Debug.Assert(nullableType2 is { });
1958Debug.Assert(loweredLeft != null);
1959Debug.Assert(loweredRight != null);
1960Debug.Assert((object)returnType != null);
1961Debug.Assert(returnType.SpecialType == SpecialType.System_Boolean);
1962Debug.Assert(loweredLeft.IsLiteralNull() != loweredRight.IsLiteralNull());
2022Debug.Assert((object)method != null);
2047Debug.Assert((object)method != null);
2059Debug.Assert(loweredLeft.Type is { SpecialType: SpecialType.System_Decimal });
2060Debug.Assert(loweredRight.Type is { SpecialType: SpecialType.System_Decimal });
2083Debug.Assert((object)method != null);
2090Debug.Assert((operatorKind == BinaryOperatorKind.Equal) || (operatorKind == BinaryOperatorKind.NotEqual) ||
2096Debug.Assert(
2156Debug.Assert(loweredRight.Type is { });
2158Debug.Assert(rightType.SpecialType == SpecialType.System_Int32);
2223Debug.Assert(loweredLeft.Type is { });
2225Debug.Assert(leftType.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr);
2228Debug.Assert(loweredRight.Type is { });
2230Debug.Assert(rightType.SpecialType == SpecialType.System_Int32);
2279Debug.Assert(loweredLeft.Type is { TypeKind: TypeKind.Pointer });
2284Debug.Assert(loweredRight.Type is { TypeKind: TypeKind.Pointer });
2290Debug.Assert(kind.Operator() == BinaryOperatorKind.Addition);
2324Debug.Assert(sizeOfExpression.Type is { SpecialType: SpecialType.System_Int32 });
2334Debug.Assert(numericOperand.Type is { });
2471Debug.Assert(loweredLeft.Type is { TypeKind: TypeKind.Pointer });
2472Debug.Assert(loweredRight.Type is { TypeKind: TypeKind.Pointer });
2473Debug.Assert(returnType.SpecialType == SpecialType.System_Int64);
Lowering\LocalRewriter\LocalRewriter_Call.cs (101)
43Debug.Assert(methodGroup.ReceiverOpt == null || methodGroup.ReceiverOpt.Kind != BoundKind.TypeOrValueExpression);
49Debug.Assert(node.ApplicableMethods.All(m => !m.RequiresInstanceReceiver && TypeSymbol.Equals(m.ContainingType, firstContainer, TypeCompareKind.ConsiderEverything2)));
56Debug.Assert(_factory.CurrentType is { });
57Debug.Assert(!_factory.CurrentType.IsExtension); // When binding a simple name for a call, you cannot get a member inside an extension type
86Debug.Assert(loweredReceiver != null);
163Debug.Assert(nameSyntax != null);
164Debug.Assert(interceptor.IsDefinition);
165Debug.Assert(!interceptor.ContainingType.IsGenericType);
201Debug.Assert(containingMethod is not null);
214Debug.Assert(receiverOpt is not BoundTypeExpression || method.IsStatic);
289Debug.Assert(methodThisParameter is not null);
290Debug.Assert(receiverOpt?.Type is not null);
296Debug.Assert(receiverOpt.Type.Equals(interceptor.Parameters[0].Type, TypeCompareKind.AllIgnoreOptions)
324Debug.Assert(argumentRefKindsOpt.All(static refKind => refKind == RefKind.None));
340Debug.Assert(node != null);
391Debug.Assert(invokedAsExtensionMethod && !arguments.IsEmpty);
448Debug.Assert(node.ReceiverOpt is null);
474Debug.Assert(rewrittenArguments.Length == 2);
527Debug.Assert(rewrittenBoundCall.Type is not null);
575Debug.Assert(!IsCapturedPrimaryConstructorParameter(expression));
629Debug.Assert(false, "Not expected to survive lowering.");
637Debug.Assert(false, "Unexpected conversion kind" + conv.ConversionKind);
681Debug.Assert(argumentRefKindsOpt.IsDefault || argumentRefKindsOpt.Length == arguments.Length);
683Debug.Assert(!requiresInstanceReceiver || rewrittenReceiver != null || _inExpressionLambda);
684Debug.Assert(!forceReceiverCapturing || (requiresInstanceReceiver && rewrittenReceiver != null && storesOpt is object));
685Debug.Assert(!forceReceiverCapturing || methodOrIndexer is PropertySymbol);
693Debug.Assert(!_inExpressionLambda);
694Debug.Assert(rewrittenReceiver is object);
695Debug.Assert(rewrittenReceiver.Type is { });
702Debug.Assert(refKind != RefKind.Ref ||
749Debug.Assert(!rewrittenReceiver.Type.IsReferenceType);
750Debug.Assert(!rewrittenReceiver.Type.IsValueType);
751Debug.Assert(rewrittenReceiver.Type.IsTypeParameter());
753Debug.Assert(IsPossibleReferenceTypeReceiverOfConstrainedOrExtensionCall(methodOrIndexer, capturedReceiver));
754Debug.Assert(!CodeGenerator.ReceiverIsKnownToReferToTempIfReferenceType(capturedReceiver));
771Debug.Assert(capturedReceiver is BoundLocal);
772Debug.Assert(assignmentToTemp is object);
845Debug.Assert(tempsOpt is object);
846Debug.Assert(storesOpt is object);
862Debug.Assert(!ownStoresOpt);
890Debug.Assert(!_inExpressionLambda);
895Debug.Assert(!((BoundConversion)argument).ExplicitCastInCode);
901Debug.Assert(!argumentsAssignedToTemp.IsNull);
907Debug.Assert(argIndex < argumentIndex);
914Debug.Assert(usesReceiver(argument));
915Debug.Assert(requiresInstanceReceiver);
916Debug.Assert(capturedReceiver is object);
930Debug.Assert(visitedArgumentsBuilder[argIndex] != null);
968Debug.Assert(!((BoundConversion)argument).ExplicitCastInCode);
986Debug.Assert(rewrittenReceiver is not BoundArrayAccess ||
1026Debug.Assert(refKind != RefKind.Ref ||
1034Debug.Assert(rewrittenReceiver.Type is { });
1035Debug.Assert(methodOrIndexer.ContainingType.ExtensionParameter is { });
1083Debug.Assert(refKind != RefKindExtensions.StrictIn);
1087Debug.Assert(refKind is RefKind.Ref);
1095Debug.Assert(receiver is BoundArrayAccess { Type.IsReferenceType: false } or BoundLocal);
1096Debug.Assert(receiver is not BoundArrayAccess { Expression: var array, Indices: var indices } ||
1098Debug.Assert(assignmentToTemp is not null == receiver is BoundLocal);
1099Debug.Assert(assignmentToTemp?.IsRef != false);
1100Debug.Assert(assignmentToTemp is null ||
1106Debug.Assert(receiverType is object);
1125Debug.Assert(assignmentToTemp is not null);
1132Debug.Assert(receiver is BoundArrayAccess);
1133Debug.Assert(assignmentToTemp is null);
1157Debug.Assert(SpillSequenceSpiller.IsComplexConditionalInitializationOfReceiverRef(assignmentToTemp, out _, out _, out _, out _));
1161Debug.Assert(assignmentToTemp is not null);
1182Debug.Assert(CodeGenerator.ReceiverIsKnownToReferToTempIfReferenceType(result));
1209Debug.Assert(rewrittenArguments.All(arg => arg is not BoundDiscardExpression), "Discards should have been substituted by VisitArguments");
1214Debug.Assert(expanded ? rewrittenArguments.Length == parameters.Length : rewrittenArguments.Length >= parameters.Length);
1215Debug.Assert(rewrittenArguments.Count(a => a.IsParamsArrayOrCollection) <= (expanded ? 1 : 0));
1321Debug.Assert(actualArguments.All(static arg => arg is not null));
1372Debug.Assert(argumentRefKindsOpt.IsDefault || argumentRefKindsOpt.Length >= parameters.Length);
1381Debug.Assert(!argumentRefKindsOpt.IsEmpty);
1403Debug.Assert(initialArgRefKind is RefKind.None or RefKind.In or RefKind.Ref);
1418Debug.Assert(comRefKindMismatchPossible);
1442Debug.Assert(rewrittenArguments.Length == methodOrIndexer.GetParameterCount() + 1);
1443Debug.Assert(argsToParamsOpt.IsDefault);
1470Debug.Assert(methodOrIndexer.ContainingType.ExtensionParameter is not null);
1493Debug.Assert(paramsArray.IsParamsArrayOrCollection);
1547Debug.Assert(refKinds.Count == arguments.Length);
1548Debug.Assert(storesToTemps.Count == 0);
1549Debug.Assert(rewrittenArguments.Length == parameters.Length);
1550Debug.Assert(rewrittenArguments.Count(a => a.IsParamsArrayOrCollection) <= (expanded ? 1 : 0));
1559Debug.Assert(arguments[p] == null);
1563Debug.Assert(expanded);
1564Debug.Assert(p == parameters.Length - 1);
1565Debug.Assert(argRefKind == RefKind.None);
1584Debug.Assert(arguments[p].IsParamsArrayOrCollection);
1679Debug.Assert(arguments != null);
1680Debug.Assert(storesToTemps != null);
1681Debug.Assert(temporariesBuilder != null);
1708Debug.Assert(arguments != null);
1709Debug.Assert(tempStores != null);
1749Debug.Assert(firstUnclaimedStore == tempStores.Count, "not all side-effects were claimed");
1775Debug.Assert(value.Type is { });
1827Debug.Assert(actualArguments != null);
1828Debug.Assert(actualArguments.Length == parameters.Length);
1830Debug.Assert(argsRefKindsBuilder != null);
1831Debug.Assert(argsRefKindsBuilder.Count == parameters.Length);
1857Debug.Assert(localRefKind == RefKind.None);
1884Debug.Assert(node.TypeArgumentsOpt.IsDefault);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (117)
25Debug.Assert(node.Type is NamedTypeSymbol { IsInterpolatedStringHandlerType: true });
39Debug.Assert(node.Operand is BoundConvertedSwitchExpression { WasTargetTyped: true });
43Debug.Assert(node.Operand is BoundConditionalOperator { WasTargetTyped: true });
47Debug.Assert(node.Operand is not null);
52Debug.Assert(node.Operand is BoundObjectCreationExpressionBase { WasTargetTyped: true });
56Debug.Assert(node.Operand is BoundObjectCreationExpressionBase { WasTargetTyped: true } or
82Debug.Assert(result.Type!.Equals(toType, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
94Debug.Assert(node.Type is not null);
95Debug.Assert(_compilation.IsReadOnlySpanType(node.Type));
97Debug.Assert(byteType.SpecialType == SpecialType.System_Byte);
142Debug.Assert(byteArray.IsSZArray);
143Debug.Assert(byteArray.ElementType.SpecialType == SpecialType.System_Byte);
166Debug.Assert(node.OperatorKind is BinaryOperatorKind.Utf8Addition);
194Debug.Assert(utf8Addition.OperatorKind is BinaryOperatorKind.Utf8Addition);
224Debug.Assert(rewrittenNode.Type is { });
271Debug.Assert(result.Type is { } rt && rt.Equals(rewrittenType, TypeCompareKind.AllIgnoreOptions));
306Debug.Assert(oldNodeOpt == null || oldNodeOpt.Syntax == syntax);
307Debug.Assert(rewrittenType is { });
308Debug.Assert(_factory.ModuleBuilderOpt is { });
309Debug.Assert(_diagnostics.DiagnosticBag is { });
319Debug.Assert(rewrittenOperand.Type is { });
433Debug.Assert(rewrittenOperand.Type is { });
448Debug.Assert(rewrittenOperand.Type is { });
451Debug.Assert(rewrittenOperand.Type.Equals(rewrittenType, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
494Debug.Assert(rewrittenOperand.Type is { });
504Debug.Assert(rewrittenOperand.Type.IsEnumType());
515Debug.Assert(rewrittenType.IsEnumType());
541Debug.Assert(conversion.Method is null);
542Debug.Assert(!conversion.IsExtensionMethod);
543Debug.Assert(constantValueOpt == null);
560Debug.Assert(symbolOpt is { });
570Debug.Assert(oldNodeOpt is { });
573Debug.Assert(method is { });
577Debug.Assert(receiver is { });
584Debug.Assert(_factory.TopLevelMethod is { });
602Debug.Assert(rewrittenOperand.Type is not null);
613Debug.Assert(spanType.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.AllIgnoreOptions));
629Debug.Assert(sourceType is not null);
642Debug.Assert(parameterType.IsSZArray());
643Debug.Assert(rewrittenOperand.Type?.IsSZArray() == true);
645Debug.Assert(c.IsImplicit || conversion.IsExplicit);
646Debug.Assert(c.IsReference || c.IsIdentity);
660Debug.Assert(destinationType.IsReadOnlySpan());
661Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
670Debug.Assert(implicitOperator.ParameterTypesWithAnnotations[0].Type.Equals(rewrittenOperand.Type, TypeCompareKind.AllIgnoreOptions));
692Debug.Assert(destinationType.IsReadOnlySpan());
693Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
694Debug.Assert(Binder.NeedsSpanCastUp(sourceType, destinationType));
704Debug.Assert(method.ParameterTypesWithAnnotations[0].Type.Equals(rewrittenOperand.Type, TypeCompareKind.AllIgnoreOptions));
711Debug.Assert(destinationType.IsReadOnlySpan());
712Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
719Debug.Assert(method.Parameters[0].Type.IsStringType());
720Debug.Assert(rewrittenOperand.Type?.IsStringType() == true);
757Debug.Assert(_factory.ModuleBuilderOpt is { });
770Debug.Assert((object)target != null);
832Debug.Assert(rewrittenOperand.Type is { });
864Debug.Assert(conversion.IsValid);
889Debug.Assert(conversion.Method is { });
890Debug.Assert(conversion.BestUserDefinedConversionAnalysis is { });
916Debug.Assert(rewrittenOperand.Type is { });
956Debug.Assert(conversion.IsValid);
957Debug.Assert(conversion.BestUnionConversionAnalysis is { });
961Debug.Assert(analysis.Kind == UserDefinedConversionAnalysisKind.ApplicableInNormalForm);
962Debug.Assert(analysis.Operator is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.IsInterface: true }));
963Debug.Assert(TypeSymbol.Equals(analysis.FromType, analysis.Operator.GetParameterType(0), TypeCompareKind.AllIgnoreOptions));
964Debug.Assert(TypeSymbol.Equals(rewrittenType.StrippedType(), analysis.Operator.MethodKind == MethodKind.Constructor ? analysis.Operator.ContainingType : analysis.Operator.ReturnType, TypeCompareKind.AllIgnoreOptions));
965Debug.Assert(TypeSymbol.Equals(rewrittenType.StrippedType(), analysis.ToType, TypeCompareKind.AllIgnoreOptions));
966Debug.Assert(analysis.TargetConversion is { IsIdentity: true } or { IsNullable: true, IsImplicit: true });
970Debug.Assert(!analysis.SourceConversion.IsIdentity);
979Debug.Assert(TypeSymbol.Equals(rewrittenOperand.Type, analysis.Operator.GetParameterType(0), TypeCompareKind.AllIgnoreOptions));
986Debug.Assert(TypeSymbol.Equals(rewrittenOperand.Type, analysis.ToType, TypeCompareKind.AllIgnoreOptions));
990Debug.Assert(!analysis.TargetConversion.IsIdentity);
999Debug.Assert(TypeSymbol.Equals(rewrittenOperand.Type, rewrittenType, TypeCompareKind.AllIgnoreOptions));
1023Debug.Assert(rewrittenOperand.Type is { });
1064Debug.Assert(expression.Type is { });
1111Debug.Assert((object)rewrittenType != null);
1119Debug.Assert(rewrittenOperandType is { });
1120Debug.Assert(rewrittenType.IsNullableType() || rewrittenOperandType.IsNullableType());
1167Debug.Assert((object)rewrittenType != null);
1168Debug.Assert(rewrittenOperand.Type is { });
1170Debug.Assert(rewrittenType.IsNullableType() || rewrittenOperandType.IsNullableType());
1293Debug.Assert(conversion.Method is { });
1313Debug.Assert(operand != null);
1314Debug.Assert((object)type != null);
1382Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
1383Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
1384Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
1415Debug.Assert(conversion.Method is { } && !conversion.Method.ReturnsVoid && conversion.Method.ParameterCount == 1);
1416Debug.Assert(rewrittenOperand.Type is { });
1448Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2));
1456Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2));
1471Debug.Assert(rewrittenOperand.Type is { });
1487Debug.Assert((object)rewrittenType != null);
1488Debug.Assert(rewrittenOperand.Type.IsNullableType());
1519Debug.Assert(conversion.Method is { });
1559Debug.Assert(conversion.IsUnion);
1560Debug.Assert(conversion.Method is { ParameterCount: 1 } and ({ MethodKind: MethodKind.Constructor } or { MethodKind: MethodKind.Ordinary, IsStatic: true, ContainingType.IsInterface: true }));
1561Debug.Assert(rewrittenOperand.Type is { });
1562Debug.Assert(!_inExpressionLambda);
1563Debug.Assert(conversion.Method.Parameters[0].Type.Equals(rewrittenOperand.Type, TypeCompareKind.AllIgnoreOptions));
1602Debug.Assert(rewrittenOperand != null);
1603Debug.Assert((object)rewrittenType != null);
1604Debug.Assert(rewrittenOperand.Type is { });
1605Debug.Assert(!_compilation.Assembly.RuntimeSupportsNumericIntPtr);
1618Debug.Assert(!method.ReturnsVoid);
1619Debug.Assert(method.ParameterCount == 1);
1625Debug.Assert(target.IsNullableType());
1651Debug.Assert((object)source != null);
1652Debug.Assert((object)target != null);
1811Debug.Assert(fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal);
1830Debug.Assert(operand.Type is { });
1861Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2));
1878Debug.Assert(meth is { });
1914Debug.Assert(!_compilation.Assembly.RuntimeSupportsNumericIntPtr);
1945Debug.Assert(underlying is { });
1958Debug.Assert(underlying is { });
1990Debug.Assert(!meth.ContainingType.IsInterface);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (99)
70Debug.Assert(node.AccessorKind != AccessorKind.Unknown);
71Debug.Assert(node.Indexer.IsIndexer || node.Indexer.IsIndexedProperty);
72Debug.Assert((object?)node.Indexer.GetOwnOrInheritedGetMethod() != null);
80Debug.Assert(indexer.IsIndexer || indexer.IsIndexedProperty);
81Debug.Assert(node.AccessorKind != AccessorKind.Unknown);
82Debug.Assert(isLeftOfAssignment || (node.AccessorKind != AccessorKind.Set));
86Debug.Assert(rewrittenReceiver is { });
117Debug.Assert(oldNode is BoundIndexerAccess or BoundObjectInitializerMember);
118Debug.Assert(arguments.Length != 0);
119Debug.Assert(rewrittenReceiver is { });
124Debug.Assert(oldNode.Type is not null);
125Debug.Assert(oldNode.Type.Equals(type, TypeCompareKind.ConsiderEverything));
162Debug.Assert(getMethod is not null);
199Debug.Assert(storesOpt is { });
220Debug.Assert(call.Type is not null);
224Debug.Assert(sideEffects.IsEmpty);
242Debug.Assert(_factory.ModuleBuilderOpt is { });
243Debug.Assert(_diagnostics.DiagnosticBag is { });
244Debug.Assert(node.Expression.Type is object);
245Debug.Assert(node.Argument.Type is object);
257Debug.Assert(getItemOrSliceHelper is object);
268Debug.Assert(length > 0);
281Debug.Assert(receiverStore is null);
282Debug.Assert(Binder.IsWellKnownSystemRange(node.Argument.Type, _compilation));
296Debug.Assert(!startOnlyOverload.IsExtensionBlockMember());
324Debug.Assert(rewrittenRangeArg is not null);
388Debug.Assert(node.Expression.Type is object);
405Debug.Assert(node.Expression.Type is object);
406Debug.Assert(index.Type?.SpecialType == SpecialType.System_Int32);
423Debug.Assert(node.GetItemOrSliceHelper is WellKnownMember.System_ReadOnlySpan_T__get_Item);
442Debug.Assert(node.GetItemOrSliceHelper is WellKnownMember.System_ReadOnlySpan_T__get_Item);
452Debug.Assert(index.ConstantValueOpt is null); // Binder should have reported an error due to index out of bounds, or should have handled by code above.
507Debug.Assert(Binder.IsWellKnownSystemRange(argumentType, _compilation));
508Debug.Assert(!isLeftOfAssignment || node.IndexerOrSliceAccess.GetRefKind() == RefKind.Ref);
542Debug.Assert(node.ArgumentPlaceholders.Length == 1);
543Debug.Assert(node.IndexerOrSliceAccess is BoundIndexerAccess or BoundArrayAccess);
545Debug.Assert(TypeSymbol.Equals(
563Debug.Assert(receiver.Type is { });
577Debug.Assert(!receiver.Type.IsReferenceType);
578Debug.Assert(!receiver.Type.IsValueType);
579Debug.Assert(receiver.Type.IsTypeParameter());
581Debug.Assert(node.LengthOrCountAccess.ExpressionSymbol is not null);
582Debug.Assert(node.IndexerOrSliceAccess.ExpressionSymbol is not null);
583Debug.Assert(IsPossibleReferenceTypeReceiverOfConstrainedOrExtensionCall(node.LengthOrCountAccess.ExpressionSymbol, capturedReceiver));
584Debug.Assert(IsPossibleReferenceTypeReceiverOfConstrainedOrExtensionCall(node.IndexerOrSliceAccess.ExpressionSymbol, capturedReceiver));
585Debug.Assert(!CodeGenerator.ReceiverIsKnownToReferToTempIfReferenceType(capturedReceiver));
604Debug.Assert(node.LengthOrCountAccess.ExpressionSymbol is not null);
605Debug.Assert(node.IndexerOrSliceAccess.ExpressionSymbol is not null);
615Debug.Assert(capturedReceiver.Type is { IsReferenceType: false, IsValueType: false });
629Debug.Assert(capturedReceiver is BoundArrayAccess);
670Debug.Assert(node.ArgumentPlaceholders.Length == 1);
672Debug.Assert(integerArgument.Type!.SpecialType == SpecialType.System_Int32);
678Debug.Assert(indexerAccess.Arguments.Length == 1);
695Debug.Assert(locals is not null);
762Debug.Assert(lengthAccess is not null);
766Debug.Assert(loweredExpr is not null);
767Debug.Assert(lengthAccess is not null);
768Debug.Assert(loweredExpr.Type!.SpecialType == SpecialType.System_Int32);
778Debug.Assert(loweredExpr is not null);
779Debug.Assert(loweredExpr.Type!.SpecialType == SpecialType.System_Int32);
783Debug.Assert(loweredExpr is not null);
784Debug.Assert(lengthAccess is not null);
785Debug.Assert(Binder.IsWellKnownSystemIndex(loweredExpr.Type, _compilation));
815Debug.Assert(TypeSymbol.Equals(
824Debug.Assert(hatExpression.Operand is { Type: { SpecialType: SpecialType.System_Int32 } });
877Debug.Assert(receiver.Type is not null);
885Debug.Assert(node.ArgumentPlaceholders.Length == 2);
886Debug.Assert(node.IndexerOrSliceAccess is BoundCall);
888Debug.Assert(Binder.IsWellKnownSystemRange(node.Argument.Type, _compilation));
912Debug.Assert(receiver.Type is { });
926Debug.Assert(!receiver.Type.IsReferenceType);
927Debug.Assert(!receiver.Type.IsValueType);
928Debug.Assert(receiver.Type.IsTypeParameter());
930Debug.Assert(node.LengthOrCountAccess.ExpressionSymbol is not null);
931Debug.Assert(node.IndexerOrSliceAccess.ExpressionSymbol is not null);
932Debug.Assert(IsPossibleReferenceTypeReceiverOfConstrainedOrExtensionCall(node.LengthOrCountAccess.ExpressionSymbol, capturedReceiver));
933Debug.Assert(IsPossibleReferenceTypeReceiverOfConstrainedOrExtensionCall(node.IndexerOrSliceAccess.ExpressionSymbol, capturedReceiver));
934Debug.Assert(!CodeGenerator.ReceiverIsKnownToReferToTempIfReferenceType(capturedReceiver));
953Debug.Assert(node.LengthOrCountAccess.ExpressionSymbol is not null);
954Debug.Assert(node.IndexerOrSliceAccess.ExpressionSymbol is not null);
963Debug.Assert(capturedReceiver.Type is { IsReferenceType: false, IsValueType: false });
977Debug.Assert(capturedReceiver is BoundArrayAccess);
995Debug.Assert(startStrategy is not PatternIndexOffsetLoweringStrategy.Length);
996Debug.Assert(endMakeOffsetInput is not null || endStrategy == PatternIndexOffsetLoweringStrategy.Length);
1003Debug.Assert(!startOnlyOverload.IsExtensionBlockMember());
1008Debug.Assert(startMakeOffsetInput is not null);
1020Debug.Assert(!needSpecialExtensionReceiverReadOrder);
1084Debug.Assert(startStrategy != PatternIndexOffsetLoweringStrategy.Zero || (rewriteFlags & captureStartOffset) == 0);
1085Debug.Assert((rewriteFlags & captureEndOffset) == 0 || (rewriteFlags & captureStartOffset) != 0 || startStrategy == PatternIndexOffsetLoweringStrategy.Zero);
1086Debug.Assert((rewriteFlags & captureStartOffset) == 0 || (rewriteFlags & captureEndOffset) != 0 || endStrategy == PatternIndexOffsetLoweringStrategy.Length);
1087Debug.Assert(endStrategy != PatternIndexOffsetLoweringStrategy.Length || (rewriteFlags & captureEndOffset) == 0);
1088Debug.Assert((rewriteFlags & captureLength) == 0 || (rewriteFlags & useLength) != 0);
1092Debug.Assert(startMakeOffsetInput is not null);
1098Debug.Assert(endMakeOffsetInput is not null);
1135Debug.Assert(rewrittenRangeArg is not null);
1139Debug.Assert(node.ArgumentPlaceholders.Length == 2);
1220Debug.Assert(startLengthOverload.Name == startOverload.Name
1250Debug.Assert(methodDefinition.IsDefinition);
1261Debug.Assert(startLengthOverload.Name == startOverload.Name
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (42)
38Debug.Assert(false); // these should have been represented as a BoundIncrementOperator
85Debug.Assert((kind == UnaryOperatorKind.DynamicTrue || kind == UnaryOperatorKind.DynamicFalse) && type.SpecialType == SpecialType.System_Boolean
87Debug.Assert(method is null);
113Debug.Assert(method is { });
114Debug.Assert(TypeSymbol.Equals(type, method.ReturnType, TypeCompareKind.ConsiderEverything2));
134Debug.Assert(underlyingType is { });
277Debug.Assert(result.Type is { });
328Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
329Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
330Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
407Debug.Assert(node.MethodOpt is { });
408Debug.Assert(node.OperandConversion is null || (node.Operand.Type!.IsReferenceType && node.MethodOpt.IsExtensionBlockMember()));
414Debug.Assert(node.Type.IsVoidType());
422Debug.Assert(operandType is { });
423Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.AllIgnoreOptions));
451Debug.Assert(node.OperandConversion is null);
459Debug.Assert(operandType is { });
467Debug.Assert(TypeSymbol.Equals(operandType, transformedLHS.Type, TypeCompareKind.AllIgnoreOptions));
588Debug.Assert(operandType is { });
589Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.ConsiderEverything2));
625Debug.Assert(transformedLHS is not BoundPropertyAccess);
641Debug.Assert(!IsCapturedPrimaryConstructorParameter(expression));
661Debug.Assert(boundTemp.Type is not null);
701Debug.Assert(boundTemp.Type is not null);
704Debug.Assert(tempValue.Type is { });
760Debug.Assert(placeholder is not null);
793Debug.Assert(node.MethodOpt is { });
794Debug.Assert(node.MethodOpt.ParameterCount == 1);
805Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2));
902Debug.Assert(constantOne != null);
903Debug.Assert(constantOne.SpecialType != SpecialType.None);
904Debug.Assert(binaryOperandType.SpecialType != SpecialType.None);
905Debug.Assert(binaryOperatorKind.OperandTypes() != 0);
932Debug.Assert(binaryOperatorKind.OperandTypes() == BinaryOperatorKind.PointerAndInt);
933Debug.Assert(binaryOperand.Type is { TypeKind: TypeKind.Pointer });
934Debug.Assert(boundOne.Type is { SpecialType: SpecialType.System_Int32 });
980Debug.Assert((object)method != null); // Should have been checked during Warnings pass
987Debug.Assert(operand.Type is { SpecialType: SpecialType.System_Decimal });
994Debug.Assert(operand.Type is { } && operand.Type.IsNullableType() && operand.Type.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal);
1180Debug.Assert(underlyingType is { });
1185Debug.Assert(underlyingType.IsEnumType());
1187Debug.Assert(underlyingType is { });
Parser\Lexer.cs (52)
120Debug.Assert(options != null);
329Debug.Assert(info.Kind != SyntaxKind.IdentifierToken || info.StringValue != null);
411Debug.Assert(SyntaxFacts.IsPunctuationOrKeyword(info.Kind));
614Debug.Assert(TextWindow.PeekChar() == '@');
738Debug.Assert(TextWindow.PeekChar() == '@');
764Debug.Assert(TextWindow.PeekChar() == '$');
1037Debug.Assert(info.Text != null);
1135Debug.Assert(hasUSuffix && hasLSuffix);
1600Debug.Assert(string.Equals(info.Text.Substring(0, objectAddressOffset + 1), "@0x", StringComparison.OrdinalIgnoreCase));
1636Debug.Assert(InXmlCrefOrNameAttributeValue);
1695Debug.Assert(consumedSurrogate == SlidingTextWindow.InvalidCharacter, "Since consumedChar == '\\'");
2070Debug.Assert(firstCh is '<' or '|' or '=' or '>');
2210Debug.Assert(delimiter is '/' or '@');
2211Debug.Assert(TextWindow.PeekChar() == delimiter && TextWindow.PeekChar(1) == '*');
2277Debug.Assert(SyntaxFacts.IsWhitespace(TextWindow.PeekChar()));
2312Debug.Assert(this.CurrentLexemeWidth > 0);
2712Debug.Assert(info.Kind != SyntaxKind.None || info.Text != null);
2807Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.PeekChar() == SlidingTextWindow.InvalidCharacter);
2843Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Start));
2844Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Exterior));
2888Debug.Assert(info.Kind != SyntaxKind.None || info.Text != null);
2902Debug.Assert(TextWindow.PeekChar() == '<');
2951Debug.Assert(TextWindow.PeekChar() == '&');
3210Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Start));
3211Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Exterior));
3278Debug.Assert(false, "Should have picked up leading indentationTrivia, but didn't.");
3294Debug.Assert(false, "Should have picked up leading indentationTrivia, but didn't.");
3306Debug.Assert(info.Kind != SyntaxKind.None || info.Text != null);
3383Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Start));
3384Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Exterior));
3450Debug.Assert(info.Kind != SyntaxKind.None || info.Text != null);
3541Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Start));
3542Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Exterior));
3601Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Start));
3602Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Exterior));
3686Debug.Assert(TextWindow.Position > beforeConsumed, "First character or entity has been consumed.");
3797Debug.Assert(info.Text == null, "Haven't tried to set it yet.");
3798Debug.Assert(info.StringValue == null, "Haven't tried to set it yet.");
3886Debug.Assert(info.Kind != SyntaxKind.None || info.Text != null);
4007Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Start));
4008Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Exterior));
4129Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Start));
4130Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Exterior));
4260Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Start));
4261Debug.Assert(!this.LocationIs(XmlDocCommentLocation.Exterior));
4472Debug.Assert(this.StyleIs(XmlDocCommentStyle.Delimited));
4601Debug.Assert(info == null, "Never produce a diagnostic while peeking.");
4609Debug.Assert(ch != SlidingTextWindow.InvalidCharacter, "Precondition established by all callers; required for correctness of AdvanceChar() call.");
4637Debug.Assert(character == '\\');
4687Debug.Assert(character == 'u' || character == 'x');
4741Debug.Assert(TextWindow.PeekChar() == '&');
4855Debug.Assert(codepoint > 0x0000FFFF && codepoint <= 0x0010FFFF);
Symbols\Metadata\PE\PEMethodSymbol.cs (31)
129Debug.Assert((long)value == ((long)value & MethodKindMask));
178Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
185Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
191Debug.Assert((long)methodKind == ((long)methodKind & MethodKindMask));
193Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
203Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
258Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
422Debug.Assert((object)moduleSymbol != null);
423Debug.Assert((object)containingType != null);
424Debug.Assert(!methodDef.IsNil);
436Debug.Assert((uint)implFlags <= ushort.MaxValue);
449Debug.Assert((uint)localflags <= ushort.MaxValue);
475Debug.Assert(flag != 0 && ((ushort)flag & ((ushort)flag - 1)) == 0);
633Debug.Assert(_packedFlags.IsExplicitOverrideIsPopulated);
646Debug.Assert(_packedFlags.IsExplicitOverrideIsPopulated);
711Debug.Fail("Not expecting to get here; if we end up here through ENC, add tests to verify");
742Debug.Assert(!memberNotNull.IsDefault);
750Debug.Assert(!memberNotNullWhenTrue.IsDefault);
756Debug.Assert(!memberNotNullWhenFalse.IsDefault);
817Debug.Assert((methodKind == MethodKind.PropertyGet) || (methodKind == MethodKind.PropertySet));
827Debug.Assert((methodKind == MethodKind.EventAdd) || (methodKind == MethodKind.EventRemove));
835Debug.Assert(TypeSymbol.Equals(propertyOrEventSymbol.ContainingType, _containingType, TypeCompareKind.ConsiderEverything2));
843Debug.Assert(
1032Debug.Assert(!attributeData.IsDefault);
1551Debug.Assert(!ReferenceEquals(data, UnmanagedCallersOnlyAttributeData.Uninitialized));
1552Debug.Assert(!ReferenceEquals(data, UnmanagedCallersOnlyAttributeData.AttributePresentDataNotBound));
1646Debug.Assert(!result.IsDefault);
1674Debug.Assert(MethodKind == MethodKind.Constructor);
1730Debug.Assert(!ReferenceEquals(unmanagedCallersOnlyData, UnmanagedCallersOnlyAttributeData.Uninitialized)
1756Debug.Assert(result != null);
1823Debug.Assert(AssociatedSymbol?.GetRequiresUnsafeMode(ConsList<FieldSymbol>.Empty) != RequiresUnsafeMode.Implicit);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (39)
44Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
50Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
56Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
62Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
66Debug.Assert(correspondingTupleField is TupleErrorFieldSymbol);
88Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
94Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
100Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule));
111Debug.Assert((object)retargetingModule != null);
164Debug.Assert(symbol.Kind != SymbolKind.NamedType || ((NamedTypeSymbol)symbol).PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
207Debug.Assert(type.IsDefinition);
241Debug.Assert(!retargetFrom.IsLinked);
283Debug.Assert(module.Ordinal == 0);
284Debug.Assert(!type.IsExplicitDefinitionOfNoPiaLocalType);
303Debug.Assert(module.Ordinal > 0);
305Debug.Assert(ReferenceEquals(((PEModuleSymbol)module).Module, addedModule.Module));
350Debug.Assert(signatureIndex == 0 || signatureIndex == 1);
364Debug.Assert((object)type.ContainingAssembly != (object)RetargetingAssembly.UnderlyingAssembly);
386Debug.Assert((object)result != null);
403Debug.Assert(!type.ContainingModule.Equals(addedModule) &&
435Debug.Assert(result is PENamedTypeSymbol peResult && peResult.Handle == type.Handle);
461Debug.Assert(result1?.IsErrorType() != true);
472Debug.Assert(result1.Arity == type.Arity);
475Debug.Assert(TypeSymbol.Equals(result1, result, TypeCompareKind.ConsiderEverything2));
499Debug.Assert(originalDefinition.Arity == 0 || !ReferenceEquals(type.ConstructedFrom, type));
510Debug.Assert((object)type.ContainingType == null || !type.ContainingType.IsUnboundGenericType());
578Debug.Assert(newParameters.Count == newArguments.Count);
741Debug.Assert(newModifiers == null || newModifiers.Count == oldModifiers.Length);
842Debug.Assert(nts.TypeKind == TypeKind.Error || nts.PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
854Debug.Assert(ts.TypeKind == TypeKind.Error || ts.PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
876Debug.Assert(ReferenceEquals(method.ContainingModule, this.UnderlyingModule));
877Debug.Assert(ReferenceEquals(method, method.OriginalDefinition));
884Debug.Assert((object)method == method.ConstructedFrom);
901Debug.Assert(!retargetedType.IsDefinition);
913Debug.Assert(retargetedType.IsDefinition);
926Debug.Assert(ReferenceEquals(property.ContainingModule, this.UnderlyingModule));
927Debug.Assert(ReferenceEquals(property, property.OriginalDefinition));
1048Debug.Assert((object)typeParameter.ContainingSymbol == _toFind);
1320Debug.Assert(ReferenceEquals(symbol, _retargetingModule.UnderlyingModule));
Symbols\Source\SourceAssemblySymbol.cs (57)
122Debug.Assert(compilation != null);
123Debug.Assert(assemblySimpleName != null);
124Debug.Assert(!String.IsNullOrWhiteSpace(moduleName));
125Debug.Assert(!netModules.IsDefault);
497Debug.Assert(!DeclaringCompilation.Options.Errors.IsEmpty);
652Debug.Assert((object)compilationRelaxationsAttribute != null, "GetWellKnownType unexpectedly returned null");
661Debug.Assert((object)runtimeCompatibilityAttribute != null, "GetWellKnownType unexpectedly returned null");
694Debug.Assert((object)unverifiableCodeAttribute != null, "GetWellKnownType unexpectedly returned null");
706Debug.Assert((object)securityPermissionAttribute != null, "GetWellKnownType unexpectedly returned null");
713Debug.Assert((object)securityAction != null, "GetWellKnownType unexpectedly returned null");
925Debug.Assert(thisThreadCompleted);
938Debug.Assert(locationOpt != null || filter != null, "If no location or filter was specified, then the module members should be completed");
949Debug.Assert(thisThreadCompleted);
1071Debug.Assert(moduleNs.Extent.Kind == NamespaceKind.Module);
1212Debug.Assert(!attribute.HasErrors);
1224Debug.Assert(!attribute.HasErrors);
1241Debug.Assert(success);
1318Debug.Assert(attributesFromNetModules.Any());
1319Debug.Assert(netModuleNames.Any());
1320Debug.Assert(attributesFromNetModules.Length == netModuleNames.Length);
1455Debug.Assert(lazyNetModuleAttributesBag.IsSealed);
1461Debug.Assert(attributeMatches is QuickAttributes.AssemblyKeyFile
1487Debug.Assert(attributesFromNetModules.Any());
1488Debug.Assert(netModuleNames.Any());
1489Debug.Assert(attributesFromNetModules.Length == netModuleNames.Length);
1547Debug.Assert(attributesBag.IsSealed);
1600Debug.Assert(!attributes.IsDefault);
1601Debug.Assert(!netmoduleAttributes.IsDefault);
1615Debug.Assert(!attributes.IsDefault);
1628Debug.Assert(_lazyOmittedAttributeIndices == null || !_lazyOmittedAttributeIndices.Any(i => i < 0 || i >= this.GetAttributes().Length));
1629Debug.Assert(_lazySourceAttributesBag.IsSealed);
1630Debug.Assert(_lazyNetModuleAttributesBag.IsSealed);
1631Debug.Assert(index >= 0);
1632Debug.Assert(index < this.GetAttributes().Length);
1751Debug.Assert(added);
1757Debug.Assert(removed);
1782Debug.Assert(attributesBag.IsSealed);
1832Debug.Assert(!boolType.HasUseSiteError,
1972Debug.Assert(!int32Type.HasUseSiteError,
1992Debug.Assert(!boolType.HasUseSiteError, "Use site errors should have been checked ahead of time (type bool).");
2026Debug.Assert(!stringType.HasUseSiteError, "Use site errors should have been checked ahead of time (type string).");
2036Debug.Assert(!stringType.HasUseSiteError, "Use site errors should have been checked ahead of time (type string).");
2110Debug.Assert(conclusion != IVTConclusion.NoRelationshipClaimed);
2207Debug.Assert(!arguments.Attribute.HasErrors);
2226Debug.Assert(forwardedType.TypeKind != TypeKind.Error);
2278Debug.Assert(!attrData.HasErrors);
2368Debug.Assert(!attribute.HasErrors);
2369Debug.Assert(arguments.SymbolPart == AttributeLocation.None);
2617Debug.Assert(!attribute.HasErrors);
2660Debug.Assert(
2664Debug.Assert(
2672Debug.Assert(_unusedFieldWarnings.IsDefault, "We shouldn't have computed the diagnostics if we're still noting definitions.");
2693Debug.Assert(this.HasComplete(CompletionPart.Module),
2715Debug.Assert(success, "Once CompletionPart.Module is set, no-one should be modifying the map.");
2798Debug.Assert(!_unusedFieldWarnings.IsDefault);
2844Debug.Assert(forcedArity == emittedName.InferredArity);
2860Debug.Assert((object)originalDefinition.ContainingType == null, "How did a nested type get forwarded?");
Symbols\Source\SourceMemberContainerSymbol.cs (100)
150Debug.Assert(BitsAreUnsetOrSame(_flags, bitsToSet));
245Debug.Assert(containingSymbol is NamespaceSymbol { IsGlobalNamespace: true } || !declaration.Declarations.Any(static d => d.IsSimpleProgram));
274Debug.Assert(typeKind is TypeKind.Struct or TypeKind.Class || !HasPrimaryConstructor);
674Debug.Assert(thisThreadCompleted);
729Debug.Assert(thisThreadCompleted);
740Debug.Assert((incompletePart & CompletionPart.NamedTypeSymbolAll) == 0);
880Debug.Assert(!useSiteDiagnostics.IsDefault);
889Debug.Assert(!useSiteDependencies.IsDefault);
1189Debug.Assert(!nonTypeMembers.IsDefault);
1190Debug.Assert(!staticInitializers.IsDefault);
1191Debug.Assert(staticInitializers.All(g => !g.IsDefault));
1192Debug.Assert(!instanceInitializers.IsDefault);
1193Debug.Assert(instanceInitializers.All(g => !g.IsDefault));
1195Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol));
1196Debug.Assert(haveIndexers == nonTypeMembers.Any(static s => s.IsIndexer()));
1263Debug.Assert(ctorInitializerLength >= 0);
1286Debug.Assert(distanceFromCtorBody > 0);
1494Debug.Assert(s_emptyTypeMembers.Count == 0);
1578Debug.Assert(symbol is not null);
1583Debug.Assert(attr is SourceAttributeData);
2070Debug.Assert(IsFileLocal);
2078Debug.Assert(fileIdentifier.FilePathChecksumOpt.IsDefault);
2407Debug.Assert(method1.ParameterCount == method2.ParameterCount);
2487Debug.Assert(checkCollisionWithTypeParameters || typeParameterNames == null);
2539Debug.Assert(!membersByName[indexerName.AsMemory()].Any(SymbolExtensions.IsIndexer));
2631Debug.Assert(cloneMembersByName);
2635Debug.Assert(masterExtension is not null);
2671Debug.Assert(!newMembers.IsEmpty);
2675Debug.Assert(newMembers.All(static (m, membersUnordered) => membersUnordered.Contains(m), membersUnordered));
2792Debug.Assert(value == _lazyKnownCircularStruct);
2803Debug.Assert(TypeKind == TypeKind.Struct);
2822Debug.Assert(field.AssociatedSymbol is not EventSymbol, "Didn't expect to find a field-like event backing field in the member list.");
3037Debug.Assert(!this.IsExtension);
3120Debug.Assert(IsSubmissionClass || IsScriptClass);
3146Debug.Assert(ReferenceEquals(this, this.OriginalDefinition));
3159Debug.Assert(f.AssociatedSymbol is not EventSymbol, "Didn't expect to find a field-like event backing field in the member list.");
3432Debug.Assert(!nonTypeMembersWithPartialImplementations.IsDefault);
3436Debug.Assert(!nonTypeMembersWithPartialImplementations.Any(static s => s is TypeSymbol));
3437Debug.Assert(declarationWithParameters is object || primaryConstructor is null);
3452Debug.Assert(!initializers.IsDefault);
3460Debug.Assert(!group.IsDefaultOrEmpty);
3467Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i - 1].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0);
3472Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i + 1].Last().Syntax, compilation)) < 0);
3477Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0);
3502Debug.Assert(declaredMembersAndInitializers != DeclaredMembersAndInitializers.UninitializedSentinel);
3527Debug.Assert(InstanceInitializersForPositionalMembers.Count != 0);
3528Debug.Assert(declaredMembers.PrimaryConstructor is object);
3529Debug.Assert(declaredMembers.DeclarationWithParameters is object);
3530Debug.Assert(declaredMembers.DeclarationWithParameters.SyntaxTree == InstanceInitializersForPositionalMembers[0].Syntax.SyntaxTree);
3531Debug.Assert(declaredMembers.DeclarationWithParameters.Span.Contains(InstanceInitializersForPositionalMembers[0].Syntax.Span.Start));
3574Debug.Assert(groupsBuilder.Count == groupCount);
3578Debug.Assert(!declaredMembers.InstanceInitializers.Any(g => declaredMembers.DeclarationWithParameters.SyntaxTree == g[0].Syntax.SyntaxTree &&
3584Debug.Assert(groupsBuilder.Count == groupCount + 1);
3783Debug.Assert(partialMembersToMerge.Count != 0);
3824Debug.Assert(!_lazySimpleProgramEntryPoints.IsDefault);
3883Debug.Assert(result is object);
3906Debug.Assert(primaryConstructor is not null);
3907Debug.Assert(!this.IsDelegateType());
3938Debug.Assert(HasPrimaryConstructor);
3943Debug.Assert(declared.PrimaryConstructor is not null);
3949Debug.Assert(membersAndInitializers.PrimaryConstructor is not null);
3956Debug.Assert(HasPrimaryConstructor);
3980Debug.Assert(primaryConstructor is not null);
4185Debug.Assert(symbol.IsPartialMember());
4211Debug.Assert(pair.Key.Equals(WellKnownMemberNames.InstanceConstructorName.AsMemory()));
4222Debug.Assert(symbol.Kind != prev.Kind);
4223Debug.Assert(symbol is SourceOrdinaryMethodSymbol or SourcePropertySymbol or SourcePropertyAccessorSymbol or SourceEventAccessorSymbol);
4224Debug.Assert(prev is SourceOrdinaryMethodSymbol or SourcePropertySymbol or SourcePropertyAccessorSymbol or SourceEventAccessorSymbol);
4232Debug.Assert(symbol.IsPartialMember());
4311Debug.Assert(symbol.IsPartialMember());
4563Debug.Assert(!propertySymbol.IsExplicitInterfaceImplementation); // checked by caller
4614Debug.Assert(!eventSymbol.IsExplicitInterfaceImplementation); // checked by caller
4749Debug.Assert(node.SyntaxTree == initializers.Last().Syntax.SyntaxTree);
4750Debug.Assert(node.SpanStart > initializers.Last().Syntax.Span.Start);
4836Debug.Assert(property.IsIndexer);
4925Debug.Assert(TypeKind == TypeKind.Struct);
4929Debug.Assert(builder.DeclarationWithParameters is TypeDeclarationSyntax { ParameterList: not null } type
4974Debug.Assert(ctor is object);
4984Debug.Assert(declaredMembersAndInitializers.PrimaryConstructor?.GetBackingFields().Any() != true);
4993Debug.Assert(valueProperty.GetMethod is object);
4994Debug.Assert(valueProperty.SetMethod is null);
4997Debug.Assert(backingField is object);
5026Debug.Assert(typeSyntax != null);
5051Debug.Assert(memberOffset == members.Count - typesBuilder.Count);
5100Debug.Assert(declaredMembersAndInitializers.DeclarationWithParameters is object);
5104Debug.Assert(ctor is object);
5157Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false }));
5168Debug.Assert(positionalMembers.All(p => p is PropertySymbol or FieldSymbol));
5216Debug.Assert(isRecordClass);
5264Debug.Assert(isRecordClass);
5471Debug.Assert(property.GetMethod is object);
5472Debug.Assert(property.SetMethod is object);
5476Debug.Assert(backingField is object);
5538Debug.Assert(isRecordClass);
5660Debug.Assert(isRecordClass);
5993Debug.Assert(@event.IsPartial || @event.AddMethod is not null);
5994Debug.Assert(@event.IsPartial || @event.RemoveMethod is not null);
6017Debug.Assert(@event.AssociatedField is null);
6122Debug.Assert(
6327Debug.Assert(this.declaration.ContainsExtensionDeclarations);
Utilities\ValueSetFactory.NumericValueSet.cs (7)
33Debug.Assert(tc.Related(LessThanOrEqual, first, last));
165Debug.Assert(this._tc.GetType() == other._tc.GetType());
211Debug.Assert(tc.Related(LessThanOrEqual, first, last));
212Debug.Assert(tc.Related(GreaterThanOrEqual, first, tc.MinValue));
213Debug.Assert(tc.Related(LessThanOrEqual, last, tc.MaxValue));
214Debug.Assert(builder.Count == 0 || tc.Related(LessThanOrEqual, builder.Last().first, first));
242Debug.Assert(this._tc.GetType() == other._tc.GetType());
Microsoft.CodeAnalysis.CSharp.Analyzers (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle (80)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (31)
Microsoft.CodeAnalysis.CSharp.Features (144)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (10)
Microsoft.CodeAnalysis.CSharp.Workspaces (101)
Microsoft.CodeAnalysis.Extensions.Package (162)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
Microsoft.CodeAnalysis.ExternalAccess.HotReload (2)
Microsoft.CodeAnalysis.Features (540)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (77)
670Debug.Assert(newActiveStatements.All(a => a != null));
960Debug.Assert(!newActiveStatementSpans.IsDefault);
961Debug.Assert(oldActiveStatements.Length == newActiveStatements.Count);
962Debug.Assert(oldActiveStatements.Length == newExceptionRegions.Count);
1126Debug.Assert(!newActiveStatementSpans.IsDefault);
1127Debug.Assert(newActiveStatementSpans.IsEmpty || oldActiveStatements.Length == newActiveStatementSpans.Length);
1128Debug.Assert(oldActiveStatements.IsEmpty || oldActiveStatements.Length == newActiveStatements.Count);
1129Debug.Assert(newActiveStatements.Count == newExceptionRegions.Count);
1130Debug.Assert(oldMemberBody != null || newMemberBody != null);
1172Debug.Assert(oldDeclaration != null);
1178Debug.Assert(IsDeclarationWithSharedBody(oldDeclaration, oldMember));
1192Debug.Assert(oldMemberBody != null);
1319Debug.Assert(oldMemberBody != null);
1320Debug.Assert(oldDeclaration != null);
1342Debug.Assert(lazyActiveOrMatchedLambdas != null);
1358Debug.Assert(!enclosingBodyMap.Forward.IsEmpty());
1402Debug.Assert(oldEnclosingLambdaBody != null);
1403Debug.Assert(lazyActiveOrMatchedLambdas != null);
1448Debug.Assert(newSpan != default);
1458Debug.Assert(IsDeclarationWithSharedBody(oldDeclaration, oldMember));
1569Debug.Assert(oldAncestors.Count == newAncestors.Count);
1760Debug.Assert(node != null);
1878Debug.Assert(hasAncestor && newAncestor != null);
1892Debug.Assert(hasAncestor && newAncestor != null);
2247Debug.Assert(editMap[newNode] is EditKind.Update or EditKind.Insert);
2309Debug.Assert(currentSegment.path != null);
2310Debug.Assert(lastOldStartLine >= 0);
2487Debug.Assert(previousOldEndLine >= 0);
2716Debug.Assert(inBreakState || newActiveStatementSpans.IsEmpty);
2742Debug.Assert(edit.OldNode is null || edit.NewNode is null || IsNamespaceDeclaration(edit.OldNode) == IsNamespaceDeclaration(edit.NewNode));
2754Debug.Assert(oldSymbol is INamedTypeSymbol);
2755Debug.Assert(newSymbol is INamedTypeSymbol);
2772Debug.Assert(newTypeDeclaration != null);
2971Debug.Assert(oldSymbol is INamedTypeSymbol);
3261Debug.Assert(newDeclaration != null);
3262Debug.Assert(oldProperty.ContainingType.IsRecord);
3263Debug.Assert(newProperty.ContainingType.IsRecord);
3267Debug.Assert(synthesizedProperty.IsSynthesizedAutoProperty());
3268Debug.Assert(synthesizedProperty.SetMethod != null);
3340Debug.Assert(newSymbol != null);
3564Debug.Assert(IsConstructorWithMemberInitializers(oldSymbol, cancellationToken) == IsConstructorWithMemberInitializers(newSymbol, cancellationToken));
3565Debug.Assert(IsDeclarationWithInitializer(oldDeclaration) == IsDeclarationWithInitializer(newDeclaration));
3735Debug.Assert(oldSymbol != null);
3736Debug.Assert(newSymbol != null);
3759Debug.Assert(member is IPropertySymbol or IMethodSymbol);
4272Debug.Assert(oldBody == null || oldDeclaration != null && oldMemberBody != null);
4273Debug.Assert(newBody == null || newDeclaration != null && newMemberBody != null);
4458Debug.Assert(ReturnTypesEquivalent(oldField, newField, exact: false));
4480Debug.Assert(oldImportData.BestFitMapping == newImportData.BestFitMapping ||
4535Debug.Assert(ReturnTypesEquivalent(oldMethod, newMethod, exact: false));
4559Debug.Assert(ReturnTypesEquivalent(oldType.DelegateInvokeMethod, newType.DelegateInvokeMethod, exact: false));
4569Debug.Assert(ReturnTypesEquivalent(oldProperty, newProperty, exact: false));
4583Debug.Assert(ReturnTypesEquivalent(oldEvent, newEvent, exact: false));
4700Debug.Assert(ParameterTypesEquivalent(oldMember.GetParameters(), newMember.GetParameters(), exact: true));
5099Debug.Assert(recordType.IsRecord);
5113Debug.Assert(record.IsRecord);
5200Debug.Assert(oldSymbol != null);
5347Debug.Assert(newSymbol != null);
5532Debug.Assert(oldBody != null);
5533Debug.Assert(newBody != null);
5667Debug.Assert(oldCtor == null || MemberOrDelegateSignaturesEquivalent(oldCtor, newCtor, exact: false));
5674Debug.Assert(newCtor.Parameters.IsEmpty);
5872Debug.Assert(IsNestedFunction(newLambda) == IsNestedFunction(oldLambda));
6446Debug.Assert(!parameter.IsThis);
6490Debug.Assert(parameterKey.Syntax != null);
6611Debug.Assert(oldCapture.Kind == newCapture.Kind);
6685Debug.Assert(IsNestedFunction(newLambda));
6686Debug.Assert(IsNestedFunction(oldLambda));
6746Debug.Assert(local.Kind is not SymbolKind.RangeVariable);
6758Debug.Assert(node != null);
6830Debug.Assert(rootNodes.Count == otherRootNodes.Count);
6846Debug.Assert(otherNode.SyntaxTree == otherRoot.SyntaxTree);
6847Debug.Assert(otherRoot.FullSpan.Contains(otherNode.SpanStart));
6850Debug.Assert(otherNode.FullSpan.Length > 0);
6859Debug.Assert(otherNode.RawKind == rightNode.RawKind);
6863Debug.Assert(!leftChild.IsToken);
6908Debug.Assert(!self.FullSpan.Contains(position), "Position is valid. How could we not find a child?");
Microsoft.CodeAnalysis.NetAnalyzers (558)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumShouldNotHaveDuplicatedValues.cs (1)
83Debug.Assert(added);
src\9382845807600969\AnalysisEntityMapAbstractDomain.cs (16)
98Debug.Assert(!map2.ContainsKey(key1));
99Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
163Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
164Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
184Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
185Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
193Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
205Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
212Debug.Assert(!map1.ContainsKey(newKey));
213Debug.Assert(!map2.ContainsKey(newKey));
225Debug.Assert(Compare(map1, resultMap) <= 0);
226Debug.Assert(Compare(map2, resultMap) <= 0);
246Debug.Assert(values.Count > 0);
258Debug.Assert(ValueDomain.Compare(value1, mergedValue) <= 0);
259Debug.Assert(ValueDomain.Compare(value2, mergedValue) <= 0);
266Debug.Assert(isNewKey == (!map1.ContainsKey(key) && !map2.ContainsKey(key)));
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\WellKnownTypeProvider.cs (1)
94Debug.Assert(result
Microsoft.CodeAnalysis.Razor.Compiler (309)
Microsoft.CodeAnalysis.Razor.DotNetFormat (20)
Microsoft.CodeAnalysis.Rebuild (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (533)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
263Debug.Assert(
Microsoft.CodeAnalysis.Scripting (64)
Microsoft.CodeAnalysis.VisualBasic (8536)
Binding\Binder_Expressions.vb (83)
279Debug.Assert(IsSemanticModelBinder OrElse node.ContainsDiagnostics, String.Format("Unexpected {0} syntax does not have diagnostics", node.Kind))
466Debug.Assert(elementNames.Count = inferredElementNames.Count)
719Debug.Assert(node.Argument.HasErrors)
903Debug.Assert(group IsNot Nothing)
1042Debug.Assert(expr.IsValue)
1086Debug.Assert(prop.Type Is classType)
1108Debug.Assert(cdiag Is Nothing OrElse Not cdiag.HasLazyInfo,
1279Debug.Assert(getMethod IsNot Nothing)
1320Debug.Assert(receiverOpt.Type IsNot Nothing)
1369Debug.Assert(expr.IsValue())
1385Debug.Assert(getMethod IsNot Nothing)
1395Debug.Assert(propertyAccess.PropertySymbol.IsReadable)
1464Debug.Assert(address.MethodGroup.ResultKind = LookupResultKind.Good)
1496Debug.Assert((conv And ConversionKind.UserDefined) = 0)
1497Debug.Assert(Not (TypeOf destination Is ArrayLiteralTypeSymbol)) 'An array literal should never be reclassified as an array literal.
1571Debug.Assert(Not Conversions.IsIdentityConversion(conv))
1757Debug.Assert(propertyAccess.AccessKind <> PropertyAccessKind.Get)
1774Debug.Assert(invocation.AccessKind <> LateBoundAccessKind.Get AndAlso invocation.AccessKind <> LateBoundAccessKind.Call)
1779Debug.Assert(member.AccessKind <> LateBoundAccessKind.Get AndAlso member.AccessKind <> LateBoundAccessKind.Call)
1846Debug.Assert(Not receiverType.IsTypeParameter() OrElse receiverType.IsReferenceType,
1962Debug.Assert(dominantType Is Nothing OrElse Not dominantType.IsVoidType())
2059Debug.Assert(dominantType.IsObjectType)
2079Debug.Assert(hasErrors OrElse (dominantType IsNot Nothing AndAlso Not dominantType.IsVoidType()))
2106Debug.Assert(hasErrors OrElse boundFirstArg.IsNothingLiteral OrElse boundFirstArg.Type IsNot Nothing)
2160Debug.Assert(Not testExpression.IsLValue)
2298Debug.Assert(ContainingType.IsClassType)
2460Debug.Assert(node.Kind = SyntaxKind.IdentifierName)
2581Debug.Assert(type IsNot Nothing)
2582Debug.Assert(member IsNot Nothing)
2645Debug.Assert(Not wholeMemberAccessExpressionBound)
2724Debug.Assert(boundValue.Type IsNot Nothing)
2729Debug.Assert(boundValue.Type IsNot Nothing)
2795Debug.Assert(node IsNot Nothing)
2796Debug.Assert(left IsNot Nothing)
2797Debug.Assert(right IsNot Nothing)
2872Debug.Assert(right.Kind = SyntaxKind.IdentifierName)
2988Debug.Assert(Me.ContainingBinder IsNot Nothing)
2995Debug.Assert(Me.ContainingBinder IsNot Nothing)
3081Debug.Assert(lookupResult.HasSymbol)
3098Debug.Assert(resultKind <> LookupResultKind.Good)
3129Debug.Assert(lookupResult.Kind = LookupResultKind.Ambiguous)
3159Debug.Assert(lookupResult.Kind = LookupResultKind.Good OrElse lookupResult.Kind = LookupResultKind.Inaccessible)
3287Debug.Assert(rangeVariable.GetUseSiteInfo().IsEmpty)
3299Debug.Assert(parameterSymbol.GetUseSiteInfo().IsEmpty)
3346Debug.Assert(lookupResult.SingleSymbol.GetUseSiteInfo().IsEmpty)
3352Debug.Assert(lookupResult.SingleSymbol.GetUseSiteInfo().IsEmpty)
3358Debug.Assert([alias].GetUseSiteInfo().IsEmpty)
3369Debug.Assert(symbol.GetUseSiteInfo().IsEmpty)
3390Debug.Assert(lookupResult.Kind = LookupResultKind.Ambiguous)
3451Debug.Assert(containingNamespace IsNot Nothing)
3479Debug.Assert(namespaceGroup.NamespaceKind = NamespaceKindNamespaceGroup)
3508Debug.Assert(result)
3565Debug.Assert(currentContainer.IsLambdaMethod OrElse stopAtContainer Is Nothing)
3722Debug.Assert(Me.ContainingBinder IsNot Nothing)
3761Debug.Assert(left IsNot Nothing)
3765Debug.Assert(type IsNot Nothing)
3784Debug.Assert(defaultPropertyGroup Is Nothing OrElse defaultPropertyGroup.Kind = BoundKind.PropertyGroup OrElse
3915Debug.Assert(node IsNot Nothing)
3916Debug.Assert(expr IsNot Nothing)
4040Debug.Assert(False, "Did not found a NamedArgumentSyntax where one should have been")
4185Debug.Assert(type IsNot Nothing)
4235Debug.Assert(type IsNot Nothing OrElse allInitializers IsNot Nothing)
4252Debug.Assert(type Is Nothing OrElse type.Rank = rank)
4463Debug.Assert(Not value.GetType().GetTypeInfo().IsEnum)
4468Debug.Assert(specialType <> specialType.None AndAlso
4521Debug.Assert(expression IsNot Nothing)
4522Debug.Assert(expression.IsValue())
4566Debug.Assert(expressionType Is Nothing)
4593Debug.Assert(Not results(0).ResultType.IsVoidType(), "internal logic error: how could void have won the dominant type algorithm?")
4599Debug.Assert(anEmptyArray IsNot Nothing, "internal logic error: if we got at least one empty array, then AnEmptyArray should not be null")
4604Debug.Assert(dominantType.IsArrayType AndAlso DirectCast(dominantType, ArrayTypeSymbol).Rank = 1 AndAlso DirectCast(dominantType, ArrayTypeSymbol).ElementType.SpecialType = SpecialType.System_Object)
4608Debug.Assert(results.Count > 1, "internal logic error: if InferenceErrorReasonsAmbiguous, you'd have expected more than 1 candidate")
4717Debug.Assert(getAwaiter.Type.IsObjectType())
4724Debug.Assert(isCompleted.Type.IsObjectType())
4729Debug.Assert(getResult.Type.IsObjectType())
4732Debug.Assert(operand.Type.IsErrorType() OrElse ignoreDiagnostics.DiagnosticBag.IsEmptyWithoutResolution())
4785Debug.Assert(getAwaiter Is Nothing OrElse Not DiagnosticBagHasErrorsOtherThanObsoleteOnes(ignoreDiagnostics.DiagnosticBag))
4826Debug.Assert(DirectCast(isCompleted, BoundPropertyAccess).AccessKind = PropertyAccessKind.Get)
4834Debug.Assert(isCompleted Is Nothing OrElse Not DiagnosticBagHasErrorsOtherThanObsoleteOnes(ignoreDiagnostics.DiagnosticBag))
4873Debug.Assert(Not method.IsReducedExtensionMethod)
4881Debug.Assert(getResult Is Nothing OrElse Not DiagnosticBagHasErrorsOtherThanObsoleteOnes(ignoreDiagnostics.DiagnosticBag))
4904Debug.Assert(isCompleted Is Nothing AndAlso getResult Is Nothing)
4914Debug.Assert(hasErrors)
Binding\Binder_ObjectInitializer.vb (11)
208Debug.Assert(objectInitializerExpressionOpt Is Nothing OrElse TypeSymbol.Equals(objectInitializerExpressionOpt.Type, type0, TypeCompareKind.ConsiderEverything))
394Debug.Assert(constructorsGroup.ResultKind = LookupResultKind.Good OrElse constructorsGroup.ResultKind = LookupResultKind.Inaccessible)
477Debug.Assert(type.Equals(DirectCast(type0, NamedTypeSymbol).CoClassType))
480Debug.Assert(TypeSymbol.Equals(type, type0, TypeCompareKind.ConsiderEverything))
514Debug.Assert(resultExpression.Type.IsSameTypeIgnoringAll(type0))
515Debug.Assert(LookupResult.WorseResultKind(resultKind, resultExpression.ResultKind) = resultExpression.ResultKind)
528Debug.Assert((constructor IsNot Nothing AndAlso ReferenceEquals(constructor.ContainingType, containingType)) OrElse containingType.IsStructureType())
667Debug.Assert(asNewVariablePlaceholderOpt IsNot Nothing)
713Debug.Assert(fieldInitializer.KeyKeyword.Kind <> SyntaxKind.KeyKeyword)
737Debug.Assert(propertyAccess.AccessKind = PropertyAccessKind.Unknown)
806Debug.Assert(TypeSymbol.Equals(DirectCast(memberAssignments.Last, BoundAssignmentOperator).Right.Type, DirectCast(memberAssignments.Last, BoundAssignmentOperator).Left.Type, TypeCompareKind.ConsiderEverything))
Binding\Binder_Query.vb (157)
21Debug.Assert(kind.IsQueryLambda)
40Debug.Assert(False, "Binding out of context is unsupported!")
47Debug.Assert(False, "Binding out of context is unsupported!")
67Debug.Assert(moveResult)
101Debug.Assert(source IsNot Nothing)
201Debug.Assert(Not malformedSyntax, "Malformed syntax tree. Parser shouldn't produce a tree like that.")
214Debug.Assert(aggregationVariables.Count > 0, "Malformed syntax tree.")
256Debug.Assert(rangeVar IsNot Nothing)
275Debug.Assert(Not source.Binders.IsDefault AndAlso source.Binders.Length = 1 AndAlso source.Binders(0) IsNot Nothing)
304Debug.Assert(operatorsEnumerator.Current Is aggregate)
388Debug.Assert((sourceRangeVariablesPart1.Length = 0) = (sourceRangeVariablesPart2 = firstSelectSelectorBinder.RangeVariables))
389Debug.Assert((sourceRangeVariablesPart2.Length = 0) = (sourceRangeVariablesPart1 = firstSelectSelectorBinder.RangeVariables))
390Debug.Assert(firstSelectSelectorBinder.RangeVariables.Length = sourceRangeVariablesPart1.Length + sourceRangeVariablesPart2.Length)
397Debug.Assert(intoBinder IsNot Nothing)
398Debug.Assert(firstSelectDeclaredRangeVariables.Length <= 1)
408Debug.Assert(intoBinder Is Nothing)
409Debug.Assert(firstSelectDeclaredRangeVariables.Length = 1)
430Debug.Assert(LambdaUtilities.IsNonUserCodeQueryLambda(aggregate))
454Debug.Assert(keyProperty.Type Is firstSelectSelectorBinder.LambdaSymbol.Parameters(0).Type)
471Debug.Assert(keyProperty.Type Is firstSelectSelectorBinder.LambdaSymbol.Parameters(1).Type)
494Debug.Assert(keyProperty.Type Is firstSelectSelectorBinder.LambdaSymbol.Parameters(1).Type)
565Debug.Assert(Not result.Binders.IsDefault AndAlso result.Binders.Length = 2 AndAlso
584Debug.Assert(Not source.Type.IsErrorType())
606Debug.Assert(Not selector.HasErrors)
614Debug.Assert(Not selectorLambda.HasErrors)
627Debug.Assert(boundCallOrBadExpression.WasCompilerGenerated)
652Debug.Assert(clauseSyntax Is operatorsEnumerator.Current)
764Debug.Assert(clauseSyntax Is operatorsEnumerator.Current)
769Debug.Assert(variables.Count > 0, "Malformed syntax tree.")
773Debug.Assert(Not skipFirstVariable)
785Debug.Assert(Not skipFirstVariable OrElse source.Syntax Is variables.First)
959Debug.Assert(from Is operatorsEnumerator.Current)
974Debug.Assert(clauseSyntax.IsKind(SyntaxKind.AggregateClause) OrElse clauseSyntax.IsKind(SyntaxKind.FromClause))
975Debug.Assert(variables.Count > 0, "Malformed syntax tree.")
1007Debug.Assert(source.RangeVariables.Length = 1)
1029Debug.Assert(manySelector.RangeVariables.Length = 1)
1114Debug.Assert(sourceRangeVariables.Length = 0)
1169Debug.Assert(i = variables.Count - 1)
1211Debug.Assert(LambdaUtilities.IsNonUserCodeQueryLambda(lambdaSyntax))
1233Debug.Assert(LambdaUtilities.IsLambdaBody(lambdaSyntax))
1253Debug.Assert(DirectCast(nextOperator, LetClauseSyntax).Variables.Count > 0, "Malformed syntax tree.")
1284Debug.Assert(absorbNextOperator Is operatorsEnumerator.Current)
1285Debug.Assert(absorbingJoin.Binders.Length > 1)
1301Debug.Assert([let].Variables.Count > 0)
1379Debug.Assert(join.Kind = SyntaxKind.SimpleJoinClause)
1380Debug.Assert((declaredNames IsNot Nothing) = (join.Parent.Kind = SyntaxKind.SimpleJoinClause OrElse join.Parent.Kind = SyntaxKind.GroupJoinClause))
1385Debug.Assert(join Is operatorsEnumerator.Current)
1393Debug.Assert(join.JoinedVariables.Count = 1, "Malformed syntax tree.")
1487Debug.Assert(outer.RangeVariables.Length > 0 AndAlso inner.RangeVariables.Length > 0)
1546Debug.Assert(Not isNested)
1611Debug.Assert((declaredNames IsNot Nothing) = (groupJoin.Parent.Kind = SyntaxKind.SimpleJoinClause OrElse groupJoin.Parent.Kind = SyntaxKind.GroupJoinClause))
1633Debug.Assert(groupJoin Is operatorsEnumerator.Current)
1639Debug.Assert(groupJoin.JoinedVariables.Count = 1, "Malformed syntax tree.")
1668Debug.Assert(outer.RangeVariables.Length > 0 AndAlso inner.RangeVariables.Length > 0)
1765Debug.Assert(keysLambda IsNot Nothing)
1794Debug.Assert((itemsLambda Is Nothing) = (itemsLambdaBinder Is Nothing))
1855Debug.Assert(itemsLambdaBinder Is Nothing)
1856Debug.Assert(itemsRangeVariables.IsDefault)
1889Debug.Assert((itemsLambda Is Nothing) = (itemsLambdaBinder Is Nothing))
1890Debug.Assert(Not itemsRangeVariables.IsDefault)
1891Debug.Assert(itemsLambda IsNot Nothing OrElse itemsRangeVariables.Length = 0)
1902Debug.Assert(keysLambdaBinder Is Nothing)
1903Debug.Assert(keysRangeVariables.IsDefault)
1950Debug.Assert(methodGroup Is Nothing)
1957Debug.Assert(methodGroup Is Nothing OrElse methodGroup.ResultKind = LookupResultKind.Good OrElse methodGroup.ResultKind = LookupResultKind.Inaccessible)
2004Debug.Assert(groupType IsNot Nothing)
2026Debug.Assert(methodGroup Is Nothing)
2035Debug.Assert(methodGroup Is Nothing OrElse methodGroup.ResultKind = LookupResultKind.Good OrElse methodGroup.ResultKind = LookupResultKind.Inaccessible)
2081Debug.Assert(groupType IsNot Nothing)
2104Debug.Assert(clauseSyntax.Kind = SyntaxKind.GroupByClause OrElse clauseSyntax.Kind = SyntaxKind.GroupJoinClause)
2105Debug.Assert(mustProduceFlatCompoundVariable OrElse clauseSyntax.Kind = SyntaxKind.GroupJoinClause)
2106Debug.Assert((declaredNames IsNot Nothing) = (clauseSyntax.Kind = SyntaxKind.GroupJoinClause))
2107Debug.Assert(keysRangeVariables.Length > 0)
2108Debug.Assert(intoBinder Is Nothing)
2109Debug.Assert(intoRangeVariables.IsDefault)
2118Debug.Assert(LambdaUtilities.IsNonUserCodeQueryLambda(clauseSyntax))
2155Debug.Assert(identifier.Parent Is rangeVar.Syntax)
2315Debug.Assert(LambdaUtilities.IsLambdaBody(condition))
2531Debug.Assert(orderByOrderings.Count > 0, "Malformed syntax tree.")
2588Debug.Assert(ordering.Kind = SyntaxKind.DescendingOrdering)
2597Debug.Assert(ordering.Kind = SyntaxKind.DescendingOrdering)
2618Debug.Assert(sourceOrPreviousOrdering IsNot source)
2619Debug.Assert(keyBinder IsNot Nothing)
2690Debug.Assert(declaredRangeVariables.IsDefault)
2737Debug.Assert(selectorSyntax IsNot Nothing AndAlso declaredRangeVariables.IsDefault)
2746Debug.Assert(item.NameEquals Is Nothing OrElse item.NameEquals.AsClause Is Nothing)
2755Debug.Assert(Not requireRangeVariable)
2761Debug.Assert(selectVariables.Count > 0, "Malformed syntax tree.")
2771Debug.Assert(selectVariables(i).NameEquals Is Nothing OrElse selectVariables(i).NameEquals.AsClause Is Nothing)
2776Debug.Assert(rangeVar IsNot Nothing)
2800Debug.Assert(Not declaredRangeVariables.IsDefault AndAlso selectorSyntax IsNot Nothing)
2815Debug.Assert(selector Is Nothing)
2894Debug.Assert(item.Parent.Kind = SyntaxKind.SelectClause OrElse item.Parent.Kind = SyntaxKind.GroupByClause)
2916Debug.Assert(rangeVar Is Nothing)
2920Debug.Assert(selector IsNot Nothing)
2921Debug.Assert(Not requireRangeVariable OrElse rangeVar IsNot Nothing)
2935Debug.Assert(declaredRangeVariables.IsDefault)
2942Debug.Assert(rangeVar IsNot Nothing)
2966Debug.Assert(_rangeVariables.Length = 0)
2969Debug.Assert(Not declaredRangeVariables.IsDefault)
2986Debug.Assert(operatorsEnumerator.Current Is aggregate)
2987Debug.Assert(declaredRangeVariables.IsDefault)
2988Debug.Assert((rangeVariablesPart1.Length = 0) = (rangeVariablesPart2 = _rangeVariables))
2989Debug.Assert((rangeVariablesPart2.Length = 0) = (rangeVariablesPart1 = _rangeVariables))
2990Debug.Assert(_lambdaSymbol.ParameterCount = If(rangeVariablesPart2.Length = 0, 1, 2))
2991Debug.Assert(_rangeVariables.Length = rangeVariablesPart1.Length + rangeVariablesPart2.Length)
3008Debug.Assert(aggregationVariables.Count > 0, "Malformed syntax tree.")
3118Debug.Assert(joinSelectorDeclaredRangeVariables.IsDefault)
3119Debug.Assert(absorbNextOperator Is operatorsEnumerator.Current)
3138Debug.Assert([let].Variables.Count > 0)
3180Debug.Assert(_rangeVariables.Length > 0)
3181Debug.Assert((rangeVarOpt Is Nothing) = (rangeVarValueOpt Is Nothing))
3182Debug.Assert(rangeVarOpt IsNot Nothing OrElse _lambdaSymbol.ParameterCount > 1)
3195Debug.Assert(sizeIncrease + _rangeVariables.Length > 1)
3218Debug.Assert(_rangeVariables.Length > 1)
3262Debug.Assert(outerKeyLambda Is Nothing)
3263Debug.Assert(outerKeyBinder Is Nothing)
3264Debug.Assert(innerKeyLambda Is Nothing)
3265Debug.Assert(innerKeyBinder Is Nothing)
3266Debug.Assert(joinSelectorRangeVariables.SequenceEqual(outer.RangeVariables.Concat(inner.RangeVariables)))
3298Debug.Assert(joinConditions.Count > 0, "Malformed syntax tree.")
3384Debug.Assert(outerKeyLambda IsNot Nothing)
3385Debug.Assert(innerKeyLambda IsNot Nothing)
3399Debug.Assert(outerKey Is Nothing AndAlso innerKey Is Nothing)
3432Debug.Assert(leftSide = sideDeterminator.DetermineTheSide(innerKey, diagnostics))
3459Debug.Assert(Not keysAreGood)
3484Debug.Assert(useSiteInfo.Diagnostics.IsNullOrEmpty)
3518Debug.Assert(outerKey IsNot Nothing AndAlso innerKey IsNot Nothing)
3775Debug.Assert(declaredRangeVariables.IsDefault)
3776Debug.Assert(compoundKeyReferencePart2 Is Nothing OrElse compoundKeyReferencePart1 IsNot Nothing)
3777Debug.Assert((compoundKeyReferencePart1 Is Nothing) = (keysRangeVariablesPart1.Length = 0))
3778Debug.Assert((compoundKeyReferencePart2 Is Nothing) = (keysRangeVariablesPart2.Length = 0))
3779Debug.Assert((compoundKeyReferencePart2 Is Nothing) = (keysRangeVariables = keysRangeVariablesPart1))
3780Debug.Assert(compoundKeyReferencePart1 Is Nothing OrElse keysRangeVariables.Length = keysRangeVariablesPart1.Length + keysRangeVariablesPart2.Length)
3846Debug.Assert(aggregationVariables.Count > 0, "Malformed syntax tree.")
3859Debug.Assert(rangeVar IsNot Nothing)
3868Debug.Assert(selectors.Length > 1)
3876Debug.Assert(keys = 0)
3882Debug.Assert(aggregationVariables.Count > 0, "Malformed syntax tree.")
3886Debug.Assert(aggregationVariables.Count = 1)
3891Debug.Assert(rangeVar IsNot Nothing)
4013Debug.Assert(selector Is Nothing)
4024Debug.Assert(variableName.AsClause Is Nothing)
4083Debug.Assert(rangeVar Is Nothing)
4087Debug.Assert(selector IsNot Nothing)
4126Debug.Assert(declaredNames Is Nothing OrElse syntax.Parent.Kind = SyntaxKind.SimpleJoinClause OrElse syntax.Parent.Kind = SyntaxKind.GroupJoinClause)
4162Debug.Assert(sourceIsNotQueryable)
4172Debug.Assert(Not sourceIsNotQueryable AndAlso syntax.AsClause IsNot Nothing)
4214Debug.Assert(syntax.Parent.Kind = SyntaxKind.FromClause OrElse syntax.Parent.Kind = SyntaxKind.AggregateClause)
4228Debug.Assert(variable Is Nothing)
4263Debug.Assert(LambdaUtilities.IsNonUserCodeQueryLambda(syntax.AsClause))
4298Debug.Assert(boundCallOrBadExpression.WasCompilerGenerated)
4406Debug.Assert((result Is Nothing) = (controlVariableType Is Nothing))
4417Debug.Assert(source.IsValue)
4437Debug.Assert((QueryOperatorLookupOptions And LookupOptions.EagerlyLookupExtensionMethods) = 0)
4633Debug.Assert(source.IsValue)
4634Debug.Assert(methodGroup Is Nothing OrElse
Binding\Binder_Statements.vb (98)
23Debug.Assert(node IsNot Nothing)
70Debug.Assert(IsSemanticModelBinder OrElse node.ContainsDiagnostics)
195Debug.Assert(IsSemanticModelBinder OrElse node.ContainsDiagnostics OrElse
225Debug.Assert(node.ContainsDiagnostics)
236Debug.Assert(node.ContainsDiagnostics)
263Debug.Assert(IsSemanticModelBinder OrElse node.ContainsDiagnostics)
271Debug.Assert(caseStatement.ContainsDiagnostics)
427Debug.Assert(initializer.Expression.Kind = BoundKind.Call OrElse
432Debug.Assert(Not diagnostics.AccumulatesDiagnostics OrElse diagnostics.HasAnyResolvedErrors OrElse If(methodSymbol.ContainingType.BaseTypeNoUseSiteDiagnostics?.IsErrorType(), False))
492Debug.Assert(walker._enclosingSyncLockOrUsing Is Nothing)
493Debug.Assert(Not walker._isInCatchFinallyOrSyncLock)
526Debug.Assert(Not node.WasCompilerGenerated)
544Debug.Assert(Not node.WasCompilerGenerated)
568Debug.Assert(Not node.WasCompilerGenerated)
580Debug.Assert(Not node.WasCompilerGenerated)
594Debug.Assert(Not node.WasCompilerGenerated)
603Debug.Assert(_binder.IsInAsyncContext())
616Debug.Assert(_binder.IsInAsyncContext())
651Debug.Assert(bodyBinder IsNot Nothing)
743Debug.Assert(redimTargetType IsNot Nothing)
772Debug.Assert(redimClauseHasErrors OrElse arrayType IsNot Nothing)
800Debug.Assert(target IsNot Nothing)
905Debug.Assert(block.Kind = SyntaxKind.TryBlock OrElse
934Debug.Assert(result.HasSingleSymbol AndAlso result.IsGood)
1152Debug.Assert(type IsNot Nothing)
1209Debug.Assert(declarationInitializer Is Nothing)
1225Debug.Assert(declarationInitializer.Type.IsSameTypeIgnoringAll(declType))
1230Debug.Assert(declarationInitializer IsNot Nothing)
1258Debug.Assert(declarationInitializer.Kind = BoundKind.BadExpression)
1331Debug.Assert(newExpression IsNot Nothing)
1444Debug.Assert(Not symbol.IsConst AndAlso Not symbol.IsStatic AndAlso Not OptionInfer)
1679Debug.Assert(nameIsArrayType AndAlso valueType.IsArrayType, "both the name and the value should be arrays")
1799Debug.Assert(result.HasSingleSymbol AndAlso result.IsGood)
1843Debug.Assert(symbol.Kind = SymbolKind.Local OrElse symbol.Kind = SymbolKind.RangeVariable OrElse
1954Debug.Assert(propertySymbol.ReturnsByRef)
1959Debug.Assert(propertyAccess.AccessKind <> PropertyAccessKind.Get)
1967Debug.Assert(setMethod.IsInitOnly)
2009Debug.Assert((DirectCast(op1, BoundLateMemberAccess).AccessKind And (LateBoundAccessKind.Get Or LateBoundAccessKind.Call)) = 0)
2013Debug.Assert((DirectCast(op1, BoundLateInvocation).AccessKind And (LateBoundAccessKind.Get Or LateBoundAccessKind.Call)) = 0)
2028Debug.Assert(targetType IsNot Nothing OrElse isError)
2065Debug.Assert(targetType IsNot Nothing OrElse isError)
2149Debug.Assert(node IsNot Nothing)
2153Debug.Assert(op1 IsNot Nothing)
2154Debug.Assert(op2 IsNot Nothing)
2215Debug.Assert(node IsNot Nothing AndAlso node.Kind = SyntaxKind.MidAssignmentStatement AndAlso node.Left.Kind = SyntaxKind.MidExpression)
2219Debug.Assert(midArguments.Count = 2 OrElse midArguments.Count = 3)
2252Debug.Assert(targetType IsNot Nothing OrElse isError)
2275Debug.Assert((original.Kind = BoundKind.CompoundAssignmentTargetPlaceholder) = (right.Kind = BoundKind.MidResult) OrElse original.HasErrors OrElse right.HasErrors)
2357Debug.Assert(eventSymbol.DeclaringCompilation IsNot Me.Compilation)
2369Debug.Assert(eventSymbol.DeclaringCompilation IsNot Me.Compilation)
2447Debug.Assert(result IsNot Nothing)
2514Debug.Assert(TypeSymbol.Equals(targetAsEvent.Type, eventField.Type, TypeCompareKind.ConsiderEverything) OrElse eventSym.IsWindowsRuntimeEvent, "non-WinRT event should have the same type as its backing field")
2590Debug.Assert(fireMethod.IsSub, "we got this far, we must have a valid fireMethod")
2763Debug.Assert(boundInvocation.Type Is Nothing)
2775Debug.Assert(node IsNot Nothing)
2791Debug.Assert(node IsNot Nothing)
2832Debug.Assert(node IsNot Nothing)
2867Debug.Assert(node IsNot Nothing)
2890Debug.Assert(loopBinder IsNot Nothing)
2920Debug.Assert(loopBinder IsNot Nothing)
2984Debug.Assert(declaratorSyntax.Initializer Is Nothing, "should not have initializer")
2985Debug.Assert(names.Count = 1, "should be exactly one control variable")
3133Debug.Assert(declaredOrInferredLocalOpt IsNot Nothing)
3134Debug.Assert(controlVariableOpt Is Nothing)
3294Debug.Assert(opCode = BinaryOperatorKind.Add OrElse opCode = BinaryOperatorKind.Subtract OrElse opCode = BinaryOperatorKind.LessThanOrEqual OrElse opCode = BinaryOperatorKind.GreaterThanOrEqual)
3401Debug.Assert(declaredOrInferredLocalOpt IsNot Nothing)
3402Debug.Assert(controlVariableOpt Is Nothing)
3521Debug.Assert(enumeratorType.SpecialType = SpecialType.System_Collections_IEnumerator)
3576Debug.Assert(variableDeclarator.Names.Count = 1, "should be exactly one control variable")
3610Debug.Assert(controlVariableSyntax.Kind <> SyntaxKind.VariableDeclarator)
3798Debug.Assert(matchingInterfaces.Count > 0)
3832Debug.Assert(collection.IsNothingLiteral OrElse collectionType.IsObjectType OrElse (TypeSymbol.Equals(matchingInterfaces.First, ienumerable, TypeCompareKind.ConsiderEverything) AndAlso matchingInterfaces.Count = 1))
3845Debug.Assert(collectionType IsNot Nothing OrElse collection.IsNothingLiteral AndAlso Me.OptionStrict = OptionStrict.On)
4025Debug.Assert(collectionType IsNot Nothing OrElse OptionStrict <> OptionStrict.On AndAlso collection.Kind = BoundKind.Conversion AndAlso DirectCast(collection, BoundConversion).Operand.IsNothingLiteral)
4085Debug.Assert(If(temporaryDiagnostics.DiagnosticBag?.IsEmptyWithoutResolution, True))
4128Debug.Assert(lookupResult.IsGood)
4166Debug.Assert(lookupResult.IsGood)
4202Debug.Assert(lookupResult.IsGood)
4328Debug.Assert(Not result.IsAmbiguous)
4333Debug.Assert(result.HasDiagnostic)
4363Debug.Assert(interfaceType.IsDefinition)
4410Debug.Assert(matchingInterfaces.Comparer Is EqualsIgnoringComparer.InstanceIgnoringTupleNames OrElse
4454Debug.Assert(usingBinder IsNot Nothing)
4533Debug.Assert(usingStatement.Expression IsNot Nothing)
4569Debug.Fail("Failed to find UsingBlockBinder")
4688Debug.Assert(typeParameter.HasValueTypeConstraint)
4711Debug.Assert(structureType.IsValueType)
4724Debug.Assert(Not structureType.IsVoidType)
4761Debug.Assert(node IsNot Nothing)
4847Debug.Assert(exceptionType IsNot Nothing)
4874Debug.Assert(exceptionType.IsOrDerivedFromWellKnownClass(WellKnownType.System_Exception, Compilation, CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
5019Debug.Assert(originalSyntax IsNot Nothing)
5020Debug.Assert(expressionSyntax Is originalSyntax OrElse originalSyntax.Expression Is expressionSyntax)
5058Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod)
5069Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod)
5099Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod)
5167Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod)
5179Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod)
CodeGen\EmitExpression.vb (77)
40Debug.Assert(expression.Kind = BoundKind.FieldAccess)
61Debug.Assert(_recursionDepth = 1)
65Debug.Assert(_recursionDepth = 1)
183Debug.Assert(used)
187Debug.Assert(used)
191Debug.Assert(used)
195Debug.Assert(used)
199Debug.Assert(used)
203Debug.Assert(used)
215Debug.Assert(Not expression.Type.IsValueType)
225Debug.Assert(Not expression.Type.IsReferenceType)
226Debug.Assert(Not expression.Type.IsValueType)
249Debug.Assert(conditional.WhenNullOpt IsNot Nothing OrElse Not used)
272Debug.Assert(hasValue IsNot Nothing)
282Debug.Assert(Not used)
295Debug.Assert(receiverTemp Is Nothing)
304Debug.Assert(Not receiverType.IsValueType)
314Debug.Assert(Not (Not receiverType.IsReferenceType AndAlso
385Debug.Assert(Not used)
405Debug.Assert(receiverTemp Is Nothing)
407Debug.Assert(receiverTemp Is Nothing OrElse receiver.IsDefaultValue())
424Debug.Assert(Not expression.Type.IsReferenceType)
425Debug.Assert(Not expression.Type.IsValueType)
437Debug.Assert(receiverTemp Is Nothing)
502Debug.Assert(targetMethod.IsOverrides, "Nullable cannot be truly boxed therefore delegates of methods that do not override cannot be created")
516Debug.Assert(thisRef.Kind = BoundKind.MeReference OrElse thisRef.Kind = BoundKind.MyClassReference)
519Debug.Assert(thisType.TypeKind <> TypeKind.TypeParameter)
544Debug.Assert(sequence.ValueOpt IsNot Nothing OrElse sequence.Type.SpecialType = SpecialType.System_Void)
574Debug.Assert(arguments.Length = parameters.Length)
580Debug.Assert(temp Is Nothing, "passing args byref should not clone them into temps. That should be done in rewriter.")
717Debug.Assert(temp Is Nothing OrElse receiver.Type.IsEnumType, "temp is unexpected, just reading a field")
901Debug.Assert(IsVerifierReference(receiver.Type), "this is not a reference")
902Debug.Assert(receiver.Kind <> BoundKind.MyBaseReference, "MyBase should always use call")
903Debug.Assert(receiver.Kind <> BoundKind.MyClassReference, "MyClass should always use call")
991Debug.Assert([call].MethodGroupOpt Is Nothing)
992Debug.Assert(Not Me._module.AllowOmissionOfConditionalCalls OrElse Not method.CallsAreOmitted([call].Syntax, [call].SyntaxTree))
1040Debug.Assert(TypeSymbol.Equals(receiverType, method.ContainingType, TypeCompareKind.ConsiderEverything))
1093Debug.Assert(receiver.Type.IsVerifierReference())
1098Debug.Assert(receiver.Type.IsVerifierReference())
1122Debug.Assert(useKind = UseKind.Unused, "Using the return value of a void method.")
1123Debug.Assert(_method.GenerateDebugInfo, "Implied by emitSequencePoints")
1155Debug.Assert(method.ReturnsByRef)
1205Debug.Assert(Not receiverType.IsReferenceType OrElse receiver.Kind <> BoundKind.ComplexConditionalAccessReceiver)
1312Debug.Assert(IsVerifierValue(method.ContainingType), "this is not a value type")
1334Debug.Assert(operand.Type.IsReferenceType AndAlso Not operand.Type.IsTypeParameter(), "operand.Type.IsReferenceType")
1377Debug.Assert(expr.ConstantValueOpt Is Nothing, "Constant value should have been emitted directly")
1466Debug.Assert(expr.ConvertedTestExpression Is Nothing, "coalesce with nontrivial test conversions are lowered into ternary.")
1467Debug.Assert(TypeSymbol.Equals(expr.Type, expr.ElseExpression.Type, TypeCompareKind.ConsiderEverything))
1468Debug.Assert(Not expr.Type.IsValueType)
1606Debug.Assert(toType.IsVerifierReference())
1644Debug.Assert(expression.Type.SpecialType = SpecialType.System_Int32 OrElse expression.Type.SpecialType = SpecialType.System_Int64 OrElse expression.Type.SpecialType = SpecialType.System_UIntPtr)
1689Debug.Assert(Not constructor.IsDefaultValueTypeConstructor(),
1699Debug.Assert(type.IsTypeParameter)
1723Debug.Assert(target.Kind <> BoundKind.Local OrElse Not IsStackLocal(DirectCast(target, BoundLocal).LocalSymbol))
1859Debug.Assert(temp Is Nothing, "temp is not expected when in-place assigning")
1865Debug.Assert(Me.TargetIsNotOnHeap(target), "cannot read-back the target since it could have been modified")
1872Debug.Assert(temp Is Nothing, "temp is not expected when in-place assigning")
1883Debug.Assert(Me.TargetIsNotOnHeap(target), "cannot read-back the target since it could have been modified")
1933Debug.Assert(temp Is Nothing, "temp is unexpected when writing to a field")
1955Debug.Assert(False)
1958Debug.Assert(temp Is Nothing, "taking ref of Me should not create a temp")
1981Debug.Assert(left.Method.ReturnsByRef)
2015Debug.Assert(Not needReference OrElse used)
2019Debug.Assert(temp Is Nothing, "reference assignment should not clone the referent")
2026Debug.Assert(boundLocal.LocalSymbol.IsByRef)
2085Debug.Assert(DirectCast(expression, BoundCall).Method.ReturnsByRef)
2100Debug.Assert(thisRef.Type.IsValueType)
2252Debug.Assert(getTypeMethod IsNot Nothing) ' Should have been checked during binding
2262Debug.Assert(Not node.Field.ContainingType.IsAnonymousType) ' NO anonymous types field access expected
2273Debug.Assert(getField IsNot Nothing)
2294Debug.Assert(Not method.ContainingType.IsGenericType AndAlso Not method.ContainingType.IsAnonymousType)
2297Debug.Assert(method.ContainingType.IsGenericType OrElse method.ContainingType.IsAnonymousType)
2298Debug.Assert(node.GetMethodFromHandle.ParameterCount = 2)
2325Debug.Assert(node.Method.IsDefinition)
2326Debug.Assert(node.Type.SpecialType = SpecialType.System_Int32)
2342Debug.Assert(node.Type.SpecialType = SpecialType.System_Int32)
2381Debug.Assert(node.Type.SpecialType = SpecialType.System_Int32)
Compilation\ClsComplianceChecker.vb (39)
41Debug.Assert(diagnostics.DependenciesBag Is Nothing OrElse TypeOf diagnostics.DependenciesBag Is ConcurrentSet(Of AssemblySymbol))
94Debug.Assert(TypeOf symbol Is SourceAssemblySymbol)
180Debug.Assert(Not symbol.IsImplicitClass)
290Debug.Assert(symbol.Kind = SymbolKind.NamedType OrElse symbol.Kind = SymbolKind.Field OrElse symbol.Kind = SymbolKind.Property OrElse symbol.Kind = SymbolKind.Event OrElse symbol.Kind = SymbolKind.Method)
323Debug.Assert(Not IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on non-compliant symbols")
333Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols")
347Debug.Assert(baseType IsNot Nothing OrElse symbol.SpecialType = SpecialType.System_Object, "Only object has no base.")
355Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols")
357Debug.Assert(containingType Is Nothing OrElse Not containingType.IsImplicitClass)
364Debug.Assert(typeParameters.IsEmpty OrElse IsTrue(GetDeclaredOrInheritedCompliance(context)), "Only call on compliant symbols")
376Debug.Assert(parameters.IsEmpty OrElse
402Debug.Assert(syntaxRef.SyntaxTree.HasCompilationUnitRoot)
412Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)), "Only call on compliant symbols")
427Debug.Assert(Not method.IsAccessor())
440Debug.Assert(symbol.DelegateReturnType.SpecialType = SpecialType.System_Void)
448Debug.Assert(IsAccessibleOutsideAssembly(symbol))
449Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)))
518Debug.Assert(sameNameSymbols.Count > 0)
536Debug.Assert(IsTrue(GetDeclaredOrInheritedCompliance(symbol)))
537Debug.Assert(IsAccessibleOutsideAssembly(symbol))
543Debug.Assert(name.Length = 0 OrElse name(0) <> ChrW(&HFF3F))
549Debug.Assert(symbol.ContainingNamespace IsNot Nothing, "Only true for the global namespace and that has an empty name.")
657Debug.Assert(symbol.Kind = SymbolKind.NamedType OrElse Not (TypeOf symbol Is TypeSymbol), "Type kinds without declarations are handled elsewhere.")
659Debug.Assert(symbol.Kind <> If(Me._compilation.Options.OutputKind = OutputKind.NetModule, SymbolKind.Assembly, SymbolKind.NetModule) OrElse
675Debug.Assert(symbol.Kind <> SymbolKind.Alias)
676Debug.Assert(symbol.Kind <> SymbolKind.Label)
677Debug.Assert(symbol.Kind <> SymbolKind.Namespace)
678Debug.Assert(symbol.Kind <> SymbolKind.Parameter)
679Debug.Assert(symbol.Kind <> SymbolKind.RangeVariable)
708Debug.Assert(symbol.Kind <> SymbolKind.Assembly)
709Debug.Assert(symbol.Kind <> SymbolKind.NetModule)
711Debug.Assert(containing IsNot Nothing)
774Debug.Assert(Not attributeData.AttributeClass.IsErrorType(), "Already checked HasErrors.")
778Debug.Assert(args.Length = 1, "We already checked the signature and HasErrors.")
826Debug.Assert(symbol.Kind = SymbolKind.ErrorType)
871Debug.Assert(x IsNot Nothing)
872Debug.Assert(y IsNot Nothing)
873Debug.Assert(x IsNot y)
874Debug.Assert(x.Kind = y.Kind)
Emit\NamedTypeSymbolAdapter.vb (76)
42Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
49Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
55Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
62Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
63Debug.Assert(Me.IsDefinitionOrDistinct())
73Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
85Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
92Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
93Debug.Assert(Me.IsDefinitionOrDistinct())
103Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
110Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
111Debug.Assert(Me.IsDefinitionOrDistinct())
120Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
122Debug.Assert(Me.IsDefinitionOrDistinct())
131Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
146Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
152Debug.Assert(Me.IsDefinitionOrDistinct())
161Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
162Debug.Assert(Me.IsDefinitionOrDistinct())
164Debug.Assert(AdaptedNamedTypeSymbol.ContainingType IsNot Nothing AndAlso AdaptedNamedTypeSymbol.ContainingType.IsOrInGenericType())
172Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
178Debug.Assert(Me.IsDefinitionOrDistinct())
190Debug.Assert(Me.IsDefinitionOrDistinct())
194Debug.Assert((DirectCast(Me, ITypeReference)).AsGenericTypeInstanceReference IsNot Nothing)
197Debug.Assert((DirectCast(Me, ITypeReference)).AsSpecializedNestedTypeReference IsNot Nothing)
205Debug.Assert((DirectCast(Me, ITypeReference)).AsNamespaceTypeDefinition(visitor.Context) IsNot Nothing)
208Debug.Assert((DirectCast(Me, ITypeReference)).AsNamespaceTypeReference IsNot Nothing)
213Debug.Assert((DirectCast(Me, ITypeReference)).AsNestedTypeDefinition(visitor.Context) IsNot Nothing)
216Debug.Assert((DirectCast(Me, ITypeReference)).AsNestedTypeReference IsNot Nothing)
237Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
239Debug.Assert((DirectCast(Me, ITypeReference)).AsTypeDefinition(context) IsNot Nothing)
245Debug.Assert(baseType Is Nothing)
257Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
273Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
313Debug.Assert(implementingMethod.PartialDefinitionPart Is Nothing) ' must be definition
314Debug.Assert(implementingMethod.IsDefinition)
342Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
377Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
394Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
413Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
425Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
426Debug.Assert((DirectCast(Me, ITypeReference)).AsTypeDefinition(context) IsNot Nothing)
441Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
453Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
471Debug.Assert(AdaptedNamedTypeSymbol.SharedConstructors.Length = 1)
516Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
529Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
542Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
555Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
567Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
580Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
593Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
606Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
619Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
631Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
639Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
664Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
703Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
711Debug.Assert([property] IsNot Nothing)
730Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
737Debug.Assert(AdaptedNamedTypeSymbol.HasDeclarativeSecurity)
739Debug.Assert(securityAttributes IsNot Nothing)
746Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
755Debug.Assert(Not AdaptedNamedTypeSymbol.IsAnonymousType)
789Debug.Assert((DirectCast(Me, ITypeReference)).AsNamespaceTypeReference IsNot Nothing)
795Debug.Assert((DirectCast(Me, ITypeReference)).AsNamespaceTypeReference IsNot Nothing)
811Debug.Assert((DirectCast(Me, ITypeReference)).AsNestedTypeReference IsNot Nothing)
812Debug.Assert(Me.IsDefinitionOrDistinct())
821Debug.Assert(AdaptedNamedTypeSymbol.ContainingType IsNot Nothing)
831Debug.Assert(AdaptedNamedTypeSymbol.ContainingType IsNot Nothing)
840Debug.Assert((DirectCast(Me, ITypeReference)).AsGenericTypeInstanceReference IsNot Nothing)
863Debug.Assert((DirectCast(Me, ITypeReference)).AsGenericTypeInstanceReference IsNot Nothing)
876Debug.Assert((DirectCast(Me, ITypeReference)).AsSpecializedNestedTypeReference IsNot Nothing)
879Debug.Assert(result IsNot Nothing)
931Debug.Assert(IsDefinition)
932Debug.Assert(TypeOf ContainingModule Is SourceModuleSymbol)
Generated\BoundNodes.xml.Generated.vb (427)
225Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
233Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
294Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
301Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
313Debug.Assert(underlyingLValue IsNot Nothing, "Field 'underlyingLValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
314Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
353Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
360Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
372Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
379Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
391Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
398Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
424Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
431Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
457Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
469Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
497Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
509Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
573Debug.Assert(Not (symbols.IsDefault), "Field 'symbols' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
574Debug.Assert(Not (childBoundNodes.IsDefault), "Field 'childBoundNodes' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
629Debug.Assert(Not (childBoundNodes.IsDefault), "Field 'childBoundNodes' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
663Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
702Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
744Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
745Debug.Assert(Not (indices.IsDefault), "Field 'indices' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
746Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
801Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
802Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
836Debug.Assert(sourceType IsNot Nothing, "Field 'sourceType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
837Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
879Debug.Assert(field IsNot Nothing, "Field 'field' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
880Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
888Debug.Assert(field IsNot Nothing, "Field 'field' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
889Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
923Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
924Debug.Assert(getMethodFromHandle IsNot Nothing, "Field 'getMethodFromHandle' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
925Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
934Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
935Debug.Assert(getMethodFromHandle IsNot Nothing, "Field 'getMethodFromHandle' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
936Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
978Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1020Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1028Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1062Debug.Assert(namespaceSymbol IsNot Nothing, "Field 'namespaceSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1117Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1118Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1131Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1132Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1168Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1175Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1201Debug.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)")
1252Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1260Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1294Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1301Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1327Debug.Assert(document IsNot Nothing, "Field 'document' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1328Debug.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)")
1371Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1372Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1435Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1436Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1483Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1484Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1523Debug.Assert(left IsNot Nothing, "Field 'left' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1524Debug.Assert(right IsNot Nothing, "Field 'right' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1525Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1596Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1597Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1652Debug.Assert(bitwiseOperator IsNot Nothing, "Field 'bitwiseOperator' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1653Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1716Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1723Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1749Debug.Assert(left IsNot Nothing, "Field 'left' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1750Debug.Assert(right IsNot Nothing, "Field 'right' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1751Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1814Debug.Assert(byRefLocal IsNot Nothing, "Field 'byRefLocal' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1815Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1870Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1871Debug.Assert(methodGroup IsNot Nothing, "Field 'methodGroup' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1921Debug.Assert(condition IsNot Nothing, "Field 'condition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1922Debug.Assert(whenTrue IsNot Nothing, "Field 'whenTrue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1923Debug.Assert(whenFalse IsNot Nothing, "Field 'whenFalse' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1924Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1987Debug.Assert(testExpression IsNot Nothing, "Field 'testExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1988Debug.Assert(elseExpression IsNot Nothing, "Field 'elseExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
1989Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2060Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2067Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2079Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2080Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2172Debug.Assert(lambda IsNot Nothing, "Field 'lambda' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2214Debug.Assert(Not (elementPlaceholders.IsDefault), "Field 'elementPlaceholders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2215Debug.Assert(Not (convertedElements.IsDefault), "Field 'convertedElements' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2262Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2263Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2310Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2311Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2382Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2383Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2446Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2447Debug.Assert(targetType IsNot Nothing, "Field 'targetType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2448Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2542Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2676Debug.Assert(Not (methods.IsDefault), "Field 'methods' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2734Debug.Assert(Not (properties.IsDefault), "Field 'properties' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2828Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2898Debug.Assert(Not (clauses.IsDefault), "Field 'clauses' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2932Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2933Debug.Assert(Not (indices.IsDefault), "Field 'indices' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
2996Debug.Assert(Not (clauses.IsDefault), "Field 'clauses' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3030Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3031Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3032Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3127Debug.Assert(Not (constructorArguments.IsDefault), "Field 'constructorArguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3128Debug.Assert(Not (namedArguments.IsDefault), "Field 'namedArguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3129Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3195Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3266Debug.Assert(member IsNot Nothing, "Field 'member' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3267Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3338Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3339Debug.Assert(memberAccess IsNot Nothing, "Field 'memberAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3381Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3401Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3451Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3452Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3486Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3511Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3512Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3575Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3609Debug.Assert(Not (declarations.IsDefault), "Field 'declarations' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3610Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3660Debug.Assert(binder IsNot Nothing, "Field 'binder' 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)")
3711Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3712Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3754Debug.Assert(Not (initializers.IsDefault), "Field 'initializers' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3782Debug.Assert(Not (initializers.IsDefault), "Field 'initializers' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3821Debug.Assert(Not (initializers.IsDefault), "Field 'initializers' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3852Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3883Debug.Assert(method IsNot Nothing, "Field 'method' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3884Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3950Debug.Assert(Not (bounds.IsDefault), "Field 'bounds' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
3951Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4022Debug.Assert(inferredType IsNot Nothing, "Field 'inferredType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4023Debug.Assert(Not (bounds.IsDefault), "Field 'bounds' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4024Debug.Assert(initializer IsNot Nothing, "Field 'initializer' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4025Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4099Debug.Assert(Not (initializers.IsDefault), "Field 'initializers' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4133Debug.Assert(fieldSymbol IsNot Nothing, "Field 'fieldSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4134Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4205Debug.Assert(propertySymbol IsNot Nothing, "Field 'propertySymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4206Debug.Assert(Not (arguments.IsDefault), "Field 'arguments' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4207Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4302Debug.Assert(eventSymbol IsNot Nothing, "Field 'eventSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4303Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4345Debug.Assert(Not (locals.IsDefault), "Field 'locals' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4346Debug.Assert(Not (statements.IsDefault), "Field 'statements' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4396Debug.Assert(Not (fields.IsDefault), "Field 'fields' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4397Debug.Assert(statement IsNot Nothing, "Field 'statement' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4452Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4515Debug.Assert(Not (localDeclarations.IsDefault), "Field 'localDeclarations' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4516Debug.Assert(initializer IsNot Nothing, "Field 'initializer' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4517Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4567Debug.Assert(Not (localDeclarations.IsDefault), "Field 'localDeclarations' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4635Debug.Assert(initialValue IsNot Nothing, "Field 'initialValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4671Debug.Assert(Not (initializedFields.IsDefault), "Field 'initializedFields' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4672Debug.Assert(initialValue IsNot Nothing, "Field 'initialValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4706Debug.Assert(Not (initializedProperties.IsDefault), "Field 'initializedProperties' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4707Debug.Assert(initialValue IsNot Nothing, "Field 'initialValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4741Debug.Assert(parameter IsNot Nothing, "Field 'parameter' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4742Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4784Debug.Assert(statement IsNot Nothing, "Field 'statement' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4818Debug.Assert(Not (locals.IsDefault), "Field 'locals' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4819Debug.Assert(Not (sideEffects.IsDefault), "Field 'sideEffects' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4820Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4875Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4909Debug.Assert(condition IsNot Nothing, "Field 'condition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4910Debug.Assert(consequence IsNot Nothing, "Field 'consequence' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4960Debug.Assert(expressionStatement IsNot Nothing, "Field 'expressionStatement' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4961Debug.Assert(Not (caseBlocks.IsDefault), "Field 'caseBlocks' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
4962Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5028Debug.Assert(caseStatement IsNot Nothing, "Field 'caseStatement' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5029Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5071Debug.Assert(Not (caseClauses.IsDefault), "Field 'caseClauses' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5275Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5276Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5285Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5286Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5314Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5315Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5316Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5382Debug.Assert(condition IsNot Nothing, "Field 'condition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5383Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5384Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5385Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5427Debug.Assert(controlVariable IsNot Nothing, "Field 'controlVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5428Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5429Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5430Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5474Debug.Assert(leftOperandPlaceholder IsNot Nothing, "Field 'leftOperandPlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5475Debug.Assert(rightOperandPlaceholder IsNot Nothing, "Field 'rightOperandPlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5476Debug.Assert(addition IsNot Nothing, "Field 'addition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5477Debug.Assert(subtraction IsNot Nothing, "Field 'subtraction' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5478Debug.Assert(lessThanOrEqual IsNot Nothing, "Field 'lessThanOrEqual' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5479Debug.Assert(greaterThanOrEqual IsNot Nothing, "Field 'greaterThanOrEqual' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5558Debug.Assert(initialValue IsNot Nothing, "Field 'initialValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5559Debug.Assert(limitValue IsNot Nothing, "Field 'limitValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5560Debug.Assert(stepValue IsNot Nothing, "Field 'stepValue' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5561Debug.Assert(controlVariable IsNot Nothing, "Field 'controlVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5562Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5563Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5564Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5630Debug.Assert(collection IsNot Nothing, "Field 'collection' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5631Debug.Assert(enumeratorInfo IsNot Nothing, "Field 'enumeratorInfo' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5632Debug.Assert(controlVariable IsNot Nothing, "Field 'controlVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5633Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5634Debug.Assert(continueLabel IsNot Nothing, "Field 'continueLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5635Debug.Assert(exitLabel IsNot Nothing, "Field 'exitLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5677Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5685Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5719Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5727Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5761Debug.Assert(tryBlock IsNot Nothing, "Field 'tryBlock' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5762Debug.Assert(Not (catchBlocks.IsDefault), "Field 'catchBlocks' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5820Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5894Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5907Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5943Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5950Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5976Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
5988Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6016Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6023Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6049Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6056Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6082Debug.Assert(sourceType IsNot Nothing, "Field 'sourceType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6083Debug.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)")
6126Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6133Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6159Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6160Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6174Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6175Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6219Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6220Debug.Assert(emitExpressions IsNot Nothing, "Field 'emitExpressions' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6221Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6236Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6237Debug.Assert(emitExpressions IsNot Nothing, "Field 'emitExpressions' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6238Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6290Debug.Assert(parameterSymbol IsNot Nothing, "Field 'parameterSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6291Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6301Debug.Assert(parameterSymbol IsNot Nothing, "Field 'parameterSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6302Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6352Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6360Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6394Debug.Assert(originalArgument IsNot Nothing, "Field 'originalArgument' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6395Debug.Assert(inConversion IsNot Nothing, "Field 'inConversion' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6396Debug.Assert(inPlaceholder IsNot Nothing, "Field 'inPlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6397Debug.Assert(outConversion IsNot Nothing, "Field 'outConversion' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6398Debug.Assert(outPlaceholder IsNot Nothing, "Field 'outPlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6469Debug.Assert(originalArgument IsNot Nothing, "Field 'originalArgument' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6470Debug.Assert(localSymbol IsNot Nothing, "Field 'localSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6517Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6525Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6559Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6567Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6601Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6643Debug.Assert(Not (statements.IsDefault), "Field 'statements' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6677Debug.Assert(condition IsNot Nothing, "Field 'condition' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6678Debug.Assert(label IsNot Nothing, "Field 'label' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6728Debug.Assert(originalExpression IsNot Nothing, "Field 'originalExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6729Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6730Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6780Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6781Debug.Assert(Not (parameters.IsDefault), "Field 'parameters' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6782Debug.Assert(bindingCache IsNot Nothing, "Field 'bindingCache' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6799Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6800Debug.Assert(Not (parameters.IsDefault), "Field 'parameters' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6801Debug.Assert(bindingCache IsNot Nothing, "Field 'bindingCache' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6869Debug.Assert(lambdaSymbol IsNot Nothing, "Field 'lambdaSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6870Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6949Debug.Assert(lastOperator IsNot Nothing, "Field 'lastOperator' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6950Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6984Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
6991Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7003Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7004Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7038Debug.Assert(conversionCall IsNot Nothing, "Field 'conversionCall' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7039Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7073Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7074Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7075Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7076Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7086Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7087Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7088Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7089Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7125Debug.Assert(source IsNot Nothing, "Field 'source' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7126Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7127Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7128Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7129Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7176Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7177Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7178Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7179Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7180Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7214Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7215Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7249Debug.Assert(lambdaSymbol IsNot Nothing, "Field 'lambdaSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7250Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7251Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7309Debug.Assert(rangeVariable IsNot Nothing, "Field 'rangeVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7310Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7311Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7353Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7354Debug.Assert(Not (parameters.IsDefault), "Field 'parameters' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7355Debug.Assert(compilation IsNot Nothing, "Field 'compilation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7365Debug.Assert(binder IsNot Nothing, "Field 'binder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7366Debug.Assert(Not (parameters.IsDefault), "Field 'parameters' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7367Debug.Assert(compilation IsNot Nothing, "Field 'compilation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7417Debug.Assert(underlyingExpression IsNot Nothing, "Field 'underlyingExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7418Debug.Assert(Not (rangeVariables.IsDefault), "Field 'rangeVariables' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7419Debug.Assert(compoundVariableType IsNot Nothing, "Field 'compoundVariableType' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7420Debug.Assert(Not (binders.IsDefault), "Field 'binders' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7421Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7471Debug.Assert(group IsNot Nothing, "Field 'group' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7472Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7506Debug.Assert(rangeVariable IsNot Nothing, "Field 'rangeVariable' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7507Debug.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)")
7550Debug.Assert(eventAccess IsNot Nothing, "Field 'eventAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7551Debug.Assert(handler IsNot Nothing, "Field 'handler' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7579Debug.Assert(eventAccess IsNot Nothing, "Field 'eventAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7580Debug.Assert(handler IsNot Nothing, "Field 'handler' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7606Debug.Assert(eventAccess IsNot Nothing, "Field 'eventAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7607Debug.Assert(handler IsNot Nothing, "Field 'handler' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7633Debug.Assert(eventSymbol IsNot Nothing, "Field 'eventSymbol' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7634Debug.Assert(eventInvocation IsNot Nothing, "Field 'eventInvocation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7676Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7677Debug.Assert(usingInfo IsNot Nothing, "Field 'usingInfo' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7678Debug.Assert(Not (locals.IsDefault), "Field 'locals' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7744Debug.Assert(lockExpression IsNot Nothing, "Field 'lockExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7745Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7787Debug.Assert(xmlNamespace IsNot Nothing, "Field 'xmlNamespace' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7788Debug.Assert(localName IsNot Nothing, "Field 'localName' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7789Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7790Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7840Debug.Assert(xmlNamespace IsNot Nothing, "Field 'xmlNamespace' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7841Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7842Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7884Debug.Assert(declaration IsNot Nothing, "Field 'declaration' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7885Debug.Assert(Not (childNodes.IsDefault), "Field 'childNodes' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7886Debug.Assert(rewriterInfo IsNot Nothing, "Field 'rewriterInfo' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7887Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7937Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7938Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7996Debug.Assert(target IsNot Nothing, "Field 'target' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7997Debug.Assert(data IsNot Nothing, "Field 'data' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7998Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
7999Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8049Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8050Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8051Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8093Debug.Assert(name IsNot Nothing, "Field 'name' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8094Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8095Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8096Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8159Debug.Assert(argument IsNot Nothing, "Field 'argument' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8160Debug.Assert(Not (childNodes.IsDefault), "Field 'childNodes' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8161Debug.Assert(rewriterInfo IsNot Nothing, "Field 'rewriterInfo' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8162Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8212Debug.Assert(memberAccess IsNot Nothing, "Field 'memberAccess' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8213Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8247Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8248Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8282Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8283Debug.Assert(objectCreation IsNot Nothing, "Field 'objectCreation' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8284Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8430Debug.Assert(body IsNot Nothing, "Field 'body' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8501Debug.Assert(activeHandlerLocal IsNot Nothing, "Field 'activeHandlerLocal' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8502Debug.Assert(resumeTargetLocal IsNot Nothing, "Field 'resumeTargetLocal' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8503Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8550Debug.Assert(value IsNot Nothing, "Field 'value' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8551Debug.Assert(Not (jumps.IsDefault), "Field 'jumps' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8598Debug.Assert(resumeTargetTemporary IsNot Nothing, "Field 'resumeTargetTemporary' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8599Debug.Assert(resumeLabel IsNot Nothing, "Field 'resumeLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8600Debug.Assert(resumeNextLabel IsNot Nothing, "Field 'resumeNextLabel' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8601Debug.Assert(Not (jumps.IsDefault), "Field 'jumps' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8664Debug.Assert(operand IsNot Nothing, "Field 'operand' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8665Debug.Assert(awaitableInstancePlaceholder IsNot Nothing, "Field 'awaitableInstancePlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8666Debug.Assert(getAwaiter IsNot Nothing, "Field 'getAwaiter' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8667Debug.Assert(awaiterInstancePlaceholder IsNot Nothing, "Field 'awaiterInstancePlaceholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8668Debug.Assert(isCompleted IsNot Nothing, "Field 'isCompleted' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8669Debug.Assert(getResult IsNot Nothing, "Field 'getResult' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8670Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8749Debug.Assert(Not (locals.IsDefault), "Field 'locals' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8750Debug.Assert(Not (spillFields.IsDefault), "Field 'spillFields' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8751Debug.Assert(Not (statements.IsDefault), "Field 'statements' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8850Debug.Assert(original IsNot Nothing, "Field 'original' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8851Debug.Assert(start IsNot Nothing, "Field 'start' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8852Debug.Assert(source IsNot Nothing, "Field 'source' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8853Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8916Debug.Assert(receiver IsNot Nothing, "Field 'receiver' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8917Debug.Assert(placeholder IsNot Nothing, "Field 'placeholder' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8918Debug.Assert(accessExpression IsNot Nothing, "Field 'accessExpression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8968Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
8982Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9026Debug.Assert(receiver IsNot Nothing, "Field 'receiver' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9027Debug.Assert(whenNotNull IsNot Nothing, "Field 'whenNotNull' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9028Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9099Debug.Assert(valueTypeReceiver IsNot Nothing, "Field 'valueTypeReceiver' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9100Debug.Assert(referenceTypeReceiver IsNot Nothing, "Field 'referenceTypeReceiver' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9101Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9148Debug.Assert(argument IsNot Nothing, "Field 'argument' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9149Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9196Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9197Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9236Debug.Assert(Not (contents.IsDefault), "Field 'contents' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9237Debug.Assert(type IsNot Nothing, "Field 'type' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
9284Debug.Assert(expression IsNot Nothing, "Field 'expression' cannot be null (use Null=""allow"" in BoundNodes.xml to remove this check)")
Generated\Syntax.xml.Internal.Generated.vb (2313)
149Debug.Assert(false, "child index out of range")
244Debug.Assert(false, "child index out of range")
430Debug.Assert(false, "child index out of range")
551Debug.Assert(false, "child index out of range")
653Debug.Assert(false, "child index out of range")
777Debug.Assert(false, "child index out of range")
869Debug.Assert(false, "child index out of range")
973Debug.Assert(false, "child index out of range")
1092Debug.Assert(false, "child index out of range")
1185Debug.Assert(false, "child index out of range")
1388Debug.Assert(false, "child index out of range")
1487Debug.Assert(false, "child index out of range")
1586Debug.Assert(false, "child index out of range")
1685Debug.Assert(false, "child index out of range")
1805Debug.Assert(false, "child index out of range")
1926Debug.Assert(false, "child index out of range")
2024Debug.Assert(false, "child index out of range")
2232Debug.Assert(false, "child index out of range")
2315Debug.Assert(false, "child index out of range")
2398Debug.Assert(false, "child index out of range")
2481Debug.Assert(false, "child index out of range")
2658Debug.Assert(false, "child index out of range")
2793Debug.Assert(false, "child index out of range")
2923Debug.Assert(false, "child index out of range")
3041Debug.Assert(false, "child index out of range")
3177Debug.Assert(false, "child index out of range")
3276Debug.Assert(false, "child index out of range")
3349Debug.Assert(false, "child index out of range")
3471Debug.Assert(false, "child index out of range")
3622Debug.Assert(false, "child index out of range")
3717Debug.Assert(false, "child index out of range")
3812Debug.Assert(false, "child index out of range")
3910Debug.Assert(false, "child index out of range")
4028Debug.Assert(false, "child index out of range")
4146Debug.Assert(false, "child index out of range")
4378Debug.Assert(false, "child index out of range")
4590Debug.Assert(false, "child index out of range")
4690Debug.Assert(false, "child index out of range")
4952Debug.Assert(false, "child index out of range")
5124Debug.Assert(false, "child index out of range")
5307Debug.Assert(false, "child index out of range")
5436Debug.Assert(false, "child index out of range")
5621Debug.Assert(false, "child index out of range")
5705Debug.Assert(false, "child index out of range")
5804Debug.Assert(false, "child index out of range")
5903Debug.Assert(false, "child index out of range")
6000Debug.Assert(false, "child index out of range")
6074Debug.Assert(false, "child index out of range")
6185Debug.Assert(false, "child index out of range")
6297Debug.Assert(false, "child index out of range")
6439Debug.Assert(false, "child index out of range")
6579Debug.Assert(false, "child index out of range")
6717Debug.Assert(false, "child index out of range")
6870Debug.Assert(false, "child index out of range")
6949Debug.Assert(false, "child index out of range")
7106Debug.Assert(false, "child index out of range")
7199Debug.Assert(false, "child index out of range")
7330Debug.Assert(false, "child index out of range")
7461Debug.Assert(false, "child index out of range")
7554Debug.Assert(false, "child index out of range")
7740Debug.Assert(false, "child index out of range")
7897Debug.Assert(false, "child index out of range")
8017Debug.Assert(false, "child index out of range")
8136Debug.Assert(false, "child index out of range")
8268Debug.Assert(false, "child index out of range")
8362Debug.Assert(false, "child index out of range")
8445Debug.Assert(false, "child index out of range")
8520Debug.Assert(false, "child index out of range")
8612Debug.Assert(false, "child index out of range")
8732Debug.Assert(false, "child index out of range")
8853Debug.Assert(false, "child index out of range")
8974Debug.Assert(false, "child index out of range")
9095Debug.Assert(false, "child index out of range")
9201Debug.Assert(false, "child index out of range")
9294Debug.Assert(false, "child index out of range")
9387Debug.Assert(false, "child index out of range")
9462Debug.Assert(false, "child index out of range")
9536Debug.Assert(false, "child index out of range")
9629Debug.Assert(false, "child index out of range")
9723Debug.Assert(false, "child index out of range")
9824Debug.Assert(false, "child index out of range")
9989Debug.Assert(false, "child index out of range")
10091Debug.Assert(false, "child index out of range")
10268Debug.Assert(false, "child index out of range")
10387Debug.Assert(false, "child index out of range")
10489Debug.Assert(false, "child index out of range")
10608Debug.Assert(false, "child index out of range")
10709Debug.Assert(false, "child index out of range")
10782Debug.Assert(false, "child index out of range")
10956Debug.Assert(false, "child index out of range")
11029Debug.Assert(false, "child index out of range")
11131Debug.Assert(false, "child index out of range")
11287Debug.Assert(false, "child index out of range")
11379Debug.Assert(false, "child index out of range")
11480Debug.Assert(false, "child index out of range")
11553Debug.Assert(false, "child index out of range")
11645Debug.Assert(false, "child index out of range")
11801Debug.Assert(false, "child index out of range")
11929Debug.Assert(false, "child index out of range")
12033Debug.Assert(false, "child index out of range")
12153Debug.Assert(false, "child index out of range")
12273Debug.Assert(false, "child index out of range")
12374Debug.Assert(false, "child index out of range")
12475Debug.Assert(false, "child index out of range")
12571Debug.Assert(false, "child index out of range")
12644Debug.Assert(false, "child index out of range")
12754Debug.Assert(false, "child index out of range")
12874Debug.Assert(false, "child index out of range")
12967Debug.Assert(false, "child index out of range")
13087Debug.Assert(false, "child index out of range")
13189Debug.Assert(false, "child index out of range")
13291Debug.Assert(false, "child index out of range")
13385Debug.Assert(false, "child index out of range")
13478Debug.Assert(false, "child index out of range")
13638Debug.Assert(false, "child index out of range")
13718Debug.Assert(false, "child index out of range")
13945Debug.Assert(false, "child index out of range")
14037Debug.Assert(false, "child index out of range")
14157Debug.Assert(false, "child index out of range")
14261Debug.Assert(false, "child index out of range")
14393Debug.Assert(false, "child index out of range")
14494Debug.Assert(false, "child index out of range")
14606Debug.Assert(false, "child index out of range")
14698Debug.Assert(false, "child index out of range")
14791Debug.Assert(false, "child index out of range")
14920Debug.Assert(false, "child index out of range")
15039Debug.Assert(false, "child index out of range")
15133Debug.Assert(false, "child index out of range")
15259Debug.Assert(false, "child index out of range")
15351Debug.Assert(false, "child index out of range")
15449Debug.Assert(false, "child index out of range")
15556Debug.Assert(false, "child index out of range")
15666Debug.Assert(false, "child index out of range")
15782Debug.Assert(false, "child index out of range")
15898Debug.Assert(false, "child index out of range")
15993Debug.Assert(false, "child index out of range")
16095Debug.Assert(false, "child index out of range")
16191Debug.Assert(false, "child index out of range")
16242Debug.Assert(false, "child index out of range")
16293Debug.Assert(false, "child index out of range")
16421Debug.Assert(false, "child index out of range")
16549Debug.Assert(false, "child index out of range")
16686Debug.Assert(false, "child index out of range")
16806Debug.Assert(false, "child index out of range")
16981Debug.Assert(false, "child index out of range")
17093Debug.Assert(false, "child index out of range")
17297Debug.Assert(false, "child index out of range")
17375Debug.Assert(false, "child index out of range")
17526Debug.Assert(false, "child index out of range")
17646Debug.Assert(false, "child index out of range")
17830Debug.Assert(false, "child index out of range")
17889Debug.Assert(false, "child index out of range")
17948Debug.Assert(false, "child index out of range")
18077Debug.Assert(false, "child index out of range")
18186Debug.Assert(false, "child index out of range")
18278Debug.Assert(false, "child index out of range")
18443Debug.Assert(false, "child index out of range")
18644Debug.Assert(false, "child index out of range")
18766Debug.Assert(false, "child index out of range")
18872Debug.Assert(false, "child index out of range")
18980Debug.Assert(false, "child index out of range")
19100Debug.Assert(false, "child index out of range")
19197Debug.Assert(false, "child index out of range")
19299Debug.Assert(false, "child index out of range")
19391Debug.Assert(false, "child index out of range")
19502Debug.Assert(false, "child index out of range")
19584Debug.Assert(false, "child index out of range")
19744Debug.Assert(false, "child index out of range")
19847Debug.Assert(false, "child index out of range")
19953Debug.Assert(false, "child index out of range")
20072Debug.Assert(false, "child index out of range")
20251Debug.Assert(false, "child index out of range")
20326Debug.Assert(false, "child index out of range")
20426Debug.Assert(false, "child index out of range")
20524Debug.Assert(false, "child index out of range")
20691Debug.Assert(false, "child index out of range")
20764Debug.Assert(false, "child index out of range")
20856Debug.Assert(false, "child index out of range")
20967Debug.Assert(false, "child index out of range")
21059Debug.Assert(false, "child index out of range")
21242Debug.Assert(false, "child index out of range")
21482Debug.Assert(false, "child index out of range")
21542Debug.Assert(false, "child index out of range")
21668Debug.Assert(false, "child index out of range")
21784Debug.Assert(false, "child index out of range")
21887Debug.Assert(false, "child index out of range")
21986Debug.Assert(false, "child index out of range")
22143Debug.Assert(false, "child index out of range")
22307Debug.Assert(false, "child index out of range")
22409Debug.Assert(false, "child index out of range")
22519Debug.Assert(false, "child index out of range")
22599Debug.Assert(false, "child index out of range")
22724Debug.Assert(false, "child index out of range")
22834Debug.Assert(false, "child index out of range")
22959Debug.Assert(false, "child index out of range")
23060Debug.Assert(false, "child index out of range")
23193Debug.Assert(false, "child index out of range")
23263Debug.Assert(false, "child index out of range")
23360Debug.Assert(false, "child index out of range")
23463Debug.Assert(false, "child index out of range")
23549Debug.Assert(false, "child index out of range")
23657Debug.Assert(false, "child index out of range")
23780Debug.Assert(false, "child index out of range")
23887Debug.Assert(false, "child index out of range")
23989Debug.Assert(false, "child index out of range")
24112Debug.Assert(false, "child index out of range")
24205Debug.Assert(false, "child index out of range")
24279Debug.Assert(false, "child index out of range")
24398Debug.Assert(false, "child index out of range")
24475Debug.Assert(false, "child index out of range")
24587Debug.Assert(false, "child index out of range")
24660Debug.Assert(false, "child index out of range")
24794Debug.Assert(false, "child index out of range")
24914Debug.Assert(false, "child index out of range")
25022Debug.Assert(false, "child index out of range")
25123Debug.Assert(false, "child index out of range")
25206Debug.Assert(false, "child index out of range")
25304Debug.Assert(false, "child index out of range")
25396Debug.Assert(false, "child index out of range")
25488Debug.Assert(false, "child index out of range")
26040Debug.Assert(false, "child index out of range")
26120Debug.Assert(false, "child index out of range")
26253Debug.Assert(false, "child index out of range")
26386Debug.Assert(false, "child index out of range")
26506Debug.Assert(false, "child index out of range")
26634Debug.Assert(false, "child index out of range")
26750Debug.Assert(false, "child index out of range")
26845Debug.Assert(false, "child index out of range")
27011Debug.Assert(false, "child index out of range")
27104Debug.Assert(false, "child index out of range")
27197Debug.Assert(false, "child index out of range")
27395Debug.Assert(false, "child index out of range")
27532Debug.Assert(false, "child index out of range")
27605Debug.Assert(false, "child index out of range")
27693Debug.Assert(false, "child index out of range")
27787Debug.Assert(false, "child index out of range")
27881Debug.Assert(false, "child index out of range")
28030Debug.Assert(false, "child index out of range")
28118Debug.Assert(false, "child index out of range")
28296Debug.Assert(false, "child index out of range")
28405Debug.Assert(false, "child index out of range")
28514Debug.Assert(false, "child index out of range")
28602Debug.Assert(false, "child index out of range")
28656Debug.Assert(false, "child index out of range")
28685Debug.Assert(node IsNot Nothing)
28689Debug.Assert(node IsNot Nothing)
28693Debug.Assert(node IsNot Nothing)
28697Debug.Assert(node IsNot Nothing)
28701Debug.Assert(node IsNot Nothing)
28705Debug.Assert(node IsNot Nothing)
28709Debug.Assert(node IsNot Nothing)
28713Debug.Assert(node IsNot Nothing)
28717Debug.Assert(node IsNot Nothing)
28721Debug.Assert(node IsNot Nothing)
28725Debug.Assert(node IsNot Nothing)
28729Debug.Assert(node IsNot Nothing)
28733Debug.Assert(node IsNot Nothing)
28737Debug.Assert(node IsNot Nothing)
28741Debug.Assert(node IsNot Nothing)
28745Debug.Assert(node IsNot Nothing)
28749Debug.Assert(node IsNot Nothing)
28753Debug.Assert(node IsNot Nothing)
28757Debug.Assert(node IsNot Nothing)
28761Debug.Assert(node IsNot Nothing)
28765Debug.Assert(node IsNot Nothing)
28769Debug.Assert(node IsNot Nothing)
28773Debug.Assert(node IsNot Nothing)
28777Debug.Assert(node IsNot Nothing)
28781Debug.Assert(node IsNot Nothing)
28785Debug.Assert(node IsNot Nothing)
28789Debug.Assert(node IsNot Nothing)
28793Debug.Assert(node IsNot Nothing)
28797Debug.Assert(node IsNot Nothing)
28801Debug.Assert(node IsNot Nothing)
28805Debug.Assert(node IsNot Nothing)
28809Debug.Assert(node IsNot Nothing)
28813Debug.Assert(node IsNot Nothing)
28817Debug.Assert(node IsNot Nothing)
28821Debug.Assert(node IsNot Nothing)
28825Debug.Assert(node IsNot Nothing)
28829Debug.Assert(node IsNot Nothing)
28833Debug.Assert(node IsNot Nothing)
28837Debug.Assert(node IsNot Nothing)
28841Debug.Assert(node IsNot Nothing)
28845Debug.Assert(node IsNot Nothing)
28849Debug.Assert(node IsNot Nothing)
28853Debug.Assert(node IsNot Nothing)
28857Debug.Assert(node IsNot Nothing)
28861Debug.Assert(node IsNot Nothing)
28865Debug.Assert(node IsNot Nothing)
28869Debug.Assert(node IsNot Nothing)
28873Debug.Assert(node IsNot Nothing)
28877Debug.Assert(node IsNot Nothing)
28881Debug.Assert(node IsNot Nothing)
28885Debug.Assert(node IsNot Nothing)
28889Debug.Assert(node IsNot Nothing)
28893Debug.Assert(node IsNot Nothing)
28897Debug.Assert(node IsNot Nothing)
28901Debug.Assert(node IsNot Nothing)
28905Debug.Assert(node IsNot Nothing)
28909Debug.Assert(node IsNot Nothing)
28913Debug.Assert(node IsNot Nothing)
28917Debug.Assert(node IsNot Nothing)
28921Debug.Assert(node IsNot Nothing)
28925Debug.Assert(node IsNot Nothing)
28929Debug.Assert(node IsNot Nothing)
28933Debug.Assert(node IsNot Nothing)
28937Debug.Assert(node IsNot Nothing)
28941Debug.Assert(node IsNot Nothing)
28945Debug.Assert(node IsNot Nothing)
28949Debug.Assert(node IsNot Nothing)
28953Debug.Assert(node IsNot Nothing)
28957Debug.Assert(node IsNot Nothing)
28961Debug.Assert(node IsNot Nothing)
28965Debug.Assert(node IsNot Nothing)
28969Debug.Assert(node IsNot Nothing)
28973Debug.Assert(node IsNot Nothing)
28977Debug.Assert(node IsNot Nothing)
28981Debug.Assert(node IsNot Nothing)
28985Debug.Assert(node IsNot Nothing)
28989Debug.Assert(node IsNot Nothing)
28993Debug.Assert(node IsNot Nothing)
28997Debug.Assert(node IsNot Nothing)
29001Debug.Assert(node IsNot Nothing)
29005Debug.Assert(node IsNot Nothing)
29009Debug.Assert(node IsNot Nothing)
29013Debug.Assert(node IsNot Nothing)
29017Debug.Assert(node IsNot Nothing)
29021Debug.Assert(node IsNot Nothing)
29025Debug.Assert(node IsNot Nothing)
29029Debug.Assert(node IsNot Nothing)
29033Debug.Assert(node IsNot Nothing)
29037Debug.Assert(node IsNot Nothing)
29041Debug.Assert(node IsNot Nothing)
29045Debug.Assert(node IsNot Nothing)
29049Debug.Assert(node IsNot Nothing)
29053Debug.Assert(node IsNot Nothing)
29057Debug.Assert(node IsNot Nothing)
29061Debug.Assert(node IsNot Nothing)
29065Debug.Assert(node IsNot Nothing)
29069Debug.Assert(node IsNot Nothing)
29073Debug.Assert(node IsNot Nothing)
29077Debug.Assert(node IsNot Nothing)
29081Debug.Assert(node IsNot Nothing)
29085Debug.Assert(node IsNot Nothing)
29089Debug.Assert(node IsNot Nothing)
29093Debug.Assert(node IsNot Nothing)
29097Debug.Assert(node IsNot Nothing)
29101Debug.Assert(node IsNot Nothing)
29105Debug.Assert(node IsNot Nothing)
29109Debug.Assert(node IsNot Nothing)
29113Debug.Assert(node IsNot Nothing)
29117Debug.Assert(node IsNot Nothing)
29121Debug.Assert(node IsNot Nothing)
29125Debug.Assert(node IsNot Nothing)
29129Debug.Assert(node IsNot Nothing)
29133Debug.Assert(node IsNot Nothing)
29137Debug.Assert(node IsNot Nothing)
29141Debug.Assert(node IsNot Nothing)
29145Debug.Assert(node IsNot Nothing)
29149Debug.Assert(node IsNot Nothing)
29153Debug.Assert(node IsNot Nothing)
29157Debug.Assert(node IsNot Nothing)
29161Debug.Assert(node IsNot Nothing)
29165Debug.Assert(node IsNot Nothing)
29169Debug.Assert(node IsNot Nothing)
29173Debug.Assert(node IsNot Nothing)
29177Debug.Assert(node IsNot Nothing)
29181Debug.Assert(node IsNot Nothing)
29185Debug.Assert(node IsNot Nothing)
29189Debug.Assert(node IsNot Nothing)
29193Debug.Assert(node IsNot Nothing)
29197Debug.Assert(node IsNot Nothing)
29201Debug.Assert(node IsNot Nothing)
29205Debug.Assert(node IsNot Nothing)
29209Debug.Assert(node IsNot Nothing)
29213Debug.Assert(node IsNot Nothing)
29217Debug.Assert(node IsNot Nothing)
29221Debug.Assert(node IsNot Nothing)
29225Debug.Assert(node IsNot Nothing)
29229Debug.Assert(node IsNot Nothing)
29233Debug.Assert(node IsNot Nothing)
29237Debug.Assert(node IsNot Nothing)
29241Debug.Assert(node IsNot Nothing)
29245Debug.Assert(node IsNot Nothing)
29249Debug.Assert(node IsNot Nothing)
29253Debug.Assert(node IsNot Nothing)
29257Debug.Assert(node IsNot Nothing)
29261Debug.Assert(node IsNot Nothing)
29265Debug.Assert(node IsNot Nothing)
29269Debug.Assert(node IsNot Nothing)
29273Debug.Assert(node IsNot Nothing)
29277Debug.Assert(node IsNot Nothing)
29281Debug.Assert(node IsNot Nothing)
29285Debug.Assert(node IsNot Nothing)
29289Debug.Assert(node IsNot Nothing)
29293Debug.Assert(node IsNot Nothing)
29297Debug.Assert(node IsNot Nothing)
29301Debug.Assert(node IsNot Nothing)
29305Debug.Assert(node IsNot Nothing)
29309Debug.Assert(node IsNot Nothing)
29313Debug.Assert(node IsNot Nothing)
29317Debug.Assert(node IsNot Nothing)
29321Debug.Assert(node IsNot Nothing)
29325Debug.Assert(node IsNot Nothing)
29329Debug.Assert(node IsNot Nothing)
29333Debug.Assert(node IsNot Nothing)
29337Debug.Assert(node IsNot Nothing)
29341Debug.Assert(node IsNot Nothing)
29345Debug.Assert(node IsNot Nothing)
29349Debug.Assert(node IsNot Nothing)
29353Debug.Assert(node IsNot Nothing)
29357Debug.Assert(node IsNot Nothing)
29361Debug.Assert(node IsNot Nothing)
29365Debug.Assert(node IsNot Nothing)
29369Debug.Assert(node IsNot Nothing)
29373Debug.Assert(node IsNot Nothing)
29377Debug.Assert(node IsNot Nothing)
29381Debug.Assert(node IsNot Nothing)
29385Debug.Assert(node IsNot Nothing)
29389Debug.Assert(node IsNot Nothing)
29393Debug.Assert(node IsNot Nothing)
29397Debug.Assert(node IsNot Nothing)
29401Debug.Assert(node IsNot Nothing)
29405Debug.Assert(node IsNot Nothing)
29409Debug.Assert(node IsNot Nothing)
29413Debug.Assert(node IsNot Nothing)
29417Debug.Assert(node IsNot Nothing)
29421Debug.Assert(node IsNot Nothing)
29425Debug.Assert(node IsNot Nothing)
29429Debug.Assert(node IsNot Nothing)
29433Debug.Assert(node IsNot Nothing)
29437Debug.Assert(node IsNot Nothing)
29441Debug.Assert(node IsNot Nothing)
29445Debug.Assert(node IsNot Nothing)
29449Debug.Assert(node IsNot Nothing)
29453Debug.Assert(node IsNot Nothing)
29457Debug.Assert(node IsNot Nothing)
29461Debug.Assert(node IsNot Nothing)
29465Debug.Assert(node IsNot Nothing)
29469Debug.Assert(node IsNot Nothing)
29473Debug.Assert(node IsNot Nothing)
29477Debug.Assert(node IsNot Nothing)
29481Debug.Assert(node IsNot Nothing)
29485Debug.Assert(node IsNot Nothing)
29489Debug.Assert(node IsNot Nothing)
29493Debug.Assert(node IsNot Nothing)
29497Debug.Assert(node IsNot Nothing)
29501Debug.Assert(node IsNot Nothing)
29505Debug.Assert(node IsNot Nothing)
29509Debug.Assert(node IsNot Nothing)
29513Debug.Assert(node IsNot Nothing)
29517Debug.Assert(node IsNot Nothing)
29521Debug.Assert(node IsNot Nothing)
29525Debug.Assert(node IsNot Nothing)
29529Debug.Assert(node IsNot Nothing)
29533Debug.Assert(node IsNot Nothing)
29537Debug.Assert(node IsNot Nothing)
29541Debug.Assert(node IsNot Nothing)
29545Debug.Assert(node IsNot Nothing)
29549Debug.Assert(node IsNot Nothing)
29553Debug.Assert(node IsNot Nothing)
29557Debug.Assert(node IsNot Nothing)
29561Debug.Assert(node IsNot Nothing)
29565Debug.Assert(node IsNot Nothing)
29569Debug.Assert(node IsNot Nothing)
29573Debug.Assert(node IsNot Nothing)
29577Debug.Assert(node IsNot Nothing)
29581Debug.Assert(node IsNot Nothing)
29585Debug.Assert(node IsNot Nothing)
29589Debug.Assert(node IsNot Nothing)
29593Debug.Assert(node IsNot Nothing)
29597Debug.Assert(node IsNot Nothing)
29601Debug.Assert(node IsNot Nothing)
29605Debug.Assert(node IsNot Nothing)
29609Debug.Assert(node IsNot Nothing)
29613Debug.Assert(node IsNot Nothing)
29617Debug.Assert(node IsNot Nothing)
29621Debug.Assert(node IsNot Nothing)
29625Debug.Assert(node IsNot Nothing)
29629Debug.Assert(node IsNot Nothing)
29633Debug.Assert(node IsNot Nothing)
29637Debug.Assert(node IsNot Nothing)
29641Debug.Assert(node IsNot Nothing)
29645Debug.Assert(node IsNot Nothing)
29649Debug.Assert(node IsNot Nothing)
29653Debug.Assert(node IsNot Nothing)
29657Debug.Assert(node IsNot Nothing)
29661Debug.Assert(node IsNot Nothing)
29665Debug.Assert(node IsNot Nothing)
29669Debug.Assert(node IsNot Nothing)
29673Debug.Assert(node IsNot Nothing)
29677Debug.Assert(node IsNot Nothing)
29681Debug.Assert(node IsNot Nothing)
29685Debug.Assert(node IsNot Nothing)
29689Debug.Assert(node IsNot Nothing)
29693Debug.Assert(node IsNot Nothing)
29697Debug.Assert(node IsNot Nothing)
29701Debug.Assert(node IsNot Nothing)
29705Debug.Assert(node IsNot Nothing)
29709Debug.Assert(node IsNot Nothing)
29713Debug.Assert(node IsNot Nothing)
29717Debug.Assert(node IsNot Nothing)
29721Debug.Assert(node IsNot Nothing)
29725Debug.Assert(node IsNot Nothing)
29729Debug.Assert(node IsNot Nothing)
29733Debug.Assert(node IsNot Nothing)
29737Debug.Assert(node IsNot Nothing)
29741Debug.Assert(node IsNot Nothing)
29745Debug.Assert(node IsNot Nothing)
29749Debug.Assert(node IsNot Nothing)
29753Debug.Assert(node IsNot Nothing)
29757Debug.Assert(node IsNot Nothing)
29761Debug.Assert(node IsNot Nothing)
29765Debug.Assert(node IsNot Nothing)
29769Debug.Assert(node IsNot Nothing)
29773Debug.Assert(node IsNot Nothing)
29777Debug.Assert(node IsNot Nothing)
29781Debug.Assert(node IsNot Nothing)
29785Debug.Assert(node IsNot Nothing)
29789Debug.Assert(node IsNot Nothing)
29793Debug.Assert(node IsNot Nothing)
29797Debug.Assert(node IsNot Nothing)
29801Debug.Assert(node IsNot Nothing)
29805Debug.Assert(node IsNot Nothing)
34020Debug.Assert(empty IsNot Nothing AndAlso empty.Kind = SyntaxKind.EmptyToken)
34050Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34051Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.IfKeyword)
34081Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34082Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.UsingKeyword)
34112Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34113Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.WithKeyword)
34143Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34144Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SelectKeyword)
34174Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34175Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.StructureKeyword)
34205Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34206Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.EnumKeyword)
34236Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34237Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.InterfaceKeyword)
34267Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34268Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.ClassKeyword)
34298Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34299Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.ModuleKeyword)
34329Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34330Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.NamespaceKeyword)
34360Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34361Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SubKeyword)
34391Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34392Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.FunctionKeyword)
34422Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34423Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.GetKeyword)
34453Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34454Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SetKeyword)
34484Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34485Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.PropertyKeyword)
34515Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34516Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.OperatorKeyword)
34546Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34547Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.EventKeyword)
34577Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34578Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.AddHandlerKeyword)
34608Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34609Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.RemoveHandlerKeyword)
34639Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34640Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.RaiseEventKeyword)
34670Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34671Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.WhileKeyword)
34701Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34702Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.TryKeyword)
34732Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34733Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SyncLockKeyword)
34773Debug.Assert(SyntaxFacts.IsEndBlockStatement(kind))
34774Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
34775Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsEndBlockStatementBlockKeyword(blockKeyword.Kind))
34815Debug.Assert(endOfFileToken IsNot Nothing AndAlso endOfFileToken.Kind = SyntaxKind.EndOfFileToken)
34835Debug.Assert(optionKeyword IsNot Nothing AndAlso optionKeyword.Kind = SyntaxKind.OptionKeyword)
34836Debug.Assert(nameKeyword IsNot Nothing AndAlso SyntaxFacts.IsOptionStatementNameKeyword(nameKeyword.Kind))
34864Debug.Assert(importsKeyword IsNot Nothing AndAlso importsKeyword.Kind = SyntaxKind.ImportsKeyword)
34892Debug.Assert(name IsNot Nothing)
34919Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
34920Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
34944Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
34945Debug.Assert(xmlNamespace IsNot Nothing)
34946Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
34976Debug.Assert(namespaceStatement IsNot Nothing)
34977Debug.Assert(endNamespaceStatement IsNot Nothing)
35005Debug.Assert(namespaceKeyword IsNot Nothing AndAlso namespaceKeyword.Kind = SyntaxKind.NamespaceKeyword)
35006Debug.Assert(name IsNot Nothing)
35043Debug.Assert(moduleStatement IsNot Nothing)
35044Debug.Assert(endModuleStatement IsNot Nothing)
35069Debug.Assert(structureStatement IsNot Nothing)
35070Debug.Assert(endStructureStatement IsNot Nothing)
35095Debug.Assert(interfaceStatement IsNot Nothing)
35096Debug.Assert(endInterfaceStatement IsNot Nothing)
35121Debug.Assert(classStatement IsNot Nothing)
35122Debug.Assert(endClassStatement IsNot Nothing)
35141Debug.Assert(enumStatement IsNot Nothing)
35142Debug.Assert(endEnumStatement IsNot Nothing)
35169Debug.Assert(inheritsKeyword IsNot Nothing AndAlso inheritsKeyword.Kind = SyntaxKind.InheritsKeyword)
35196Debug.Assert(implementsKeyword IsNot Nothing AndAlso implementsKeyword.Kind = SyntaxKind.ImplementsKeyword)
35236Debug.Assert(moduleKeyword IsNot Nothing AndAlso moduleKeyword.Kind = SyntaxKind.ModuleKeyword)
35237Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
35265Debug.Assert(structureKeyword IsNot Nothing AndAlso structureKeyword.Kind = SyntaxKind.StructureKeyword)
35266Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
35294Debug.Assert(interfaceKeyword IsNot Nothing AndAlso interfaceKeyword.Kind = SyntaxKind.InterfaceKeyword)
35295Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
35323Debug.Assert(classKeyword IsNot Nothing AndAlso classKeyword.Kind = SyntaxKind.ClassKeyword)
35324Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
35352Debug.Assert(enumKeyword IsNot Nothing AndAlso enumKeyword.Kind = SyntaxKind.EnumKeyword)
35353Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
35375Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
35376Debug.Assert(ofKeyword IsNot Nothing AndAlso ofKeyword.Kind = SyntaxKind.OfKeyword)
35377Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
35397Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
35427Debug.Assert(asKeyword IsNot Nothing AndAlso asKeyword.Kind = SyntaxKind.AsKeyword)
35428Debug.Assert(constraint IsNot Nothing)
35463Debug.Assert(asKeyword IsNot Nothing AndAlso asKeyword.Kind = SyntaxKind.AsKeyword)
35464Debug.Assert(openBraceToken IsNot Nothing AndAlso openBraceToken.Kind = SyntaxKind.OpenBraceToken)
35465Debug.Assert(closeBraceToken IsNot Nothing AndAlso closeBraceToken.Kind = SyntaxKind.CloseBraceToken)
35480Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind))
35507Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind))
35534Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind))
35566Debug.Assert(SyntaxFacts.IsSpecialConstraint(kind))
35567Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind))
35591Debug.Assert(type IsNot Nothing)
35615Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
35646Debug.Assert(subOrFunctionStatement IsNot Nothing)
35647Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
35678Debug.Assert(subOrFunctionStatement IsNot Nothing)
35679Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
35714Debug.Assert(SyntaxFacts.IsMethodBlock(kind))
35715Debug.Assert(subOrFunctionStatement IsNot Nothing)
35716Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
35747Debug.Assert(subNewStatement IsNot Nothing)
35748Debug.Assert(endSubStatement IsNot Nothing)
35779Debug.Assert(operatorStatement IsNot Nothing)
35780Debug.Assert(endOperatorStatement IsNot Nothing)
35814Debug.Assert(accessorStatement IsNot Nothing)
35815Debug.Assert(endAccessorStatement IsNot Nothing)
35849Debug.Assert(accessorStatement IsNot Nothing)
35850Debug.Assert(endAccessorStatement IsNot Nothing)
35884Debug.Assert(accessorStatement IsNot Nothing)
35885Debug.Assert(endAccessorStatement IsNot Nothing)
35919Debug.Assert(accessorStatement IsNot Nothing)
35920Debug.Assert(endAccessorStatement IsNot Nothing)
35954Debug.Assert(accessorStatement IsNot Nothing)
35955Debug.Assert(endAccessorStatement IsNot Nothing)
35994Debug.Assert(SyntaxFacts.IsAccessorBlock(kind))
35995Debug.Assert(accessorStatement IsNot Nothing)
35996Debug.Assert(endAccessorStatement IsNot Nothing)
36028Debug.Assert(propertyStatement IsNot Nothing)
36029Debug.Assert(endPropertyStatement IsNot Nothing)
36061Debug.Assert(eventStatement IsNot Nothing)
36062Debug.Assert(endEventStatement IsNot Nothing)
36094Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
36095Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
36154Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.SubKeyword)
36155Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36202Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.FunctionKeyword)
36203Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36254Debug.Assert(SyntaxFacts.IsMethodStatement(kind))
36255Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsMethodStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind))
36256Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36287Debug.Assert(subKeyword IsNot Nothing AndAlso subKeyword.Kind = SyntaxKind.SubKeyword)
36288Debug.Assert(newKeyword IsNot Nothing AndAlso newKeyword.Kind = SyntaxKind.NewKeyword)
36340Debug.Assert(declareKeyword IsNot Nothing AndAlso declareKeyword.Kind = SyntaxKind.DeclareKeyword)
36341Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.SubKeyword)
36342Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36343Debug.Assert(libKeyword IsNot Nothing AndAlso libKeyword.Kind = SyntaxKind.LibKeyword)
36344Debug.Assert(libraryName IsNot Nothing)
36396Debug.Assert(declareKeyword IsNot Nothing AndAlso declareKeyword.Kind = SyntaxKind.DeclareKeyword)
36397Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.FunctionKeyword)
36398Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36399Debug.Assert(libKeyword IsNot Nothing AndAlso libKeyword.Kind = SyntaxKind.LibKeyword)
36400Debug.Assert(libraryName IsNot Nothing)
36456Debug.Assert(SyntaxFacts.IsDeclareStatement(kind))
36457Debug.Assert(declareKeyword IsNot Nothing AndAlso declareKeyword.Kind = SyntaxKind.DeclareKeyword)
36458Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsDeclareStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind))
36459Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36460Debug.Assert(libKeyword IsNot Nothing AndAlso libKeyword.Kind = SyntaxKind.LibKeyword)
36461Debug.Assert(libraryName IsNot Nothing)
36501Debug.Assert(delegateKeyword IsNot Nothing AndAlso delegateKeyword.Kind = SyntaxKind.DelegateKeyword)
36502Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.SubKeyword)
36503Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36543Debug.Assert(delegateKeyword IsNot Nothing AndAlso delegateKeyword.Kind = SyntaxKind.DelegateKeyword)
36544Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.FunctionKeyword)
36545Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36590Debug.Assert(SyntaxFacts.IsDelegateStatement(kind))
36591Debug.Assert(delegateKeyword IsNot Nothing AndAlso delegateKeyword.Kind = SyntaxKind.DelegateKeyword)
36592Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsDelegateStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind))
36593Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36635Debug.Assert(eventKeyword IsNot Nothing AndAlso eventKeyword.Kind = SyntaxKind.EventKeyword)
36636Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36672Debug.Assert(operatorKeyword IsNot Nothing AndAlso operatorKeyword.Kind = SyntaxKind.OperatorKeyword)
36673Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsOperatorStatementOperatorToken(operatorToken.Kind))
36717Debug.Assert(propertyKeyword IsNot Nothing AndAlso propertyKeyword.Kind = SyntaxKind.PropertyKeyword)
36718Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
36748Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.GetKeyword)
36778Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.SetKeyword)
36808Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.AddHandlerKeyword)
36838Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.RemoveHandlerKeyword)
36868Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.RaiseEventKeyword)
36904Debug.Assert(SyntaxFacts.IsAccessorStatement(kind))
36905Debug.Assert(accessorKeyword IsNot Nothing AndAlso SyntaxFacts.IsAccessorStatementAccessorKeyword(accessorKeyword.Kind))
36921Debug.Assert(implementsKeyword IsNot Nothing AndAlso implementsKeyword.Kind = SyntaxKind.ImplementsKeyword)
36949Debug.Assert(handlesKeyword IsNot Nothing AndAlso handlesKeyword.Kind = SyntaxKind.HandlesKeyword)
36975Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsKeywordEventContainerKeyword(keyword.Kind))
37000Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
37031Debug.Assert(withEventsContainer IsNot Nothing)
37032Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
37033Debug.Assert([property] IsNot Nothing)
37065Debug.Assert(eventContainer IsNot Nothing)
37066Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
37067Debug.Assert(eventMember IsNot Nothing)
37202Debug.Assert(asKeyword IsNot Nothing AndAlso asKeyword.Kind = SyntaxKind.AsKeyword)
37203Debug.Assert(type IsNot Nothing)
37233Debug.Assert(asKeyword IsNot Nothing AndAlso asKeyword.Kind = SyntaxKind.AsKeyword)
37234Debug.Assert(newExpression IsNot Nothing)
37267Debug.Assert(withKeyword IsNot Nothing AndAlso withKeyword.Kind = SyntaxKind.WithKeyword)
37268Debug.Assert(openBraceToken IsNot Nothing AndAlso openBraceToken.Kind = SyntaxKind.OpenBraceToken)
37269Debug.Assert(closeBraceToken IsNot Nothing AndAlso closeBraceToken.Kind = SyntaxKind.CloseBraceToken)
37285Debug.Assert(fromKeyword IsNot Nothing AndAlso fromKeyword.Kind = SyntaxKind.FromKeyword)
37286Debug.Assert(initializer IsNot Nothing)
37314Debug.Assert(expression IsNot Nothing)
37351Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
37352Debug.Assert(name IsNot Nothing)
37353Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
37354Debug.Assert(expression IsNot Nothing)
37370Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
37371Debug.Assert(value IsNot Nothing)
37411Debug.Assert(identifier IsNot Nothing)
37434Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
37453Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
37454Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
37484Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
37485Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
37516Debug.Assert(name IsNot Nothing)
37533Debug.Assert(attributeModifier IsNot Nothing AndAlso SyntaxFacts.IsAttributeTargetAttributeModifier(attributeModifier.Kind))
37534Debug.Assert(colonToken IsNot Nothing AndAlso colonToken.Kind = SyntaxKind.ColonToken)
37584Debug.Assert(expression IsNot Nothing)
37611Debug.Assert(questionToken IsNot Nothing AndAlso questionToken.Kind = SyntaxKind.QuestionToken)
37612Debug.Assert(expression IsNot Nothing)
37643Debug.Assert(whileStatement IsNot Nothing)
37644Debug.Assert(endWhileStatement IsNot Nothing)
37676Debug.Assert(usingStatement IsNot Nothing)
37677Debug.Assert(endUsingStatement IsNot Nothing)
37709Debug.Assert(syncLockStatement IsNot Nothing)
37710Debug.Assert(endSyncLockStatement IsNot Nothing)
37742Debug.Assert(withStatement IsNot Nothing)
37743Debug.Assert(endWithStatement IsNot Nothing)
37799Debug.Assert(labelToken IsNot Nothing AndAlso SyntaxFacts.IsLabelStatementLabelToken(labelToken.Kind))
37800Debug.Assert(colonToken IsNot Nothing AndAlso colonToken.Kind = SyntaxKind.ColonToken)
37828Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
37829Debug.Assert(label IsNot Nothing)
37855Debug.Assert(labelToken IsNot Nothing AndAlso labelToken.Kind = SyntaxKind.IdentifierToken)
37881Debug.Assert(labelToken IsNot Nothing AndAlso labelToken.Kind = SyntaxKind.IntegerLiteralToken)
37907Debug.Assert(labelToken IsNot Nothing AndAlso labelToken.Kind = SyntaxKind.NextKeyword)
37937Debug.Assert(SyntaxFacts.IsLabel(kind))
37938Debug.Assert(labelToken IsNot Nothing AndAlso SyntaxFacts.IsLabelLabelToken(labelToken.Kind))
37963Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind))
37988Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind))
38017Debug.Assert(SyntaxFacts.IsStopOrEndStatement(kind))
38018Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind))
38046Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38047Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.DoKeyword)
38075Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38076Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.ForKeyword)
38104Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38105Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SubKeyword)
38133Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38134Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.FunctionKeyword)
38162Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38163Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.OperatorKeyword)
38191Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38192Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.PropertyKeyword)
38220Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38221Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.TryKeyword)
38249Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38250Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SelectKeyword)
38278Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38279Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.WhileKeyword)
38314Debug.Assert(SyntaxFacts.IsExitStatement(kind))
38315Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
38316Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsExitStatementBlockKeyword(blockKeyword.Kind))
38345Debug.Assert(continueKeyword IsNot Nothing AndAlso continueKeyword.Kind = SyntaxKind.ContinueKeyword)
38346Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.WhileKeyword)
38375Debug.Assert(continueKeyword IsNot Nothing AndAlso continueKeyword.Kind = SyntaxKind.ContinueKeyword)
38376Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.DoKeyword)
38405Debug.Assert(continueKeyword IsNot Nothing AndAlso continueKeyword.Kind = SyntaxKind.ContinueKeyword)
38406Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.ForKeyword)
38440Debug.Assert(SyntaxFacts.IsContinueStatement(kind))
38441Debug.Assert(continueKeyword IsNot Nothing AndAlso continueKeyword.Kind = SyntaxKind.ContinueKeyword)
38442Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsContinueStatementBlockKeyword(blockKeyword.Kind))
38469Debug.Assert(returnKeyword IsNot Nothing AndAlso returnKeyword.Kind = SyntaxKind.ReturnKeyword)
38506Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
38507Debug.Assert(condition IsNot Nothing)
38508Debug.Assert(thenKeyword IsNot Nothing AndAlso thenKeyword.Kind = SyntaxKind.ThenKeyword)
38524Debug.Assert(elseKeyword IsNot Nothing AndAlso elseKeyword.Kind = SyntaxKind.ElseKeyword)
38564Debug.Assert(ifStatement IsNot Nothing)
38565Debug.Assert(endIfStatement IsNot Nothing)
38583Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
38584Debug.Assert(condition IsNot Nothing)
38612Debug.Assert(elseIfStatement IsNot Nothing)
38642Debug.Assert(elseIfKeyword IsNot Nothing AndAlso elseIfKeyword.Kind = SyntaxKind.ElseIfKeyword)
38643Debug.Assert(condition IsNot Nothing)
38670Debug.Assert(elseStatement IsNot Nothing)
38694Debug.Assert(elseKeyword IsNot Nothing AndAlso elseKeyword.Kind = SyntaxKind.ElseKeyword)
38731Debug.Assert(tryStatement IsNot Nothing)
38732Debug.Assert(endTryStatement IsNot Nothing)
38744Debug.Assert(tryKeyword IsNot Nothing AndAlso tryKeyword.Kind = SyntaxKind.TryKeyword)
38772Debug.Assert(catchStatement IsNot Nothing)
38806Debug.Assert(catchKeyword IsNot Nothing AndAlso catchKeyword.Kind = SyntaxKind.CatchKeyword)
38821Debug.Assert(whenKeyword IsNot Nothing AndAlso whenKeyword.Kind = SyntaxKind.WhenKeyword)
38822Debug.Assert(filter IsNot Nothing)
38849Debug.Assert(finallyStatement IsNot Nothing)
38873Debug.Assert(finallyKeyword IsNot Nothing AndAlso finallyKeyword.Kind = SyntaxKind.FinallyKeyword)
38900Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
38901Debug.Assert(errorNumber IsNot Nothing)
38938Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
38939Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
38940Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
38941Debug.Assert(label IsNot Nothing)
38966Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
38967Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
38968Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
38969Debug.Assert(label IsNot Nothing)
38994Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
38995Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
38996Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
38997Debug.Assert(label IsNot Nothing)
39027Debug.Assert(SyntaxFacts.IsOnErrorGoToStatement(kind))
39028Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
39029Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
39030Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
39031Debug.Assert(label IsNot Nothing)
39052Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
39053Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
39054Debug.Assert(resumeKeyword IsNot Nothing AndAlso resumeKeyword.Kind = SyntaxKind.ResumeKeyword)
39055Debug.Assert(nextKeyword IsNot Nothing AndAlso nextKeyword.Kind = SyntaxKind.NextKeyword)
39073Debug.Assert(resumeKeyword IsNot Nothing AndAlso resumeKeyword.Kind = SyntaxKind.ResumeKeyword)
39103Debug.Assert(resumeKeyword IsNot Nothing AndAlso resumeKeyword.Kind = SyntaxKind.ResumeKeyword)
39133Debug.Assert(resumeKeyword IsNot Nothing AndAlso resumeKeyword.Kind = SyntaxKind.ResumeKeyword)
39164Debug.Assert(selectStatement IsNot Nothing)
39165Debug.Assert(endSelectStatement IsNot Nothing)
39196Debug.Assert(selectKeyword IsNot Nothing AndAlso selectKeyword.Kind = SyntaxKind.SelectKeyword)
39197Debug.Assert(expression IsNot Nothing)
39224Debug.Assert(caseStatement IsNot Nothing)
39251Debug.Assert(caseStatement IsNot Nothing)
39281Debug.Assert(caseKeyword IsNot Nothing AndAlso caseKeyword.Kind = SyntaxKind.CaseKeyword)
39311Debug.Assert(caseKeyword IsNot Nothing AndAlso caseKeyword.Kind = SyntaxKind.CaseKeyword)
39335Debug.Assert(elseKeyword IsNot Nothing AndAlso elseKeyword.Kind = SyntaxKind.ElseKeyword)
39359Debug.Assert(value IsNot Nothing)
39389Debug.Assert(lowerBound IsNot Nothing)
39390Debug.Assert(toKeyword IsNot Nothing AndAlso toKeyword.Kind = SyntaxKind.ToKeyword)
39391Debug.Assert(upperBound IsNot Nothing)
39422Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.EqualsToken)
39423Debug.Assert(value IsNot Nothing)
39454Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanGreaterThanToken)
39455Debug.Assert(value IsNot Nothing)
39486Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanToken)
39487Debug.Assert(value IsNot Nothing)
39518Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanEqualsToken)
39519Debug.Assert(value IsNot Nothing)
39550Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanEqualsToken)
39551Debug.Assert(value IsNot Nothing)
39582Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanToken)
39583Debug.Assert(value IsNot Nothing)
39620Debug.Assert(SyntaxFacts.IsRelationalCaseClause(kind))
39621Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsRelationalCaseClauseOperatorToken(operatorToken.Kind))
39622Debug.Assert(value IsNot Nothing)
39650Debug.Assert(syncLockKeyword IsNot Nothing AndAlso syncLockKeyword.Kind = SyntaxKind.SyncLockKeyword)
39651Debug.Assert(expression IsNot Nothing)
39682Debug.Assert(doStatement IsNot Nothing)
39683Debug.Assert(loopStatement IsNot Nothing)
39714Debug.Assert(doStatement IsNot Nothing)
39715Debug.Assert(loopStatement IsNot Nothing)
39746Debug.Assert(doStatement IsNot Nothing)
39747Debug.Assert(loopStatement IsNot Nothing)
39778Debug.Assert(doStatement IsNot Nothing)
39779Debug.Assert(loopStatement IsNot Nothing)
39810Debug.Assert(doStatement IsNot Nothing)
39811Debug.Assert(loopStatement IsNot Nothing)
39847Debug.Assert(SyntaxFacts.IsDoLoopBlock(kind))
39848Debug.Assert(doStatement IsNot Nothing)
39849Debug.Assert(loopStatement IsNot Nothing)
39877Debug.Assert(doKeyword IsNot Nothing AndAlso doKeyword.Kind = SyntaxKind.DoKeyword)
39905Debug.Assert(doKeyword IsNot Nothing AndAlso doKeyword.Kind = SyntaxKind.DoKeyword)
39933Debug.Assert(doKeyword IsNot Nothing AndAlso doKeyword.Kind = SyntaxKind.DoKeyword)
39965Debug.Assert(SyntaxFacts.IsDoStatement(kind))
39966Debug.Assert(doKeyword IsNot Nothing AndAlso doKeyword.Kind = SyntaxKind.DoKeyword)
39994Debug.Assert(loopKeyword IsNot Nothing AndAlso loopKeyword.Kind = SyntaxKind.LoopKeyword)
40022Debug.Assert(loopKeyword IsNot Nothing AndAlso loopKeyword.Kind = SyntaxKind.LoopKeyword)
40050Debug.Assert(loopKeyword IsNot Nothing AndAlso loopKeyword.Kind = SyntaxKind.LoopKeyword)
40083Debug.Assert(SyntaxFacts.IsLoopStatement(kind))
40084Debug.Assert(loopKeyword IsNot Nothing AndAlso loopKeyword.Kind = SyntaxKind.LoopKeyword)
40113Debug.Assert(whileOrUntilKeyword IsNot Nothing AndAlso whileOrUntilKeyword.Kind = SyntaxKind.WhileKeyword)
40114Debug.Assert(condition IsNot Nothing)
40143Debug.Assert(whileOrUntilKeyword IsNot Nothing AndAlso whileOrUntilKeyword.Kind = SyntaxKind.UntilKeyword)
40144Debug.Assert(condition IsNot Nothing)
40177Debug.Assert(SyntaxFacts.IsWhileOrUntilClause(kind))
40178Debug.Assert(whileOrUntilKeyword IsNot Nothing AndAlso SyntaxFacts.IsWhileOrUntilClauseWhileOrUntilKeyword(whileOrUntilKeyword.Kind))
40179Debug.Assert(condition IsNot Nothing)
40207Debug.Assert(whileKeyword IsNot Nothing AndAlso whileKeyword.Kind = SyntaxKind.WhileKeyword)
40208Debug.Assert(condition IsNot Nothing)
40242Debug.Assert(forStatement IsNot Nothing)
40276Debug.Assert(forEachStatement IsNot Nothing)
40326Debug.Assert(forKeyword IsNot Nothing AndAlso forKeyword.Kind = SyntaxKind.ForKeyword)
40327Debug.Assert(controlVariable IsNot Nothing)
40328Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
40329Debug.Assert(fromValue IsNot Nothing)
40330Debug.Assert(toKeyword IsNot Nothing AndAlso toKeyword.Kind = SyntaxKind.ToKeyword)
40331Debug.Assert(toValue IsNot Nothing)
40346Debug.Assert(stepKeyword IsNot Nothing AndAlso stepKeyword.Kind = SyntaxKind.StepKeyword)
40347Debug.Assert(stepValue IsNot Nothing)
40392Debug.Assert(forKeyword IsNot Nothing AndAlso forKeyword.Kind = SyntaxKind.ForKeyword)
40393Debug.Assert(eachKeyword IsNot Nothing AndAlso eachKeyword.Kind = SyntaxKind.EachKeyword)
40394Debug.Assert(controlVariable IsNot Nothing)
40395Debug.Assert(inKeyword IsNot Nothing AndAlso inKeyword.Kind = SyntaxKind.InKeyword)
40396Debug.Assert(expression IsNot Nothing)
40414Debug.Assert(nextKeyword IsNot Nothing AndAlso nextKeyword.Kind = SyntaxKind.NextKeyword)
40448Debug.Assert(usingKeyword IsNot Nothing AndAlso usingKeyword.Kind = SyntaxKind.UsingKeyword)
40475Debug.Assert(throwKeyword IsNot Nothing AndAlso throwKeyword.Kind = SyntaxKind.ThrowKeyword)
40507Debug.Assert(left IsNot Nothing)
40508Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.EqualsToken)
40509Debug.Assert(right IsNot Nothing)
40541Debug.Assert(left IsNot Nothing)
40542Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.EqualsToken)
40543Debug.Assert(right IsNot Nothing)
40575Debug.Assert(left IsNot Nothing)
40576Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.PlusEqualsToken)
40577Debug.Assert(right IsNot Nothing)
40609Debug.Assert(left IsNot Nothing)
40610Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.MinusEqualsToken)
40611Debug.Assert(right IsNot Nothing)
40643Debug.Assert(left IsNot Nothing)
40644Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AsteriskEqualsToken)
40645Debug.Assert(right IsNot Nothing)
40677Debug.Assert(left IsNot Nothing)
40678Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.SlashEqualsToken)
40679Debug.Assert(right IsNot Nothing)
40711Debug.Assert(left IsNot Nothing)
40712Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.BackslashEqualsToken)
40713Debug.Assert(right IsNot Nothing)
40745Debug.Assert(left IsNot Nothing)
40746Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.CaretEqualsToken)
40747Debug.Assert(right IsNot Nothing)
40779Debug.Assert(left IsNot Nothing)
40780Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanLessThanEqualsToken)
40781Debug.Assert(right IsNot Nothing)
40813Debug.Assert(left IsNot Nothing)
40814Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanGreaterThanEqualsToken)
40815Debug.Assert(right IsNot Nothing)
40847Debug.Assert(left IsNot Nothing)
40848Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AmpersandEqualsToken)
40849Debug.Assert(right IsNot Nothing)
40890Debug.Assert(SyntaxFacts.IsAssignmentStatement(kind))
40891Debug.Assert(left IsNot Nothing)
40892Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsAssignmentStatementOperatorToken(operatorToken.Kind))
40893Debug.Assert(right IsNot Nothing)
40920Debug.Assert(mid IsNot Nothing AndAlso mid.Kind = SyntaxKind.IdentifierToken)
40921Debug.Assert(argumentList IsNot Nothing)
40949Debug.Assert(callKeyword IsNot Nothing AndAlso callKeyword.Kind = SyntaxKind.CallKeyword)
40950Debug.Assert(invocation IsNot Nothing)
40984Debug.Assert(addHandlerOrRemoveHandlerKeyword IsNot Nothing AndAlso addHandlerOrRemoveHandlerKeyword.Kind = SyntaxKind.AddHandlerKeyword)
40985Debug.Assert(eventExpression IsNot Nothing)
40986Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
40987Debug.Assert(delegateExpression IsNot Nothing)
41009Debug.Assert(addHandlerOrRemoveHandlerKeyword IsNot Nothing AndAlso addHandlerOrRemoveHandlerKeyword.Kind = SyntaxKind.RemoveHandlerKeyword)
41010Debug.Assert(eventExpression IsNot Nothing)
41011Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
41012Debug.Assert(delegateExpression IsNot Nothing)
41039Debug.Assert(SyntaxFacts.IsAddRemoveHandlerStatement(kind))
41040Debug.Assert(addHandlerOrRemoveHandlerKeyword IsNot Nothing AndAlso SyntaxFacts.IsAddRemoveHandlerStatementAddHandlerOrRemoveHandlerKeyword(addHandlerOrRemoveHandlerKeyword.Kind))
41041Debug.Assert(eventExpression IsNot Nothing)
41042Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
41043Debug.Assert(delegateExpression IsNot Nothing)
41061Debug.Assert(raiseEventKeyword IsNot Nothing AndAlso raiseEventKeyword.Kind = SyntaxKind.RaiseEventKeyword)
41062Debug.Assert(name IsNot Nothing)
41091Debug.Assert(withKeyword IsNot Nothing AndAlso withKeyword.Kind = SyntaxKind.WithKeyword)
41092Debug.Assert(expression IsNot Nothing)
41123Debug.Assert(reDimKeyword IsNot Nothing AndAlso reDimKeyword.Kind = SyntaxKind.ReDimKeyword)
41154Debug.Assert(reDimKeyword IsNot Nothing AndAlso reDimKeyword.Kind = SyntaxKind.ReDimKeyword)
41181Debug.Assert(expression IsNot Nothing)
41182Debug.Assert(arrayBounds IsNot Nothing)
41209Debug.Assert(eraseKeyword IsNot Nothing AndAlso eraseKeyword.Kind = SyntaxKind.EraseKeyword)
41245Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
41281Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
41317Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
41353Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
41389Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
41425Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
41461Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
41503Debug.Assert(SyntaxFacts.IsLiteralExpression(kind))
41504Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
41534Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
41535Debug.Assert(expression IsNot Nothing)
41536Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
41566Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
41567Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
41597Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
41598Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
41622Debug.Assert(type IsNot Nothing)
41650Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
41674Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.MeKeyword)
41698Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.MyBaseKeyword)
41722Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.MyClassKeyword)
41755Debug.Assert(getTypeKeyword IsNot Nothing AndAlso getTypeKeyword.Kind = SyntaxKind.GetTypeKeyword)
41756Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
41757Debug.Assert(type IsNot Nothing)
41758Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
41779Debug.Assert(typeOfKeyword IsNot Nothing AndAlso typeOfKeyword.Kind = SyntaxKind.TypeOfKeyword)
41780Debug.Assert(expression IsNot Nothing)
41781Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.IsKeyword)
41782Debug.Assert(type IsNot Nothing)
41803Debug.Assert(typeOfKeyword IsNot Nothing AndAlso typeOfKeyword.Kind = SyntaxKind.TypeOfKeyword)
41804Debug.Assert(expression IsNot Nothing)
41805Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.IsNotKeyword)
41806Debug.Assert(type IsNot Nothing)
41831Debug.Assert(SyntaxFacts.IsTypeOfExpression(kind))
41832Debug.Assert(typeOfKeyword IsNot Nothing AndAlso typeOfKeyword.Kind = SyntaxKind.TypeOfKeyword)
41833Debug.Assert(expression IsNot Nothing)
41834Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsTypeOfExpressionOperatorToken(operatorToken.Kind))
41835Debug.Assert(type IsNot Nothing)
41856Debug.Assert(getXmlNamespaceKeyword IsNot Nothing AndAlso getXmlNamespaceKeyword.Kind = SyntaxKind.GetXmlNamespaceKeyword)
41857Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
41858Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
41877Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.DotToken)
41878Debug.Assert(name IsNot Nothing)
41909Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.ExclamationToken)
41910Debug.Assert(name IsNot Nothing)
41946Debug.Assert(SyntaxFacts.IsMemberAccessExpression(kind))
41947Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsMemberAccessExpressionOperatorToken(operatorToken.Kind))
41948Debug.Assert(name IsNot Nothing)
41986Debug.Assert(token1 IsNot Nothing AndAlso token1.Kind = SyntaxKind.DotToken)
41987Debug.Assert(name IsNot Nothing)
42013Debug.Assert(token1 IsNot Nothing AndAlso token1.Kind = SyntaxKind.DotToken)
42014Debug.Assert(name IsNot Nothing)
42040Debug.Assert(token1 IsNot Nothing AndAlso token1.Kind = SyntaxKind.DotToken)
42041Debug.Assert(name IsNot Nothing)
42072Debug.Assert(SyntaxFacts.IsXmlMemberAccessExpression(kind))
42073Debug.Assert(token1 IsNot Nothing AndAlso token1.Kind = SyntaxKind.DotToken)
42074Debug.Assert(name IsNot Nothing)
42129Debug.Assert(newKeyword IsNot Nothing AndAlso newKeyword.Kind = SyntaxKind.NewKeyword)
42130Debug.Assert(type IsNot Nothing)
42149Debug.Assert(newKeyword IsNot Nothing AndAlso newKeyword.Kind = SyntaxKind.NewKeyword)
42150Debug.Assert(initializer IsNot Nothing)
42191Debug.Assert(newKeyword IsNot Nothing AndAlso newKeyword.Kind = SyntaxKind.NewKeyword)
42192Debug.Assert(type IsNot Nothing)
42193Debug.Assert(initializer IsNot Nothing)
42212Debug.Assert(openBraceToken IsNot Nothing AndAlso openBraceToken.Kind = SyntaxKind.OpenBraceToken)
42213Debug.Assert(closeBraceToken IsNot Nothing AndAlso closeBraceToken.Kind = SyntaxKind.CloseBraceToken)
42249Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.CTypeKeyword)
42250Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
42251Debug.Assert(expression IsNot Nothing)
42252Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
42253Debug.Assert(type IsNot Nothing)
42254Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
42278Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.DirectCastKeyword)
42279Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
42280Debug.Assert(expression IsNot Nothing)
42281Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
42282Debug.Assert(type IsNot Nothing)
42283Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
42307Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.TryCastKeyword)
42308Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
42309Debug.Assert(expression IsNot Nothing)
42310Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
42311Debug.Assert(type IsNot Nothing)
42312Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
42334Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsPredefinedCastExpressionKeyword(keyword.Kind))
42335Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
42336Debug.Assert(expression IsNot Nothing)
42337Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
42354Debug.Assert(left IsNot Nothing)
42355Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.PlusToken)
42356Debug.Assert(right IsNot Nothing)
42385Debug.Assert(left IsNot Nothing)
42386Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.MinusToken)
42387Debug.Assert(right IsNot Nothing)
42416Debug.Assert(left IsNot Nothing)
42417Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AsteriskToken)
42418Debug.Assert(right IsNot Nothing)
42447Debug.Assert(left IsNot Nothing)
42448Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.SlashToken)
42449Debug.Assert(right IsNot Nothing)
42478Debug.Assert(left IsNot Nothing)
42479Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.BackslashToken)
42480Debug.Assert(right IsNot Nothing)
42509Debug.Assert(left IsNot Nothing)
42510Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.CaretToken)
42511Debug.Assert(right IsNot Nothing)
42540Debug.Assert(left IsNot Nothing)
42541Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanLessThanToken)
42542Debug.Assert(right IsNot Nothing)
42571Debug.Assert(left IsNot Nothing)
42572Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanGreaterThanToken)
42573Debug.Assert(right IsNot Nothing)
42602Debug.Assert(left IsNot Nothing)
42603Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AmpersandToken)
42604Debug.Assert(right IsNot Nothing)
42633Debug.Assert(left IsNot Nothing)
42634Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.ModKeyword)
42635Debug.Assert(right IsNot Nothing)
42664Debug.Assert(left IsNot Nothing)
42665Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.EqualsToken)
42666Debug.Assert(right IsNot Nothing)
42695Debug.Assert(left IsNot Nothing)
42696Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanGreaterThanToken)
42697Debug.Assert(right IsNot Nothing)
42726Debug.Assert(left IsNot Nothing)
42727Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanToken)
42728Debug.Assert(right IsNot Nothing)
42757Debug.Assert(left IsNot Nothing)
42758Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanEqualsToken)
42759Debug.Assert(right IsNot Nothing)
42788Debug.Assert(left IsNot Nothing)
42789Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanEqualsToken)
42790Debug.Assert(right IsNot Nothing)
42819Debug.Assert(left IsNot Nothing)
42820Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanToken)
42821Debug.Assert(right IsNot Nothing)
42850Debug.Assert(left IsNot Nothing)
42851Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.IsKeyword)
42852Debug.Assert(right IsNot Nothing)
42881Debug.Assert(left IsNot Nothing)
42882Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.IsNotKeyword)
42883Debug.Assert(right IsNot Nothing)
42912Debug.Assert(left IsNot Nothing)
42913Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LikeKeyword)
42914Debug.Assert(right IsNot Nothing)
42943Debug.Assert(left IsNot Nothing)
42944Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.OrKeyword)
42945Debug.Assert(right IsNot Nothing)
42974Debug.Assert(left IsNot Nothing)
42975Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.XorKeyword)
42976Debug.Assert(right IsNot Nothing)
43005Debug.Assert(left IsNot Nothing)
43006Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AndKeyword)
43007Debug.Assert(right IsNot Nothing)
43036Debug.Assert(left IsNot Nothing)
43037Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.OrElseKeyword)
43038Debug.Assert(right IsNot Nothing)
43067Debug.Assert(left IsNot Nothing)
43068Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AndAlsoKeyword)
43069Debug.Assert(right IsNot Nothing)
43109Debug.Assert(SyntaxFacts.IsBinaryExpression(kind))
43110Debug.Assert(left IsNot Nothing)
43111Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsBinaryExpressionOperatorToken(operatorToken.Kind))
43112Debug.Assert(right IsNot Nothing)
43139Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.PlusToken)
43140Debug.Assert(operand IsNot Nothing)
43167Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.MinusToken)
43168Debug.Assert(operand IsNot Nothing)
43195Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.NotKeyword)
43196Debug.Assert(operand IsNot Nothing)
43223Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AddressOfKeyword)
43224Debug.Assert(operand IsNot Nothing)
43256Debug.Assert(SyntaxFacts.IsUnaryExpression(kind))
43257Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsUnaryExpressionOperatorToken(operatorToken.Kind))
43258Debug.Assert(operand IsNot Nothing)
43298Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
43299Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
43300Debug.Assert(firstExpression IsNot Nothing)
43301Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
43302Debug.Assert(secondExpression IsNot Nothing)
43303Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
43337Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
43338Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
43339Debug.Assert(condition IsNot Nothing)
43340Debug.Assert(firstCommaToken IsNot Nothing AndAlso firstCommaToken.Kind = SyntaxKind.CommaToken)
43341Debug.Assert(whenTrue IsNot Nothing)
43342Debug.Assert(secondCommaToken IsNot Nothing AndAlso secondCommaToken.Kind = SyntaxKind.CommaToken)
43343Debug.Assert(whenFalse IsNot Nothing)
43344Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
43361Debug.Assert(subOrFunctionHeader IsNot Nothing)
43362Debug.Assert(body IsNot Nothing)
43391Debug.Assert(subOrFunctionHeader IsNot Nothing)
43392Debug.Assert(body IsNot Nothing)
43426Debug.Assert(SyntaxFacts.IsSingleLineLambdaExpression(kind))
43427Debug.Assert(subOrFunctionHeader IsNot Nothing)
43428Debug.Assert(body IsNot Nothing)
43462Debug.Assert(subOrFunctionHeader IsNot Nothing)
43463Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
43497Debug.Assert(subOrFunctionHeader IsNot Nothing)
43498Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
43537Debug.Assert(SyntaxFacts.IsMultiLineLambdaExpression(kind))
43538Debug.Assert(subOrFunctionHeader IsNot Nothing)
43539Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
43581Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.SubKeyword)
43611Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.FunctionKeyword)
43645Debug.Assert(SyntaxFacts.IsLambdaHeader(kind))
43646Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsLambdaHeaderSubOrFunctionKeyword(subOrFunctionKeyword.Kind))
43665Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
43666Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
43691Debug.Assert(empty IsNot Nothing AndAlso empty.Kind = SyntaxKind.EmptyToken)
43719Debug.Assert(expression IsNot Nothing)
43746Debug.Assert(name IsNot Nothing)
43747Debug.Assert(colonEqualsToken IsNot Nothing AndAlso colonEqualsToken.Kind = SyntaxKind.ColonEqualsToken)
43778Debug.Assert(lowerBound IsNot Nothing)
43779Debug.Assert(toKeyword IsNot Nothing AndAlso toKeyword.Kind = SyntaxKind.ToKeyword)
43780Debug.Assert(upperBound IsNot Nothing)
43840Debug.Assert(identifier IsNot Nothing)
43841Debug.Assert(inKeyword IsNot Nothing AndAlso inKeyword.Kind = SyntaxKind.InKeyword)
43842Debug.Assert(expression IsNot Nothing)
43859Debug.Assert(expression IsNot Nothing)
43891Debug.Assert(aggregation IsNot Nothing)
43921Debug.Assert(identifier IsNot Nothing)
43922Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
43956Debug.Assert(functionName IsNot Nothing AndAlso functionName.Kind = SyntaxKind.IdentifierToken)
43970Debug.Assert(groupKeyword IsNot Nothing AndAlso groupKeyword.Kind = SyntaxKind.GroupKeyword)
43999Debug.Assert(fromKeyword IsNot Nothing AndAlso fromKeyword.Kind = SyntaxKind.FromKeyword)
44026Debug.Assert(letKeyword IsNot Nothing AndAlso letKeyword.Kind = SyntaxKind.LetKeyword)
44062Debug.Assert(aggregateKeyword IsNot Nothing AndAlso aggregateKeyword.Kind = SyntaxKind.AggregateKeyword)
44063Debug.Assert(intoKeyword IsNot Nothing AndAlso intoKeyword.Kind = SyntaxKind.IntoKeyword)
44075Debug.Assert(distinctKeyword IsNot Nothing AndAlso distinctKeyword.Kind = SyntaxKind.DistinctKeyword)
44102Debug.Assert(whereKeyword IsNot Nothing AndAlso whereKeyword.Kind = SyntaxKind.WhereKeyword)
44103Debug.Assert(condition IsNot Nothing)
44134Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso skipOrTakeKeyword.Kind = SyntaxKind.SkipKeyword)
44135Debug.Assert(whileKeyword IsNot Nothing AndAlso whileKeyword.Kind = SyntaxKind.WhileKeyword)
44136Debug.Assert(condition IsNot Nothing)
44167Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso skipOrTakeKeyword.Kind = SyntaxKind.TakeKeyword)
44168Debug.Assert(whileKeyword IsNot Nothing AndAlso whileKeyword.Kind = SyntaxKind.WhileKeyword)
44169Debug.Assert(condition IsNot Nothing)
44204Debug.Assert(SyntaxFacts.IsPartitionWhileClause(kind))
44205Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso SyntaxFacts.IsPartitionWhileClauseSkipOrTakeKeyword(skipOrTakeKeyword.Kind))
44206Debug.Assert(whileKeyword IsNot Nothing AndAlso whileKeyword.Kind = SyntaxKind.WhileKeyword)
44207Debug.Assert(condition IsNot Nothing)
44234Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso skipOrTakeKeyword.Kind = SyntaxKind.SkipKeyword)
44235Debug.Assert(count IsNot Nothing)
44262Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso skipOrTakeKeyword.Kind = SyntaxKind.TakeKeyword)
44263Debug.Assert(count IsNot Nothing)
44294Debug.Assert(SyntaxFacts.IsPartitionClause(kind))
44295Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso SyntaxFacts.IsPartitionClauseSkipOrTakeKeyword(skipOrTakeKeyword.Kind))
44296Debug.Assert(count IsNot Nothing)
44333Debug.Assert(groupKeyword IsNot Nothing AndAlso groupKeyword.Kind = SyntaxKind.GroupKeyword)
44334Debug.Assert(byKeyword IsNot Nothing AndAlso byKeyword.Kind = SyntaxKind.ByKeyword)
44335Debug.Assert(intoKeyword IsNot Nothing AndAlso intoKeyword.Kind = SyntaxKind.IntoKeyword)
44353Debug.Assert(left IsNot Nothing)
44354Debug.Assert(equalsKeyword IsNot Nothing AndAlso equalsKeyword.Kind = SyntaxKind.EqualsKeyword)
44355Debug.Assert(right IsNot Nothing)
44392Debug.Assert(joinKeyword IsNot Nothing AndAlso joinKeyword.Kind = SyntaxKind.JoinKeyword)
44393Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
44427Debug.Assert(groupKeyword IsNot Nothing AndAlso groupKeyword.Kind = SyntaxKind.GroupKeyword)
44428Debug.Assert(joinKeyword IsNot Nothing AndAlso joinKeyword.Kind = SyntaxKind.JoinKeyword)
44429Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
44430Debug.Assert(intoKeyword IsNot Nothing AndAlso intoKeyword.Kind = SyntaxKind.IntoKeyword)
44448Debug.Assert(orderKeyword IsNot Nothing AndAlso orderKeyword.Kind = SyntaxKind.OrderKeyword)
44449Debug.Assert(byKeyword IsNot Nothing AndAlso byKeyword.Kind = SyntaxKind.ByKeyword)
44478Debug.Assert(expression IsNot Nothing)
44507Debug.Assert(expression IsNot Nothing)
44540Debug.Assert(SyntaxFacts.IsOrdering(kind))
44541Debug.Assert(expression IsNot Nothing)
44569Debug.Assert(selectKeyword IsNot Nothing AndAlso selectKeyword.Kind = SyntaxKind.SelectKeyword)
44590Debug.Assert(declaration IsNot Nothing)
44591Debug.Assert(root IsNot Nothing)
44600Debug.Assert(lessThanQuestionToken IsNot Nothing AndAlso lessThanQuestionToken.Kind = SyntaxKind.LessThanQuestionToken)
44601Debug.Assert(xmlKeyword IsNot Nothing AndAlso xmlKeyword.Kind = SyntaxKind.XmlKeyword)
44602Debug.Assert(version IsNot Nothing)
44603Debug.Assert(questionGreaterThanToken IsNot Nothing AndAlso questionGreaterThanToken.Kind = SyntaxKind.QuestionGreaterThanToken)
44613Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.XmlNameToken)
44614Debug.Assert(equals IsNot Nothing AndAlso equals.Kind = SyntaxKind.EqualsToken)
44615Debug.Assert(value IsNot Nothing)
44636Debug.Assert(startTag IsNot Nothing)
44637Debug.Assert(endTag IsNot Nothing)
44682Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
44683Debug.Assert(name IsNot Nothing)
44684Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
44693Debug.Assert(lessThanSlashToken IsNot Nothing AndAlso lessThanSlashToken.Kind = SyntaxKind.LessThanSlashToken)
44694Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
44715Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
44716Debug.Assert(name IsNot Nothing)
44717Debug.Assert(slashGreaterThanToken IsNot Nothing AndAlso slashGreaterThanToken.Kind = SyntaxKind.SlashGreaterThanToken)
44726Debug.Assert(name IsNot Nothing)
44727Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
44728Debug.Assert(value IsNot Nothing)
44750Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlStringStartQuoteToken(startQuoteToken.Kind))
44751Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlStringEndQuoteToken(endQuoteToken.Kind))
44772Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.XmlNameToken)
44795Debug.Assert(localName IsNot Nothing AndAlso localName.Kind = SyntaxKind.XmlNameToken)
44818Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
44819Debug.Assert(name IsNot Nothing)
44820Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
44841Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.XmlNameToken)
44842Debug.Assert(colonToken IsNot Nothing AndAlso colonToken.Kind = SyntaxKind.ColonToken)
44864Debug.Assert(lessThanExclamationMinusMinusToken IsNot Nothing AndAlso lessThanExclamationMinusMinusToken.Kind = SyntaxKind.LessThanExclamationMinusMinusToken)
44865Debug.Assert(minusMinusGreaterThanToken IsNot Nothing AndAlso minusMinusGreaterThanToken.Kind = SyntaxKind.MinusMinusGreaterThanToken)
44887Debug.Assert(lessThanQuestionToken IsNot Nothing AndAlso lessThanQuestionToken.Kind = SyntaxKind.LessThanQuestionToken)
44888Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.XmlNameToken)
44889Debug.Assert(questionGreaterThanToken IsNot Nothing AndAlso questionGreaterThanToken.Kind = SyntaxKind.QuestionGreaterThanToken)
44898Debug.Assert(beginCDataToken IsNot Nothing AndAlso beginCDataToken.Kind = SyntaxKind.BeginCDataToken)
44899Debug.Assert(endCDataToken IsNot Nothing AndAlso endCDataToken.Kind = SyntaxKind.EndCDataToken)
44921Debug.Assert(lessThanPercentEqualsToken IsNot Nothing AndAlso lessThanPercentEqualsToken.Kind = SyntaxKind.LessThanPercentEqualsToken)
44922Debug.Assert(expression IsNot Nothing)
44923Debug.Assert(percentGreaterThanToken IsNot Nothing AndAlso percentGreaterThanToken.Kind = SyntaxKind.PercentGreaterThanToken)
44951Debug.Assert(elementType IsNot Nothing)
44979Debug.Assert(elementType IsNot Nothing)
44980Debug.Assert(questionMarkToken IsNot Nothing AndAlso questionMarkToken.Kind = SyntaxKind.QuestionToken)
45005Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsPredefinedTypeKeyword(keyword.Kind))
45030Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
45058Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
45059Debug.Assert(typeArgumentList IsNot Nothing)
45091Debug.Assert(left IsNot Nothing)
45092Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
45093Debug.Assert(right IsNot Nothing)
45117Debug.Assert(globalKeyword IsNot Nothing AndAlso globalKeyword.Kind = SyntaxKind.GlobalKeyword)
45150Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
45151Debug.Assert(ofKeyword IsNot Nothing AndAlso ofKeyword.Kind = SyntaxKind.OfKeyword)
45152Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
45162Debug.Assert(name IsNot Nothing)
45184Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
45185Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
45220Debug.Assert(operatorKeyword IsNot Nothing AndAlso operatorKeyword.Kind = SyntaxKind.OperatorKeyword)
45221Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsCrefOperatorReferenceOperatorToken(operatorToken.Kind))
45239Debug.Assert(left IsNot Nothing)
45240Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
45241Debug.Assert(right IsNot Nothing)
45268Debug.Assert(yieldKeyword IsNot Nothing AndAlso yieldKeyword.Kind = SyntaxKind.YieldKeyword)
45269Debug.Assert(expression IsNot Nothing)
45296Debug.Assert(awaitKeyword IsNot Nothing AndAlso awaitKeyword.Kind = SyntaxKind.AwaitKeyword)
45297Debug.Assert(expression IsNot Nothing)
45321Debug.Assert(text IsNot Nothing)
45335Debug.Assert(text IsNot Nothing)
45349Debug.Assert(text IsNot Nothing)
45363Debug.Assert(text IsNot Nothing)
45382Debug.Assert(text IsNot Nothing)
45383Debug.Assert(SyntaxFacts.IsXmlTextToken(kind))
45395Debug.Assert(text IsNot Nothing)
45407Debug.Assert(text IsNot Nothing)
45419Debug.Assert(text IsNot Nothing)
45431Debug.Assert(text IsNot Nothing)
45443Debug.Assert(text IsNot Nothing)
45475Debug.Assert(name IsNot Nothing)
45476Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
45477Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlCrefAttributeStartQuoteToken(startQuoteToken.Kind))
45478Debug.Assert(reference IsNot Nothing)
45479Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlCrefAttributeEndQuoteToken(endQuoteToken.Kind))
45490Debug.Assert(name IsNot Nothing)
45491Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
45492Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlNameAttributeStartQuoteToken(startQuoteToken.Kind))
45493Debug.Assert(reference IsNot Nothing)
45494Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlNameAttributeEndQuoteToken(endQuoteToken.Kind))
45513Debug.Assert(questionMarkToken IsNot Nothing AndAlso questionMarkToken.Kind = SyntaxKind.QuestionToken)
45514Debug.Assert(whenNotNull IsNot Nothing)
45547Debug.Assert(nameOfKeyword IsNot Nothing AndAlso nameOfKeyword.Kind = SyntaxKind.NameOfKeyword)
45548Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
45549Debug.Assert(argument IsNot Nothing)
45550Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
45568Debug.Assert(dollarSignDoubleQuoteToken IsNot Nothing AndAlso dollarSignDoubleQuoteToken.Kind = SyntaxKind.DollarSignDoubleQuoteToken)
45569Debug.Assert(doubleQuoteToken IsNot Nothing AndAlso doubleQuoteToken.Kind = SyntaxKind.DoubleQuoteToken)
45593Debug.Assert(textToken IsNot Nothing AndAlso textToken.Kind = SyntaxKind.InterpolatedStringTextToken)
45631Debug.Assert(openBraceToken IsNot Nothing AndAlso openBraceToken.Kind = SyntaxKind.OpenBraceToken)
45632Debug.Assert(expression IsNot Nothing)
45633Debug.Assert(closeBraceToken IsNot Nothing AndAlso closeBraceToken.Kind = SyntaxKind.CloseBraceToken)
45649Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
45650Debug.Assert(value IsNot Nothing)
45678Debug.Assert(colonToken IsNot Nothing AndAlso colonToken.Kind = SyntaxKind.ColonToken)
45679Debug.Assert(formatStringToken IsNot Nothing AndAlso formatStringToken.Kind = SyntaxKind.InterpolatedStringTextToken)
45705Debug.Assert(text IsNot Nothing)
45719Debug.Assert(text IsNot Nothing)
45733Debug.Assert(text IsNot Nothing)
45747Debug.Assert(text IsNot Nothing)
45761Debug.Assert(text IsNot Nothing)
45775Debug.Assert(text IsNot Nothing)
45789Debug.Assert(text IsNot Nothing)
45803Debug.Assert(text IsNot Nothing)
45823Debug.Assert(text IsNot Nothing)
45824Debug.Assert(SyntaxFacts.IsSyntaxTrivia(kind))
45849Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45850Debug.Assert(constKeyword IsNot Nothing AndAlso constKeyword.Kind = SyntaxKind.ConstKeyword)
45851Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.IdentifierToken)
45852Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
45853Debug.Assert(value IsNot Nothing)
45866Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45867Debug.Assert(ifOrElseIfKeyword IsNot Nothing AndAlso SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(ifOrElseIfKeyword.Kind))
45868Debug.Assert(condition IsNot Nothing)
45881Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45882Debug.Assert(ifOrElseIfKeyword IsNot Nothing AndAlso SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(ifOrElseIfKeyword.Kind))
45883Debug.Assert(condition IsNot Nothing)
45895Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45896Debug.Assert(elseKeyword IsNot Nothing AndAlso elseKeyword.Kind = SyntaxKind.ElseKeyword)
45908Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45909Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
45910Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
45928Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45929Debug.Assert(regionKeyword IsNot Nothing AndAlso regionKeyword.Kind = SyntaxKind.RegionKeyword)
45930Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.StringLiteralToken)
45948Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45949Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
45950Debug.Assert(regionKeyword IsNot Nothing AndAlso regionKeyword.Kind = SyntaxKind.RegionKeyword)
45963Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45964Debug.Assert(externalSourceKeyword IsNot Nothing AndAlso externalSourceKeyword.Kind = SyntaxKind.ExternalSourceKeyword)
45965Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
45966Debug.Assert(externalSource IsNot Nothing AndAlso externalSource.Kind = SyntaxKind.StringLiteralToken)
45967Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
45968Debug.Assert(lineStart IsNot Nothing AndAlso lineStart.Kind = SyntaxKind.IntegerLiteralToken)
45969Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
45981Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45982Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
45983Debug.Assert(externalSourceKeyword IsNot Nothing AndAlso externalSourceKeyword.Kind = SyntaxKind.ExternalSourceKeyword)
45995Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
45996Debug.Assert(externalChecksumKeyword IsNot Nothing AndAlso externalChecksumKeyword.Kind = SyntaxKind.ExternalChecksumKeyword)
45997Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
45998Debug.Assert(externalSource IsNot Nothing AndAlso externalSource.Kind = SyntaxKind.StringLiteralToken)
45999Debug.Assert(firstCommaToken IsNot Nothing AndAlso firstCommaToken.Kind = SyntaxKind.CommaToken)
46000Debug.Assert(guid IsNot Nothing AndAlso guid.Kind = SyntaxKind.StringLiteralToken)
46001Debug.Assert(secondCommaToken IsNot Nothing AndAlso secondCommaToken.Kind = SyntaxKind.CommaToken)
46002Debug.Assert(checksum IsNot Nothing AndAlso checksum.Kind = SyntaxKind.StringLiteralToken)
46003Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
46015Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
46016Debug.Assert(enableKeyword IsNot Nothing AndAlso enableKeyword.Kind = SyntaxKind.EnableKeyword)
46017Debug.Assert(warningKeyword IsNot Nothing AndAlso warningKeyword.Kind = SyntaxKind.WarningKeyword)
46029Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
46030Debug.Assert(disableKeyword IsNot Nothing AndAlso disableKeyword.Kind = SyntaxKind.DisableKeyword)
46031Debug.Assert(warningKeyword IsNot Nothing AndAlso warningKeyword.Kind = SyntaxKind.WarningKeyword)
46043Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
46044Debug.Assert(referenceKeyword IsNot Nothing AndAlso referenceKeyword.Kind = SyntaxKind.ReferenceKeyword)
46045Debug.Assert(file IsNot Nothing AndAlso file.Kind = SyntaxKind.StringLiteralToken)
46060Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
46086Debug.Assert(empty IsNot Nothing AndAlso empty.Kind = SyntaxKind.EmptyToken)
46116Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46117Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.IfKeyword)
46147Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46148Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.UsingKeyword)
46178Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46179Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.WithKeyword)
46209Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46210Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SelectKeyword)
46240Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46241Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.StructureKeyword)
46271Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46272Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.EnumKeyword)
46302Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46303Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.InterfaceKeyword)
46333Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46334Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.ClassKeyword)
46364Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46365Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.ModuleKeyword)
46395Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46396Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.NamespaceKeyword)
46426Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46427Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SubKeyword)
46457Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46458Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.FunctionKeyword)
46488Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46489Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.GetKeyword)
46519Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46520Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SetKeyword)
46550Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46551Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.PropertyKeyword)
46581Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46582Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.OperatorKeyword)
46612Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46613Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.EventKeyword)
46643Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46644Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.AddHandlerKeyword)
46674Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46675Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.RemoveHandlerKeyword)
46705Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46706Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.RaiseEventKeyword)
46736Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46737Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.WhileKeyword)
46767Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46768Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.TryKeyword)
46798Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46799Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SyncLockKeyword)
46839Debug.Assert(SyntaxFacts.IsEndBlockStatement(kind))
46840Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
46841Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsEndBlockStatementBlockKeyword(blockKeyword.Kind))
46881Debug.Assert(endOfFileToken IsNot Nothing AndAlso endOfFileToken.Kind = SyntaxKind.EndOfFileToken)
46901Debug.Assert(optionKeyword IsNot Nothing AndAlso optionKeyword.Kind = SyntaxKind.OptionKeyword)
46902Debug.Assert(nameKeyword IsNot Nothing AndAlso SyntaxFacts.IsOptionStatementNameKeyword(nameKeyword.Kind))
46930Debug.Assert(importsKeyword IsNot Nothing AndAlso importsKeyword.Kind = SyntaxKind.ImportsKeyword)
46958Debug.Assert(name IsNot Nothing)
46985Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
46986Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
47010Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
47011Debug.Assert(xmlNamespace IsNot Nothing)
47012Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
47042Debug.Assert(namespaceStatement IsNot Nothing)
47043Debug.Assert(endNamespaceStatement IsNot Nothing)
47071Debug.Assert(namespaceKeyword IsNot Nothing AndAlso namespaceKeyword.Kind = SyntaxKind.NamespaceKeyword)
47072Debug.Assert(name IsNot Nothing)
47109Debug.Assert(moduleStatement IsNot Nothing)
47110Debug.Assert(endModuleStatement IsNot Nothing)
47135Debug.Assert(structureStatement IsNot Nothing)
47136Debug.Assert(endStructureStatement IsNot Nothing)
47161Debug.Assert(interfaceStatement IsNot Nothing)
47162Debug.Assert(endInterfaceStatement IsNot Nothing)
47187Debug.Assert(classStatement IsNot Nothing)
47188Debug.Assert(endClassStatement IsNot Nothing)
47207Debug.Assert(enumStatement IsNot Nothing)
47208Debug.Assert(endEnumStatement IsNot Nothing)
47235Debug.Assert(inheritsKeyword IsNot Nothing AndAlso inheritsKeyword.Kind = SyntaxKind.InheritsKeyword)
47262Debug.Assert(implementsKeyword IsNot Nothing AndAlso implementsKeyword.Kind = SyntaxKind.ImplementsKeyword)
47302Debug.Assert(moduleKeyword IsNot Nothing AndAlso moduleKeyword.Kind = SyntaxKind.ModuleKeyword)
47303Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
47331Debug.Assert(structureKeyword IsNot Nothing AndAlso structureKeyword.Kind = SyntaxKind.StructureKeyword)
47332Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
47360Debug.Assert(interfaceKeyword IsNot Nothing AndAlso interfaceKeyword.Kind = SyntaxKind.InterfaceKeyword)
47361Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
47389Debug.Assert(classKeyword IsNot Nothing AndAlso classKeyword.Kind = SyntaxKind.ClassKeyword)
47390Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
47418Debug.Assert(enumKeyword IsNot Nothing AndAlso enumKeyword.Kind = SyntaxKind.EnumKeyword)
47419Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
47441Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
47442Debug.Assert(ofKeyword IsNot Nothing AndAlso ofKeyword.Kind = SyntaxKind.OfKeyword)
47443Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
47463Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
47493Debug.Assert(asKeyword IsNot Nothing AndAlso asKeyword.Kind = SyntaxKind.AsKeyword)
47494Debug.Assert(constraint IsNot Nothing)
47529Debug.Assert(asKeyword IsNot Nothing AndAlso asKeyword.Kind = SyntaxKind.AsKeyword)
47530Debug.Assert(openBraceToken IsNot Nothing AndAlso openBraceToken.Kind = SyntaxKind.OpenBraceToken)
47531Debug.Assert(closeBraceToken IsNot Nothing AndAlso closeBraceToken.Kind = SyntaxKind.CloseBraceToken)
47546Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind))
47573Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind))
47600Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind))
47632Debug.Assert(SyntaxFacts.IsSpecialConstraint(kind))
47633Debug.Assert(constraintKeyword IsNot Nothing AndAlso SyntaxFacts.IsSpecialConstraintConstraintKeyword(constraintKeyword.Kind))
47657Debug.Assert(type IsNot Nothing)
47681Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
47712Debug.Assert(subOrFunctionStatement IsNot Nothing)
47713Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
47744Debug.Assert(subOrFunctionStatement IsNot Nothing)
47745Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
47780Debug.Assert(SyntaxFacts.IsMethodBlock(kind))
47781Debug.Assert(subOrFunctionStatement IsNot Nothing)
47782Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
47813Debug.Assert(subNewStatement IsNot Nothing)
47814Debug.Assert(endSubStatement IsNot Nothing)
47845Debug.Assert(operatorStatement IsNot Nothing)
47846Debug.Assert(endOperatorStatement IsNot Nothing)
47880Debug.Assert(accessorStatement IsNot Nothing)
47881Debug.Assert(endAccessorStatement IsNot Nothing)
47915Debug.Assert(accessorStatement IsNot Nothing)
47916Debug.Assert(endAccessorStatement IsNot Nothing)
47950Debug.Assert(accessorStatement IsNot Nothing)
47951Debug.Assert(endAccessorStatement IsNot Nothing)
47985Debug.Assert(accessorStatement IsNot Nothing)
47986Debug.Assert(endAccessorStatement IsNot Nothing)
48020Debug.Assert(accessorStatement IsNot Nothing)
48021Debug.Assert(endAccessorStatement IsNot Nothing)
48060Debug.Assert(SyntaxFacts.IsAccessorBlock(kind))
48061Debug.Assert(accessorStatement IsNot Nothing)
48062Debug.Assert(endAccessorStatement IsNot Nothing)
48094Debug.Assert(propertyStatement IsNot Nothing)
48095Debug.Assert(endPropertyStatement IsNot Nothing)
48127Debug.Assert(eventStatement IsNot Nothing)
48128Debug.Assert(endEventStatement IsNot Nothing)
48160Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
48161Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
48220Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.SubKeyword)
48221Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48268Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.FunctionKeyword)
48269Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48320Debug.Assert(SyntaxFacts.IsMethodStatement(kind))
48321Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsMethodStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind))
48322Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48353Debug.Assert(subKeyword IsNot Nothing AndAlso subKeyword.Kind = SyntaxKind.SubKeyword)
48354Debug.Assert(newKeyword IsNot Nothing AndAlso newKeyword.Kind = SyntaxKind.NewKeyword)
48406Debug.Assert(declareKeyword IsNot Nothing AndAlso declareKeyword.Kind = SyntaxKind.DeclareKeyword)
48407Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.SubKeyword)
48408Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48409Debug.Assert(libKeyword IsNot Nothing AndAlso libKeyword.Kind = SyntaxKind.LibKeyword)
48410Debug.Assert(libraryName IsNot Nothing)
48462Debug.Assert(declareKeyword IsNot Nothing AndAlso declareKeyword.Kind = SyntaxKind.DeclareKeyword)
48463Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.FunctionKeyword)
48464Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48465Debug.Assert(libKeyword IsNot Nothing AndAlso libKeyword.Kind = SyntaxKind.LibKeyword)
48466Debug.Assert(libraryName IsNot Nothing)
48522Debug.Assert(SyntaxFacts.IsDeclareStatement(kind))
48523Debug.Assert(declareKeyword IsNot Nothing AndAlso declareKeyword.Kind = SyntaxKind.DeclareKeyword)
48524Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsDeclareStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind))
48525Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48526Debug.Assert(libKeyword IsNot Nothing AndAlso libKeyword.Kind = SyntaxKind.LibKeyword)
48527Debug.Assert(libraryName IsNot Nothing)
48567Debug.Assert(delegateKeyword IsNot Nothing AndAlso delegateKeyword.Kind = SyntaxKind.DelegateKeyword)
48568Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.SubKeyword)
48569Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48609Debug.Assert(delegateKeyword IsNot Nothing AndAlso delegateKeyword.Kind = SyntaxKind.DelegateKeyword)
48610Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.FunctionKeyword)
48611Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48656Debug.Assert(SyntaxFacts.IsDelegateStatement(kind))
48657Debug.Assert(delegateKeyword IsNot Nothing AndAlso delegateKeyword.Kind = SyntaxKind.DelegateKeyword)
48658Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsDelegateStatementSubOrFunctionKeyword(subOrFunctionKeyword.Kind))
48659Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48701Debug.Assert(eventKeyword IsNot Nothing AndAlso eventKeyword.Kind = SyntaxKind.EventKeyword)
48702Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48738Debug.Assert(operatorKeyword IsNot Nothing AndAlso operatorKeyword.Kind = SyntaxKind.OperatorKeyword)
48739Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsOperatorStatementOperatorToken(operatorToken.Kind))
48783Debug.Assert(propertyKeyword IsNot Nothing AndAlso propertyKeyword.Kind = SyntaxKind.PropertyKeyword)
48784Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
48814Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.GetKeyword)
48844Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.SetKeyword)
48874Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.AddHandlerKeyword)
48904Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.RemoveHandlerKeyword)
48934Debug.Assert(accessorKeyword IsNot Nothing AndAlso accessorKeyword.Kind = SyntaxKind.RaiseEventKeyword)
48970Debug.Assert(SyntaxFacts.IsAccessorStatement(kind))
48971Debug.Assert(accessorKeyword IsNot Nothing AndAlso SyntaxFacts.IsAccessorStatementAccessorKeyword(accessorKeyword.Kind))
48987Debug.Assert(implementsKeyword IsNot Nothing AndAlso implementsKeyword.Kind = SyntaxKind.ImplementsKeyword)
49015Debug.Assert(handlesKeyword IsNot Nothing AndAlso handlesKeyword.Kind = SyntaxKind.HandlesKeyword)
49041Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsKeywordEventContainerKeyword(keyword.Kind))
49066Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
49097Debug.Assert(withEventsContainer IsNot Nothing)
49098Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
49099Debug.Assert([property] IsNot Nothing)
49131Debug.Assert(eventContainer IsNot Nothing)
49132Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
49133Debug.Assert(eventMember IsNot Nothing)
49268Debug.Assert(asKeyword IsNot Nothing AndAlso asKeyword.Kind = SyntaxKind.AsKeyword)
49269Debug.Assert(type IsNot Nothing)
49299Debug.Assert(asKeyword IsNot Nothing AndAlso asKeyword.Kind = SyntaxKind.AsKeyword)
49300Debug.Assert(newExpression IsNot Nothing)
49333Debug.Assert(withKeyword IsNot Nothing AndAlso withKeyword.Kind = SyntaxKind.WithKeyword)
49334Debug.Assert(openBraceToken IsNot Nothing AndAlso openBraceToken.Kind = SyntaxKind.OpenBraceToken)
49335Debug.Assert(closeBraceToken IsNot Nothing AndAlso closeBraceToken.Kind = SyntaxKind.CloseBraceToken)
49351Debug.Assert(fromKeyword IsNot Nothing AndAlso fromKeyword.Kind = SyntaxKind.FromKeyword)
49352Debug.Assert(initializer IsNot Nothing)
49380Debug.Assert(expression IsNot Nothing)
49417Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
49418Debug.Assert(name IsNot Nothing)
49419Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
49420Debug.Assert(expression IsNot Nothing)
49436Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
49437Debug.Assert(value IsNot Nothing)
49477Debug.Assert(identifier IsNot Nothing)
49500Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
49519Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
49520Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
49550Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
49551Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
49582Debug.Assert(name IsNot Nothing)
49599Debug.Assert(attributeModifier IsNot Nothing AndAlso SyntaxFacts.IsAttributeTargetAttributeModifier(attributeModifier.Kind))
49600Debug.Assert(colonToken IsNot Nothing AndAlso colonToken.Kind = SyntaxKind.ColonToken)
49650Debug.Assert(expression IsNot Nothing)
49677Debug.Assert(questionToken IsNot Nothing AndAlso questionToken.Kind = SyntaxKind.QuestionToken)
49678Debug.Assert(expression IsNot Nothing)
49709Debug.Assert(whileStatement IsNot Nothing)
49710Debug.Assert(endWhileStatement IsNot Nothing)
49742Debug.Assert(usingStatement IsNot Nothing)
49743Debug.Assert(endUsingStatement IsNot Nothing)
49775Debug.Assert(syncLockStatement IsNot Nothing)
49776Debug.Assert(endSyncLockStatement IsNot Nothing)
49808Debug.Assert(withStatement IsNot Nothing)
49809Debug.Assert(endWithStatement IsNot Nothing)
49865Debug.Assert(labelToken IsNot Nothing AndAlso SyntaxFacts.IsLabelStatementLabelToken(labelToken.Kind))
49866Debug.Assert(colonToken IsNot Nothing AndAlso colonToken.Kind = SyntaxKind.ColonToken)
49894Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
49895Debug.Assert(label IsNot Nothing)
49921Debug.Assert(labelToken IsNot Nothing AndAlso labelToken.Kind = SyntaxKind.IdentifierToken)
49947Debug.Assert(labelToken IsNot Nothing AndAlso labelToken.Kind = SyntaxKind.IntegerLiteralToken)
49973Debug.Assert(labelToken IsNot Nothing AndAlso labelToken.Kind = SyntaxKind.NextKeyword)
50003Debug.Assert(SyntaxFacts.IsLabel(kind))
50004Debug.Assert(labelToken IsNot Nothing AndAlso SyntaxFacts.IsLabelLabelToken(labelToken.Kind))
50029Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind))
50054Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind))
50083Debug.Assert(SyntaxFacts.IsStopOrEndStatement(kind))
50084Debug.Assert(stopOrEndKeyword IsNot Nothing AndAlso SyntaxFacts.IsStopOrEndStatementStopOrEndKeyword(stopOrEndKeyword.Kind))
50112Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50113Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.DoKeyword)
50141Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50142Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.ForKeyword)
50170Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50171Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SubKeyword)
50199Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50200Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.FunctionKeyword)
50228Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50229Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.OperatorKeyword)
50257Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50258Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.PropertyKeyword)
50286Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50287Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.TryKeyword)
50315Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50316Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.SelectKeyword)
50344Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50345Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.WhileKeyword)
50380Debug.Assert(SyntaxFacts.IsExitStatement(kind))
50381Debug.Assert(exitKeyword IsNot Nothing AndAlso exitKeyword.Kind = SyntaxKind.ExitKeyword)
50382Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsExitStatementBlockKeyword(blockKeyword.Kind))
50411Debug.Assert(continueKeyword IsNot Nothing AndAlso continueKeyword.Kind = SyntaxKind.ContinueKeyword)
50412Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.WhileKeyword)
50441Debug.Assert(continueKeyword IsNot Nothing AndAlso continueKeyword.Kind = SyntaxKind.ContinueKeyword)
50442Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.DoKeyword)
50471Debug.Assert(continueKeyword IsNot Nothing AndAlso continueKeyword.Kind = SyntaxKind.ContinueKeyword)
50472Debug.Assert(blockKeyword IsNot Nothing AndAlso blockKeyword.Kind = SyntaxKind.ForKeyword)
50506Debug.Assert(SyntaxFacts.IsContinueStatement(kind))
50507Debug.Assert(continueKeyword IsNot Nothing AndAlso continueKeyword.Kind = SyntaxKind.ContinueKeyword)
50508Debug.Assert(blockKeyword IsNot Nothing AndAlso SyntaxFacts.IsContinueStatementBlockKeyword(blockKeyword.Kind))
50535Debug.Assert(returnKeyword IsNot Nothing AndAlso returnKeyword.Kind = SyntaxKind.ReturnKeyword)
50572Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
50573Debug.Assert(condition IsNot Nothing)
50574Debug.Assert(thenKeyword IsNot Nothing AndAlso thenKeyword.Kind = SyntaxKind.ThenKeyword)
50590Debug.Assert(elseKeyword IsNot Nothing AndAlso elseKeyword.Kind = SyntaxKind.ElseKeyword)
50630Debug.Assert(ifStatement IsNot Nothing)
50631Debug.Assert(endIfStatement IsNot Nothing)
50649Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
50650Debug.Assert(condition IsNot Nothing)
50678Debug.Assert(elseIfStatement IsNot Nothing)
50708Debug.Assert(elseIfKeyword IsNot Nothing AndAlso elseIfKeyword.Kind = SyntaxKind.ElseIfKeyword)
50709Debug.Assert(condition IsNot Nothing)
50736Debug.Assert(elseStatement IsNot Nothing)
50760Debug.Assert(elseKeyword IsNot Nothing AndAlso elseKeyword.Kind = SyntaxKind.ElseKeyword)
50797Debug.Assert(tryStatement IsNot Nothing)
50798Debug.Assert(endTryStatement IsNot Nothing)
50810Debug.Assert(tryKeyword IsNot Nothing AndAlso tryKeyword.Kind = SyntaxKind.TryKeyword)
50838Debug.Assert(catchStatement IsNot Nothing)
50872Debug.Assert(catchKeyword IsNot Nothing AndAlso catchKeyword.Kind = SyntaxKind.CatchKeyword)
50887Debug.Assert(whenKeyword IsNot Nothing AndAlso whenKeyword.Kind = SyntaxKind.WhenKeyword)
50888Debug.Assert(filter IsNot Nothing)
50915Debug.Assert(finallyStatement IsNot Nothing)
50939Debug.Assert(finallyKeyword IsNot Nothing AndAlso finallyKeyword.Kind = SyntaxKind.FinallyKeyword)
50966Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
50967Debug.Assert(errorNumber IsNot Nothing)
51004Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
51005Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
51006Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
51007Debug.Assert(label IsNot Nothing)
51032Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
51033Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
51034Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
51035Debug.Assert(label IsNot Nothing)
51060Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
51061Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
51062Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
51063Debug.Assert(label IsNot Nothing)
51093Debug.Assert(SyntaxFacts.IsOnErrorGoToStatement(kind))
51094Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
51095Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
51096Debug.Assert(goToKeyword IsNot Nothing AndAlso goToKeyword.Kind = SyntaxKind.GoToKeyword)
51097Debug.Assert(label IsNot Nothing)
51118Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
51119Debug.Assert(errorKeyword IsNot Nothing AndAlso errorKeyword.Kind = SyntaxKind.ErrorKeyword)
51120Debug.Assert(resumeKeyword IsNot Nothing AndAlso resumeKeyword.Kind = SyntaxKind.ResumeKeyword)
51121Debug.Assert(nextKeyword IsNot Nothing AndAlso nextKeyword.Kind = SyntaxKind.NextKeyword)
51139Debug.Assert(resumeKeyword IsNot Nothing AndAlso resumeKeyword.Kind = SyntaxKind.ResumeKeyword)
51169Debug.Assert(resumeKeyword IsNot Nothing AndAlso resumeKeyword.Kind = SyntaxKind.ResumeKeyword)
51199Debug.Assert(resumeKeyword IsNot Nothing AndAlso resumeKeyword.Kind = SyntaxKind.ResumeKeyword)
51230Debug.Assert(selectStatement IsNot Nothing)
51231Debug.Assert(endSelectStatement IsNot Nothing)
51262Debug.Assert(selectKeyword IsNot Nothing AndAlso selectKeyword.Kind = SyntaxKind.SelectKeyword)
51263Debug.Assert(expression IsNot Nothing)
51290Debug.Assert(caseStatement IsNot Nothing)
51317Debug.Assert(caseStatement IsNot Nothing)
51347Debug.Assert(caseKeyword IsNot Nothing AndAlso caseKeyword.Kind = SyntaxKind.CaseKeyword)
51377Debug.Assert(caseKeyword IsNot Nothing AndAlso caseKeyword.Kind = SyntaxKind.CaseKeyword)
51401Debug.Assert(elseKeyword IsNot Nothing AndAlso elseKeyword.Kind = SyntaxKind.ElseKeyword)
51425Debug.Assert(value IsNot Nothing)
51455Debug.Assert(lowerBound IsNot Nothing)
51456Debug.Assert(toKeyword IsNot Nothing AndAlso toKeyword.Kind = SyntaxKind.ToKeyword)
51457Debug.Assert(upperBound IsNot Nothing)
51488Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.EqualsToken)
51489Debug.Assert(value IsNot Nothing)
51520Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanGreaterThanToken)
51521Debug.Assert(value IsNot Nothing)
51552Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanToken)
51553Debug.Assert(value IsNot Nothing)
51584Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanEqualsToken)
51585Debug.Assert(value IsNot Nothing)
51616Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanEqualsToken)
51617Debug.Assert(value IsNot Nothing)
51648Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanToken)
51649Debug.Assert(value IsNot Nothing)
51686Debug.Assert(SyntaxFacts.IsRelationalCaseClause(kind))
51687Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsRelationalCaseClauseOperatorToken(operatorToken.Kind))
51688Debug.Assert(value IsNot Nothing)
51716Debug.Assert(syncLockKeyword IsNot Nothing AndAlso syncLockKeyword.Kind = SyntaxKind.SyncLockKeyword)
51717Debug.Assert(expression IsNot Nothing)
51748Debug.Assert(doStatement IsNot Nothing)
51749Debug.Assert(loopStatement IsNot Nothing)
51780Debug.Assert(doStatement IsNot Nothing)
51781Debug.Assert(loopStatement IsNot Nothing)
51812Debug.Assert(doStatement IsNot Nothing)
51813Debug.Assert(loopStatement IsNot Nothing)
51844Debug.Assert(doStatement IsNot Nothing)
51845Debug.Assert(loopStatement IsNot Nothing)
51876Debug.Assert(doStatement IsNot Nothing)
51877Debug.Assert(loopStatement IsNot Nothing)
51913Debug.Assert(SyntaxFacts.IsDoLoopBlock(kind))
51914Debug.Assert(doStatement IsNot Nothing)
51915Debug.Assert(loopStatement IsNot Nothing)
51943Debug.Assert(doKeyword IsNot Nothing AndAlso doKeyword.Kind = SyntaxKind.DoKeyword)
51971Debug.Assert(doKeyword IsNot Nothing AndAlso doKeyword.Kind = SyntaxKind.DoKeyword)
51999Debug.Assert(doKeyword IsNot Nothing AndAlso doKeyword.Kind = SyntaxKind.DoKeyword)
52031Debug.Assert(SyntaxFacts.IsDoStatement(kind))
52032Debug.Assert(doKeyword IsNot Nothing AndAlso doKeyword.Kind = SyntaxKind.DoKeyword)
52060Debug.Assert(loopKeyword IsNot Nothing AndAlso loopKeyword.Kind = SyntaxKind.LoopKeyword)
52088Debug.Assert(loopKeyword IsNot Nothing AndAlso loopKeyword.Kind = SyntaxKind.LoopKeyword)
52116Debug.Assert(loopKeyword IsNot Nothing AndAlso loopKeyword.Kind = SyntaxKind.LoopKeyword)
52149Debug.Assert(SyntaxFacts.IsLoopStatement(kind))
52150Debug.Assert(loopKeyword IsNot Nothing AndAlso loopKeyword.Kind = SyntaxKind.LoopKeyword)
52179Debug.Assert(whileOrUntilKeyword IsNot Nothing AndAlso whileOrUntilKeyword.Kind = SyntaxKind.WhileKeyword)
52180Debug.Assert(condition IsNot Nothing)
52209Debug.Assert(whileOrUntilKeyword IsNot Nothing AndAlso whileOrUntilKeyword.Kind = SyntaxKind.UntilKeyword)
52210Debug.Assert(condition IsNot Nothing)
52243Debug.Assert(SyntaxFacts.IsWhileOrUntilClause(kind))
52244Debug.Assert(whileOrUntilKeyword IsNot Nothing AndAlso SyntaxFacts.IsWhileOrUntilClauseWhileOrUntilKeyword(whileOrUntilKeyword.Kind))
52245Debug.Assert(condition IsNot Nothing)
52273Debug.Assert(whileKeyword IsNot Nothing AndAlso whileKeyword.Kind = SyntaxKind.WhileKeyword)
52274Debug.Assert(condition IsNot Nothing)
52308Debug.Assert(forStatement IsNot Nothing)
52342Debug.Assert(forEachStatement IsNot Nothing)
52392Debug.Assert(forKeyword IsNot Nothing AndAlso forKeyword.Kind = SyntaxKind.ForKeyword)
52393Debug.Assert(controlVariable IsNot Nothing)
52394Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
52395Debug.Assert(fromValue IsNot Nothing)
52396Debug.Assert(toKeyword IsNot Nothing AndAlso toKeyword.Kind = SyntaxKind.ToKeyword)
52397Debug.Assert(toValue IsNot Nothing)
52412Debug.Assert(stepKeyword IsNot Nothing AndAlso stepKeyword.Kind = SyntaxKind.StepKeyword)
52413Debug.Assert(stepValue IsNot Nothing)
52458Debug.Assert(forKeyword IsNot Nothing AndAlso forKeyword.Kind = SyntaxKind.ForKeyword)
52459Debug.Assert(eachKeyword IsNot Nothing AndAlso eachKeyword.Kind = SyntaxKind.EachKeyword)
52460Debug.Assert(controlVariable IsNot Nothing)
52461Debug.Assert(inKeyword IsNot Nothing AndAlso inKeyword.Kind = SyntaxKind.InKeyword)
52462Debug.Assert(expression IsNot Nothing)
52480Debug.Assert(nextKeyword IsNot Nothing AndAlso nextKeyword.Kind = SyntaxKind.NextKeyword)
52514Debug.Assert(usingKeyword IsNot Nothing AndAlso usingKeyword.Kind = SyntaxKind.UsingKeyword)
52541Debug.Assert(throwKeyword IsNot Nothing AndAlso throwKeyword.Kind = SyntaxKind.ThrowKeyword)
52573Debug.Assert(left IsNot Nothing)
52574Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.EqualsToken)
52575Debug.Assert(right IsNot Nothing)
52607Debug.Assert(left IsNot Nothing)
52608Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.EqualsToken)
52609Debug.Assert(right IsNot Nothing)
52641Debug.Assert(left IsNot Nothing)
52642Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.PlusEqualsToken)
52643Debug.Assert(right IsNot Nothing)
52675Debug.Assert(left IsNot Nothing)
52676Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.MinusEqualsToken)
52677Debug.Assert(right IsNot Nothing)
52709Debug.Assert(left IsNot Nothing)
52710Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AsteriskEqualsToken)
52711Debug.Assert(right IsNot Nothing)
52743Debug.Assert(left IsNot Nothing)
52744Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.SlashEqualsToken)
52745Debug.Assert(right IsNot Nothing)
52777Debug.Assert(left IsNot Nothing)
52778Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.BackslashEqualsToken)
52779Debug.Assert(right IsNot Nothing)
52811Debug.Assert(left IsNot Nothing)
52812Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.CaretEqualsToken)
52813Debug.Assert(right IsNot Nothing)
52845Debug.Assert(left IsNot Nothing)
52846Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanLessThanEqualsToken)
52847Debug.Assert(right IsNot Nothing)
52879Debug.Assert(left IsNot Nothing)
52880Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanGreaterThanEqualsToken)
52881Debug.Assert(right IsNot Nothing)
52913Debug.Assert(left IsNot Nothing)
52914Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AmpersandEqualsToken)
52915Debug.Assert(right IsNot Nothing)
52956Debug.Assert(SyntaxFacts.IsAssignmentStatement(kind))
52957Debug.Assert(left IsNot Nothing)
52958Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsAssignmentStatementOperatorToken(operatorToken.Kind))
52959Debug.Assert(right IsNot Nothing)
52986Debug.Assert(mid IsNot Nothing AndAlso mid.Kind = SyntaxKind.IdentifierToken)
52987Debug.Assert(argumentList IsNot Nothing)
53015Debug.Assert(callKeyword IsNot Nothing AndAlso callKeyword.Kind = SyntaxKind.CallKeyword)
53016Debug.Assert(invocation IsNot Nothing)
53050Debug.Assert(addHandlerOrRemoveHandlerKeyword IsNot Nothing AndAlso addHandlerOrRemoveHandlerKeyword.Kind = SyntaxKind.AddHandlerKeyword)
53051Debug.Assert(eventExpression IsNot Nothing)
53052Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
53053Debug.Assert(delegateExpression IsNot Nothing)
53075Debug.Assert(addHandlerOrRemoveHandlerKeyword IsNot Nothing AndAlso addHandlerOrRemoveHandlerKeyword.Kind = SyntaxKind.RemoveHandlerKeyword)
53076Debug.Assert(eventExpression IsNot Nothing)
53077Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
53078Debug.Assert(delegateExpression IsNot Nothing)
53105Debug.Assert(SyntaxFacts.IsAddRemoveHandlerStatement(kind))
53106Debug.Assert(addHandlerOrRemoveHandlerKeyword IsNot Nothing AndAlso SyntaxFacts.IsAddRemoveHandlerStatementAddHandlerOrRemoveHandlerKeyword(addHandlerOrRemoveHandlerKeyword.Kind))
53107Debug.Assert(eventExpression IsNot Nothing)
53108Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
53109Debug.Assert(delegateExpression IsNot Nothing)
53127Debug.Assert(raiseEventKeyword IsNot Nothing AndAlso raiseEventKeyword.Kind = SyntaxKind.RaiseEventKeyword)
53128Debug.Assert(name IsNot Nothing)
53157Debug.Assert(withKeyword IsNot Nothing AndAlso withKeyword.Kind = SyntaxKind.WithKeyword)
53158Debug.Assert(expression IsNot Nothing)
53189Debug.Assert(reDimKeyword IsNot Nothing AndAlso reDimKeyword.Kind = SyntaxKind.ReDimKeyword)
53220Debug.Assert(reDimKeyword IsNot Nothing AndAlso reDimKeyword.Kind = SyntaxKind.ReDimKeyword)
53247Debug.Assert(expression IsNot Nothing)
53248Debug.Assert(arrayBounds IsNot Nothing)
53275Debug.Assert(eraseKeyword IsNot Nothing AndAlso eraseKeyword.Kind = SyntaxKind.EraseKeyword)
53311Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
53347Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
53383Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
53419Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
53455Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
53491Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
53527Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
53569Debug.Assert(SyntaxFacts.IsLiteralExpression(kind))
53570Debug.Assert(token IsNot Nothing AndAlso SyntaxFacts.IsLiteralExpressionToken(token.Kind))
53600Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
53601Debug.Assert(expression IsNot Nothing)
53602Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
53632Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
53633Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
53663Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
53664Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
53688Debug.Assert(type IsNot Nothing)
53716Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
53740Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.MeKeyword)
53764Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.MyBaseKeyword)
53788Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.MyClassKeyword)
53821Debug.Assert(getTypeKeyword IsNot Nothing AndAlso getTypeKeyword.Kind = SyntaxKind.GetTypeKeyword)
53822Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
53823Debug.Assert(type IsNot Nothing)
53824Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
53845Debug.Assert(typeOfKeyword IsNot Nothing AndAlso typeOfKeyword.Kind = SyntaxKind.TypeOfKeyword)
53846Debug.Assert(expression IsNot Nothing)
53847Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.IsKeyword)
53848Debug.Assert(type IsNot Nothing)
53869Debug.Assert(typeOfKeyword IsNot Nothing AndAlso typeOfKeyword.Kind = SyntaxKind.TypeOfKeyword)
53870Debug.Assert(expression IsNot Nothing)
53871Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.IsNotKeyword)
53872Debug.Assert(type IsNot Nothing)
53897Debug.Assert(SyntaxFacts.IsTypeOfExpression(kind))
53898Debug.Assert(typeOfKeyword IsNot Nothing AndAlso typeOfKeyword.Kind = SyntaxKind.TypeOfKeyword)
53899Debug.Assert(expression IsNot Nothing)
53900Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsTypeOfExpressionOperatorToken(operatorToken.Kind))
53901Debug.Assert(type IsNot Nothing)
53922Debug.Assert(getXmlNamespaceKeyword IsNot Nothing AndAlso getXmlNamespaceKeyword.Kind = SyntaxKind.GetXmlNamespaceKeyword)
53923Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
53924Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
53943Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.DotToken)
53944Debug.Assert(name IsNot Nothing)
53975Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.ExclamationToken)
53976Debug.Assert(name IsNot Nothing)
54012Debug.Assert(SyntaxFacts.IsMemberAccessExpression(kind))
54013Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsMemberAccessExpressionOperatorToken(operatorToken.Kind))
54014Debug.Assert(name IsNot Nothing)
54052Debug.Assert(token1 IsNot Nothing AndAlso token1.Kind = SyntaxKind.DotToken)
54053Debug.Assert(name IsNot Nothing)
54079Debug.Assert(token1 IsNot Nothing AndAlso token1.Kind = SyntaxKind.DotToken)
54080Debug.Assert(name IsNot Nothing)
54106Debug.Assert(token1 IsNot Nothing AndAlso token1.Kind = SyntaxKind.DotToken)
54107Debug.Assert(name IsNot Nothing)
54138Debug.Assert(SyntaxFacts.IsXmlMemberAccessExpression(kind))
54139Debug.Assert(token1 IsNot Nothing AndAlso token1.Kind = SyntaxKind.DotToken)
54140Debug.Assert(name IsNot Nothing)
54195Debug.Assert(newKeyword IsNot Nothing AndAlso newKeyword.Kind = SyntaxKind.NewKeyword)
54196Debug.Assert(type IsNot Nothing)
54215Debug.Assert(newKeyword IsNot Nothing AndAlso newKeyword.Kind = SyntaxKind.NewKeyword)
54216Debug.Assert(initializer IsNot Nothing)
54257Debug.Assert(newKeyword IsNot Nothing AndAlso newKeyword.Kind = SyntaxKind.NewKeyword)
54258Debug.Assert(type IsNot Nothing)
54259Debug.Assert(initializer IsNot Nothing)
54278Debug.Assert(openBraceToken IsNot Nothing AndAlso openBraceToken.Kind = SyntaxKind.OpenBraceToken)
54279Debug.Assert(closeBraceToken IsNot Nothing AndAlso closeBraceToken.Kind = SyntaxKind.CloseBraceToken)
54315Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.CTypeKeyword)
54316Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
54317Debug.Assert(expression IsNot Nothing)
54318Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
54319Debug.Assert(type IsNot Nothing)
54320Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
54344Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.DirectCastKeyword)
54345Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
54346Debug.Assert(expression IsNot Nothing)
54347Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
54348Debug.Assert(type IsNot Nothing)
54349Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
54373Debug.Assert(keyword IsNot Nothing AndAlso keyword.Kind = SyntaxKind.TryCastKeyword)
54374Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
54375Debug.Assert(expression IsNot Nothing)
54376Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
54377Debug.Assert(type IsNot Nothing)
54378Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
54400Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsPredefinedCastExpressionKeyword(keyword.Kind))
54401Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
54402Debug.Assert(expression IsNot Nothing)
54403Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
54420Debug.Assert(left IsNot Nothing)
54421Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.PlusToken)
54422Debug.Assert(right IsNot Nothing)
54451Debug.Assert(left IsNot Nothing)
54452Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.MinusToken)
54453Debug.Assert(right IsNot Nothing)
54482Debug.Assert(left IsNot Nothing)
54483Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AsteriskToken)
54484Debug.Assert(right IsNot Nothing)
54513Debug.Assert(left IsNot Nothing)
54514Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.SlashToken)
54515Debug.Assert(right IsNot Nothing)
54544Debug.Assert(left IsNot Nothing)
54545Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.BackslashToken)
54546Debug.Assert(right IsNot Nothing)
54575Debug.Assert(left IsNot Nothing)
54576Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.CaretToken)
54577Debug.Assert(right IsNot Nothing)
54606Debug.Assert(left IsNot Nothing)
54607Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanLessThanToken)
54608Debug.Assert(right IsNot Nothing)
54637Debug.Assert(left IsNot Nothing)
54638Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanGreaterThanToken)
54639Debug.Assert(right IsNot Nothing)
54668Debug.Assert(left IsNot Nothing)
54669Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AmpersandToken)
54670Debug.Assert(right IsNot Nothing)
54699Debug.Assert(left IsNot Nothing)
54700Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.ModKeyword)
54701Debug.Assert(right IsNot Nothing)
54730Debug.Assert(left IsNot Nothing)
54731Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.EqualsToken)
54732Debug.Assert(right IsNot Nothing)
54761Debug.Assert(left IsNot Nothing)
54762Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanGreaterThanToken)
54763Debug.Assert(right IsNot Nothing)
54792Debug.Assert(left IsNot Nothing)
54793Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanToken)
54794Debug.Assert(right IsNot Nothing)
54823Debug.Assert(left IsNot Nothing)
54824Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LessThanEqualsToken)
54825Debug.Assert(right IsNot Nothing)
54854Debug.Assert(left IsNot Nothing)
54855Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanEqualsToken)
54856Debug.Assert(right IsNot Nothing)
54885Debug.Assert(left IsNot Nothing)
54886Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.GreaterThanToken)
54887Debug.Assert(right IsNot Nothing)
54916Debug.Assert(left IsNot Nothing)
54917Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.IsKeyword)
54918Debug.Assert(right IsNot Nothing)
54947Debug.Assert(left IsNot Nothing)
54948Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.IsNotKeyword)
54949Debug.Assert(right IsNot Nothing)
54978Debug.Assert(left IsNot Nothing)
54979Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.LikeKeyword)
54980Debug.Assert(right IsNot Nothing)
55009Debug.Assert(left IsNot Nothing)
55010Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.OrKeyword)
55011Debug.Assert(right IsNot Nothing)
55040Debug.Assert(left IsNot Nothing)
55041Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.XorKeyword)
55042Debug.Assert(right IsNot Nothing)
55071Debug.Assert(left IsNot Nothing)
55072Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AndKeyword)
55073Debug.Assert(right IsNot Nothing)
55102Debug.Assert(left IsNot Nothing)
55103Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.OrElseKeyword)
55104Debug.Assert(right IsNot Nothing)
55133Debug.Assert(left IsNot Nothing)
55134Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AndAlsoKeyword)
55135Debug.Assert(right IsNot Nothing)
55175Debug.Assert(SyntaxFacts.IsBinaryExpression(kind))
55176Debug.Assert(left IsNot Nothing)
55177Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsBinaryExpressionOperatorToken(operatorToken.Kind))
55178Debug.Assert(right IsNot Nothing)
55205Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.PlusToken)
55206Debug.Assert(operand IsNot Nothing)
55233Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.MinusToken)
55234Debug.Assert(operand IsNot Nothing)
55261Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.NotKeyword)
55262Debug.Assert(operand IsNot Nothing)
55289Debug.Assert(operatorToken IsNot Nothing AndAlso operatorToken.Kind = SyntaxKind.AddressOfKeyword)
55290Debug.Assert(operand IsNot Nothing)
55322Debug.Assert(SyntaxFacts.IsUnaryExpression(kind))
55323Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsUnaryExpressionOperatorToken(operatorToken.Kind))
55324Debug.Assert(operand IsNot Nothing)
55364Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
55365Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
55366Debug.Assert(firstExpression IsNot Nothing)
55367Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
55368Debug.Assert(secondExpression IsNot Nothing)
55369Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
55403Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
55404Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
55405Debug.Assert(condition IsNot Nothing)
55406Debug.Assert(firstCommaToken IsNot Nothing AndAlso firstCommaToken.Kind = SyntaxKind.CommaToken)
55407Debug.Assert(whenTrue IsNot Nothing)
55408Debug.Assert(secondCommaToken IsNot Nothing AndAlso secondCommaToken.Kind = SyntaxKind.CommaToken)
55409Debug.Assert(whenFalse IsNot Nothing)
55410Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
55427Debug.Assert(subOrFunctionHeader IsNot Nothing)
55428Debug.Assert(body IsNot Nothing)
55457Debug.Assert(subOrFunctionHeader IsNot Nothing)
55458Debug.Assert(body IsNot Nothing)
55492Debug.Assert(SyntaxFacts.IsSingleLineLambdaExpression(kind))
55493Debug.Assert(subOrFunctionHeader IsNot Nothing)
55494Debug.Assert(body IsNot Nothing)
55528Debug.Assert(subOrFunctionHeader IsNot Nothing)
55529Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
55563Debug.Assert(subOrFunctionHeader IsNot Nothing)
55564Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
55603Debug.Assert(SyntaxFacts.IsMultiLineLambdaExpression(kind))
55604Debug.Assert(subOrFunctionHeader IsNot Nothing)
55605Debug.Assert(endSubOrFunctionStatement IsNot Nothing)
55647Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.SubKeyword)
55677Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso subOrFunctionKeyword.Kind = SyntaxKind.FunctionKeyword)
55711Debug.Assert(SyntaxFacts.IsLambdaHeader(kind))
55712Debug.Assert(subOrFunctionKeyword IsNot Nothing AndAlso SyntaxFacts.IsLambdaHeaderSubOrFunctionKeyword(subOrFunctionKeyword.Kind))
55731Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
55732Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
55757Debug.Assert(empty IsNot Nothing AndAlso empty.Kind = SyntaxKind.EmptyToken)
55785Debug.Assert(expression IsNot Nothing)
55812Debug.Assert(name IsNot Nothing)
55813Debug.Assert(colonEqualsToken IsNot Nothing AndAlso colonEqualsToken.Kind = SyntaxKind.ColonEqualsToken)
55844Debug.Assert(lowerBound IsNot Nothing)
55845Debug.Assert(toKeyword IsNot Nothing AndAlso toKeyword.Kind = SyntaxKind.ToKeyword)
55846Debug.Assert(upperBound IsNot Nothing)
55906Debug.Assert(identifier IsNot Nothing)
55907Debug.Assert(inKeyword IsNot Nothing AndAlso inKeyword.Kind = SyntaxKind.InKeyword)
55908Debug.Assert(expression IsNot Nothing)
55925Debug.Assert(expression IsNot Nothing)
55957Debug.Assert(aggregation IsNot Nothing)
55987Debug.Assert(identifier IsNot Nothing)
55988Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
56022Debug.Assert(functionName IsNot Nothing AndAlso functionName.Kind = SyntaxKind.IdentifierToken)
56036Debug.Assert(groupKeyword IsNot Nothing AndAlso groupKeyword.Kind = SyntaxKind.GroupKeyword)
56065Debug.Assert(fromKeyword IsNot Nothing AndAlso fromKeyword.Kind = SyntaxKind.FromKeyword)
56092Debug.Assert(letKeyword IsNot Nothing AndAlso letKeyword.Kind = SyntaxKind.LetKeyword)
56128Debug.Assert(aggregateKeyword IsNot Nothing AndAlso aggregateKeyword.Kind = SyntaxKind.AggregateKeyword)
56129Debug.Assert(intoKeyword IsNot Nothing AndAlso intoKeyword.Kind = SyntaxKind.IntoKeyword)
56141Debug.Assert(distinctKeyword IsNot Nothing AndAlso distinctKeyword.Kind = SyntaxKind.DistinctKeyword)
56168Debug.Assert(whereKeyword IsNot Nothing AndAlso whereKeyword.Kind = SyntaxKind.WhereKeyword)
56169Debug.Assert(condition IsNot Nothing)
56200Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso skipOrTakeKeyword.Kind = SyntaxKind.SkipKeyword)
56201Debug.Assert(whileKeyword IsNot Nothing AndAlso whileKeyword.Kind = SyntaxKind.WhileKeyword)
56202Debug.Assert(condition IsNot Nothing)
56233Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso skipOrTakeKeyword.Kind = SyntaxKind.TakeKeyword)
56234Debug.Assert(whileKeyword IsNot Nothing AndAlso whileKeyword.Kind = SyntaxKind.WhileKeyword)
56235Debug.Assert(condition IsNot Nothing)
56270Debug.Assert(SyntaxFacts.IsPartitionWhileClause(kind))
56271Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso SyntaxFacts.IsPartitionWhileClauseSkipOrTakeKeyword(skipOrTakeKeyword.Kind))
56272Debug.Assert(whileKeyword IsNot Nothing AndAlso whileKeyword.Kind = SyntaxKind.WhileKeyword)
56273Debug.Assert(condition IsNot Nothing)
56300Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso skipOrTakeKeyword.Kind = SyntaxKind.SkipKeyword)
56301Debug.Assert(count IsNot Nothing)
56328Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso skipOrTakeKeyword.Kind = SyntaxKind.TakeKeyword)
56329Debug.Assert(count IsNot Nothing)
56360Debug.Assert(SyntaxFacts.IsPartitionClause(kind))
56361Debug.Assert(skipOrTakeKeyword IsNot Nothing AndAlso SyntaxFacts.IsPartitionClauseSkipOrTakeKeyword(skipOrTakeKeyword.Kind))
56362Debug.Assert(count IsNot Nothing)
56399Debug.Assert(groupKeyword IsNot Nothing AndAlso groupKeyword.Kind = SyntaxKind.GroupKeyword)
56400Debug.Assert(byKeyword IsNot Nothing AndAlso byKeyword.Kind = SyntaxKind.ByKeyword)
56401Debug.Assert(intoKeyword IsNot Nothing AndAlso intoKeyword.Kind = SyntaxKind.IntoKeyword)
56419Debug.Assert(left IsNot Nothing)
56420Debug.Assert(equalsKeyword IsNot Nothing AndAlso equalsKeyword.Kind = SyntaxKind.EqualsKeyword)
56421Debug.Assert(right IsNot Nothing)
56458Debug.Assert(joinKeyword IsNot Nothing AndAlso joinKeyword.Kind = SyntaxKind.JoinKeyword)
56459Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
56493Debug.Assert(groupKeyword IsNot Nothing AndAlso groupKeyword.Kind = SyntaxKind.GroupKeyword)
56494Debug.Assert(joinKeyword IsNot Nothing AndAlso joinKeyword.Kind = SyntaxKind.JoinKeyword)
56495Debug.Assert(onKeyword IsNot Nothing AndAlso onKeyword.Kind = SyntaxKind.OnKeyword)
56496Debug.Assert(intoKeyword IsNot Nothing AndAlso intoKeyword.Kind = SyntaxKind.IntoKeyword)
56514Debug.Assert(orderKeyword IsNot Nothing AndAlso orderKeyword.Kind = SyntaxKind.OrderKeyword)
56515Debug.Assert(byKeyword IsNot Nothing AndAlso byKeyword.Kind = SyntaxKind.ByKeyword)
56544Debug.Assert(expression IsNot Nothing)
56573Debug.Assert(expression IsNot Nothing)
56606Debug.Assert(SyntaxFacts.IsOrdering(kind))
56607Debug.Assert(expression IsNot Nothing)
56635Debug.Assert(selectKeyword IsNot Nothing AndAlso selectKeyword.Kind = SyntaxKind.SelectKeyword)
56656Debug.Assert(declaration IsNot Nothing)
56657Debug.Assert(root IsNot Nothing)
56666Debug.Assert(lessThanQuestionToken IsNot Nothing AndAlso lessThanQuestionToken.Kind = SyntaxKind.LessThanQuestionToken)
56667Debug.Assert(xmlKeyword IsNot Nothing AndAlso xmlKeyword.Kind = SyntaxKind.XmlKeyword)
56668Debug.Assert(version IsNot Nothing)
56669Debug.Assert(questionGreaterThanToken IsNot Nothing AndAlso questionGreaterThanToken.Kind = SyntaxKind.QuestionGreaterThanToken)
56679Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.XmlNameToken)
56680Debug.Assert(equals IsNot Nothing AndAlso equals.Kind = SyntaxKind.EqualsToken)
56681Debug.Assert(value IsNot Nothing)
56702Debug.Assert(startTag IsNot Nothing)
56703Debug.Assert(endTag IsNot Nothing)
56748Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
56749Debug.Assert(name IsNot Nothing)
56750Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
56759Debug.Assert(lessThanSlashToken IsNot Nothing AndAlso lessThanSlashToken.Kind = SyntaxKind.LessThanSlashToken)
56760Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
56781Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
56782Debug.Assert(name IsNot Nothing)
56783Debug.Assert(slashGreaterThanToken IsNot Nothing AndAlso slashGreaterThanToken.Kind = SyntaxKind.SlashGreaterThanToken)
56792Debug.Assert(name IsNot Nothing)
56793Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
56794Debug.Assert(value IsNot Nothing)
56816Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlStringStartQuoteToken(startQuoteToken.Kind))
56817Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlStringEndQuoteToken(endQuoteToken.Kind))
56838Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.XmlNameToken)
56861Debug.Assert(localName IsNot Nothing AndAlso localName.Kind = SyntaxKind.XmlNameToken)
56884Debug.Assert(lessThanToken IsNot Nothing AndAlso lessThanToken.Kind = SyntaxKind.LessThanToken)
56885Debug.Assert(name IsNot Nothing)
56886Debug.Assert(greaterThanToken IsNot Nothing AndAlso greaterThanToken.Kind = SyntaxKind.GreaterThanToken)
56907Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.XmlNameToken)
56908Debug.Assert(colonToken IsNot Nothing AndAlso colonToken.Kind = SyntaxKind.ColonToken)
56930Debug.Assert(lessThanExclamationMinusMinusToken IsNot Nothing AndAlso lessThanExclamationMinusMinusToken.Kind = SyntaxKind.LessThanExclamationMinusMinusToken)
56931Debug.Assert(minusMinusGreaterThanToken IsNot Nothing AndAlso minusMinusGreaterThanToken.Kind = SyntaxKind.MinusMinusGreaterThanToken)
56953Debug.Assert(lessThanQuestionToken IsNot Nothing AndAlso lessThanQuestionToken.Kind = SyntaxKind.LessThanQuestionToken)
56954Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.XmlNameToken)
56955Debug.Assert(questionGreaterThanToken IsNot Nothing AndAlso questionGreaterThanToken.Kind = SyntaxKind.QuestionGreaterThanToken)
56964Debug.Assert(beginCDataToken IsNot Nothing AndAlso beginCDataToken.Kind = SyntaxKind.BeginCDataToken)
56965Debug.Assert(endCDataToken IsNot Nothing AndAlso endCDataToken.Kind = SyntaxKind.EndCDataToken)
56987Debug.Assert(lessThanPercentEqualsToken IsNot Nothing AndAlso lessThanPercentEqualsToken.Kind = SyntaxKind.LessThanPercentEqualsToken)
56988Debug.Assert(expression IsNot Nothing)
56989Debug.Assert(percentGreaterThanToken IsNot Nothing AndAlso percentGreaterThanToken.Kind = SyntaxKind.PercentGreaterThanToken)
57017Debug.Assert(elementType IsNot Nothing)
57045Debug.Assert(elementType IsNot Nothing)
57046Debug.Assert(questionMarkToken IsNot Nothing AndAlso questionMarkToken.Kind = SyntaxKind.QuestionToken)
57071Debug.Assert(keyword IsNot Nothing AndAlso SyntaxFacts.IsPredefinedTypeKeyword(keyword.Kind))
57096Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
57124Debug.Assert(identifier IsNot Nothing AndAlso identifier.Kind = SyntaxKind.IdentifierToken)
57125Debug.Assert(typeArgumentList IsNot Nothing)
57157Debug.Assert(left IsNot Nothing)
57158Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
57159Debug.Assert(right IsNot Nothing)
57183Debug.Assert(globalKeyword IsNot Nothing AndAlso globalKeyword.Kind = SyntaxKind.GlobalKeyword)
57216Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
57217Debug.Assert(ofKeyword IsNot Nothing AndAlso ofKeyword.Kind = SyntaxKind.OfKeyword)
57218Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
57228Debug.Assert(name IsNot Nothing)
57250Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
57251Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
57286Debug.Assert(operatorKeyword IsNot Nothing AndAlso operatorKeyword.Kind = SyntaxKind.OperatorKeyword)
57287Debug.Assert(operatorToken IsNot Nothing AndAlso SyntaxFacts.IsCrefOperatorReferenceOperatorToken(operatorToken.Kind))
57305Debug.Assert(left IsNot Nothing)
57306Debug.Assert(dotToken IsNot Nothing AndAlso dotToken.Kind = SyntaxKind.DotToken)
57307Debug.Assert(right IsNot Nothing)
57334Debug.Assert(yieldKeyword IsNot Nothing AndAlso yieldKeyword.Kind = SyntaxKind.YieldKeyword)
57335Debug.Assert(expression IsNot Nothing)
57362Debug.Assert(awaitKeyword IsNot Nothing AndAlso awaitKeyword.Kind = SyntaxKind.AwaitKeyword)
57363Debug.Assert(expression IsNot Nothing)
57387Debug.Assert(text IsNot Nothing)
57401Debug.Assert(text IsNot Nothing)
57415Debug.Assert(text IsNot Nothing)
57429Debug.Assert(text IsNot Nothing)
57448Debug.Assert(text IsNot Nothing)
57449Debug.Assert(SyntaxFacts.IsXmlTextToken(kind))
57461Debug.Assert(text IsNot Nothing)
57473Debug.Assert(text IsNot Nothing)
57485Debug.Assert(text IsNot Nothing)
57497Debug.Assert(text IsNot Nothing)
57509Debug.Assert(text IsNot Nothing)
57541Debug.Assert(name IsNot Nothing)
57542Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
57543Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlCrefAttributeStartQuoteToken(startQuoteToken.Kind))
57544Debug.Assert(reference IsNot Nothing)
57545Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlCrefAttributeEndQuoteToken(endQuoteToken.Kind))
57556Debug.Assert(name IsNot Nothing)
57557Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
57558Debug.Assert(startQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlNameAttributeStartQuoteToken(startQuoteToken.Kind))
57559Debug.Assert(reference IsNot Nothing)
57560Debug.Assert(endQuoteToken IsNot Nothing AndAlso SyntaxFacts.IsXmlNameAttributeEndQuoteToken(endQuoteToken.Kind))
57579Debug.Assert(questionMarkToken IsNot Nothing AndAlso questionMarkToken.Kind = SyntaxKind.QuestionToken)
57580Debug.Assert(whenNotNull IsNot Nothing)
57613Debug.Assert(nameOfKeyword IsNot Nothing AndAlso nameOfKeyword.Kind = SyntaxKind.NameOfKeyword)
57614Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
57615Debug.Assert(argument IsNot Nothing)
57616Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
57634Debug.Assert(dollarSignDoubleQuoteToken IsNot Nothing AndAlso dollarSignDoubleQuoteToken.Kind = SyntaxKind.DollarSignDoubleQuoteToken)
57635Debug.Assert(doubleQuoteToken IsNot Nothing AndAlso doubleQuoteToken.Kind = SyntaxKind.DoubleQuoteToken)
57659Debug.Assert(textToken IsNot Nothing AndAlso textToken.Kind = SyntaxKind.InterpolatedStringTextToken)
57697Debug.Assert(openBraceToken IsNot Nothing AndAlso openBraceToken.Kind = SyntaxKind.OpenBraceToken)
57698Debug.Assert(expression IsNot Nothing)
57699Debug.Assert(closeBraceToken IsNot Nothing AndAlso closeBraceToken.Kind = SyntaxKind.CloseBraceToken)
57715Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
57716Debug.Assert(value IsNot Nothing)
57744Debug.Assert(colonToken IsNot Nothing AndAlso colonToken.Kind = SyntaxKind.ColonToken)
57745Debug.Assert(formatStringToken IsNot Nothing AndAlso formatStringToken.Kind = SyntaxKind.InterpolatedStringTextToken)
57771Debug.Assert(text IsNot Nothing)
57785Debug.Assert(text IsNot Nothing)
57799Debug.Assert(text IsNot Nothing)
57813Debug.Assert(text IsNot Nothing)
57827Debug.Assert(text IsNot Nothing)
57841Debug.Assert(text IsNot Nothing)
57855Debug.Assert(text IsNot Nothing)
57869Debug.Assert(text IsNot Nothing)
57889Debug.Assert(text IsNot Nothing)
57890Debug.Assert(SyntaxFacts.IsSyntaxTrivia(kind))
57915Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
57916Debug.Assert(constKeyword IsNot Nothing AndAlso constKeyword.Kind = SyntaxKind.ConstKeyword)
57917Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.IdentifierToken)
57918Debug.Assert(equalsToken IsNot Nothing AndAlso equalsToken.Kind = SyntaxKind.EqualsToken)
57919Debug.Assert(value IsNot Nothing)
57932Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
57933Debug.Assert(ifOrElseIfKeyword IsNot Nothing AndAlso SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(ifOrElseIfKeyword.Kind))
57934Debug.Assert(condition IsNot Nothing)
57947Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
57948Debug.Assert(ifOrElseIfKeyword IsNot Nothing AndAlso SyntaxFacts.IsIfDirectiveTriviaIfOrElseIfKeyword(ifOrElseIfKeyword.Kind))
57949Debug.Assert(condition IsNot Nothing)
57961Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
57962Debug.Assert(elseKeyword IsNot Nothing AndAlso elseKeyword.Kind = SyntaxKind.ElseKeyword)
57974Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
57975Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
57976Debug.Assert(ifKeyword IsNot Nothing AndAlso ifKeyword.Kind = SyntaxKind.IfKeyword)
57994Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
57995Debug.Assert(regionKeyword IsNot Nothing AndAlso regionKeyword.Kind = SyntaxKind.RegionKeyword)
57996Debug.Assert(name IsNot Nothing AndAlso name.Kind = SyntaxKind.StringLiteralToken)
58014Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
58015Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
58016Debug.Assert(regionKeyword IsNot Nothing AndAlso regionKeyword.Kind = SyntaxKind.RegionKeyword)
58029Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
58030Debug.Assert(externalSourceKeyword IsNot Nothing AndAlso externalSourceKeyword.Kind = SyntaxKind.ExternalSourceKeyword)
58031Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
58032Debug.Assert(externalSource IsNot Nothing AndAlso externalSource.Kind = SyntaxKind.StringLiteralToken)
58033Debug.Assert(commaToken IsNot Nothing AndAlso commaToken.Kind = SyntaxKind.CommaToken)
58034Debug.Assert(lineStart IsNot Nothing AndAlso lineStart.Kind = SyntaxKind.IntegerLiteralToken)
58035Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
58047Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
58048Debug.Assert(endKeyword IsNot Nothing AndAlso endKeyword.Kind = SyntaxKind.EndKeyword)
58049Debug.Assert(externalSourceKeyword IsNot Nothing AndAlso externalSourceKeyword.Kind = SyntaxKind.ExternalSourceKeyword)
58061Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
58062Debug.Assert(externalChecksumKeyword IsNot Nothing AndAlso externalChecksumKeyword.Kind = SyntaxKind.ExternalChecksumKeyword)
58063Debug.Assert(openParenToken IsNot Nothing AndAlso openParenToken.Kind = SyntaxKind.OpenParenToken)
58064Debug.Assert(externalSource IsNot Nothing AndAlso externalSource.Kind = SyntaxKind.StringLiteralToken)
58065Debug.Assert(firstCommaToken IsNot Nothing AndAlso firstCommaToken.Kind = SyntaxKind.CommaToken)
58066Debug.Assert(guid IsNot Nothing AndAlso guid.Kind = SyntaxKind.StringLiteralToken)
58067Debug.Assert(secondCommaToken IsNot Nothing AndAlso secondCommaToken.Kind = SyntaxKind.CommaToken)
58068Debug.Assert(checksum IsNot Nothing AndAlso checksum.Kind = SyntaxKind.StringLiteralToken)
58069Debug.Assert(closeParenToken IsNot Nothing AndAlso closeParenToken.Kind = SyntaxKind.CloseParenToken)
58081Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
58082Debug.Assert(enableKeyword IsNot Nothing AndAlso enableKeyword.Kind = SyntaxKind.EnableKeyword)
58083Debug.Assert(warningKeyword IsNot Nothing AndAlso warningKeyword.Kind = SyntaxKind.WarningKeyword)
58095Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
58096Debug.Assert(disableKeyword IsNot Nothing AndAlso disableKeyword.Kind = SyntaxKind.DisableKeyword)
58097Debug.Assert(warningKeyword IsNot Nothing AndAlso warningKeyword.Kind = SyntaxKind.WarningKeyword)
58109Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
58110Debug.Assert(referenceKeyword IsNot Nothing AndAlso referenceKeyword.Kind = SyntaxKind.ReferenceKeyword)
58111Debug.Assert(file IsNot Nothing AndAlso file.Kind = SyntaxKind.StringLiteralToken)
58126Debug.Assert(hashToken IsNot Nothing AndAlso hashToken.Kind = SyntaxKind.HashToken)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (33)
12Debug.Assert((node.OperatorKind And BinaryOperatorKind.UserDefined) = 0)
74Debug.Assert(Not isLifted OrElse Not node.Call.Method.ReturnType.IsNullableType)
84Debug.Assert(Not isLifted OrElse Not node.Call.Method.ReturnType.IsNullableType)
171Debug.Assert(operand.Call.Method.ReturnType.IsSameTypeIgnoringAll(operand.Call.Method.Parameters(0).Type) AndAlso
206Debug.Assert(opKind = BinaryOperatorKind.Is OrElse opKind = BinaryOperatorKind.IsNot OrElse
210Debug.Assert((node.OperatorKind And BinaryOperatorKind.UserDefined) = 0)
226Debug.Assert(originalLeft.Type Is Nothing OrElse originalLeft.Type.IsObjectType)
233Debug.Assert(originalRight.Type Is Nothing OrElse originalRight.Type.IsObjectType)
246Debug.Assert(TypeSymbol.Equals(operandType, originalLeft.Type, TypeCompareKind.ConsiderEverything))
251Debug.Assert(TypeSymbol.Equals(operandType, originalRight.Type, TypeCompareKind.ConsiderEverything))
258Debug.Assert(operandUnderlyingSpecialType <> SpecialType.System_Object OrElse isIsIsNot)
261Debug.Assert(operandUnderlyingSpecialType <> SpecialType.System_String)
270Debug.Assert(helper.MethodKind = MethodKind.Ordinary OrElse helper.MethodKind = MethodKind.UserDefinedOperator)
340Debug.Assert(opKind = BinaryOperatorKind.AndAlso OrElse opKind = BinaryOperatorKind.OrElse)
341Debug.Assert((node.OperatorKind And BinaryOperatorKind.UserDefined) = 0)
345Debug.Assert(TypeSymbol.Equals(resultType, originalLeft.Type, TypeCompareKind.ConsiderEverything))
349Debug.Assert(TypeSymbol.Equals(resultType, originalRight.Type, TypeCompareKind.ConsiderEverything))
390Debug.Assert(opKind = BinaryOperatorKind.And OrElse opKind = BinaryOperatorKind.Or OrElse opKind = BinaryOperatorKind.Xor OrElse
396Debug.Assert((node.OperatorKind And BinaryOperatorKind.UserDefined) = 0)
417Debug.Assert(opKind <> BinaryOperatorKind.Power OrElse helper IsNot Nothing)
458Debug.Assert(resultUnderlyingSpecialType = SpecialType.System_Byte OrElse resultUnderlyingSpecialType = SpecialType.System_SByte)
542Debug.Assert(Not resultType.GetNullableUnderlyingTypeOrSelf().IsEnumType)
553Debug.Assert(conversion.Type.IsNullableType AndAlso conversion.Type.GetNullableUnderlyingType.SpecialType = SpecialType.System_Int32)
723Debug.Assert(oldArg.Type.IsNullableType)
724Debug.Assert(Not parameterType.IsNullableType)
725Debug.Assert(TypeSymbol.Equals(oldArg.Type.GetNullableUnderlyingTypeOrSelf(), parameterType, TypeCompareKind.ConsiderEverything))
740Debug.Assert((opKind And BinaryOperatorKind.Lifted) <> 0)
741Debug.Assert((opKind And BinaryOperatorKind.OpMask) = BinaryOperatorKind.Like OrElse
747Debug.Assert((opKind And UnaryOperatorKind.Lifted) <> 0)
748Debug.Assert((opKind And UnaryOperatorKind.OpMask) = UnaryOperatorKind.IsTrue OrElse
759Debug.Assert(parameters.Length > 0)
762Debug.Assert(parameters.Length = oldArgs.Length)
770Debug.Assert(resultType.GetNullableUnderlyingTypeOrSelf().
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (30)
137Debug.Assert(block.Statements(0).Kind <> BoundKind.SequencePoint)
138Debug.Assert(block.Statements.Length = 1 OrElse
147Debug.Assert(block.Locals.IsEmpty OrElse
176Debug.Assert(False)
331Debug.Assert(Not p.IsByRef, "DiagnosticsPass should have reported an error")
351Debug.Assert(Not node.LambdaSymbol.IsAsync AndAlso Not node.LambdaSymbol.IsIterator,
353Debug.Assert(node.WasCompilerGenerated OrElse node.IsSingleLine,
406Debug.Assert(origReceiverOpt IsNot Nothing OrElse fieldIsShared)
412Debug.Assert(origReceiverOpt IsNot Nothing)
433Debug.Assert(origReceiverOpt IsNot Nothing OrElse propertyIsShared)
439Debug.Assert(origReceiverOpt IsNot Nothing)
440Debug.Assert(origReceiverOpt.Kind <> BoundKind.MyBaseReference AndAlso origReceiverOpt.Kind <> BoundKind.MyClassReference)
456Debug.Assert(node.RelaxationLambdaOpt Is Nothing)
457Debug.Assert(node.RelaxationReceiverPlaceholderOpt Is Nothing)
458Debug.Assert(node.MethodGroupOpt Is Nothing)
461Debug.Assert(delegateType.TypeKind = TYPEKIND.Delegate)
532Debug.Assert(arg.Type Is Me.Int32Type)
543Debug.Assert(expressions(i).Type Is Me.Int32Type)
585Debug.Assert(initializer.CreateTemporaryLocalForInitialization,
593Debug.Assert(initializers(i).Kind = BoundKind.AssignmentOperator)
596Debug.Assert(assignment.LeftOnTheRightOpt Is Nothing)
605Debug.Assert(DirectCast(assignment.Left, BoundPropertyAccess).AccessKind = PropertyAccessKind.Set)
611Debug.Assert(leftSymbol IsNot Nothing)
615Debug.Assert(initializer.PlaceholderOpt IsNot Nothing)
616Debug.Assert(Not BoundNodeFinder.ContainsNode(right, initializer.PlaceholderOpt, _recursionDepth, convertInsufficientExecutionStackExceptionToCancelledByStackGuardException:=True), "Should be addressed in DiagnosticsPass")
617Debug.Assert(leftSymbol.Kind = SymbolKind.Field OrElse leftSymbol.Kind = SymbolKind.Property)
642Debug.Assert(initializers(i).Kind = BoundKind.Call)
683Debug.Assert(properties.Length = node.Arguments.Length)
739Debug.Assert(arrayType.IsSZArray, "Not SZArray should be addressed in DiagnosticsPass")
790Debug.Assert(type.IsValueType)
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (58)
66Debug.Assert(TryCast(node.ExtendedInfoOpt, BoundRelaxationLambda)?.ReceiverPlaceholderOpt Is Nothing)
92Debug.Assert(binary.Type.IsObjectType())
195Debug.Assert(srcType.IsTupleCompatible())
314Debug.Assert(Not Conversions.IsIdentityConversion(node.ConversionKind))
315Debug.Assert(node.Operand.Type.IsDelegateType() AndAlso
383Debug.Assert(Not _inExpressionLambda)
388Debug.Assert(rewrittenOperand.Type.IsSameTypeIgnoringAll(node.Type))
400Debug.Assert(resultType.IsNullableType OrElse
426Debug.Assert(Conversions.ConversionExists(convKind))
453Debug.Assert(Conversions.ConversionExists(convKind))
472Debug.Assert(Not resultType.IsSameTypeIgnoringAll(operandType), "converting to same type")
528Debug.Assert(resultType Is node.Type)
536Debug.Assert(Conversions.ConversionExists(convKind))
537Debug.Assert((convKind And ConversionKind.Tuple) = (node.ConversionKind And ConversionKind.Tuple))
543Debug.Assert(constantResult Is Nothing OrElse Not constantResult.IsBad)
547Debug.Assert(Not integerOverflow OrElse Not node.Checked)
607Debug.Assert(operand.Type.IsNullableType)
611Debug.Assert(inConversion IsNot Nothing, "There is always an inner conversion.")
618Debug.Assert(outConversion IsNot Nothing, "There is always an outer conversion.")
623Debug.Assert(resultType.IsNullableType, "lifted operator must have nullable type")
720Debug.Assert(rewrittenConversion.ConversionKind = ConversionKind.WideningNothingLiteral OrElse
728Debug.Assert(underlyingTypeTo.IsValueType)
780Debug.Assert(underlyingTypeTo.IsValueType)
788Debug.Assert(typeFrom.IsReferenceType AndAlso typeTo.IsCharSZArray())
799Debug.Assert(memberSymbol.Parameters(0).Type.IsObjectType())
814Debug.Assert(memberSymbol.ReturnType.IsSameTypeIgnoringAll(node.Type))
821Debug.Assert(node.Operand.IsNothingLiteral() OrElse
833Debug.Assert(typeFrom.IsObjectType())
874Debug.Assert(typeFrom.IsObjectType())
875Debug.Assert(operand.Type.IsReferenceType)
876Debug.Assert(underlyingTypeTo.IsIntrinsicValueType())
886Debug.Assert(memberSymbol.ReturnType.IsSameTypeIgnoringAll(underlyingTypeTo))
887Debug.Assert(memberSymbol.Parameters(0).Type Is typeFrom)
896Debug.Assert(targetResultType.IsEnumType())
899Debug.Assert(conv = Conversions.ClassifyConversion(memberSymbol.ReturnType, targetResultType, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
911Debug.Assert(typeTo.IsStringType())
972Debug.Assert(conv = Conversions.ClassifyConversion(operandType, memberSymbol.Parameters(0).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
979Debug.Assert(memberSymbol.ContainingType Is typeTo)
988Debug.Assert(memberSymbol.ReturnType Is typeTo)
998Debug.Assert(typeFrom.IsStringType())
1031Debug.Assert(memberSymbol.ReturnType.IsSameTypeIgnoringAll(underlyingTypeTo))
1032Debug.Assert(memberSymbol.Parameters(0).Type Is typeFrom)
1041Debug.Assert(targetResultType.IsEnumType())
1044Debug.Assert(conv = Conversions.ClassifyConversion(memberSymbol.ReturnType, targetResultType, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1056Debug.Assert(typeTo.IsDecimalType() AndAlso
1111Debug.Assert(conv = Conversions.ClassifyConversion(operandType, memberSymbol.Parameters(0).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1118Debug.Assert(memberSymbol.ContainingType Is typeTo)
1127Debug.Assert(memberSymbol.ReturnType Is typeTo)
1137Debug.Assert(typeFrom.IsDecimalType() AndAlso
1168Debug.Assert(memberSymbol.ReturnType Is underlyingTypeTo)
1169Debug.Assert(memberSymbol.Parameters(0).Type Is typeFrom)
1178Debug.Assert(targetResultType.IsEnumType())
1181Debug.Assert(conv = Conversions.ClassifyConversion(memberSymbol.ReturnType, targetResultType, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1192Debug.Assert(typeFrom.IsFloatingType() AndAlso underlyingTypeTo.IsIntegralType())
1193Debug.Assert(Not _inExpressionLambda)
1218Debug.Assert(ConversionKind.WideningNumeric = Conversions.ClassifyConversion(typeFrom, mathRound.Parameters(0).Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1227Debug.Assert(node.ConversionKind = Conversions.ClassifyConversion(mathRound.ReturnType, node.Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded).Key)
1338Debug.Assert(node.ConversionKind = Conversions.ClassifyDirectCastConversion(operand.Type, node.Type, CompoundUseSiteInfo(Of AssemblySymbol).Discarded))
Parser\ParseConditional.vb (13)
33Debug.Assert(CurrentToken.Kind = SyntaxKind.HashToken, "Conditional compilation lines start with '#'.")
113Debug.Assert(CurrentToken.Kind = SyntaxKind.ElseKeyword)
133Debug.Assert(CurrentToken.Kind = SyntaxKind.ElseIfKeyword)
140Debug.Assert(CurrentToken.Kind = SyntaxKind.IfKeyword OrElse CurrentToken.Kind = SyntaxKind.ElseIfKeyword)
169Debug.Assert(CurrentToken.Kind = SyntaxKind.EndKeyword)
211Debug.Assert(CurrentToken.Kind = SyntaxKind.EndIfKeyword)
226Debug.Assert(CurrentToken.Kind = SyntaxKind.ConstKeyword)
256Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.RegionKeyword,
270Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.ExternalSourceKeyword,
317Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.ExternalChecksumKeyword,
385Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken,
389Debug.Assert((identifier.PossibleKeywordKind = SyntaxKind.EnableKeyword) OrElse
449Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.ReferenceKeyword,
Parser\ParseExpression.vb (28)
148Debug.Assert(precedence <> OperatorPrecedence.PrecedenceNone, "should have a non-zero precedence for operators.")
183Debug.Assert(Not _evaluatingConditionCompilationExpression OrElse
433Debug.Assert(term IsNot Nothing)
550Debug.Assert(CurrentToken.Kind = SyntaxKind.IfKeyword)
597Debug.Assert(Args.Count > 3)
602Debug.Assert(withSeparators.Count > firstNotUsedIndex)
641Debug.Assert(CurrentToken.Kind = SyntaxKind.GetTypeKeyword, "should be at GetType.")
672Debug.Assert(CurrentToken.Kind = SyntaxKind.NameOfKeyword, "should be at NameOf.")
733Debug.Assert(CurrentToken.Kind = SyntaxKind.GetXmlNamespaceKeyword, "should be at GetXmlNamespace.")
772Debug.Assert(SyntaxFacts.IsPredefinedCastExpressionKeyword(CurrentToken.Kind), "ParseCastExpression called with the wrong token.")
793Debug.Assert(CurrentToken.Kind = SyntaxKind.NewKeyword, "must be at a New expression.")
926Debug.Assert(CurrentToken.Kind = SyntaxKind.TypeOfKeyword, "must be at TypeOf.")
1000Debug.Assert(CurrentToken.Kind = SyntaxKind.DotToken OrElse
1015Debug.Assert(CurrentToken.Kind = SyntaxKind.StatementTerminatorToken AndAlso
1225Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken)
1313Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "should be at tkLParen.")
1319Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken)
1336Debug.Assert(False, "Unexpected close paren")
1538Debug.Assert(comma.Kind = SyntaxKind.CommaToken)
1590Debug.Assert(keywordKind = SyntaxKind.CTypeKeyword OrElse
1649Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken)
1661Debug.Assert(CurrentToken.Kind = SyntaxKind.FunctionKeyword OrElse
1687Debug.Assert(openParen IsNot Nothing)
1688Debug.Assert(closeParen IsNot Nothing)
1769Debug.Assert(_context Is lambdaContext)
1824Debug.Assert(_context Is statementContext, "Lambda terminated with the wrong context.")
1892Debug.Assert(DirectCast(CurrentToken, IdentifierTokenSyntax).ContextualKind = SyntaxKind.AwaitKeyword)
1897Debug.Assert(awaitKeyword IsNot Nothing AndAlso awaitKeyword.Kind = SyntaxKind.AwaitKeyword)
Parser\Parser.vb (91)
54Debug.Assert(text IsNot Nothing)
55Debug.Assert(options IsNot Nothing)
61Debug.Assert(scanner IsNot Nothing)
106Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "Generic parameter parsing lost!!!")
174Debug.Assert(allowGenericArguments OrElse Not allowEmptyGenericArguments, "Inconsistency in generic arguments parsing requirements!!!")
212Debug.Assert(dotToken IsNot Nothing)
233Debug.Assert(Not allowGenericArguments OrElse allowEmptyGenericArguments OrElse allowNonEmptyGenericArguments,
247Debug.Assert(node.FullWidth <> 0)
311Debug.Assert(lastZeroWidthToken.FullWidth = 0)
377Debug.Assert(builder.Length = fullWidth)
378Debug.Assert(builder.Length >= leadingWidth + trailingWidth)
437Debug.Assert(_context IsNot Nothing)
454Debug.Assert(Not _context.IsSingleLine) ' Not handling single-line statements.
487Debug.Assert(terminator.Kind = SyntaxKind.EndOfFileToken)
498Debug.Assert(_recursionDepth = 0)
636Debug.Assert(Not _hadLineContinuationComment OrElse _hadImplicitLineContinuation)
763Debug.Assert(False, "Unexpected terminator: " & CurrentToken.Kind.ToString())
883Debug.Assert(Not _hadLineContinuationComment OrElse _hadImplicitLineContinuation)
1185Debug.Assert(False, "Unexpected terminator: " & CurrentToken.Kind.ToString())
1251Debug.Assert(CurrentToken.Kind = SyntaxKind.EmptyToken)
1444Debug.Assert(CurrentToken.Kind = SyntaxKind.EnumKeyword, "ParseEnumStatement called on the wrong token.")
1645Debug.Assert(CurrentToken.Kind = SyntaxKind.NamespaceKeyword, "ParseNamespaceStatement called on the wrong token.")
1683Debug.Assert(CurrentToken.Kind = SyntaxKind.EndKeyword, "ParseEndStatement called on wrong token.")
1720Debug.Assert(CurrentToken.Kind = SyntaxKind.EndKeyword, "ParseGroupEndStatement called on wrong token.")
2280Debug.Assert(Equals IsNot Nothing)
2304Debug.Assert(optionalAsClause IsNot Nothing)
2320Debug.Assert(possibleKeyword IsNot Nothing)
2333Debug.Assert(optionalAsClause Is Nothing)
2344Debug.Assert(optionalAsClause IsNot Nothing)
2438Debug.Assert(CurrentToken.Kind = SyntaxKind.WithKeyword, "ParseObjectInitializerList called with wrong token")
2529Debug.Assert(fromKeyword IsNot Nothing)
2760Debug.Assert(Token IsNot Nothing)
2831Debug.Assert(CanTokenStartTypeName(Start), "Inconsistency in type parsing routines!!!")
2861Debug.Assert(Not CanTokenStartTypeName(Start), "Inconsistency in type parsing routines!!!")
2867Debug.Assert(CanTokenStartTypeName(Start), "Inconsistency in type parsing routines!!!")
2873Debug.Assert(name IsNot Nothing)
2890Debug.Assert(typeName IsNot Nothing)
2933Debug.Assert(typeOpt IsNot Nothing)
2940Debug.Assert(typeOpt IsNot Nothing)
2982Debug.Assert(elementBuilder.Count > 0)
3097Debug.Assert(allowEmptyGenericArguments OrElse AllowNonEmptyGenericArguments,
3106Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "Generic arguments parsing lost!!!")
3146Debug.Assert(allowEmptyGenericArguments OrElse AllowNonEmptyGenericArguments,
3160Debug.Assert(comma IsNot Nothing)
3178Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "should be a (.")
3188Debug.Assert(Me.CurrentToken.Kind = Global.Microsoft.CodeAnalysis.VisualBasic.SyntaxKind.OpenParenToken)
3233Debug.Assert(elementType IsNot Nothing)
3235Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "should be a (.")
3250Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken)
3399Debug.Assert(CurrentToken.Kind = SyntaxKind.GetKeyword OrElse CurrentToken.Kind = SyntaxKind.SetKeyword OrElse
3457Debug.Assert(CurrentToken.Kind = SyntaxKind.ImplementsKeyword, "Implements list parsing lost.")
3508Debug.Assert(CurrentToken.Kind = SyntaxKind.HandlesKeyword, "Handles list parsing lost.")
3610Debug.Assert(subKeyword.Kind = SyntaxKind.SubKeyword, "must be at a Sub.")
3683Debug.Assert(kind = SyntaxKind.SubStatement OrElse
3775Debug.Assert(functionKeyword.Kind = SyntaxKind.FunctionKeyword, "Function parsing lost.")
3823Debug.Assert(
3924Debug.Assert(operatorKeyword.Kind = SyntaxKind.OperatorKeyword, "Operator parsing lost.")
4034Debug.Assert(optionalParameters IsNot Nothing, "Operators always require parameters - use missing if necessary")
4056Debug.Assert(err <> ERRID.ERR_None)
4102Debug.Assert(CurrentToken.Kind = SyntaxKind.PropertyKeyword, "ParsePropertyDefinition called on the wrong token.")
4208Debug.Assert(CurrentToken.Kind = SyntaxKind.DelegateKeyword, "ParseDelegateStatement called on the wrong token.")
4281Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken)
4413Debug.Assert(result IsNot Nothing)
4480Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken, "Parameter list parsing confused.")
4703Debug.Assert(CurrentToken.Kind = SyntaxKind.ImportsKeyword, "called on wrong token")
4770Debug.Assert(unexpected.Any())
4859Debug.Assert(CurrentToken.Kind = SyntaxKind.InheritsKeyword OrElse CurrentToken.Kind = SyntaxKind.ImplementsKeyword,
4921Debug.Assert(CurrentToken.Kind = SyntaxKind.OptionKeyword, "must be at Option.")
5026Debug.Assert(CurrentToken.Kind = SyntaxKind.DeclareKeyword, "ParseProcDeclareStatement called on wrong token. Must be at a Declare.")
5231Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.CustomKeyword, "ParseCustomEventDefinition called on the wrong token.")
5338Debug.Assert(CurrentToken.Kind = SyntaxKind.EventKeyword, "ParseEventDefinition called on the wrong token.")
5408Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanGreaterThanToken)
5414Debug.Assert(tokenLength >= 2)
5420Debug.Assert(lessThanText = "<" OrElse lessThanText = SyntaxFacts.FULLWIDTH_LESS_THAN_SIGN_STRING)
5421Debug.Assert(greaterThanText = ">" OrElse greaterThanText = SyntaxFacts.FULLWIDTH_GREATER_THAN_SIGN_STRING)
5459Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanToken, "ParseAttributeSpecifier called on the wrong token.")
5503Debug.Assert(assemblyOrModuleKeyword IsNot Nothing)
5504Debug.Assert(current.Kind = SyntaxKind.ColonToken)
5593Debug.Assert(t IsNot Nothing)
5772Debug.Assert(allowLeadingMultilineTrivia = (possibleFirstStatementOnLine <> PossibleFirstStatementKind.No))
5778Debug.Assert(CurrentToken.Kind = SyntaxKind.ColonToken)
5785Debug.Assert(SyntaxFacts.IsTerminator(CurrentToken.Kind) OrElse CurrentToken.Kind = SyntaxKind.EmptyToken)
5812Debug.Assert(context.IsWithinLambda)
5813Debug.Assert(SyntaxFacts.IsTerminator(CurrentToken.Kind))
5926Debug.Assert(CanUseInTryGetToken(kind))
5950Debug.Assert(CanUseInTryGetToken(kind))
6042Debug.Assert(id IsNot Nothing)
6043Debug.Assert(DirectCast(id, IdentifierTokenSyntax) IsNot Nothing)
6049Debug.Assert(id IsNot Nothing)
6050Debug.Assert(DirectCast(id, IdentifierTokenSyntax) IsNot Nothing)
6076Debug.Assert(Not kinds.Contains(SyntaxKind.IdentifierToken))
Parser\ParseStatement.vb (45)
25Debug.Assert(CurrentToken.Kind = SyntaxKind.ContinueKeyword, "ParseContinueStatement called on wrong token")
96Debug.Assert(CurrentToken.Kind = SyntaxKind.ExitKeyword, "ParseExitStatement called on wrong token")
244Debug.Assert(CurrentToken.Kind = SyntaxKind.CaseKeyword, "ParseCaseStatement called on wrong token.")
367Debug.Assert(False, "Wrong relational operator kind")
374Debug.Assert(CurrentToken.Kind = SyntaxKind.SelectKeyword, "ParseSelectStatement called on wrong token.")
410Debug.Assert(CurrentToken.Kind = SyntaxKind.IfKeyword, "ParseIfConstruct called on wrong token.")
432Debug.Assert(CurrentToken.Kind = SyntaxKind.ElseKeyword, "ParseIfConstruct called on wrong token.")
444Debug.Assert(CurrentToken.Kind = SyntaxKind.ElseIfKeyword OrElse (CurrentToken.Kind = SyntaxKind.ElseKeyword AndAlso PeekToken(1).Kind = SyntaxKind.IfKeyword),
489Debug.Assert(CurrentToken.Kind = SyntaxKind.EndIfKeyword OrElse
528Debug.Assert(CurrentToken.Kind = SyntaxKind.DoKeyword, "ParseDoStatement called on wrong token")
555Debug.Assert(CurrentToken.Kind = SyntaxKind.LoopKeyword, "ParseDoStatement called on wrong token")
581Debug.Assert(CurrentToken.Kind = SyntaxKind.ForKeyword, "ParseForStatement called on wrong token")
710Debug.Assert(CurrentToken.Kind = SyntaxKind.NextKeyword, "ParseNextStatement called on wrong token")
754Debug.Assert(enclosing IsNot Nothing)
920Debug.Assert(CurrentToken.Kind = SyntaxKind.GoToKeyword, "Alleged GOTO isn't.")
939Debug.Assert(labelName.Kind = SyntaxKind.IntegerLiteralToken OrElse labelName.Kind = SyntaxKind.IdentifierToken)
949Debug.Assert(CurrentToken.Kind = SyntaxKind.OnKeyword, "ON statement must start with ON.")
994Debug.Assert(CurrentToken.Kind = SyntaxKind.ResumeKeyword, "ParseOnErrorResumeNext called on wrong token.")
1009Debug.Assert(CurrentToken.Kind = SyntaxKind.GoToKeyword, "ParseOnErrorGoto called on wrong token.")
1056Debug.Assert(CurrentToken.Kind = SyntaxKind.ResumeKeyword, "ParseResumeStatement called on wrong token.")
1204Debug.Assert(CurrentToken.Kind = SyntaxKind.CallKeyword, "ParseCallStatement called on wrong token.")
1243Debug.Assert(CurrentToken.Kind = SyntaxKind.RaiseEventKeyword, "RaiseEvent statement must start with RaiseEvent.")
1271Debug.Assert(CurrentToken.Kind = SyntaxKind.ReDimKeyword, "ParseRedimStatement must start with Redim.")
1343Debug.Assert(CurrentToken.Kind = SyntaxKind.AddHandlerKeyword OrElse CurrentToken.Kind = SyntaxKind.RemoveHandlerKeyword, "Handler statement parsing confused.")
1381Debug.Assert(CurrentToken.Kind = SyntaxKind.WhileKeyword OrElse
1415Debug.Assert(CurrentToken.Kind = SyntaxKind.LetKeyword OrElse CurrentToken.Kind = SyntaxKind.SetKeyword, "Assignment statement parsing is lost.")
1439Debug.Assert(CurrentToken.Kind = SyntaxKind.TryKeyword, "ParseTry called on wrong token")
1454Debug.Assert(CurrentToken.Kind = SyntaxKind.CatchKeyword, "ParseCatch called on wrong token.")
1503Debug.Assert(CurrentToken.Kind = SyntaxKind.FinallyKeyword, "ParseFinally called on wrong token.")
1514Debug.Assert(CurrentToken.Kind = SyntaxKind.ThrowKeyword, "ParseThrowStatement called on wrong token.")
1532Debug.Assert(CurrentToken.Kind = SyntaxKind.ErrorKeyword)
1555Debug.Assert(CurrentToken.Kind = SyntaxKind.EraseKeyword, "Erase statement parsing lost.")
1574Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken OrElse CurrentToken.Kind = SyntaxKind.IntegerLiteralToken)
1583Debug.Assert(trivia.Count > 0)
1592Debug.Assert(index >= 0)
1611Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso DirectCast(CurrentToken, IdentifierTokenSyntax).PossibleKeywordKind = SyntaxKind.MidKeyword)
1619Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken)
1725Debug.Assert(CurrentToken.Kind = SyntaxKind.ReturnKeyword, "ParseReturnStatement called on wrong token.")
1748Debug.Assert(operand Is Nothing OrElse Not IsValidStatementTerminator(startToken), "Unexpected: we should have bailed on the token after this return statement")
1776Debug.Assert(CurrentToken.Kind = SyntaxKind.StopKeyword OrElse CurrentToken.Kind = SyntaxKind.EndKeyword, "ParseStopOrEndStatement called on wrong token.")
1789Debug.Assert(CurrentToken.Kind = SyntaxKind.UsingKeyword, "ParseUsingStatement called on wrong token")
1821Debug.Assert(CurrentToken.Kind = SyntaxKind.IdentifierToken AndAlso
1827Debug.Assert(expression.Kind = SyntaxKind.AwaitExpression)
1840Debug.Assert(DirectCast(CurrentToken, IdentifierTokenSyntax).ContextualKind = SyntaxKind.YieldKeyword)
1846Debug.Assert(yieldKeyword IsNot Nothing AndAlso yieldKeyword.Kind = SyntaxKind.YieldKeyword)
Parser\ParseXml.vb (37)
22Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanToken OrElse
49Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanQuestionToken, "ParseXmlDocument called on wrong token")
103Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanQuestionToken AndAlso
141Debug.Assert(i = 1)
173Debug.Assert(i = 2)
198Debug.Assert(i = 2 OrElse i = 3)
236Debug.Assert(foundVersion = (nodes(1) IsNot Nothing))
257Debug.Assert(IsToken(CurrentToken,
366Debug.Assert(CurrentToken.Kind = SyntaxKind.BadToken AndAlso
509Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanToken, "ParseXmlElement call on wrong token.")
576Debug.Assert(IsToken(CurrentToken,
938Debug.Assert(attribute IsNot Nothing)
958Debug.Assert(IsToken(CurrentToken,
1044Debug.Assert(Me._scanner.IsScanningXmlDoc)
1164Debug.Assert(name IsNot Nothing)
1172Debug.Assert(signature IsNot Nothing)
1180Debug.Assert(returnType IsNot Nothing)
1199Debug.Assert(CurrentToken.Kind = SyntaxKind.OpenParenToken)
1232Debug.Assert(CurrentToken.Kind = SyntaxKind.CommaToken)
1251Debug.Assert(typeName IsNot Nothing)
1261Debug.Assert(operatorKeyword.Kind = SyntaxKind.OperatorKeyword)
1318Debug.Assert(Not SyntaxFacts.IsPredefinedTypeKeyword(CurrentToken.Kind))
1330Debug.Assert(result IsNot Nothing)
1340Debug.Assert(operatorReference IsNot Nothing)
1362Debug.Assert(Me._scanner.IsScanningXmlDoc)
1614Debug.Assert(trailingTrivia.Last.Kind = SyntaxKind.ColonTrivia)
1615Debug.Assert(CurrentToken.FullWidth = 0)
1666Debug.Assert(TryCast(token, KeywordSyntax) IsNot Nothing)
1709Debug.Assert(tempNodes.Nodes.Length = 1)
1727Debug.Assert(IsToken(CurrentToken,
1827Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanQuestionToken, "ParseXmlPI called on the wrong token.")
1889Debug.Assert(CurrentToken.Kind = SyntaxKind.BeginCDataToken, "ParseXmlCData called on the wrong token.")
1915Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanExclamationMinusMinusToken, "ParseXmlComment called on wrong token.")
2006Debug.Assert(CurrentToken.Kind = SyntaxKind.LessThanPercentEqualsToken, "ParseXmlEmbedded called on wrong token")
2444Debug.Assert(endElement IsNot Nothing)
2453Debug.Assert(endElement IsNot Nothing)
2485Debug.Assert(name Is Nothing OrElse name.Kind = SyntaxKind.XmlName)
Semantics\Conversions.vb (164)
609Debug.Assert(Conversions.IsNarrowingConversion(conv))
616Debug.Assert(targetIsEnum)
625Debug.Assert(Conversions.IsIdentityConversion(conv) OrElse (conv And ConversionKind.InvolvesEnumTypeConversions) <> 0)
630Debug.Assert(Not source.IsObjectType() AndAlso Not target.IsObjectType())
653Debug.Assert(Conversions.IsWideningConversion(conv))
657Debug.Assert(Conversions.IsIdentityConversion(conv) AndAlso sourceNullable.IsSameTypeIgnoringAll(targetNullable))
667Debug.Assert(targetIsNullable)
674Debug.Assert(Conversions.IsNarrowingConversion(conv))
706Debug.Assert(source IsNot Nothing)
707Debug.Assert(destination IsNot Nothing)
708Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
731Debug.Assert((dstDiscriminator <> ConstantValueTypeDiscriminator.Bad) AndAlso (dstDiscriminator <> ConstantValueTypeDiscriminator.Nothing))
742Debug.Assert(sourceExpressionType IsNot Nothing)
743Debug.Assert(sourceExpressionType.IsValidForConstantValue(sourceValue))
782Debug.Assert(result Is Nothing OrElse Not result.IsBad OrElse integerOverflow = False)
874Debug.Assert(source IsNot Nothing)
875Debug.Assert(targetType IsNot Nothing)
876Debug.Assert(targetType.Kind <> SymbolKind.ErrorType)
889Debug.Assert(targetType IsNot Nothing)
890Debug.Assert(targetType.Kind <> SymbolKind.ErrorType)
911Debug.Assert(source IsNot Nothing)
912Debug.Assert(destination IsNot Nothing)
913Debug.Assert(source.Kind <> SymbolKind.ErrorType)
914Debug.Assert(Not TypeOf source Is ArrayLiteralTypeSymbol)
915Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
941Debug.Assert(source IsNot Nothing)
942Debug.Assert(destination IsNot Nothing)
943Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
1017Debug.Assert(source IsNot Nothing)
1018Debug.Assert(destination IsNot Nothing)
1019Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
1124Debug.Assert(delegateInvoke IsNot Nothing)
1128Debug.Assert(Not bound.Diagnostics.Diagnostics.HasAnyErrors OrElse
1269Debug.Assert(arguments.Length = targetElementTypes.Length)
1308Debug.Assert((allNarrowingIsFromNumericConstant And Not ConversionKind.InvolvesNarrowingFromNumericConstant) = 0)
1353Debug.Assert((mergedInvolvesNarrowingFromNumericConstant And ConversionKind.InvolvesNarrowingFromNumericConstant) <> 0)
1420Debug.Assert(((conv.Key And ConversionKind.UserDefined) <> 0) = (conv.Value IsNot Nothing))
1439Debug.Assert(operand IsNot Nothing)
1440Debug.Assert(booleanType IsNot Nothing)
1441Debug.Assert(booleanType.Kind <> SymbolKind.ErrorType)
1442Debug.Assert(booleanType.IsBooleanType())
1512Debug.Assert(Not results.BestResult.Value.RequiresNarrowingConversion)
1532Debug.Assert(source.Type Is Nothing) ' Shouldn't try to convert already converted query lambda.
1586Debug.Assert(constantExpression.ConstantValueOpt IsNot Nothing)
1609Debug.Assert(sourceType IsNot Nothing) ' Shouldn't this be a [Nothing] literal?
1641Debug.Assert(Not result.IsBad)
1651Debug.Assert(sourceType.AllowsCompileTimeConversions() AndAlso targetDestinationType.AllowsCompileTimeConversions())
1655Debug.Assert(IsWideningConversion(conv))
1669Debug.Assert(IsWideningConversion(conv))
1681Debug.Assert(sourceType.AllowsCompileTimeConversions() AndAlso destination.GetNullableUnderlyingTypeOrSelf().AllowsCompileTimeConversions())
1723Debug.Assert(source IsNot Nothing)
1724Debug.Assert(destination IsNot Nothing)
1725Debug.Assert(source.Kind <> SymbolKind.ErrorType)
1726Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
1788Debug.Assert(source IsNot Nothing)
1789Debug.Assert(destination IsNot Nothing)
1790Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
1827Debug.Assert(source IsNot Nothing)
1828Debug.Assert(destination IsNot Nothing)
1829Debug.Assert(source.Kind <> SymbolKind.ErrorType)
1830Debug.Assert(Not TypeOf source Is ArrayLiteralTypeSymbol)
1831Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
1844Debug.Assert(source IsNot Nothing)
1845Debug.Assert(destination IsNot Nothing)
1846Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
1978Debug.Assert(src.Kind <> SymbolKind.TypeParameter)
1979Debug.Assert(dst.Kind <> SymbolKind.TypeParameter)
1986Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
2008Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
2085Debug.Assert(source IsNot Nothing)
2086Debug.Assert(destination IsNot Nothing)
2087Debug.Assert(source.Kind <> SymbolKind.ErrorType)
2088Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
2109Debug.Assert(source IsNot Nothing)
2110Debug.Assert(destination IsNot Nothing)
2111Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
2129Debug.Assert(sourceType IsNot Nothing)
2130Debug.Assert(sourceType.Kind <> SymbolKind.ErrorType)
2151Debug.Assert(FailedDueToNumericOverflow(inConversion))
2155Debug.Assert(source.Kind <> BoundKind.ArrayLiteral)
2163Debug.Assert(NoConversion(conv.Key))
2194Debug.Assert(source IsNot Nothing)
2195Debug.Assert(destination IsNot Nothing)
2196Debug.Assert(source.Kind <> SymbolKind.ErrorType)
2197Debug.Assert(Not TypeOf source Is ArrayLiteralTypeSymbol)
2198Debug.Assert(destination.Kind <> SymbolKind.ErrorType)
2268Debug.Assert((convKind And ConversionKind.DelegateRelaxationLevelMask) = 0)
2286Debug.Assert(IsNarrowingConversion(convKind))
2374Debug.Assert(srcIsInterfaceType OrElse srcIsClassType OrElse srcIsArrayType)
2386Debug.Assert((conv And Not (ConversionKind.Widening Or ConversionKind.Narrowing Or
2404Debug.Assert(dstIsClassType OrElse dstIsArrayType)
2424Debug.Assert((conv And Not (ConversionKind.Widening Or ConversionKind.Narrowing Or
2445Debug.Assert(source IsNot Nothing AndAlso Conversions.IsArrayType(source))
2446Debug.Assert(destination IsNot Nothing AndAlso Conversions.IsInterfaceType(destination))
2502Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
2536Debug.Assert(source IsNot Nothing AndAlso Conversions.IsDelegateType(source))
2537Debug.Assert(destination IsNot Nothing AndAlso Conversions.IsDelegateType(destination))
2546Debug.Assert((forwardConv And Not validBits) = 0)
2553Debug.Assert((backwardConv And Not validBits) = 0)
2576Debug.Assert(_conv = Nothing OrElse
2590Debug.Assert(IsIdentityConversion(_conv))
2615Debug.Assert(source IsNot Nothing AndAlso
2617Debug.Assert(destination IsNot Nothing AndAlso Conversions.IsInterfaceType(destination))
2618Debug.Assert(Not IsIdentityConversion(_conv))
2626Debug.Assert(Not IsIdentityConversion(_conv))
2651Debug.Assert(Conversions.IsInterfaceType(source) AndAlso Conversions.IsInterfaceType(destination))
2652Debug.Assert(Not IsIdentityConversion(_conv))
2656Debug.Assert((addConv And ConversionKind.NarrowingDueToContraVarianceInDelegate) = 0)
2667Debug.Assert(IsIdentityConversion(addConv) OrElse (addConv And Not validNonidentityBits) = 0)
2676Debug.Assert(ConversionExists(_conv))
2679Debug.Assert(IsNarrowingConversion(_conv))
2685Debug.Assert(_conv = (addConv And validNonidentityBits))
2704Debug.Assert(Conversions.IsInterfaceType(source) OrElse Conversions.IsDelegateType(source))
2705Debug.Assert(Conversions.IsInterfaceType(destination) OrElse Conversions.IsDelegateType(destination))
2706Debug.Assert(Conversions.IsInterfaceType(source) = Conversions.IsInterfaceType(destination))
2832Debug.Assert(Not IsIdentityConversion(conv))
2833Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
2842Debug.Assert((Not atMostNarrowingDueToContraVarianceInDelegate AndAlso involvesEnumTypeConversions = 0 AndAlso conversionExists) OrElse Not identity)
2850Debug.Assert(varianceConversionAmbiguity = Nothing)
2936Debug.Assert(derivedType IsNot Nothing AndAlso
2938Debug.Assert(baseType IsNot Nothing AndAlso Conversions.IsClassType(baseType))
2949Debug.Assert(Not source.IsSameTypeIgnoringAll(destination))
3064Debug.Assert(NoConversion(ClassifyTypeParameterConversion(srcElem, dstElem, varianceCompatibilityClassificationDepth, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)))
3067Debug.Assert(NoConversion(ClassifyArrayConversion(srcElem, dstElem, varianceCompatibilityClassificationDepth, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)))
3068Debug.Assert(NoConversion(ClassifyTypeParameterConversion(srcElem, dstElem, varianceCompatibilityClassificationDepth, CompoundUseSiteInfo(Of AssemblySymbol).Discarded)))
3101Debug.Assert(Not srcElem.IsSameTypeIgnoringAll(dstElem))
3111Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
3126Debug.Assert(Not dstElem.IsReferenceType)
3131Debug.Assert(Not dstElemIsValueType) ' enforced by one of the outer "If"s
3166Debug.Assert(Not srcElemIsValueType AndAlso Not dstElemIsValueType)
3181Debug.Assert(srcElemIsValueType OrElse dstElemIsValueType)
3192Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
3290Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
3294Debug.Assert(NoConversion(conv))
3308Debug.Assert(dstElemIsValueType)
3323Debug.Assert(NoConversion(conv))
3418Debug.Assert((conv And Not (ConversionKind.Widening Or ConversionKind.Narrowing Or
3504Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
3505Debug.Assert(Not ConversionExists(conv) OrElse (conv And ConversionKind.DelegateRelaxationLevelMask) = 0 OrElse (conv And ConversionKind.Tuple) <> 0)
3519Debug.Assert((conv And ConversionKind.Tuple) = 0)
3534Debug.Assert(Not ConversionExists(conv) OrElse (conv And ConversionKind.DelegateRelaxationLevelMask) = 0 OrElse (conv And ConversionKind.Tuple) <> 0)
3543Debug.Assert(dstIsNullable)
3552Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
3553Debug.Assert(Not ConversionExists(conv) OrElse (conv And ConversionKind.DelegateRelaxationLevelMask) = 0 OrElse (conv And ConversionKind.Tuple) <> 0)
3582Debug.Assert(sourceElementTypes.Length = targetElementTypes.Length)
3602Debug.Assert((elementConversion And ConversionKind.InvolvesNarrowingFromNumericConstant) = 0)
3690Debug.Assert(IsNarrowingConversion(conv)) ' We are relying on this while classifying conversions from type parameter to avoid need for recursion.
3824Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
3842Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
3885Debug.Assert((conv And Not (ConversionKind.Widening Or ConversionKind.Narrowing Or
3978Debug.Assert((conv And ConversionKind.VarianceConversionAmbiguity) = 0)
4048Debug.Assert(returnTypeOfConvertFromMethod IsNot Nothing)
4049Debug.Assert(returnTypeOfConvertToMethod IsNot Nothing)
4133Debug.Assert(Conversions.IsWideningConversion(conversion))
4167Debug.Assert(Not lambdaOrDelegateInvokeSymbol.ReturnsByRef) ' No interaction of ByRef return with other relaxations
4177Debug.Assert(toDelegateInvokeMethod.MethodKind = MethodKind.DelegateInvoke)
4254Debug.Assert(conversion.Operand.IsNothingLiteral() OrElse conversion.Operand.Kind = BoundKind.Lambda)
4337Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update InvertConversionRequirement()")
4354Debug.Assert(False, "unexpected: ArrayElementConversion restriction has no reverse")
4367Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update StrengthenConversionRequirementToReference()")
4390Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update CombineInferenceRestrictions()")
4440Debug.Assert(NoConversion(conv) OrElse
4446Debug.Assert(NoConversion(conv) OrElse
4460Debug.Assert(NoConversion(conv) OrElse
Semantics\TypeInference\TypeArgumentInference.vb (29)
36Debug.Assert(candidate Is candidate.ConstructedFrom)
105Debug.Assert(current.NodeType = nodeType, "Should only have expected incoming edges.")
106Debug.Assert(current.InferenceComplete, "Should have inferred type already")
199Debug.Assert(Not (TypeOf inferredType Is ArrayLiteralTypeSymbol))
220Debug.Assert(_parameter Is Nothing)
242Debug.Assert(currentGraphNode.NodeType = InferenceNodeType.ArgumentNode, "Should only have named nodes as incoming edges.")
363Debug.Assert(Not typeByAssumption OrElse type.IsObjectType() OrElse TypeOf type Is ArrayLiteralTypeSymbol, "unexpected: a type which was 'by assumption', but isn't object or array literal")
384Debug.Assert(Not foundInList, "List is supposed to be unique: how can we already find two of the same type in this list.")
431Debug.Assert(currentGraphNode.NodeType = InferenceNodeType.TypeParameterNode, "Should only have typed nodes as incoming edges.")
519Debug.Assert(Expression.Type Is Nothing)
549Debug.Assert(inferenceRestrictions = RequiredConversion.Any, "there should have been no prior restrictions by the time we encountered ByRef")
555Debug.Assert(inferenceRestrictions = RequiredConversion.AnyAndReverse, "expected ByRef to require AnyAndReverseConversion")
631Debug.Assert(delegateReturnType Is Nothing OrElse delegateReturnTypeReferenceBoundNode IsNot Nothing)
632Debug.Assert(diagnostic IsNot Nothing)
633Debug.Assert(diagnostic.AccumulatesDependencies OrElse Not useSiteInfo.AccumulatesDependencies)
714Debug.Assert(diagnostic IsNot Nothing)
715Debug.Assert(diagnostic.AccumulatesDependencies OrElse Not useSiteInfo.AccumulatesDependencies)
936Debug.Assert(paramArrayArgument Is Nothing OrElse paramArrayArgument.Kind <> BoundKind.OmittedArgument)
950Debug.Assert(isExpandedParamArrayForm)
1123Debug.Assert(argNode.Expression.Kind = BoundKind.TupleLiteral)
1149Debug.Assert(argNode.Expression.Kind = BoundKind.AddressOfOperator)
1496Debug.Assert(VarianceKind.None = parameterTypeAsNamedType.TypeParameters(typeArgumentIndex).Variance)
1532Debug.Assert(parameterTypeAsNamedType Is Nothing AndAlso argumentTypeAsNamedType Is Nothing)
1660Debug.Assert(argumentInvokeProc IsNot Nothing OrElse Not argumentDelegateType.IsAnonymousType)
1808Debug.Assert(fixedTypeTypeKind = TypeKind.Interface)
1984Debug.Assert(argument.Kind = BoundKind.UnboundLambda OrElse
2151Debug.Assert(boundLambda.LambdaSymbol.ReturnType Is returnTypeInfo.Key)
2188Debug.Assert(TypeSymbol.Equals(lambdaReturnNamedType.OriginalDefinition, argument.GetBinderFromLambda().Compilation.GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T), TypeCompareKind.ConsiderEverything) OrElse
2274Debug.Assert(typeInfos.Count() >= 2, "Must have at least 2 elements in the list")
Semantics\TypeInference\TypeInferenceCollection.vb (16)
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")
205Debug.Assert(resultList.Count() = numberOfUnstrictCandidates, "code logic error: we should have >1 unstrict candidates, like we calculated earlier")
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?")
326Debug.Assert(rank <> -1) ' Can we get different ranks at all? If we can, we should investigate if we can do something better than just give up.
393Debug.Assert(False, "unexpected: how can there be multiple strict candidates and no widest ones??? please tell lwischik if you find such a case.")
401Debug.Assert(resultList.Count > 0, "code logic error: we already said there were multiple strict candidates")
425Debug.Assert(RequiredConversion.Count = 8, "If you've updated the type argument inference restrictions, then please also update CheckHintSatisfaction()")
493Debug.Assert(Conversions.IsWideningConversion(inConversion) AndAlso Conversions.IsWideningConversion(outConversion) AndAlso
536Debug.Assert(False, "code logic error: inferenceRestrictions; we should have dealt with all of them already")
549Debug.Assert(False, "code logic error: ConversionClass; we should have dealt with them already")
564Debug.Assert(type IsNot Nothing)
567Debug.Assert(Not type.IsVoidType(), "Please do not put Void types into the dominant type algorithm. That doesn't make sense.")
594Debug.Assert(Not foundInList, "List is supposed to be unique: how can we already find two of the same type in this list.")
630Debug.Assert(names1.Length = names2.Length)
Symbols\Source\SourceMemberContainerTypeSymbol.vb (85)
271Debug.Assert(Not declaration.SyntaxReferences.First.SyntaxTree.IsEmbeddedSyntaxTree)
274Debug.Assert(Not declaration.SyntaxReferences.First.SyntaxTree.IsEmbeddedSyntaxTree)
362Debug.Assert(infosBuffer.Count = 0)
377Debug.Assert(Not container.IsDelegateType())
394Debug.Assert(container.IsInterfaceType() AndAlso container.HasVariance())
447Debug.Assert(Not HaveDiagnostics(infosBuffer))
451Debug.Assert(Not HaveDiagnostics(infosBuffer))
455Debug.Assert(Not HaveDiagnostics(infosBuffer))
473Debug.Assert(Not HaveDiagnostics(infosBuffer))
485Debug.Assert(Me.InterfacesAndTheirBaseInterfacesNoUseSiteDiagnostics(implementedInterface).Contains(implementedInterface))
499Debug.Assert(directInterface IsNot Nothing)
605Debug.Assert(typeParameterIndex >= 0 AndAlso typeParameterIndex < constructedType.Arity)
686Debug.Assert(inappropriateOut, "unexpected: a variance error in ByVal must be due to an inappropriate out")
699Debug.Assert(Not inappropriateOut, "unexpected: a variance error in Return Type must be due to an inappropriate in")
704Debug.Assert(inappropriateOut, "unexpected: a variance error in Constraint must be due to an inappropriate out")
718Debug.Assert(Not inappropriateOut, "unexpected: a variance error in ReadOnlyProperty must be due to an inappropriate in")
723Debug.Assert(inappropriateOut, "unexpected: a variance error in WriteOnlyProperty must be due to an inappropriate out")
766Debug.Assert(typeParameterInfo.ConstructedType.Arity > 1)
779Debug.Assert(constructionDepth > 1)
792Debug.Assert(typeParameterInfo.ConstructedType.Arity > 1)
870Debug.Assert(typeParameterInfo.ConstructedType.Arity > 1)
878Debug.Assert(constructionDepth > 1)
885Debug.Assert(typeParameterInfo.ConstructedType.Arity > 1)
902Debug.Assert(namedType.TypeParameters(0).Variance = VarianceKind.None, "unexpected: a nullable type should have one generic parameter with no variance")
960Debug.Assert(Not HaveDiagnostics(infosBuffer))
970Debug.Assert(Not HaveDiagnostics(infosBuffer))
999Debug.Assert(Not HaveDiagnostics(infosBuffer))
1035Debug.Assert(Not HaveDiagnostics(infosBuffer))
1068Debug.Assert(Not HaveDiagnostics(infosBuffer))
1108Debug.Assert(Not HaveDiagnostics(infosBuffer))
1161Debug.Assert(Me.MightContainExtensionMethods)
1165Debug.Assert(_lazyContainsExtensionMethods <> ThreeState.False)
1189Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.False)
1194Debug.Assert(_lazyContainsExtensionMethods <> ThreeState.True)
1197Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.True)
1201Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.Unknown)
1202Debug.Assert(_lazyContainsExtensionMethods <> ThreeState.Unknown)
1203Debug.Assert(_lazyEmitExtensionAttribute = ThreeState.False OrElse _lazyContainsExtensionMethods = ThreeState.True)
1359Debug.Assert(Locations.Length > 0)
1361Debug.Assert(firstLocation.IsInSource)
1523Debug.Assert(staticInitializersSyntaxLength = If(staticInitializers.IsDefaultOrEmpty, 0, staticInitializers.Sum(Function(s) s.Sum(Function(i) If(Not i.IsMetadataConstant, i.Syntax.Span.Length, 0)))))
1524Debug.Assert(instanceInitializersSyntaxLength = If(instanceInitializers.IsDefaultOrEmpty, 0, instanceInitializers.Sum(Function(s) s.Sum(Function(i) i.Syntax.Span.Length))))
1572Debug.Assert(initializer.Syntax.SyntaxTree Is initializers.Last().Syntax.SyntaxTree)
1573Debug.Assert(initializer.Syntax.Span.Start > initializers.Last().Syntax.Span.Start)
1605Debug.Assert(_lazyTypeMembers IsNot Nothing)
1614Debug.Assert(s_emptyTypeMembers.Count = 0)
1650Debug.Assert(_defaultPropertyName Is Nothing)
1668Debug.Assert(Volatile.Read(_lazyMembersAndInitializers) IsNot Nothing)
1753Debug.Assert(method.Locations.Length = 1)
1789Debug.Assert(bestPartialMethodLocation IsNot Nothing)
1805Debug.Assert(candidateLocation IsNot Nothing)
1910Debug.Assert(partialMethod.ParameterCount = implMethod.ParameterCount)
1922Debug.Assert(implParameter.Locations.Length = 1)
1934Debug.Assert(declTypeParams.Length = implTypeParams.Length)
1943Debug.Assert(implParameter.Locations.Length = 1)
2037Debug.Assert(type IsNot Nothing)
2038Debug.Assert(fieldPath IsNot Nothing)
2039Debug.Assert(containingDefinitionsPath IsNot Nothing)
2101Debug.Assert(Me.IsValueType AndAlso Not Me.IsTypeParameter)
2163Debug.Assert(firstField IsNot Nothing)
2167Debug.Assert(symbolToReportErrorOn.Locations.Length > 0)
2256Debug.Assert(Me.Locations.Length > 0)
2301Debug.Assert(defaultProperty IsNot Nothing)
2366Debug.Assert(fieldOrPropertyArray.Length > 0)
2449Debug.Assert(symbol.Locations.Length > 0)
2454Debug.Assert(symbol.Locations.Length > 0)
2544Debug.Assert(diagBag.AccumulatesDiagnostics)
2628Debug.Assert(Not reportAsInvalid)
2778Debug.Assert(symbols.Where(Function(sym) sym.Kind = SymbolKind.Method AndAlso
2950Debug.Assert(symImplicitlyDefinedBy IsNot Nothing)
3016Debug.Assert(definedSymbols.Count > 0)
3299Debug.Assert(distanceFromCtorBody > 0)
3498Debug.Assert(Me.IsDefinition) ' Don't do this on constructed types
3539Debug.Assert(Not sourceMethod.IsUserDefinedOperator())
3578Debug.Assert((comparisonResults And SymbolComparisonResults.PropertyInitOnlyMismatch) = 0)
3759Debug.Assert((comparisonResults And SymbolComparisonResults.PropertyInitOnlyMismatch) = 0)
3795Debug.Assert(EqualsIgnoringComparer.InstanceIgnoringTupleNames.Equals([interface], other))
3796Debug.Assert(Not TypeSymbol.Equals([interface], other, TypeCompareKind.ConsiderEverything))
3822Debug.Assert(interface2.IsGenericType AndAlso TypeSymbol.Equals(interface1.OriginalDefinition, interface2.OriginalDefinition, TypeCompareKind.ConsiderEverything))
3843Debug.Assert((comparisonResults And SymbolComparisonResults.PropertyInitOnlyMismatch) = 0)
3876Debug.Assert((comparisonResults And SymbolComparisonResults.OptionalParameterTypeMismatch) = 0)
3928Debug.Assert(Not TypeSymbol.Equals(directInterface1, interface1, TypeCompareKind.ConsiderEverything) AndAlso Not TypeSymbol.Equals(directInterface2, interface2, TypeCompareKind.ConsiderEverything))
4009Debug.Assert(Not TypeSymbol.Equals(directInterface1, interface1, TypeCompareKind.ConsiderEverything) AndAlso Not TypeSymbol.Equals(directInterface2, interface2, TypeCompareKind.ConsiderEverything))
4024Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.True)
4034Debug.Assert(_lazyEmitExtensionAttribute <> ThreeState.Unknown)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (54)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (23)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (17)
124Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
213Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
269Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
316Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
348Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
460Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
461Debug.Assert(Not (targetToken.IntersectsWith(position) AndAlso IsWord(targetToken)))
489Debug.Assert(token = syntaxTree.GetTargetToken(position, cancellationToken))
589Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
637Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
671Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
685Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
717Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
751Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
763Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
776Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
819Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
Microsoft.CodeAnalysis.VisualBasic.Features (72)
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (6)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (107)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (17)
124Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
213Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
269Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
316Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
348Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
460Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
461Debug.Assert(Not (targetToken.IntersectsWith(position) AndAlso IsWord(targetToken)))
489Debug.Assert(token = syntaxTree.GetTargetToken(position, cancellationToken))
589Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
637Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
671Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
685Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
717Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
751Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
763Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
776Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
819Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
Microsoft.CodeAnalysis.Workspaces (711)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
263Debug.Assert(
Microsoft.CodeAnalysis.Workspaces.MSBuild (12)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (30)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (3)
Microsoft.CSharp (899)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs (1)
40Debug.Assert(
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MemberGroup.cs (1)
14Debug.Assert(
Microsoft.Data.Analysis (59)
TextFieldParser.cs (25)
439Debug.Fail("The TextFieldType is not supported");
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");
1011Debug.Fail("Delimiter element is empty. This should have been caught on input");
1036Debug.Fail("Unknown TextFieldType");
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");
1119Debug.Fail("Unknown TextFieldType");
1142Debug.Assert(_delimiters != null, "No delimiters set!");
Microsoft.Data.Analysis.Tests (27)
parent\parent\src\Microsoft.Data.Analysis\TextFieldParser.cs (25)
439Debug.Fail("The TextFieldType is not supported");
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");
1011Debug.Fail("Delimiter element is empty. This should have been caught on input");
1036Debug.Fail("Unknown TextFieldType");
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");
1119Debug.Fail("Unknown TextFieldType");
1142Debug.Assert(_delimiters != null, "No delimiters set!");
Microsoft.Diagnostics.DataContractReader (3)
Microsoft.Diagnostics.DataContractReader.Abstractions (7)
Microsoft.Diagnostics.DataContractReader.Contracts (197)
Contracts\StackWalk\Context\X86\X86Unwinder.cs (35)
98Debug.Assert(gcInfo.IsInEpilog);
99Debug.Assert(gcInfo.EpilogOffset > 0);
133Debug.Assert(gcInfo.RawStackSize != 0);
243Debug.Assert(gcInfo.IsInEpilog);
244Debug.Assert(!gcInfo.Header.EbpFrame && !gcInfo.Header.DoubleAlign);
245Debug.Assert(gcInfo.EpilogOffset > 0);
264Debug.Assert(gcInfo.RawStackSize == _target.PointerSize);
297Debug.Assert(
309Debug.Assert(!gcInfo.Header.EbpFrame && !gcInfo.Header.DoubleAlign);
310Debug.Assert(!gcInfo.IsInEpilog);
349Debug.Assert(gcInfo.IsInProlog);
350Debug.Assert(!gcInfo.Header.EbpFrame && !gcInfo.Header.DoubleAlign);
430Debug.Assert(gcInfo.Header.EbpFrame || gcInfo.Header.DoubleAlign);
498Debug.Assert(gcInfo.IsInProlog);
499Debug.Assert(gcInfo.Header.EbpFrame || gcInfo.Header.DoubleAlign);
518Debug.Assert(CheckInstrByte(ReadByteAt(methodStart + offset), X86_INSTR_PUSH_EBP) ||
611Debug.Assert(CheckInstrBytePattern((byte)(ReadByteAt(baseAddress + offset) & 0xFD), 0x81, ReadByteAt(baseAddress + offset)));
612Debug.Assert(CheckInstrBytePattern((byte)(ReadByteAt(baseAddress + offset + 1) & 0xC0), 0xC0, ReadByteAt(baseAddress + offset + 1)));
615Debug.Assert(((ReadByteAt(baseAddress + offset) & 2) != 0 == CAN_COMPRESS(val)) || IsMarkerInstr(ReadByteAt(baseAddress + offset)));
625Debug.Assert(CheckInstrBytePattern((byte)(ReadByteAt(baseAddress + offset) & 0xF8), 0x58, ReadByteAt(baseAddress + offset)));
633Debug.Assert(CheckInstrBytePattern((byte)(ReadByteAt(baseAddress + offset) & 0xF8), 0x50, ReadByteAt(baseAddress + offset)));
642Debug.Assert(
661Debug.Assert(
671Debug.Assert(size != 0);
697Debug.Assert(size < 0x3000);
705Debug.Assert(CheckInstrWord(ReadShortAt(baseAddress + offset), X86_INSTR_w_TEST_ESP_DWORD_OFFSET_EAX));
730Debug.Assert(size >= 0x3000);
795Debug.Assert(CheckInstrWord(_target.Read<ushort>(baseAddress + offset), X86_INSTR_w_TEST_ESP_EAX));
809Debug.Assert(val == _target.Read<sbyte>(baseAddress + offset + 3));
810Debug.Assert(CAN_COMPRESS(val));
814Debug.Assert(CheckInstrWord(wOpcode, X86_INSTR_w_LEA_EAX_ESP_DWORD_OFFSET));
815Debug.Assert(val == _target.Read<int>(baseAddress + offset + 3));
816Debug.Assert(!CAN_COMPRESS(val));
833Debug.Assert(CheckInstrWord(_target.Read<ushort>(baseAddress + offset), X86_INSTR_W_CALL_IND_IMM));
895Debug.Assert((valPattern & val) == valPattern);
Microsoft.Diagnostics.DataContractReader.DataGenerator (2)
Microsoft.Diagnostics.DataContractReader.Legacy (35)
Dbi\DacDbiImpl.cs (15)
91Debug.ValidateHResult(HResults.S_OK, hrLocal);
125Debug.ValidateHResult(HResults.S_OK, hrLocal);
1651Debug.Assert(vmMethodDesc != 0, $"vmMethodDesc is null");
1652Debug.Assert(fCodeAvailable != 0, $"fCodeAvailable is false");
1843Debug.ValidateHResult(hr, hrLocal);
1893Debug.ValidateHResult(hr, hrLocal);
1988Debug.ValidateHResult(hr, hrLocal);
2035Debug.ValidateHResult(hr, hrLocal);
2836Debug.Fail($"Unexpected generics type token index: {dwExactGenericArgsTokenIndex}");
4212Debug.Assert(pVmModule != null);
4220Debug.Assert(pMetadataToken != null);
4808Debug.Assert(threadPtr != TargetPointer.Null, "A thread should have been found");
7591Debug.Assert(rts.IsArray(typeHandle, out _));
7631Debug.Assert(modulePtr != TargetPointer.Null);
7685Debug.Assert(modulePtr != TargetPointer.Null);
Microsoft.Diagnostics.NETCore.Client (10)
Microsoft.DiaSymReader (20)
Microsoft.DotNet.ApiCompatibility (6)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Cli.CoreUtils (3)
Microsoft.DotNet.Cli.Utils (5)
Microsoft.DotNet.HotReload.Watch (38)
Microsoft.DotNet.HotReload.WebAssembly.Browser (5)
Microsoft.DotNet.ILAssembler (31)
Microsoft.DotNet.NativeWrapper (1)
Microsoft.DotNet.PackageValidation (2)
Microsoft.DotNet.ProjectTools (17)
Microsoft.DotNet.SdkResolver (1)
Microsoft.DotNet.StrongName (1)
Microsoft.DotNet.XliffTasks (1)
Microsoft.Extensions.AI (24)
Microsoft.Extensions.AI.Abstractions (16)
Microsoft.Extensions.AI.Evaluation.Safety (2)
Microsoft.Extensions.AI.OpenAI (2)
Microsoft.Extensions.Caching.Hybrid (32)
Internal\BufferChunk.cs (10)
31Debug.Assert(array is not null, "expected valid array input");
41Debug.Assert(!ReturnToPool, "do not return right-sized arrays");
42Debug.Assert(Length == array.Length, "array length not respected");
47Debug.Assert(array is not null, "expected valid array input");
48Debug.Assert(length >= 0, "expected valid length");
52Debug.Assert(ReturnToPool == returnToPool, "return-to-pool not respected");
53Debug.Assert(Length == length, "length not respected");
84Debug.Assert(OversizedArray is null && !ReturnToPool, "expected clean slate after recycle");
98Debug.Assert(copy.Length == Length, "same length expected");
99Debug.Assert(!copy.ReturnToPool, "do not return to pool");
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.Memory (3)
Microsoft.Extensions.Caching.StackExchangeRedis (9)
Microsoft.Extensions.Configuration (5)
Microsoft.Extensions.Configuration.Binder (10)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (71)
Microsoft.Extensions.Configuration.EnvironmentVariables (6)
Microsoft.Extensions.Configuration.Json (1)
Microsoft.Extensions.DataIngestion (6)
Microsoft.Extensions.DataIngestion.Markdig (2)
Microsoft.Extensions.DataIngestion.MarkItDown (2)
Microsoft.Extensions.DependencyInjection (20)
Microsoft.Extensions.DependencyInjection.Abstractions (11)
Microsoft.Extensions.DependencyModel (14)
Microsoft.Extensions.Diagnostics (17)
Microsoft.Extensions.Diagnostics.Abstractions (1)
Microsoft.Extensions.DotNetDeltaApplier (8)
Microsoft.Extensions.FileProviders.Embedded (1)
Microsoft.Extensions.FileProviders.Physical (6)
Microsoft.Extensions.Hosting (4)
Microsoft.Extensions.Hosting.Systemd (1)
Microsoft.Extensions.Hosting.WindowsServices (3)
Microsoft.Extensions.Http (9)
Microsoft.Extensions.Identity.Core (5)
Microsoft.Extensions.Logging (5)
Microsoft.Extensions.Logging.Abstractions (6)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.Logging.Configuration (1)
Microsoft.Extensions.Logging.Console (23)
Microsoft.Extensions.Logging.Debug (2)
Microsoft.Extensions.Logging.EventSource (15)
Microsoft.Extensions.Logging.Generators (11)
Microsoft.Extensions.Logging.MSBuild (1)
Microsoft.Extensions.ObjectPool (1)
Microsoft.Extensions.Options.DataAnnotations (4)
Microsoft.Extensions.Primitives (4)
Microsoft.Extensions.ServiceDiscovery (4)
Microsoft.Extensions.ServiceDiscovery.Dns (10)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
Microsoft.Extensions.TimeProvider.Testing (1)
Microsoft.Extensions.Validation.ValidationsGenerator (3)
Microsoft.Extensions.VectorData.Abstractions (5)
Microsoft.Gen.Logging (1)
Microsoft.Interop.ComInterfaceGenerator (12)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (22)
Microsoft.JSInterop (4)
Microsoft.Maui (11)
Microsoft.Maui.Controls (5)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Controls.Foldable (4)
Microsoft.Maui.Controls.Xaml (14)
Microsoft.Maui.Essentials (10)
Microsoft.Maui.Graphics (8)
Microsoft.Maui.Graphics.Skia (5)
Microsoft.Maui.Graphics.Text.Markdig (1)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (2)
Microsoft.Maui.Maps (3)
Microsoft.ML.AutoML.Samples (1)
Microsoft.ML.Core (11)
Microsoft.ML.CpuMath (3)
Microsoft.ML.Data (1)
Microsoft.ML.DataView (47)
Microsoft.ML.ImageAnalytics (6)
Microsoft.ML.InternalCodeAnalyzer (5)
Microsoft.ML.TestFramework (2)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Tokenizers (115)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (15)
Microsoft.ML.TorchSharp (7)
Microsoft.NET.Build.Containers (14)
Microsoft.NET.Build.Tasks (6)
Microsoft.NET.HostModel (44)
Microsoft.Net.Http.Headers (4)
Microsoft.NET.ProjectData (5)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
Microsoft.NET.Sdk.Publish.Tasks (21)
Microsoft.NET.Sdk.Razor.Tasks (2)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (1)
Microsoft.Private.Windows.Core (70)
Microsoft.SourceLink.AzureDevOpsServer.Git (3)
Microsoft.SourceLink.AzureRepos.Git (3)
Microsoft.SourceLink.Bitbucket.Git (3)
Microsoft.SourceLink.Common (2)
Microsoft.SourceLink.Gitea (2)
Microsoft.SourceLink.Gitee (2)
Microsoft.SourceLink.GitHub (2)
Microsoft.SourceLink.GitLab (2)
Microsoft.SourceLink.GitWeb (2)
Microsoft.SourceLink.Tools.Package (1)
Microsoft.TemplateEngine.Cli (2)
Microsoft.TemplateEngine.Core (2)
Microsoft.TestPlatform.AdapterUtilities (26)
Microsoft.TestPlatform.Build (5)
Microsoft.TestPlatform.CommunicationUtilities (5)
Microsoft.TestPlatform.CoreUtilities (5)
Microsoft.TestPlatform.CrossPlatEngine (4)
Microsoft.TestPlatform.Extensions.BlameDataCollector (4)
Microsoft.TestPlatform.Filter.Source (2)
Microsoft.TestPlatform.PlatformAbstractions (10)
Microsoft.TestPlatform.TestHostRuntimeProvider (4)
Microsoft.TestPlatform.Utilities (4)
Microsoft.VisualBasic.Forms (27)
Microsoft.VisualStudio.TestPlatform.Common (7)
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (4)
Microsoft.VisualStudio.TestPlatform.Extensions.TestIds.TestLogger (4)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (8)
Microsoft.VisualStudio.TestPlatform.ObjectModel (28)
Microsoft.Web.XmlTransform (34)
Microsoft.Win32.Registry (10)
Microsoft.Win32.SystemEvents (9)
Mono.Cecil (2)
MSBuild (5)
netstandard (1)
NuGet.Build.Tasks (4)
NuGet.CommandLine.XPlat (3)
NuGet.Commands (14)
NuGet.Common (1)
NuGet.Configuration (7)
NuGet.DependencyResolver.Core (3)
NuGet.Frameworks (4)
NuGet.LibraryModel (6)
NuGet.PackageManagement (15)
NuGet.Packaging (78)
NuGet.ProjectModel (9)
NuGet.Protocol (15)
NuGet.Resolver (6)
NuGet.Versioning (6)
PresentationBuildTasks (212)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (27)
687Debug.Fail("Assembly, Type and Attribute records are not cached, so don't ask for one.");
712Debug.Fail("Unknown RecordType");
765Debug.Assert(null == _writeCache[(int)record.RecordType]);
855set { Debug.Assert (value == -1, "Setting fixed record to an invalid size"); }
864Debug.Fail("Must override RecordType");
902Debug.Assert( value <= 3 && value >= 0 );
1090Debug.Assert(RecordSize < 0);
1500Debug.Assert(_valuePositionPosition != -1,
1683Debug.Assert(_valuePositionPosition != -1,
2048set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2118set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2179set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2386Debug.Assert(value <= ExtensionIdMask);
2406set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
2983set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
3197set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3284set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3433Debug.Assert(_contentSizePosition != -1,
3478set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3638set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3736set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3814set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3999Debug.Assert(FilePos != -1,"UpdateWrite called but Write Never was");
4542Debug.Assert( SerializerTypeId != 0 );
4695Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo)
4714Debug.Assert(arr.Length == 3 && arr[0] != null && arr[1] != null);
4757Debug.Assert(arr.Length == 3 && arr[0] != null && arr[1] != null);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (21)
133Debug.Assert(null != DocumentStartRecord);
404Debug.Assert(_deferElementDepth == 0);
405Debug.Assert(_deferComplexPropertyDepth == 0);
406Debug.Assert(_staticResourceElementDepth == 0);
407Debug.Assert(_dynamicResourceElementDepth == 0);
408Debug.Assert(_staticResourceRecordList == null);
426Debug.Assert(_staticResourceElementDepth == 0);
463Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
562Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
598Debug.Assert(!InStaticResourceSection, "We do not support x:Shared within a StaticResource Section");
782Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
838Debug.Assert(keyRecord.RecordList.Count == 0, "Should have empty record list");
864Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
875Debug.Assert(_deferElementDepth == 2);
1064Debug.Assert(extensionTypeId != (short)KnownElements.TypeExtension);
1081Debug.Assert(typeValue != null);
1626Debug.Assert(keyRecord != null, "Unknown key record type in defer load dictionary");
1634Debug.Assert(keyIndex == _deferKeys.Count,
1657Debug.Assert(_deferElementDepth > 0 && CollectingValues,
1665Debug.Assert(valueDeferRecord.Record != null &&
1677Debug.Assert(valueDeferRecord.Record != null && valueDeferRecord.Record.RecordType == BamlRecordType.ElementEnd,
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (53)
115Debug.Assert(xamlParser != null, "Cannot have null xaml parser");
116Debug.Assert(parserContext != null, "Cannot have null parser context");
117Debug.Assert(xmlReader != null, "Cannot have null xmlReader");
327Debug.Assert(null != xamlNode, "null returned from the collection");
356Debug.Assert(null != XmlReader);
395Debug.Assert(!IsMoreData(), "Setting state to done but not done parsing.");
428Debug.Assert(null != xamlNode, "null returned from the collection");
1174Debug.Assert(null != typeFullName, "type name not set");
1175Debug.Assert(null != dynamicObjectName, "dynamicObject name not set");
1176Debug.Assert(null != assemblyName, "assembly name not set");
1503Debug.Assert( (null==ContentPropertyInfo && null==ContentPropertyName)
1827Debug.Assert(null == dynamicObject,"DynamicObject should be null for code");
1995Debug.Assert(!endTagHasBeenRead, "Read past end tag on end tag");
2066Debug.Assert(!endTagHasBeenRead);
2216Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2225Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2234Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2243Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2252Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2261Debug.Assert (attributeFound || !IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2754Debug.Assert(unknownTagName != null || null != parentType);
3177Debug.Assert(null != assemblyName, "property without an AssemblyName");
3178Debug.Assert(null != declaringTypeFullName, "property without a type name");
3179Debug.Assert(null != dynamicObjectName, "property without a field Name");
3699Debug.Assert(typeAndSerializer == null ||
3753Debug.Assert(CurrentContext.ContextType == ElementContextType.PropertyComplex ||
4132Debug.Assert(null != assemblyName, "property without an AssemblyName");
4133Debug.Assert(null != typeFullName, "property without a type name");
4134Debug.Assert(null != dynamicObjectName, "property without a field Name");
4813Debug.Assert( collectionTypeID >= 0
5051Debug.Assert( xmlNodeType == XmlNodeType.Text ||
5084Debug.Assert( isWhitespace,
5132Debug.Assert (parentNodeType == ElementContextType.Unknown,
5262Debug.Assert(null != XmlReader, "XmlReader is not yet set");
5308Debug.Fail("XmlReader doesn't support LineNumber");
5339Debug.Fail("XmlReader doesn't support LinePosition");
5491Debug.Assert(currentPos > 0 && currentPos < s.Length - 1);
5566Debug.Assert(null != text, "String passed to CollapseText cannot be null");
5567Debug.Assert(textLength > 0, "String passed to Collapsed Text cannot be empty");
5827Debug.Assert((_nodeIndex == 0 && _xamlNodes.Count == 0 ) || (_nodeIndex < _xamlNodes.Count),
5847Debug.Assert((_nodeIndex == 0 && _xamlNodes.Count == 0 ) || (_nodeIndex < _xamlNodes.Count),
5874Debug.Assert(!value || _insertionIndex == -1, "Attribute node collection is already marked for insertion.");
5933Debug.Assert(_nodeIndex == _xamlNodes.Count, "NodeIndex is larger than node count.");
6001Debug.Assert( _typeConverterDecisionState == TypeConverterDecisionState.ElementEnd,
6064Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex]).TokenType==XamlNodeType.ElementStart,
6083Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex])==xamlNode,
6107Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex])==xamlNode,
6123Debug.Assert( _typeConverterTextWrittenAndNotProcessed != null,
6152Debug.Assert(((XamlNode)_xamlNodes[_typeConverterCandidateIndex]).TokenType==XamlNodeType.ElementStart,
6344Debug.Fail($"State machine checking for TypeConverter syntax has encountered an unexpected XamlNode type {tokenType}");
6428Debug.Assert(null != textFlowData, "No data for TextFlow");
6450Debug.Assert(null != typeRightTag, "ElementType not yet assigned to Node");
6571Debug.Assert(0 == textFlowData.InlineCount, "Text stack still has an inline count");
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (18)
935Debug.Assert(null != localName, "null localName");
936Debug.Assert(null != xmlNamespace, "null xmlNamespace");
1906Debug.Assert(typeInfo != null, "Must have cached type info at this point");
2304Debug.Assert(memberName != null);
2307Debug.Assert(memberInfo != null);
2322Debug.Assert(targetType != null);
2398Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace");
2399Debug.Assert(null != localName,"null value passed for localName");
2437Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace");
2438Debug.Assert(null != localName,"null value passed for localName");
2590Debug.Assert(namespaceMap.ClrNamespace != null,"Null CLR Namespace");
2591Debug.Assert(localName != null,"Null localName");
3150Debug.Fail("Should initialize cache prior to compiling");
3421Debug.Fail("Should initialize cache prior to compiling");
3440Debug.Assert(null != type, "Null passed for type to GetTypeConverterType");
3515Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverterType");
3744Debug.Assert(null != type, "null value for type passed to GetWhitespace");
4006Debug.Assert(_dpLookupHashtable != null,
PresentationCore (2203)
MS\Internal\TextFormatting\Bidi.cs (30)
684Debug.Assert(CharProperty[1, (int) startClass]==1 || (startClass == DirectionClass.ArabicLetter),
687Debug.Assert(CharProperty[1, (int) endClass]==1, ("Cannot use non strong type to resolve neutrals"));
710Debug.Assert(CharProperty[2, (int) characterClass[counter + classIndex]]==0,
735Debug.Assert(CharProperty[2, (int) characterClass[counter + classIndex]]==0, "Changing class of a fixed class");
846Debug.Assert(startOfNeutrals == PositionInvalid,
891Debug.Assert(startOfDelayed != PositionInvalid,
936Debug.Assert(startOfNeutrals == PositionInvalid,
941Debug.Assert(startOfDelayed != PositionInvalid,
1041Debug.Assert(startOfNeutrals != PositionInvalid,
1080Debug.Assert(startOfNeutrals != PositionInvalid,
1113Debug.Assert(startOfNeutrals == PositionInvalid,
1131Debug.Assert(startOfNeutrals == PositionInvalid,
1144Debug.Assert(startOfDelayed != PositionInvalid,
1158Debug.Assert(startOfNeutrals == PositionInvalid,
1163Debug.Assert(startOfDelayed != PositionInvalid,
1174Debug.Assert(startOfNeutrals != PositionInvalid,
1183Debug.Assert(startOfNeutrals == PositionInvalid,
1201Debug.Assert(startOfDelayed != PositionInvalid,
1205Debug.Assert(lastClass == DirectionClass.EuropeanTerminator,
1212Debug.Assert(startOfNeutrals == PositionInvalid,
1217Debug.Assert(startOfDelayed != PositionInvalid,
1266Debug.Assert(startOfNeutrals != PositionInvalid,
1280Debug.Assert(startOfNeutrals == PositionInvalid,
1285Debug.Assert(startOfDelayed != PositionInvalid,
1317Debug.Assert(startOfNeutrals == PositionInvalid,
1344Debug.Assert(startOfNeutrals == PositionInvalid,
1389Debug.Assert(startOfNeutrals == PositionInvalid,
1425Debug.Assert(startOfDelayed != PositionInvalid,
1567Debug.Assert(startOfNeutrals == PositionInvalid,
2454Debug.Assert(runLengthResolved == runLength,
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (11)
151Debug.WriteLine("WorkerOperationGetTabletsInfo.OnDoWork failed due to: {0}{1}", Environment.NewLine, e.ToString());
207Debug.WriteLine("WorkerOperationCreateContext.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString());
314Debug.WriteLine("WorkerOperationRefreshCursorInfo.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString());
356Debug.WriteLine("WorkerOperationGetTabletInfo.OnDoWork failed due to {0}{1}", Environment.NewLine, e.ToString());
396Debug.WriteLine("WorkerOperationWorkerGetUpdatedSizes.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString());
514Debug.Assert(penContext != null);
541Debug.Assert(penContext != null);
932Debug.Assert(properties[StylusPointDescription.RequiredXIndex /*0*/].Id == StylusPointPropertyIds.X, "X isn't where we expect it! Fix PenImc to ask for X at index 0");
933Debug.Assert(properties[StylusPointDescription.RequiredYIndex /*1*/].Id == StylusPointPropertyIds.Y, "Y isn't where we expect it! Fix PenImc to ask for Y at index 1");
1035Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero);
1089Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero);
System\Windows\Media\Animation\AnimationStorage.cs (41)
46Debug.Assert( _animationClocks == null
49Debug.Assert( _propertyTriggerLayers == null
78Debug.Assert(animationClock != null);
79Debug.Assert(_dependencyObject.Target != null);
80Debug.Assert(_currentTimeInvalidatedHandler != null);
106Debug.Assert(animationClock != null);
107Debug.Assert(_currentTimeInvalidatedHandler != null);
119Debug.Assert(_dependencyObject == null);
120Debug.Assert(_dependencyProperty == null);
144Debug.Assert(_propertyTriggerLayers != null);
145Debug.Assert(_propertyTriggerLayers.ContainsValue(layer));
149Debug.Assert(index >= 0);
244Debug.Assert(animatedPropertyMap.Count > 0);
245Debug.Assert(animatedPropertyMap[_dependencyProperty.GlobalIndex] != DependencyProperty.UnsetValue);
501Debug.Assert( _animationClocks != null
509Debug.Assert(index > -1,
538Debug.Assert(_hasStickySnapshotValue,
550Debug.Assert(_animationClocks.Count > 0);
588Debug.Assert(animationClocks != null,
590Debug.Assert(animationClocks.Count > 0,
592Debug.Assert(!animationClocks.Contains(null),
594Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior),
649Debug.Assert(animationClocks[i] != null);
657Debug.Assert(handoffBehavior == HandoffBehavior.Compose);
658Debug.Assert(storage != null);
659Debug.Assert(storage._animationClocks != null);
703Debug.Assert(animationClocks != null);
704Debug.Assert(!animationClocks.Contains(null));
706Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior),
776Debug.Assert(animation == null || IsAnimationValid(dp, animation));
777Debug.Assert(IsPropertyAnimatable(d, dp));
779Debug.Assert(HandoffBehaviorEnum.IsDefined(handoffBehavior),
848Debug.Assert(storage._animationClocks != null && storage._animationClocks.Count > 0,
895Debug.Assert(storage != null,
916Debug.Assert(storage._snapshotValue != DependencyProperty.UnsetValue);
928Debug.Assert(currentPropertyValue != DependencyProperty.UnsetValue);
938Debug.Assert(count > 0);
970Debug.Assert(clocksCount > 0);
971Debug.Assert(defaultDestinationValue != DependencyProperty.UnsetValue);
1082Debug.Assert( AnimatedPropertyMapField.GetValue(d)[dp.GlobalIndex] == DependencyProperty.UnsetValue
1144Debug.Assert(type == typeof(Vector3D), "Application is trying to create independent animation storage for an unsupported type.");
System\Windows\Media\Animation\Clock.cs (145)
51Debug.Assert(timeline != null);
161Debug.Assert(!IsTimeManager);
190Debug.Assert(!IsTimeManager);
208Debug.Assert(!IsTimeManager);
230Debug.Assert(!IsTimeManager);
268Debug.Assert(!IsTimeManager);
281Debug.Assert(!IsTimeManager);
299Debug.Assert(!IsTimeManager);
326Debug.Assert(!IsTimeManager);
354Debug.Assert(!IsTimeManager);
486Debug.Assert(!IsTimeManager);
572Debug.Assert(!clock.IsTimeManager);
622Debug.Assert(!current.IsTimeManager); // We should not yet be connected to the TimeManager
700Debug.Assert(!IsTimeManager);
775Debug.Assert(!IsTimeManager);
782Debug.Assert(!(IsInteractivelyPaused && PendingInteractivePause));
783Debug.Assert(!(!IsInteractivelyPaused && PendingInteractiveResume));
820Debug.Assert(!IsTimeManager);
827Debug.Assert( !(IsInteractivelyPaused && PendingInteractivePause));
828Debug.Assert( !(!IsInteractivelyPaused && PendingInteractiveResume));
855Debug.Assert(IsRoot);
877Debug.Assert(IsRoot);
948Debug.Assert(IsRoot);
959Debug.Assert(IsRoot);
990Debug.Assert(IsRoot);
1071Debug.Assert(!IsTimeManager);
1107Debug.Assert(!IsTimeManager);
1129Debug.Assert(!IsTimeManager);
1148Debug.Assert(!IsTimeManager);
1224Debug.Assert(!IsTimeManager);
1372Debug.Assert(!IsTimeManager);
1392Debug.Assert(_resolvedDuration != Duration.Automatic, "_resolvedDuration should never be set to Automatic.");
1409Debug.Assert(!IsTimeManager);
1410Debug.Assert(_parent != null && !_parent.IsTimeManager);
1782Debug.Assert(IsRoot); // root clocks only; non-roots have constant begin time
1783Debug.Assert(_rootData != null);
1788Debug.Assert(!RootBeginPending); // we can have either a begin or a seek, not both
1859Debug.Assert(_beginTime.HasValue);
1910Debug.Assert(IsRoot);
1916Debug.Assert(_rootData.DesiredFrameRate > 0);
1936Debug.Assert(!IsTimeManager);
1937Debug.Assert(!IsInteractivelyStopped);
1938Debug.Assert(_parent._currentClockState != ClockState.Stopped);
1939Debug.Assert(_currentClockState != ClockState.Stopped);
1940Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic.");
1941Debug.Assert(_beginTime.HasValue);
1943Debug.Assert(parentTime >= _beginTime.Value); // We are active or in postfill
1958Debug.Assert(_currentClockState != ClockState.Active);
2166Debug.Assert(_currentDuration == Duration.Forever, "_currentDuration has an invalid enum value.");
2167Debug.Assert(_currentClockState == ClockState.Active
2185Debug.Assert(this is ClockGroup, "ComputeCurrentIterationWithGrow should only run on ClockGroups.");
2186Debug.Assert(CanGrow, "ComputeCurrentIterationWithGrow should only run on clocks with CanGrow.");
2187Debug.Assert(_currentIterationBeginTime.HasValue, "ComputeCurrentIterationWithGrow should only be called when _currentIterationBeginTime has a value.");
2188Debug.Assert(_resolvedDuration.HasTimeSpan, "ComputeCurrentIterationWithGrow should only be called when _resolvedDuration has a value."); // We must have a computed duration
2189Debug.Assert(_currentDuration.HasTimeSpan, "ComputeCurrentIterationWithGrow should only be called when _currentDuration has a value.");
2250Debug.Assert(!IsTimeManager);
2251Debug.Assert(!IsInteractivelyStopped);
2252Debug.Assert(_parent._currentClockState != ClockState.Stopped);
2253Debug.Assert(_beginTime.HasValue);
2302Debug.Assert(!IsTimeManager);
2303Debug.Assert(!IsInteractivelyStopped);
2304Debug.Assert(_parent._currentClockState != ClockState.Stopped);
2305Debug.Assert(_currentClockState == ClockState.Active); // Must be active at this point
2332Debug.Assert(!IsTimeManager);
2333Debug.Assert(!IsInteractivelyStopped);
2334Debug.Assert(_parent._currentClockState != ClockState.Stopped);
2335Debug.Assert(_currentClockState != ClockState.Stopped);
2336Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic.");
2340Debug.Assert(_currentDuration.TimeSpan > TimeSpan.Zero, "ComputeCurrentTime was entered with _currentDuration <= 0");
2347Debug.Assert(transitionTime <= 1, "The values of the accel and decel attributes incorrectly add to more than 1.0");
2348Debug.Assert(transitionTime >= 0, "The values of the accel and decel attributes incorrectly add to less than 0.0");
2411Debug.Assert(_currentDuration == Duration.Forever, "_currentDuration has an invalid enum value.");
2425Debug.Assert(!IsTimeManager);
2439Debug.Assert(_resolvedDuration == Duration.Forever, "_resolvedDuration should be Forever when NaturalDuration is Automatic.");
2467Debug.Assert(!IsTimeManager);
2468Debug.Assert(!IsInteractivelyStopped || IsRoot);
2472Debug.Assert(_resolvedDuration != Duration.Automatic, "_resolvedDuration should never be Automatic.");
2473Debug.Assert(_currentDuration != Duration.Automatic, "_currentDuration should never be Automatic.");
2495Debug.Assert(_currentDuration.HasTimeSpan, "_currentDuration is invalid, neither Forever nor a TimeSpan.");
2496Debug.Assert(_currentDuration == _resolvedDuration, "For clocks which cannot grow, _currentDuration must equal _resolvedDuration.");
2508Debug.Assert(_resolvedDuration.HasTimeSpan, "_resolvedDuration is invalid, neither Forever nor a TimeSpan.");
2509Debug.Assert(_currentDuration.HasTimeSpan, "_currentDuration is invalid, neither Forever nor a TimeSpan.");
2518Debug.Assert(_beginTime.HasValue); // _currentIterationBeginTime.HasValue implies _beginTime.HasValue
2547Debug.Assert(repeatBehavior == RepeatBehavior.Forever); // Only other valid enum value
2641Debug.Assert(!IsTimeManager);
2642Debug.Assert(!IsInteractivelyStopped || IsRoot);
2649Debug.Assert(!_currentIterationBeginTime.HasValue, "_currentIterationBeginTime should not have a value when _beginTime has no value.");
2654Debug.Assert(_beginTime.HasValue);
2683Debug.Assert(IsRoot);
2726Debug.Assert(_beginTime == null);
2727Debug.Assert(_currentClockState == ClockState.Stopped);
2751Debug.Assert(!IsInteractivelyPaused); // Enforce invariant: cannot be pausePending when already paused
2752Debug.Assert(!PendingInteractiveResume); // Enforce invariant: cannot be both pause and resumePending
2769Debug.Assert(IsInteractivelyPaused);
2770Debug.Assert(!PendingInteractivePause);
2798Debug.Assert(endOfActivePeriod.HasValue);
2873Debug.Assert(!IsTimeManager);
2898Debug.Assert(parentTime.HasValue); // If parent isn't stopped, it must have valid time and speed
2899Debug.Assert(parentSpeed.HasValue);
2925Debug.Assert(parentTime.HasValue); // Cannot be true unless parent is stopped
2946Debug.Assert(_beginTime.HasValue);
2947Debug.Assert(parentTime.HasValue);
2992Debug.Assert(!IsTimeManager);
2993Debug.Assert(!IsInteractivelyStopped);
2994Debug.Assert(_parent._currentClockState != ClockState.Stopped);
2995Debug.Assert(_beginTime.HasValue);
3067Debug.Assert(!IsTimeManager);
3068Debug.Assert(!IsInteractivelyStopped || IsRoot);
3072Debug.Assert(_rootData != null, "A root Clock must have the _rootData structure initialized.");
3150Debug.Assert(!IsTimeManager);
3151Debug.Assert(_parent != null);
3152Debug.Assert(_parent.CurrentState != ClockState.Stopped);
3155Debug.Assert(HasSeekOccuredAfterLastTick ||
3159Debug.Assert(_syncData.SyncClock == this || _syncData.SyncClock._parent == this);
3160Debug.Assert(CanSlip || _timeline is ParallelTimeline && ((ParallelTimeline)_timeline).SlipBehavior == SlipBehavior.Slip);
3162Debug.Assert(_syncData != null);
3163Debug.Assert(!_syncData.IsInSyncPeriod);
3166Debug.Assert(!_timeline.AutoReverse);
3167Debug.Assert(_timeline.AccelerationRatio == 0);
3168Debug.Assert(_timeline.DecelerationRatio == 0);
3215Debug.Assert(syncClockDuration == Duration.Automatic);
3283Debug.Assert(!IsTimeManager);
3284Debug.Assert(_parent != null);
3285Debug.Assert(_syncData != null);
3286Debug.Assert(_syncData.IsInSyncPeriod);
3289Debug.Assert(_syncData.SyncClock == this || _syncData.SyncClock._parent == this);
3293Debug.Assert(!parentIntervalCollection.IsEmpty); // The parent isn't Stopped, so it must have a TIC
3297Debug.Assert(parentIntervalCollection.IsEmptyOfRealPoints || parentIntervalCollection.FirstNodeTime <= currentParentTimePT);
3298Debug.Assert(currentParentSpeed >= 0);
3386Debug.Assert(!current.IsRoot, "Root nodes never should reset their Slip amounts with ResetSlipOnSubtree(), even when seeking.");
3428Debug.Assert(!IsTimeManager);
3509Debug.Assert(_rootData.DesiredFrameRate > 0);
3537Debug.Assert(!IsTimeManager);
3560Debug.Assert(!IsTimeManager);
3561Debug.Assert(_parent == null);
3562Debug.Assert(_timeManager == null);
3653Debug.Assert(factor != 0); // Divide by zero
3737Debug.Assert(IsRoot); // This should only be called on root-child clocks
3773Debug.Assert(!IsTimeManager);
3852Debug.Assert(!IsTimeManager);
3970Debug.Assert(syncClock != null);
3971Debug.Assert(syncClock.GetCanSlip());
3972Debug.Assert(syncClock.IsRoot || syncClock._timeline.BeginTime.HasValue); // Only roots may later validate their _beginTime
4061Debug.Assert(_syncClockBeginTime.HasValue); // This should never be queried on a root without beginTime
4163Debug.Assert(Math.Abs(optimizedInputTime - inputTime) <= error,
System\Windows\Media\MediaContext.cs (34)
188Debug.Assert(dispatcher.Reserved0 == null);
344Debug.Assert(CheckAccess());
603Debug.Assert(InterlockIsEnabled,
700Debug.Assert(_interlockState == InterlockState.WaitingForResponse,
777Debug.Assert(!InterlockIsWaiting,
842Debug.Assert(InterlockIsWaiting,
1077Debug.Assert(IsClockSupported, "MediaContext.CurrentTime called when QueryPerformaceCounter is not supported");
1336Debug.Assert(_interlockState == InterlockState.Disabled,
1345Debug.Assert(Channel != null);
1366Debug.Assert(dispatcher != null, "Dispatcher required");
1371Debug.Assert(dispatcher.Reserved0 == cm);
1394Debug.Assert(CheckAccess());
1403Debug.Assert(CheckAccess());
1434Debug.Assert(_timeManager != null);
1463Debug.Assert(dispatcher != null);
1464Debug.Assert(iv != null);
1476Debug.Assert(!_isDisposed);
1477Debug.Assert(iv != null);
1504Debug.Assert(dispatcher != null);
1505Debug.Assert(iv != null);
1516Debug.Assert(iv != null);
1566Debug.Assert(callback != null);
1571Debug.Assert(arg != null);
1610Debug.Assert(op != null);
1648Debug.Assert(CheckAccess());
1769Debug.Assert(CheckAccess());
1770Debug.Assert(
2008Debug.Assert(CheckAccess());
2010Debug.Assert(!_isDisposed);
2011Debug.Assert(_registeredICompositionTargets != null);
2114Debug.Assert(_needToCommitChannel, "CommitChannel called with nothing on the channel");
2118Debug.Assert(!InterlockIsWaiting,
2184Debug.Assert(InterlockIsEnabled,
2508Debug.Assert(_interlockState == InterlockState.WaitingForNextFrame
System\Windows\Media3D\Visual3D.cs (23)
236Debug.Assert(child != null);
237Debug.Assert(child.InternalVisualParent == null);
284Debug.Assert(child != null);
285Debug.Assert(child.InternalVisualParent == this);
457Debug.Assert(VisualTreeHelper.GetParent(this) != null, "If oldParent is null, current parent should != null.");
949Debug.Assert(InternalVisualParent == newParent);
957Debug.Assert(InternalVisualParent == newParent);
1057Debug.Assert(boundsAreEqual, errorString);
1079Debug.Assert(model != null);
1211Debug.Assert((flags & VisualProxyFlags.IsContentNodeConnected) == 0,
1259Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentConnected));
1260Debug.Assert(IsOnChannel(channel));
1451Debug.Assert(IsOnChannel(channel));
1452Debug.Assert(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentNodeConnected));
1582Debug.Assert(child.InheritanceContext == this,
1649Debug.Assert(ancestor != null);
1791Debug.Assert(ancestor != null);
1828Debug.Assert(_2DParent.GetValue(this) == null,
1836Debug.Assert(parent2D == null || parent2D is Viewport3DVisual,
2040Debug.Assert(!e.CheckFlagsOr(VisualFlags.ShouldPostRender),
2042Debug.Assert(!e.CheckFlagsOr(VisualFlags.NodeIsCyclicBrushRoot),
2054Debug.Assert((viewport == null) == (e.InternalVisualParent == null),
2092Debug.Assert(_inheritanceContext.GetValue(this) == UseParentAsContext,
PresentationFramework (2176)
MS\Internal\Annotations\Anchoring\LocatorManager.cs (13)
307Debug.Assert(attachedAnchor != null, "AttachedAnchor cannot be null if attachmentLevel is not Unresolved.");
357Debug.Assert(processor != null, "SubtreeProcessor can not be null");
634Debug.Assert(startNode != null, "startNode can not be null");
746Debug.Assert(node != null, "node can not be null");
813Debug.Assert(data != null, "dataBlob is either null or not of ProcessingTreeState type");
818Debug.Assert(processor != null, "SubtreeProcessor can not be null"); // There is always a default processor
840Debug.Assert(data != null, "dataBlob is either null or not of ProcessingTreeState type");
844Debug.Assert(processor != null, "SubtreeProcessor can not be null");
879Debug.Assert(locator != null, "locator can not be null");
880Debug.Assert(startNode != null, "startNode can not be null");
916Debug.Assert(offset >= 0 && offset < realLocator.Parts.Count, "offset out of range");
1089Debug.Assert(locator != null, "locator can not be null");
1090Debug.Assert(data.LocatorPartIndex >= 0 && data.LocatorPartIndex < locator.Parts.Count,
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (21)
72Debug.Assert(start != null, "start pointer is null");
73Debug.Assert(end != null, "end pointer is null");
74Debug.Assert(start.CompareTo(end) <= 0, "end pointer before start");
110Debug.Assert(highlightRange != null, "null range data");
340Debug.Assert(highlightRange != null, " null highlight range");
342Debug.Assert((rangeSegments != null) && (rangeSegments.Count > 0), "invalid rangeSegments");
353Debug.Assert(highlightSegment != null, "null highlight segment");
377Debug.Assert(rangeEnumerator.Current.IsNull || !next ||
512Debug.Fail("Mismatched segment data");
635Debug.Assert(start != null, "start pointer is null");
636Debug.Assert(end != null, "end pointer is null");
637Debug.Assert(owners != null, "null owners list");
638Debug.Assert(owners.Count > 0, "empty owners list");
640Debug.Assert(owners[i] != null, "null owner");
791Debug.Assert((ps1 != null) && (ps2 != null) && (ps1.CompareTo(ps2) <= 0), "invalid splitting points");
865Debug.Assert(res.Count == 2, "unexpected resulting segment count after split");
918Debug.Assert(textViews != null, "geometry text view not found");
937Debug.Assert((view != null) && (parentView != null), "null text view");
979Debug.Assert(!_segment.IsNull, "null TextSegment");
1098Debug.Assert(TopOwner != null, "invalid TopOwner");
1100Debug.Assert(parentView != null, "geometry parent text view not found");
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (26)
363Debug.Assert(anchor != null, "undefined anchor");
364Debug.Assert(marker.Data != null || marker.Data == Geometry.Empty, "undefined geometry");
368Debug.Assert(geometry != null, "unexpected geometry type");
369Debug.Assert(geometry.Children.Count == 3, "unexpected geometry children count");
433Debug.Assert(_uiParent != null, "No selection container");
475Debug.Assert(textContainer != null, "TextAnchor does not belong to a TextContainer");
624Debug.Assert(componentsRegister != null, "The selection is not registered");
647Debug.Assert(anchor != null, "wrong attachedAnchor");
880Debug.Assert(selection != null, "Unexpected sender of Changed event");
890Debug.Assert(components != null, "No SN registered for this selection");
898Debug.Assert(components[i].HighlightAnchor != null, "Missing highlight anchor component");
919Debug.Assert(sender != null, "undefined sender");
946Debug.Assert(pos != null, "null text pointer");
960Debug.Assert((components != null) && (components.Count > 0), "invalid component registry");
987Debug.Assert(selectionHandler != null, "SelectionHandler handler can not be null");
988Debug.Assert(mouseMoveHandler != null, "MouseMoveHandler handler can not be null");
1001Debug.Assert(component != null, "component is null");
1002Debug.Assert(_components != null, "_components are null");
1036Debug.Assert(component != null, "component is null");
1037Debug.Assert(_components != null, "_components are null");
1092Debug.Assert(first != null, "first component is null");
1093Debug.Assert((first.AttachedAnnotations != null) && (first.AttachedAnnotations.Count > 0), "first AttachedAnchor is null");
1094Debug.Assert(second != null, "second component is null");
1095Debug.Assert((second.AttachedAnnotations != null) && (second.AttachedAnnotations.Count > 0), "second AttachedAnchor is null");
1100Debug.Assert(firstAnchor != null, " first TextAnchor is null");
1101Debug.Assert(secondAnchor != null, " second TextAnchor is null");
MS\Internal\Ink\EditingCoordinator.cs (22)
72Debug.Assert(ActiveEditingBehavior == SelectionEditor,
165Debug.Assert(currentBehavior is StylusEditingBehavior,
187Debug.Assert(currentBehavior is StylusEditingBehavior,
243Debug.Assert(behavior != null);
301Debug.Assert(_activationStack.Count == 1, "The behavior stack has to contain one behavior.");
347Debug.Assert(behavior == ActiveEditingBehavior);
357Debug.Assert(behavior == LassoSelectionBehavior || behavior == SelectionEditingBehavior,
368Debug.Assert(behavior != LassoSelectionBehavior && behavior != SelectionEditingBehavior,
437Debug.Assert((_capturedStylus != null && _capturedMouse == null)
595Debug.Assert(newEditingBehavior != null);
768Debug.Assert(stylusEditingBehavior != null || ActiveEditingBehavior == null,
851Debug.Assert(ActiveEditingBehavior == null || ActiveEditingBehavior is IStylusEditing,
920Debug.Assert(inputDevice != null, "A null device is passed in.");
921Debug.Assert(stylusEditingBehavior != null, "stylusEditingBehavior cannot be null.");
922Debug.Assert(!IsInMidStroke, "The previous device hasn't been released yet.");
967Debug.Assert(!resetDynamicRenderer, "The dynamic renderer shouldn't be reset for Mouse");
1003Debug.Assert(IsInMidStroke || !releaseDevice, "The captured device has been release unexpectly.");
1045Debug.Assert(_capturedStylus == null || _capturedMouse == null, "InkCanvas cannot capture both stylus and mouse at the same time.");
1178Debug.Fail("Unknown behavior");
1215Debug.Fail("Unknown behavior");
1223Debug.Assert(!IsInMidStroke, "ChangeEditingBehavior cannot be called in a mid-stroke");
1224Debug.Assert(_activationStack.Count <= 1, "The behavior stack has to contain at most one behavior when user is not editing.");
MS\Internal\Text\ComplexLine.cs (12)
63Debug.Assert(run != null, "TextRun has not been created.");
64Debug.Assert(run.Length > 0, "TextRun has to have positive length.");
76Debug.Assert(dcp >= 0);
151Debug.Assert(runs != null, "Cannot retrieve runs collection.");
174Debug.Assert(DoubleUtil.GreaterThanOrClose(rect.Width, 0), "Negative inline object's width.");
226Debug.Assert(runs != null, "Cannot retrieve runs collection.");
330Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters.");
377Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge.");
382Debug.Assert(element != null, "Cannot use ITextContainer that does not provide TextElement instances.");
468Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge.");
473Debug.Assert(element != null, "Element should be here.");
518Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object.");
System\Windows\Controls\DataGrid.cs (17)
1633Debug.Assert(info != null, "info is null.");
1634Debug.Assert(column != null, "column is null.");
1745Debug.Assert(_isDraggingSelection, "DoAutoScroll should only be called when dragging selection.");
3530Debug.Assert(CanUserAddRows, "AddNewItem called when the end-user cannot add new rows.");
3531Debug.Assert(!IsAddingNewItem, "AddNewItem called when a pending add is taking place.");
5229Debug.Assert(!IsUpdatingSelectedCells);
5235Debug.Assert(IsUpdatingSelectedCells);
5316Debug.Fail("Unknown SelectionUnit encountered.");
6360Debug.Assert(RelativeMousePosition != RelativeMousePositions.Over, "The mouse is not supposed to be over the DataGrid.");
7080Debug.Assert(sortColumn != null, "column should not be null");
7238Debug.Assert(e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time");
7249Debug.Assert(e.OldItems.Count == 1, "SortDescriptionCollection should handle one element at a time");
7269Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time");
7383Debug.Assert(e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time");
7391Debug.Assert(e.OldItems.Count == 1, "GroupDescriptionCollection should handle one element at a time");
7402Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time");
7822Debug.Assert(dataGrid != null || columnCollection != null, "Both dataGrid and columnCollection cannot not be null at the same time");
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (1)
105Debug.Assert(
System\Windows\Controls\DataGridCellsPanel.cs (18)
166Debug.Assert(blockList != null, "RealizedColumnsBlockList shouldn't be null at this point.");
627Debug.Assert(!children.Contains(child), "we incorrectly identified a recycled container");
642Debug.Assert(child == InternalChildren[childIndex], "Wrong child was generated");
672Debug.Assert(container != null, "Null container was generated");
708Debug.Assert(children[visualTreeIndex] != null, "MoveVisualChild interprets a null destination as 'move to end'");
769Debug.Fail("We should have found a child");
1064Debug.Assert(columnIndex < columnCount, "columnIndex should be less than column count");
1139Debug.Assert(startIndex >= 0);
1140Debug.Assert(children == _realizedChildren, "the given child list must be the _realizedChildren list when recycling");
1322Debug.Assert(
1328Debug.Assert(
1407Debug.Assert(i >= arrangeState.FrozenColumnCount, "Frozen cells should have been realized or not visible");
1441Debug.Assert(child != null, "child cannot be null.");
1456Debug.Assert(cell.Column != null, "column cannot be null.");
1561Debug.Assert(children.Count > blockElementCount, "Element count from blocks can't be less than total children count");
1602Debug.Assert(columnIndex <= block.EndIndex, "Missing children for index in block list");
1961Debug.Assert(ParentDataGrid != null, "ParentDataGrid should not be null");
2079Debug.Assert((itemCount == itemUICount) || (itemUICount == 0), "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0.");
System\Windows\Controls\DataGridColumnCollection.cs (18)
20Debug.Assert(dataGridOwner != null, "We should have a valid DataGrid");
226Debug.Assert(displayIndex >= 0 && displayIndex < DisplayIndexMap.Count, "displayIndex should have already been validated");
324Debug.Assert(newDisplayIndex >= 0 && newDisplayIndex < Count, "The new DisplayIndex should have already been validated");
357Debug.Assert(oldDisplayIndex != newDisplayIndex, "A column's display index must have changed for us to call OnColumnDisplayIndexChanged");
358Debug.Assert(oldDisplayIndex >= 0 && oldDisplayIndex < Count, "The old DisplayIndex should be valid");
409Debug.Assert(
412Debug.Assert(!IsUpdatingDisplayIndex, "We don't add new columns as part of a display index update operation");
469Debug.Assert(DisplayIndexMap.Count == 0, "DisplayIndexMap should be empty until first measure call.");
542Debug.Assert(assignedDisplayIndexMap.ContainsKey(displayIndex));
553Debug.Assert(
556Debug.Assert(!IsUpdatingDisplayIndex, "We don't remove columns as part of a display index update operation");
561Debug.Assert(DisplayIndexMap.Count > Count, "Columns were just removed: the display index map shouldn't have yet been updated");
597Debug.Assert(oldColumns.Count == 1 && newColumns.Count == 1, "Multi replace isn't possible with ObservableCollection");
686Debug.Assert(removedDisplayIndex >= 0);
725Debug.Assert(Count == DisplayIndexMap.Count, "Display Index map is of the wrong size");
728Debug.Assert(DisplayIndexMap[i] >= 0 && DisplayIndexMap[i] < Count, "DisplayIndex map entry doesn't point to a valid column");
729Debug.Assert(ColumnFromDisplayIndex(i).DisplayIndex == i, "DisplayIndex map doesn't match column indices");
896Debug.Assert(
System\Windows\Controls\GridViewColumnCollectionChangedEventArgs.cs (12)
44Debug.Assert(action == NotifyCollectionChangedAction.Add || action == NotifyCollectionChangedAction.Remove,
46Debug.Assert(changedItem != null, "changedItem can't be null");
47Debug.Assert(index >= 0, "index must >= 0");
48Debug.Assert(actualIndex >= 0, "actualIndex must >= 0");
59Debug.Assert(newItem != null, "newItem can't be null");
60Debug.Assert(oldItem != null, "oldItem can't be null");
61Debug.Assert(index >= 0, "index must >= 0");
62Debug.Assert(actualIndex >= 0, "actualIndex must >= 0");
73Debug.Assert(changedItem != null, "changedItem can't be null");
74Debug.Assert(index >= 0, "index must >= 0");
75Debug.Assert(oldIndex >= 0, "oldIndex must >= 0");
76Debug.Assert(actualIndex >= 0, "actualIndex must >= 0");
System\Windows\Controls\GridViewHeaderRowPresenter.cs (16)
300Debug.Assert(_paddingHeader != null, "padding header is null");
310Debug.Assert(_indicator != null, "_indicator is null");
311Debug.Assert(_floatingHeader != null, "_floatingHeader is null");
384Debug.Assert(_paddingHeader != null, "padding header is null");
453Debug.Assert(_draggingSrcHeader != null, "_draggingSrcHeader is null");
636Debug.Assert(column != null);
854Debug.Assert(index >= 0 && index < InternalChildren.Count, "Error index when GetVisualIndex");
934Debug.Fail("Head is container for itself, but parent is neither GridViewHeaderRowPresenter nor null.");
983Debug.Assert(header != null || index != -1);
1044Debug.Assert(header != null);
1050Debug.Assert(header != null);
1162Debug.Assert(header != null, "Cannot instantiate GridViewColumnHeader in AddFloatingHeader");
1175Debug.Assert(srcHeader != null, "srcHeader is null");
1176Debug.Assert(_floatingHeader != null, "floating header is null");
1342Debug.Assert(index >= 0 && index < HeadersPositionList.Count, "wrong index");
1529Debug.Assert(Columns != null, "Columns is null in OnHeaderDragCompleted");
System\Windows\Controls\InkCanvas.cs (18)
575Debug.Assert(e.Property == InkCanvas.RightProperty || e.Property == InkCanvas.BottomProperty,
1041Debug.Assert(e != null, "EventArg can not be null");
1260Debug.Assert(e != null, "EventArg can not be null");
1317Debug.Assert(e != null, "EventArg can not be null");
1371Debug.Assert(e != null, "EventArg can not be null");
1405Debug.Assert(e != null, "EventArg can not be null");
1436Debug.Assert(e != null, "EventArg can not be null");
1472Debug.Assert(e != null, "EventArg can not be null");
1548Debug.Assert(e != null, "EventArg can not be null");
1578Debug.Assert(e != null, "EventArg can not be null");
1612Debug.Assert(e != null, "EventArg can not be null");
1642Debug.Assert(e != null, "EventArg can not be null");
2268System.Diagnostics.Debug.Assert(_dynamicallySelectedStrokes.Contains(s));
2339Debug.Assert(strokes != null
2566System.Diagnostics.Debug.Assert(object.ReferenceEquals(sender, DefaultDrawingAttributes));
2666Debug.Assert(removeSelectedStrokes || removeSelectedElements, "At least either Strokes or Elements should be removed!");
2705Debug.Assert(inkCanvas != null);
2778Debug.Assert(inkCanvas != null);
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
345Debug.Assert(
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (11)
226Debug.Assert(column != null, "We shouldn't have generated this column header if we don't have a column.");
262Debug.Assert(HeaderCollection != null, "This is a helper method for preparing and clearing a container; if it's called we must have a valid ItemSource");
692Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null");
739Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null");
753Debug.Assert(_columnHeaderDragIndicator != null, "Drag indicator is null");
754Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null");
772Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null");
786Debug.Assert(_columnHeaderDropLocationIndicator != null, "Drag indicator is null");
787Debug.Assert(_draggingSrcColumnHeader != null, "Dragging header is null");
804Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null");
914Debug.Assert(ParentDataGrid != null, "ParentDataGrid is null");
System\Windows\Controls\Primitives\Popup.cs (12)
176Debug.Assert(popup != null, "Popup must be non-null");
177Debug.Assert(placementTarget != null, "Placement target must be non-null.");
207Debug.Assert(popup != null, "Popup must be non-null");
208Debug.Assert(placementTarget != null, "Placement target must be non-null.");
884Debug.Assert(!bindTreatMousePlacementAsBottomProperty || child is ToolTip, "child must be a Tooltip to bind TreatMousePlacementAsBottomProperty");
1108Debug.Assert( Mouse.Captured == _popupRoot, "_cacheValid[(int)CacheBits.CaptureEngaged] == true but Mouse.Captured != _popupRoot");
1400Debug.Assert(popup != null, "popup should be non-null.");
1401Debug.Assert(child != null, "child should be non-null.");
1424Debug.Assert(child != null, "child should be non-null");
1932Debug.Assert(CheckAccess(), "AsyncReposition not called on the dispatcher thread.");
2497Debug.Assert(i >= 0 && i < GetNumberOfCombinations(placement));
3290Debug.Assert(!IsChildPopup || (IsChildPopup && !transparent), "Child popups cannot be transparent");
System\Windows\Controls\Primitives\Selector.cs (22)
580Debug.Assert(String.IsNullOrEmpty(path) || path == "/InnerText");
1034Debug.Assert(CanSelectMultiple, "CanSelectMultiple should be true when calling SelectAllImpl");
1422Debug.Assert(!SelectionChange.IsActive, "SelectionChange is already active -- use SelectionChange.Select or Unselect");
1496Debug.Assert(!((SelectedIndex >= 0) && (_selectedItems.Count == 0)), "SelectedIndex >= 0 implies _selectedItems nonempty");
1523Debug.Assert(IsSynchronizedWithCurrentItemPrivate);
1551Debug.Assert(IsSynchronizedWithCurrentItemPrivate);
1594Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true");
1676Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true");
2039Debug.Assert(SelectionChange.IsActive, "SelectionChange.IsActive should be true");
2171Debug.Assert(String.IsNullOrEmpty(path) || path == "/InnerText");
2270Debug.Assert(_owner.CheckAccess());
2271Debug.Assert(!_active, SR.SelectionChangeActive);
2283Debug.Assert(_owner.CheckAccess());
2284Debug.Assert(_active, "There must be a selection change active when you call SelectionChange.End()");
2318Debug.Assert(_toSelect.Count <= 1, "_toSelect.Count was > 1");
2492Debug.Assert(_owner.CheckAccess());
2493Debug.Assert(_active, SR.SelectionChangeNotActive);
2494Debug.Assert(info != null, "parameter info should not be null");
2549Debug.Assert(_owner.CheckAccess());
2550Debug.Assert(_active, SR.SelectionChangeNotActive);
2551Debug.Assert(info != null, "info should not be null");
2587Debug.Assert(_owner.CheckAccess());
System\Windows\Controls\VirtualizedCellInfoCollection.cs (30)
23Debug.Assert(owner != null, "owner must not be null.");
36Debug.Assert(owner != null, "owner must not be null.");
86Debug.Assert(IsValidCell(cell), "The cell should be valid.");
87Debug.Assert(!Contains(cell), "VirtualizedCellInfoCollection does not support duplicate items.");
470Debug.Assert(left >= 0, "left must be positive.");
471Debug.Assert(top >= 0, "top must be positive.");
472Debug.Assert(width >= 0, "width must be positive.");
473Debug.Assert(height >= 0, "height must be positive.");
490Debug.Assert(value >= 0, "Value must be positive.");
504Debug.Assert(value >= 0, "Value must be positive.");
518Debug.Assert(value >= _left, "Right must be greater than or equal to Left.");
532Debug.Assert(value >= _top, "Bottom must be greater than or equal to Top.");
546Debug.Assert(value >= 0, "Value must be positive.");
560Debug.Assert(value >= 0, "Value must be positive.");
786Debug.Assert(!IsEmpty, "Don't call GetBoundingRegion when IsEmpty is true.");
818Debug.Assert(left <= right, "left should be less than or equal to right.");
819Debug.Assert(top <= bottom, "top should be less than or equal to bottom.");
829Debug.Assert(rowCount > 0, "rowCount should be greater than 0.");
830Debug.Assert(columnCount > 0, "columnCount should be greater than 0.");
974Debug.Assert(rowIndex >= 0);
1002Debug.Assert(rowIndex >= 0);
1041Debug.Assert(rowIndex >= 0);
1057Debug.Assert(oldIndex >= 0);
1058Debug.Assert(newIndex >= 0);
1147Debug.Assert(columnIndex >= 0);
1190Debug.Assert(columnIndex >= 0);
1229Debug.Assert(columnIndex >= 0);
1248Debug.Assert(oldIndex >= 0);
1249Debug.Assert(newIndex >= 0);
1633Debug.Assert(list != null, "list should not be null.");
System\Windows\Controls\VirtualizingStackPanel.cs (69)
401Debug.Assert(!IsPixelBased && IsScrolling &&
478Debug.Assert(IsScrolling, "setting offset on non-scrolling panel");
606Debug.Assert(IsScrolling, "setting offset on non-scrolling panel");
797Debug.Assert(AnchorOperationField.GetValue(this) == null, "There is already a pending AnchorOperation.");
829Debug.Assert(_scrollData._firstContainerInViewport != null, "Must have an anchor element");
855Debug.Assert(AnchorOperationField.GetValue(this) != null, "anchor state is inconsistent");
886Debug.Assert(currFirstContainerInViewport != null, "Cannot find container in viewport");
1141Debug.Assert(!IsPixelBased || !findTopContainer, "find 'top' container only makes sense when item-scrolling");
1698Debug.Assert(IsVirtualizing && InRecyclingMode, "We should only modify the visual order when in recycling mode");
2388Debug.Assert(!adjustToChangeInFirstItem || foundFirstItemInViewport, "This loop should only happen twice at most");
3695Debug.Assert(args.Action == NotifyCollectionChangedAction.Reset && args.ItemCount == 1);
3849Debug.Assert(info != null, "Expected state from previous measure not found");
3957Debug.Assert(IsScrolling && IsVirtualizing, "Only check viewport on scrolling panel when virtualizing");
4352Debug.Assert(retryCount >=0, "retry MeasureCaches too often");
4509Debug.Assert(effectiveOffsetInfo.ScrollGeneration <= scrollGeneration,
4705Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page cacheUnit is not expected here.");
4961Debug.Assert(IsScrolling, "The scrolling panel is the only one that should extend the viewport");
5019Debug.Assert(virtualizationInfoProvider != null, "This method should only be invoked for a virtualizing owner");
5020Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page after cache size is not expected here.");
5648Debug.Assert(itemIndex < items.Count, "index out of range");
5748Debug.Assert(IsVirtualizing, "We should only need to extend the viewport beyond the generated items when virtualizing");
6082Debug.Assert(!containerSize.IsEmpty, "We can't estimate an empty size");
6098Debug.Assert(!IsVSP45Compat, "this method should not be called in VSP45Compat mode");
6166Debug.Assert(!containerSize.IsEmpty, "We can't estimate an empty size");
6378Debug.Assert(parentItemStorageProvider != null || container != null,
6421Debug.Assert(!IsVSP45Compat, "SetItemsHostInset should not be called in VSP45-compat mode");
6457Debug.Fail("SetInset should only be called for a container");
6561Debug.Fail($"Unexpected container type: {((container == null) ? "null" : container.GetType().Name)}");
6602Debug.Assert(cacheUnit != VirtualizationCacheLengthUnit.Page, "Page cacheUnit is not expected here.");
6812Debug.Assert(virtualizingChild != null, "This method should only be invoked for a virtualizing child");
7250Debug.Assert(DoubleUtil.AreClose(pixelSizeInViewport + pixelSizeBeforeViewport + pixelSizeAfterViewport, childPixelSize.Width), "The computed sizes within and outside the viewport should add up to the childPixelSize.");
7342Debug.Assert(DoubleUtil.AreClose(pixelSizeInViewport + pixelSizeBeforeViewport + pixelSizeAfterViewport, childPixelSize.Height), "The computed sizes within and outside the viewport should add up to the childPixelSize.");
7437Debug.Assert(IsVSP45Compat, "this method should only be called in VSP45Compat mode");
7443Debug.Assert(evaluateAreContainersUniformlySized || !computedAreContainersUniformlySized, "AreContainersUniformlySized starts off true and can only be flipped to false.");
7589Debug.Assert(!IsVSP45Compat, "this method should not be called in VSP45Compat mode");
7595Debug.Assert(evaluateAreContainersUniformlySized || !computedAreContainersUniformlySized, "AreContainersUniformlySized starts off true and can only be flipped to false.");
7878Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available.");
7879Debug.Assert(item != null, "An item must be available.");
7903Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available.");
7904Debug.Assert(item != null, "An item must be available.");
7947Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available.");
7948Debug.Assert(item != null, "An item must be available.");
8005Debug.Assert(itemStorageProvider != null || item == this, "An item storage provider must be available.");
8006Debug.Assert(item != null, "An item must be available.");
8728Debug.Assert(container != null, "Null container was generated");
8773Debug.Assert(children[visualTreeIndex] != null, "MoveVisualChild interprets a null destination as 'move to end'");
8898Debug.Assert(!children.Contains(child), "we incorrectly identified a recycled container");
8941Debug.Assert(args.ItemUICount == args.ItemCount, "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0.");
8951Debug.Assert(child != null, "Null child was generated");
8952Debug.Assert(!newlyRealized, "newlyRealized should be false after Replace");
8981Debug.Assert((itemCount == itemUICount) || (itemUICount == 0), "Both ItemUICount and ItemCount should be equal or ItemUICount should be 0.");
9022Debug.Assert(IsVirtualizing, "Can't clean up containers if not virtualizing");
9023Debug.Assert(itemsControl != null, "We can't cleanup if we aren't the itemshost");
9168Debug.Assert(InRecyclingMode, "This method only applies to recycling mode");
9187Debug.Assert(IsVirtualizing && InRecyclingMode, "Realized children only exist when recycling");
9188Debug.Assert(_realizedChildren != null, "Realized children must exist to verify it");
9201Debug.Assert(!_realizedChildren.Contains(child), "_realizedChildren should not contain recycled containers");
9207Debug.Assert(_realizedChildren[position.Index] == child, "_realizedChildren is corrupt!");
9219Debug.Assert(_realizedChildren.Count == children.Count, "Realized and visual children must match");
9223Debug.Assert(_realizedChildren[i] == children[i], "Realized and visual children must match");
9253Debug.Fail("We should have found a child");
9324Debug.Assert(_cleanupDelay != null);
9345Debug.Assert(_cleanupOperation != null);
9369Debug.Assert(!InRecyclingMode, "This method only applies to standard virtualization");
9436Debug.Assert(startIndex >= 0 && count > 0);
9437Debug.Assert(children == _realizedChildren, "the given child list must be the _realizedChildren list when recycling");
9583Debug.Assert(IsScrolling, "ScrollData must only be set on a scrolling panel.");
10434Debug.Assert(IsScrolling, "ScrollData must only be set on a scrolling panel.");
12209Debug.Assert(tracer != null, "Trace called when not tracing");
System\Windows\Input\KeyboardNavigation.cs (20)
494Debug.Assert(adornedElement != null, "adornedElement should not be null");
495Debug.Assert(focusVisualStyle != null, "focusVisual should not be null");
511Debug.Assert(adornedElement != null, "adornedElement should not be null");
512Debug.Assert(adornedElementParent != null, "adornedElementParent should not be null");
513Debug.Assert(contentHostParent != null, "contentHostParent should not be null");
514Debug.Assert(contentHostParent is Visual, "contentHostParent should be Visual");
515Debug.Assert(focusVisualStyle != null, "focusVisual should not be null");
977Debug.Assert(currentElement != null, "currentElement should not be null");
1337Debug.Assert(container != null, "container cannot be null");
1788Debug.Assert(e != null, "e should not be null");
1789Debug.Assert(container != null, "container should not be null");
1867Debug.Assert(e != null, "e cannot be null");
2081Debug.Assert(container != null, "container should not be null");
2117Debug.Assert(IsTabStopOrGroup(nextTabElement), "nextTabElement should be IsTabStop or group");
2256Debug.Assert(e != null || container != null, "e or container should not be null");
2635Debug.Assert(sourceElement != null, "sourceElement must not be null");
2882Debug.Assert(!(sourceElement == null && container == null), "Both sourceElement and container cannot be null");
2887Debug.Assert(container != null, "container cannot be null");
3099Debug.Assert(DoubleUtil.GreaterThanOrClose(rangeEnd1, rangeStart1));
3100Debug.Assert(DoubleUtil.GreaterThanOrClose(rangeEnd2, rangeStart2));
System\Windows\Interop\ActiveXHost.cs (26)
214Debug.Assert(args.Key.Length > 0, "got an empty access key");
406Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Failed transition");
411Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Failed transition");
416Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Failed transition");
421Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.UIActive, "Failed transition");
425Debug.Fail("bad state");
457Debug.Fail("how did we ever get into the open state?");
462Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Failed transition");
467Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Failed transition");
472Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Failed transition");
477Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Passive, "Failed transition");
481Debug.Fail("bad state");
505Debug.Assert(hr == NativeMethods.S_OK, $"DoVerb call failed for verb 0x{verb:X}");
548Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Passive, "Wrong start state to transition from");
553Debug.Assert(_axInstance == null, "_axInstance must be null");
556Debug.Assert(_axInstance != null, "w/o an exception being thrown we must have an object...");
571Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Wrong start state to transition from");
605Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Wrong start state to transition from");
630Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Wrong start state to transition from");
647Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Running, "Wrong start state to transition from");
674Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Wrong start state to transition from");
689Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.InPlaceActive, "Wrong start state to transition from");
702Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.UIActive, "Wrong start state to transition from");
706Debug.Assert(NativeMethods.Succeeded(hr), "Failed in IOleInPlaceObject.UiDeactivate");
938Debug.Assert(_axInstance != null, "The native control is null");
985Debug.Fail(e.ToString());
System\Windows\Markup\BamlRecordReader.cs (43)
91Debug.Assert(null != bamlStream);
92Debug.Assert(null != parserContext && null != parserContext.XamlTypeMapper);
117Debug.Assert(null != parserContext && null != parserContext.XamlTypeMapper);
326Debug.Assert(bamlRecord.RecordType == BamlRecordType.LinePosition);
525Debug.Assert(bamlConnectionIdRecord.ConnectionId > 0);
537Debug.Assert(0 == ReaderContextStack.Count); // if not zero we missed an EndElement
621Debug.Assert(false);
710Debug.Assert(ReaderFlags.DependencyObject == CurrentContext.ContextType);
792Debug.Assert(ReaderFlags.DependencyObject == CurrentContext.ContextType ||
997Debug.Assert(_rootElement != null);
1047Debug.Assert(null == ParentContext);
1200Debug.Assert(!CurrentContext.CheckFlag(ReaderFlags.NeedToAddToTree), "Failed to add Element to tree before popping stack");
1214Debug.Assert( CurrentContext.ContextType != ReaderFlags.PropertyComplexClr );
1215Debug.Assert( CurrentContext.ContextType != ReaderFlags.PropertyComplexDP );
1267Debug.Assert(CurrentContext.ContextType == ReaderFlags.ConstructorParams);
1297Debug.Assert(parent is DependencyObject);
1416Debug.Assert(param is String);
1459Debug.Assert(paramString != null);
1497Debug.Assert(param != null && paramList == null, "Must have a single param");
1511Debug.Assert(param == null && paramList != null, "Must have a paramList");
1885Debug.Assert(staticResourceValues != null, "Must have a list of StaticResourceValues for lookup");
1958Debug.Assert(staticResourceValues != null, "Must have a list of StaticResourceValues for lookup");
2095Debug.Assert(serializerTypeId == (short)KnownElements.DependencyPropertyConverter);
2226Debug.Assert(element is DependencyObject, "Guaranteed by PropertyDefinition constructor");
2522Debug.Assert(o is DependencyObject);
2738Debug.Assert(element is DependencyObject);
2971Debug.Assert(!holder.ReadOnly); // this is being checked in XamlReaderHelper, just assert
2996Debug.Assert(arrayExt != null);
3115Debug.Assert (holder.Collection == null);
3434Debug.Assert( CurrentContext.ObjectData == null && CurrentContext.ExpectedType != null,
3619Debug.Assert(null != CurrentContext &&
3679Debug.Assert(false);
3688Debug.Assert(currentTarget is DependencyObject);
3702Debug.Assert(false); // We do not expect to be here after all checks done in propertyType identification above
3764Debug.Assert(genericType != null);
3807Debug.Assert(memberInfo is MethodInfo);
3823Debug.Assert(null != CurrentContext &&
3872Debug.Assert(null != CurrentContext &&
4225Debug.Assert(!context.CreateUsingTypeConverter,
4875Debug.Assert(contentProperty != null);
4980Debug.Fail("The only remaining option is attached property, which is not allowed in xaml for content properties");
5723Debug.Assert(_attributeInfo != null);
5818Debug.Assert(this.AttachedPropertyGetter != null);
System\Windows\Markup\BamlRecords.cs (29)
687Debug.Fail("Assembly, Type and Attribute records are not cached, so don't ask for one.");
712Debug.Fail("Unknown RecordType");
765Debug.Assert(null == _writeCache[(int)record.RecordType]);
855set { Debug.Assert (value == -1, "Setting fixed record to an invalid size"); }
864Debug.Fail("Must override RecordType");
902Debug.Assert( value <= 3 && value >= 0 );
1090Debug.Assert(RecordSize < 0);
1500Debug.Assert(_valuePositionPosition != -1,
1683Debug.Assert(_valuePositionPosition != -1,
2048set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2118set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2179set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
2386Debug.Assert(value <= ExtensionIdMask);
2406set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
2716Debug.Assert(!ValueObjectSet);
2795Debug.Assert (false, "Unknown custom serializer");
2983set { Debug.Assert (value == -1, "Wrong size set for complex prop record"); }
3197set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3284set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3433Debug.Assert(_contentSizePosition != -1,
3478set { Debug.Assert(value == -1, "Wrong size set for element record"); }
3638set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3736set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3814set { Debug.Assert(value == -1, "Wrong size set for complex prop record"); }
3999Debug.Assert(FilePos != -1,"UpdateWrite called but Write Never was");
4542Debug.Assert( SerializerTypeId != 0 );
4695Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo)
4714Debug.Assert(arr.Length == 3 && arr[0] != null && arr[1] != null);
4757Debug.Assert(arr.Length == 3 && arr[0] != null && arr[1] != null);
System\Windows\Markup\BamlRecordWriter.cs (22)
115Debug.Assert(null != DocumentStartRecord);
133Debug.Assert(null != DocumentStartRecord);
404Debug.Assert(_deferElementDepth == 0);
405Debug.Assert(_deferComplexPropertyDepth == 0);
406Debug.Assert(_staticResourceElementDepth == 0);
407Debug.Assert(_dynamicResourceElementDepth == 0);
408Debug.Assert(_staticResourceRecordList == null);
426Debug.Assert(_staticResourceElementDepth == 0);
463Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
562Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
598Debug.Assert(!InStaticResourceSection, "We do not support x:Shared within a StaticResource Section");
782Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
838Debug.Assert(keyRecord.RecordList.Count == 0, "Should have empty record list");
864Debug.Assert(!InStaticResourceSection, "We do not support x:Key within a StaticResource Section");
875Debug.Assert(_deferElementDepth == 2);
1064Debug.Assert(extensionTypeId != (short)KnownElements.TypeExtension);
1081Debug.Assert(typeValue != null);
1626Debug.Assert(keyRecord != null, "Unknown key record type in defer load dictionary");
1634Debug.Assert(keyIndex == _deferKeys.Count,
1657Debug.Assert(_deferElementDepth > 0 && CollectingValues,
1665Debug.Assert(valueDeferRecord.Record != null &&
1677Debug.Assert(valueDeferRecord.Record != null && valueDeferRecord.Record.RecordType == BamlRecordType.ElementEnd,
System\Windows\Markup\XamlStream.cs (12)
76Debug.Assert(null != buffer,"Null buffer past to the Writer");
88Debug.Assert(null != writeBuffer,"Null writeBuffer returned");
108Debug.Assert(0 < bufferWriteCount,"Not writing any bytes to the buffer");
113Debug.Assert(bufferOffset < BufferSize,"Trying to Read past bufer");
224Debug.Assert(bufferOffset < BufferSize,"Calculated bufferOffset is greater than buffer");
244Debug.Assert(0 < bufferReadCount,"Not reading any bytes to the buffer");
249Debug.Assert(bufferOffset < BufferSize,"Trying ot read past buffer");
372Debug.Assert(bufferOffset < BufferSize,"Calculated bufferOffset is greater than buffer");
377Debug.Assert(bufferArray.Count == bufferIndex,"Need to allocate more than one buffer");
378Debug.Assert(!reader, "Allocating a buffer on Read");
783Debug.Fail("Close called on ReaderStream");
791Debug.Fail("Flush called on ReaderStream");
System\Windows\Markup\XamlTypeMapper.cs (32)
816Debug.Assert(null != attribInfo, "null attribInfo");
817Debug.Assert(null != currentParentType, "null currentParentType");
856Debug.Assert(propertyOwnerType != null);
885Debug.Assert(attachedPropertyInfo.IsPublic ||
935Debug.Assert(null != localName, "null localName");
936Debug.Assert(null != xmlNamespace, "null xmlNamespace");
1587Debug.Assert(null != eventName, "null eventName");
1588Debug.Assert(null != owner, "null owner");
1632Debug.Assert(null != localName, "null localName");
1633Debug.Assert(null != xmlNamespace, "null xmlNamespace");
1670Debug.Assert(null != baseType, "baseType not set");
1763Debug.Assert(null != localName, "null localName");
1764Debug.Assert(null != xmlNamespace, "null xmlNamespace");
1906Debug.Assert(typeInfo != null, "Must have cached type info at this point");
2123Debug.Assert( propertyMember is DependencyProperty);
2304Debug.Assert(memberName != null);
2307Debug.Assert(memberInfo != null);
2322Debug.Assert(targetType != null);
2398Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace");
2399Debug.Assert(null != localName,"null value passed for localName");
2437Debug.Assert(null != xmlNamespace,"null value passed for xmlNamespace");
2438Debug.Assert(null != localName,"null value passed for localName");
2590Debug.Assert(namespaceMap.ClrNamespace != null,"Null CLR Namespace");
2591Debug.Assert(localName != null,"Null localName");
3440Debug.Assert(null != type, "Null passed for type to GetTypeConverterType");
3471Debug.Assert(null != type, "Null passed for type to GetTypeConverter");
3515Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverterType");
3559Debug.Assert(null != propType, "Null passed for propType to GetPropertyConverter");
3678Debug.Assert(_constructors != null, "This operation is legal only after the constructors have been fetched");
3744Debug.Assert(null != type, "null value for type passed to GetWhitespace");
3756Debug.Assert(1 == trimAttribute.Length,"More than one TrimWhitespace Attribute");
4006Debug.Assert(_dpLookupHashtable != null,
System\Windows\Navigation\NavigationService.cs (45)
89Debug.Assert(e != null, "Hyperlink fired Navigate event with null NavigateEventArgs");
102Debug.Assert(dobj != null, "RequestNavigateEventArgs.OriginalSource should be DependencyObject");
333Debug.Assert(_bp != null, "NavigationService should not handle a nav from a hyperlink thats not in its hosted tree");
339Debug.Assert(IsConsistent(navInfo));
371Debug.Assert(navMode != NavigationMode.Refresh); // because of !IsSameUri() above
392Debug.Assert(_navStatus == NavigationStatus.Navigating);
537Debug.Assert(!(_bp is Visual));
670Debug.Assert(_parentNavigationService == newParent);
707Debug.Assert(ChildNavigationServices.Contains(ncChild), "Child NavigationService must already exist");
767Debug.Assert(fe != null, "INavigatorHost needs to be FrameworkElement");
940Debug.Assert(_navigateQueueItem == null && _navStatus == NavigationStatus.Navigated);
964Debug.Assert(finishingChildPageFunction == null ||
983Debug.Assert(finishingChildPageFunction._Return == null);
1014Debug.Assert(pfReturnInfo == null);
1020Debug.Assert(pf.ParentPageFunctionId != Guid.Empty);
1059Debug.Assert(IsConsistent(navInfo));
1084Debug.Assert(!JournalScope.Journal.HasUncommittedNavigation);
1088Debug.Assert(_navigateQueueItem == null);
1197Debug.Assert(bpu == null ||
1227Debug.Assert(navMode == NavigationMode.Refresh,
1245Debug.Assert(!JournalScope.Journal.HasUncommittedNavigation);
1262Debug.Assert(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);
1265Debug.Assert(_contentId != 0);
1269Debug.Assert(_journalEntryGroupState == null ||
1989Debug.Assert(PendingNavigationList.Count == 0,
2099Debug.Assert(this.Application != null &&
2150Debug.Assert(navigateInfo.IsConsistent);
2151Debug.Assert(source == null ||
2201Debug.Assert(PendingNavigationList.Count == 0,
2211Debug.Assert(_navigateQueueItem == null, "Previous nav queue item should be cleared by now.");
2291Debug.Assert(_navStatus == NavigationStatus.Navigated);
2625Debug.Assert(sender == _bp);
3105Debug.Assert(IsConsistent(navigateInfo));
3132Debug.Assert(navigationMode == NavigationMode.New ||
3137Debug.Assert(destinationJournalEntry == null
3216Debug.Assert(_contentId != 0 &&
3710Debug.Assert(ps._Resume); // should've been set by JournalEntryPFxx.ResumePageFunction()
3739Debug.Assert(_navigateQueueItem == null,
3814Debug.Assert(parentPF._Return == null);
3916Debug.Assert(parentEntryIndex < journal.CurrentIndex);
3921Debug.Fail("Could not find the finishing PageFunction in the journal.");
3978Debug.Fail($"Unhandled scenario: PageFunction returning to {parentEntry.GetType().Name}");
4421Debug.Assert(_postedOp == null);
4509Debug.Assert(child != null);
4532Debug.Assert(node != null, "Trying to dispose a null Logical Tree Node");
System\Windows\StyleHelper.cs (91)
54Debug.Assert(fe != null || fce != null);
93Debug.Assert(fe != null || fce != null);
157Debug.Assert((fe != null && fce == null)|| (fe == null && fce != null));
347Debug.Assert(frameworkTemplate != null );
364Debug.Assert( !frameworkTemplate.HasXamlNodeContent );
368Debug.Assert(frameworkTemplate != null);
403Debug.Assert( frameworkTemplate != null );
704Debug.Assert(freezable.IsFrozen, "Freezable within a Style or Template should have been frozen by now");
762Debug.Assert(childIndex >= 0);
1122Debug.Assert(action.IsSealed, "TriggerAction should have already been sealed by this point.");
1276Debug.Assert( childIndex != 0 ); // This should go to the other AddDelegateToFireTrigger overload
1334Debug.Assert((fe != null && fce == null) || (fe == null && fce != null));
1366Debug.Assert((fe != null && fce == null) || (fe == null && fce != null));
1367Debug.Assert((fe != null && fe == container) || (fce != null && fce == container));
1368Debug.Assert(newStyle != null || newFrameworkTemplate != null );
1430Debug.Assert((fe != null && fce == null) || (fe == null && fce != null));
1431Debug.Assert((fe != null && fe == container) || (fce != null && fce == container));
1432Debug.Assert(oldStyle != null || oldFrameworkTemplate != null );
1491Debug.Assert((container is FrameworkElement) || (container is FrameworkContentElement), "Caller has queried with non-framework element. Bad caller, bad!");
1492Debug.Assert(dataType < InstanceStyleData.ArraySize, "Caller has queried using a value outside the range of the Enum. Bad caller, bad!");
1595Debug.Assert(!freezable.CanFreeze, "If a freezable could have been frozen it would have been done by now.");
1622Debug.Assert(instanceValues != null, "InstanceValues hashtable should have been created at initialization time.");
1666Debug.Assert(oldStyle != null || oldFrameworkTemplate != null );
1684Debug.Assert(dataField == ThemeStyleDataField);
1766Debug.Assert(frameworkTemplate != null );
1807Debug.Assert(treeRoot is FrameworkElement || treeRoot is FrameworkContentElement,
1855Debug.Assert(treeRoot == null || treeRoot is FrameworkElement || treeRoot is FrameworkContentElement,
1891Debug.Assert(frameworkTemplate != null, "Only FrameworkTemplate has the ability to build a VisualTree by this means");
1966Debug.Assert( null == VisualTreeHelper.GetParent(child),
2040Debug.Assert(frameworkTemplate != null );
2054Debug.Assert( feWalkNode != null || fceWalkNode != null,
2127Debug.Assert(feContainer != null || fceContainer != null,
2146Debug.Assert(templatedChildren.Count > 0,
2175Debug.Assert(feContainer != null || fceContainer != null);
2210Debug.Assert(oldFrameworkTemplate != null );
2259Debug.Assert( oldFrameworkTemplate != null );
2387Debug.Assert(sender is FrameworkElement || sender is FrameworkContentElement,
2442Debug.Assert(sender is FrameworkElement || sender is FrameworkContentElement,
2473Debug.Assert( feTemplatedParent != null );
2476Debug.Assert(templatedParentTemplate != null, "Must have a VisualTree owner");
2497Debug.Assert(ownerStyle != null || frameworkTemplate != null );
2509Debug.Assert( frameworkTemplate != null );
2521Debug.Assert(action.ContainingTrigger is EventTrigger,
2612Debug.Assert(child.IsValid, "child should either be an FE or an FCE");
2878Debug.Assert(dataField == ThemeStyleDataField);
2964Debug.Assert(value != NotYetApplied, "attempt to retrieve instance value that was never set");
3142Debug.Assert(fe != null || fce != null);
3224Debug.Assert(fe != null || fce != null);
3296Debug.Assert(feContainer != null);
3305Debug.Assert(feContainer != null);
3345Debug.Assert(feContainer != null);
3368Debug.Assert(feContainer != null);
3396Debug.Assert(feContainer != null);
3440Debug.Assert(fe != null || fce != null);
3441Debug.Assert(container == fe || container == fce);
3481Debug.Assert(fe != null || fce != null);
3482Debug.Assert(container == fe || container == fce);
3483Debug.Assert( oldTemplate == null || oldTemplate is FrameworkTemplate,
3485Debug.Assert( newTemplate == null || newTemplate is FrameworkTemplate,
3487Debug.Assert( (oldTemplate == null || newTemplate == null ) ||
3895Debug.Assert(sourceType == ValueLookupType.Simple ||
3925Debug.Assert(sourceType == ValueLookupType.Trigger ||
3979Debug.Assert(sourceType == ValueLookupType.Simple ||
4079Debug.Assert(styledChildren != null, "Should reach here only if the template tree has already been created");
4189Debug.Assert(child.FE != null || child.FCE != null);
4208Debug.Assert(dp != null, "dp must not be null");
4298Debug.Assert(ownerStyle != null || frameworkTemplate != null );
4340Debug.Assert(candidateTrigger is List<TriggerBase>,
4369Debug.Assert(ownerStyle != null || frameworkTemplate != null );
4440Debug.Assert( triggerBase is MultiDataTrigger,
4476Debug.Assert( triggerBase is MultiTrigger,
4540Debug.Assert( ft != null );
4819Debug.Assert(!(action.ContainingTrigger is EventTrigger),
4835Debug.Assert( trigger.Property == changedProperty,
4842Debug.Assert( frameworkTemplate != null,
4850Debug.Assert( conditions != null && conditions.Length == 1,
4880Debug.Assert( conditions != null && conditions.Length == 1,
4913Debug.Assert( frameworkTemplate != null,
4924Debug.Assert(evaluationNode != null,
4986Debug.Assert( evaluationBinding != null,
5051Debug.Assert( existing is List<TriggerBase>,
5097Debug.Assert( existing is List<TriggerBase>,
5270Debug.Assert(candidateTrigger is List<TriggerBase>,
5302Debug.Assert(frameworkTemplate != null );
5309Debug.Assert(frameworkTemplate != null);
5333Debug.Assert(frameworkTemplate != null);
5378Debug.Assert(frameworkTemplate != null );
5383Debug.Assert(frameworkTemplate != null);
5436Debug.Assert(
5546Debug.Assert(routedEvent != null);
5800Debug.Fail("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)
39Debug.Assert(fe != null || fce != null, "Node with the tree change notification must be an FE or an FCE.");
40Debug.Assert(parent != null, "Must have a parent that the current node is connected to or disconnected from.");
241Debug.Assert(fe != null || fce != null, "Must have non-null current node");
264Debug.Assert(inheritableProperty.IsPotentiallyInherited, "if we got here, it means that this property is inheritable by someone");
281Debug.Assert(!currentInheritableProperties.Contains(inheritableProperty), "InheritableProperties list should not have duplicates");
316Debug.Assert(d != null, "Must have non-null current node");
319Debug.Assert(fMetadata.IsInherited, "This must be an inherited dependency property");
322Debug.Assert(!wasSelfInheritanceParent || isSelfInheritanceParent, "IsSelfInheritanceParent changed from true to false");
453Debug.Assert(fe != null || fce != null, "Node with the resources change notification must be an FE or an FCE.");
522Debug.Assert(d != null, "Must have non-null current node");
684Debug.Assert(d != null, "Must have non-null current node");
747Debug.Assert(d != null, "Must have non-null current node");
909Debug.Assert(fo.IsValid, "Node with the resources change notification must be an FE or an FCE.");
941Debug.Assert(d != null, "Must have non-null current node");
System\Windows\Window.cs (57)
336Debug.Assert(_threadWindowHandles == null, "_threadWindowHandles must be null before enumerating the thread windows");
714Debug.Assert(false);
1359Debug.Assert(!IsSourceWindowNull, "IsSourceWindowNull cannot be true when _showingAsDialog is true");
2288Debug.Assert( _swh != null );
2297Debug.Assert( _swh != null );
3010Debug.Assert(!IsSourceWindowNull, "IsSourceWindowNull cannot be true when calling this function");
3237Debug.Assert(Manager != null, "HwndStyleManager must have a valid value here");
3570Debug.Assert(w != null, "Target must be of type Window.");
3593Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point");
3616Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point");
3753Debug.Assert(!IsSourceWindowNull, "_swh should not be null here");
3870Debug.Assert(hMonitor != IntPtr.Zero);
3903Debug.Assert(workAreaWidthDeviceUnits >= 0, string.Create(CultureInfo.InvariantCulture, $"workAreaWidth ({hMonitor})for monitor ({workAreaWidthDeviceUnits}) is negative"));
3904Debug.Assert(workAreaHeightDeviceUnits >= 0, string.Create(CultureInfo.InvariantCulture, $"workAreaHeight ({hMonitor}) for monitor ({workAreaHeightDeviceUnits}) is negative"));
3914Debug.Assert(!IsSourceWindowNull, "_swh should not be null here");
4043Debug.Fail("Invalid value for ResizeMode");
4418Debug.Assert(_showingAsDialog, "_showingAsDialog must be true when DoDialogHide is called");
4456Debug.Assert(_threadWindowHandles != null, "_threadWindowHandles must not be null at this point");
4497Debug.Assert(ownedWindows.Count == 0, "All owned windows should now be gone");
5055Debug.Assert(w != null, "DependencyObject must be of type Window.");
5081Debug.Assert(w != null, "DependencyObject must be of type Window.");
5100Debug.Assert(w != null, "DependencyObject must be of type Window.");
5160Debug.Assert(w != null, "DependencyObject must be of type Window.");
5287Debug.Assert(w != null, "DependencyObject must be of type Window.");
5307Debug.Assert(w != null, "DependencyObject must be of type Window.");
5568Debug.Assert(_dispatcherFrame == null, "_dispatcherFrame must be null here");
5627Debug.Assert(w != null, "DependencyObject must be of type Window.");
5638Debug.Assert(w != null, "DependencyObject must be of type Window.");
5698Debug.Assert(w != null, "d must be typeof Window");
5721Debug.Assert(w != null, "d must be typeof Window");
5760Debug.Assert(w != null, "d must be typeof Window");
5798Debug.Assert(w != null, "d must be typeof Window");
5819Debug.Assert(w != null, "d must be typeof Window");
5860Debug.Assert(w != null, "d must be typeof Window");
5954Debug.Fail($"specifiedRestoreBounds can't be {specifiedRestoreBounds}");
6090Debug.Assert( w != null, "DependencyObject must be of type Window." );
6165Debug.Assert( w != null, "DependencyObject must be of type Window." );
6222Debug.Assert(!IsSourceWindowNull, "IsSourceWindowNull cannot be true when calling this function");
6244Debug.Assert( w != null, "DependencyObject must be of type Window." );
6276Debug.Assert(w != null, "DependencyObject must be of type Window.");
6463Debug.Assert(0 != (int)_overlaySize.Width);
6464Debug.Assert(0 != (int)_overlaySize.Height);
6507Debug.Assert(null != _taskbarList);
6533Debug.Assert(false);
6552Debug.Assert(null != _taskbarList);
6566Debug.Assert(0 <= taskbarInfo.ProgressValue && taskbarInfo.ProgressValue <= 1);
6574Debug.Assert(null != _taskbarList);
6599Debug.Assert(null != _taskbarList);
6670Debug.Assert(null != _taskbarList);
6698Debug.Assert(null != _taskbarList);
7129Debug.Assert( _swh != null );
7347Debug.Assert( sourceWindow != null );
7430Debug.Assert(!IsSourceWindowNull, "IsSourceWindowNull cannot be true here");
7521Debug.Assert(!IsSourceWindowNull, "Should only be invoked when we know Handle is non-null" );
7531Debug.Assert(!IsSourceWindowNull, "Should only be invoked when we know Handle is non-null" );
7556Debug.Assert(!IsSourceWindowNull, "IsSourceWindowNull can't be true here");
7575Debug.Assert(!IsSourceWindowNull, "IsSourceWindowNull can't be true here");
PresentationFramework.Aero (4)
PresentationFramework.Aero2 (4)
PresentationFramework.AeroLite (4)
PresentationFramework.Classic (22)
Microsoft\Windows\Themes\ClassicBorderDecorator.cs (18)
231Debug.Assert(rgbColor.Red >= 0 && rgbColor.Red <= 1, "Red must be between 0 and 1.");
232Debug.Assert(rgbColor.Green >= 0 && rgbColor.Green <= 1, "Green must be between 0 and 1.");
233Debug.Assert(rgbColor.Blue >= 0 && rgbColor.Blue <= 1, "Blue must be between 0 and 1.");
295Debug.Assert(hue >= 0 && hue <= 1, "Output hue should be between 0 and 1.");
296Debug.Assert(lightness >= 0 && lightness <= 1, "Output lightness should be between 0 and 1.");
297Debug.Assert(saturation >= 0 && saturation <= 1, "Output saturation should be between 0 and 1.");
299Debug.Assert(!isHueDefined || isSaturationDefined, "If hue is defined, saturation must also be defined.");
311Debug.Assert(hlsColor.Lightness >= 0 && hlsColor.Lightness <= 1, "Lightness must be between 0 and 1.");
312Debug.Assert(hlsColor.Saturation >= 0 && hlsColor.Saturation <= 1, "Saturation must be between 0 and 1.");
337Debug.Assert(red >= 0 && red <= 1, "Output red should be between 0 and 1.");
338Debug.Assert(green >= 0 && green <= 1, "Output green should be between 0 and 1.");
339Debug.Assert(blue >= 0 && blue <= 1, "Output blue should be between 0 and 1.");
346Debug.Assert(n1 >= 0 && n1 <= 1, "n1 must be between 0 and 1.");
347Debug.Assert(n2 >= 0 && n2 <= 1, "n2 must be between 0 and 1.");
348Debug.Assert(hue >= -6 && hue < 12, "Hue must be between -6 (inclusive) and 12 (exclusive).");
1154Debug.Assert(_tabCache != null, "_tabCache is null. GetShadow1 should only be called after GetHighlight1");
1167Debug.Assert(_tabCache != null, "_tabCache is null. GetHighlight2 should only be called after GetHighlight1");
1180Debug.Assert(_tabCache != null, "_tabCache is null. GetHighlight2 should only be called after GetHighlight1");
PresentationFramework.Luna (4)
PresentationFramework.Royale (4)
PresentationUI (5)
ReachFramework (122)
AlphaFlattener\BrushProxy.cs (55)
163Debug.Assert(pen != null, "pen expected");
164Debug.Assert(brush != null, "brush expected");
187Debug.Assert(_brush.BrushList == null, "Simple brush expected");
269Debug.Assert(pen != null, "pen expected");
270Debug.Assert(pen.Brush != null, "pen expected to have a brush");
302Debug.Assert(pen != null, "pen expected");
303Debug.Assert(pen.Brush != null, "pen expected to have a brush");
540Debug.Assert(bp._opacityOnly == _opacityOnly, "Brush and OpacityMask can't mix in a single list");
668Debug.Assert(Utility.IsRenderVisible(vb), "TileBrush.Viewbox area must be positive");
675Debug.Fail("IsOpaque(" + _brush.GetType() + ") not handled");
735Debug.Assert(Utility.IsRenderVisible(vb), "TileBrush.Viewbox must be visible");
771Debug.Fail("IsTransparent not handled " + _brush.GetType());
1075Debug.Fail("Unexpected brush type");
1191Debug.Assert(tileBrush.ViewportUnits == BrushMappingMode.Absolute);
1223Debug.Assert(tileBrush.ViewportUnits == BrushMappingMode.Absolute);
1248Debug.Assert(drawingBrush.Drawing != null, "DrawingBrush where Drawing == null should've been culled");
1314Debug.Assert(_drawing != null, "_drawing primitive changed, but it's null");
1383Debug.Assert(!_bounds.IsEmpty);
1391Debug.Assert(_brushList != null && _bounds.IsEmpty);
1730Debug.Assert(brush.ViewboxUnits == BrushMappingMode.Absolute);
1731Debug.Assert(brush.ViewportUnits == BrushMappingMode.Absolute);
1933Debug.Fail("Unhandled GradientBrush type");
1986Debug.Assert(g.GradientStops != null);
2041Debug.Assert(g.GradientStops.Count > 0);
2130Debug.Assert(b._brush is SolidColorBrush, "SolidColorBrush expected");
2131Debug.Assert(!b._opacityOnly, "OpacityMask not expected");
2143Debug.Assert(first, "prefix only");
2371Debug.Assert(bp != null, "Blending visible ImageBrush with another brush should yield non-empty brush");
2648Debug.Assert(brush != null, "null brush");
2691Debug.Assert(gb.MappingMode == BrushMappingMode.Absolute, "absolute brush");
2699Debug.Assert(tb.ViewportUnits == BrushMappingMode.Absolute, "absolute brush required for BrushProxy");
2885Debug.Fail("Unhandled GradientBrush type");
2910Debug.Fail("Unandled Brush type");
2940Debug.Assert(gsc != null && gsc.Count > 0, "BrushProxy.IsEmpty should return true upon GradientBrush with zero stops");
2981Debug.Assert(!bounds.IsEmpty, "Bounds must not be empty for BitmapCacheBrush");
3059Debug.Assert(!bounds.IsEmpty, "Bounds must not be empty for VisualBrush");
3199Debug.Fail("Unhandled ImageBrush.ImageSource type");
3254Debug.Assert(brushB.Brush != null, "null brush not expected");
3341Debug.Fail("Brush type not expected");
3366Debug.Assert(Utility.NormalizeOpacity(value) == value, "BrushProxy.Opacity must always be normalized");
3494Debug.Fail("Unexpected brush type");
3614Debug.Fail("Single brush expected");
3639Debug.Assert(
3706Debug.Assert(Utility.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
3780Debug.Assert(false); // Optimization is needed before reaching here
3786Debug.Assert(false); // Optimization is needed before reaching here
3791Debug.Assert(steps > 0);
3831Debug.Assert((i >= 0) && (i < steps));
3845Debug.Assert(false);
3942Debug.Assert(di >= 0);
4044Debug.Assert(_left <= left);
4045Debug.Assert(_right >= right);
4175Debug.Assert(Utility.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
4271Debug.Assert(_left <= left);
4272Debug.Assert(_right >= right);
RepoTasks (3)
Roslyn.Diagnostics.Analyzers (548)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (21)
168Debug.Assert(_entries.Length >= source.Count);
169Debug.Assert(_count == 0);
260Debug.Assert(modified);
267Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
301Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
302Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
408Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
447Debug.Assert(comparer is not null);
518Debug.Assert(_buckets.Length > 0);
521Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType));
574Debug.Assert(comparer is not null);
616Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
648Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
649Debug.Assert(newSize >= _entries.Length);
707Debug.Assert(_entries.Length > 0, "entries should be non-empty");
711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
734Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
784Debug.Assert(_entries.Length > 0, "entries should be non-empty");
788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null);
813Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (16)
189Debug.Assert(Count == source.Count);
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
258Debug.Assert(comparer is not null);
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null);
326Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1063Debug.Assert(comparer is not null);
1091Debug.Assert((StartOfFreeList - entries[_freeList]._next) >= -1, "shouldn't overflow because `next` cannot underflow");
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
56Debug.Assert(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
263Debug.Assert(
Roslyn.Diagnostics.CSharp.Analyzers (76)
Roslyn.Diagnostics.VisualBasic.Analyzers (76)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (17)
124Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
213Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
269Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
316Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
348Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
460Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
461Debug.Assert(Not (targetToken.IntersectsWith(position) AndAlso IsWord(targetToken)))
489Debug.Assert(token = syntaxTree.GetTargetToken(position, cancellationToken))
589Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
637Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
671Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
685Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
717Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
751Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
763Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
776Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
819Debug.Assert(targetToken = syntaxTree.GetTargetToken(position, cancellationToken))
rzc (15)
Stress.ApiService (3)
System (1)
System.CodeDom (6)
System.Collections (94)
System.Collections.Concurrent (64)
System.Collections.Immutable (187)
System.Collections.NonGeneric (1)
System.Collections.Specialized (14)
System.CommandLine.StaticCompletions (1)
System.ComponentModel.Annotations (14)
System.ComponentModel.Composition (53)
System.ComponentModel.EventBasedAsync (1)
System.ComponentModel.TypeConverter (136)
System\ComponentModel\MaskedTextProvider.cs (15)
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.");
2324Debug.Fail("Invalid mask language character.");
2420Debug.Assert(input != null, "null input.");
2421Debug.Assert(position >= 0, "Position out of range.");
System\ComponentModel\ReflectEventDescriptor.cs (10)
89Debug.Assert(type.IsSubclassOf(typeof(Delegate)), $"Not a valid ReflectEvent: {componentClass.FullName}. {name} {type.FullName}");
99Debug.Assert(eventInfo.ReflectedType!.IsAssignableFrom(componentClass), "eventInfo.ReflectedType is used below, but only componentClass is annotated with DynamicallyAccessedMembers. Ensure ReflectedType is in componentClass's hierarchy.");
236Debug.Assert(_componentClass != null, "Must have a component class for FilterAttributes");
243Debug.Assert(_removeMethod != null, $"Null remove method for {Name}");
246Debug.Assert(_addMethod != null, $"Null remove method for {Name}");
262Debug.Assert(currentReflectType != null, "currentReflectType cannot be null");
263Debug.Assert(currentReflectType.IsAssignableFrom(_componentClass), "currentReflectType must be in _componentClass's hierarchy");
368Debug.Fail($"Missing event accessors for {_componentClass.FullName}. {Name}");
383Debug.Assert(currentReflectType != null, "currentReflectType cannot be null");
384Debug.Assert(currentReflectType.IsAssignableFrom(_componentClass), "currentReflectType must be in _componentClass's hierarchy");
System\ComponentModel\ReflectTypeDescriptionProvider.cs (16)
224Debug.Assert(table != null, "COMPAT: Editor table should not be null"); // don't throw; RTM didn't so we can't do it either.
245Debug.Assert(objectType != null, "Should have arg-checked before coming in here");
611Debug.Assert(eppa != null, $"Extender property {prop.Name} has no provider attribute. We will skip it.");
766Debug.Assert(idx < extenderCount, "There are more extenders than we expect");
771Debug.Assert(idx == extenderCount, "Wrong number of extenders");
782Debug.Assert(idx < extenderCount, "There are more extenders than we expect");
787Debug.Assert(idx == extenderCount, "Wrong number of extenders");
821Debug.Fail("This should never be invoked. TypeDescriptionNode should wrap for us.");
827Debug.Fail("This should never be invoked. TypeDescriptionNode should wrap for us.");
908Debug.Assert(objectType != null, "Should have arg-checked before coming in here");
921Debug.Assert(td != null);
929Debug.Assert(td != null);
1032Debug.Fail("This should never be invoked. TypeDescriptionNode should wrap for us.");
1185Debug.Fail("Hey, assumption holds true. Rip this assert.");
1399Debug.Assert(Array.TrueForAll(properties, dbgProp => dbgProp is not null), $"Holes in property array for type {type}");
1585Debug.Assert(callingType != typeof(Uri) && callingType != typeof(CultureInfo));
System\ComponentModel\TypeDescriptor.cs (36)
690Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
716Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
855Debug.Assert(converter != null, "Unexpected null TypeConverter.");
865Debug.Assert(converter != null, "Unexpected null TypeConverter.");
907Debug.Fail("COMPAT: Returning null, but you should not pass null here");
929Debug.Fail("COMPAT: Returning null, but you should not pass null here");
945Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
967Debug.Fail("COMPAT: Returning null, but you should not pass null here");
1105Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
1132Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
1191Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
1342Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
1369Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
1448Debug.Fail("COMPAT: Returning an empty collection, but you should not pass null here");
1658Debug.Assert(type != null, "Caller should validate");
1746Debug.Assert(instance != null, "Caller should validate");
1845Debug.Assert(target.Next == null, "Delegating provider should always be the last provider in the chain.");
1885Debug.Assert(pipelineType != PIPELINE_ATTRIBUTES, "PipelineAttributeFilter is not supported for attributes");
1938Debug.Fail("unknown pipeline type");
1975Debug.Assert(cache == null || list == null || !cache.Contains(s_pipelineFilterKeys[pipelineType]), "Earlier pipeline stage should have removed our cache");
2033Debug.Assert(suffix != null, "Name collision with non-extender property.");
2065Debug.Fail("unknown pipeline type");
2136Debug.Fail("unknown pipeline type");
2277Debug.Fail("unknown pipeline type");
2317Debug.Fail("COMPAT: Returning, but you should not pass null here");
2400Debug.Fail("COMPAT: Returning, but you should not pass null here");
2462Debug.Fail("COMPAT: Returning, but you should not pass null here");
2521Debug.Fail("COMPAT: Returning, but you should not pass null here");
2925Debug.Assert(newAttrs[idx] != null, "_attributes contains a null member");
3096Debug.Assert(attrs != null, "Someone should have handled this");
3107Debug.Assert(className != null, "Someone should have handled this");
3127Debug.Assert(converter != null, "Someone should have handled this");
3169Debug.Assert(events != null, "Someone should have handled this");
3181Debug.Assert(events != null, "Someone should have handled this");
3193Debug.Assert(properties != null, "Someone should have handled this");
3207Debug.Assert(properties != null, "Someone should have handled this");
System.Composition.Hosting (11)
System.Composition.Runtime (2)
System.Configuration.ConfigurationManager (115)
System\Configuration\BaseConfigurationRecord.cs (29)
450Debug.Assert(inputsPerConfigKey.Count > 0, "We won't get here unless we have inputs.");
542Debug.Assert(!_parent.IsInitDelayed, "!_parent.IsInitDelayed");
648Debug.Assert(!sectionRecord.HasIndirectLocationInputs,
793Debug.Assert(!sectionRecord.HasErrors, "!sectionRecord.HasErrors");
940Debug.Assert(factoryRecord != null, "factoryRecord != null");
953Debug.Assert(factoryRecord != null, "factoryRecord != null");
959Debug.Assert(!checkPermission || (factoryRecord != null),
1012Debug.Assert(success || getLkg, "success || getLkg");
1016Debug.Assert(getLkg, "getLkg == true");
1045Debug.Assert(!requestIsHere, "!requestIsHere");
1085Debug.Assert(getLkg, "getLkg == true");
1158Debug.Assert(!factoryRecord.HasErrors, "!factoryRecord.HasErrors");
1161Debug.Assert(sectionRecord.HasInput, "sectionRecord.HasInput");
1169Debug.Assert(!(IsLocationConfig && getLkg),
1179Debug.Assert(!sectionRecord.HasErrors, "!sectionRecord.HasErrors");
1219Debug.Assert(IsLocationConfig,
1272Debug.Assert((locationInputs != null) || (indirectLocationInputs != null),
1293Debug.Assert(getLkg, "getLkg == true");
1608Debug.Assert(_protectedConfig != null,
1724Debug.Assert(!rootFactoryRecord.HasErrors, "!rootFactoryRecord.HasErrors");
2167Debug.Assert(UrlPath.IsSubpath(_parent.ConfigPath, input.SectionXmlInfo.TargetConfigPath));
2245Debug.Assert(FindFactoryRecord(configKey, true) != null);
2261Debug.Assert(mode != OverrideMode.Inherit); // Remember that the default is never Inherit
2276Debug.Assert(mode != OverrideMode.Inherit);
2618Debug.Assert(!positionedAtNextElement, "!positionedAtNextElement");
3664Debug.Assert(factoryRecord.HasErrors,
3746Debug.Assert(x.SectionXmlInfo.ConfigKey == y.SectionXmlInfo.ConfigKey);
3774Debug.Assert(StringUtil.EqualsIgnoreCase(yTargetConfigPath, xTargetConfigPath));
3792Debug.Fail("It's not possible for two location input to come from the same config file and point to the same target");
System\Configuration\MgmtConfigurationRecord.cs (26)
338Debug.Assert(sectionRecord != null);
342Debug.Assert(input.HasResult, "input.HasResult");
349Debug.Assert(IsLocationConfig, "Indirect location inputs exist only in location config record");
351Debug.Assert(input != null);
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(
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));
2707Debug.Assert(LocationSubPath == null);
2731Debug.Assert(allowOverrideAttribute == null,
2983Debug.Assert(update.SectionRecord.HasFileInput, "update.SectionRecord.HasFileInput");
3024Debug.Assert(hasFile, "hasFile");
System.Console (49)
System.Data.Common (951)
System\Data\Common\DataStorage.cs (14)
142Debug.Assert(storageType == GetStorageType(type), "Incorrect storage type specified");
239Debug.Fail("not a String or SqlString column");
297Debug.Assert(typeCode == GetStorageType(dataType), "Incorrect storage type specified");
357Debug.Fail("shouldn't be here");
381Debug.Assert(storageType != StorageType.Empty);
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\DBCommandBuilder.cs (12)
201Debug.Assert(_isMutatedName[iMutatedName], $"{_baseParameterNames[iMutatedName]} expected to be a mutated name");
608Debug.Fail("Rowcount expected to be 1");
799Debug.Assert(!string.IsNullOrEmpty(_quotedBaseTableName), "no table name");
820Debug.Assert(!string.IsNullOrEmpty(_quotedBaseTableName), "no table name");
911Debug.Assert(!string.IsNullOrEmpty(_quotedBaseTableName), "no table name");
1135Debug.Assert(!string.IsNullOrEmpty(sourceColumn), "empty source column");
1167Debug.Assert(null != _parameterNames, "How can we have a parameterName without a _parameterNames collection?");
1168Debug.Assert(null != _parameterMarkerFormat, "How can we have a _parameterNames collection but no _parameterMarkerFormat?");
1216Debug.Assert(null != _parameterNames, "How can we have a parameterName without a _parameterNames collection?");
1217Debug.Assert(null != _parameterMarkerFormat, "How can we have a _parameterNames collection but no _parameterMarkerFormat?");
1402Debug.Assert(null != p, "null CreateParameter");
1552Debug.Fail("how did we get here?");
System\Data\Common\DbDataAdapter.cs (25)
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");
1038Debug.Fail("InvalidDataRowState");
1366Debug.Assert(rowUpdatedEvent.Rows != null);
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");
1560Debug.Fail("unexpected StatementType");
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 (42)
405Debug.Assert(!string.IsNullOrEmpty(_encodedColumnName));
456Debug.Assert(value != null);
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");
1096Debug.Assert(table != null || !Unique);
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");
1169Debug.Assert(null != _storage, "no storage");
1178Debug.Assert(null != value, "setting null, expecting dbnull");
1179Debug.Assert(null != _table, "storage with no DataTable on column");
1180Debug.Assert(null != _storage, "no storage");
1196Debug.Assert(null != _storage, "no storage");
1235Debug.Assert(oldConstraint != null, "Should have found a column to remove from the collection.");
1250Debug.Assert(_table.Constraints.FindKeyConstraint(this) == null, "Should not be a duplication constraint in collection");
1369Debug.Assert(IsStringType, "not a String or SqlString column");
1389Debug.Assert(IsStringType, "not a String or SqlString column");
1444Debug.Assert(null != _storage, "no storage");
1464Debug.Assert(null != _storage, "null storage");
1495Debug.Assert(null != _storage, "null storage");
1501Debug.Assert(null != _storage, "null storage");
1507Debug.Assert(null != _storage, "null storage");
1584Debug.Assert(null != _storage, "no storage");
1594Debug.Assert(null != _storage, "no storage");
1629Debug.Assert(null != _storage, "no storage");
1641Debug.Assert(rels != null, "Invalid ParentRelations");
1645Debug.Assert(key.HasValue, "Invalid child key (null)");
1653Debug.Assert(rels != null, "Invalid ChildRelations");
1657Debug.Assert(key.HasValue, "Invalid parent key (null)");
1754Debug.Assert(s != null, "Caller is responsible for missing element/attribute case");
1769Debug.Assert(value != null && (value != DBNull.Value), "Caller is responsible for checking on DBNull");
1777Debug.Assert(value != null && (value != DBNull.Value), "Caller is responsible for checking on DBNull");
1788Debug.Assert(null != _storage, "no storage");
1802Debug.Assert(!_dependentColumns.Contains(expressionColumn), "duplicate column - expected to be unique");
1818Debug.Assert(_table != null);
1827Debug.Assert(null != col, "null datacolumn in expression dependencies");
1956Debug.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 (66)
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");
524Debug.Assert(DataSet != null);
554Debug.Assert(fk != null);
625Debug.Assert(con.Equals("F"));
868Debug.Assert(bitStates != null);
869Debug.Assert(bitStates.Length > bitIndex);
899Debug.Assert(Rows.Count > rowIndex);
900Debug.Assert(rowErrors != null);
901Debug.Assert(colErrors != null);
930Debug.Assert(Rows.Count > rowIndex);
931Debug.Assert(rowErrors != null);
932Debug.Assert(colErrors != null);
945Debug.Assert(columnsInError.Length == columnErrors.Length);
1409Debug.Assert(null != _culture, "null culture");
1480Debug.Assert(null != culture, "SetLocaleValue: no locale");
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");
2143Debug.Assert(ndx != null);
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");
3373Debug.Assert(key.HasValue);
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");
5036Debug.Assert(result.Max >= result.Min);
5165Debug.Fail("LoadOption.Upsert with deleted row, should not be here");
5201Debug.Assert(dataRow._tempRecord == recordNo, "tempRecord has been changed in event handler");
5537Debug.Assert(tableList != null, "tableList shouldnot be null");
6592Debug.Assert(DataSet != null);
6827Debug.Assert(_targetTable == null, "do not reuse this section");
6828Debug.Assert(table != null);
6829Debug.Assert(table._rowDiffId == null, "rowDiffId wasn't previously cleared");
6880Debug.Assert(_targetDS == null, "do not reuse this section");
6881Debug.Assert(ds != null);
6896Debug.Assert(table._rowDiffId == null, "rowDiffId wasn't previously cleared");
7073Debug.Assert(column._table != null);
7074Debug.Assert(column.Computed, "Only computed columns should be re-evaluated.");
System\Data\DataView.cs (24)
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");
1316Debug.Fail("ItemAdded DataRow already in view");
1320Debug.Assert(null != row, "MaintainDataView.ItemDeleted with null DataRow");
1321Debug.Assert(row != _addNewRow, "addNewRow being deleted");
1333Debug.Fail("ItemDeleted DataRow not in view tracking");
1338Debug.Fail("ItemDeleted DataRow not in view");
1342Debug.Assert(null == row, "MaintainDataView.Reset with non-null DataRow");
1351Debug.Fail("unexpected");
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 (34)
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}'.");
308Debug.Fail("unhandled token");
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");
763Debug.Fail("Unhandled operator type");
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 (23)
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!!
321Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
332Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
344Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
348Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
352Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
356Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
360Debug.Assert(_argumentCount == 2, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
362Debug.Assert(argumentValues[0] is string, $"Invalid argument type for {s_funcs[_info]._name}");
363Debug.Assert(argumentValues[1] is string, $"Invalid argument type for {s_funcs[_info]._name}");
377Debug.Assert(_argumentCount == 3, $"Invalid argument argumentCount: {_argumentCount.ToString(FormatProvider)}");
396Debug.Assert(_argumentCount == 2, "Invalid argument argumentCount: ");
404Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
405Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[_info]._name}");
423Debug.Assert(_argumentCount == 3, $"Invalid argument argumentCount: {_argumentCount.ToString(FormatProvider)}");
424Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid first argument {argumentValues[0].GetType().FullName} in {s_funcs[_info]._name}");
425Debug.Assert(argumentValues[1] is int, $"Invalid second argument {argumentValues[1].GetType().FullName} in {s_funcs[_info]._name}");
426Debug.Assert(argumentValues[2] is int, $"Invalid third argument {argumentValues[2].GetType().FullName} in {s_funcs[_info]._name}");
465Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}");
466Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[_info]._name}");
System\Data\ProviderBase\SchemaMapping.cs (27)
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");
310Debug.Assert(_readerDataValues != null);
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");
420Debug.Fail("unexpected LoadOption");
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");
566Debug.Assert(_dataTable != null);
567Debug.Assert(_fieldNames != null);
568Debug.Assert(_tableMapping != null);
762Debug.Assert(_dataTable != null);
763Debug.Assert(_schemaTable != null);
764Debug.Assert(_fieldNames != null);
765Debug.Assert(_tableMapping != null);
769Debug.Assert(null != schemaRows, "SchemaSetup - null DbSchemaRow[]");
770Debug.Assert(_dataReader.FieldCount <= schemaRows.Length, "unexpected fewer rows in Schema than FieldCount");
System\Data\RbTree.cs (15)
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");
580Debug.Assert(-1 == position, "KEY_SEARCH_AND_INDEX with bad position");
841Debug.Assert(_accessMethod == TreeAccessMethod.INDEX_ONLY, "not expecting anything else");
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");
1989Debug.Assert((_slotMap[segmentPos] & freeSlot) == 0, "Slot position segment[segmentPos ]: [freeSlot] is in use. Expected to be empty");
System\Data\Selection.cs (24)
19Debug.Assert(column != null, "null column");
113Debug.Assert(indexFields != null);
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");
326Debug.Assert(null != row1, "record1 no datarow");
327Debug.Assert(null != row2, "record2 no datarow");
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\SQLTypes\SQLDecimal.cs (47)
409Debug.Assert((precision == MaxPrecision + 1) || VerifyPrecision(precision), "Calcualted precision too low?");
410Debug.Assert((precision == 1) || !VerifyPrecision((byte)(precision - 1)), "Calculated precision too high?");
433Debug.Assert(precision > 0, "Precision cannot be less than 1");
434Debug.Assert(precision <= MaxPrecision, "Precision > MaxPrecision");
720Debug.Assert(ulLen <= s_NUMERIC_MAX_PRECISION, "ulLen <= NUMERIC_MAX_PRECISION", "");
786Debug.Assert(rglData.Length >= 4);
834Debug.Assert(!IsNull);
840Debug.Assert(!IsNull);
1259Debug.Assert(ResInteger <= MaxPrecision);
1263Debug.Assert(ResScale <= MaxScale);
1272Debug.Assert(ResPrec - ResInteger >= 0);
1322Debug.Assert(dwlAccum < s_ulInt32Base);
1522Debug.Assert(dwlAccum < s_ulInt32Base * 2);
1525Debug.Assert(dwlAccum < s_ulInt32Base); // can never final accum > 1 more UI4
1541Debug.Assert(s_NUMERIC_MAX_PRECISION == ResPrec);
1816Debug.Assert(_bScale <= s_NUMERIC_MAX_PRECISION, "m_bScale <= NUMERIC_MAX_PRECISION", "In AssertValid");
1817Debug.Assert(_bScale <= _bPrec, "m_bScale <= m_bPrec", "In AssertValid");
1818Debug.Assert(_bScale >= 0, "m_bScale >= 0", "In AssertValid");
1819Debug.Assert(_bPrec > 0, "m_bPrec > 0", "In AssertValid");
1821Debug.Assert(CLenFromPrec(_bPrec) >= _bLen, "CLenFromPrec(m_bPrec) >= m_bLen", "In AssertValid");
1822Debug.Assert(_bLen <= s_cNumeMax, "m_bLen <= x_cNumeMax", "In AssertValid");
1829Debug.Assert(_bLen == 1, "m_bLen == 1", "In AssertValid");
1834Debug.Assert(rglData[iulData] == 0, "rglData[iulData] == 0", "In AssertValid");
1866Debug.Assert(rgulData.Length == s_cNumeMax, "rgulData.Length == x_cNumeMax", "Invalid array length");
1919Debug.Assert(bPrec <= MaxPrecision && bPrec > 0, "bPrec <= MaxPrecision && bPrec > 0",
1940Debug.Assert(rglData.Length == 4, "rglData.Length == 4", $"Wrong array length: {rglData.Length}");
2146Debug.Assert(dwlAccum < s_ulInt32Base, "dwlAccum < x_lInt32Base", "");
2175Debug.Assert(dwlAccum < s_ulInt32Base);
2192Debug.Assert(dwlAccum < s_ulInt32Base, "dwlAccum < x_dwlBaseUI4", "Integer overflow");
2244Debug.Assert(dwlAccum < dwlDivisor);
2246Debug.Assert((dwlAccum / dwlDivisor) < s_ulInt32Base);
2273Debug.Assert(dwlAccum < s_ulInt32Base);
2287Debug.Assert(!IsNull, "!IsNull", "In AdjustScale");
2471Debug.Assert(rgulS.Length >= ciulS, "rgulS.Length >= ciulS", "Invalid array length");
2472Debug.Assert(rgulD.Length >= ciulS, "rgulD.Length >= ciulS", "Invalid array length");
2511Debug.Assert(iulX > s_uiZero);
2544Debug.Assert(rgulU.Length == s_cNumeMax);
2551Debug.Assert(iulD != 0, "iulD != 0", "Divided by zero!");
2552Debug.Assert(iulD > 0, "iulD > 0", "Invalid data: less than zero");
2553Debug.Assert(ciulU > 0, "ciulU > 0", "No data in the array");
2610Debug.Assert(ciulU > 0, "ciulU > 0", "In method MpDiv");
2611Debug.Assert(ciulD > 0, "ciulD > 0", "In method MpDiv");
2612Debug.Assert(rgulU.Length == s_cNumeMax);
2613Debug.Assert(rgulD.Length == s_cNumeMax);
3025Debug.Assert(uiDigit < 10);
3032Debug.Assert(rguiData.Length == 4);
3041Debug.Assert(_bPrec >= 1);
System\Data\XDRSchema.cs (6)
40Debug.Assert(FEqualIdentity(schemaRoot, Keywords.XDR_SCHEMA, Keywords.XDRNS), "Illegal node");
74Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENT, Keywords.XDRNS) ||
133Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENTTYPE, Keywords.XDRNS), $"Invalid node type {node.LocalName}");
184Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENTTYPE, Keywords.XDRNS) ||
290Debug.Assert(s_mapNameTypeXdr[index].name == name, $"FindNameType('{name}') -- failed. Wrong name found");
345Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENT, Keywords.XDRNS) ||
System\Data\XMLSchema.cs (16)
329Debug.Assert(val is PropertyCollection, "We can set values only for classes that have ExtendedProperties");
360Debug.Assert(dc != null, "HandleColumnExpression is supposed to be called for DataColumn");
400Debug.Assert(val is PropertyCollection, "We can set values only for classes that have ExtendedProperties");
414Debug.Assert(table != null, "ref table should have been already created");
847Debug.Assert(schemaSet.Count == 1, "there should be one schema");
919Debug.Assert(child == table, "table not the same");
1068Debug.Assert(ct.BaseXmlSchemaType is XmlSchemaSimpleType, "Expected SimpleType or ComplexType");
1086Debug.Assert(cContent is XmlSchemaComplexContentRestriction, "Expected complexContent extension or restriction");
1098Debug.Assert(ct.ContentModel is XmlSchemaSimpleContent, "expected simpleContent or complexContent");
1109Debug.Assert(ct.BaseXmlSchemaType is XmlSchemaSimpleType, "Expected SimpleType or ComplexType");
1115Debug.Assert(cContent is XmlSchemaSimpleContentRestriction, "Expected SimpleContent extension or restriction");
1152Debug.Assert(cContent is XmlSchemaComplexContentRestriction, "Expected complexContent extension or restriction");
1158Debug.Assert(ct.ContentModel is XmlSchemaSimpleContent, "expected simpleContent or complexContent");
1533Debug.Assert((node is XmlSchemaElement) || (node is XmlSchemaAttribute), "GetInstanceName should only be called on attribute or elements");
1544Debug.Assert((instanceName != null) && (instanceName.Length != 0), "instanceName cannot be null or empty. There's an error in the XSD compiler");
1914Debug.Assert(s_mapNameTypeXsd[index].name == name, $"FindNameType('{name}') -- failed. Wrong name found");
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 (237)
Common\System\Data\Common\DBConnectionString.cs (16)
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");
318Debug.Fail($"Unknown behavior for combined set: {combinedSet._behavior}");
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");
339Debug.Fail($"Unknown behavior for combined set: {combinedSet._behavior}");
344Debug.Fail($"Unknown behavior for component set: {componentSet._behavior}");
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");
387Debug.Fail("invalid KeyRestrictionBehavior");
537Debug.Assert(!string.IsNullOrEmpty(restrictionValues[i - 1]), "empty restriction");
538Debug.Assert(!string.IsNullOrEmpty(restrictionValues[i]), "empty restriction");
539Debug.Assert(0 >= StringComparer.Ordinal.Compare(restrictionValues[i - 1], restrictionValues[i]));
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 (19)
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");
488Debug.Assert(_state == State.Running || _state == State.ShuttingDown);
530Debug.Assert(!destroyObject);
543Debug.Assert(returnToGeneralPool || destroyObject);
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\runtime\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 (11)
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");
238Debug.Fail("unexpected state switch");
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 (26)
61Debug.Assert(command != null, "Command null on OdbcDataReader ctor");
75Debug.Fail("object is disposed");
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");
1023Debug.Assert(cbMissing == -1 && lengthOrIndicator <= cbMaxData);
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");
1645Debug.Fail("Non-V3 driver. Must not call GetDescFieldStr");
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");
2308Debug.Assert(_metadata != null);
2324Debug.Assert(buffer.Length >= 264, "Native buffer to small (_buffer.Length < 264)");
2472Debug.Assert(_metadata != null);
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");
2891Debug.Assert(quotePrefix != null && quoteSuffix != null);
System\Data\Odbc\OdbcParameter.cs (10)
336Debug.Assert((ODBC32.SQL_C.WCHAR == _bindtype._sql_c) || (ODBC32.SQL_C.BINARY == _bindtype._sql_c), "not wchar or binary");
410Debug.Assert((0 <= cch) && (cch < 0x3fffffff), $"GetColumnSize: cch = {cch} out of range, _internalShouldSerializeSize = {_internalShouldSerializeSize}, _internalSize = {_internalSize}");
455Debug.Assert((0 <= cch) && (cch < 0x3fffffff), $"GetValueSize: cch = {cch} out of range, _internalShouldSerializeSize = {_internalShouldSerializeSize}, _internalSize = {_internalSize}");
475Debug.Assert((ODBC32.SQL_C.WCHAR == _bindtype._sql_c) || (ODBC32.SQL_C.BINARY == _bindtype._sql_c), "not wchar or binary");
529Debug.Assert((0 <= ccb) && (ccb < 0x3fffffff), $"GetParameterSize: out of range {ccb}");
622Debug.Assert(command.Connection != null);
792Debug.Assert(command.Connection != null);
978Debug.Assert(ODBC32.SQL_C.NUMERIC == _typemap._sql_c, "unexpected");
1032Debug.Assert(null != _typemap, "GetParameterValue: null _typemap");
1108Debug.Fail("Unexpected Direction Property on Parameter");
System\Data\Odbc\OdbcUtils.cs (14)
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 ");
143Debug.Fail("UnknownSQLCType");
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!");
315Debug.Fail("UnknownSQLCType");
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.Data.OleDb (456)
ColumnBinding.cs (111)
56Debug.Assert(null != rowbinding, "null rowbinding");
57Debug.Assert(null != bindings, "null bindings");
58Debug.Assert(ODB.SizeOf_tagDBBINDING <= offset, $"invalid offset {offset}");
76Debug.Assert(0 <= _offsetStatus, "negative _offsetStatus");
77Debug.Assert(0 <= _offsetLength, "negative _offsetLength");
78Debug.Assert(0 <= _offsetValue, "negative _offsetValue");
160Debug.Assert(null != _dataReader, "null DataReader");
166Debug.Assert((null != _parameter) && (null != parameter), "null parameter");
192Debug.Assert(0 <= value, "negative LengthValue");
198Debug.Assert(null != _parameter, "null parameter");
587Debug.Fail("unknown DBTYPE");
611Debug.Assert((NativeDBType.BOOL == DbType), "Value_BOOL");
612Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_BOOL");
618Debug.Assert((NativeDBType.BOOL == DbType), "Value_BOOL");
626Debug.Assert((NativeDBType.BSTR == DbType), "Value_BSTR");
627Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_BSTR");
652Debug.Assert((null != value), "Value_BSTR null");
653Debug.Assert((NativeDBType.BSTR == DbType), "Value_BSTR");
661Debug.Assert(((NativeDBType.BYREF | NativeDBType.BYTES) == DbType), "Value_ByRefBYTES");
662Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_ByRefBYTES");
688Debug.Assert(null != value, "Value_ByRefBYTES null");
689Debug.Assert((NativeDBType.BYREF | NativeDBType.BYTES) == DbType, "Value_ByRefBYTES");
709Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR");
710Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_ByRefWSTR");
736Debug.Assert(null != value, "Value_ByRefWSTR null");
737Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR");
755Debug.Assert(null != value, "Value_ByRefWSTR null");
756Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR");
775Debug.Assert(NativeDBType.BYTES == DbType, "Value_BYTES");
776Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_BYTES");
784Debug.Assert(null != value, "Value_BYTES null");
797Debug.Assert(NativeDBType.CY == DbType, "Value_CY");
798Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_CY");
803Debug.Assert(NativeDBType.CY == DbType, "Value_CY");
811Debug.Assert(NativeDBType.DATE == DbType, "Value_DATE");
812Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DATE");
817Debug.Assert(NativeDBType.DATE == DbType, "Value_DATE");
825Debug.Assert(NativeDBType.DBDATE == DbType, "Value_DBDATE");
826Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBDATE");
831Debug.Assert(NativeDBType.DBDATE == DbType, "Value_DATE");
839Debug.Assert(NativeDBType.DBTIME == DbType, "Value_DBTIME");
840Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBTIME");
845Debug.Assert(NativeDBType.DBTIME == DbType, "Value_DBTIME");
853Debug.Assert(NativeDBType.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP");
854Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBTIMESTAMP");
859Debug.Assert(NativeDBType.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP");
867Debug.Assert(NativeDBType.DECIMAL == DbType, "Value_DECIMAL");
868Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DECIMAL");
880Debug.Assert(NativeDBType.DECIMAL == DbType, "Value_DECIMAL");
900Debug.Assert(NativeDBType.ERROR == DbType, "Value_ERROR");
901Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_ERROR");
906Debug.Assert(NativeDBType.ERROR == DbType, "Value_ERROR");
914Debug.Assert(NativeDBType.FILETIME == DbType, "Value_FILETIME");
915Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_FILETIME");
921Debug.Assert(NativeDBType.FILETIME == DbType, "Value_FILETIME");
930Debug.Assert(NativeDBType.GUID == DbType, "Value_GUID");
931Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_GUID");
936Debug.Assert(NativeDBType.GUID == DbType, "Value_GUID");
945Debug.Assert(NativeDBType.HCHAPTER == DbType, "Value_HCHAPTER");
946Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_HCHAPTER");
953Debug.Assert(NativeDBType.I1 == DbType, "Value_I1");
954Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I1");
960Debug.Assert(NativeDBType.I1 == DbType, "Value_I1");
968Debug.Assert(NativeDBType.I2 == DbType, "Value_I2");
969Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I2");
974Debug.Assert(NativeDBType.I2 == DbType, "Value_I2");
982Debug.Assert(NativeDBType.I4 == DbType, "Value_I4");
983Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I4");
988Debug.Assert(NativeDBType.I4 == DbType, "Value_I4");
996Debug.Assert(NativeDBType.I8 == DbType, "Value_I8");
997Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I8");
1002Debug.Assert(NativeDBType.I8 == DbType, "Value_I8");
1010Debug.Assert(NativeDBType.IDISPATCH == DbType, "Value_IDISPATCH");
1011Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_IDISPATCH");
1034Debug.Assert(NativeDBType.IDISPATCH == DbType, "Value_IDISPATCH");
1057Debug.Assert(NativeDBType.IUNKNOWN == DbType, "Value_IUNKNOWN");
1058Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_IUNKNOWN");
1081Debug.Assert(NativeDBType.IUNKNOWN == DbType, "Value_IUNKNOWN");
1090Debug.Assert(NativeDBType.NUMERIC == DbType, "Value_NUMERIC");
1091Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_NUMERIC");
1096Debug.Assert(NativeDBType.NUMERIC == DbType, "Value_NUMERIC");
1111Debug.Assert(NativeDBType.R4 == DbType, "Value_R4");
1112Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_R4");
1118Debug.Assert(NativeDBType.R4 == DbType, "Value_R4");
1126Debug.Assert(NativeDBType.R8 == DbType, "Value_R8");
1127Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_R8");
1133Debug.Assert(NativeDBType.R8 == DbType, "Value_I4");
1141Debug.Assert(NativeDBType.UI1 == DbType, "Value_UI1");
1142Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI1");
1147Debug.Assert(NativeDBType.UI1 == DbType, "Value_UI1");
1155Debug.Assert(NativeDBType.UI2 == DbType, "Value_UI2");
1156Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI2");
1161Debug.Assert(NativeDBType.UI2 == DbType, "Value_UI2");
1169Debug.Assert(NativeDBType.UI4 == DbType, "Value_UI4");
1170Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI4");
1175Debug.Assert(NativeDBType.UI4 == DbType, "Value_UI4");
1183Debug.Assert(NativeDBType.UI8 == DbType, "Value_UI8");
1184Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI8");
1189Debug.Assert(NativeDBType.UI8 == DbType, "Value_UI8");
1197Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR");
1198Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_WSTR");
1199Debug.Assert(2 < ColumnBindingMaxLen, "Value_WSTR");
1205Debug.Assert(null != value, "Value_BYTES null");
1206Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR");
1220Debug.Assert(null != value, "Value_BYTES null");
1221Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR");
1234Debug.Assert((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType), "Value_VARIANT");
1235Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_VARIANT");
1240Debug.Assert((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType), "Value_VARIANT");
1671Debug.Fail("CheckStatusValue: unhandled data with ok status");
1674Debug.Fail("CheckStatusValue: unhandled data with truncated status");
DbBindings.cs (14)
70Debug.Assert((0 <= value) && (value < _count), "bad binding index");
77Debug.Assert(null != _columnBindings, "null ColumnBindings");
83Debug.Assert(null != _parameters, "null Parameters");
180Debug.Assert(0 <= value, "invalid MaxLen");
245Debug.Assert(null == _rowBinding, "row binding already allocated");
246Debug.Assert(null == _columnBindings, "column bindings already allocated");
252Debug.Assert(null != columnBindings, "null column bindings");
257Debug.Assert(columnBindings.Length == _dbcolumns.Length, "length mismatch");
315Debug.Assert(null != collection, "null parameter collection");
316Debug.Assert(null != _parameters, "null parameters");
325Debug.Assert(null != binding, "null column binding");
326Debug.Assert(binding.Parameter() == _parameters[i], "parameter mismatch");
363Debug.Assert(null != _rowBinding, "no row binding");
364Debug.Assert(null != _columnBindings, "no column bindings");
OleDbCommand.cs (19)
357Debug.Assert(null != _icommandText, "IAccessor: null ICommandText");
364Debug.Assert(null != _icommandText, "ICommandProperties: null ICommandText");
371Debug.Assert(null != _icommandText, "ICommandPrepare: null ICommandText");
378Debug.Assert(null != _icommandText, "ICommandWithParameters: null ICommandText");
389Debug.Assert(System.Data.CommandType.Text == CommandType || System.Data.CommandType.StoredProcedure == CommandType, "CreateAccessor: incorrect CommandType");
390Debug.Assert(null == _dbBindings, "CreateAccessor: already has dbBindings");
391Debug.Assert(HasParameters(), "CreateAccessor: unexpected, no parameter collection");
519Debug.Assert(null != _connection, "no connection, CloseInternal");
534Debug.Assert(_dbBindings == bindings, "bindings with two owners");
564Debug.Assert(null != _connection, "no connection, CloseInternalParameters");
690Debug.Fail("ExecuteReaderInternal: unknown result type");
713Debug.Assert(null != dataReader, "ExecuteReader should never return a null DataReader");
859Debug.Assert(0 == (CommandBehavior.SingleRow & this.commandBehavior), "SingleRow implies SingleResult");
891Debug.Assert(_executeQuery, "ExecuteNonQuery should always use ExecuteCommandTextForSingleResult");
932Debug.Assert(null != e, "missing inner exception");
1114Debug.Assert(null != _connection, "ExpandStoredProcedureToText: null Connection");
1131Debug.Assert(null != _connection, "InitializeCommand: null OleDbConnection");
1276Debug.Assert(_connection != null);
1282Debug.Assert(!_isPrepared, "null command isPrepared");
OleDbConnection.cs (12)
187Debug.Assert(null != this.PoolGroup, "PoolGroup must never be null when accessing ProviderInfo");
242Debug.Fail($"Unknown 'Connection Status' value {connectionStatus.ToString("G", CultureInfo.InvariantCulture)}");
263Debug.Assert(null != GetOpenConnection(), "ICommandText closed");
269Debug.Assert(null != GetOpenConnection(), "IDBProperties closed");
275Debug.Assert(null != GetOpenConnection(), "IOpenRowset closed");
281Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SqlSupport");
287Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SupportMultipleResults");
293Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SupportIRow");
299Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString QuotedIdentifierCase");
477Debug.Assert(null != GetOpenConnection(), "GetSchemaRowset closed");
546Debug.Assert(1 == propSet.PropertySetCount, "too many PropertySets");
549Debug.Assert(1 == dbprops.Length, "too many Properties");
OleDbConnectionInternal.cs (20)
69Debug.Assert((null != constr) && !constr.IsEmpty, "empty connectionstring");
86Debug.Assert(!_datasrcwrp.IsInvalid, "bad DataSource");
107Debug.Assert(null != e, "CreateSessionError");
110Debug.Assert(!_sessionwrp.IsInvalid, "bad Session");
190Debug.Assert(null != _datasrcwrp, "IDBProperties: null datasource");
197Debug.Assert(null != _datasrcwrp, "IOpenRowset: null datasource");
198Debug.Assert(null != _sessionwrp, "IOpenRowset: null session");
205Debug.Assert(null != _datasrcwrp, "IDBInfo: null datasource");
212Debug.Assert(null != _datasrcwrp, "IDBSchemaRowset: null datasource");
213Debug.Assert(null != _sessionwrp, "IDBSchemaRowset: null session");
220Debug.Assert(null != _datasrcwrp, "ITransactionJoin: null datasource");
221Debug.Assert(null != _sessionwrp, "ITransactionJoin: null session");
228Debug.Assert(null != _datasrcwrp, "IDBCreateCommand: null datasource");
229Debug.Assert(null != _sessionwrp, "IDBCreateCommand: null session");
234Debug.Assert((0 <= hr) || (null == icommandText), "CreateICommandText: error with ICommandText");
267Debug.Assert(null != _datasrcwrp, "ITransactionLocal: null datasource");
268Debug.Assert(null != _sessionwrp, "ITransactionLocal: null session");
314Debug.Assert(null == LocalTransaction, "why was Deactivate not called first");
742Debug.Assert(null != wrapper, "GetObjectPool: null dataInitialize");
781Debug.Assert(null != head, "unexcpted Transaction state");
OleDbDataReader.cs (54)
119Debug.Assert(_singleRow, "SingleRow not already set");
175Debug.Assert((_singleRow && !_isClosed && !_isRead && (null == _irow) && (null == _irowset)) ||
240Debug.Fail("object is disposed");
251Debug.Fail("object is disposed");
283Debug.Assert(null == _metadata, "BuildMetaInfo: already built, by _metadata");
300Debug.Assert(null != _bindings, "unexpected dbBindings");
321Debug.Assert(null == _dbSchemaTable, "BuildSchemaTable: schema table already exists");
322Debug.Assert(null != metadata, "BuildSchemaTable: no _metadata");
453Debug.Assert(null == _dbSchemaTable, "non-null SchemaTable");
454Debug.Assert(null == _metadata, "non-null metadata");
455Debug.Assert(null != handle, "unexpected null rowset");
496Debug.Assert(0 < columnCount, "BuildSchemaTableInfoTable - no column");
551Debug.Assert(ODB.DBKIND_PGUID_NAME != dbColumnInfo.columnid.eKind, "OLE DB providers never return pGuid-style bindings.");
552Debug.Assert(ODB.DBKIND_PGUID_PROPID != dbColumnInfo.columnid.eKind, "OLE DB providers never return pGuid-style bindings.");
602Debug.Assert(null == _dbSchemaTable, "BuildSchemaTableRowset - non-null SchemaTable");
603Debug.Assert(null != handle, "BuildSchemaTableRowset(object) - unexpected null handle");
614Debug.Assert((0 == hr) || prgOptColumns.IsInvalid, "GetAvailableCOlumns: unexpected return");
618Debug.Assert((0 <= hr) || (null == rowset), "if GetColumnsRowset failed, rowset should be null");
1015Debug.Assert(fieldType != null);
1055Debug.Assert(null != _metadata[index].columnName);
1110Debug.Assert(null != binding, "null binding");
1115Debug.Assert(_nextAccessorForRetrieval <= binding.IndexForAccessor, "backwards index for accessor");
1116Debug.Assert(_nextAccessorForRetrieval == i, "failed to increment");
1214Debug.Assert(!_hasRowsReadCheck, "_hasRowsReadCheck not reset");
1263Debug.Assert(OleDbHResult.DB_E_OBJECTOPEN == hr, "unexpected");
1296Debug.Fail("<oledb.OleDbDataReader.NextResultsInfinite|INFO> System.Data.OleDb.OleDbDataReader: 2000 IMultipleResult.GetResult(NULL, DBRESULTFLAG_DEFAULT, IID_NULL, NULL, NULL) iterations with 0 records affected. Stopping suspect infinite loop. To work-around try using ExecuteReader() and iterating through results with NextResult().\n");
1317Debug.Assert(null == _irow, "NextResult: row loop check");
1318Debug.Assert(null == _irowset, "NextResult: rowset loop check");
1417Debug.Assert(null != _irowset, "ReadRow: null IRowset");
1418Debug.Assert(0 <= _metadata!.Length, "incorrect state for fieldCount");
1430Debug.Assert(0 == _currentRow, "incorrect state for _currentRow");
1431Debug.Assert(0 <= _metadata.Length, "incorrect state for fieldCount");
1432Debug.Assert(0 == _nextAccessorForRetrieval, "incorrect state for nextAccessorForRetrieval");
1433Debug.Assert(0 == _nextValueForRetrieval, "incorrect state for nextValueForRetrieval");
1443Debug.Assert(null != _irowset, "ReleaseCurrentRow: no rowset");
1449Debug.Assert(null != bindings, "ReleaseCurrentRow: null dbBindings");
1467Debug.Assert(null == _bindings, "CreateAccessor: dbBindings already exists");
1468Debug.Assert(null != _irowset, "CreateAccessor: no IRowset available");
1469Debug.Assert(null != _metadata && 0 < _metadata.Length, "no columns");
1580Debug.Assert(indexToBinding[index] < dbbindings.Length, "bad indexToAccessor");
1600Debug.Assert(NativeDBType.STR != getType, "Should have bound as WSTR");
1676Debug.Assert(count == columnBindings[k].Index, "column binding mismatch");
1689Debug.Assert(0 < (int)_rowHandleFetchCount, "GetRowHandles: bad _rowHandleFetchCount");
1690Debug.Assert(!_isRead, "GetRowHandles: _isRead");
1706Debug.Assert(rowHandleBuffer.DangerousGetHandle() == rowHandlesPtr, "rowhandlebuffer changed");
1739Debug.Assert(null != _bindings, "GetRowDataFromHandle: null dbBindings");
1740Debug.Assert(null != _rowHandleNativeBuffer, "GetRowDataFromHandle: null dbBindings");
1777Debug.Assert(0 < (int)_rowFetchedCount, "invalid _rowFetchedCount");
1835Debug.Assert(null != _irow, "GetRowValue: null IRow");
1836Debug.Assert(null != _metadata, "GetRowValue: null MetaData");
1841Debug.Assert(_nextValueForRetrieval <= columnBindings[0].Index, "backwards retrieval");
1910Debug.Assert(null != _connection, "null connection");
1911Debug.Assert(null != _metadata, "no _metadata");
2248Debug.Assert(null == dataReader._fieldNameLookup, "lookup already exists");
OleDbParameter.cs (7)
31Debug.Assert(!(value is OleDbType), "use OleDbParameter(string, OleDbType)");
32Debug.Assert(!(value is SqlDbType), "use OleDbParameter(string, OleDbType)");
384Debug.Assert(NativeDBType.STR != dbtype.wType, "should have ANSI binding, describing is okay");
412Debug.Assert(NativeDBType.STR != dbtype.wType, "should have ANSI binding, describing is okay");
459Debug.Assert(_changeID == changeID, "parameter has unexpectedly changed");
466Debug.Assert(null != destinationType, "null destinationType");
545Debug.Assert(IsParameterComputed(), "Prepare computed parameter");
RowBinding.cs (27)
46Debug.Assert(0 < _bindingCount, "bad _bindingCount");
47Debug.Assert(0 < _headerLength, "bad _headerLength");
48Debug.Assert(0 < _dataLength, "bad _dataLength");
49Debug.Assert(_bindingCount * 3 * IntPtr.Size <= _dataLength, "_dataLength too small");
50Debug.Assert(_headerLength + _dataLength <= _emptyStringOffset, "bad string offset");
51Debug.Assert(_headerLength + _dataLength + 8 <= length, "bad length");
58Debug.Fail("previous row not yet cleared");
114Debug.Fail("unknown accessor buffer");
124Debug.Assert(null != bindings, "null bindings");
125Debug.Assert(dbbindings.Length == BindingCount(), "count mismatch");
170Debug.Assert(_needToReset, "data type requires resetting and _needToReset is false");
171Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier");
172Debug.Assert(0 == offset % 8, "invalid alignment");
200Debug.Assert(_needToReset, "data type requires resetting and _needToReset is false");
201Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier");
202Debug.Assert(0 == offset % 8, "invalid alignment");
241Debug.Assert(_needToReset, "data type requires resetting and _needToReset is false");
242Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
280Debug.Assert(_needToReset, "data type requires resetting and _needToReset is false");
281Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
396Debug.Assert(IntPtr.Zero != buffer && _needToReset && _haveData, "shouldn't be calling ResetValues");
469Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset");
481Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset");
510Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset");
538Debug.Assert(0 == (sizeof(ComVariant) % 8), "unexpected PROPVARIANT size mutiplier");
539Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset");
568Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
System\Data\ProviderBase\DbBuffer.cs (37)
62Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
88Debug.Assert(0 == offset % 4, "invalid alignment");
120Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
121Debug.Assert(null != destination, "null destination");
122Debug.Assert(startIndex + length <= destination.Length, "destination too small");
153Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
154Debug.Assert(null != destination, "null destination");
155Debug.Assert(startIndex + length <= destination.Length, "destination too small");
186Debug.Assert(0 == offset % 2, "invalid alignment");
212Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
213Debug.Assert(null != destination, "null destination");
214Debug.Assert(startIndex + length <= destination.Length, "destination too small");
238Debug.Assert(0 == offset % 4, "invalid alignment");
264Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
265Debug.Assert(null != destination, "null destination");
266Debug.Assert(startIndex + length <= destination.Length, "destination too small");
290Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
316Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
358Debug.Assert(null != structure, "null structure");
361Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
385Debug.Assert(0 == offset % 4, "invalid alignment");
409Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
410Debug.Assert(null != source, "null source");
411Debug.Assert(startIndex + length <= source.Length, "source too small");
435Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
436Debug.Assert(null != source, "null source");
437Debug.Assert(startIndex + length <= source.Length, "source too small");
466Debug.Assert(0 == offset % 2, "invalid alignment");
490Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
491Debug.Assert(null != source, "null source");
492Debug.Assert(startIndex + length <= source.Length, "source too small");
516Debug.Assert(0 == offset % 4, "invalid alignment");
540Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
541Debug.Assert(null != source, "null source");
542Debug.Assert(startIndex + length <= source.Length, "source too small");
566Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
590Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
System\Data\ProviderBase\DbConnectionFactory.cs (15)
69Debug.Assert(null != owningConnection, "null owningConnection?");
70Debug.Assert(null != poolGroup, "null poolGroup?");
87Debug.Assert(null != pool, "null pool?");
124Debug.Assert(null != owningConnection, "null owningConnection?");
293Debug.Assert(null != owningObject, "null owningObject?");
294Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup?");
312Debug.Assert(null != connectionOptions, "prevent expansion of connectionString");
315Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup?");
397Debug.Assert(!connectionPoolGroup.IsDisabled, "Disabled pool entry discovered");
400Debug.Assert(null != connectionPoolGroup, "how did we not create a pool entry?");
401Debug.Assert(null != userConnectionOptions, "how did we not have user connection options?");
412Debug.Assert(connectionPoolGroup != null, "connectionPoolGroup may not be null.");
495Debug.Assert(!entry.Value.IsDisabled, "Disabled pool entry discovered");
520Debug.Assert(null != pool, "null pool?");
540Debug.Assert(null != poolGroup, "null poolGroup?");
System\Data\ProviderBase\DbConnectionHelper.cs (11)
128Debug.Assert(null != value, "null poolGroup");
251Debug.Assert(DbConnectionClosedConnecting.SingletonInstance == _innerConnection, "not connecting");
261Debug.Assert(null != userConnectionOptions, "null UserConnectionOptions");
274Debug.Assert(null != _innerConnection, "null InnerConnection");
275Debug.Assert(null != to, "to null InnerConnection");
299Debug.Fail("unexpected state switch");
313Debug.Assert(null != _innerConnection, "null InnerConnection");
314Debug.Assert(null != from, "from null InnerConnection");
315Debug.Assert(null != to, "to null InnerConnection");
326Debug.Assert(null != _innerConnection, "null InnerConnection");
327Debug.Assert(null != to, "to null InnerConnection");
System\Data\ProviderBase\DbConnectionPool.cs (38)
67Debug.Assert(null != pool, "null pool?");
83Debug.Assert(null != transaction, "null transaction?");
104Debug.Assert(connections != null);
123Debug.Assert(null != transaction, "null transaction?");
124Debug.Assert(null != transactedObject, "null transactedObject?");
137Debug.Assert(connections != null);
142Debug.Assert(0 > connections.IndexOf(transactedObject), "adding to pool a second time?");
172Debug.Assert(connections != null);
177Debug.Assert(0 > connections.IndexOf(transactedObject), "adding to pool a second time?");
253Debug.Assert(0 == SEMAPHORE_HANDLE, "SEMAPHORE_HANDLE");
254Debug.Assert(1 == ERROR_HANDLE, "ERROR_HANDLE");
255Debug.Assert(2 == CREATION_HANDLE, "CREATION_HANDLE");
376Debug.Assert(ADP.IsWindowsNT, "Attempting to construct a connection pool on Win9x?");
377Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup");
540Debug.Assert(obj != null, "null connection is not expected");
600Debug.Assert(obj != null, "null connection is not expected");
602Debug.Assert(!obj.IsEmancipated, "pooled object not in pool");
603Debug.Assert(obj.CanBePooled, "pooled object is not poolable");
632Debug.Assert(obj != null, "null connection is not expected");
638Debug.Assert(obj != null, "null connection is not expected");
687Debug.Assert(oldConnectionPool._state == State.ShuttingDown, "Old connections pool should be shutting down");
733Debug.Assert(timerIsNotDisposed, "ErrorCallback timer has been disposed");
765Debug.Assert(_state == State.Running || _state == State.ShuttingDown);
817Debug.Assert(_transactedConnectionPool != null, "Transacted connection pool was not expected to be null.");
859Debug.Assert(!destroyObject);
875Debug.Assert(rootTxn || returnToGeneralPool || destroyObject);
896Debug.Assert(removed, "attempt to DestroyObject not in list");
929Debug.Assert(!Thread.CurrentThread.IsThreadPoolThread, "This thread may block for a long time. Threadpool threads should not be used.");
1012Debug.Assert(connection != null, "connection should never be null in success case");
1120Debug.Assert(2 == waitHandleCount || 3 == waitHandleCount, "unexpected waithandle count");
1193Debug.Assert(2 == CREATION_HANDLE, "creation handle changed value");
1237Debug.Assert(waitForMultipleObjectsExHR != 0, "WaitForMultipleObjectsEx failed but waitForMultipleObjectsExHR remained 0");
1341Debug.Assert(obj != null, "null connection is not expected");
1346Debug.Assert(obj != null, "null connection is not expected");
1516Debug.Assert(null != obj, "why are we adding a null object to the pool?");
1532Debug.Assert(null != obj, "null obj?");
1560Debug.Assert(null != obj, "null pooledObject?");
1561Debug.Assert(obj.EnlistedTransaction == null, "pooledObject is still enlisted?");
System.Diagnostics.Debug (1)
System.Diagnostics.DiagnosticSource (91)
System.Diagnostics.EventLog (17)
System.Diagnostics.PerformanceCounter (21)
System.Diagnostics.Process (69)
System.Diagnostics.StackTrace (1)
System.Diagnostics.TextWriterTraceListener (4)
System.Diagnostics.TraceSource (15)
System.DirectoryServices (113)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (7)
172Debug.Assert(existing);
211Debug.Assert(siteName != null);
600Debug.Assert(tmpSchedule != null && tmpSchedule.Length == 188);
944Debug.Assert(fromSite != null && Utils.Compare(fromSite, 0, 3, "CN=", 0, 3) == 0);
1023Debug.Assert(otherSite != null && Utils.Compare(otherSite, 0, 3, "CN=", 0, 3) == 0);
1305Debug.Assert(handle != 0);
1330Debug.Assert(val != 0);
System.DirectoryServices.AccountManagement (497)
System.DirectoryServices.Protocols (52)
System\DirectoryServices\Protocols\common\BerConverter.cs (29)
23Debug.WriteLine("Begin encoding\n");
58Debug.WriteLine("value argument is not valid, valueCount >= value.Length\n");
65Debug.WriteLine("type should be int\n");
80Debug.WriteLine("value argument is not valid, valueCount >= value.Length\n");
87Debug.WriteLine("type should be boolean\n");
102Debug.WriteLine("value argument is not valid, valueCount >= value.Length\n");
109Debug.WriteLine("type should be string, but receiving value has type of ");
110Debug.WriteLine(value[valueCount].GetType());
131Debug.WriteLine("value argument is not valid, valueCount >= value.Length\n");
138Debug.WriteLine("type should be byte[], but receiving value has type of ");
139Debug.WriteLine(value[valueCount].GetType());
154Debug.WriteLine("value argument is not valid, valueCount >= value.Length\n");
161Debug.WriteLine("type should be string[], but receiving value has type of ");
162Debug.WriteLine(value[valueCount].GetType());
195Debug.WriteLine("value argument is not valid, valueCount >= value.Length\n");
202Debug.WriteLine("type should be byte[][], but receiving value has type of ");
203Debug.WriteLine(value[valueCount].GetType());
218Debug.WriteLine("value argument is not valid, valueCount >= value.Length\n");
225Debug.WriteLine("type should be int\n");
238Debug.WriteLine("Format string contains undefined character: ");
239Debug.WriteLine(new string(fmt, 1));
246Debug.WriteLine("ber_printf failed\n");
263Debug.WriteLine("ber_flatten failed\n");
306Debug.WriteLine("Begin decoding");
340Debug.WriteLine("ber_scanf for {, }, [, ], n or x failed");
365Debug.WriteLine("ber_scanf for format character 'i', 'e' or 'b' failed");
434Debug.WriteLine("Format string contains undefined character\n");
506Debug.WriteLine("ber_scanf for format character 'O' failed");
626Debug.WriteLine("ber_scanf for format character 'V' failed");
System.Drawing.Primitives (9)
System.Formats.Asn1 (119)
System.Formats.Cbor (52)
System.Formats.Nrbf (19)
System.Formats.Tar (137)
System.IO.Compression (207)
System.IO.Compression.Brotli (18)
System.IO.Compression.ZipFile (2)
System.IO.FileSystem.AccessControl (14)
System.IO.FileSystem.DriveInfo (3)
System.IO.FileSystem.Watcher (45)
System.IO.Hashing (42)
System.IO.IsolatedStorage (5)
System.IO.MemoryMappedFiles (24)
System.IO.Packaging (67)
System.IO.Pipelines (54)
src\runtime\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 is not 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 is not null, "Expected a non-null segment.");
180Debug.Assert(array is not null, "Expected a non-null item array.");
253Debug.Assert(segment is not null, "Expected a non-null segment.");
254Debug.Assert(array is not null, "Expected a non-null item array.");
368Debug.Assert(syncObj is not null, "The syncObj parameter is null.");
390Debug.Assert((size & (size - 1)) == 0, "Size must be a power of 2");
429Debug.Assert(queue is not null, "Expected a non-null queue.");
System.IO.Pipes (28)
System.IO.Ports (24)
System\IO\Ports\SerialPort.cs (12)
691Debug.Assert(CachedBytesToRead == 0, "there should be nothing left in our internal buffer");
723Debug.Assert(IsOpen, "ReadOneChar - port not open");
819Debug.Assert(IsOpen, "port not open!");
820Debug.Assert(buffer != null, "invalid buffer!");
821Debug.Assert(offset >= 0, "invalid offset!");
822Debug.Assert(count >= 0, "invalid count!");
823Debug.Assert(buffer.Length - offset >= count, "invalid offset/count!");
891Debug.Assert(count != 0, "Count should never be zero. We will probably see bugs further down if count is 0.");
935Debug.Assert((lastFullCharPos + currentBytesToExamine) <= _readLen, "We should never be attempting to read more bytes than we have");
953Debug.Assert((buffer.Length - offset - totalCharsFound) >= currentCharsFound, "internal buffer to read one full unicode char sequence is not sufficient!");
1107Debug.Assert((numCharsRead > 0), "possible bug in ReadBufferIntoChars, reading surrogate char?");
1332Debug.Assert(_inBuffer.Length >= _readLen, "ResizeBuffer - readLen > inBuffer.Length");
System.Linq (224)
System.Linq.AsyncEnumerable (61)
System.Linq.Expressions (485)
System.Linq.Parallel (683)
System\Linq\Parallel\Channels\AsynchronousChannel.cs (21)
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");
258Debug.Assert(_producerChunk != null);
289Debug.Assert(chunk != null);
290Debug.Assert(!_done, "can't continue producing after the production is over");
294Debug.Assert(!IsFull, "expected a non-full buffer");
315Debug.Assert(_consumerEvent != null);
327Debug.Assert(_producerEvent != null);
383Debug.Assert(1 <= _producerChunkIndex && _producerChunkIndex <= _chunkSize);
410Debug.Assert(_consumerChunk == null);
418Debug.Assert(_consumerChunk != null, "consumer chunk is null");
419Debug.Assert(0 <= _consumerChunkIndex && _consumerChunkIndex < _consumerChunk.Length, "chunk index out of bounds");
488Debug.Assert(_consumerChunk == null);
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");
606Debug.Assert(!IsChunkBufferEmpty);
630Debug.Assert(_producerEvent != null);
663Debug.Assert(_done, "Expected channel to be done before disposing");
664Debug.Assert(_producerEvent != null);
665Debug.Assert(_consumerEvent != null);
System\Linq\Parallel\Partitioning\PartitionedDataSource.cs (41)
74Debug.Assert(source != null);
75Debug.Assert(partitionCount > 0);
81Debug.Assert(source != null);
138Debug.Assert(partitions.Length == partitionCount);
161Debug.Assert(source != null);
162Debug.Assert(partitionCount > 0);
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");
251Debug.Assert(sectionSize > 0);
277Debug.Assert(mutables != null);
278Debug.Assert(mutables._currentPositionInChunk >= mutables._currentChunkSize);
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");
422Debug.Assert(sectionSize > 0);
448Debug.Assert(mutables != null);
449Debug.Assert(mutables._currentPositionInChunk >= mutables._currentChunkSize);
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");
595Debug.Assert(source != null);
596Debug.Assert(sourceSyncLock != null);
597Debug.Assert(currentIndex != null);
614Debug.Assert(mutables._chunkBuffer != null);
624Debug.Assert(_source != null);
625Debug.Assert(chunkBuffer != null);
626Debug.Assert(mutables._currentChunkSize > 0);
627Debug.Assert(0 <= currentChunkIndex && currentChunkIndex < chunkBuffer.Length);
641Debug.Assert(0 <= mutables._nextChunkMaxSize && mutables._nextChunkMaxSize <= chunkBuffer.Length);
System.Linq.Queryable (4)
System.Management (1)
System.Memory (56)
System.Net.Http (905)
src\runtime\src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (40)
38Debug.Assert(initialBufferSize >= 0);
70Debug.Assert(byteCount >= 0);
71Debug.Assert(byteCount <= ActiveMemory.Length, $"MultiArrayBuffer.Discard: Expected byteCount={byteCount} <= {ActiveMemory.Length}");
112Debug.Assert(toReturn is not null);
120Debug.Assert(byteCount >= 0);
121Debug.Assert(byteCount <= AvailableMemory.Length, $"MultiArrayBuffer.Commit: Expected byteCount={byteCount} <= {AvailableMemory.Length}");
130Debug.Assert(byteCount >= 0);
131Debug.Assert(limit >= 0);
147Debug.Assert(byteCount >= 0);
157Debug.Assert(byteCount > AvailableMemory.Length);
169Debug.Assert(_allocatedEnd == 0);
170Debug.Assert(_activeStart == 0);
171Debug.Assert(_availableStart == 0);
183Debug.Assert(_allocatedEnd % BlockSize == 0);
184Debug.Assert(_allocatedEnd <= _blocks.Length * BlockSize);
220Debug.Assert(_activeStart / BlockSize == 0, $"Start is not in first block after move or resize?? _activeStart={_activeStart}");
225Debug.Assert(_allocatedEnd % BlockSize == 0);
227Debug.Assert(allocatedBlockCount == 0 || _blocks[allocatedBlockCount - 1] is not null);
230Debug.Assert(_blocks[allocatedBlockCount] is null);
237Debug.Assert(byteCount <= AvailableMemory.Length);
247Debug.Assert(_activeStart == 0);
248Debug.Assert(_availableStart == 0);
249Debug.Assert(_allocatedEnd == 0);
253Debug.Assert(_activeStart <= _availableStart);
254Debug.Assert(_availableStart <= _allocatedEnd);
255Debug.Assert(_allocatedEnd <= _blocks.Length * BlockSize);
257Debug.Assert(_allocatedEnd % BlockSize == 0, $"_allocatedEnd={_allocatedEnd} not at block boundary?");
264Debug.Assert(_blocks[i] is null);
269Debug.Assert(_blocks[i] is not null);
274Debug.Assert(_blocks[i] is null);
279Debug.Assert(_activeStart == 0, $"No active bytes but _activeStart={_activeStart}");
307Debug.Assert(blocks is not null);
308Debug.Assert(start <= int.MaxValue);
309Debug.Assert(length <= int.MaxValue);
310Debug.Assert(start + length <= blocks.Length * BlockSize);
349Debug.Assert(_length > 0, "Length should never be 0 here because BlockCount would be 0");
350Debug.Assert(_blocks is not null);
355Debug.Assert(0 <= startInBlock, $"Invalid startInBlock={startInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
356Debug.Assert(startInBlock < endInBlock, $"Invalid startInBlock={startInBlock}, endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
357Debug.Assert(endInBlock <= BlockSize, $"Invalid endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
System\Net\Http\Headers\HttpHeaders.cs (65)
68Debug.Assert((allowedHeaderTypes & treatAsCustomHeaderTypes) == 0);
101Debug.Assert(!Contains(descriptor));
154Debug.Assert(!Contains(descriptor));
184Debug.Assert(currentValue is string);
341Debug.Assert(singleValue is not null ^ multiValue is not null);
353Debug.Assert(multiValue is not null && multiValue.Length > 0);
371Debug.Assert(singleValue is not null ^ multiValue is not null);
394Debug.Assert(_headerStore is not null);
397Debug.Assert(_count != 0 && entries is not null, "Caller should have validated the collection is not empty");
444Debug.Assert(value != null);
445Debug.Assert(descriptor.Parser != null, "Can't add parsed value if there is no parser available.");
451Debug.Assert(descriptor.Parser.SupportsMultipleValues, $"Header '{descriptor.Name}' doesn't support multiple values");
458Debug.Assert(value != null);
459Debug.Assert(descriptor.Parser != null, "Can't add parsed value if there is no parser available.");
489Debug.Assert(value != null);
495Debug.Assert(descriptor.Parser != null, "Can't add parsed value if there is no parser available.");
496Debug.Assert(descriptor.Parser.SupportsMultipleValues,
514Debug.Assert(parsedValue.GetType() == value.GetType(),
531Debug.Assert(item.GetType() == value.GetType(),
573Debug.Assert(headerRemoved, $"Existing header '{descriptor.Name}' couldn't be removed.");
584Debug.Assert(value != null);
590Debug.Assert(descriptor.Parser != null, "Can't add parsed value if there is no parser available.");
591Debug.Assert(descriptor.Parser.SupportsMultipleValues,
609Debug.Assert(parsedValue.GetType() == value.GetType(),
621Debug.Assert(item.GetType() == value.GetType(),
640Debug.Assert(sourceHeaders != null);
641Debug.Assert(GetType() == sourceHeaders.GetType(), "Can only copy headers from an instance of the same type.");
680Debug.Assert(sourceValue is string);
732Debug.Assert(source is not InvalidValue);
778Debug.Assert(!Contains(descriptor));
784Debug.Assert((descriptor.HeaderType & _treatAsCustomHeaderTypes) == 0);
836Debug.Assert(value is string);
856Debug.Assert(!info.IsEmpty);
869Debug.Assert(rawValue is not null);
874Debug.Assert(info.ParsedAndInvalidValues is not null);
882Debug.Assert(Monitor.IsEntered(info));
921Debug.Assert(!Contains(descriptor));
931Debug.Assert(info != null);
932Debug.Assert(descriptor.Parser != null);
964Debug.Assert(index < value.Length, "Parser must return an index value within the string length.");
1007Debug.Assert(value != null);
1017Debug.Assert(!(value is List<object>),
1050Debug.Assert(currentStoreValue is T);
1054Debug.Assert(value is T);
1103Debug.Assert(info != null);
1104Debug.Assert(descriptor.Parser != null);
1129Debug.Assert(index < value.Length, "Parser must return an index value within the string length.");
1219Debug.Assert(singleValue is not null ^ multiValue is not null);
1228Debug.Assert(sourceValues is string);
1247Debug.Assert(length > 1, "The header should have been removed when it became empty");
1255Debug.Assert(currentIndex == length);
1266Debug.Assert(sourceValues is string);
1280Debug.Assert(length > 0);
1290Debug.Assert(currentIndex == length);
1298Debug.Assert(info != null);
1299Debug.Assert(Monitor.IsEntered(info));
1324Debug.Assert(item != null);
1334Debug.Assert(value != null);
1351Debug.Assert(value is not null);
1367Debug.Assert(parser != null, "There should be no reason to call CanAddValue if there is no parser for the current header.");
1390Debug.Assert(item is not InvalidValue);
1395Debug.Assert(ParsedAndInvalidValues is not InvalidValue);
1439Debug.Assert(count == 1, "Only a single parsed value should be stored for this parser");
1579Debug.Assert(dictionary.Count == _count - 1);
1597Debug.Assert(!Contains(entry.Key));
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (75)
81Debug.Assert(stream != null);
138Debug.Assert(_readAheadTaskStatus is ReadAheadTask_Started or ReadAheadTask_Completed);
162Debug.Assert(_readAheadTaskStatus == ReadAheadTask_NotStarted);
196Debug.Assert(_readAheadTaskStatus != ReadAheadTask_CompletionReserved);
206Debug.Assert(_readAheadTaskStatus != ReadAheadTask_Started);
233Debug.Assert(_readAheadTask == default);
247Debug.Assert(_readAheadTask == default);
248Debug.Assert(_readBuffer.ActiveLength == 0);
280Debug.Assert(_readAheadTaskStatus is ReadAheadTask_Started or ReadAheadTask_CompletionReserved);
306Debug.Assert(bytesToConsume <= _readBuffer.ActiveLength);
312Debug.Assert(request.RequestUri is not null);
333Debug.Assert(request.RequestUri.Scheme == Uri.UriSchemeHttp);
342Debug.Assert(request.Version.Major >= 0 && request.Version.Minor >= 0); // guaranteed by Version class
352Debug.Assert(Kind != HttpConnectionKind.Proxy);
357Debug.Assert(Kind == HttpConnectionKind.Proxy);
412Debug.Assert(success);
420Debug.Assert(_currentRequest is not null);
438Debug.Assert(headerValuesCount > 0, "No values for header??");
492Debug.Assert(Ascii.IsValid(s));
497Debug.Assert(status == OperationStatus.Done);
498Debug.Assert(bytesWritten == s.Length);
517Debug.Assert(status == OperationStatus.Done);
518Debug.Assert(bytesWritten == s.Length);
537Debug.Assert(_currentRequest == null, $"Expected null {nameof(_currentRequest)}.");
538Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in read buffer");
539Debug.Assert(_readAheadTaskStatus != ReadAheadTask_Started,
606Debug.Assert(_readBuffer.ActiveLength == 0);
615Debug.Assert(_readAheadTask != default);
616Debug.Assert(_readAheadTaskStatus is ReadAheadTask_CompletionReserved or ReadAheadTask_Completed);
861Debug.Assert(_readAheadTaskStatus is ReadAheadTask_CompletionReserved or ReadAheadTask_Completed);
949Debug.Assert(request.Content is not null);
975Debug.Assert(stream.BytesWritten == 0);
1148Debug.Assert(_allowedReadLineBytes >= 0);
1325Debug.Assert(added);
1379Debug.Assert(source.Length <= _writeBuffer.AvailableLength);
1537Debug.Assert(formatted);
1543Debug.Assert(_writeBuffer.Capacity >= 8);
1651Debug.Assert(!ReadAheadTaskHasStarted);
1652Debug.Assert(_readBuffer.AvailableLength == _readBuffer.Capacity);
1653Debug.Assert(_readBuffer.AvailableLength >= InitialReadBufferSize);
1667Debug.Assert(_readAheadTask == default);
1707Debug.Assert(_readBuffer.ActiveStartOffset == 0);
1708Debug.Assert(_readBuffer.ActiveLength > searchOffset);
1721Debug.Assert(searchOffset == readLength - 1 && _readBuffer.ActiveReadOnlySpan[searchOffset] == '\n');
1738Debug.Assert(buffer.Length > 0);
1794Debug.Assert(_readAheadTask == default, "Read ahead task should have been consumed as part of the headers.");
1812Debug.Assert(_readAheadTask == default, "Read ahead task should have been consumed as part of the headers.");
1833Debug.Assert(_readAheadTask == default, "Read ahead task should have been consumed as part of the headers.");
1840Debug.Assert(_readBuffer.AvailableLength == _readBuffer.Capacity);
1872Debug.Assert(_readAheadTask == default, "Read ahead task should have been consumed as part of the headers.");
1874Debug.Assert(_readBuffer.AvailableLength == _readBuffer.Capacity);
1887Debug.Assert(count <= _readBuffer.ActiveLength);
1907Debug.Assert(destination != null);
1926Debug.Assert(remaining > 0);
1943Debug.Assert(destination != null);
1944Debug.Assert(length > 0);
1962Debug.Assert(_readBuffer.ActiveLength == 0, "HttpConnection's buffer should have been empty.");
2012Debug.Assert(origReadBuffer.Length > 0);
2033Debug.Assert(_currentRequest == null);
2034Debug.Assert(!_inUse);
2041Debug.Assert(_inUse);
2059Debug.Assert(_inUse);
2066Debug.Assert(_currentRequest != null, "Expected the connection to be associated with a request.");
2067Debug.Assert(_writeBuffer.ActiveLength == 0, "Everything in write buffer should have been flushed.");
2102Debug.Assert(_inUse);
2109Debug.Assert(response.Content != null);
2113Debug.Assert(responseStream != null || stream is EmptyReadStream);
2117Debug.Assert(response.RequestMessage == _currentRequest);
2126Debug.Assert(_currentRequest == null);
2133Debug.Assert(!_disposed, "Connection should not be disposed.");
2134Debug.Assert(_currentRequest == null, "Connection should no longer be associated with a request.");
2135Debug.Assert(_readAheadTask == default, "Expected a previous initial read to already be consumed.");
2136Debug.Assert(_readAheadTaskStatus == ReadAheadTask_NotStarted, "Expected SendAsync to reset the read-ahead task status.");
2137Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in connection read buffer.");
2154Debug.Assert(!_detachedFromPool, "Should not be detached from pool unless _connectionClose is true");
System.Net.Http.Json (5)
System.Net.Http.WinHttpHandler (136)
System\Net\Http\WinHttpRequestCallback.cs (30)
51Debug.Assert(state != null, "WinHttpCallback must have a non-null state object");
83Debug.Assert(statusInformationLength == sizeof(int));
110Debug.Assert(
141Debug.Assert(state != null);
142Debug.Assert(state.Handler != null);
143Debug.Assert(state.RequestMessage != null);
157Debug.Assert(state != null, "OnRequestSendRequestComplete: state is null");
167Debug.Assert(state != null, "OnRequestSendRequestComplete: state is null");
168Debug.Assert(state.LifecycleAwaitable != null, "OnRequestSendRequestComplete: LifecycleAwaitable is null");
175Debug.Assert(state != null, "OnRequestDataAvailable: state is null");
182Debug.Assert(state != null, "OnRequestReadComplete: state is null");
204Debug.Assert(state != null, "OnRequestWriteComplete: state is null");
205Debug.Assert(state.TcsInternalWriteDataToRequestStream != null, "TcsInternalWriteDataToRequestStream is null");
206Debug.Assert(!state.TcsInternalWriteDataToRequestStream.Task.IsCompleted, "TcsInternalWriteDataToRequestStream.Task is completed");
213Debug.Assert(state != null, "OnRequestReceiveResponseHeadersComplete: state is null");
214Debug.Assert(state.LifecycleAwaitable != null, "LifecycleAwaitable is null");
221Debug.Assert(state != null, "OnRequestRedirect: state is null");
222Debug.Assert(state.Handler != null, "OnRequestRedirect: state.Handler is null");
223Debug.Assert(state.RequestMessage != null, "OnRequestRedirect: state.RequestMessage is null");
224Debug.Assert(redirectUri != null, "OnRequestRedirect: redirectUri is null");
264Debug.Assert(state != null, "OnRequestSendingRequest: state is null");
265Debug.Assert(state.Handler != null, "OnRequestSendingRequest: state.Handler is null");
266Debug.Assert(state.RequestMessage != null, "OnRequestSendingRequest: state.RequestMessage is null");
267Debug.Assert(state.RequestMessage.RequestUri != null, "OnRequestSendingRequest: state.RequestMessage.RequestUri is null");
345Debug.Assert(ipAddress != null, "AddressFamily is not supported");
440Debug.Assert(state != null, "OnRequestError: state is null");
465Debug.Assert(state.RequestHandle != null, "OnRequestError: state.RequestHandle is null");
506Debug.Assert(state.TcsInternalWriteDataToRequestStream != null);
520Debug.Fail(
531Debug.Assert(requestHandle != null);
System.Net.HttpListener (48)
System\Net\HttpListenerRequestUriBuilder.cs (16)
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.");
122Debug.Assert((type == EncodingType.Primary) || (type == EncodingType.Secondary), $"Unknown 'EncodingType' value: {type}");
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.");
176Debug.Assert(_rawPath != null);
229Debug.Assert(_requestUriString != null);
288Debug.Assert(_rawOctets != null);
365Debug.Assert(uriString != null, "uriString must not be null");
366Debug.Assert(uriString.Length > 0, "uriString must not be empty");
408Debug.Assert((uriString.Length == 1) && (uriString[0] == '*'), "Unknown request Uri string format",
434Debug.Assert(path != null, "'path' must not be null");
System.Net.Mail (63)
System.Net.NameResolution (47)
System.Net.NetworkInformation (24)
System.Net.Ping (9)
System.Net.Primitives (80)
System.Net.Quic (133)
src\runtime\src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (40)
38Debug.Assert(initialBufferSize >= 0);
70Debug.Assert(byteCount >= 0);
71Debug.Assert(byteCount <= ActiveMemory.Length, $"MultiArrayBuffer.Discard: Expected byteCount={byteCount} <= {ActiveMemory.Length}");
112Debug.Assert(toReturn is not null);
120Debug.Assert(byteCount >= 0);
121Debug.Assert(byteCount <= AvailableMemory.Length, $"MultiArrayBuffer.Commit: Expected byteCount={byteCount} <= {AvailableMemory.Length}");
130Debug.Assert(byteCount >= 0);
131Debug.Assert(limit >= 0);
147Debug.Assert(byteCount >= 0);
157Debug.Assert(byteCount > AvailableMemory.Length);
169Debug.Assert(_allocatedEnd == 0);
170Debug.Assert(_activeStart == 0);
171Debug.Assert(_availableStart == 0);
183Debug.Assert(_allocatedEnd % BlockSize == 0);
184Debug.Assert(_allocatedEnd <= _blocks.Length * BlockSize);
220Debug.Assert(_activeStart / BlockSize == 0, $"Start is not in first block after move or resize?? _activeStart={_activeStart}");
225Debug.Assert(_allocatedEnd % BlockSize == 0);
227Debug.Assert(allocatedBlockCount == 0 || _blocks[allocatedBlockCount - 1] is not null);
230Debug.Assert(_blocks[allocatedBlockCount] is null);
237Debug.Assert(byteCount <= AvailableMemory.Length);
247Debug.Assert(_activeStart == 0);
248Debug.Assert(_availableStart == 0);
249Debug.Assert(_allocatedEnd == 0);
253Debug.Assert(_activeStart <= _availableStart);
254Debug.Assert(_availableStart <= _allocatedEnd);
255Debug.Assert(_allocatedEnd <= _blocks.Length * BlockSize);
257Debug.Assert(_allocatedEnd % BlockSize == 0, $"_allocatedEnd={_allocatedEnd} not at block boundary?");
264Debug.Assert(_blocks[i] is null);
269Debug.Assert(_blocks[i] is not null);
274Debug.Assert(_blocks[i] is null);
279Debug.Assert(_activeStart == 0, $"No active bytes but _activeStart={_activeStart}");
307Debug.Assert(blocks is not null);
308Debug.Assert(start <= int.MaxValue);
309Debug.Assert(length <= int.MaxValue);
310Debug.Assert(start + length <= blocks.Length * BlockSize);
349Debug.Assert(_length > 0, "Length should never be 0 here because BlockCount would be 0");
350Debug.Assert(_blocks is not null);
355Debug.Assert(0 <= startInBlock, $"Invalid startInBlock={startInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
356Debug.Assert(startInBlock < endInBlock, $"Invalid startInBlock={startInBlock}, endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
357Debug.Assert(endInBlock <= BlockSize, $"Invalid endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
System.Net.Requests (29)
System.Net.Security (230)
System.Net.ServerSentEvents (19)
System.Net.Sockets (126)
System\Net\Sockets\SocketAsyncContext.Unix.cs (20)
282Debug.Assert(SocketAddress.Length == 0);
438Debug.Assert(ErrorCode == SocketError.Success || AcceptedFileDescriptor == (IntPtr)(-1), $"Unexpected values: ErrorCode={ErrorCode}, AcceptedFileDescriptor={AcceptedFileDescriptor}");
630Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
661Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
668Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}");
686Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
687Debug.Assert(callback != null, "Expected non-null callback");
696Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}");
726Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
753Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
754Debug.Assert(callback != null, "Expected non-null callback");
840Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
989Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1060Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1097Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1192Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1224Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1305Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1377Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
1439Debug.Assert(result is AsyncResult.Pending or AsyncResult.Aborted);
System\Net\Sockets\SocketPal.Unix.cs (37)
68Debug.Assert(fd != (IntPtr)(-1), "fd should not be -1");
89Debug.Assert(fd == (IntPtr)(-1), $"Unexpected fd: {fd}");
107Debug.Assert(!handle.IsSocket);
122Debug.Assert(socket.IsSocket);
146Debug.Assert(socket.IsSocket);
158Debug.Assert(socketAddress.Length != 0 || sockAddr == null);
187Debug.Assert(!handle.IsSocket);
216Debug.Assert(socket.IsSocket);
243Debug.Assert(socket.IsSocket);
287Debug.Assert(socket.IsSocket);
382Debug.Assert(socket.IsSocket);
485Debug.Assert(socket.IsSocket);
501Debug.Assert(socketAddress.Length != 0 || rawSocketAddress == null);
543Debug.Assert(socket.IsSocket);
650Debug.Assert(fd != (IntPtr)(-1), "Expected fd != -1");
673Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}");
747Debug.Assert(err == Interop.Error.EBADF, $"Unexpected err: {err}");
802Debug.Assert(flags == SocketFlags.None);
867Debug.Assert(flags == SocketFlags.None);
868Debug.Assert(buffers == null);
1014Debug.Assert(flags == SocketFlags.None);
1015Debug.Assert(buffers == null);
1568Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName: {optionName}");
1591Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}");
1720Debug.Assert((uint)optionLength <= optionValue.Length);
1739Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}");
1764Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}");
1832Debug.Assert(count > 0, $"Expected at least one entry.");
1915Debug.Assert(refsAdded == 0);
1928Debug.Assert(buffer.Length == socketList.Count);
1974Debug.Assert(eventsLength == checkReadInitialCount + checkWriteInitialCount + checkErrorInitialCount, "Invalid eventsLength");
1984Debug.Assert(offset == eventsLength, $"Invalid adds. offset={offset}, eventsLength={eventsLength}.");
1985Debug.Assert(refsAdded == eventsLength, $"Invalid ref adds. refsAdded={refsAdded}, eventsLength={eventsLength}.");
2023Debug.Assert(refsAdded == 0);
2035Debug.Assert(arrOffset < arrLength, "IList.Count must have been faulty, returning a negative value and/or returning a different value across calls.");
2070Debug.Assert(arrEndOffset >= 0, "IList.Count must have been faulty, returning a negative value and/or returning a different value across calls.");
2122Debug.Assert(elements.Length == fileHandles.Length);
System.Net.WebHeaderCollection (1)
System.Net.WebProxy (1)
System.Net.WebSockets (86)
System\Net\WebSockets\ManagedWebSocket.cs (32)
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)}");
146Debug.Assert(keepAliveInterval == Timeout.InfiniteTimeSpan || keepAliveInterval >= TimeSpan.Zero, $"Invalid {nameof(keepAliveInterval)}: {keepAliveInterval}");
147Debug.Assert(keepAliveTimeout == Timeout.InfiniteTimeSpan || keepAliveTimeout >= TimeSpan.Zero, $"Invalid {nameof(keepAliveTimeout)}: {keepAliveTimeout}");
236Debug.Assert(Monitor.IsEntered(StateUpdateLock), $"Expected {nameof(StateUpdateLock)} to be held");
431Debug.Assert(_sentCloseFrame);
459Debug.Assert(Monitor.IsEntered(StateUpdateLock), $"Expected {nameof(StateUpdateLock)} to be held");
499Debug.Assert(_sendMutex.IsHeld, $"Caller should hold the {nameof(_sendMutex)}");
666Debug.Assert(_sendBuffer != null);
728Debug.Assert(sendBuffer.Length >= MaxMessageHeaderLength, $"Expected {nameof(sendBuffer)} to be at least {MaxMessageHeaderLength}, got {sendBuffer.Length}");
903Debug.Assert(header.Opcode == MessageOpcode.Binary || header.Opcode == MessageOpcode.Text, $"Unexpected opcode {header.Opcode}");
928Debug.Assert(_inflater is not null);
1159Debug.Assert(_receiveMutex.IsHeld, $"Expected {nameof(_receiveMutex)} to be held");
1199Debug.Assert(_receiveMutex.IsHeld, $"Caller should hold the {nameof(_receiveMutex)}");
1303Debug.Assert(_receiveMutex.IsHeld, $"Caller should hold the {nameof(_receiveMutex)}");
1327Debug.Assert(_receiveBufferCount >= 2, "Expected to at least have the first two bytes of the header.");
1345Debug.Assert(_receiveBufferCount >= 2, "Expected to have two bytes for the payload length.");
1351Debug.Assert(_receiveBufferCount >= 8, "Expected to have eight bytes for the payload length.");
1468Debug.Assert(
1574Debug.Assert(count - 2 == encodedLength, $"{nameof(s_textEncoding.GetByteCount)} and {nameof(s_textEncoding.GetBytes)} encoded count didn't match");
1608Debug.Assert(count >= 0, $"Expected non-negative {nameof(count)}, got {count}");
1609Debug.Assert(count <= _receiveBufferCount, $"Trying to consume {count}, which is more than exists {_receiveBufferCount}");
1618Debug.Assert(minimumRequiredBytes <= _receiveBuffer.Length, $"Requested number of bytes {minimumRequiredBytes} must not exceed {_receiveBuffer.Length}");
1657Debug.Assert(_sendBuffer == null); // would only fail if had some catastrophic error previously that prevented cleaning up
1664Debug.Assert(_sendMutex.IsHeld, $"Caller should hold the {nameof(_sendMutex)}");
1684Debug.Assert(maskOffsetIndex < MaskLength, $"Unexpected {nameof(maskOffsetIndex)}: {maskOffsetIndex}");
1685Debug.Assert(mask.Length >= MaskLength + maskOffset, $"Unexpected inputs: {mask.Length}, {maskOffset}");
1696Debug.Assert(maskIndex < sizeof(int));
1807Debug.Assert((b & 0x80) != 0, "Should have already skipped past ASCII");
1915Debug.Assert(task.IsFaulted);
System.Net.WebSockets.Client (6)
System.Numerics.Tensors (427)
System.ObjectModel (4)
System.Private.CoreLib (4932)
parent\parent\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (12)
757Debug.Assert(exInfo._passNumber == 1, "expected asm throw routine to set the pass");
781Debug.Assert(isValid, "RhThrowEx called with an unexpected context");
868Debug.Assert(pCatchHandler != null || pReversePInvokePropagationCallback != IntPtr.Zero || unwoundReversePInvoke || isExceptionIntercepted, "We should have a handler if we're starting the second pass");
869Debug.Assert(!isExceptionIntercepted || (pCatchHandler == null), "No catch handler should be returned for intercepted exceptions in the first pass");
909Debug.Assert(isValid, "second-pass EH unwind failed unexpectedly");
920Debug.Assert(pReversePInvokePropagationCallback != IntPtr.Zero, "Unwound to a reverse P/Invoke in the second pass. We should have a propagation handler.");
921Debug.Assert(frameIter.PreviousTransitionFrame != IntPtr.Zero, "Should have a transition frame for reverse P/Invoke.");
922Debug.Assert(frameIter.SP == handlingFrameSP, "Encountered a different reverse P/Invoke frame in the second pass.");
962Debug.Fail("unreachable");
970Debug.Assert(ip != null, "IP address must not be null");
976Debug.Assert(handlingFrameSP != MaxSP, "Handling frame must have an SP value");
978Debug.Assert(((UIntPtr*)handlingFrameSP) > &handlingFrameSP,
parent\parent\Runtime.Base\src\System\Runtime\TypeCast.cs (46)
98Debug.Assert(pTargetType->IsInterface);
99Debug.Assert(!pTargetType->HasGenericVariance);
187Debug.Assert(!pTargetType->IsParameterizedType, "IsInstanceOfClass called with parameterized MethodTable");
188Debug.Assert(!pTargetType->IsFunctionPointer, "IsInstanceOfClass called with function pointer MethodTable");
189Debug.Assert(!pTargetType->IsInterface, "IsInstanceOfClass called with interface MethodTable");
190Debug.Assert(!pTargetType->HasGenericVariance, "IsInstanceOfClass with variant MethodTable");
198Debug.Assert(obj.GetMethodTable()->IsArray);
301Debug.Assert(result != CastResult.CannotCast);
307Debug.Assert(pTargetType->IsInterface);
308Debug.Assert(!pTargetType->HasGenericVariance);
392Debug.Assert(!pTargetType->IsParameterizedType, "CheckCastClass called with parameterized MethodTable");
393Debug.Assert(!pTargetType->IsFunctionPointer, "CheckCastClass called with function pointer MethodTable");
394Debug.Assert(!pTargetType->IsInterface, "CheckCastClass called with interface MethodTable");
395Debug.Assert(!pTargetType->HasGenericVariance, "CheckCastClass with variant MethodTable");
409Debug.Assert(!pTargetType->IsParameterizedType, "CheckCastClassSpecial called with parameterized MethodTable");
410Debug.Assert(!pTargetType->IsFunctionPointer, "CheckCastClassSpecial called with function pointer MethodTable");
411Debug.Assert(!pTargetType->IsInterface, "CheckCastClassSpecial called with interface MethodTable");
412Debug.Assert(!pTargetType->HasGenericVariance, "CheckCastClassSpecial with variant MethodTable");
415Debug.Assert(mt != pTargetType, "The check for the trivial cases should be inlined by the JIT");
420Debug.Assert(mt->IsArray);
477Debug.Assert(!pDerivedType->IsArray, "did not expect array type");
478Debug.Assert(!pDerivedType->IsParameterizedType, "did not expect parameterType");
479Debug.Assert(!pDerivedType->IsFunctionPointer, "did not expect function pointer");
480Debug.Assert(!pBaseType->IsArray, "did not expect array type");
481Debug.Assert(!pBaseType->IsInterface, "did not expect interface type");
482Debug.Assert(!pBaseType->IsParameterizedType, "did not expect parameterType");
483Debug.Assert(!pBaseType->IsFunctionPointer, "did not expect function pointer");
484Debug.Assert(pBaseType->IsCanonical || pBaseType->IsGenericTypeDefinition, "unexpected MethodTable");
485Debug.Assert(pDerivedType->IsCanonical || pDerivedType->IsGenericTypeDefinition, "unexpected MethodTable");
504Debug.Assert(!pTargetType->IsParameterizedType, "did not expect parameterized type");
505Debug.Assert(!pTargetType->IsFunctionPointer, "did not expect function pointer type");
506Debug.Assert(pTargetType->IsInterface, "IsInstanceOfInterface called with non-interface MethodTable");
535Debug.Assert(pTargetVarianceInfo != null, "did not expect empty variance info");
560Debug.Assert(pInterfaceVarianceInfo != null, "did not expect empty variance info");
564Debug.Assert(targetArity == interfaceArity, "arity mismatch between generic instantiations");
596Debug.Assert(pTargetVarianceInfo != null, "did not expect empty variance info");
602Debug.Assert(pSourceVarianceInfo != null, "did not expect empty variance info");
606Debug.Assert(targetArity == sourceArity, "arity mismatch between generic instantiations");
704Debug.Fail("unknown generic variance type");
720Debug.Assert(array.GetMethodTable()->IsArray, "first argument must be an array");
756Debug.Assert(array is null || array.GetMethodTable()->IsArray, "first argument must be an array");
763Debug.Assert(index >= 0);
788Debug.Assert(array is null || array.GetMethodTable()->IsArray, "first argument must be an array");
794Debug.Assert(index >= 0);
853Debug.Assert(pTargetType->IsArray, "IsInstanceOfArray called with non-array MethodTable");
934Debug.Assert((int)elementType < 32);
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.RuntimeAsyncYielder.cs (1)
27Debug.Assert(
src\runtime\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 is not 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 is not null, "Expected a non-null segment.");
180Debug.Assert(array is not null, "Expected a non-null item array.");
253Debug.Assert(segment is not null, "Expected a non-null segment.");
254Debug.Assert(array is not null, "Expected a non-null item array.");
368Debug.Assert(syncObj is not null, "The syncObj parameter is null.");
390Debug.Assert((size & (size - 1)) == 0, "Size must be a power of 2");
429Debug.Assert(queue is not null, "Expected a non-null queue.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (53)
129Debug.Assert(source._entries is not null);
130Debug.Assert(_entries is not null);
131Debug.Assert(_entries.Length >= source.Count);
132Debug.Assert(_count == 0);
199Debug.Assert(_comparer is not null, "The comparer should never be null for a reference type.");
244Debug.Assert(modified);
251Debug.Assert(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
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");
445Debug.Assert(comparer is not null);
520Debug.Assert(_buckets != null);
523Debug.Assert(entries != null, "expected entries to be non-null");
526Debug.Assert(comparer is not null || typeof(TKey).IsValueType);
568Debug.Assert(comparer is not null);
603Debug.Assert((StartOfFreeList - entries[_freeList].next) >= -1, "shouldn't overflow because `next` cannot underflow");
696Debug.Assert(dictionary is not null);
697Debug.Assert(IsCompatibleKey(dictionary));
731Debug.Assert(dictionary is not null);
739Debug.Assert(IsCompatibleKey(dictionary));
782Debug.Assert(actualKey is not null);
809Debug.Assert(dictionary._entries != null, "expected entries to be != null");
879Debug.Assert(dictionary._entries != null, "entries should be non-null");
906Debug.Assert((StartOfFreeList - dictionary._freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
971Debug.Assert(dictionary._buckets != null);
974Debug.Assert(entries != null, "expected entries to be non-null");
982Debug.Assert(comparer is not null);
1013Debug.Assert((StartOfFreeList - entries[dictionary._freeList].next) >= -1, "shouldn't overflow because `next` cannot underflow");
1052Debug.Assert(!Unsafe.IsNullRef(ref value), "the lookup result cannot be a null ref here");
1085Debug.Assert(dictionary._buckets != null);
1088Debug.Assert(entries != null, "expected entries to be non-null");
1091Debug.Assert(comparer is not null || typeof(TKey).IsValueType);
1124Debug.Assert(comparer is not null);
1150Debug.Assert((StartOfFreeList - entries[dictionary._freeList].next) >= -1, "shouldn't overflow because `next` cannot underflow");
1189Debug.Assert(!Unsafe.IsNullRef(ref value), "the lookup result cannot be a null ref here");
1251Debug.Assert(!forceNewHashCodes || !typeof(TKey).IsValueType);
1252Debug.Assert(_entries != null, "_entries should be non-null");
1253Debug.Assert(HashHelpers.IsPrime(newSize));
1254Debug.Assert(newSize >= _entries.Length);
1263Debug.Assert(_comparer is NonRandomizedStringEqualityComparer);
1307Debug.Assert(_entries != null, "entries should be non-null");
1311Debug.Assert(typeof(TKey).IsValueType || comparer is not null);
1337Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
1369Debug.Assert(comparer is not null);
1385Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
1433Debug.Assert(_entries != null, "entries should be non-null");
1437Debug.Assert(typeof(TKey).IsValueType || comparer is not null);
1465Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
1497Debug.Assert(comparer is not null);
1515Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
1709Debug.Assert(HashHelpers.IsPrime(newSize));
1710Debug.Assert(newSize >= Count);
1728Debug.Assert(_entries is not null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (36)
148Debug.Assert(EffectiveEqualityComparersAreEqual(this, source), "must use identical effective comparers.");
178Debug.Assert(Count == source.Count);
193Debug.Assert(_buckets != null, "_buckets should be non-null");
194Debug.Assert(_entries != null, "_entries should be non-null");
216Debug.Assert(entries != null, "Expected _entries to be initialized");
246Debug.Assert(comparer is not null);
288Debug.Assert(entries != null, "entries should be non-null");
294Debug.Assert(typeof(T).IsValueType || comparer is not null);
318Debug.Assert((StartOfFreeList - _freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
417Debug.Assert(set is not null);
418Debug.Assert(IsCompatibleItem(set));
429Debug.Assert(set is not null);
437Debug.Assert(IsCompatibleItem(set));
453Debug.Assert(set._buckets != null);
456Debug.Assert(entries != null, "expected entries to be non-null");
463Debug.Assert(comparer is not null);
493Debug.Assert((StartOfFreeList - entries[set._freeList].Next) >= -1, "shouldn't overflow because `next` cannot underflow");
540Debug.Assert(entries != null, "entries should be non-null");
565Debug.Assert((StartOfFreeList - set._freeList) < 0, "shouldn't underflow because max hashtable length is MaxPrimeArrayLength = 0x7FEFFFFD(2146435069) _freelist underflow threshold 2147483646");
625Debug.Assert(set._entries != null, "expected entries to be != null");
1268Debug.Assert(_comparer is not null, "The comparer should never be null for a reference type.");
1312Debug.Assert(!forceNewHashCodes || !typeof(T).IsValueType);
1313Debug.Assert(_entries != null, "_entries should be non-null");
1314Debug.Assert(HashHelpers.IsPrime(newSize));
1315Debug.Assert(newSize >= _entries.Length);
1324Debug.Assert(_comparer is NonRandomizedStringEqualityComparer);
1358Debug.Assert(_entries is not null);
1405Debug.Assert(HashHelpers.IsPrime(newSize));
1406Debug.Assert(newSize >= Count);
1460Debug.Assert(_buckets != null);
1463Debug.Assert(entries != null, "expected entries to be non-null");
1499Debug.Assert(comparer is not null);
1527Debug.Assert((StartOfFreeList - entries[_freeList].Next) >= -1, "shouldn't overflow because `next` cannot underflow");
1560Debug.Assert(location >= 0);
1618Debug.Assert(_buckets != null, "_buckets shouldn't be null; callers should check first");
1776Debug.Assert((_buckets != null) && (_count > 0), "_buckets was null but count greater than 0");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (20)
903Debug.Assert(_sRealName != null, "[CultureData.CultureName] Expected _sRealName to be populated by already");
1083Debug.Assert(_sSpecificCulture != null, "[CultureData.SpecificCultureName] Expected this.sSpecificCulture to be populated by culture data initialization already");
1659Debug.Assert(_sWindowsName != null, "[CultureData.CalendarIds] Expected _sWindowsName to be populated by already");
1726Debug.Assert(calendarId > 0 && calendarId <= CalendarId.LAST_CALENDAR,
1750Debug.Assert(_sWindowsName != null, "[CultureData.GetCalendar] Expected _sWindowsName to be populated by already");
1780Debug.Assert(_sRealName != null, "[CultureData.IsRightToLeft] Expected _sRealName to be populated by already");
1804Debug.Assert(_sRealName != null, "[CultureData.TextInfoName] Expected _sRealName to be populated by already");
1816Debug.Assert(_sRealName != null, "[CultureData.SortName] Expected _sRealName to be populated by already");
1889Debug.Assert(_sRealName != null, "[CultureData.LCID] Expected this.sRealName to be populated already");
1932Debug.Assert(calendarId > 0, "[CultureData.saEraNames] Expected Calendar.ID > 0");
1938Debug.Assert(calendarId > 0, "[CultureData.saAbbrevEraNames] Expected Calendar.ID > 0");
1944Debug.Assert(calendarId > 0, "[CultureData.saAbbrevEraNames] Expected Calendar.ID > 0");
2022Debug.Assert(str != null);
2023Debug.Assert(start >= 0);
2024Debug.Assert(end >= 0);
2109Debug.Assert(startIndex >= 0, "startIndex cannot be negative");
2110Debug.Assert(!timeParts.AsSpan().ContainsAny('\'', '\\'), "timeParts cannot include quote characters");
2204Debug.Assert(index >= 10, $"Couldn't read native digits for '{_sWindowsName}' successfully.");
2230Debug.Assert(_sWindowsName != null, "[CultureData.GetNFIValues] Expected _sWindowsName to be populated by already");
2250Debug.Assert(_sRealName != null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (51)
166Debug.Assert(abbreviatedDayNames.Length == 7, "[DateTimeFormatInfo.GetAbbreviatedDayOfWeekNames] Expected 7 day names in a week");
180Debug.Assert(m_superShortDayNames.Length == 7, "[DateTimeFormatInfo.InternalGetSuperShortDayNames] Expected 7 day names in a week");
194Debug.Assert(dayNames.Length == 7, "[DateTimeFormatInfo.GetDayOfWeekNames] Expected 7 day names in a week");
208Debug.Assert(abbreviatedMonthNames.Length == 12 || abbreviatedMonthNames.Length == 13,
223Debug.Assert(monthNames.Length == 12 || monthNames.Length == 13,
237Debug.Assert(cultureData != null);
238Debug.Assert(cal != null);
248Debug.Assert(cultureData != null);
249Debug.Assert(calendarId != CalendarId.UNINITIALIZED_VALUE, "[DateTimeFormatInfo.Populate] Expected initialized calendarId");
266Debug.Assert(allLongTimePatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some long time patterns");
269Debug.Assert(allShortTimePatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some short time patterns");
272Debug.Assert(allLongDatePatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some long date patterns");
275Debug.Assert(allShortDatePatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some short date patterns");
278Debug.Assert(allYearMonthPatterns.Length > 0, "[DateTimeFormatInfo.Populate] Expected some year month patterns");
345Debug.Assert(amDesignator != null, "DateTimeFormatInfo.AMDesignator, amDesignator != null");
364Debug.Assert(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
374Debug.Assert(calendar != null, "DateTimeFormatInfo.Calendar: calendar != null");
578Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.AbbreviatedEnglishEraNames] Expected Calendar.ID > 0");
594Debug.Assert(dateSeparator != null, "DateTimeFormatInfo.DateSeparator, dateSeparator != null");
613Debug.Assert(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
627Debug.Assert(firstDayOfWeek != -1, "DateTimeFormatInfo.FirstDayOfWeek, firstDayOfWeek != -1");
659Debug.Assert(calendarWeekRule != -1, "DateTimeFormatInfo.CalendarWeekRule, calendarWeekRule != -1");
773Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.MonthDayPattern] Expected calID > 0");
777Debug.Assert(monthDayPattern != null, "DateTimeFormatInfo.MonthDayPattern, monthDayPattern != null");
797Debug.Assert(pmDesignator != null, "DateTimeFormatInfo.PMDesignator, pmDesignator != null");
816Debug.Assert(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
979Debug.Assert(timeSeparator != null, "DateTimeFormatInfo.TimeSeparator, timeSeparator != null");
998Debug.Assert(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1042Debug.Assert(values != null, "value != null");
1043Debug.Assert(values.Length >= length);
1201Debug.Assert(m_genitiveAbbreviatedMonthNames.Length == 13,
1211Debug.Assert(genitiveMonthNames.Length == 13,
1227Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.InternalGetLeapYearMonthNames] Expected Calendar.ID > 0");
1229Debug.Assert(leapYearMonthNames.Length == 13,
1268Debug.Assert(patterns1 != null);
1269Debug.Assert(patterns2 != null);
1371Debug.Assert(patterns != null && patterns.Length > 0,
1373Debug.Assert(defaultPattern != null,
1449Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.UnclonedYearMonthPatterns] Expected Calendar.ID > 0");
1451Debug.Assert(allYearMonthPatterns.Length > 0,
1470Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.UnclonedShortDatePatterns] Expected Calendar.ID > 0");
1472Debug.Assert(allShortDatePatterns.Length > 0,
1491Debug.Assert(Calendar.ID > 0, "[DateTimeFormatInfo.UnclonedLongDatePatterns] Expected Calendar.ID > 0");
1493Debug.Assert(allLongDatePatterns.Length > 0,
1513Debug.Assert(allShortTimePatterns.Length > 0,
1533Debug.Assert(allLongTimePatterns.Length > 0,
1698Debug.Assert(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2251Debug.Assert(state == HebrewNumberParsingState.ContinueParsing || state == HebrewNumberParsingState.FoundEndOfHebrewNumber,
2300Debug.Assert(str.Index < str.Value.Length, "DateTimeFormatInfo.Tokenize(): start < value.Length");
2418Debug.Fail("The hashtable is full. This should not happen.");
2502Debug.Fail("The hashtable is full. This should not happen.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (14)
214Debug.Assert(input.Length > 0);
262Debug.Assert(unicode.Length >= 1, "[IdnMapping.GetAscii] Expected 0 length strings to fail before now.");
296Debug.Assert(unicode.Length >= 1, "[IdnMapping.GetAscii] Expected 0 length strings to fail before now.");
476Debug.Assert(!char.IsLowSurrogate(unicode[basicCount]), "[IdnMapping.punycode_encode]Unexpected low surrogate");
553Debug.Assert(delta > 0, "[IdnMapping.cs]1 punycode_encode - delta overflowed int");
567Debug.Assert(delta > 0, "[IdnMapping.cs]2 punycode_encode - delta overflowed int");
578Debug.Assert(c_punycodeBase != t, "[IdnMapping.punycode_encode]Expected c_punycodeBase (36) to be != t");
597Debug.Assert(delta > 0, "[IdnMapping.cs]3 punycode_encode - delta overflowed int");
837Debug.Assert(w > 0, "[IdnMapping.punycode_decode]Expected w > 0");
845Debug.Assert(c_punycodeBase != t, "[IdnMapping.punycode_decode]Expected t != c_punycodeBase (36)");
855Debug.Assert((output.Length - iOutputAfterLastDot - numSurrogatePairs) + 1 > 0,
979Debug.Assert(numpoints != 0, "[IdnMapping.adapt]Expected non-zero numpoints.");
987Debug.Assert(delta + c_skew != 0, "[IdnMapping.adapt]Expected non-zero delta+skew.");
1012Debug.Assert(d >= 0 && d < c_punycodeBase, "[IdnMapping.encode_digit]Expected 0 <= d < punycodeBase");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (27)
53Debug.Assert(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
111Debug.Assert(format == StandardFormat.C || format == StandardFormat.G || format == StandardFormat.g);
127Debug.Assert(ticks == long.MinValue /* -9223372036854775808 */);
144Debug.Assert(fraction < 10_000_000);
152Debug.Assert(decimalSeparator.IsEmpty);
167Debug.Assert(format == StandardFormat.g);
182Debug.Assert(seconds < 60);
190Debug.Assert(minutes < 60);
194Debug.Assert(totalHoursRemaining <= uint.MaxValue);
201Debug.Assert(hours < 24);
216Debug.Assert(dayDigits <= 8);
253Debug.Assert(hourDigits == 1 || hourDigits == 2);
338Debug.Assert(pos + suffixLen == requiredOutputLength);
347Debug.Assert(dtfi != null);
578Debug.Assert(field >= 0 && field <= 5);
595Debug.Fail("Unexpected special token '%', Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
607Debug.Assert((field == 0 && sb.Length == 0) || field == 1, "field == 0 || field == 1, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
615Debug.Assert((field == 1 && sb.Length == 0) || field == 2, "field == 1 || field == 2, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
623Debug.Assert((field == 2 && sb.Length == 0) || field == 3, "field == 2 || field == 3, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
631Debug.Assert((field == 3 && sb.Length == 0) || field == 4, "field == 3 || field == 4, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
640Debug.Assert((field == 4 && sb.Length == 0) || field == 5, "field == 4 || field == 5, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
653Debug.Assert(field == 5);
656Debug.Assert(0 < dd && dd < 3, "0 < dd && dd < 3, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
657Debug.Assert(0 < hh && hh < 3, "0 < hh && hh < 3, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
658Debug.Assert(0 < mm && mm < 3, "0 < mm && mm < 3, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
659Debug.Assert(0 < ss && ss < 3, "0 < ss && ss < 3, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
660Debug.Assert(0 < ff && ff < 8, "0 < ff && ff < 8, Bug in System.Globalization.DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\BufferedStream.cs (84)
92Debug.Assert(_stream != null);
100Debug.Assert(_stream != null);
108Debug.Assert(_stream != null);
116Debug.Assert(_buffer != null);
117Debug.Assert(_bufferSize > 0);
132Debug.Assert(_bufferSize > 0);
199Debug.Assert(!(_writePos > 0 && _readPos != _readLen), "Read and Write buffers cannot both have data in them at the same time.");
270Debug.Assert(_writePos == 0 && _readPos == 0 && _readLen == 0);
292Debug.Assert(_writePos == 0 && (!_stream.CanSeek || (_readPos == 0 && _readLen == 0)));
315Debug.Assert(_stream != null);
323Debug.Assert(_writePos == 0 && _readPos == 0 && _readLen == 0);
344Debug.Assert(_writePos == 0 && (!_stream.CanSeek || (_readPos == 0 && _readLen == 0)));
353Debug.Assert(_writePos == 0 && _readPos == _readLen);
367Debug.Assert(_stream != null);
368Debug.Assert(_writePos == 0, "BufferedStream: Write buffer must be empty in FlushRead!");
382Debug.Assert(_stream != null);
383Debug.Assert(_readPos <= _readLen, $"_readPos <= _readLen [{_readPos} <= {_readLen}]");
393Debug.Assert(_readPos < _readLen);
406Debug.Assert(_stream != null);
407Debug.Assert(_readPos == 0 && _readLen == 0,
409Debug.Assert(_buffer != null && _bufferSize >= _writePos,
419Debug.Assert(_stream != null);
420Debug.Assert(_readPos == 0 && _readLen == 0,
422Debug.Assert(_buffer != null && _bufferSize >= _writePos,
433Debug.Assert(readbytes >= 0);
449Debug.Assert(readbytes >= 0);
477Debug.Assert(_stream != null);
499Debug.Assert(_readLen == _readPos, "The read buffer must now be empty");
532Debug.Assert(_stream != null);
549Debug.Assert(_readLen == _readPos, "The read buffer must now be empty");
675Debug.Assert(_stream != null);
676Debug.Assert(_stream.CanRead);
677Debug.Assert(_bufferSize > 0);
678Debug.Assert(_asyncActiveSemaphore != null);
679Debug.Assert(semaphoreLockTask != null);
699Debug.Assert(_readLen == _readPos);
742Debug.Assert(_readPos == _readLen);
751Debug.Assert(_stream != null);
798Debug.Assert(_stream != null);
863Debug.Assert(_writePos < _bufferSize);
880Debug.Assert(count == 0);
884Debug.Assert(count >= 0);
885Debug.Assert(_writePos == _bufferSize);
886Debug.Assert(_buffer != null);
893Debug.Assert(count == 0);
894Debug.Assert(_writePos < _bufferSize);
901Debug.Assert(_buffer != null);
902Debug.Assert(totalUserbytes >= _bufferSize);
927Debug.Assert(_stream != null);
933Debug.Assert(_writePos < _bufferSize, $"Expected {_writePos} < {_bufferSize}");
952Debug.Assert(bytesWritten == buffer.Length);
957Debug.Assert(_writePos == _bufferSize);
958Debug.Assert(_buffer != null);
966Debug.Assert(bytesWritten == buffer.Length);
968Debug.Assert(_writePos < _bufferSize);
975Debug.Assert(_buffer != null);
976Debug.Assert(totalUserbytes >= _bufferSize);
1028Debug.Assert(_writePos < _bufferSize);
1035Debug.Assert(bytesWritten == buffer.Length);
1058Debug.Assert(_stream != null);
1059Debug.Assert(_stream.CanWrite);
1060Debug.Assert(_bufferSize > 0);
1061Debug.Assert(_asyncActiveSemaphore != null);
1062Debug.Assert(semaphoreLockTask != null);
1091Debug.Assert(buffer.Length == 0);
1095Debug.Assert(buffer.Length >= 0);
1096Debug.Assert(_writePos == _bufferSize);
1097Debug.Assert(_buffer != null);
1103Debug.Assert(bytesWritten == buffer.Length);
1105Debug.Assert(_writePos < _bufferSize);
1113Debug.Assert(_buffer != null);
1114Debug.Assert(totalUserBytes >= _bufferSize);
1172Debug.Assert(_stream != null);
1179Debug.Assert(_writePos < _bufferSize);
1186Debug.Assert(_stream != null);
1207Debug.Assert(oldPos == _stream.Position + (_readPos - _readLen));
1229Debug.Assert(newPos == Position, $"newPos (={newPos}) == Position (={Position})");
1241Debug.Assert(_stream != null);
1252Debug.Assert(_stream != null);
1255Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}");
1260Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer");
1287Debug.Assert(_stream != null);
1294Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}");
1299Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer");
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (40)
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!");
254Debug.Assert(_readPos == _readLen);
301Debug.Assert(!_strategy.IsClosed, "FileStream ensures that strategy is not closed");
302Debug.Assert((_readPos == 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 && _readPos <= _readLen),
352Debug.Assert(!_strategy.CanSeek);
380Debug.Assert(_writePos == 0, "Win32FileStream must not have buffered write data here! Pipes should be unidirectional.");
394Debug.Assert(_asyncActiveSemaphore != null);
395Debug.Assert(_strategy.CanSeek);
428Debug.Assert(_readLen == _readPos, "The read buffer must now be empty");
519Debug.Assert(_writePos == 0, "FlushWrite must set _writePos to 0");
525Debug.Assert(_writePos == 0, "FileStream cannot have buffered data to write here! Your stream will be corrupted.");
576Debug.Assert(_writePos <= _bufferSize);
599Debug.Assert(!_strategy.IsClosed, "FileStream ensures that strategy is not closed");
600Debug.Assert((_readPos == 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 && _readPos <= _readLen),
602Debug.Assert(_strategy.CanSeek || (_readPos == 0 && _readLen == 0),
661Debug.Assert(!_strategy.CanSeek);
678Debug.Assert(_asyncActiveSemaphore != null);
679Debug.Assert(_strategy.CanSeek);
723Debug.Assert(_writePos == 0, "FileStream cannot have buffered data to write here! Your stream will be corrupted.");
760Debug.Assert(!_strategy.IsClosed, "FileStream responsibility");
761Debug.Assert((_readPos == 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 && _readPos <= _readLen),
782Debug.Assert(_writePos == 0 && (!_strategy.CanSeek || (_readPos == 0 && _readLen == 0)));
806Debug.Assert(_writePos == 0 && _readPos == 0 && _readLen == 0);
821Debug.Assert(_writePos == 0 && (!_strategy.CanSeek || (_readPos == 0 && _readLen == 0)));
826Debug.Assert(_writePos == 0 && _readPos == _readLen);
851Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}");
856Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer");
882Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}");
887Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer");
919Debug.Assert(oldPos == _strategy.Position + (_readPos - _readLen));
941Debug.Assert(newPos == Position, $"newPos (={newPos}) == Position (={Position})");
954Debug.Assert(_writePos == 0, "Write buffer must be empty in FlushRead!");
967Debug.Assert(_readPos == 0 && _readLen == 0, "Read buffer must be empty in FlushWrite!");
968Debug.Assert(_buffer != null && _bufferSize >= _writePos, "Write buffer must be allocated and write position must be in the bounds of the buffer in FlushWrite!");
979Debug.Assert(_readPos <= _readLen, $"_readPos <= _readLen [{_readPos} <= {_readLen}]");
989Debug.Assert(_readPos < _readLen);
1043Debug.Assert(!_strategy.IsClosed, "FileStream ensures that strategy is not closed");
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (34)
125Debug.Assert(this is NullStreamReader);
491Debug.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?");
500Debug.Assert(_byteLen >= 2, "Caller should've validated that at least 2 bytes were available.");
578Debug.Assert(_checkPreamble);
581Debug.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?");
595Debug.Assert(_bytePos <= preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
626Debug.Assert(_bytePos <= _encoding.Preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
628Debug.Assert(len >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
640Debug.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?");
642Debug.Assert(_byteLen >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
671Debug.Assert(_charPos == 0 && _charLen == 0, "We shouldn't be trying to decode more data if we made progress in an earlier iteration.");
681Debug.Assert(_charPos == 0 && _charLen == 0, "We shouldn't be looking for EOF unless we have an empty char buffer.");
726Debug.Assert(charsRead == 0);
730Debug.Assert(_bytePos <= _encoding.Preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
732Debug.Assert(len >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
744Debug.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?");
746Debug.Assert(_byteLen >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
778Debug.Assert(charsRead == 0 && _charPos == 0 && _charLen == 0, "We shouldn't be trying to decode more data if we made progress in an earlier iteration.");
796Debug.Assert(charsRead == 0 && _charPos == 0 && _charLen == 0, "We shouldn't be looking for EOF unless we have an empty char buffer.");
841Debug.Assert(!charBufferSpan.IsEmpty, "ReadBuffer returned > 0 but didn't bump _charLen?");
951Debug.Assert(charPos < charLen, "ReadBuffer returned > 0 but didn't bump _charLen?");
1169Debug.Assert(n == 0);
1173Debug.Assert(_bytePos <= _encoding.Preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
1176Debug.Assert(len >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
1197Debug.Assert(n == 0);
1209Debug.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?");
1213Debug.Assert(_byteLen >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
1245Debug.Assert(n == 0);
1387Debug.Assert(_bytePos <= _encoding.Preamble.Length, "possible bug in _compressPreamble. Are two threads using this StreamReader at the same time?");
1390Debug.Assert(len >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
1402Debug.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?");
1404Debug.Assert(_byteLen >= 0, "Stream.Read returned a negative number! Bug in stream class.");
1433Debug.Assert(_charPos == 0 && _charLen == 0, "We shouldn't be trying to decode more data if we made progress in an earlier iteration.");
1443Debug.Assert(_charPos == 0 && _charLen == 0, "We shouldn't be looking for EOF unless we have an empty char buffer.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (24)
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");
112Debug.Assert(_mediator.NeutralResourcesCulture != null);
128Debug.Assert(a != null, "assembly != null");
154Debug.Fail(CoreLib.Name + "'s NeutralResourcesLanguageAttribute is a malformed culture name! name: \"" + attr.CultureName + "\" Exception: " + e);
168Debug.Assert(store != null, "I need a Stream!");
208Debug.Assert(_mediator.MainAssembly != null);
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");
357Debug.Assert(_mediator.MainAssembly != null);
392Debug.Assert(readerTypeName != null, "readerTypeName shouldn't be null; check caller");
393Debug.Assert(resSetTypeName != null, "resSetTypeName shouldn't be null; check caller");
419Debug.Assert(_mediator.MainAssembly != null);
427Debug.Assert(_mediator.NeutralResourcesCulture != null);
462Debug.Assert(_mediator.BaseName != null);
467Debug.Fail("Couldn't get " + CoreLib.Name + ResourceManager.ResFileExtension + " from " + CoreLib.Name + "'s assembly" + Environment.NewLineConst + Environment.NewLineConst + "Are you building the runtime on your machine? Chances are the BCL directory didn't build correctly. Type 'build -c' in the BCL directory. If you get build errors, look at buildd.log. If you then can't figure out what's wrong (and you aren't changing the assembly-related metadata code), ask a BCL dev.\n\nIf you did NOT build the runtime, you shouldn't be seeing this and you've found a bug.");
473Debug.Assert(_mediator.MainAssembly != null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (32)
46Debug.Assert(value >= 0, "negative ResourceTypeCode. What?");
191Debug.Assert(index >= 0 && index < _numResources, $"Bad index into hash array. index: {index}");
195Debug.Assert(_nameHashes != null && _nameHashesPtr == null, "Internal state mangled.");
200Debug.Assert(_nameHashes == null && _nameHashesPtr != null, "Internal state mangled.");
207Debug.Assert(index >= 0 && index < _numResources, $"Bad index into name position array. index: {index}");
211Debug.Assert(_namePositions != null && _namePositionsPtr == null, "Internal state mangled.");
216Debug.Assert(_namePositions == null && _namePositionsPtr != null, "Internal state mangled.");
252Debug.Assert(_store != null, "ResourceReader is closed!");
333Debug.Assert(_store != null, "ResourceReader is closed!");
334Debug.Assert(Monitor.IsEntered(this)); // uses _store
376Debug.Assert(_store != null, "ResourceReader is closed!");
447Debug.Assert(_store != null, "ResourceReader is closed!");
471Debug.Assert(_store != null, "ResourceReader is closed!");
533Debug.Assert(_store != null, "ResourceReader is closed!");
534Debug.Assert(_version == 1, ".resources file was not a V1 .resources file!");
535Debug.Assert(Monitor.IsEntered(this)); // uses _store
555Debug.Assert(Monitor.IsEntered(this)); // uses _store
615Debug.Assert(_store != null, "ResourceReader is closed!");
616Debug.Assert(_version >= 2, ".resources file was not a V2 (or higher) .resources file!");
617Debug.Assert(Monitor.IsEntered(this)); // uses _store
637Debug.Assert(Monitor.IsEntered(this)); // uses _store
723Debug.Assert(r == len, "ResourceReader needs to use a blocking read here. (Call _store.ReadBytes(len)?)");
775Debug.Assert(!Monitor.IsEntered(this)); // only called during init
776Debug.Assert(_store != null, "ResourceReader is closed!");
798Debug.Assert(!Monitor.IsEntered(this)); // only called during init
987Debug.Assert(Monitor.IsEntered(this)); // uses _store
995Debug.Assert(_typeTable[typeIndex] != null, "Should have found a type!");
1026Debug.Assert(typeCode >= 0, "can't be negative");
1027Debug.Assert(Monitor.IsEntered(this)); // uses _store
1031Debug.Assert(!string.Equals(typeCode.ToString(), "LastPrimitive"), "Change ResourceTypeCode metadata order so LastPrimitive isn't what Enum.ToString prefers.");
1037Debug.Assert(typeIndex >= 0 && typeIndex < _typeTable.Length, "TypeCode is broken or corrupted!");
1111Debug.Assert(!Monitor.IsEntered(_reader));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs (16)
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.");
144Debug.Fail("Throw() should have thrown");
155Debug.Fail("Throw() should have thrown");
160Debug.Fail("There should be exceptions if we're Faulted.");
198Debug.Assert(stateMachineBox != null);
245Debug.Assert(task != null, "Need a task to wait on");
246Debug.Assert(continuation != null, "Need a continuation to invoke when the wait completes");
326Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
394Debug.Assert(task != null, "Constructing an awaitable requires a task to await.");
422Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
423Debug.Assert((options & ~(ConfigureAwaitOptions.ContinueOnCapturedContext | ConfigureAwaitOptions.SuppressThrowing | ConfigureAwaitOptions.ForceYielding)) == 0);
504Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
505Debug.Assert((options & ~(ConfigureAwaitOptions.ContinueOnCapturedContext | ConfigureAwaitOptions.ForceYielding)) == 0);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\RuntimeInformation.Unix.cs (1)
43Debug.Assert(osArch >= 0);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (18)
39Debug.Assert((uint)value <= 127);
75Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(char));
99Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(char));
141Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(char));
209Debug.Assert(searchSpaceLength >= Vector128<short>.Count);
236Debug.Assert(searchSpaceLength >= Vector128<short>.Count);
343Debug.Assert(searchSpaceLength >= Vector256<short>.Count, "We expect that the input is long enough for us to load a whole vector.");
396Debug.Assert(searchSpaceLength >= Vector128<short>.Count, "We expect that the input is long enough for us to load a whole vector.");
475Debug.Assert(searchSpaceLength >= Vector256<short>.Count, "We expect that the input is long enough for us to load a whole vector.");
526Debug.Assert(searchSpaceLength >= Vector128<short>.Count, "We expect that the input is long enough for us to load a whole vector.");
625Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128.");
674Debug.Assert(searchSpaceLength >= sizeof(ulong), "We expect that the input is long enough for us to load a ulong.");
750Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128.");
799Debug.Assert(searchSpaceLength >= sizeof(ulong), "We expect that the input is long enough for us to load a ulong.");
897Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128.");
949Debug.Assert(searchSpaceLength >= sizeof(ulong), "We expect that the input is long enough for us to load a ulong.");
1025Debug.Assert(searchSpaceLength >= Vector128<byte>.Count, "We expect that the input is long enough for us to load a Vector128.");
1077Debug.Assert(searchSpaceLength >= sizeof(ulong), "We expect that the input is long enough for us to load a ulong.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (63)
86Debug.Fail("Vector<T> is unexpected size.");
98Debug.Fail("Vector<T> is unexpected size.");
104Debug.Fail("Vector<T> is greater than 512 bits in size?");
207Debug.Assert(searchSpaceLength >= 0);
208Debug.Assert(valueLength >= 0);
220Debug.Assert(0 <= index && index <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
249Debug.Assert(length >= 0);
255Debug.Assert(value is not null);
320Debug.Assert(length >= 0);
325Debug.Assert(value is not null);
419Debug.Assert(length >= 0);
425Debug.Assert(value0 is not null && value1 is not null);
544Debug.Assert(length >= 0);
550Debug.Assert(value0 is not null && value1 is not null && value2 is not null);
669Debug.Assert(searchSpaceLength >= 0);
670Debug.Assert(valueLength >= 0);
738Debug.Assert(searchSpaceLength >= 0);
739Debug.Assert(valueLength >= 0);
757Debug.Assert(0 <= index && index <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
784Debug.Assert(length >= 0);
788Debug.Assert(value is not null);
876Debug.Assert(length >= 0);
881Debug.Assert(value0 is not null && value1 is not null);
1000Debug.Assert(length >= 0);
1005Debug.Assert(value0 is not null && value1 is not null && value2 is not null);
1124Debug.Assert(searchSpaceLength >= 0);
1125Debug.Assert(valueLength >= 0);
1179Debug.Assert(length >= 0, "Expected non-negative length");
1194Debug.Assert(length >= 0, "Expected non-negative length");
1209Debug.Assert(length >= 0, "Expected non-negative length");
1225Debug.Assert(length >= 0, "Expected non-negative length");
1241Debug.Assert(length >= 0, "Expected non-negative length");
1259Debug.Assert(length >= 0, "Expected non-negative length");
1277Debug.Assert(length >= 0, "Expected non-negative length");
1296Debug.Assert(length >= 0, "Expected non-negative length");
1315Debug.Assert(length >= 0);
1442Debug.Assert(firstLength >= 0);
1443Debug.Assert(secondLength >= 0);
1474Debug.Assert(length >= 0, "Expected non-negative length");
1475Debug.Assert(value is byte or short or int or long, "Expected caller to normalize to one of these types");
1661Debug.Assert(length >= 0, "Expected non-negative length");
1662Debug.Assert(value is byte or short or int or long, "Expected caller to normalize to one of these types");
1895Debug.Assert(length >= 0, "Expected non-negative length");
1896Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2136Debug.Assert(length >= 0, "Expected non-negative length");
2137Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2362Debug.Assert(length >= 0, "Expected non-negative length");
2363Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2535Debug.Assert(length >= 0, "Expected non-negative length");
2536Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
2711Debug.Assert(length >= 0, "Expected non-negative length");
2712Debug.Assert(value is byte or short or int or long, "Expected caller to normalize to one of these types");
2855Debug.Assert(length >= 0, "Expected non-negative length");
2856Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
3072Debug.Assert(length >= 0, "Expected non-negative length");
3073Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
3289Debug.Assert(length >= 0, "Expected non-negative length");
3290Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
3436Debug.Assert(oldValue is not null);
3466Debug.Assert(Vector128.IsHardwareAccelerated && Vector128<T>.IsSupported, "Vector128 is not HW-accelerated or not supported");
3523Debug.Assert(Vector512.IsHardwareAccelerated && Vector512<T>.IsSupported, "Vector512 is not HW-accelerated or not supported");
3561Debug.Assert(length >= 0, "Expected non-negative length");
3562Debug.Assert(value0 is byte or short or int or long, "Expected caller to normalize to one of these types");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (71)
57Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
84Debug.Assert((mask != 0) ? index < 16 : index >= 16);
161Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
165Debug.Assert((nuint)pBuffer % Vector512.Size == 0, "Vector read should be aligned.");
197Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
201Debug.Assert((nuint)pBuffer % Vector256.Size == 0, "Vector read should be aligned.");
233Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
237Debug.Assert((nuint)pBuffer % Vector128.Size == 0, "Vector read should be aligned.");
338Debug.Assert(!AllBytesInUInt32AreAscii(currentUInt32), "Shouldn't have reached this point if we have an all-ASCII input.");
353Debug.Assert(sseMask != uint.MaxValue);
354Debug.Assert(Sse2.IsSupported);
361Debug.Assert(advSimdIndex != uint.MaxValue);
362Debug.Assert(AdvSimd.IsSupported);
373Debug.Assert(Sse2.IsSupported || AdvSimd.Arm64.IsSupported, "Sse2 or AdvSimd64 required.");
374Debug.Assert(BitConverter.IsLittleEndian, "This SSE2/Arm64 implementation assumes little-endian.");
601Debug.Assert(ContainsNonAsciiByte_Sse2(currentSseMask), "Shouldn't be here unless we see non-ASCII data.");
606Debug.Assert(ContainsNonAsciiByte_AdvSimd(currentAdvSimdIndex), "Shouldn't be here unless we see non-ASCII data.");
619Debug.Assert(!AllBytesInUInt32AreAscii(currentDWord), "Shouldn't be here unless we see non-ASCII data.");
630Debug.Assert(bufferLength < SizeOfVector128);
761Debug.Assert(bufferLength <= nuint.MaxValue / sizeof(char));
786Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
790Debug.Assert((nuint)pBuffer % Vector512.Size == 0, "Vector read should be aligned.");
822Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
826Debug.Assert((nuint)pBuffer % Vector256.Size == 0, "Vector read should be aligned.");
857Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
861Debug.Assert((nuint)pBuffer % Vector128.Size == 0, "Vector read should be aligned.");
940Debug.Assert(totalNumBytesRead % sizeof(char) == 0, "Total number of bytes read should be even since we're working with chars.");
945Debug.Assert(!AllCharsInUInt32AreAscii(currentUInt32), "Shouldn't have reached this point if we have an all-ASCII input.");
974Debug.Assert(Sse2.IsSupported || AdvSimd.Arm64.IsSupported, "Should've been checked by caller.");
975Debug.Assert(BitConverter.IsLittleEndian, "This SSE2/Arm64 assumes little-endian.");
991Debug.Assert(bufferLength <= nuint.MaxValue / sizeof(char));
1100Debug.Assert(((nuint)pBuffer - (nuint)pOriginalBuffer) % 2 == 0, "Shouldn't have incremented any pointer by an odd byte count.");
1143Debug.Assert(currentMask != 0, "Shouldn't be here unless we see non-ASCII data.");
1168Debug.Assert(!AllCharsInUInt32AreAscii(currentDWord), "Shouldn't be here unless we see non-ASCII data.");
1186Debug.Assert(bufferLength < SizeOfVector128InChars);
1271Debug.Assert(AllCharsInUInt64AreAscii(value));
1326Debug.Assert(AllCharsInUInt32AreAscii(value));
1392Debug.Assert(currentOffset <= elementCount);
1508Debug.Assert(!AllCharsInUInt32AreAscii(utf16Data32BitsHigh), "Shouldn't have reached this point if we have an all-ASCII input.");
1605Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
1616Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
1640Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
1658Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
1726Debug.Assert(Vector128.IsHardwareAccelerated, "Vector128 is required.");
1727Debug.Assert(BitConverter.IsLittleEndian, "This implementation assumes little-endian.");
1728Debug.Assert(elementCount >= 2 * SizeOfVector128);
1779Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= SizeOfVector128, "We wrote at least 1 byte but no more than a whole vector.");
1780Debug.Assert(currentOffsetInElements <= elementCount, "Shouldn't have overrun the destination buffer.");
1781Debug.Assert(elementCount - currentOffsetInElements >= SizeOfVector128, "We should be able to run at least one whole vector.");
1799Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % SizeOfVector128 == 0, "Write should be aligned.");
1822Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % sizeof(ulong) == 0, "Destination should be ulong-aligned.");
1844Debug.Assert(Vector256.IsHardwareAccelerated, "Vector256 is required.");
1845Debug.Assert(BitConverter.IsLittleEndian, "This implementation assumes little-endian.");
1846Debug.Assert(elementCount >= 2 * Vector256.Size);
1896Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= Vector256.Size, "We wrote at least 1 byte but no more than a whole vector.");
1897Debug.Assert(currentOffsetInElements <= elementCount, "Shouldn't have overrun the destination buffer.");
1898Debug.Assert(elementCount - currentOffsetInElements >= Vector256.Size, "We should be able to run at least one whole vector.");
1916Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector256.Size == 0, "Write should be aligned.");
1939Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector128.Size == 0, "Destination should be 128-bit-aligned.");
1961Debug.Assert(Vector512.IsHardwareAccelerated, "Vector512 is required.");
1962Debug.Assert(BitConverter.IsLittleEndian, "This implementation assumes little-endian.");
1963Debug.Assert(elementCount >= 2 * Vector512.Size);
2014Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= Vector512.Size, "We wrote at least 1 byte but no more than a whole vector.");
2015Debug.Assert(currentOffsetInElements <= elementCount, "Shouldn't have overrun the destination buffer.");
2016Debug.Assert(elementCount - currentOffsetInElements >= Vector512.Size, "We should be able to run at least one whole vector.");
2034Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector512.Size == 0, "Write should be aligned.");
2057Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % Vector256.Size == 0, "Destination should be 256-bit-aligned.");
2095Debug.Assert(currentOffset <= elementCount);
2167Debug.Assert(!AllBytesInUInt32AreAscii(asciiData), "Shouldn't have reached this point if we have an all-ASCII input.");
2266Debug.Assert(typeof(TVectorByte) == typeof(Vector128<byte>));
2280Debug.Assert(AllBytesInUInt32AreAscii(value));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\ASCIIEncoding.cs (14)
157Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
158Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
350Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
351Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
352Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
353Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
409Debug.Assert(idx <= numElementsToConvert, "Somehow went beyond bounds of source or destination buffer?");
499Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
500Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
641Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
642Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
643Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
644Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
697Debug.Assert(idx <= numElementsToConvert, "Somehow went beyond bounds of source or destination buffer?");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (73)
76Debug.Fail("This should be overridden by a subclassed type.");
82Debug.Fail("This should be overridden by a subclassed type.");
114Debug.Fail("This should be overridden by a subclassed type.");
124Debug.Assert(encoder != null, "This code path should only be called from EncoderNLS.");
125Debug.Assert(charCount >= 0, "Caller should've checked this condition.");
126Debug.Assert(pChars != null || charCount == 0, "Cannot provide a null pointer and a non-zero count.");
207Debug.Fail("This should be overridden by a subclassed type.");
232Debug.Assert(0 <= charsConsumedSoFar && charsConsumedSoFar < originalCharCount, "Invalid arguments provided to method.");
258Debug.Assert(encoder != null, "This code path should only be called from EncoderNLS.");
259Debug.Assert(0 <= charsConsumedSoFar && charsConsumedSoFar <= originalCharCount, "Caller should've checked this condition.");
313Debug.Assert(!chars.IsEmpty, "Caller shouldn't invoke this method with an empty input buffer.");
314Debug.Assert(originalCharsLength >= 0, "Caller provided invalid parameter.");
348Debug.Assert(byteCountThisIteration >= 0, "Fallback shouldn't have returned a negative value.");
349Debug.Assert(charsConsumedThisIteration >= 0, "Fallback shouldn't have returned a negative value.");
371Debug.Assert(byteCountThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
372Debug.Assert(charsConsumedThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
386Debug.Assert(fallbackBuffer.Remaining == 0, "There should be no data in the fallback buffer after GetByteCount.");
401Debug.Assert(encoder != null, "This code path should only be called from EncoderNLS.");
402Debug.Assert(charCount >= 0, "Caller should've checked this condition.");
403Debug.Assert(pChars != null || charCount == 0, "Cannot provide a null pointer and a non-zero count.");
404Debug.Assert(byteCount >= 0, "Caller should've checked this condition.");
405Debug.Assert(pBytes != null || byteCount == 0, "Cannot provide a null pointer and a non-zero count.");
470Debug.Fail("This should be overridden by a subclassed type.");
495Debug.Assert(0 <= charsConsumedSoFar && charsConsumedSoFar < originalCharCount, "Invalid arguments provided to method.");
496Debug.Assert(0 <= bytesWrittenSoFar && bytesWrittenSoFar <= originalByteCount, "Invalid arguments provided to method.");
525Debug.Assert(encoder != null, "This code path should only be called from EncoderNLS.");
526Debug.Assert(0 <= charsConsumedSoFar && charsConsumedSoFar <= originalCharCount, "Caller should've checked this condition.");
527Debug.Assert(0 <= bytesWrittenSoFar && bytesWrittenSoFar <= originalByteCount, "Caller should've checked this condition.");
589Debug.Assert(!chars.IsEmpty, "Caller shouldn't invoke this method with an empty input buffer.");
590Debug.Assert(originalCharsLength >= 0, "Caller provided invalid parameter.");
591Debug.Assert(originalBytesLength >= 0, "Caller provided invalid parameter.");
609Debug.Assert(charsConsumedThisIteration == chars.Length, "If returning NeedMoreData, should out the entire buffer length as chars consumed.");
659Debug.Assert(bytesWrittenThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
660Debug.Assert(charsConsumedThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
689Debug.Assert(encoder is null);
698Debug.Assert(originalCharsLength >= chars.Length, "About to report a negative number of chars used?");
702Debug.Assert(fallbackBuffer.Remaining == 0 || encoder != null, "Shouldn't have any leftover data in fallback buffer unless an EncoderNLS is in use.");
717Debug.Assert(decoder != null, "This code path should only be called from DecoderNLS.");
718Debug.Assert(byteCount >= 0, "Caller should've checked this condition.");
719Debug.Assert(pBytes != null || byteCount == 0, "Cannot provide a null pointer and a non-zero count.");
726Debug.Assert(!decoder.InternalHasFallbackBuffer || decoder.FallbackBuffer.Remaining == 0, "Fallback buffer can't hold data between GetChars invocations.");
801Debug.Fail("This should be overridden by a subclassed type.");
826Debug.Assert(0 <= bytesConsumedSoFar && bytesConsumedSoFar < originalByteCount, "Invalid arguments provided to method.");
852Debug.Assert(decoder != null, "This code path should only be called from DecoderNLS.");
853Debug.Assert(0 <= bytesConsumedSoFar && bytesConsumedSoFar <= originalByteCount, "Caller should've checked this condition.");
913Debug.Assert(!bytes.IsEmpty, "Caller shouldn't invoke this method with an empty input buffer.");
914Debug.Assert(originalBytesLength >= 0, "Caller provided invalid parameter.");
945Debug.Assert(charCountThisIteration >= 0, "Fallback shouldn't have returned a negative value.");
967Debug.Assert(charCountThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
968Debug.Assert(bytesConsumedThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
982Debug.Assert(fallbackBuffer.Remaining == 0, "There should be no data in the fallback buffer after GetCharCount.");
997Debug.Assert(decoder != null, "This code path should only be called from DecoderNLS.");
998Debug.Assert(byteCount >= 0, "Caller should've checked this condition.");
999Debug.Assert(pBytes != null || byteCount == 0, "Cannot provide a null pointer and a non-zero count.");
1000Debug.Assert(charCount >= 0, "Caller should've checked this condition.");
1001Debug.Assert(pChars != null || charCount == 0, "Cannot provide a null pointer and a non-zero count.");
1066Debug.Fail("This should be overridden by a subclassed type.");
1091Debug.Assert(0 <= bytesConsumedSoFar && bytesConsumedSoFar < originalByteCount, "Invalid arguments provided to method.");
1092Debug.Assert(0 <= charsWrittenSoFar && charsWrittenSoFar <= originalCharCount, "Invalid arguments provided to method.");
1121Debug.Assert(decoder != null, "This code path should only be called from DecoderNLS.");
1122Debug.Assert(0 <= bytesConsumedSoFar && bytesConsumedSoFar <= originalByteCount, "Caller should've checked this condition.");
1123Debug.Assert(0 <= charsWrittenSoFar && charsWrittenSoFar <= originalCharCount, "Caller should've checked this condition.");
1147Debug.Assert(!decoder.InternalHasFallbackBuffer || decoder.FallbackBuffer.Remaining == 0, "Should be no remaining fallback data at this point.");
1190Debug.Assert(!bytes.IsEmpty, "Caller shouldn't invoke this method with an empty input buffer.");
1191Debug.Assert(originalBytesLength >= 0, "Caller provided invalid parameter.");
1192Debug.Assert(originalCharsLength >= 0, "Caller provided invalid parameter.");
1211Debug.Assert(bytesConsumedThisIteration == bytes.Length, "If returning NeedMoreData, should out the entire buffer length as bytes consumed.");
1228Debug.Assert(charsWrittenThisIteration >= 0, "Fallback shouldn't have returned a negative value.");
1259Debug.Assert(charsWrittenThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
1260Debug.Assert(bytesConsumedThisIteration >= 0, "Workhorse shouldn't have returned a negative value.");
1273Debug.Assert(fallbackBuffer.Remaining == 0);
1286Debug.Assert(decoder is null);
1295Debug.Assert(originalBytesLength >= bytes.Length, "About to report a negative number of bytes used?");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (10)
109Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
110Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
296Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
297Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
298Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
299Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
602Debug.Assert(byteCount >= 0, "Caller shouldn't specify negative length buffer.");
603Debug.Assert(pBytes is not null || byteCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
604Debug.Assert(charCount >= 0, "Caller shouldn't specify negative length buffer.");
605Debug.Assert(pChars is not null || charCount == 0, "Input pointer shouldn't be null if non-zero length specified.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (29)
41Debug.Assert(bufferLength <= nuint.MaxValue / sizeof(char));
68Debug.Assert(pBuffer <= pFinalVectorReadPos, "Should be able to read at least one vector.");
72Debug.Assert((nuint)pBuffer % SizeOfVectorInChars == 0, "Vector read should be aligned.");
150Debug.Assert(totalNumBytesRead % sizeof(char) == 0, "Total number of bytes read should be even since we're working with chars.");
155Debug.Assert(!AllCharsInUInt32AreLatin1(currentUInt32), "Shouldn't have reached this point if we have an all-Latin-1 input.");
185Debug.Assert(Sse2.IsSupported, "Should've been checked by caller.");
186Debug.Assert(BitConverter.IsLittleEndian, "SSE2 assumes little-endian.");
205Debug.Assert(bufferLength <= nuint.MaxValue / sizeof(char));
371Debug.Assert(((nuint)pBuffer - (nuint)pOriginalBuffer) % 2 == 0, "Shouldn't have incremented any pointer by an odd byte count.");
426Debug.Assert(currentMask != 0, "Shouldn't be here unless we see non-Latin-1 data.");
434Debug.Assert(!AllCharsInUInt32AreLatin1(currentDWord), "Shouldn't be here unless we see non-Latin-1 data.");
452Debug.Assert(bufferLength < SizeOfVector128InChars);
551Debug.Assert(BitConverter.IsLittleEndian, "Assume little endian if SSE2 is supported.");
631Debug.Assert(currentOffset <= elementCount);
747Debug.Assert(!AllCharsInUInt32AreLatin1(utf16Data32BitsHigh), "Shouldn't have reached this point if we have an all-Latin-1 input.");
780Debug.Assert(Sse2.IsSupported);
781Debug.Assert(BitConverter.IsLittleEndian);
782Debug.Assert(elementCount >= 2 * SizeOfVector128);
863Debug.Assert(0 < currentOffsetInElements && currentOffsetInElements <= SizeOfVector128, "We wrote at least 1 byte but no more than a whole vector.");
865Debug.Assert(currentOffsetInElements <= elementCount, "Shouldn't have overrun the destination buffer.");
866Debug.Assert(elementCount - currentOffsetInElements >= SizeOfVector128, "We should be able to run at least one whole vector.");
899Debug.Assert(((nuint)pLatin1Buffer + currentOffsetInElements) % SizeOfVector128 == 0, "Write should be aligned.");
934Debug.Assert(((nuint)pLatin1Buffer + currentOffsetInElements) % sizeof(ulong) == 0, "Destination should be ulong-aligned.");
972Debug.Assert(Sse2.IsSupported);
973Debug.Assert(BitConverter.IsLittleEndian);
998Debug.Assert(0 < currentOffset && currentOffset <= SizeOfVector128 / sizeof(char));
1028Debug.Assert(elementCount - currentOffset < SizeOfVector128, "Case where 2 vectors remained should've been in the hot loop.");
1072Debug.Assert(!Sse2.IsSupported);
1099Debug.Assert(elementCount - currentOffset < SizeOfVector, "Vectorized logic should result in less than a vector's length of data remaining.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (64)
240Debug.Assert(m_ChunkOffset + m_ChunkChars.Length >= m_ChunkOffset, "The length of the string is greater than int.MaxValue.");
247Debug.Assert(currentBlock.m_MaxCapacity == maxCapacity);
248Debug.Assert(currentBlock.m_ChunkChars != null);
250Debug.Assert(currentBlock.m_ChunkLength <= currentBlock.m_ChunkChars.Length);
251Debug.Assert(currentBlock.m_ChunkLength >= 0);
252Debug.Assert(currentBlock.m_ChunkOffset >= 0);
257Debug.Assert(currentBlock.m_ChunkOffset == 0);
261Debug.Assert(currentBlock.m_ChunkOffset == prevBlock.m_ChunkOffset + prevBlock.m_ChunkLength);
471Debug.Assert(newLen == chunk.m_ChunkChars.Length, "The new chunk should be larger or equal to the one it is replacing.");
481Debug.Assert(Length == value, "Something went wrong setting Length.");
576Debug.Assert(next.m_ChunkPrevious != null);
602Debug.Assert(stringBuilder != null);
655Debug.Assert(stringBuilder != null);
709Debug.Assert(repeatCount > 0, "Invalid length; should have been validated by caller.");
731Debug.Assert(m_ChunkLength == 0, "A new block was not created.");
874Debug.Assert(m_ChunkLength == 0 && m_ChunkChars.Length >= count);
930Debug.Assert(chunk != null);
982Debug.Assert(insertingChars + this.Length < int.MaxValue);
1050Debug.Assert(m_ChunkLength == 0, "A new block was not created.");
1097Debug.Assert(typeof(T).Assembly.Equals(typeof(object).Assembly), "Implementation trusts the results of TryFormat because T is expected to be something known");
1110Debug.Assert(typeof(T).Assembly.Equals(typeof(object).Assembly), "Implementation trusts the results of TryFormat because T is expected to be something known");
1276Debug.Assert(values != null);
1277Debug.Assert(!Unsafe.IsNullRef(ref separator));
1278Debug.Assert(separatorLength >= 0);
1468Debug.Assert(typeof(T).Assembly.Equals(typeof(object).Assembly), "Implementation trusts the results of TryFormat because T is expected to be something known");
1640Debug.Assert(format[pos - 1] == '{');
1641Debug.Assert(ch != '{');
1744Debug.Assert(format[pos] == '}');
1972Debug.Assert(index > 2);
2061Debug.Assert(thisChunk != null && sbChunk != null);
2098Debug.Assert(offset == Length);
2153Debug.Assert(chunk != null, "chunk was null in replace");
2177Debug.Assert(count >= 0, "count should never go negative");
2195Debug.Assert(oldValue.Length > Math.Min(count, chunk.m_ChunkLength - indexInChunk),
2215Debug.Assert(indexInChunk >= chunk.m_ChunkLength || count == 0,
2233Debug.Assert(chunk != null || count == 0, "Chunks ended prematurely!");
2293Debug.Assert(chunk.m_ChunkPrevious != null);
2353Debug.Assert(valueCount >= 0, "Invalid length; should have been validated by caller.");
2405Debug.Assert(m_ChunkLength == 0, "A new block was not created.");
2422Debug.Assert((uint)index <= (uint)Length, "Callers should check that index is a legal value.");
2443Debug.Assert(!replacements.IsEmpty);
2476Debug.Assert(gapStart < sourceChunk.m_ChunkChars.Length, "gap starts at end of buffer. Should not happen");
2477Debug.Assert(gapStart <= gapEnd, "negative gap size");
2478Debug.Assert(gapEnd <= sourceChunk.m_ChunkLength, "gap too big");
2487Debug.Assert(targetIndexInChunk <= targetChunk.m_ChunkLength, "gap not in chunk");
2556Debug.Assert(chunk != null, "chunk should not be null at this point");
2558Debug.Assert(lengthInChunk >= 0, "Index isn't in the chunk.");
2590Debug.Assert(0 <= index && index <= Length);
2595Debug.Assert(result.m_ChunkPrevious != null);
2599Debug.Assert(result != null);
2632Debug.Assert(Capacity == Length, nameof(ExpandByABlock) + " should only be called when there is no space left.");
2633Debug.Assert(minBlockCharCount > 0);
2723Debug.Assert(count > 0);
2724Debug.Assert(index >= 0);
2735Debug.Assert(chunk.m_ChunkPrevious != null);
2792Debug.Assert(size > 0);
2793Debug.Assert(maxCapacity > 0);
2818Debug.Assert(startIndex >= 0 && startIndex < Length);
2846Debug.Assert(chunk.m_ChunkPrevious != null);
2849Debug.Assert(chunk != null, "We fell off the beginning of the string!");
2881Debug.Assert(chunk != null, "We fell off the beginning of the string!");
3281Debug.Assert(_hasCustomFormatter);
3282Debug.Assert(_provider != null);
3285Debug.Assert(formatter != null, "An incorrectly written provider said it implemented ICustomFormatter, and then didn't");
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (26)
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");
858Debug.Assert(baseDecoder is not null);
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\runtime\src\libraries\System.Private.CoreLib\src\System\Text\UTF7Encoding.cs (15)
62Debug.Assert(_base64Bytes.Length == 64);
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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (22)
327Debug.Assert(IsCancellationRequested);
346Debug.Assert(IsCancellationCompleted, "Expected cancellation to have finished");
589Debug.Assert(this != s_neverCanceledSource, "This source should never be exposed via a CancellationToken.");
590Debug.Assert(callback is Action<object?> || callback is Action<object?, CancellationToken>);
625Debug.Assert(node.Prev == null, "Nodes in the free list should all have a null Prev");
677Debug.Assert(id != 0, "IDs should never be the reserved value 0.");
695Debug.Assert(IsCancellationCompleted, "Expected cancellation to have finished");
731Debug.Assert(IsCancellationRequested, "ExecuteCallbackHandlers should only be called after setting IsCancellationRequested->true");
768Debug.Assert(node.Registrations.Source == this);
769Debug.Assert(node.Prev == null);
829Debug.Assert(exceptionList.Count > 0, $"Expected {exceptionList.Count} > 0");
938Debug.Assert(s is CancellationTokenSource, $"Expected {typeof(CancellationTokenSource)}, got {s}");
982Debug.Assert(d is Action<object?> || d is Action<object?, CancellationToken>);
1028Debug.Assert(_locked);
1050Debug.Assert(node != null, "Expected non-null node");
1051Debug.Assert(node.Registrations == this, "Expected node to come from this registrations instance");
1079Debug.Assert(node.Prev == null);
1084Debug.Assert(node.Prev != null);
1175Debug.Assert(_locked);
1195Debug.Assert(registrations != null, "Expected non-null parent registrations");
1204Debug.Assert(Callback != null);
1212Debug.Assert(node.Callback != null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (24)
88Debug.Assert(Thread.CurrentThread == currentThread);
101Debug.Assert(isFlowSuppressed != m_isFlowSuppressed);
267Debug.Assert(threadPoolThread == Thread.CurrentThread);
315Debug.Assert(executionContext != null && !executionContext.m_isDefault, "ExecutionContext argument is Default.");
331Debug.Assert(currentThread == Thread.CurrentThread);
332Debug.Assert(contextToRestore != currentContext);
367Debug.Assert(!RuntimeFeature.IsMultithreadingSupported || Thread.CurrentThread.IsThreadPoolThread); // there are no dedicated threadpool threads on runtimes where we can't start threads
368Debug.Assert(Thread.CurrentThread._executionContext == null, "ThreadPool thread not on Default ExecutionContext.");
369Debug.Assert(Thread.CurrentThread._synchronizationContext == null, "ThreadPool thread not on Default SynchronizationContext.");
374Debug.Assert(previousExecutionCtx != nextExecutionCtx);
381Debug.Assert(previousChangeNotifications != null || nextChangeNotifications != null);
389Debug.Assert(previousExecutionCtx!.m_localValues != null);
390Debug.Assert(nextExecutionCtx!.m_localValues != null);
424Debug.Assert(previousExecutionCtx!.m_localValues != null);
438Debug.Assert(nextExecutionCtx!.m_localValues != null);
473Debug.Assert(!current.IsDefault);
474Debug.Assert(current.m_localValues != null, "Only the default context should have null, and we shouldn't be here on the default context");
487Debug.Assert(!current.IsDefault);
488Debug.Assert(current.m_localValues != null, "Only the default context should have null, and we shouldn't be here on the default context");
510Debug.Assert(!current.IsDefault);
511Debug.Assert(current.m_localValues != null, "Only the default context should have null, and we shouldn't be here on the default context");
530Debug.Assert(newChangeNotifications != null);
531Debug.Assert(Array.IndexOf(newChangeNotifications, local) >= 0);
573Debug.Assert(currentThread == Thread.CurrentThread);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (26)
200Debug.Assert(ReadyToComplete, "The block must be ready to complete to be here.");
211Debug.Assert(state is ConcurrentExclusiveSchedulerPair);
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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (109)
195Debug.Assert(task != null, "Null Task objects can't be added to the ActiveTasks collection");
473Debug.Assert(promiseStyle, "Promise CTOR: promiseStyle was false");
672Debug.Assert(m_contingentProperties == null || m_contingentProperties.m_capturedContext == null,
720Debug.Assert(m_stateFlags == 0, "TaskConstructorCore: non-zero m_stateFlags");
721Debug.Assert((((int)creationOptions) | (int)TaskStateFlags.OptionsMask) == (int)TaskStateFlags.OptionsMask, "TaskConstructorCore: options take too many bits");
748Debug.Assert((internalOptions & InternalTaskOptions.ContinuationTask) == 0, "TaskConstructorCore: Did not expect to see cancelable token for continuation task.");
790Debug.Assert(continuation != null);
836Debug.Assert(((int)TaskStateFlags.OptionsMask & 1) == 1, "OptionsMask needs a shift in Options.get");
891Debug.Assert((Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) != 0,
899Debug.Assert(success, "Tried to set enabled on completed Task");
929Debug.Assert(tasks != null, "Expected non-null array of tasks");
966Debug.Assert(isWaitNotificationEnabled, "Should only be called if the wait completion bit is set.");
985Debug.Assert(IsWaitNotificationEnabled, "Should only be called if the wait completion bit is set.");
1026Debug.Assert(InternalCurrent == this, "Task.AddNewChild(): Called from an external context");
1047Debug.Assert(InternalCurrent == this, "Task.DisregardChild(): Called from an external context");
1050Debug.Assert(props.m_completionCountdown >= 2, "Task.DisregardChild(): Expected parent count to be >= 2");
1195Debug.Assert(scheduler != null, "Task.InternalRunSynchronously(): null TaskScheduler");
1266Debug.Assert(
1283Debug.Assert((m_stateFlags & (int)TaskStateFlags.Canceled) != 0, "Task.RunSynchronously: expected TaskStateFlags.Canceled to be set");
1413Debug.Assert((e == null) || IsFaulted, "Task.Exception_get(): returning non-null value when not Faulted");
1817Debug.Assert(m_taskScheduler != null, "expected a task scheduler to have been selected");
1818Debug.Assert((m_stateFlags & (int)TaskStateFlags.Started) == 0, "task has already started");
1866Debug.Assert(
1886Debug.Assert(exceptionObject != null, "Task.AddException: Expected a non-null exception object");
1897Debug.Assert(exceptionObject != null, "Task.AddException: Expected a non-null exception object");
2003Debug.Assert(m_contingentProperties != null && m_contingentProperties.m_exceptionsHolder != null, "ExceptionRecorded should imply this");
2021Debug.Assert(IsFaulted && ExceptionRecorded, "Must only be used when the task has faulted with exceptions.");
2029Debug.Assert(IsCanceled, "Must only be used when the task has canceled.");
2044Debug.Assert(IsCompleted, "ThrowIfExceptional(): Expected IsCompleted == true");
2149Debug.Assert(userDelegateExecute || m_contingentProperties != null);
2311Debug.Assert(childTask != null);
2312Debug.Assert(childTask.IsCompleted, "ProcessChildCompletion was called for an uncompleted task");
2314Debug.Assert(childTask.m_contingentProperties?.m_parent == this, "ProcessChildCompletion should only be called for a child of this task");
2356Debug.Assert(props != null);
2374Debug.Assert(task.IsCompleted, "Expected all tasks in list to be completed");
2378Debug.Assert(exceptionHolder != null);
2541Debug.Assert(obj is Task);
2552Debug.Assert(m_action != null, "Null action in InnerInvoke()");
2564Debug.Fail("Invalid m_action in Task");
2574Debug.Assert(unhandledException != null);
2646Debug.Assert(continuationAction != null);
2691Debug.Assert(!flowExecutionContext, "We already determined we're not required to flow context.");
2717Debug.Assert(stateMachineBox != null);
2946Debug.Assert((m_stateFlags & (int)TaskStateFlags.Faulted) == 0, "Task.Wait() completing when in Faulted state.");
3023Debug.Assert(source != null);
3024Debug.Assert(millisecondsDelay != 0);
3078Debug.Assert(completingTask.IsCompleted);
3168Debug.Assert(IsCompleted || millisecondsTimeout != Timeout.Infinite);
3194Debug.Assert((Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) == 0, "Task.InternalCancel() did not expect promise-style task");
3266Debug.Assert((m_stateFlags & IllegalFlags) == 0, "The continuation was in an invalid state.");
3267Debug.Assert((m_stateFlags & (int)TaskStateFlags.WaitingForActivation) != 0, "Expected continuation to be waiting for activation");
3268Debug.Assert(m_contingentProperties is null || m_contingentProperties.m_cancellationToken == default);
3286Debug.Assert((Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) != 0, "Task.RecordInternalCancellationRequest(CancellationToken) only valid for promise-style task");
3289Debug.Assert(m_contingentProperties!.m_cancellationToken == default);
3321Debug.Assert((m_stateFlags & ((int)TaskStateFlags.Canceled | (int)TaskStateFlags.CompletionReserved)) != 0, "Task.CancellationCleanupLogic(): Task not canceled or reserved.");
3353Debug.Assert(this == InternalCurrent, "SetCancellationAcknowledged() should only be called while this is still the current task");
3354Debug.Assert(IsCancellationRequested, "SetCancellationAcknowledged() should not be called if the task's CT wasn't signaled");
3391Debug.Assert(exceptionObject != null, "Expected non-null exceptionObject argument");
3394Debug.Assert(
3436Debug.Assert(
3482Debug.Assert(continuationObject != null);
3602Debug.Assert(currentContinuation is TaskContinuation);
3645Debug.Assert(currentContinuation is ITaskCompletionAction);
4504Debug.Assert(continuationTask != null, "Task.ContinueWithCore(): null continuationTask");
4505Debug.Assert(scheduler != null, "Task.ContinueWithCore(): null scheduler");
4506Debug.Assert(!continuationTask.IsCompleted, "Did not expect continuationTask to be completed");
4591Debug.Assert(tc != null, "Expected non-null tc object in AddTaskContinuationComplex");
4594Debug.Assert(oldValue is not null, "Expected non-null m_continuationObject object");
4630Debug.Assert(oldValue == s_taskCompletionSentinel, "Expected m_continuationObject to be list or sentinel");
4668Debug.Assert(tc != null);
4764Debug.Assert(waitResult, "expected wait to succeed");
4784Debug.Assert(waitResult, "expected wait to succeed");
5027Debug.Assert(tasks.Length == 0 || waitResult != -1, "expected wait to succeed");
5279Debug.Assert(succeeded, "This should always succeed on a new task.");
5293Debug.Assert(succeeded, "This should always succeed on a new task.");
5323Debug.Assert(exception != null);
5327Debug.Assert(succeeded, "This should always succeed on a new task.");
5337Debug.Assert(exception != null);
5341Debug.Assert(succeeded, "This should always succeed on a new task.");
5630Debug.Assert(millisecondsDelay != 0);
5689Debug.Assert(token.CanBeCanceled);
5887Debug.Assert(tasks.Length != 0, "Expected a non-zero length task array");
5888Debug.Assert(m_stateObject is null, "Expected to be able to use the state object field for faulted/canceled tasks.");
5963Debug.Assert(failedOrCanceled is Task, $"Expected Task, got {failedOrCanceled}");
5972Debug.Assert(failedOrCanceled is List<Task>);
5995Debug.Assert(completed);
6027Debug.Assert(failedOrCanceled is Task);
6033Debug.Assert(observedExceptions.Count > 0, "Expected at least one exception");
6045Debug.Assert(IsCompleted);
6048Debug.Assert(_remainingToComplete >= 0, "Count should never go below 0");
6241Debug.Assert(tasks != null, "Expected a non-null task array");
6242Debug.Assert(tasks.Length > 0, "Expected a non-zero length task array");
6280Debug.Assert(task != null, "Constituent task in WhenAll should never be null");
6293Debug.Assert(task.Status == TaskStatus.RanToCompletion);
6305Debug.Assert(observedExceptions.Count > 0, "Expected at least one exception");
6326Debug.Assert(m_count >= 0, "Count should never go below 0");
6467Debug.Assert(task1 != null && task2 != null);
6503Debug.Assert(task1 != null && task2 != null);
6504Debug.Assert(task1.IsCompleted || task2.IsCompleted);
6527Debug.Assert(success, "Only one task should have gotten to this point, and thus this must be successful.");
6775Debug.Assert(_waitForNextCompletedTask.GetStatus(_waitForNextCompletedTask.Version) == ValueTaskSourceStatus.Pending);
6896Debug.Assert(outerTask != null);
7241Debug.Assert(outerTask != null, "Expected non-null outerTask");
7295Debug.Assert(result, "Expected TrySetFromTask from inner task to succeed");
7298Debug.Fail("UnwrapPromise in illegal state");
7322Debug.Assert(task != null && task.IsCompleted, "Expected non-null, completed outer task");
7323Debug.Assert(_state == STATE_WAITING_ON_OUTER_TASK, "We're in the wrong state!");
7335Debug.Assert(result, "Expected TrySetFromTask from outer task to succeed");
7352Debug.Assert(task != null && task.IsCompleted, "TrySetFromTask: Expected task to have completed.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (36)
18Debug.Assert(action is Action<Task> || action is Action<Task, object?>,
31Debug.Assert(antecedent != null,
39Debug.Assert(m_action != null);
51Debug.Fail("Invalid m_action in ContinuationTaskFromTask");
64Debug.Assert(function is Func<Task, TResult> || function is Func<Task, object?, TResult>,
77Debug.Assert(antecedent != null,
85Debug.Assert(m_action != null);
97Debug.Fail("Invalid m_action in ContinuationResultTaskFromTask");
110Debug.Assert(action is Action<Task<TAntecedentResult>> || action is Action<Task<TAntecedentResult>, object?>,
123Debug.Assert(antecedent != null,
131Debug.Assert(m_action != null);
143Debug.Fail("Invalid m_action in ContinuationTaskFromResultTask");
156Debug.Assert(function is Func<Task<TAntecedentResult>, TResult> || function is Func<Task<TAntecedentResult>, object?, TResult>,
169Debug.Assert(antecedent != null,
177Debug.Assert(m_action != null);
189Debug.Fail("Invalid m_action in ContinuationResultTaskFromResultTask");
216Debug.Assert(task != null);
217Debug.Assert(task.m_taskScheduler != null);
274Debug.Assert(task != null, "TaskContinuation ctor: task is null");
275Debug.Assert(scheduler != null, "TaskContinuation ctor: scheduler is null");
291Debug.Assert(completedTask != null);
292Debug.Assert(completedTask.IsCompleted, "ContinuationTask.Run(): completedTask not completed");
295Debug.Assert(continuationTask != null);
369Debug.Assert(state is Action);
385Debug.Assert(context != null);
418Debug.Assert(state is SynchronizationContextAwaitTaskContinuation);
466Debug.Assert(scheduler != null);
493Debug.Assert(action != null);
494Debug.Assert(scheduler != null && scheduler != TaskScheduler.Default);
547Debug.Assert(action != null);
563Debug.Assert(action != null);
564Debug.Assert(scheduler != null);
683Debug.Assert(state is Action);
697Debug.Assert(callback != null);
698Debug.Assert(currentTask == Task.t_currentTask);
847Debug.Assert(m_action != null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (13)
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");
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,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (31)
498Debug.Assert((endFunction != null) != (endAction != null), "Expected exactly one of endFunction/endAction to be non-null");
642Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
717Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
739Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
834Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
856Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
959Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
981Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
1092Debug.Assert((endFunction != null) != (endAction != null), "Both endFunction and endAction were non-null");
1114Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
1153Debug.Assert(thisRef != null, "Expected a non-null thisRef");
1154Debug.Assert(beginMethod != null, "Expected a non-null beginMethod");
1155Debug.Assert(endMethod != null, "Expected a non-null endMethod");
1168Debug.Assert(asyncResult.IsCompleted, "If the operation completed synchronously, it must be completed.");
1196Debug.Assert(thisRef != null, "Expected a non-null thisRef");
1197Debug.Assert(endMethod != null, "Expected a non-null endMethod");
1226Debug.Assert(thisRef != null);
1243Debug.Assert(!IsCompleted, "The task should not have been completed yet.");
1272Debug.Assert(successfullySet, "Expected the task to not yet be completed");
1564Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
1590Debug.Assert(continuationAction != null);
1611Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
1635Debug.Assert(state is Func<Task[], TResult>);
1642Debug.Assert(continuationAction != null);
1647Debug.Assert(state is Action<Task[]>);
1935Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
1955Debug.Assert(state is Func<Task, TResult>);
1962Debug.Assert(continuationAction != null);
1966Debug.Assert(state is Action<Task>);
1985Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null");
2008Debug.Assert(continuationAction != null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ThreadPoolTaskScheduler.cs (1)
35Debug.Assert(s is Task);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.PlatformNotSupported.cs (1)
15Debug.Fail("Unreachable");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\UnixHandleAsyncContext.cs (29)
31Debug.Assert(lockObject != null);
35Debug.Assert(!Monitor.IsEntered(_lockObject));
47Debug.Assert(Monitor.IsEntered(_lockObject));
109Debug.Assert(_queueLock == null);
120Debug.Assert(sizeof(QueueState) == sizeof(int));
150Debug.Assert(observedSequenceNumber - _sequenceNumber < 10000, "Very large sequence number increase???");
164Debug.Assert(!_nextMayBeInline);
190Debug.Assert(_tail == null);
222Debug.Assert(_tail == null, "State == Ready but queue is not empty!");
227Debug.Assert(_tail != null, "State == Waiting but queue is empty!");
238Debug.Assert(_tail != null, "State == Processing but queue is empty!");
243Debug.Assert(_tail == null);
262Debug.Assert(!inlineOnly);
274Debug.Assert(_tail == null);
279Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!");
280Debug.Assert(_tail != null, "Unexpected empty queue while processing I/O");
281Debug.Assert(node == _tail.Next, "Operation is not at head of queue???");
302Debug.Assert(_tail == null);
307Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!");
311Debug.Assert(observedSequenceNumber - _sequenceNumber < 10000, "Very large sequence number increase???");
329Debug.Assert(_tail == null);
333Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!");
334Debug.Assert(_tail!.Next == node, "Queue modified while processing queue");
353Debug.Assert(result != QueueResult.Pending);
365Debug.Assert(_tail == null);
369Debug.Assert(_tail != null, "Unexpected empty queue in CancelSyncAndContinue");
573Debug.Assert(timeout >= -1, $"Unexpected timeout: {timeout}");
679Debug.Assert(IsDisposed); // Due to stopping the write queue.
745Debug.Assert((events & Interop.Sys.HandleEvents.Error) == 0);
System.Private.CoreLib.Generators (8)
System.Private.DataContractSerialization (374)
System.Private.Reflection.Execution (96)
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (33)
10using Debug = global::System.Diagnostics.Debug;
141public override Assembly Assembly { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
142public override string AssemblyQualifiedName { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
143public override string FullName { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
145public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
146public override object[] GetCustomAttributes(bool inherit) { Debug.Assert(false); throw NotImplemented.ByDesign; }
147public override object[] GetCustomAttributes(Type attributeType, bool inherit) { Debug.Assert(false); throw NotImplemented.ByDesign; }
149public override EventInfo GetEvent(string name, BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
151public override EventInfo[] GetEvents(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
153public override FieldInfo GetField(string name, BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
155public override FieldInfo[] GetFields(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
160public override Type GetInterface(string name, bool ignoreCase) { Debug.Assert(false); throw NotImplemented.ByDesign; }
162public override MemberInfo[] GetMembers(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
164public override MethodInfo[] GetMethods(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
166public override Type GetNestedType(string name, BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
168public override Type[] GetNestedTypes(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
170public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; }
171public override bool IsDefined(Type attributeType, bool inherit) { Debug.Assert(false); throw NotImplemented.ByDesign; }
172public override Guid GUID { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
177public override object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters) { Debug.Assert(false); throw NotImplemented.ByDesign; }
178public override Module Module { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
179public override string Namespace { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
180public override string Name { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
181public override Type UnderlyingSystemType { get { Debug.Assert(false); throw NotImplemented.ByDesign; } }
184protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { Debug.Assert(false); throw NotImplemented.ByDesign; }
186protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { Debug.Assert(false); throw NotImplemented.ByDesign; }
188protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) { Debug.Assert(false); throw NotImplemented.ByDesign; }
189protected override bool IsCOMObjectImpl() { Debug.Assert(false); throw NotImplemented.ByDesign; }
190protected override bool IsPrimitiveImpl() { Debug.Assert(false); throw NotImplemented.ByDesign; }
191protected override bool HasElementTypeImpl() { Debug.Assert(false); throw NotImplemented.ByDesign; }
212Debug.Assert(type.DeclaringType != null);
253Debug.Assert(type.IsNullable());
256Debug.Assert(arguments.Length == 1);
System.Private.StackTraceMetadata (28)
System.Private.TypeLoader (321)
System.Private.Uri (158)
System.Private.Windows.Core (76)
System.Private.Windows.GdiPlus (1)
System.Private.Xml (3069)
System\Xml\BinaryXml\SqlUtils.cs (17)
85Debug.Assert(rgulU.Length == s_cNumeMax);
92Debug.Assert(iulD != 0, "iulD != 0", "Divided by zero!");
93Debug.Assert(iulD > 0, "iulD > 0", "Invalid data: less than zero");
94Debug.Assert(ciulU > 0, "ciulU > 0", "No data in the array");
130Debug.Assert(bPrec <= s_maxPrecision && bPrec > 0, "bPrec <= MaxPrecision && bPrec > 0", "Invalid numeric precision");
136Debug.Assert(uiDigit < 10);
250Debug.Assert(m_bScale <= s_NUMERIC_MAX_PRECISION, "m_bScale <= NUMERIC_MAX_PRECISION", "In AssertValid");
251Debug.Assert(m_bScale <= m_bPrec, "m_bScale <= m_bPrec", "In AssertValid");
252Debug.Assert(m_bScale >= 0, "m_bScale >= 0", "In AssertValid");
253Debug.Assert(m_bPrec > 0, "m_bPrec > 0", "In AssertValid");
254Debug.Assert(CLenFromPrec(m_bPrec) >= m_bLen, "CLenFromPrec(m_bPrec) >= m_bLen", "In AssertValid");
255Debug.Assert(m_bLen <= s_cNumeMax, "m_bLen <= x_cNumeMax", "In AssertValid");
262Debug.Assert(m_bLen == 1, "m_bLen == 1", "In AssertValid");
267Debug.Assert(rglData[iulData] == 0, "rglData[iulData] == 0", "In AssertValid");
323Debug.Assert(val >= 0 && val < 100);
329Debug.Assert(val > -10000 && val < 10000);
341Debug.Assert(val >= 0 && val < 1000);
System\Xml\Cache\XPathNode.cs (14)
154Debug.Assert(HasCollapsedText, "Do not call CollapsedLinePosition unless HasCollapsedText is true.");
173Debug.Assert(pageNode != null);
211Debug.Assert(localName == null || (object?)Document.NameTable.Get(localName) == (object)localName, "localName must be atomized.");
223Debug.Assert(localName == null || (object?)Document.NameTable.Get(localName) == (object)localName, "localName must be atomized.");
361Debug.Assert(info != null && idxParent <= ushort.MaxValue);
372Debug.Assert(lineNumOffset >= 0 && lineNumOffset <= MaxLineNumberOffset, $"Line number offset too large or small: {lineNumOffset}");
373Debug.Assert(linePosOffset >= 0 && linePosOffset <= MaxLinePositionOffset, $"Line position offset too large or small: {linePosOffset}");
383Debug.Assert(posOffset >= 0 && posOffset <= MaxCollapsedPositionOffset, $"Collapsed text line position offset too large or small: {posOffset}");
400Debug.Assert(NodeType == XPathNodeType.Element);
411Debug.Assert(NodeType == XPathNodeType.Element);
439Debug.Assert(pageSibling != null && idxSibling != 0 && idxSibling <= ushort.MaxValue, "Bad argument");
440Debug.Assert(_idxSibling == 0, "SetSibling should not be called more than once.");
458Debug.Assert(pageSimilar != null && idxSimilar != 0 && idxSimilar <= ushort.MaxValue, "Bad argument");
459Debug.Assert(_idxSimilar == 0, "SetSimilarElement should not be called more than once.");
System\Xml\Cache\XPathNodeHelper.cs (34)
26Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element);
70Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
75Debug.Assert(pageNode[idxNode].NodeType == XPathNodeType.Attribute);
89Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
109Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
119Debug.Assert(idx != 0);
120Debug.Assert(page != null);
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)");
180Debug.Assert(idxNode <= ushort.MaxValue);
181Debug.Assert(pageNode[0].PageInfo!.PageNumber <= short.MaxValue);
194Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
200Debug.Assert(idx != 0);
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)");
312Debug.Assert(typ != XPathNodeType.Attribute && typ != XPathNodeType.Namespace);
331Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
332Debug.Assert(pageNode[idxNode].NodeType != XPathNodeType.Attribute);
348Debug.Assert(pagePrec != null);
369Debug.Assert(idxAnc != 0 && pageAnc != null);
394Debug.Assert(pageNode != null && idxNode != 0, "Cannot pass null argument(s)");
428Debug.Assert(pageCurrent != null && idxCurrent != 0, "Cannot pass null argument(s)");
454Debug.Assert(page != null);
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.");
669Debug.Assert(pageNode != null);
System\Xml\Core\XmlTextReaderImpl.cs (291)
318Debug.Assert(nt != null);
331Debug.Assert(_index == 0);
372Debug.Assert(!_nameTableFromSettings);
394Debug.Assert(_index == 0);
443Debug.Fail($"Unexpected conformance level {settings.ConformanceLevel}");
602Debug.Assert(baseUri == null);
630Debug.Assert(_laterInitParam != null);
631Debug.Assert(_laterInitParam.inputUriResolver != null);
632Debug.Assert(_laterInitParam.inputbaseUri != null);
633Debug.Assert(_reportedBaseUri != null);
700Debug.Assert(baseUri == null);
731Debug.Assert(_laterInitParam != null);
732Debug.Assert(_laterInitParam.inputStream != null);
733Debug.Assert(_reportedBaseUri != null);
764Debug.Assert(baseUriStr == string.Empty, "BaseURI can come either from XmlParserContext or from the constructor argument, not from both");
790Debug.Assert(_laterInitParam != null);
791Debug.Assert(_laterInitParam.inputTextReader != null);
792Debug.Assert(_reportedBaseUri != null);
813Debug.Assert(xmlFragment != null);
839default: Debug.Fail($"Unexpected fragment type {_fragmentType}"); goto case XmlNodeType.None;
1196Debug.Assert(_laterInitParam != null);
1211Debug.Fail("Invalid InitInputType");
1235Debug.Assert(_nextParsingFunction == ParsingFunction.DocumentContent);
1238Debug.Assert(!_ps.appendMode);
1266Debug.Assert(_parsingFunction == ParsingFunction.ElementContent ||
1271Debug.Assert(_curNode.type == XmlNodeType.Element);
1335Debug.Fail($"Unexpected parsing function {_parsingFunction}");
1363Debug.Fail($"Unexpected parsing function {_parsingFunction}");
1395Debug.Assert(_curNode.type == XmlNodeType.EndElement);
1396Debug.Assert(_parsingFunction != ParsingFunction.Eof);
1416Debug.Assert(_namespaceManager != null);
1499Debug.Assert(_parsingMode == ParsingMode.Full);
1518Debug.Fail("Unexpected entity type");
1544Debug.Fail("Unexpected entity type");
1560Debug.Assert(value is XmlTextReader);
1579Debug.Assert(_outerReader is XmlTextReaderImpl);
1868Debug.Assert(_ps.chars != null);
1892Debug.Assert(_ps.chars != null);
1945Debug.Assert(_namespaceManager != null);
1953Debug.Assert(_namespaceManager != null);
1989Debug.Assert(_namespaceManager != null);
2009Debug.Assert(_v1Compat, "XmlTextReaderImpl.Normalization property cannot be accessed on reader created via XmlReader.Create.");
2014Debug.Assert(_v1Compat, "XmlTextReaderImpl.Normalization property cannot be changed on reader created via XmlReader.Create.");
2042Debug.Assert(_v1Compat, "XmlTextReaderImpl.WhitespaceHandling property cannot be accessed on reader created via XmlReader.Create.");
2047Debug.Assert(_v1Compat, "XmlTextReaderImpl.WhitespaceHandling property cannot be changed on reader created via XmlReader.Create.");
2067Debug.Assert(_v1Compat, "XmlTextReaderImpl.DtdProcessing property cannot be accessed on reader created via XmlReader.Create.");
2072Debug.Assert(_v1Compat, "XmlTextReaderImpl.DtdProcessing property cannot be changed on reader created via XmlReader.Create.");
2124Debug.Assert(_v1Compat, "XmlTextReaderImpl.ResetState cannot be called on reader created via XmlReader.Create.");
2138Debug.Assert(_namespaceManager != null);
2166Debug.Assert(_v1Compat, "XmlTextReaderImpl.GetRemainder cannot be called on reader created via XmlReader.Create.");
2167Debug.Assert(_stringBuilder.Length == 0);
2207Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadChars cannot be called on reader created via XmlReader.Create.");
2208Debug.Assert(_outerReader is XmlTextReader);
2243Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadBase64 cannot be called on reader created via XmlReader.Create.");
2244Debug.Assert(_outerReader is XmlTextReader);
2277Debug.Assert(_v1Compat, "XmlTextReaderImpl.ReadBinHex cannot be called on reader created via XmlReader.Create.");
2278Debug.Assert(_outerReader is XmlTextReader);
2405Debug.Assert(value >= 0 && value <= _ps.charsUsed);
2491Debug.Assert(_parsingMode == ParsingMode.Full);
2579Debug.Assert(_parsingStatesStackTop == -1);
2580Debug.Assert((systemId != null && systemId.Length > 0) || (publicId != null && publicId.Length > 0));
2587Debug.Assert(_xmlResolver != null);
2599Debug.Assert(_ps.appendMode);
2615Debug.Assert(_parsingStatesStackTop == -1);
2616Debug.Assert(internalDtd != null);
2789Debug.Assert(InAttributeValueIterator);
2826Debug.Assert(baseUriStr != null);
2832Debug.Assert(baseUri != null);
2843Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.textReader == null);
2844Debug.Assert(baseUriStr != null);
2845Debug.Assert(baseUri == null || (baseUri.ToString().Equals(baseUriStr)));
2918Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.stream == null);
2919Debug.Assert(baseUriStr != null);
2947Debug.Assert(_ps.stream == null && _ps.textReader == null);
2948Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0);
2949Debug.Assert(baseUriStr != null);
2950Debug.Assert(str != null);
3005Debug.Assert(_parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl);
3009Debug.Assert(_parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl);
3010Debug.Assert(_nextParsingFunction == ParsingFunction.DocumentContent);
3035Debug.Assert(context != null && context.HasDtdInfo);
3049Debug.Fail("Unhandled DtdProcessing enumeration value.");
3057Debug.Assert(_url != null && _url.Length > 0);
3082Debug.Assert(_ps.stream != null);
3090Debug.Assert(_ps.bytes != null);
3091Debug.Assert(_ps.bytePos == 0);
3177Debug.Assert(_ps.charPos == 0);
3195Debug.Assert(_ps.encoding != null);
3196Debug.Assert(_ps.bytes != null);
3207Debug.Assert(_ps.encoding != null);
3210Debug.Assert(_ps.stream != null);
3222Debug.Assert(_ps.encoding != null);
3271Debug.Assert(newEncoding != null);
3272Debug.Assert(newEncoding.EncodingName != "UTF-8");
3286Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null);
3287Debug.Assert(_ps.appendMode, "UnDecodeChars cannot be called after ps.appendMode has been changed to false");
3289Debug.Assert(_ps.charsUsed >= _ps.charPos, "The current position must be in the valid character range.");
3297Debug.Assert(_charactersInDocument >= _ps.charsUsed - _ps.charPos,
3306Debug.Assert(_charactersFromEntities >= _ps.charsUsed - _ps.charPos,
3315Debug.Assert(_ps.encoding != null);
3316Debug.Assert(_ps.chars != null);
3359Debug.Assert(_ps.chars != null);
3397Debug.Assert(_ps.bytes != null);
3471Debug.Assert(_ps.bytes != null);
3486Debug.Assert(_ps.bytes != null);
3525Debug.Assert(_ps.charsUsed < _ps.chars.Length);
3536Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null);
3537Debug.Assert(_ps.chars != null);
3538Debug.Assert(maxCharsCount <= _ps.chars.Length - _ps.charsUsed - 1);
3562Debug.Assert(maxCharsCount >= charsCount);
3577Debug.Assert(_ps.decoder != null);
3578Debug.Assert(_ps.bytes != null);
3579Debug.Assert(_ps.chars != null);
3585Debug.Fail("We should get an exception again.");
3627Debug.Assert(_ps.chars != null);
3657Debug.Assert(_stringBuilder.Length == 0 || isTextDecl);
3701Debug.Assert(_ps.encoding != null);
3778Debug.Assert(attr != null);
3810Debug.Assert(attr != null);
3836Debug.Assert(attr != null);
3852Debug.Assert(attr != null);
3867Debug.Assert(!isTextDecl);
3873Debug.Assert(attr != null);
3879Debug.Fail($"Unexpected xmlDeclState {xmlDeclState}");
3919Debug.Assert(_ps.encoding != null);
3943Debug.Assert(_ps.chars != null);
4125Debug.Assert(pos == _ps.charsUsed && !_ps.isEof);
4145Debug.Assert(_index == 0);
4168Debug.Assert(_ps.chars != null);
4342Debug.Assert(_ps.chars != null);
4408Debug.Assert(_namespaceManager != null);
4500Debug.Assert(_curNode.type == XmlNodeType.Element);
4501Debug.Assert(_dtdInfo != null);
4593Debug.Assert(_ps.chars != null);
4673Debug.Fail("We should never get to this point.");
4682Debug.Assert(_index > 0);
4687Debug.Assert(_curNode == startTagNode);
4704Debug.Assert(_ps.chars != null);
4714Debug.Assert(startTag.type == XmlNodeType.EntityReference);
4723Debug.Assert(_ps.chars != null);
4727Debug.Assert(_attrCount == 0);
4776Debug.Assert(_curNode.type == XmlNodeType.Element);
4784Debug.Assert(_curNode.type == XmlNodeType.Element);
5010Debug.Assert(_curNode.type == XmlNodeType.Element);
5137Debug.Assert(_ps.chars != null);
5144Debug.Assert(_stringBuilder.Length == 0);
5299Debug.Assert(_ps.entity != null);
5353Debug.Fail("We should never get to this point.");
5356Debug.Assert(_ps.isEof);
5374Debug.Fail("no EndEntity reporting while parsing attributes");
5414Debug.Assert(attr.nextAttrValueChunk == null);
5443Debug.Assert(_stringBuilder.Length == 0);
5459Debug.Assert(endPos - startPos > 0);
5460Debug.Assert(_ps.chars != null);
5483Debug.Assert(_stringBuilder.Length > 0);
5504Debug.Assert(endPos - startPos > 0);
5505Debug.Assert(_ps.chars != null);
5580Debug.Assert(_ps.chars != null);
5770Debug.Assert(_ps.isEof);
5812Debug.Assert(_stringBuilder.Length == 0);
5813Debug.Assert(_parsingFunction == ParsingFunction.PartialTextValue ||
5827Debug.Assert(_stringBuilder.Length > 0);
5881Debug.Assert(_parsingFunction == ParsingFunction.PartialTextValue || _parsingFunction == ParsingFunction.InReadValueChunk ||
5891Debug.Assert(_parsingFunction == ParsingFunction.InReadValueChunk);
5896Debug.Assert((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
5908Debug.Assert(_parsingFunction == ParsingFunction.InReadContentAsBinary || _parsingFunction == ParsingFunction.InReadElementContentAsBinary);
5913Debug.Assert((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
5941Debug.Assert(_stringBuilder.Length == 0);
5945Debug.Assert(_ps.chars != null);
5983Debug.Assert(_ps.chars != null);
5984Debug.Assert(_ps.chars[_ps.charPos] == '&');
5993Debug.Assert(_ps.chars != null);
5994Debug.Assert(_ps.chars[_ps.charPos] == '&');
6009Debug.Assert(entityType == EntityType.CharacterDec || entityType == EntityType.CharacterHex);
6087Debug.Assert(entity != null);
6163Debug.Fail($"Unexpected parsing states stack top {_parsingStatesStackTop}");
6204Debug.Assert(_lastEntity != null);
6210Debug.Assert(_curNode.depth == _index);
6223Debug.Assert(_curNode.type == XmlNodeType.EntityReference);
6224Debug.Assert(_lastEntity != null);
6225Debug.Assert(Ref.Equal(_lastEntity.Name, _curNode.localName));
6244Debug.Assert(_stringBuilder.Length == 0);
6248Debug.Assert(_ps.chars != null);
6271Debug.Assert(_ps.charPos < _ps.charsUsed);
6315Debug.Assert(_stringBuilder.Length == 0);
6349Debug.Assert(_ps.chars != null);
6371Debug.Assert(!_ps.eolNormalized);
6518Debug.Assert(_stringBuilder.Length == 0);
6521Debug.Assert(_ps.chars != null);
6554Debug.Assert(_ps.chars != null);
6578Debug.Assert(!_ps.eolNormalized);
6727Debug.Assert(_ps.chars != null);
6760Debug.Assert(_dtdProcessing == DtdProcessing.Ignore);
6792Debug.Assert(_ps.chars != null);
6889Debug.Assert(_ps.chars != null);
6908Debug.Assert(_ps.chars != null);
7086Debug.Fail("We should never get to this point.");
7089Debug.Assert(_ps.isEof);
7105Debug.Assert(_ps.chars != null);
7187Debug.Fail("We should never get to this point.");
7190Debug.Assert(_ps.isEof);
7199Debug.Assert(_ps.chars != null);
7200Debug.Assert(_ps.chars[startPos] == '&');
7233Debug.Assert(_ps.chars != null);
7234Debug.Assert(_ps.chars[_ps.charPos] == '&');
7254Debug.Assert(_ps.chars != null);
7255Debug.Assert(_ps.chars[startPos] == '&' && _ps.chars[startPos + 1] == '#');
7310Debug.Assert(badDigitExceptionString != null);
7362Debug.Assert(pos > 0);
7396Debug.Assert(_ps.chars != null);
7397Debug.Assert(_ps.chars[_ps.charPos] == '&');
7417Debug.Assert(startPos < _ps.charsUsed);
7418Debug.Assert(_ps.chars != null);
7419Debug.Assert(_ps.chars[startPos] == '&');
7420Debug.Assert(_ps.chars[startPos + 1] != '#');
7528Debug.Assert(pos > 0);
7553Debug.Assert(_ps.chars != null);
7616Debug.Assert(_ps.chars != null);
7649Debug.Assert(_ps.chars != null);
7664Debug.Assert(nodeIndex < _nodes.Length);
7665Debug.Assert(_nodes[_nodes.Length - 1] == null);
7678Debug.Assert(nodeIndex < _nodes.Length);
7685Debug.Assert(nodeIndex < _nodes.Length);
7702Debug.Assert(_ps.chars != null);
7755Debug.Assert(attr.type == XmlNodeType.Attribute);
7771Debug.Assert(_namespaceManager != null);
7790Debug.Assert(_ps.isEof);
7803Debug.Assert(_namespaceManager != null);
7841Debug.Assert(_namespaceManager != null);
7892Debug.Assert(_curNode.xmlContextPushed);
7934Debug.Assert(_xmlResolver != null);
7992Debug.Assert(_xmlResolver != null);
8009Debug.Assert(_xmlResolver.SupportsType(uri, typeof(Stream)), "Stream must always be a supported type in XmlResolver");
8029Debug.Assert(entity.IsExternal);
8033Debug.Assert(_xmlResolver != null);
8044Debug.Assert(_ps.appendMode);
8075Debug.Assert(!entity.IsExternal);
8141Debug.Assert(_parsingStatesStackTop == -1);
8157Debug.Assert(_parsingStatesStackTop >= 0);
8158Debug.Assert(_parsingStatesStack != null);
8205Debug.Assert(_incReadDecoder != null);
8215Debug.Assert(_incReadDecoder != null);
8216Debug.Assert(_ps.chars != null);
8265Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 2).StartsWith("?>"));
8273Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 3).StartsWith("-->"));
8281Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 3).StartsWith("]]>"));
8303Debug.Fail($"Unexpected read state {_incReadState}");
8306Debug.Assert(_incReadState == IncrementalReadState.Text ||
8415Debug.Assert(_ps.charPos - pos == 0);
8416Debug.Assert(_ps.charPos - startPos == 0);
8455Debug.Assert(_ps.charPos - pos == 0);
8456Debug.Assert(_ps.charPos - startPos == 0);
8553Debug.Assert(count == charsParsed || _incReadDecoder.IsFull, "Check if decoded consumed all characters unless it's full.");
8570Debug.Assert(IncrementalRead() == 0, "Previous call of IncrementalRead should eat up all characters!");
8576Debug.Assert(_fragmentType == XmlNodeType.Attribute);
8593Debug.Assert(_parsingFunction == ParsingFunction.InReadAttributeValue);
8606Debug.Assert(_ps.chars != null);
8621Debug.Assert(_stringBuilder.Length == 0);
8632Debug.Assert(_ps.eolNormalized, "Entity replacement text for attribute values should be EOL-normalized!");
8687Debug.Fail("We should never get to this point.");
8745Debug.Fail("We should never get to this point.");
8825Debug.Assert(_ps.chars != null);
8838Debug.Assert(_ps.charPos < _ps.charsUsed);
8903Debug.Assert(_ps.chars != null);
8916Debug.Assert(_dtdInfo == null && _fragmentParserContext != null && _fragmentParserContext.HasDtdInfo);
8932Debug.Assert(_parsingFunction != ParsingFunction.InReadContentAsBinary);
8959Debug.Assert(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
8960Debug.Assert(_curNode.type == XmlNodeType.Element);
9043Debug.Assert(context != null);
9064Debug.Assert(nt != null);
9065Debug.Assert(context.NameTable == null || context.NameTable == nt, "This check should have been done in XmlParserContext constructor.");
9081Debug.Assert(!_nameTableFromSettings);
9106Debug.Assert(_dtdInfo == null);
9164Debug.Assert(_curNode.type == XmlNodeType.Whitespace && newNodeType == XmlNodeType.SignificantWhitespace, "Incorrect node type change!");
9266Debug.Assert(attr != null);
9287Debug.Assert(_namespaceManager != null);
9290Debug.Assert(prefix != null);
9308Debug.Assert(attr != null);
9340Debug.Assert(_nodes[_index].type == XmlNodeType.Element);
9358Debug.Assert(_nodes[_index].type == XmlNodeType.Element);
9359Debug.Assert(_namespaceManager != null);
9393Debug.Assert(_incReadDecoder != null);
9427Debug.Assert(_ps.chars != null);
9506Debug.Assert(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
9562Debug.Assert(characters >= 0);
9604Debug.Assert(startPos >= 0);
9605Debug.Assert(endPos < chars.Length);
9606Debug.Assert(startPos <= endPos);
9613Debug.Assert(startPos >= 0);
9614Debug.Assert(endPos < str.Length);
9615Debug.Assert(startPos <= endPos);
System\Xml\Schema\XmlValueConverter.cs (9)
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");
270Debug.Fail($"Type code {typeCode} is not supported.");
282Debug.Assert(_clrTypeDefault!.IsArray);
402Debug.Assert(_typeCode == XmlTypeCode.Item, "If SchemaType is null, then TypeCode may only be Item, Node, or AnyAtomicType");
2886Debug.Assert(!(atomicConverter is XmlListConverter) || ((XmlListConverter)atomicConverter).atomicConverter == null,
3018Debug.Assert(enumSrc != null, "Value passed to ToArray must implement IEnumerable");
3046Debug.Assert(enumSrc != null, "Value passed to ToArray must implement IEnumerable");
3113Debug.Assert(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union);
System\Xml\Xsl\IlGen\XmlILConstructAnalyzer.cs (30)
129Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
142Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
155Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
168Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
181Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
194Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
195Debug.Assert(value);
218Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
219Debug.Assert(value);
242Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
243Debug.Assert(value);
267Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
296Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
310Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
324Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
338Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
352Debug.Assert(!_isReadOnly, "This XmlILConstructInfo instance is read-only.");
441Debug.Assert(ndContent != null);
490case QilNodeType.NamespaceDecl: Debug.Assert(ndContent == null); break;
491case QilNodeType.TextCtor: Debug.Assert(ndContent == null); break;
492case QilNodeType.RawTextCtor: Debug.Assert(ndContent == null); break;
496case QilNodeType.XsltCopyOf: Debug.Assert(ndContent == null); break;
500default: Debug.Fail($"{ndConstr.NodeType} is not handled by XmlILStateAnalyzer."); break;
714Debug.Assert(!typ.IsSingleton);
750Debug.Assert(!typ.IsSingleton);
800Debug.Assert(ndElem!.NodeType == QilNodeType.ElementCtor);
838Debug.Assert(binaryNode != null);
857Debug.Assert(ndName != null);
1058Debug.Assert(nd.NodeType == QilNodeType.NamespaceDecl);
1094Debug.Assert(nd.NodeType != QilNodeType.NamespaceDecl || !_nsmgr.HasNamespace(prefix) || _nsmgr.LookupNamespace(prefix) == ns,
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (90)
76Debug.Assert(_iterCurr.Storage.Location == ItemLocation.None, "Root expression should have been pushed to the writer.");
93Debug.Assert(iter.NodeType == QilNodeType.Let || iter.NodeType == QilNodeType.Parameter);
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");
223Debug.Assert(iter.NodeType == QilNodeType.Parameter);
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,
336Debug.Fail($"Visit{parent.NodeType} should never be called");
758Debug.Assert(_iterCurr.CurrentBranchingContext == BranchingContext.None);
843Debug.Assert(_iterCurr.CurrentBranchingContext == BranchingContext.None);
909Debug.Assert(info.ConstructMethod == XmlILConstructMethod.Iterator);
912Debug.Assert(ndCond.Left.XmlType!.TypeCode == XmlTypeCode.Boolean);
949Debug.Assert(!ndCond.Center.XmlType!.IsSingleton || !ndCond.Right.XmlType!.IsSingleton);
981Debug.Assert(ndBranch.XmlType!.IsSingleton, "Conditional must produce a singleton");
986Debug.Assert(itemStorageType == typeof(bool));
1012Debug.Assert(XmlILConstructInfo.Read(ndChoice).PushToWriterFirst);
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");
1630Debug.Assert(ndParsedTagName.Right.XmlType.IsSingleton);
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.");
1753Debug.Assert(code != XmlTypeCode.QName, $"QName values do not support the {relOp} operation");
1772Debug.Fail($"Comparisons for datatype {code} are invalid.");
2030Debug.Fail($"Pattern {step.NodeType} should have been handled.");
2110Debug.Assert(ndIter != null);
2123Debug.Assert(ndIter.NodeType == QilNodeType.Let || ndIter.NodeType == QilNodeType.Parameter);
2124Debug.Assert(!patt.MatchesPattern(OptimizerPatternName.IsPositional));
2141Debug.Assert(ndFor.XmlType!.IsSingleton);
2203Debug.Assert(!ndLet.XmlType!.IsSingleton);
2234Debug.Assert(ndIter != null);
2248Debug.Assert(ndIter.NodeType == QilNodeType.For);
2251Debug.Assert(locPos != null);
2265Debug.Assert(ndSort.Variable.NodeType == QilNodeType.For);
2286Debug.Assert(!_iterNested!.Storage.IsCached);
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");
2474Debug.Fail($"Pattern {step.NodeType} should have been handled.");
2500Debug.Fail($"Pattern {step.NodeType} should have been handled.");
2523Debug.Assert(_iterCurr.Storage.IsCached, "DodMerge pattern should only be matched when cached sequences are returned from loop");
2552Debug.Assert(!XmlILConstructInfo.Read(ndInvoke).PushToWriterFirst || useWriter);
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.");
3137Debug.Fail($"Unexpected node type {ndProp.NodeType}");
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.");
3375Debug.Assert(_iterCurr.CurrentBranchingContext == BranchingContext.None);
3439Debug.Assert(ndVal.Child.XmlType!.IsNode, "XPathNodeValue node may only be applied to a sequence of Nodes.");
3562Debug.Assert(XmlILConstructInfo.Read(ndInvoke).ConstructMethod != XmlILConstructMethod.Writer);
3649Debug.Assert(ndActualArg.XmlType!.IsSubtypeOf(xmlTypeFormalArg), "Xml type of actual arg must be a subtype of the Xml type of the formal arg");
3681Debug.Fail($"Internal Xslt library may not use parameters of type {clrTypeFormalArg}");
3745Debug.Assert(XmlILConstructInfo.Read(ndCopy).PushToWriterFirst);
3751Debug.Assert(ndCopy.Left.XmlType!.IsNode);
3763Debug.Assert(ndCopy.Left.XmlType.IsNode);
3779Debug.Assert(XmlILConstructInfo.Read(ndCopyOf).PushToWriterFirst, "XsltCopyOf should always be pushed to writer.");
3811Debug.Fail($"Conversion from {ndConv.Source.XmlType} to {ndConv.TargetType} is not supported.");
3988Debug.Assert(ndDod.NodeType == QilNodeType.DocOrderDistinct && ndLoop != null);
4105Debug.Assert(ndName.XmlType!.TypeCode == XmlTypeCode.QName, "Element or attribute name must have QName type.");
4124Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, nodeType, ValidateNames.Flags.AllExceptPrefixMapping));
4201Debug.Assert(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne);
4240Debug.Assert(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne);
4267Debug.Assert(ndSecond.NodeType == QilNodeType.NameOf);
4309default: Debug.Fail($"Unexpected rel op {relOp}"); opcode = OpCodes.Nop; break;
4322default: Debug.Fail($"Unexpected rel op {relOp}"); opcode = OpCodes.Nop; break;
4338default: Debug.Fail($"Unexpected rel op {relOp}"); opcode = OpCodes.Nop; break;
4345Debug.Assert(_iterCurr.CurrentBranchingContext == BranchingContext.None);
4357default: Debug.Fail($"Unexpected rel op {relOp}"); opcode = OpCodes.Nop; break;
4378Debug.Assert(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne);
4398Debug.Assert(_iterCurr.CurrentBranchingContext == BranchingContext.None);
4583Debug.Assert(xmlTypes == XmlNodeKindFlags.PI);
4604Debug.Fail($"Cannot map QilNodeType {typ} to an XPathNodeType");
4616Debug.Assert(xmlTypes == XmlNodeKindFlags.Element);
4623Debug.Assert(!isXmlTypeUnion || (xmlTypes & XmlNodeKindFlags.Content) == XmlNodeKindFlags.Content);
4694Debug.Assert(_iterCurr.Storage.Location == ItemLocation.None ||
4772Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4786Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4805Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4815Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4825Debug.Assert(nd.XmlType!.IsSingleton && !XmlILConstructInfo.Read(nd).PushToWriterLast);
4839Debug.Assert(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4853Debug.Assert(_iterCurr.Storage.IsCached, "Expression result should be cached. CachesResult() might have a bug in it.");
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (47)
161Debug.Assert(prefix != null && !string.IsNullOrEmpty(localName) && ns != null, "Invalid argument");
162Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Element, ValidateNames.Flags.All), "Name validation failed");
220Debug.Assert(prefix != null && localName != null && ns != null, "Invalid argument");
230Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Attribute, ValidateNames.Flags.All));
418Debug.Assert(_xstate == XmlState.WithinSequence, $"StartTree cannot be called in the {_xstate} state.");
429Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"EndTree cannot be called in the {_xstate} state.");
445Debug.Assert(_xstate == XmlState.WithinContent, $"WriteStartElement cannot be called in the {_xstate} state.");
468Debug.Assert(_xstate == XmlState.EnumAttrs, $"StartElementContent cannot be called in the {_xstate} state.");
483Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"WriteEndElement cannot be called in the {_xstate} state.");
503Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteStartAttribute cannot be called in the {_xstate} state.");
522Debug.Assert(_xstate == XmlState.WithinAttr, $"WriteEndAttribute cannot be called in the {_xstate} state.");
537Debug.Assert(prefix != null && ns != null);
538Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteNamespaceDeclaration cannot be called in the {_xstate} state.");
541Debug.Assert(prefix.Length == 0 || ns.Length != 0);
571Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlock cannot be called in the {_xstate} state.");
580Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlockNoEntities cannot be called in the {_xstate} state.");
594Debug.Assert(_depth == 0, "Root node can only be constructed at top-level.");
607Debug.Assert(_depth == 1, "Root node can only be constructed at top-level.");
698Debug.Assert(prefix != null && ns != null);
745Debug.Assert(prefix != null, "Invalid argument");
761Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteNamespaceString cannot be called in the {_xstate} state.");
770Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteEndNamespace cannot be called in the {_xstate} state.");
800Debug.Assert(_xstate == XmlState.WithinComment, $"WriteCommentString cannot be called in the {_xstate} state.");
809Debug.Assert(_xstate == XmlState.WithinComment, $"WriteEndComment cannot be called in the {_xstate} state.");
843Debug.Assert(_xstate == XmlState.WithinPI, $"WriteProcessingInstructionString cannot be called in the {_xstate} state.");
852Debug.Assert(_xstate == XmlState.WithinPI, $"WriteEndProcessingInstruction cannot be called in the {_xstate} state.");
883Debug.Assert(_xstate == XmlState.WithinSequence, "Values can only be written at the top-level.");
937Debug.Assert(navigator.NodeType == XPathNodeType.Element, "StartCopy should return true only for Element nodes.");
956Debug.Assert(navigator.NodeType == XPathNodeType.Root, "EndCopy should only be called for Element and Document nodes.");
979Debug.Assert(text != null, "Invalid argument");
1020Debug.Fail($"Text cannot be output in the {_xstate} state.");
1036Debug.Assert(navigator != null);
1043Debug.Assert(nodeType == XPathNodeType.Element, "StartCopy should return true only for Element nodes.");
1174Debug.Assert(_xstate != XmlState.WithinSequence, "StartCopy should not called if state is WithinSequence");
1191Debug.Fail($"Unexpected node type {navigator.NodeType}");
1204Debug.Assert(navigator.NodeType == XPathNodeType.Element);
1205Debug.Assert(_xstate == XmlState.WithinContent, $"EndCopy cannot be called in the {_xstate} state.");
1218Debug.Assert(navigator.NodeType == XPathNodeType.Element, "Only elements have namespaces to copy");
1223Debug.Assert(navigator.LocalName.Length != 0, "xmlns:foo='' isn't allowed");
1256Debug.Assert(rootType == XPathNodeType.Element || rootType == XPathNodeType.Comment || rootType == XPathNodeType.ProcessingInstruction);
1287Debug.Assert(rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace);
1318Debug.Assert(_nsmgr != null);
1339Debug.Fail($"{xstate} is not a valid XmlState.");
1350Debug.Assert(prefix.Length != 0 && ns.Length != 0);
1398Debug.Assert(prefix != null && !string.IsNullOrEmpty(ns));
1504Debug.Assert(ValidateNames.ParseNCName(name.Name, 0) == name.Name.Length);
1553Debug.Assert(_stkNames != null);
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (22)
72Debug.Assert(data != null);
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.");
332Debug.Assert(_atomizedNames != null);
341Debug.Assert(_filters != null);
395Debug.Assert(_prefixMappingsList != null);
462Debug.Assert(_types != null);
480Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()),
483Debug.Assert(destinationType == typeof(object) || !destinationType.IsAssignableFrom(value.GetType()),
499Debug.Assert(xmlType != XmlQueryTypeFactory.Node && xmlType != XmlQueryTypeFactory.NodeS,
558Debug.Assert(destinationType.IsAssignableFrom(value.GetType()), $"ChangeType from type {value.GetType().Name} to type {destinationType.Name} failed");
680Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()), $"Xml type {xmlType} is not represented in ILGen as {value.GetType().Name}");
778Debug.Fail($"XmlTypeCode {code} was not fully handled.");
829Debug.Assert(_collations != null);
890Debug.Assert(context != null);
927Debug.Assert(context != null);
1078Debug.Assert(node.NodeType == XPathNodeType.Namespace);
System\Xml\Xsl\XmlQueryType.cs (11)
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");
509Debug.Assert(IsAtomicValue && baseType.IsAtomicValue);
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 (14)
63Debug.Assert(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union);
265Debug.Assert(itemType.IsSingleton, "All types should be prime.");
437Debug.Assert(schemaType.Datatype!.Variety == XmlSchemaDatatypeVariety.Atomic, "List or Union Xsd types should have been handled by caller.");
470Debug.Assert(!isNillable);
504Debug.Assert(nameTest != null, "nameTest cannot be null");
505Debug.Assert(schemaType != null, "schemaType cannot be null");
513Debug.Assert(!IsAtomicValue || schemaType.Datatype!.Variety == XmlSchemaDatatypeVariety.Atomic);
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.");
1182Debug.Fail($"Don't know how to serialize {type.GetType()}");
1201Debug.Fail("Unexpected XmlQueryType's subtype id");
System\Xml\Xsl\XPath\XPathBuilder.cs (32)
46Debug.Fail("Must not be called");
67Debug.Assert(!_inTheBuild, "XPathBuilder is busy!");
80Debug.Assert(_inTheBuild, "StartBuild() wasn't called");
92Debug.Assert(numFixupCurrent >= 0, "Context fixup error");
93Debug.Assert(numFixupPosition >= 0, "Context fixup error");
94Debug.Assert(numFixupLast >= 0, "Context fixup error");
115Debug.Assert(op != XPathOperator.Unknown);
118Debug.Assert((opGroup != XPathOperatorGroup.Negate && right != null) || (opGroup == XPathOperatorGroup.Negate && right == null));
129Debug.Fail($"{op} is not a valid XPathOperator");
136Debug.Assert(op == XPathOperator.Or || op == XPathOperator.And);
147Debug.Assert(compType == XmlTypeCode.Boolean || compType == XmlTypeCode.Double || compType == XmlTypeCode.String);
148Debug.Assert(compType == XmlTypeCode.Boolean || left.XmlType!.IsSingleton && right.XmlType!.IsSingleton, "Both comparison operands must be singletons");
161Debug.Fail("Wrong operator type");
169Debug.Assert(val.XmlType!.IsSingleton);
170Debug.Assert(compType == XmlTypeCode.Boolean || compType == XmlTypeCode.Double || compType == XmlTypeCode.String, "I don't know what to do with RTF here");
214Debug.Assert(op == XPathOperator.Eq || op == XPathOperator.Ne);
247Debug.Assert(op == XPathOperator.Lt || op == XPathOperator.Le || op == XPathOperator.Gt || op == XPathOperator.Ge);
278Debug.Assert(op == XPathOperator.UnaryMinus);
294Debug.Fail("Wrong operator type");
301Debug.Assert(op == XPathOperator.Union);
414Debug.Fail("Invalid EnumValue 'XPathAxis'");
457Debug.Assert(nodeset.NodeType == QilNodeType.DocOrderDistinct,
561Debug.Assert(!args.IsReadOnly, "Writable collection expected");
602Debug.Fail($"{func.id} is present in the function table, but absent from the switch");
853Debug.Assert(current != null);
866Debug.Assert(environment != null);
890Debug.Assert(unknown.NodeType == QilNodeType.Unknown);
933Debug.Assert(_last != null);
938Debug.Assert(unknown != null);
988Debug.Assert(maxArgs == 0 || maxArgs == Infinity || argTypes != null && argTypes.Length == maxArgs);
1024Debug.Assert(numArgs > maxArgs);
1046Debug.Assert(args.Count == 0 || argTypes != null);
System\Xml\Xsl\Xslt\InvokeGenerator.cs (8)
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");
104Debug.Assert(argName != null);
132Debug.Assert(_formalArgs![prevArg] != null, "formalArg must be in the list");
133Debug.Assert(_invokeArgs![prevArg] != null, "This arg should be compiled already");
151Debug.Assert(_invokeArgs[prevArg] is QilIterator);
System\Xml\Xsl\Xslt\QilGenerator.cs (56)
136Debug.Assert(compiler != null);
229Debug.Assert(IsDebug && _curLoop.IsFocusSet);
236Debug.Assert(!_curLoop.IsFocusSet && !_funcFocus.IsFocusSet, "Must be compiled using singleton focus");
436Debug.Assert(IsDebug, "This is debug only logic");
440Debug.Assert(var.XmlType!.IsSubtypeOf(T.NamespaceS));
441Debug.Assert(var.Binding is QilList);
450Debug.Assert(nsList[i].NodeType == QilNodeType.NamespaceDecl);
451Debug.Assert(varList[i].NodeType == QilNodeType.NamespaceDecl);
482Debug.Assert(tmpl != null && tmpl.Function == null);
483Debug.Assert(tmpl.NodeType == XslNodeType.AttributeSet || tmpl.NodeType == XslNodeType.Template);
512Debug.Assert(tmpl.NodeType == XslNodeType.Template);
606Debug.Assert((template != null) == (tmpl.SourceLine != null), "Templates must have line information, and attribute sets must not");
614Debug.Assert(!IsDebug, "In debug mode we don't generate parumWithCalls functions. Otherwise focus flags should be adjusted");
647Debug.Assert(tmpl != null && tmpl.Function != null && tmpl.Function.Definition.NodeType == QilNodeType.Unknown);
657Debug.Assert(tmpl is Template, "Only templates can have explicit arguments");
660Debug.Assert(arg.DefaultValue == null, "Argument must not be compiled yet");
704Debug.Assert(instructions != null);
747default: Debug.Fail($"Unexpected type of AST node: {nodeType}"); result = null; break;
751Debug.Assert(result != null, "Result of compilation should not be null");
987Debug.Assert(pos < source.Length);
1023Debug.Assert(i == source.Length || source[i] == '{');
1077Debug.Assert(avt != null);
1129Debug.Assert(_curLoop.IsFocusSet);
1183Debug.Assert(withParam.NodeType == XslNodeType.WithParam);
1219Debug.Assert(node.NodeType == XslNodeType.ApplyImports);
1220Debug.Assert(!_curLoop.IsFocusSet, "xsl:apply-imports cannot be inside of xsl:for-each");
1250Debug.Assert(tmpl.Function != null, "All templates should be already compiled");
1285Debug.Assert(attSet.Function != null, "All templates should be already compiled");
1421Debug.Assert(when.NodeType == XslNodeType.If || when.NodeType == XslNodeType.Otherwise);
1425Debug.Assert(result == null, "xsl:otherwise must be the last child of xsl:choose");
1464Debug.Assert(node.NodeType == XslNodeType.Variable);
1474Debug.Assert(node.NodeType == XslNodeType.Variable || node.NodeType == XslNodeType.Param || node.NodeType == XslNodeType.WithParam);
1506Debug.Assert(varValue.SourceLine == null);
1512Debug.Assert(withParam.NodeType == XslNodeType.WithParam);
1722Debug.Assert(result.XmlType == T.StringX);
1730Debug.Assert(sort.NodeType == XslNodeType.Sort);
1822Debug.Assert(0 < list.Count, "Pattern should have at least one filter");
1877Debug.Fail($"Unexpected NodeKind: {nodeKinds}");
2123Debug.Assert(num.Level == NumberLevel.Any);
2143Debug.Assert(sheet.TemplateMatches.Count == 0);
2227Debug.Assert(varPar.NodeType == XslNodeType.Variable || varPar.NodeType == XslNodeType.Param);
2263Debug.Assert(varPar.NodeType == XslNodeType.Variable || varPar.NodeType == XslNodeType.Param);
2350Debug.Assert(expr != null);
2379Debug.Assert(pttrn != null);
2405Debug.Assert(pttrn != null);
2519Debug.Assert(
2585Debug.Assert(actualArgs[actArg].NodeType == XslNodeType.WithParam, "All Sorts was removed in CompileSorts()");
2666Debug.Assert(actualArgs[i].NodeType == XslNodeType.WithParam, "All Sorts was removed in CompileSorts()");
2693Debug.Assert(actualArgs[0].Name == _nameCurrent, "Caller should always pass $current as a first argument to apply-* calls.");
2757Debug.Assert(
2798Debug.Assert(!IsDebug, "Attempt to override SourceLineInfo in debug mode");
2804Debug.Assert(n.SourceLine == null);
2828Debug.Assert(nsVar.XmlType!.IsSubtypeOf(T.NamespaceS));
2873Debug.Assert(let.NodeType == QilNodeType.Let);
2879Debug.Assert(0 <= varScope && varScope <= _vars.Count);
2890Debug.Assert(_vars.Count == 0, "Accumulated variables left unclaimed");
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (36)
28Debug.Assert(environment != null);
44Debug.Assert(!_inTheBuild, "XPathBuilder is busy!");
52Debug.Assert(filter.NodeType == QilNodeType.Filter, "XPathPatternBuilder expected to generate list of Filters on top level");
53Debug.Assert(filter.Variable.XmlType!.IsSubtypeOf(T.NodeNotRtf));
54Debug.Assert(filter.Variable.Binding!.NodeType == QilNodeType.Unknown); // fixupNode
55Debug.Assert(filter.Body.XmlType!.IsSubtypeOf(T.Boolean));
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");
80Debug.Assert(op == XPathOperator.Union);
81Debug.Assert(left != null);
82Debug.Assert(right != null);
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");
122Debug.Assert(
133Debug.Assert(nodeType == XPathNodeType.All && prefix == null && name == null, " // is the only d-o-s axes that we can have in pattern");
190Debug.Assert(left != null);
191Debug.Assert(right != null);
195Debug.Assert(nop.Child == _fixupNode);
199Debug.Assert(GetLastParent(left) == left, "Left is always single axis and never the step");
200Debug.Assert(left.NodeType == QilNodeType.Filter);
209Debug.Assert(nop.Child != null);
213Debug.Assert(right.NodeType == QilNodeType.Filter);
215Debug.Assert(lastParent != null);
226Debug.Fail("Should not call to this function.");
291Debug.Assert(prefix.Length == 0);
297Debug.Assert(
305Debug.Assert(name == "key", "Unexpected function");
306Debug.Assert(
355Debug.Assert(parent.NodeType == QilNodeType.Filter);
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.");
430Debug.Assert(current != null);
444Debug.Fail("GetPosition() must not be called");
450Debug.Fail("GetLast() must not be called");
System\Xml\Xsl\Xslt\XsltInput.cs (37)
43Debug.Assert(reader != null);
44Debug.Assert(atoms != null);
77Debug.Assert(tr.Settings == null, "XmlReader created with XmlReader.Create should always expand entities.");
201Debug.Assert(
244Debug.Assert(_reader.NodeType == XmlNodeType.EntityReference);
246Debug.Assert(local[0] == '#' || local == "lt" || local == "gt" || local == "quot" || local == "apos");
258Debug.Assert(_reader.NodeType == XmlNodeType.Text || _reader.NodeType == XmlNodeType.Whitespace || _reader.NodeType == XmlNodeType.SignificantWhitespace);
261Debug.Assert(_reader.NodeType == XmlNodeType.EndEntity);
273Debug.Assert(_reader.NodeType == XmlNodeType.Attribute, "reader.NodeType == XmlNodeType.Attribute");
323Debug.Assert(_reader.NodeType == XmlNodeType.Text, "Unexpected node type inside attribute value");
332Debug.Assert(_reader.NodeType != XmlNodeType.EntityReference);
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()");
441Debug.Assert(_nodeType == XmlNodeType.Text || _nodeType == XmlNodeType.Whitespace || _nodeType == XmlNodeType.SignificantWhitespace);
488Debug.Assert(_reader.NodeType == XmlNodeType.Element);
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");
650Debug.Assert(IsKeyword(_atoms.Version));
714Debug.Assert(NodeType == XmlNodeType.Element);
715Debug.Assert(attributes.Length <= _xsltAttributeNumber.Length);
750Debug.Assert(SS, "First we parse xsl:stylesheet element");
843Debug.Assert(NodeType == XmlNodeType.Element);
921Debug.Assert(NodeType == XmlNodeType.Element && IsXsltNamespace());
948Debug.Assert(extensions ? IsKeyword(_atoms.ExtensionElementPrefixes) : IsKeyword(_atoms.ExcludeResultPrefixes));
1001Debug.Assert(IsKeyword(_atoms.XPathDefaultNamespace));
1013Debug.Assert(IsKeyword(_atoms.DefaultCollation));
1095Debug.Assert(prefix != null);
1099Debug.Assert(Ref.Equal(_atoms.NameTable.Get(nsUri), nsUri), "Namespaces must be atomized");
1179Debug.Assert(input.NodeType == XmlNodeType.EndElement);
1184Debug.Assert(input.NodeType == XmlNodeType.Element || input.NodeType == XmlNodeType.Attribute);
System\Xml\Xsl\Xslt\XsltLoader.cs (42)
43Debug.Assert(compiler != null);
98Debug.Fail("Should never get here");
102Debug.Assert(compiler.Root != null);
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");
298Debug.Assert(_input.NodeType == XmlNodeType.Element);
323Debug.Assert(!_input.IsXsltNamespace());
324Debug.Assert(_curTemplate == null);
341Debug.Fail("AddTemplate() returned false for simplified stylesheet");
355Debug.Assert(_input.IsXsltNamespace() && (_input.IsKeyword(_atoms.Stylesheet) || _input.IsKeyword(_atoms.Transform)));
468Debug.Assert(_input.NodeType == XmlNodeType.Text);
825Debug.Assert(attSet != null);
836Debug.Assert(attSet.CycleCheck == CycleCheck.Processing);
837Debug.Assert(attSet.Content[0].SourceLine != null);
957Debug.Assert(NumCharAttrs == DefaultValues.Length);
973Debug.Assert(dummy, "One of the attrs should have lineInfo. If both are default they can't conflict.");
993Debug.Assert(name.Equals(format.Name));
1067Debug.Assert(setName != null, "Required attribute always != null");
1112Debug.Assert(_input.NodeType == XmlNodeType.Text);
1123Debug.Assert(_curTemplate == null);
1124Debug.Assert(!_input.CanHaveApplyImports);
1141Debug.Assert(_curTemplate == null);
1457Debug.Assert(_input.NodeType == XmlNodeType.Text);
1505Debug.Assert(_input.NodeType == XmlNodeType.Text);
1718Debug.Assert(_input.NodeType == XmlNodeType.Text);
1923Debug.Assert(nodeType != XslNodeType.Unknown);
2036Debug.Assert(_input.NodeType == XmlNodeType.Element);
2482Debug.Assert(_input.NodeType == XmlNodeType.Element);
2525Debug.Assert(content != null && withParam != null);
2526Debug.Assert(withParam.NodeType == XslNodeType.WithParam);
2539Debug.Assert(content != null);
2548Debug.Assert(content != null);
2802Debug.Assert(_input.IsRequiredAttribute(attNum), "It happened that @name as NCName is always required attribute");
2892Debug.Assert(_input.LocalName == "use-attribute-sets", "we are positioned on this attribute");
2893Debug.Assert(list != null && list.Count == 0, "It happened that we always add use-attribute-sets first. Otherwise we can't call list.Clear()");
2956Debug.Assert(!_input.IsRequiredAttribute(attNum), "All Yes/No attributes are optional.");
2976Debug.Assert(!_input.IsRequiredAttribute(attNum), "All 'type' attributes are optional.");
2985Debug.Assert(!_input.IsRequiredAttribute(attNum), "All 'validation' attributes are optional.");
3011Debug.Assert(!_input.IsRequiredAttribute(attNum), "All 'input-type-validation' attributes are optional.");
3075Debug.Assert(node != null);
3082Debug.Assert(node != null);
3092Debug.Assert(to != null);
System\Xml\Xsl\XsltOld\Processor.cs (44)
127Debug.Assert(_execResult == ExecResult.Continue);
141Debug.Assert(_resolver != null, "Constructor should create it if null passed");
150Debug.Assert(_sortArray != null, "InitSortArray() wasn't called");
201Debug.Assert(_sortArray != null, "InitSortArray() wasn't called");
436Debug.Assert(_actionStack != null);
444Debug.Assert(_builder != null);
476Debug.Assert(frame != null);
505Debug.Assert(_templateLookup != null);
512Debug.Assert(key != Compiler.InvalidQueryKey);
518Debug.Assert(key != Compiler.InvalidQueryKey);
533Debug.Assert(key != Compiler.InvalidQueryKey);
602Debug.Assert(nav.NodeType == XPathNodeType.Element);
721Debug.Assert(_builder != null);
731Debug.Assert(_xsm != null);
745Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State);
746Debug.Assert(ExecutionResult == ExecResult.Continue);
750Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State);
762Debug.Fail("Unexpected result of RecordBuilder.BeginEvent()");
774Debug.Assert(_xsm != null);
787Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State);
788Debug.Assert(ExecutionResult == ExecResult.Continue);
792Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State);
802Debug.Fail("Unexpected result of RecordBuilder.TextEvent()");
809Debug.Assert(_xsm != null);
823Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State);
827Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State,
837Debug.Fail("Unexpected result of RecordBuilder.TextEvent()");
865Debug.Fail("Invalid XPathNodeType in CopyBeginEvent");
894Debug.Fail("Invalid XPathNodeType in CopyTextEvent");
924Debug.Fail("Invalid XPathNodeType in CopyEndEvent");
933Debug.Assert(navigator != null);
956Debug.Assert(output != null);
967Debug.Assert(_builder != null);
1016Debug.Assert(saveStackSize == _actionStack.Length);
1018Debug.Assert(result != null, "Variable was just calculated and result can't be null");
1029Debug.Assert(1 < _actionStack.Length);
1042Debug.Assert(2 < _actionStack.Length);
1057Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
1069Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
1075Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
1077Debug.Assert(dbgFrame != null, "PushDebuggerStack() wasn't ever called");
1084Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
1085Debug.Assert(2 <= _debuggerStack!.Length);
1091Debug.Assert(this.Debugger != null, "We don't generate calls this function if ! debugger");
System.Private.Xml.Linq (33)
System.Reflection.Context (73)
System.Reflection.DispatchProxy (11)
System.Reflection.Emit (31)
System.Reflection.Metadata (316)
System.Reflection.MetadataLoadContext (157)
System.Resources.Extensions (54)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (32)
46Debug.Assert(value >= 0, "negative ResourceTypeCode. What?");
191Debug.Assert(index >= 0 && index < _numResources, $"Bad index into hash array. index: {index}");
195Debug.Assert(_nameHashes != null && _nameHashesPtr == null, "Internal state mangled.");
200Debug.Assert(_nameHashes == null && _nameHashesPtr != null, "Internal state mangled.");
207Debug.Assert(index >= 0 && index < _numResources, $"Bad index into name position array. index: {index}");
211Debug.Assert(_namePositions != null && _namePositionsPtr == null, "Internal state mangled.");
216Debug.Assert(_namePositions == null && _namePositionsPtr != null, "Internal state mangled.");
252Debug.Assert(_store != null, "ResourceReader is closed!");
333Debug.Assert(_store != null, "ResourceReader is closed!");
334Debug.Assert(Monitor.IsEntered(this)); // uses _store
376Debug.Assert(_store != null, "ResourceReader is closed!");
447Debug.Assert(_store != null, "ResourceReader is closed!");
471Debug.Assert(_store != null, "ResourceReader is closed!");
533Debug.Assert(_store != null, "ResourceReader is closed!");
534Debug.Assert(_version == 1, ".resources file was not a V1 .resources file!");
535Debug.Assert(Monitor.IsEntered(this)); // uses _store
555Debug.Assert(Monitor.IsEntered(this)); // uses _store
615Debug.Assert(_store != null, "ResourceReader is closed!");
616Debug.Assert(_version >= 2, ".resources file was not a V2 (or higher) .resources file!");
617Debug.Assert(Monitor.IsEntered(this)); // uses _store
637Debug.Assert(Monitor.IsEntered(this)); // uses _store
723Debug.Assert(r == len, "ResourceReader needs to use a blocking read here. (Call _store.ReadBytes(len)?)");
775Debug.Assert(!Monitor.IsEntered(this)); // only called during init
776Debug.Assert(_store != null, "ResourceReader is closed!");
798Debug.Assert(!Monitor.IsEntered(this)); // only called during init
987Debug.Assert(Monitor.IsEntered(this)); // uses _store
995Debug.Assert(_typeTable[typeIndex] != null, "Should have found a type!");
1026Debug.Assert(typeCode >= 0, "can't be negative");
1027Debug.Assert(Monitor.IsEntered(this)); // uses _store
1031Debug.Assert(!string.Equals(typeCode.ToString(), "LastPrimitive"), "Change ResourceTypeCode metadata order so LastPrimitive isn't what Enum.ToString prefers.");
1037Debug.Assert(typeIndex >= 0 && typeIndex < _typeTable.Length, "TypeCode is broken or corrupted!");
1111Debug.Assert(!Monitor.IsEntered(_reader));
System.Resources.Writer (8)
System.Runtime (1)
System.Runtime.Caching (125)
System\Runtime\Caching\CacheExpires.cs (50)
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");
567Debug.WriteLine("CacheExpiresRemove",
594Debug.Assert(cacheEntry == entries[entryIndex]._cacheEntry);
610Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
628Debug.Assert(!_blockReduce, "_blockReduce == false");
695Debug.Assert(!inFlushHead.IsInvalid, "!inFlushHead.IsInvalid");
709Debug.Assert(cacheEntry.ExpiresEntryRef.IsInvalid, "cacheEntry.ExpiresEntryRef.IsInvalid");
738Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
775Debug.Assert(NUMBUCKETS < byte.MaxValue);
System\Runtime\Caching\CacheUsage.cs (60)
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");
682Debug.Assert(maxFlush > 0, $"maxFlush is not greater than 0, instead is {maxFlush}");
683Debug.Assert(_cEntriesInFlush == 0, "_cEntriesInFlush == 0");
700Debug.Assert(!_blockReduce, "_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.InteropServices (3)
System.Runtime.Numerics (427)
System.Runtime.Serialization.Formatters (56)
System.Runtime.Serialization.Schema (46)
System\Runtime\Serialization\Schema\CodeExporter.cs (43)
262Debug.Assert(classContract.Is(DataContractType.ClassDataContract));
314Debug.Assert(contractCodeDomInfo.TypeReference != null);
496Debug.Assert(containingContractCodeDomInfo.TypeDeclaration != null, "Nested types have containing types by definition - types with declaration");
513Debug.Assert(containingContractCodeDomInfo.TypeReference != null, "Nested types have containing types by definition - types with reference");
530Debug.Assert(assemblyName.Name != null, $"Current executing assembly name is not expected to be null in {nameof(CodeExporter)}.{nameof(CreateTypeDeclaration)} scenario");
587Debug.Assert(typeReference != null);
612Debug.Assert(collectionContract.Is(DataContractType.CollectionDataContract));
620Debug.Assert(collectionContract.BaseContract != null, "BaseContract should not be null for CollectionDataContract");
643Debug.Assert(collectionContract.Is(DataContractType.CollectionDataContract));
644Debug.Assert(collectionContract.BaseContract != null, "BaseContract should not be null for CollectionDataContract");
661Debug.Assert(collectionContract.Is(DataContractType.CollectionDataContract));
662Debug.Assert(collectionContract.BaseContract != null, "BaseContract should not be null for CollectionDataContract");
674Debug.Assert(itemContract != null);
675Debug.Assert(itemContract.DataMembers.Count >= 2);
793Debug.Assert(classDataContract.Is(DataContractType.ClassDataContract));
800Debug.Assert(contractCodeDomInfo.TypeDeclaration != null);
834Debug.Assert(baseContractCodeDomInfo.IsProcessed, "Cannot generate code for type if code for base type has not been generated");
835Debug.Assert(baseContractCodeDomInfo.TypeReference != null, "Class data contracts should have non-null TypeReference");
841Debug.Assert(actualType != null); // If we're in this if condition, then we should be able to get a Type
949Debug.Assert(classDataContract.Is(DataContractType.ClassDataContract));
986Debug.Assert(classDataContract.Is(DataContractType.ClassDataContract));
987Debug.Assert(classDataContract.KnownDataContracts != null);
999Debug.Assert(classDataContract.Is(DataContractType.ClassDataContract));
1009Debug.Assert(contractCodeDomInfo.TypeDeclaration != null);
1074Debug.Assert(enumDataContract.Is(DataContractType.EnumDataContract));
1081Debug.Assert(contractCodeDomInfo.TypeDeclaration != null);
1085Debug.Assert(enumDataContract.BaseContract != null, "BaseContract should not be null for EnumDataContract");
1124Debug.Assert(classDataContract.Is(DataContractType.ClassDataContract));
1138Debug.Assert(contractCodeDomInfo.TypeDeclaration != null);
1171Debug.Assert(baseContractCodeDomInfo.TypeReference != null, "Class data contracts should have non-null TypeReference");
1176Debug.Assert(actualType != null); // If we're in this if condition, then we should be able to get a Type
1186Debug.Assert(keyValueContract == null || keyValueContract.Is(DataContractType.ClassDataContract));
1208Debug.Assert(collectionContract.Is(DataContractType.CollectionDataContract));
1223Debug.Assert(collectionContract.BaseContract != null, "BaseContract should not be null for CollectionDataContract");
1255Debug.Assert(contractCodeDomInfo.TypeDeclaration != null);
1256Debug.Assert(baseTypeReference != null, "Base type reference should not be null for Dictionary/List collection data contracts");
1265Debug.Assert(itemName != null, "ItemName is never null for Collection contracts.");
1270Debug.Assert(keyName != null);
1271Debug.Assert(valueName != null);
1288Debug.Assert(contractCodeDomInfo.TypeDeclaration != null);
1394Debug.Assert(contractCodeDomInfo.TypeDeclaration != null);
1517Debug.Assert(clrNamespace != null);
1518Debug.Assert(codeNamespace != null);
System.Security.AccessControl (28)
System.Security.Cryptography (987)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\DSACng.ImportExport.cs (9)
215Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB)}");
225Debug.Assert(offset == blobSize, $"Expected offset = blobSize, got {offset} != {blobSize}");
280Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB_V2), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB_V2), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB_V2)}");
290Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB_V2), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB_V2), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB_V2)}");
307Debug.Assert(offset == blobSize, $"Expected offset = blobSize, got {offset} != {blobSize}");
363Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB)}");
374Debug.Assert(magic == KeyBlobMagicNumber.BCRYPT_DSA_PUBLIC_MAGIC_V2 || magic == KeyBlobMagicNumber.BCRYPT_DSA_PRIVATE_MAGIC_V2);
395Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB_V2), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB_V2), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB_V2)}");
415Debug.Assert(offset == dsaBlob.Length, $"Expected offset = dsaBlob.Length, got {offset} != {dsaBlob.Length}");
System.Security.Cryptography.Cose (47)
System.Security.Cryptography.Pkcs (177)
System.Security.Cryptography.ProtectedData (8)
System.Security.Cryptography.Xml (75)
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.Security.Principal.Windows (14)
System.ServiceModel.Federation (1)
System.ServiceModel.Primitives (1)
System.ServiceModel.Syndication (27)
System.ServiceProcess.ServiceController (6)
System.Speech (202)
System.Text.Encoding.CodePages (186)
System\Text\DBCSCodePageEncoding.cs (39)
87Debug.Assert(m_codePageHeader?.Length > 0);
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");
251Debug.Assert(bytesRead == m_dataSize, "s_codePagesEncodingDataStream.Read should have read a full buffer.");
392Debug.Assert((arrayTemp.Length / 2) < 20,
514Debug.Assert(count >= 0, "[DBCSCodePageEncoding.GetByteCount]count is negative");
515Debug.Assert(chars != null, "[DBCSCodePageEncoding.GetByteCount]chars is null");
518Debug.Assert(EncoderFallback != null, "[DBCSCodePageEncoding.GetByteCount]Attempting to use null fallback");
545Debug.Assert(char.IsHighSurrogate(charLeftOver), "[DBCSCodePageEncoding.GetByteCount]leftover character should be high surrogate");
546Debug.Assert(encoder != null,
610Debug.Assert(bytes != null, "[DBCSCodePageEncoding.GetBytes]bytes is null");
611Debug.Assert(byteCount >= 0, "[DBCSCodePageEncoding.GetBytes]byteCount is negative");
612Debug.Assert(chars != null, "[DBCSCodePageEncoding.GetBytes]chars is null");
613Debug.Assert(charCount >= 0, "[DBCSCodePageEncoding.GetBytes]charCount is negative");
616Debug.Assert(EncoderFallback != null, "[DBCSCodePageEncoding.GetBytes]Attempting to use null encoder fallback");
636Debug.Assert(charLeftOver == 0 || char.IsHighSurrogate(charLeftOver),
651Debug.Assert(encoder != null,
684Debug.Assert(encoder == null,
707Debug.Assert(chars > charStart,
726Debug.Assert(chars > charStart,
759Debug.Assert(bytes != null, "[DBCSCodePageEncoding.GetCharCount]bytes is null");
760Debug.Assert(count >= 0, "[DBCSCodePageEncoding.GetCharCount]byteCount is negative");
776Debug.Assert(decoder == null ||
796Debug.Assert(fallbackBuffer == null,
821Debug.Assert(fallbackBuffer == null,
896Debug.Assert(decoder == null || !decoder.m_throwOnOverflow ||
908Debug.Assert(bytes != null, "[DBCSCodePageEncoding.GetChars]bytes is null");
909Debug.Assert(byteCount >= 0, "[DBCSCodePageEncoding.GetChars]byteCount is negative");
910Debug.Assert(chars != null, "[DBCSCodePageEncoding.GetChars]chars is null");
911Debug.Assert(charCount >= 0, "[DBCSCodePageEncoding.GetChars]charCount is negative");
929Debug.Assert(decoder == null || !decoder.m_throwOnOverflow ||
950Debug.Assert(fallbackBuffer == null,
976Debug.Assert(fallbackBuffer == null,
1054Debug.Assert(bytes >= byteStart + byteBuffer.Length,
1068Debug.Assert(bytes > byteStart,
1073Debug.Assert(bytes > byteStart,
1099Debug.Assert(decoder == null || !decoder.m_throwOnOverflow ||
System\Text\GB18030Encoding.cs (13)
166Debug.Assert(count4Byte <= GBLast4ByteCode,
186Debug.Assert(unicodeCount == 0,
190Debug.Assert(count4Byte == GBLast4ByteCode + 1,
217Debug.Assert(byteCount >= 0, "[GB18030Encoding.GetBytes]byteCount is negative");
218Debug.Assert(chars != null, "[GB18030Encoding.GetBytes]chars is null");
219Debug.Assert(charCount >= 0, "[GB18030Encoding.GetBytes]charCount is negative");
222Debug.Assert(EncoderFallback != null, "[GB18030Encoding.GetBytes]Attempting to use null encoder fallback");
244Debug.Assert(char.IsHighSurrogate(charLeftOver),
274Debug.Assert(offset < 0x6f,
324Debug.Assert(iBytes < 0x7e,
402Debug.Assert(bytes != null, "[GB18030Encoding.GetChars]bytes is null");
403Debug.Assert(byteCount >= 0, "[GB18030Encoding.GetChars]byteCount is negative");
405Debug.Assert(charCount >= 0, "[GB18030Encoding.GetChars]charCount is negative");
System\Text\ISCIIEncoding.cs (32)
60Debug.Assert(_defaultCodePage >= CodeDevanagari && _defaultCodePage <= CodePunjabi,
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");
239Debug.Assert(currentCodePage >= CodeDevanagari && currentCodePage <= CodePunjabi,
254Debug.Assert((indicTwoBytes >> 12) > 0 && (indicTwoBytes >> 12) <= 3,
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");
352Debug.Assert(currentCodePage >= CodeDevanagari && currentCodePage <= CodePunjabi,
372Debug.Assert(((bLastVirama ? 1 : 0) + (bLastATR ? 1 : 0) +
431Debug.Assert(!bLastVirama, "[ISCIIEncoding.GetChars] Expected no bLastVirama in bLastATR mode");
432Debug.Assert(!bLastDevenagariStressAbbr, "[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, "[ISCIIEncoding.GetChars] Expected no bLastATR in bLastVirama mode");
463Debug.Assert(!bLastDevenagariStressAbbr, "[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, "[ISCIIEncoding.GetChars] Expected no bLastATR in bLastDevenagariStressAbbr mode");
499Debug.Assert(!bLastVirama, "[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, "[ISCIIEncoding.GetChars] Expected no bLastATR in cLastCharForNextNukta mode");
529Debug.Assert(!bLastVirama, "[ISCIIEncoding.GetChars] Expected no bLastVirama in cLastCharForNextNukta mode");
530Debug.Assert(!bLastDevenagariStressAbbr, "[ISCIIEncoding.GetChars] Expected no bLastDevenagariStressAbbr in cLastCharForNextNukta mode");
535Debug.Assert(!bLastSpecial && !bLastDevenagariStressAbbr && !bLastVirama && !bLastATR &&
554Debug.Assert(currentCodePageIndex != -1, "[ISCIIEncoding.GetChars]Expected valid currentCodePageIndex != -1");
600Debug.Assert(currentCodePage == CodeDevanagari && b == DevenagariExt,
652Debug.Assert(!decoder.MustFlush || !decoder.m_throwOnOverflow,
System\Text\ISO2022Encoding.cs (24)
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");
314Debug.Fail("[ISO2022Encoding.GetChars] had unexpected code page");
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 (37)
62Debug.Assert(m_codePageHeader?.Length > 0);
68Debug.Assert(pCodePage->CodePage == dataTableCodePage,
103Debug.Assert(bytesRead == buffer.Length, "s_codePagesEncodingDataStream.Read should have read a full buffer.");
156Debug.Assert(bytesRead == buffer.Length, "s_codePagesEncodingDataStream.Read should have read a full buffer.");
171Debug.Assert(arrayTemp[byteTemp] == UNKNOWN_CHAR, $"[SBCSCodePageEncoding::ReadBestFitTable] Expected unallocated byte (not 0x{(int)arrayTemp[byteTemp]:X2}) for best fit byte at 0x{byteTemp:X2} for code page {CodePage}");
270Debug.Assert(arrayTemp[iBestFitCount - 1] != (char)0,
290Debug.Assert(count >= 0, "[SBCSCodePageEncoding.GetByteCount]count is negative");
291Debug.Assert(chars != null, "[SBCSCodePageEncoding.GetByteCount]chars is null");
294Debug.Assert(EncoderFallback != null, "[SBCSCodePageEncoding.GetByteCount]Attempting to use null fallback");
306Debug.Assert(charLeftOver == 0 || char.IsHighSurrogate(charLeftOver),
311Debug.Assert(!encoder.m_throwOnOverflow || !encoder.InternalHasFallbackBuffer ||
352Debug.Assert(encoder != null, "[SBCSCodePageEncoding.GetByteCount]Expect to have encoder if we have a charLeftOver");
405Debug.Assert(fallbackBuffer == null || fallbackBuffer.Remaining == 0,
415Debug.Assert(bytes != null, "[SBCSCodePageEncoding.GetBytes]bytes is null");
416Debug.Assert(byteCount >= 0, "[SBCSCodePageEncoding.GetBytes]byteCount is negative");
417Debug.Assert(chars != null, "[SBCSCodePageEncoding.GetBytes]chars is null");
418Debug.Assert(charCount >= 0, "[SBCSCodePageEncoding.GetBytes]charCount is negative");
421Debug.Assert(EncoderFallback != null, "[SBCSCodePageEncoding.GetBytes]Attempting to use null encoder fallback");
433Debug.Assert(charLeftOver == 0 || char.IsHighSurrogate(charLeftOver),
438Debug.Assert(!encoder.m_throwOnOverflow || !encoder.InternalHasFallbackBuffer ||
537Debug.Assert(encoder != null, "[SBCSCodePageEncoding.GetBytes]Expect to have encoder if we have a charLeftOver");
596Debug.Assert(chars > charStart, "[SBCSCodePageEncoding.GetBytes]Expected chars to have advanced (fallback)");
612Debug.Assert(fallbackBuffer == null || !fallbackHelper.bFallingBack, "[SBCSCodePageEncoding.GetBytes]Expected to NOT be falling back");
615Debug.Assert(chars > charStart, "[SBCSCodePageEncoding.GetBytes]Expected chars to have advanced (normal)");
640Debug.Assert(fallbackBuffer == null || fallbackBuffer.Remaining == 0, "[SBCSEncoding.GetBytes]Expected Empty fallback buffer at end");
649Debug.Assert(bytes != null, "[SBCSCodePageEncoding.GetCharCount]bytes is null");
650Debug.Assert(count >= 0, "[SBCSCodePageEncoding.GetCharCount]byteCount is negative");
669Debug.Assert(!decoder.m_throwOnOverflow || !decoder.InternalHasFallbackBuffer ||
727Debug.Assert(fallbackBuffer == null || fallbackBuffer.Remaining == 0,
738Debug.Assert(bytes != null, "[SBCSCodePageEncoding.GetChars]bytes is null");
739Debug.Assert(byteCount >= 0, "[SBCSCodePageEncoding.GetChars]byteCount is negative");
740Debug.Assert(chars != null, "[SBCSCodePageEncoding.GetChars]chars is null");
741Debug.Assert(charCount >= 0, "[SBCSCodePageEncoding.GetChars]charCount is negative");
765Debug.Assert(!decoder.m_throwOnOverflow || !decoder.InternalHasFallbackBuffer ||
849Debug.Assert(bytes > byteStart,
868Debug.Assert(bytes > byteStart,
884Debug.Assert(fallbackBuffer == null || fallbackBuffer.Remaining == 0,
System.Text.Encodings.Web (45)
System.Text.Json (1540)
System\Text\Json\BitStack.cs (13)
80Debug.Assert(index >= 0, $"Set - Negative - index: {index}, arrayLength: {_array.Length}");
83Debug.Assert(_array.Length <= int.MaxValue / 32 + 1, $"index: {index}, arrayLength: {_array.Length}");
92Debug.Assert(index >= 0 && index > (int)((uint)_array.Length * 32 - 1), $"Only grow when necessary - index: {index}, arrayLength: {_array.Length}");
96Debug.Assert(elementIndex < _array.Length, $"Set - index: {index}, elementIndex: {elementIndex}, arrayLength: {_array.Length}, extraBits: {extraBits}");
144Debug.Assert(_array is not null);
145Debug.Assert(index >= 0, $"Get - Negative - index: {index}, arrayLength: {_array.Length}");
149Debug.Assert(elementIndex < _array.Length, $"Get - index: {index}, elementIndex: {elementIndex}, arrayLength: {_array.Length}, extraBits: {extraBits}");
164Debug.Assert(_array is not null);
165Debug.Assert(_array.Length < int.MaxValue / 2, $"Array too large - arrayLength: {_array.Length}");
166Debug.Assert(minSize >= 0 && minSize >= _array.Length);
169Debug.Assert(nextDouble > minSize);
179Debug.Assert(_currentDepth == 0, "Only call SetFirstBit when depth is 0");
189Debug.Assert(_currentDepth == 0, "Only call ResetFirstBit when depth is 0");
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (15)
58Debug.Assert(EnumConverterFactory.Helpers.IsSupportedTypeCode(s_enumTypeCode));
147Debug.Assert(s_isFlagsEnum, "Should only be entered by flags enums.");
207Debug.Assert(s_isFlagsEnum || dictionaryKeyPolicy is not null, "Should only be entered by flags enums or dictionary key policy.");
238Debug.Assert(reader.TokenType is JsonTokenType.String or JsonTokenType.PropertyName);
368Debug.Assert(s_isSignedEnum);
398Debug.Assert(IsDefinedValueOrCombinationOfValues(key), "must only be invoked against valid enum values.");
399Debug.Assert(
432Debug.Assert(remainingBits == 0 && sb.Length > 0, "unexpected remaining bits or empty string.");
437Debug.Assert(dictionaryKeyPolicy is not null);
448Debug.Fail("should not have been reached.");
520Debug.Assert(allowsString || allowsNumber, "EnumConverter must allow strings, numbers, or both.");
535Debug.Assert(names.Length == values.Length);
614Debug.Assert(JsonName.Equals(other.JsonName, StringComparison.OrdinalIgnoreCase), "The conflicting entry must be equal up to case insensitivity.");
659Debug.Assert(input.Equals(JsonName.AsSpan(), StringComparison.OrdinalIgnoreCase), "Must equal the field name up to case insensitivity.");
669Debug.Assert(conflictingFields.Count > 0);
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (35)
29Debug.Assert(_effectiveConverter is not null);
140Debug.Assert(!IsConfigured);
371Debug.Assert(declaringTypeInfo is null || declaringType.IsAssignableFrom(declaringTypeInfo.Type));
385Debug.Assert(!info.IsForTypeInfo);
386Debug.Assert(!info.CanSerialize);
387Debug.Assert(!info.CanDeserialize);
413Debug.Assert(DeclaringTypeInfo is not null);
414Debug.Assert(!IsConfigured);
458Debug.Assert(!IgnoreNullTokensOnRead);
472Debug.Assert(Name is not null);
501Debug.Assert(Options.DefaultIgnoreCondition == JsonIgnoreCondition.Never);
523Debug.Assert(EffectiveConverter is not null, "Must have calculated the effective converter.");
527Debug.Assert(MemberType is 0 or MemberTypes.Field or MemberTypes.Property);
560Debug.Assert(DeclaringTypeInfo is not null, "We should have ensured parent is assigned in JsonTypeInfo");
561Debug.Assert(!DeclaringTypeInfo.IsConfigured);
588Debug.Assert(DeclaringTypeInfo is not null, "We should have ensured parent is assigned in JsonTypeInfo");
589Debug.Assert(!IsConfigured, "Should not be called post-configuration.");
590Debug.Assert(_jsonTypeInfo is not null, "Must have already been determined on configuration.");
615Debug.Assert(EffectiveConverter is not null, "Must have calculated the effective converter.");
616Debug.Assert(DeclaringTypeInfo is not null, "We should have ensured parent is assigned in JsonTypeInfo");
617Debug.Assert(!IsConfigured, "Should not be called post-configuration.");
657Debug.Assert(_jsonTypeInfo is not null);
658Debug.Assert(_jsonTypeInfo.IsConfigurationStarted);
704Debug.Assert(EffectiveConverter.ElementType != null);
756Debug.Assert(MemberType == MemberTypes.Property || MemberType == MemberTypes.Field || MemberType == default);
794Debug.Assert(_name is not null);
874Debug.Assert(propValue is Nodes.JsonObject);
889Debug.Assert(dictionaryValueInfo is JsonTypeInfo<TValue>);
916Debug.Assert(this == state.Current.JsonTypeInfo.ExtensionDataProperty);
959Debug.Assert(EffectiveConverter.CanPopulate, "Property is marked with Populate but converter cannot populate. This should have been validated in Configure");
960Debug.Assert(state.Parent.ReturnValue is not null, "Parent object is null");
961Debug.Assert(!state.Current.IsPopulating, "We've called TryGetPrePopulatedValue more than once");
972Debug.Assert(_jsonTypeInfo?.IsConfigurationStarted == true);
1069Debug.Assert(IsConfigured);
1074Debug.Assert(!IsConfigured);
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (11)
60Debug.Assert(createObject is null or Func<object> or Func<T>);
66Debug.Assert(_createObject is null);
67Debug.Assert(_typedCreateObject is null);
73Debug.Assert(_createObject is null);
74Debug.Assert(_typedCreateObject is null);
93Debug.Assert(createObject is Func<object>);
146Debug.Assert(deconstructor is null or Func<object, (Type?, object?)> or Func<T, (Type?, object?)>);
162Debug.Assert(deconstructor is Func<object, (Type?, object?)>);
204Debug.Assert(constructor is null or Func<Type, object?, object> or Func<Type, object?, T>);
220Debug.Assert(constructor is Func<Type, object?, object>);
243Debug.Assert(!IsReadOnly, "We should not mutate read-only JsonTypeInfo");
System.Text.Json.SourceGeneration (74)
System.Text.RegularExpressions (549)
System\Text\RegularExpressions\RegexCompiler.cs (99)
381Debug.Assert(_pool != null);
382Debug.Assert(_local != null);
383Debug.Assert(!_pool.Contains(_local));
392Debug.Assert(_regexTree != null);
413Debug.Assert(minRequiredLength >= 0);
491Debug.Fail($"Unexpected mode: {_regexTree.FindOptimizations.FindMode}");
782Debug.Assert(opts.FindMode is FindNextStartingPositionMode.LeadingString_LeftToRight or
837Debug.Assert(!string.IsNullOrEmpty(prefix));
869Debug.Assert(_regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
943Debug.Assert(primarySet.Chars.Length > 0);
1125Debug.Assert(needLoop);
1141Debug.Assert(setIndex is 0 or 1);
1144Debug.Assert(needLoop);
1200Debug.Assert(_regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
1203Debug.Assert(set.Distance == 0);
1207Debug.Assert(!set.Negated);
1271Debug.Assert(_regexTree.FindOptimizations.LiteralAfterLoop is not null);
1274Debug.Assert(target.LoopNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic);
1275Debug.Assert(target.LoopNode.N == int.MaxValue);
1305Debug.Assert(target.Literal.StringComparison is StringComparison.Ordinal);
1451Debug.Assert(_regexTree != null);
1457Debug.Assert(node.Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
1458Debug.Assert(node.ChildCount() == 1, "Capture nodes should have one child");
1639Debug.Assert(requiredLength > 0);
1673Debug.Assert(node.Kind is RegexNodeKind.Alternate, $"Unexpected type: {node.Kind}");
1674Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
1677Debug.Assert(childCount >= 2);
1684Debug.Assert(node.Parent is not null);
1885Debug.Assert(sliceStaticPos == 0);
1948Debug.Assert(startingLiteralNode is not null, "Unexpectedly couldn't find the branch starting node.");
1953Debug.Assert(numChars != 0);
2028Debug.Assert(startingLiteralNode is not null, "Unexpectedly couldn't find the branch starting node.");
2090Debug.Assert(sliceStaticPos == 0);
2095Debug.Assert(multi.Kind is RegexNodeKind.Multi, $"Expected a Multi node, got {multi.Kind}");
2105Debug.Assert(node.Kind is RegexNodeKind.Backreference, $"Unexpected type: {node.Kind}");
2295Debug.Assert(node.Kind is RegexNodeKind.BackreferenceConditional, $"Unexpected type: {node.Kind}");
2296Debug.Assert(node.ChildCount() == 2, $"Expected 2 children, found {node.ChildCount()}");
2394Debug.Assert(needsEndConditional);
2454Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
2455Debug.Assert(node.ChildCount() == 3, $"Expected 3 children, found {node.ChildCount()}");
2593Debug.Assert(resumeAt is not null);
2647Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}");
2648Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2751Debug.Assert(startingCapturePos != null);
2773Debug.Assert(node.Kind is RegexNodeKind.PositiveLookaround, $"Unexpected type: {node.Kind}");
2774Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2817Debug.Assert(node.Kind is RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}");
2818Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2941Debug.Assert(sliceStaticPos == 0, "This should be the first node and thus static position shouldn't have advanced.");
3070Debug.Fail($"Unexpected node type: {node.Kind}");
3076Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround or RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
3077Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional ? node.ChildCount() >= 1 : node.ChildCount() == 1, $"Unexpected number of children: {node.ChildCount()}");
3120Debug.Assert(node.Kind is RegexNodeKind.UpdateBumpalong, $"Unexpected type: {node.Kind}");
3140Debug.Assert(node.Kind is RegexNodeKind.Concatenate, $"Unexpected type: {node.Kind}");
3141Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
3211Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
3214Debug.Assert(!rtl || offset is null);
3286Debug.Assert(node.Kind is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary or RegexNodeKind.ECMABoundary or RegexNodeKind.NonECMABoundary, $"Unexpected type: {node.Kind}");
3346Debug.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}");
3347Debug.Assert((node.Options & RegexOptions.RightToLeft) == 0 || sliceStaticPos == 0);
3348Debug.Assert(sliceStaticPos >= 0);
3350Debug.Assert(sliceStaticPos >= 0);
3484Debug.Assert(node.Kind is RegexNodeKind.Multi, $"Unexpected type: {node.Kind}");
3490Debug.Assert(str.Length >= 2);
3494Debug.Assert(emitLengthCheck);
3536Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop, $"Unexpected type: {node.Kind}");
3556Debug.Assert(node.M < node.N);
3811Debug.Assert(node.Kind is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy, $"Unexpected type: {node.Kind}");
3828Debug.Assert(node.M < node.N);
4158Debug.Assert(node.Kind is RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
4159Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4160Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
4161Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
4267Debug.Assert(sliceStaticPos == 0);
4347Debug.Assert(entriesPerIteration >= 1);
4506Debug.Assert(entriesPerIteration >= 1);
4530Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
4680Debug.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}");
4696Debug.Assert(node.N > node.M);
4927Debug.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}");
4928Debug.Assert(node.M == 0 && node.N == 1);
5016Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
5017Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
5018Debug.Assert(node.M == node.N, $"Unexpected M={node.M} == N={node.N}");
5019Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
5020Debug.Assert(!analysis.MayBacktrack(node.Child(0)), $"Expected non-backtracking node {node.Kind}");
5054Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
5055Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
5056Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
5057Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
5179Debug.Assert(sliceStaticPos == 0);
5333Debug.Assert(startingStackpos is not null);
5488Debug.Assert(!negate, "Negation isn't appropriate for a multi");
5587Debug.Fail("We should never get here. This method should only be called if CanEmitIndexOf returned true, and all of the same cases should be covered.");
5609Debug.Assert(count >= 1);
6028Debug.Assert(rangeLower.LowInclusive != rangeUpper.LowInclusive);
6480Debug.Assert(chars.Length > 3, $"chars.Length == {chars.Length}");
6519Debug.Assert(values is char[] or string[]);
6520Debug.Assert(comparison is StringComparison.Ordinal || values is string[]);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (37)
171Debug.Assert(builder._solver is UInt64Solver or BitVectorSolver, $"Unsupported solver: {builder._solver}");
178Debug.Assert(solverMinterms is not null);
221Debug.Assert(CharKind.General == 0);
295Debug.Assert(Solver.IsEmpty(Solver.And(Solver.Not(_builder._wordLetterForBoundariesSet), minterm)));
340Debug.Assert(_checkTimeout);
356Debug.Assert(startat >= 0 && startat <= input.Length, $"{nameof(startat)} == {startat}, {nameof(input.Length)} == {input.Length}");
357Debug.Assert(perThreadData is not null);
416Debug.Assert(matchEnd >= startat - 1);
462Debug.Fail($"Unexpected reversal kind: {_optimizedReversalInfo.Kind}");
865Debug.Assert(i >= 0, $"{nameof(i)} == {i}");
866Debug.Assert(matchStartBoundary >= 0 && matchStartBoundary <= input.Length, $"{nameof(matchStartBoundary)} == {matchStartBoundary}");
867Debug.Assert(i >= matchStartBoundary, $"Expected {i} >= {matchStartBoundary}.");
888Debug.Assert(i >= matchStartBoundary);
894Debug.Assert(lastStart != -1, "We expected to find a starting position but didn't.");
930Debug.Assert(lastStart != -1);
977Debug.Assert(lastStart != -1);
1021Debug.Assert(perThreadData.Current is not null && perThreadData.Next is not null);
1032Debug.Assert(next.Count == 0);
1061Debug.Assert(coreStateId != _deadStateId);
1082Debug.Assert(current.Count > 0);
1095Debug.Fail("No nullable state found in the set of end states");
1159Debug.Assert(CaptureStarts.Length == other.CaptureStarts.Length);
1160Debug.Assert(CaptureEnds.Length == other.CaptureEnds.Length);
1272Debug.Assert(dfaStateId > 0, $"Expected non-zero {nameof(dfaStateId)}.");
1344Debug.Assert(state.DfaStateId < 0, $"Expected negative {nameof(state.DfaStateId)}.");
1345Debug.Assert(state.NfaState is not null, $"Expected non-null {nameof(state.NfaState)}.");
1548Debug.Assert(matcher._findOpts is not null);
1560Debug.Assert(pos == input.Length);
1579Debug.Assert(matcher._findOpts is not null);
1580Debug.Assert(lookup is not null, $"{nameof(NoZAnchorFindOptimizationsInitialStateHandler)} must only be used with call sites that pass non-null {nameof(lookup)}.");
1591Debug.Assert(pos == input.Length);
1610Debug.Assert(!matcher._containsAnyAnchor);
1611Debug.Assert(matcher._findOpts is not null);
1612Debug.Assert(currentStateId == matcher._initialStateId, "There are no anchors, so the current state should be the sole initial state.");
1621Debug.Assert(pos == input.Length);
1659Debug.Assert(!matcher._pattern._info.ContainsSomeAnchor);
1688Debug.Assert(!matcher._pattern._info.ContainsSomeAnchor);
System.Text.RegularExpressions.Generator (234)
RegexGenerator.Emitter.cs (93)
522Debug.Assert(chars.Length > 3);
864Debug.Assert(minRequiredLength >= 0);
918Debug.Fail($"Unexpected mode: {regexTree.FindOptimizations.FindMode}");
1152Debug.Assert(!string.IsNullOrEmpty(substring));
1159Debug.Assert(!string.IsNullOrEmpty(substring));
1163Debug.Assert(!string.IsNullOrEmpty(regexTree.FindOptimizations.FixedDistanceLiteral.String));
1173Debug.Fail($"Unexpected mode: {opts.FindMode}");
1232Debug.Assert(opts.FindMode is FindNextStartingPositionMode.LeadingStrings_LeftToRight or FindNextStartingPositionMode.LeadingStrings_OrdinalIgnoreCase_LeftToRight);
1278Debug.Assert(regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
1327Debug.Assert(primarySet.Chars.Length > 0);
1425Debug.Assert(setIndex is 0 or 1);
1431Debug.Assert(needLoop);
1466Debug.Assert(regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
1469Debug.Assert(set.Distance == 0);
1476Debug.Assert(!set.Negated);
1500Debug.Assert(regexTree.FindOptimizations.LiteralAfterLoop is not null);
1503Debug.Assert(target.LoopNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic);
1504Debug.Assert(target.LoopNode.N == int.MaxValue);
1625Debug.Assert(node.Kind == RegexNodeKind.Capture, "Every generated tree should begin with a capture node");
1626Debug.Assert(node.ChildCount() == 1, "Capture nodes should have one child");
1775Debug.Assert(requiredLength > 0);
1807Debug.Assert(node.Kind is RegexNodeKind.Alternate, $"Unexpected type: {node.Kind}");
1808Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
1811Debug.Assert(childCount >= 2);
1818Debug.Assert(node.Parent is not null);
1891Debug.Assert(startingLiteralNode is not null, "Unexpectedly couldn't find the branch starting node.");
1897Debug.Assert(numChars != 0);
1978Debug.Assert(multi.Kind is RegexNodeKind.Multi, $"Expected a Multi node, got {multi.Kind}");
2198Debug.Assert(sliceStaticPos == 0);
2205Debug.Assert(node.Kind is RegexNodeKind.Backreference, $"Unexpected type: {node.Kind}");
2274Debug.Assert(node.Kind is RegexNodeKind.BackreferenceConditional, $"Unexpected type: {node.Kind}");
2275Debug.Assert(node.ChildCount() == 2, $"Expected 2 children, found {node.ChildCount()}");
2447Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
2448Debug.Assert(node.ChildCount() == 3, $"Expected 3 children, found {node.ChildCount()}");
2627Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}");
2628Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2720Debug.Assert(node.Kind is RegexNodeKind.PositiveLookaround, $"Unexpected type: {node.Kind}");
2721Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2761Debug.Assert(node.Kind is RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}");
2762Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
2866Debug.Assert(sliceStaticPos == 0, "This should be the first node and thus static position shouldn't have advanced.");
3005Debug.Assert(rm.Analysis.MayBacktrack(node.Child(0)));
3024Debug.Fail($"Unexpected node type: {node.Kind}");
3030Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround or RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}");
3031Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional ? node.ChildCount() >= 1 : node.ChildCount() == 1, $"Unexpected number of children: {node.ChildCount()}");
3033Debug.Assert(node.Kind is RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround or RegexNodeKind.ExpressionConditional || rm.Analysis.MayBacktrack(node.Child(0)), "Expected lookaround/conditional or a child that may backtrack");
3060Debug.Assert(node.Kind is RegexNodeKind.UpdateBumpalong, $"Unexpected type: {node.Kind}");
3072Debug.Assert(node.Kind is RegexNodeKind.Concatenate, $"Unexpected type: {node.Kind}");
3073Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}");
3202Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
3205Debug.Assert(!rtl || offset is null);
3206Debug.Assert(!rtl || !clauseOnly);
3246Debug.Assert(node.Kind is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary or RegexNodeKind.ECMABoundary or RegexNodeKind.NonECMABoundary, $"Unexpected kind: {node.Kind}");
3286Debug.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}");
3287Debug.Assert((node.Options & RegexOptions.RightToLeft) == 0 || sliceStaticPos == 0);
3288Debug.Assert(sliceStaticPos >= 0);
3352Debug.Assert(node.Kind is RegexNodeKind.Multi, $"Unexpected type: {node.Kind}");
3353Debug.Assert(node.Str is not null);
3359Debug.Assert(str.Length >= 2);
3360Debug.Assert(!clauseOnly || (!emitLengthCheck && !rightToLeft));
3364Debug.Assert(emitLengthCheck);
3401Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop, $"Unexpected type: {node.Kind}");
3421Debug.Assert(node.M < node.N);
3579Debug.Assert(node.Kind is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy, $"Unexpected type: {node.Kind}");
3602Debug.Assert(node.M < node.N);
3826Debug.Assert(node.Kind is RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
3827Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
3828Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
3829Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
3921Debug.Assert(sliceStaticPos == 0);
3987Debug.Assert(entriesPerIteration >= 1);
4101Debug.Assert(entriesPerIteration >= 1);
4132Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}");
4252Debug.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}");
4268Debug.Assert(node.N > node.M);
4384Debug.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}");
4385Debug.Assert(node.M == 0 && node.N == 1);
4422Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
4423Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4424Debug.Assert(node.M == node.N, $"Unexpected M={node.M} == N={node.N}");
4425Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
4426Debug.Assert(!rm.Analysis.MayBacktrack(node.Child(0)), $"Expected non-backtracking node {node.Kind}");
4442Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}");
4443Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}");
4444Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}");
4445Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}");
4560Debug.Assert(sliceStaticPos == 0);
4693Debug.Assert(startingStackpos is not null);
4824Debug.Assert(args.Length is >= 1);
4876Debug.Assert(args.Length is >= 1);
5066Debug.Assert(!negate, "Negation isn't appropriate for a multi");
5312Debug.Assert(rangeLower.LowInclusive != rangeUpper.LowInclusive);
5559Debug.Fail("This shouldn't happen, as we should only get to the point of emitting code if RegexOptions was valid.");
System.Threading (76)
System.Threading.AccessControl (4)
System.Threading.Channels (114)
src\runtime\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 is not 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 is not null, "Expected a non-null segment.");
180Debug.Assert(array is not null, "Expected a non-null item array.");
253Debug.Assert(segment is not null, "Expected a non-null segment.");
254Debug.Assert(array is not null, "Expected a non-null item array.");
368Debug.Assert(syncObj is not null, "The syncObj parameter is null.");
390Debug.Assert((size & (size - 1)) == 0, "Size must be a power of 2");
429Debug.Assert(queue is not null, "Expected a non-null queue.");
System\Threading\Channels\AsyncOperation.cs (21)
17private static void AvailableSentinel(object? s) => Debug.Fail($"{nameof(AsyncOperation<>)}.{nameof(AvailableSentinel)} invoked with {s}");
21private static void CompletedSentinel(object? s) => Debug.Fail($"{nameof(AsyncOperation<>)}.{nameof(CompletedSentinel)} invoked with {s}");
110Debug.Assert(!pooled || !_isCancelable);
118Debug.Assert(cancellationCallback is not null, "Expected a non-null cancellation callback when the token is cancelable");
119Debug.Assert(!_pooled, "Cancelable operations can't be pooled");
192Debug.Assert(
213Debug.Assert(_continuation != s_completedSentinel, $"The continuation was the completion sentinel.");
214Debug.Assert(_continuation != s_availableSentinel, $"The continuation was the available sentinel.");
251Debug.Assert(ts is not null, "Expected a TaskScheduler");
268Debug.Assert(_continuation is not null);
323Debug.Assert(_capturedContext is null);
383Debug.Assert(prevContinuation != s_availableSentinel, "Continuation was the available sentinel.");
384Debug.Assert(IsCompleted, $"Expected IsCompleted");
408Debug.Assert(capturedContext is ExecutionContext);
421Debug.Assert(scheduler is SynchronizationContext or TaskScheduler, $"{nameof(scheduler)} is {scheduler}");
422Debug.Assert(executionContext is not null, $"{nameof(executionContext)} is null");
495Debug.Assert((object?)Next == null);
496Debug.Assert((object?)Previous == null);
497Debug.Assert(_continuationState == null);
498Debug.Assert(_capturedContext == null);
559Debug.Assert(_pooled, "Should only be used for pooled objects");
System\Threading\Channels\BoundedChannel.cs (18)
56Debug.Assert(bufferedCapacity > 0);
242Debug.Assert(Monitor.IsEntered(parent.SyncObj));
455Debug.Assert(waitingReadersHead is null);
460Debug.Assert(waitingReadersHead is not null);
630Debug.Assert(waitingReadersHead is null);
635Debug.Assert(waitingReadersHead is not null);
684Debug.Fail($"Unexpected operation: {state.Value}");
695Debug.Assert(SyncObj is not null, "The sync obj must not be null.");
696Debug.Assert(Monitor.IsEntered(SyncObj), "Invariants can only be validated while holding the lock.");
700Debug.Assert(_blockedReadersHead is null, "There are items available, so there shouldn't be any blocked readers.");
701Debug.Assert(_waitingReadersHead is null, "There are items available, so there shouldn't be any waiting readers.");
706Debug.Assert(_blockedWritersHead is null, "There's space available, so there shouldn't be any blocked writers.");
707Debug.Assert(_waitingWritersHead is null, "There's space available, so there shouldn't be any waiting writers.");
712Debug.Assert(_items.IsEmpty, "There shouldn't be queued items if there's a blocked reader.");
713Debug.Assert(_blockedWritersHead is null, "There shouldn't be any blocked writer if there's a blocked reader.");
718Debug.Assert(_items.Count == _bufferedCapacity, "We should have a full buffer if there's a blocked writer.");
719Debug.Assert(_blockedReadersHead is null, "There shouldn't be any blocked readers if there's a blocked writer.");
724Debug.Assert(_doneWriting is not null, "We can only complete if we're done writing.");
System\Threading\Channels\UnboundedChannel.cs (8)
333Debug.Fail($"Unexpected operation: {state.Value}");
344Debug.Assert(SyncObj is not null, "The sync obj must not be null.");
345Debug.Assert(Monitor.IsEntered(SyncObj), "Invariants can only be validated while holding the lock.");
351Debug.Assert(_blockedReadersHead is null, "There's data available, so there shouldn't be any blocked readers.");
352Debug.Assert(_waitingReadersHead is null, "There's data available, so there shouldn't be any waiting readers.");
354Debug.Assert(!_completion.Task.IsCompleted, "We still have data available, so shouldn't be completed.");
359Debug.Assert(_items.IsEmpty, "There are blocked/waiting readers, so there shouldn't be any data available.");
364Debug.Assert(_doneWriting is not null, "We're completed, so we must be done writing.");
System\Threading\Channels\UnboundedPriorityChannel.cs (9)
138Debug.Assert(Monitor.IsEntered(parent.SyncObj));
329Debug.Fail($"Unexpected operation: {state.Value}");
340Debug.Assert(SyncObj is not null, "The sync obj must not be null.");
341Debug.Assert(Monitor.IsEntered(SyncObj), "Invariants can only be validated while holding the lock.");
347Debug.Assert(_blockedReadersHead is null, "There's data available, so there shouldn't be any blocked readers.");
348Debug.Assert(_waitingReadersHead is null, "There's data available, so there shouldn't be any waiting readers.");
350Debug.Assert(!_completion.Task.IsCompleted, "We still have data available, so shouldn't be completed.");
355Debug.Assert(_items.Count == 0, "There are blocked/waiting readers, so there shouldn't be any data available.");
360Debug.Assert(_doneWriting is not null, "We're completed, so we must be done writing.");
System.Threading.RateLimiting (42)
System.Threading.Tasks.Dataflow (408)
Base\DataflowBlock.cs (50)
108Debug.Assert(source != null, "Filtered link requires a source to filter on.");
109Debug.Assert(target != null, "Filtered link requires a target to filter to.");
110Debug.Assert(predicate != null, "Filtered link requires a predicate to filter with.");
123Debug.Assert(_userProvidedPredicate != null, "User-provided predicate is required.");
155Debug.Assert(messageHeader.IsValid, "Only valid messages may be consumed.");
164Debug.Assert(messageHeader.IsValid, "Only valid messages may be consumed.");
173Debug.Assert(messageHeader.IsValid, "Only valid messages may be consumed.");
210Debug.Assert(filter != null, "Need a filter with which to construct the debug view.");
334Debug.Assert(source != null, "The SendAsyncSource instance must have been constructed.");
390Debug.Assert(target != null, "A valid target to send to is required.");
494Debug.Assert(completionAction != null, "Completion action to run is required.");
503Debug.Assert(_cancellationRegistration != default(CancellationTokenRegistration),
543Debug.Assert(source._cancellationState != CANCELLATION_STATE_NONE,
584Debug.Assert(_cancellationState == CANCELLATION_STATE_COMPLETING,
639Debug.Assert(
740Debug.Assert(source != null, "Need a source with which to construct the debug view.");
974Debug.Assert(source != null, "Need a source from which to receive.");
1228Debug.Assert(Volatile.Read(ref _cleanupReserved), "Should only be called once by whomever reserved the right.");
1310Debug.Fail("Invalid linking cleanup reason specified.");
1528Debug.Assert(target != null, "The target should never be null; this should be checked by all internal usage.");
1529Debug.Assert(source != null, "The source should never be null; this should be checked by all internal usage.");
1623Debug.Assert(propagator != null, "Need a block with which to construct the debug view.");
1826Debug.Assert(source1 != null && action1 != null, "The first source and action should not be null.");
1827Debug.Assert(source2 != null && action2 != null, "The second source and action should not be null.");
1828Debug.Assert((source3 == null) == (action3 == null), "The third action should be null iff the third source is null.");
1829Debug.Assert(dataflowBlockOptions != null, "Options are required.");
1873Debug.Assert(source != null, "Expected a non-null source");
1874Debug.Assert(action != null, "Expected a non-null action");
1875Debug.Assert(branchId >= 0, "Expected a valid branch ID (> 0)");
1876Debug.Assert(scheduler != null, "Expected a non-null scheduler");
1911Debug.Assert(source1 != null && action1 != null, "The first source and action should not be null.");
1912Debug.Assert(source2 != null && action2 != null, "The second source and action should not be null.");
1913Debug.Assert((source3 == null) == (action3 == null), "The third action should be null iff the third source is null.");
1914Debug.Assert(dataflowBlockOptions != null, "Options are required.");
1962Debug.Assert(resultBranchId < tasks.Length, "Expected a valid branch ID");
1963Debug.Assert(successfulBranchId == -1, "There should be at most one successful branch.");
1966else Debug.Assert(resultBranchId == -1, "Expected -1 as a signal of a non-successful branch");
2088Debug.Assert(completed != null, "Requires a shared target to complete.");
2185Debug.Assert(source != null, "Requires a source for which to retrieve the observable.");
2203Debug.Assert(source != null, "The observable requires a source to wrap.");
2249Debug.Assert(_observersState.Unlinker == null, "The source should not be linked to the target.");
2274Debug.Assert(observer != null, "Expected an observer.");
2280Debug.Assert(currentState != null, "Observer state should never be null.");
2308Debug.Assert(currentState != null, "Observer state should never be null.");
2309Debug.Assert(currentState.Unlinker != null, "The target should be linked.");
2310Debug.Assert(currentState.Canceler != null, "The target should have set up continuations.");
2342Debug.Assert(observable != null, "Need a block with which to construct the debug view.");
2377Debug.Assert(observable != null, "Observe state must be mapped to a source observable.");
2471Debug.Assert(Target.Completion.IsCompleted, "The target must have already completed in order to notify of completion.");
2540Debug.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.");
199Debug.Assert(batchBlock != null, "Need a block with which to construct the debug view");
290Debug.Assert(batchSize > 0, "A positive batch size is required");
306Debug.Assert(owningBatch != null, "This batch target core must be associated with a batch block.");
307Debug.Assert(batchSize >= 1, "Batch sizes must be positive.");
308Debug.Assert(batchCompletedAction != null, "Completion action must be specified.");
309Debug.Assert(dataflowBlockOptions != null, "Options required to configure the block.");
378Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
406Debug.Assert(_nonGreedyState != null, "_nonGreedyState must have been initialized during construction in non-greedy mode.");
458Debug.Assert(_nonGreedyState != null && _nonGreedyState.TaskForInputProcessing != null,
619Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
634Debug.Assert(BatchesNeedProcessing, "There must be a batch that needs processing.");
663Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
752Debug.Assert(!_dataflowBlockOptions.Greedy, "This method may only be used in non-greedy mode.");
753Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
770Debug.Assert(_messages.Count == 0, "The queue must be empty between batches in non-greedy mode");
782Debug.Assert(allowFewerThanBatchSize ? poppedInitially > 0 : poppedInitially == _batchSize,
816Debug.Assert(reserved.Count <= _batchSize, "Expected the number of reserved sources to be <= the number needed for a batch.");
869Debug.Assert(_dataflowBlockOptions.Greedy, "This method may only be used in greedy mode.");
870Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
871Debug.Assert(_boundingState != null, "Bounding state is required when in bounded mode.");
899Debug.Assert(poppedInitially > 0, "We received fewer than we expected based on the previous check.");
928Debug.Assert(reserved.Count <= itemCountNeededToCompleteBatch, "Expected the number of reserved sources to be <= the number needed for a batch.");
978Debug.Assert(!_dataflowBlockOptions.Greedy, "This method may only be used in non-greedy mode.");
979Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
980Debug.Assert(_nonGreedyState.ReservedSourcesTemp != null, "ReservedSourcesTemp should have been initialized.");
1028Debug.Assert(_dataflowBlockOptions.Greedy, "This method may only be used in greedy mode.");
1029Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
1030Debug.Assert(_nonGreedyState.ReservedSourcesTemp != null, "ReservedSourcesTemp should have been initialized.");
1031Debug.Assert(_boundingState != null, "Bounded state is required for bounded mode.");
1083Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode.");
1084Debug.Assert(_nonGreedyState.ReservedSourcesTemp != null, "Should have been initialized");
1114Debug.Assert(numItemsRemoved > 0, "Should only be called for a positive number of items removed.");
1125Debug.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");
161Debug.Assert(_sharedResources != null, "_sharedResources not initialized");
162Debug.Assert(_sharedResources._incomingLock != null, "_sharedResources._incomingLock not initialized");
163Debug.Assert(_source != null, "_source not initialized");
227Debug.Assert(batchedJoinBlock != null, "Need a block with which to construct the debug view.");
351Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
401Debug.Assert(_target1 != null, "_target1 not initialized");
402Debug.Assert(_target2 != null, "_target2 not initialized");
403Debug.Assert(_target3 != null, "_target3 not initialized");
415Debug.Assert(_sharedResources != null, "_sharedResources not initialized");
416Debug.Assert(_sharedResources._incomingLock != null, "_sharedResources._incomingLock not initialized");
417Debug.Assert(_source != null, "_source not initialized");
482Debug.Assert(batchedJoinBlock != null, "Need a block with which to construct the debug view.");
540Debug.Assert(sharedResources != null, "Targets require a shared resources through which to communicate.");
580Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
643Debug.Assert(batchedJoinBlockTarget != null, "Need a block with which to construct the debug view.");
676Debug.Assert(batchSize >= 1, "A positive batch size is required.");
677Debug.Assert(batchSizeReachedAction != null, "Need an action to invoke for each batch.");
678Debug.Assert(allTargetsDecliningAction != null, "Need an action to invoke when all targets have declined.");
Blocks\BroadcastBlock.cs (26)
76Debug.Assert(dataflowBlockOptions.BoundedCapacity > 0, "Positive bounding count expected; should have been verified by options ctor");
91Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
121Debug.Assert(storeExceptionEvenIfAlreadyCompleting || !revertProcessingState,
136Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
188Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
203Debug.Assert(_boundingState != null && _boundingState.PostponedMessages != null,
218Debug.Assert(numItemsRemoved > 0, "Should only be called for a positive number of items removed.");
229Debug.Assert(_boundingState.CurrentCount - numItemsRemoved >= 0,
244Debug.Assert(_boundingState != null, "Must be in bounded mode.");
279Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
281Debug.Assert(_boundingState.TaskForInputProcessing.Id == Task.CurrentId,
325Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
327Debug.Assert(_boundingState.TaskForInputProcessing.Id == Task.CurrentId,
458Debug.Assert(broadcastBlock != null, "Need a block with which to construct the debug view.");
547Debug.Assert(owningSource != null, "Must be associated with a broadcast block.");
548Debug.Assert(dataflowBlockOptions != null, "Options are required to configure this block.");
668Debug.Assert(target != null, "Target required to offer messages to.");
705else Debug.Assert(result != DataflowMessageStatus.NotAvailable, "Messages from a Broadcast should never be missed.");
738Debug.Assert(_messages.Count > 0, "There must be at least one message to dequeue.");
810Debug.Fail("Messages from a Broadcast should never be missed.");
938Debug.Assert(_taskForOutputProcessing == null, "There must be no processing tasks.");
939Debug.Assert(
1150Debug.Assert(exception != null, "An exception to add is required.");
1151Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
1162Debug.Assert(exceptions != null, "A list of exceptions 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.");
Blocks\BufferBlock.cs (13)
73Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
116Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
132Debug.Assert(_boundingState != null && _boundingState.PostponedMessages != null,
156Debug.Assert(storeExceptionEvenIfAlreadyCompleting || !revertProcessingState,
171Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
219Debug.Assert(numItemsRemoved > 0, "A positive number of items to remove is required.");
230Debug.Assert(_boundingState.CurrentCount - numItemsRemoved >= 0,
245Debug.Assert(_boundingState != null, "Must be in bounded mode.");
281Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
283Debug.Assert(_boundingState.TaskForInputProcessing.Id == Task.CurrentId,
327Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null,
329Debug.Assert(_boundingState.TaskForInputProcessing.Id == Task.CurrentId,
442Debug.Assert(bufferBlock != null, "Need a block with which to construct the debug view.");
Blocks\JoinBlock.cs (42)
95Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
133Debug.Assert(_target1 != null, "_target1 not initialized");
134Debug.Assert(_target2 != null, "_target2 not initialized");
145Debug.Assert(_sharedResources != null, "_sharedResources not initialized");
146Debug.Assert(_sharedResources._exceptionAction != null, "_sharedResources._exceptionAction not initialized");
205Debug.Assert(joinBlock != null, "Need a block with which to construct the debug view.");
314Debug.Assert(completed.IsFaulted, "The source must be faulted in order to trigger a target completion.");
352Debug.Assert(_target1 != null, "_target1 not initialized");
353Debug.Assert(_target2 != null, "_target2 not initialized");
354Debug.Assert(_target3 != null, "_target3 not initialized");
366Debug.Assert(_sharedResources != null, "_sharedResources not initialized");
367Debug.Assert(_sharedResources._exceptionAction != null, "_sharedResources._exceptionAction not initialized");
429Debug.Assert(joinBlock != null, "Need a block with which to construct the debug view.");
502Debug.Assert(sharedResources != null, "Targets need shared resources through which to communicate.");
518Debug.Assert(_messages != null, "_messages must have been initialized in greedy mode");
519Debug.Assert(_messages.Count >= 0, "A message must have been consumed by this point.");
524Debug.Assert(_nonGreedy!.ConsumedMessage.Key, "A message must have been consumed by this point.");
549Debug.Assert(_messages != null, "_messages must have been initialized in greedy mode");
584Debug.Assert(_sharedResources._dataflowBlockOptions.Greedy, "This is only valid in greedy mode");
601Debug.Assert(!_sharedResources._dataflowBlockOptions.Greedy, "This is only used in non-greedy mode");
608Debug.Assert(!HasAtLeastOneMessageAvailable, "The queue must be empty between joins in non-greedy mode");
641Debug.Assert(!_sharedResources._dataflowBlockOptions.Greedy, "This is only used in non-greedy mode");
642Debug.Assert(_nonGreedy!.ReservedMessage.Key != null, "This target must have a reserved message");
668Debug.Assert(!_nonGreedy.ConsumedMessage.Key, "There must be no other consumed message");
683Debug.Assert(_sharedResources._dataflowBlockOptions.Greedy, "This is only used in greedy mode");
684Debug.Assert(_sharedResources._boundingState != null, "This is only used in bounding mode");
768Debug.Assert(_nonGreedy != null, "Only valid in non-greedy mode.");
779Debug.Assert(_nonGreedy == null || _nonGreedy.ReservedMessage.Key == null,
843Debug.Assert(source != null, "We must have thrown if source == null && consumeToAccept == true.");
867Debug.Assert(_nonGreedy != null, "_nonGreedy must have been initialized during construction in non-greedy mode.");
898Debug.Assert(_messages != null, "_messages must be initialized in greedy mode.");
962Debug.Assert(joinBlockTarget != null, "Need a target with which to construct the debug view.");
1028Debug.Assert(ownerJoin != null, "Resources must be associated with a join.");
1029Debug.Assert(targets != null, "Resources must be shared between multiple targets.");
1030Debug.Assert(joinFilledAction != null, "An action to invoke when a join is created must be provided.");
1031Debug.Assert(exceptionAction != null, "An action to invoke for faults must be provided.");
1032Debug.Assert(dataflowBlockOptions != null, "Options must be provided to configure the resources.");
1262Debug.Assert(JoinNeedsProcessing, "There must be a join that needs processing.");
1343Debug.Assert(!_dataflowBlockOptions.Greedy || _boundingState != null, "This only makes sense in non-greedy or bounding mode");
1382Debug.Assert(_targets.Length > 0, "A join must have targets.");
1409Debug.Assert(numItemsRemoved > 0, "Number of items removed needs to be positive.");
1420Debug.Assert(_boundingState.CurrentCount - numItemsRemoved >= 0,
Blocks\TransformManyBlock.cs (11)
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.");
295Debug.Fail("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.");
626Debug.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)
63Debug.Assert(block != null, "Block needed for the ETW event.");
64Debug.Assert(dataflowBlockOptions != null, "Options needed for the ETW event.");
91Debug.Assert(block != null, "Block needed for the ETW event.");
92Debug.Assert(task != null, "Task needed for the ETW event.");
93Debug.Assert(reason == TaskLaunchedReason.ProcessingInputMessages || reason == TaskLaunchedReason.OfferingOutputMessages,
127Debug.Assert(block != null, "Block needed for the ETW event.");
132Debug.Assert(blockIsCompleted, "Block must be completed for this event to be valid.");
178Debug.Assert(source != null, "Source needed for the ETW event.");
179Debug.Assert(target != null, "Target needed for the ETW event.");
200Debug.Assert(source != null, "Source needed for the ETW event.");
201Debug.Assert(target != null, "Target needed for the ETW event.");
Internal\QueuedMap.cs (10)
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.");
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 (21)
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.");
258Debug.Assert(!_enableOffering, "Offering should have been disabled if there was a valid reservation");
365Debug.Assert(items != null);
406Debug.Assert(items != null, "Items list must be valid.");
456Debug.Assert(exception != null, "Valid exception must be provided to be added.");
457Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
468Debug.Assert(exceptions != null, "Valid exceptions must be provided to be added.");
469Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
483Debug.Assert(aggregateException != null && aggregateException.InnerExceptions.Count > 0, "Aggregate must be valid and contain inner exceptions to unwrap.");
484Debug.Assert(!Completion.IsCompleted || Completion.IsFaulted, "The block must either not be completed or be faulted if we're still storing exceptions.");
573Debug.Assert(linkToTarget != null, "Must have a valid target to offer to.");
622Debug.Fail("The target did not follow the protocol.");
667Debug.Assert(target != null, "Valid target to offer to is required.");
672Debug.Assert(result != DataflowMessageStatus.NotAvailable, "Messages are not being offered concurrently, so nothing should be missed.");
690Debug.Assert(result == DataflowMessageStatus.Postponed,
735Debug.Assert(_taskForOutputProcessing == null && _enableOffering && !_messages.IsEmpty,
794Debug.Assert(_taskForOutputProcessing != null && _taskForOutputProcessing.Id == Task.CurrentId,
852Debug.Assert(_taskForOutputProcessing != null && _taskForOutputProcessing.Id == Task.CurrentId,
906Debug.Assert(
Internal\TargetCore.cs (29)
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.");
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\runtime\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 is not 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 is not null, "Expected a non-null segment.");
180Debug.Assert(array is not null, "Expected a non-null item array.");
253Debug.Assert(segment is not null, "Expected a non-null segment.");
254Debug.Assert(array is not null, "Expected a non-null item array.");
368Debug.Assert(syncObj is not null, "The syncObj parameter is null.");
390Debug.Assert((size & (size - 1)) == 0, "Size must be a power of 2");
429Debug.Assert(queue is not null, "Expected a non-null queue.");
System.Threading.Tasks.Parallel (44)
System.Transactions.Local (226)
System\Transactions\Oletx\OletxTransaction.cs (12)
174Debug.Assert(returnValue != null, "OletxTransaction.GetRealObject - GetTxFromPropToken returned null");
242Debug.Assert(Disposed == 0, "OletxTransction object is disposed");
262Debug.Assert(singlePhaseNotification != null, "Argument is null");
263Debug.Assert(Disposed == 0, "OletxTransction object is disposed");
293Debug.Assert(enlistmentNotification != null, "Argument is null");
294Debug.Assert(Disposed == 0, "OletxTransction object is disposed");
329Debug.Assert(Disposed == 0, "OletxTransction object is disposed");
371Debug.Assert(Disposed == 0, "OletxTransction object is disposed");
448Debug.Assert(Disposed == 0, "OletxTransction object is disposed");
794Debug.Assert(Phase1EnlistVolatilementContainer == null,
939Debug.Assert(Phase1EnlistVolatilementContainer == null,
1091Debug.Assert(localCount >= 0, "RealOletxTransction.undisposedOletxTransationCount < 0");
System\Transactions\Oletx\OletxVolatileEnlistment.cs (31)
17Debug.Assert(realOletxTransaction != null, "Argument is null");
97Debug.Assert(enlistment != null, "Argument is null");
142Debug.Assert(IncompleteDependentClones >= 0, "OletxPhase0VolatileEnlistmentContainer.DependentCloneCompleted - incompleteDependentClones < 0");
238Debug.Assert(OutstandingNotifications >= 0, "OletxPhase0VolatileEnlistmentContainer.DecrementOutstandingNotifications - outstandingNotifications < 0");
311Debug.Fail("OletxPhase0VolatileEnlistmentContainer.OutcomeFromTransaction, outcome is not Commited or Aborted or InDoubt");
323Debug.Assert(Phase == 0 && OutstandingNotifications == 0);
339Debug.Fail("OletxPhase1VolatileEnlistmentContainer.Committed, enlistmentList element is not an OletxVolatileEnlistment.");
371Debug.Fail("OletxPhase1VolatileEnlistmentContainer.Aborted, enlistmentList element is not an OletxVolatileEnlistment.");
403Debug.Fail("OletxPhase1VolatileEnlistmentContainer.InDoubt, enlistmentList element is not an OletxVolatileEnlistment.");
499Debug.Fail("OletxPhase0VolatileEnlistmentContainer.Phase0Request, phase != -1");
523Debug.Fail("OletxPhase0VolatileEnlistmentContainer.Phase0Request, enlistmentList element is not an OletxVolatileEnlistment.");
528Debug.Assert(enlistment.EnlistDuringPrepareRequired, "OletxPhase0VolatileEnlistmentContainer.Phase0Request, enlistmentList element not marked as EnlistmentDuringPrepareRequired.");
529Debug.Assert(!abortHint, "OletxPhase0VolatileEnlistmentContainer.Phase0Request, abortingHint is true just before sending Prepares.");
569Debug.Assert(enlistment != null, "Argument is null");
616Debug.Assert(OutstandingNotifications >= 0, "OletxPhase1VolatileEnlistmentContainer.DependentCloneCompleted - DependentCloneCompleted < 0");
722Debug.Assert(OutstandingNotifications >= 0, "OletxPhase1VolatileEnlistmentContainer.DecrementOutstandingNotifications - outstandingNotifications < 0");
803Debug.Fail("OletxPhase1VolatileEnlistmentContainer.OutcomeFromTransaction, outcome is not Aborted or InDoubt");
842Debug.Fail("OletxPhase1VolatileEnlistmentContainer.Committed, enlistmentList element is not an OletxVolatileEnlistment.");
872Debug.Fail("OletxPhase1VolatileEnlistmentContainer.Aborted, enlistmentList element is not an OletxVolatileEnlistment.");
902Debug.Fail("OletxPhase1VolatileEnlistmentContainer.InDoubt, enlistmentList element is not an OletxVolatileEnlistment.");
969Debug.Fail("OletxPhase1VolatileEnlistmentContainer.VoteRequest, enlistmentList element is not an OletxVolatileEnlistment.");
1075Debug.Fail("OletxVolatileEnlistment.Prepare, no enlistmentNotification member.");
1110Debug.Fail("OletxVolatileEnlistment.Prepare, invalid state.");
1156Debug.Fail("OletxVolatileEnlistment.Commit, no enlistmentNotification member.");
1172Debug.Fail("OletxVolatileEnlistment.Commit, invalid state.");
1239Debug.Fail("OletxVolatileEnlistment.Rollback, invalid state.");
1291Debug.Fail("OletxVolatileEnlistment.InDoubt, no enlistmentNotification member.");
1307Debug.Fail("OletxVolatileEnlistment.InDoubt, invalid state.");
1387Debug.Fail("OletxVolatileEnlistment.Prepared, no container member.");
1422Debug.Fail("OletxVolatileEnlistment.Prepared, invalid pending outcome value.");
1463Debug.Fail("OletxVolatileEnlistment.ForceRollback, no container member.");
System\Transactions\TransactionState.cs (70)
163Debug.Assert(tx.State != this, "Changing to the same state.");
185Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
299Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
311Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
323Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
335Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
347Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
359Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
371Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
383Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
395Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
411Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
417Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
423Debug.Fail($"Invalid Event for State; Current State: {GetType()}");
615Debug.Assert(tx._phase0Volatiles._dependentClones >= 0);
618Debug.Assert(tx._phase0Volatiles._preparedVolatileEnlistments <=
636Debug.Assert(tx._phase1Volatiles._dependentClones >= 0);
664Debug.Assert(tx.promotedToken != null);
788Debug.Assert(tx._promoterType != Guid.Empty, "InternalTransaction.PromoterType was not set in PSPEInitialize");
835Debug.Assert(tx._promoter != null, "Transaction Promoter is Null entering SubordinateActive");
845Debug.Assert(tx._promoter != null);
1077Debug.Assert(tx._promoterType != Guid.Empty, "InternalTransaction.PromoterType was not set in Phase0PSPEInitialize");
1183Debug.Assert(tx._committableTransaction != null);
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.");
1879Debug.Assert(tx._phase0Volatiles._preparedVolatileEnlistments <=
1893Debug.Assert(tx._phase0WaveDependentCloneCount >= 0);
1927Debug.Assert(tx._phase1Volatiles._dependentClones >= 0);
1934Debug.Assert(0 <= tx._abortingDependentCloneCount);
1969Debug.Assert(tx.PromotedTransaction != null);
1991Debug.Assert(tx.PromotedTransaction != null);
2007Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
2065Debug.Assert(tx.PromotedTransaction != null);
2101Debug.Assert(tx.promotedToken != null, "InternalTransaction.promotedToken is null in TransactionStateDelegatedNonMSDTCBase or one of its derived classes.");
2131Debug.Assert(tx.PromotedTransaction != null && tx.PromotedTransaction.RealTransaction != null);
2145Debug.Assert((tx._promoterType == Guid.Empty) || (tx._promoterType == TransactionInterop.PromoterTypeDtc), "Promoted to MSTC but PromoterType is not TransactionInterop.PromoterTypeDtc");
2255Debug.Assert(tx.PromotedTransaction != null);
2271Debug.Assert(tx.PromotedTransaction != null);
2296Debug.Assert(tx.PromotedTransaction != null && tx.PromotedTransaction.RealTransaction != null);
2300Debug.Assert(tx.State != null);
2536Debug.Assert(tx._phase0Volatiles.VolatileDemux != null, "Volatile Demux must exist for VolatilePrepareDone when promoted.");
2541Debug.Assert(tx._phase0Volatiles.VolatileDemux._promotedEnlistment != null);
2641Debug.Assert(tx._phase1Volatiles.VolatileDemux != null, "Volatile Demux must exist for VolatilePrepareDone when promoted.");
2646Debug.Assert(tx._phase1Volatiles.VolatileDemux._promotedEnlistment != null);
2763Debug.Assert(tx._phase0Volatiles.VolatileDemux._promotedEnlistment != null);
2774Debug.Assert(tx.PromotedTransaction != null);
2798Debug.Assert(tx._phase1Volatiles.VolatileDemux != null, "Volatile Demux must exist.");
2805Debug.Assert(tx._phase1Volatiles.VolatileDemux._promotedEnlistment != null);
2861Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
2891Debug.Assert(tx.PromotedTransaction != null);
3361Debug.Assert(tx._durableEnlistment != null);
3491Debug.Assert(tx._durableEnlistment != null, "PromotedNonMSDTC state is not valid for transaction");
3532Debug.Assert(tx._phase0Volatiles._preparedVolatileEnlistments <=
3551Debug.Assert(tx._phase1Volatiles._dependentClones >= 0);
3630Debug.Assert(tx.promotedToken != null, "InternalTransaction.promotedToken is null in TransactionStateDelegatedNonMSDTCBase or one of its derived classes.");
3743Debug.Assert(tx._committableTransaction != null);
3844Debug.Assert(tx._durableEnlistment != null);
4262Debug.Assert((distributedTx == null), "PSPEPromote for non-MSDTC promotion returned a distributed transaction.");
4263Debug.Assert((tx.promotedToken != null), "PSPEPromote for non-MSDTC promotion did not set InternalTransaction.PromotedToken.");
4304Debug.Assert(tx.PromotedTransaction != null);
4348Debug.Assert(tx.State == TransactionStateActive, "PSPEPromote called from state other than TransactionStateActive");
4375Debug.Assert(tx.State == TransactionStatePhase0, "Phase0PSPEInitialize called from state other than TransactionStatePhase0");
4398Debug.Assert(returnState == TransactionStateDelegated ||
4419Debug.Assert(tx._promoter != null);
4613Debug.Assert(tx._durableEnlistment != null);
4649Debug.Assert(tx._durableEnlistment != null);
System.Web.HttpUtility (13)
System.Windows.Controls.Ribbon (63)
System.Windows.Extensions (11)
System.Windows.Forms (2335)
System\Windows\Forms\ActiveX\AxHost.cs (46)
1028Debug.Assert(!Visible, "If we were visible we would not be need a fake window.");
1045Debug.Assert(!IsHandleCreated, "if we need a fake window, we can't have a real one");
1260Debug.Assert(!OwnWindow(), "Why are we here if we own our window?");
1301Debug.Fail("how did we ever get into the open state?");
1324Debug.Assert(GetOcState() == OC_LOADED, " failed transition");
1329Debug.Assert(GetOcState() == OC_PASSIVE, " failed transition");
1333Debug.Fail("bad state");
1363Debug.Assert(GetOcState() == OC_LOADED, " failed transition");
1368Debug.Assert(GetOcState() == OC_RUNNING, " failed transition");
1380Debug.Assert(!_axState[s_fOwnWindow], "If we are invis at runtime, we should never be going beyond OC_RUNNING");
1429Debug.Assert(GetOcState() == OC_UIACTIVE, " failed transition");
1433Debug.Fail("bad state");
1457Debug.Fail(t.ToString());
1482Debug.Assert(CanUIActivate, "we have to be able to uiactivate");
1491Debug.Assert(_axState[s_fFakingWindow], "have to be faking it in order to destroy it...");
1525Debug.Fail("extremely naughty ctl is refusing to give us an hWnd... giving up...");
1574Debug.Assert(!_axState[s_fFakingWindow], "if we were visible, we could not have had a fake window...");
1604Debug.Fail(t.ToString());
1618Debug.Assert(!_axState[s_fOwnWindow], "can't own our window when hiding");
1619Debug.Assert(IsHandleCreated, "gotta have a window to hide");
1620Debug.Assert(GetOcState() >= OC_INPLACE, "have to be in place in order to hide.");
1625Debug.Assert(!IsHandleCreated, "if we are inplace deactivated we should not have a window.");
1778Debug.Fail($"error in processMnemonic: {t}");
1822Debug.Assert(!_axState[s_disposed], "we could not be asking for the object when we are axState[disposed]...");
1839Debug.Fail("Trying to reload with a OcxState that is of a different type.");
1895Debug.Fail("we got to have an old state which holds out scribble storage...");
1914Debug.Fail("unknown storage type.");
2013Debug.Assert(_storageType != StorageType.Unknown, "if we are loaded, out storage type must be set!");
2052Debug.Fail("unknown storage type");
2177Debug.Assert(_freezeCount >= 0, "invalid freeze count!");
2300Debug.Assert(_instance is null, "instance must be null");
2304Debug.Assert(_instance is not null, "w/o an exception being thrown we must have an object...");
2386Debug.Assert(selectionStyle is >= 0 and <= 2, "Invalid selection style");
2402Debug.Assert((_flags & AxFlags.PreventEditMode) == 0, "edit mode should have been disabled");
2589Debug.Assert(baseProps[i] is not null, $"Null base prop at location: {i}");
2625Debug.Assert(propDesc is not null, $"Cannot find cached entry for: {propName}");
2629Debug.Fail($"Duplicate property with same name: {propName}");
2707Debug.Assert(dispid != PInvokeCore.DISPID_UNKNOWN, "Wrong dispid sent to GetPropertyDescriptorFromDispid");
2774Debug.Fail("no implemented persistence interfaces on object");
2841Debug.Fail("unknown storage type.");
2879Debug.Fail(t.ToString());
2896Debug.Fail(t.ToString());
2959Debug.Fail($"Failed to get instance in {nameof(ShowPropertyPageForDispid)}.");
3231Debug.Assert(IsHandleCreated, "we got to have a handle to be here...");
3381Debug.Fail(t.ToString());
3399Debug.Fail(ex.Message);
System\Windows\Forms\Control.cs (32)
542Debug.Assert(accessibleObject is not null, "Failed to create accessibility object");
561Debug.Assert(ncAccessibleObject is not null, "Failed to create NON-CLIENT accessibility object");
813Debug.Assert(!backBrush.IsNull, "Failed to create brushHandle");
1842Debug.Assert(s_defaultFont is not null, "defaultFont wasn't set!");
2139Debug.Assert(
2727Debug.Assert(Margin == value, "Error detected while setting Margin.");
2751Debug.Assert(MaximumSize == DefaultMaximumSize, "Error detected while resetting MaximumSize.");
2757Debug.Assert(MaximumSize == value, "Error detected while setting MaximumSize.");
2776Debug.Assert(MinimumSize == value, "Error detected while setting MinimumSize.");
4824Debug.Assert((cp.ExStyle & (int)WINDOW_EX_STYLE.WS_EX_MDICHILD) == 0, "Can't put MDI child forms on the parking form");
5273Debug.Assert(this == entry._caller, "Called BeginInvoke on one control, and the corresponding EndInvoke on a different control");
5289Debug.Assert(asyncResult.IsCompleted, "Why isn't this asyncResult done yet?");
5368Debug.Assert(c.IsHandleCreated, "FindMarshalingControl chose a bad control.");
6020Debug.Assert(window is not null, "window is null in Control.GetSafeHandle");
6137Debug.Assert(region.GetPointer() != null);
6404Debug.Assert(tme._args!.Length == 1, "Arguments are wrong for WaitCallback");
6409Debug.Assert(tme._args!.Length == 1, "Arguments are wrong for SendOrPostCallback");
7128Debug.Fail($"Unexpected {nameof(VisualStylesModeChangeImpact)}: {impact}");
9154Debug.Fail($"Unknown PaintLayer {layer}");
9228Debug.Assert(args is not null, "This method should never be called with null args.");
9576Debug.Assert((OBJ_TYPE)PInvokeCore.GetObjectType(hDC) == OBJ_TYPE.OBJ_ENHMETADC,
9578Debug.Assert((lParam & (long)PInvoke.PRF_CHILDREN) != 0,
9588Debug.Assert(success, "GetViewportOrgEx() failed.");
9596Debug.Assert(!hClippingRegion.IsNull, "CreateRectRgn() failed.");
9600Debug.Assert(
9618Debug.Assert(success, "GetWindowRect() failed.");
10020Debug.WriteLineIf(
11049Debug.Assert(value != -1, "Outdated call to SetParentHandle");
11057Debug.Assert(Handle != value, "Cycle created in SetParentHandle");
11573Debug.Assert(LayoutSuspendCount > 0, "SuspendLayout: layoutSuspendCount overflowed.");
11589Debug.Assert(scaledFont is not null);
13536Debug.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\Buttons\ButtonInternal\DarkMode\ModernButtonColorMath.cs (1)
49Debug.Assert(
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (13)
653Debug.Assert(IsHandleCreated, "Handle should be created at this point");
2106Debug.Assert((ModifierKeys & Keys.Alt) == 0);
2124Debug.Assert((ModifierKeys & Keys.Alt) == 0);
2245Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created.");
2255Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created.");
2285Debug.Assert(actualLength != PInvoke.LB_ERR, "Should have validated the index above");
2296Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created.");
2303Debug.Assert(insertIndex == index, $"NativeComboBox inserted at {insertIndex} not the requested index of {index}");
2312Debug.Assert(IsHandleCreated, "Shouldn't be calling Native methods before the handle is created.");
2364Debug.Assert(_childEdit is null, "Child edit window already attached");
2365Debug.Assert(_childListBox is null, "Child listbox window already attached");
2961Debug.Assert(DisplayMember.Equals(string.Empty), "if this list is sorted it means that dataSource was null when Sorted first became true. at that point DisplayMember had to be String.Empty");
3289Debug.Assert(DropDownStyle == ComboBoxStyle.DropDownList);
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (38)
148Debug.Assert(_dataConnectionState[DATACONNECTIONSTATE_cancellingRowEdit]);
163Debug.Assert(CurrencyManager.AllowAdd, "why did we call AddNew on the currency manager when the currency manager does not allow new rows?");
274Debug.Assert(_props is not null);
311Debug.Assert(sortProperty is null);
327Debug.Assert(_props is not null);
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?");
474Debug.Assert(CurrencyManager?.List is not null);
488Debug.Assert(DataBoundRowsCount() != -1, "the data bound data grid view rows count should be at least 0");
492Debug.Assert(CurrencyManager?.List is not null);
508Debug.Assert(CurrencyManager.List.Count == 1);
513Debug.Assert(_dataConnectionState[DATACONNECTIONSTATE_finishedAddNew]);
529Debug.Assert(CurrencyManager!.List!.Count == 0, "we deleted the row that the Child table forcefully added");
551Debug.Assert(CurrencyManager?.List is not null);
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?");
681Debug.Assert(_owner.CurrentCellAddress.X == -1);
736Debug.Assert(CurrencyManager?.List is not null);
766Debug.Assert(_owner.NewRowIndex != -1, "the NewRowIndex is -1 only when AllowUserToAddRows is false");
783Debug.Assert(sender == DataSource);
784Debug.Assert(DataSource is ISupportInitializeNotification);
785Debug.Assert(_dataConnectionState[DATACONNECTIONSTATE_dataSourceInitializedHookedUp]);
798Debug.Assert(CurrencyManager is not null);
805Debug.Assert(CurrencyManager is not null);
826Debug.Assert(_owner.AllowUserToAddRowsInternal, "how did we start an add new row transaction if the dataGridView control has AllowUserToAddRows == false?");
828Debug.Assert(CurrencyManager?.List is not null);
837Debug.Assert(_owner.NewRowIndex == CurrencyManager.List.Count - 1);
890Debug.Fail("we only care about which data fields are read only when we are data bound");
1141Debug.Assert(rowIndex >= 0);
1174Debug.Assert(rowIndex >= 0);
1222Debug.Assert(dataGridViewColumn is not null);
1229Debug.Assert(rowIndex >= -1);
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 (750)
116Debug.Assert(NewRowIndex == -1);
344Debug.Assert(rowIndex > -1);
345Debug.Assert(rowIndex < Rows.Count);
378Debug.Assert(_noAutoSizeCount > 0);
387Debug.Assert(autoSizeColumnCriteriaFilter != DataGridViewAutoSizeColumnCriteriaInternal.None);
388Debug.Assert((autoSizeColumnCriteriaFilter & DataGridViewAutoSizeColumnCriteriaInternal.Fill) == 0);
414Debug.Assert(columnIndex >= -1 && columnIndex < Columns.Count);
415Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count);
416Debug.Assert(_autoSizeRowsMode is DataGridViewAutoSizeRowsMode.DisplayedHeaders
433Debug.Assert(columnIndex == -1);
434Debug.Assert((((DataGridViewAutoSizeRowsModeInternal)_autoSizeRowsMode) & DataGridViewAutoSizeRowsModeInternal.Header) != 0);
438Debug.Assert(RowHeadersWidth > 0);
439Debug.Assert(RowHeadersVisible);
454Debug.Assert(preferredThickness >= minimumHeight);
462Debug.Assert(_autoSizeRowsMode != DataGridViewAutoSizeRowsMode.None);
511Debug.Assert((((DataGridViewAutoSizeRowsModeInternal)_autoSizeRowsMode) & DataGridViewAutoSizeRowsModeInternal.Header) != 0);
515Debug.Assert(RowHeadersWidth > 0);
516Debug.Assert(RowHeadersVisible);
538Debug.Assert((((DataGridViewAutoSizeRowsModeInternal)_autoSizeRowsMode) & DataGridViewAutoSizeRowsModeInternal.DisplayedRows) != 0);
579Debug.Assert(dataGridViewColumn.Visible);
580Debug.Assert(!dataGridViewColumn.Frozen);
581Debug.Assert(dataGridViewColumn.MinimumWidth <= width);
582Debug.Assert(dataGridViewColumn.InheritedAutoSizeMode == DataGridViewAutoSizeColumnMode.Fill);
583Debug.Assert(!_layout._dirty);
589Debug.Assert(dataGridViewColumn.MinimumWidth == dataGridViewColumn.Width);
614Debug.Assert(!dataGridViewColumnTmp.Frozen);
759Debug.Assert(!dataGridViewColumnTmp.Frozen);
803Debug.Assert(newWeightSum > 0);
952Debug.Assert(!dataGridViewColumn.Frozen);
970Debug.Assert(_layout.Data.Width == _layout.Inside.Width - _layout.RowHeaders.Width - (SingleVerticalBorderAdded ? 1 : 0));
1036Debug.Assert(weightSum > 0);
1211Debug.Assert(oldDesiredWidth >= mostDeservingDataGridViewColumn.DesiredFillWidth);
1223Debug.Assert(widthLoss >= 0);
1364Debug.Assert((((DataGridViewAutoSizeRowsModeInternal)autoSizeRowsMode) & DataGridViewAutoSizeRowsModeInternal.DisplayedRows) != 0);
1524Debug.Assert(_selectedBandIndexes.Contains(rowIndex) ==
1549Debug.Fail("DataGridView.AreAllCellsSelected - Shouldn't reach this code");
1662Debug.Assert(clonedColumn.IsDataBound);
1693Debug.Assert(dataGridViewColumn.IsDataBound);
1701Debug.Assert(autoSizeColumnCriteriaFilter != DataGridViewAutoSizeColumnCriteriaInternal.None);
1702Debug.Assert((autoSizeColumnCriteriaFilter & DataGridViewAutoSizeColumnCriteriaInternal.Fill) == 0);
1837Debug.Assert(_noAutoSizeCount > 0);
1902Debug.Assert(_noAutoSizeCount > 0);
1909Debug.Assert(autoSizeColumnCriteriaInternal is DataGridViewAutoSizeColumnCriteriaInternal.Header
1914Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count);
1960Debug.Assert(_noAutoSizeCount > 0);
2135Debug.Fail("Unexpected rowHeadersWidthSizeMode value in AutoResizeRowHeadersWidth");
2152Debug.Assert(_noAutoSizeCount > 0);
2297Debug.Fail("Unexpected rowHeadersWidthSizeMode value in AutoResizeRowHeadersWidth");
2314Debug.Assert(_noAutoSizeCount > 0);
2321Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count);
2322Debug.Assert(((DataGridViewAutoSizeRowCriteriaInternal)autoSizeRowMode & InvalidDataGridViewAutoSizeRowCriteriaInternalMask) == 0);
2376Debug.Assert(_noAutoSizeCount > 0);
2488Debug.Assert(_lastRowSplitBar == -1);
2623Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count);
2624Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count);
2625Debug.Assert(!IsCurrentCellInEditMode);
2653Debug.Assert(!IsCurrentCellInEditMode);
2706Debug.Assert(((IDataGridViewEditingControl)EditingControl).EditingControlDataGridView == this);
2710Debug.Assert(EditingControl is null);
2712Debug.Assert(EditingControl is not null);
2719Debug.Assert(EditingControl is not null);
2733Debug.Assert(EditingControl is not null);
2734Debug.Assert(_editingPanel is not null);
2737Debug.Assert(dgvese.CellStyle is not null);
2804Debug.Assert(_lastColSplitBar == -1);
2827Debug.Assert(_lastRowSplitBar == -1);
2834Debug.Assert(inheritedCellStyle is not null);
2840Debug.Assert(cellStyle is not null);
2844Debug.Assert(columnHeadersStyle is not null);
2847Debug.Assert(dataGridViewStyle is not null);
2979Debug.Assert(dataGridViewStyle.Alignment != DataGridViewContentAlignment.NotSet);
2993Debug.Assert(dataGridViewStyle.WrapMode != DataGridViewTriState.NotSet);
3099Debug.Assert(_ptCurrentCell.Y != -1);
3132Debug.Assert(success);
3148Debug.Assert(_dataGridViewState1[State1_CurrentCellInEditMode]);
3150Debug.Assert(dataGridViewEditingCell is not null);
3183Debug.Assert(dataGridViewEditingCell is not null);
3191Debug.Assert((AllowUserToAddRowsInternal && Rows.Count == 1) || (!AllowUserToAddRowsInternal && Rows.Count == 0));
3208Debug.Assert(success);
3236Debug.Assert(_dataGridViewState1[State1_CurrentCellInEditMode]);
3268Debug.Assert(Rows.GetFirstRow(DataGridViewElementStates.Visible) == 0);
3309Debug.Assert(_dataGridViewState1[State1_CurrentCellInEditMode]);
3374Debug.Assert(dataGridViewCurrentCell.OwningColumn is not null);
3501Debug.Assert(_noDimensionChangeCount >= 0);
3639Debug.Assert(_noDimensionChangeCount >= 0);
3650Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count, $"Invalid columnIndex: {columnIndex}");
3666Debug.Assert(firstVisibleFrozenColumn is not null);
3672Debug.Assert(Columns.DisplayInOrder(firstVisibleFrozenColumn.Index, dataGridViewColumn.Index));
3705Debug.Assert(hti._col != -1);
3756Debug.Assert(hti._col != -1);
3816Debug.Assert(_ptCurrentCell.X > -1);
3920Debug.Assert(((EditingControl is not null && ((IDataGridViewEditingControl)EditingControl).EditingControlValueChanged)
3931Debug.Assert(_ptCurrentCell.X > -1);
3964Debug.Assert(_dataGridViewState1[State1_CurrentCellInEditMode]);
4002Debug.Assert(_dataGridViewState1[State1_CurrentCellInEditMode]);
4078Debug.Assert(_ptCurrentCell.X > -1);
4201Debug.Assert(columnIndex < Columns.Count);
4224Debug.Assert(success);
4242Debug.Assert(dataGridViewRow is not null);
4302Debug.Assert(cx <= _horizontalOffset);
4391Debug.Assert(rowIndex < DisplayedBandsInfo.FirstDisplayedScrollingRow);
4447Debug.Assert(insideLeft.Height >= 0);
4469Debug.Assert(insideLeft.Width >= 0);
4488Debug.Assert(colHeaders.Width >= 0);
4530Debug.Assert(newLayout.Data.X >= 0);
4531Debug.Assert(newLayout.Data.Y >= 0);
4532Debug.Assert(newLayout.Data.Width >= 0);
4533Debug.Assert(newLayout.Data.Height >= 0);
4541Debug.Assert(!_layout._dirty);
4601Debug.Assert(_vertScrollBar.Maximum > 0);
4616Debug.Assert(VerticalScrollingOffset == _vertScrollBar.Value);
4668Debug.Assert(cx <= Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen));
4711Debug.Assert(firstDisplayedScrollingCol >= 0);
4733Debug.Assert(FirstDisplayedScrollingColumnHiddenWidth == 0);
4753Debug.Assert(FirstDisplayedScrollingColumnHiddenWidth == 0);
4759Debug.Assert(dataGridViewColumn.Thickness > displayWidth - cx);
4766Debug.Assert(FirstDisplayedScrollingColumnHiddenWidth == GetNegOffsetFromHorizontalOffset(_horizontalOffset));
4770Debug.Assert(numVisibleScrollingCols <= visibleScrollingColumnsTmp, "the number of displayed columns can only grow");
4786Debug.Assert(jumpFromFirstVisibleScrollingCol >= -1);
4794Debug.Assert(firstDisplayedScrollingCol >= 0);
4817Debug.Assert((DisplayedBandsInfo.NumDisplayedScrollingCols > 0 && DisplayedBandsInfo.FirstDisplayedScrollingCol != -1)
4847Debug.Assert(cy < displayHeight);
4941Debug.Assert(lastDisplayedScrollingRow == -1);
4950Debug.Assert(firstDisplayedFrozenRow < nRows, "firstDisplayedFrozenRow larger than number of rows");
4951Debug.Assert(lastDisplayedFrozenRow < nRows, "lastDisplayedFrozenRow larger than number of rows");
4952Debug.Assert(lastDisplayedScrollingRow < nRows, "lastDisplayedScrollingRow larger than number of rows");
4960Debug.Assert(DisplayedBandsInfo.NumTotallyDisplayedFrozenRows >= 0, "the number of visible frozen rows can't be negative");
4961Debug.Assert(DisplayedBandsInfo.NumDisplayedScrollingRows >= 0, "the number of visible scrolling rows can't be negative");
4962Debug.Assert(DisplayedBandsInfo.NumTotallyDisplayedScrollingRows >= 0, "the number of totally visible scrolling rows can't be negative");
4963Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow < nRows, "firstDisplayedScrollingRow larger than number of rows");
4993Debug.Assert(dataGridViewColumn.DataGridView is null);
4994Debug.Assert(dataGridViewColumn.Index >= 0);
4995Debug.Assert(dataGridViewColumn.DisplayIndex >= 0);
5027Debug.Assert(dataGridViewColumn.DataGridView == this);
5029Debug.Assert(dataGridViewColumn.DisplayIndex >= 0);
5061Debug.Assert(anticipatedColumnIndex >= 0 && anticipatedColumnIndex <= Columns.Count);
5070Debug.Assert(dataGridViewColumn.DisplayIndex >= 0 && dataGridViewColumn.DisplayIndex <= Columns.Count);
5190Debug.Assert(newDisplayIndex != dataGridViewColumn.DisplayIndex);
5191Debug.Assert(!_dataGridViewOper[OperationInDisplayIndexAdjustments]);
5253Debug.Assert(Columns[columnIndex].Index == columnIndex);
5260Debug.Assert(insertionCount > 0);
5271Debug.Assert(CurrentCellInternal is not null);
5278Debug.Assert(dataGridViewRow is not null);
5279Debug.Assert(anticipatedRowIndex >= 0 && anticipatedRowIndex <= Rows.Count);
5345Debug.Assert(dataGridViewRow is not null);
5406Debug.Assert(rowIndexDeleted >= 0);
5414Debug.Assert(dataGridViewRow.Index == rowIndex);
5431Debug.Assert(rowIndexInserted >= 0);
5432Debug.Assert(insertionCount > 0);
5440Debug.Assert(dataGridViewRow.Index == rowIndex);
5508Debug.Assert(Rows.Count > 1);
5509Debug.Assert(NewRowIndex != -1);
5519Debug.Assert(NewRowIndex == Rows.Count - 1);
5522Debug.Assert(dataGridViewRow.Index == -1);
5527Debug.Assert(NewRowIndex == -1);
5532Debug.Assert((Rows.GetRowState(NewRowIndex) & DataGridViewElementStates.Visible) != 0);
5533Debug.Assert(_ptCurrentCell.Y == NewRowIndex);
5603Debug.Assert(dataGridViewColumn.Visible && !dataGridViewColumn.Frozen);
5669Debug.Assert(NoSelectionChangeCount == 0);
5792Debug.Assert(_editingPanel is not null);
5793Debug.Assert(_ptCurrentCell.X != -1);
6005Debug.Assert(sender == EditingControl || sender == _editingPanel);
6006Debug.Assert(_ptCurrentCell.X != -1);
6015Debug.Assert(sender == EditingControl || sender == _editingPanel);
6016Debug.Assert(_ptCurrentCell.X != -1);
6025Debug.Assert(sender == EditingControl || sender == _editingPanel);
6031Debug.Assert(sender == EditingControl || sender == _editingPanel);
6037Debug.Assert(sender == EditingControl || sender == _editingPanel);
6043Debug.Assert(sender == EditingControl || sender == _editingPanel);
6046Debug.Assert(EditingControl is not null);
6047Debug.Assert(!_dataGridViewState1[State1_CustomCursorSet]);
6063Debug.Assert(sender == EditingControl || sender == _editingPanel);
6066Debug.Assert(EditingControl is not null);
6085Debug.Assert(sender == EditingControl || sender == _editingPanel);
6091Debug.Assert(sender == EditingControl || sender == _editingPanel);
6181Debug.Assert(proposed >= Columns[_trackColumn].MinimumThickness);
6182Debug.Assert(proposed <= DataGridViewBand.MaxBandThickness);
6293Debug.Assert(_editingPanel is null || _editingPanel.Controls.Count == 0);
6307Debug.Assert(success);
6320Debug.Assert(_dataGridViewState1[State1_CurrentCellInEditMode]);
6397Debug.Assert(_autoSizeRowsMode == DataGridViewAutoSizeRowsMode.None);
6449Debug.Assert(rowIndex >= 0);
6450Debug.Assert(rowIndex < Rows.Count);
6451Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0);
6452Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0);
6488Debug.Assert(numDisplayedScrollingRows > 0);
6491Debug.Assert(rowIndexTmp != -1);
6504Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow != -1);
6532Debug.Assert(rowIndexTmp != -1);
6556Debug.Assert(firstDisplayedFrozenRowIndex != -1);
6692Debug.Assert(numDisplayedScrollingCols > 0);
6696Debug.Assert(dataGridViewColumnTmp is not null);
6709Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingCol != -1);
6737Debug.Assert(dataGridViewColumnTmp is not null);
7038Debug.Assert(rowIndex >= 0);
7039Debug.Assert(dataGridViewCell.OwningColumn is not null);
7161Debug.Assert(columnIndex >= -1 && columnIndex < Columns.Count);
7162Debug.Assert(rowIndex >= -1 && rowIndex < Rows.Count);
7166Debug.Assert(dataGridViewRow is not null);
7347Debug.Assert(rowIndex != -1);
7874Debug.Assert(firstVisibleColumn is not null);
7875Debug.Assert(lastVisibleColumn is not null);
7899Debug.Assert(firstVisibleRowIndex != -1);
7900Debug.Assert(lastVisibleRowIndex != -1);
7948Debug.Assert(lRowIndex != -1);
7949Debug.Assert(uRowIndex != -1);
7950Debug.Assert(lColumn is not null);
7951Debug.Assert(uColumn is not null);
7952Debug.Assert(lColumn.Index == uColumn.Index || Columns.DisplayInOrder(lColumn.Index, uColumn.Index));
7953Debug.Assert(lRowIndex <= uRowIndex);
7978Debug.Assert(prevDataGridViewColumn is not null);
8041Debug.Assert(nextDataGridViewColumn is not null);
8070Debug.Assert(rowIndex != -1);
8076Debug.Assert(nextRowIndex != -1);
8093Debug.Assert(prevDataGridViewColumn is not null);
8163Debug.Assert(nextDataGridViewColumn is not null);
8242Debug.Assert(destinationBytes[97] == '<');
8243Debug.Assert(destinationBytes[bytecountEndOfHtml - 1] == '>');
8244Debug.Assert(destinationBytes[133] == '<');
8245Debug.Assert(destinationBytes[bytecountEndOfFragment] == '<');
8259Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count);
8381Debug.Assert(RightToLeftInternal || (x >= data.X - 1 && x < data.Right), "x must be inside the horizontal bounds of this.layout.Data");
8382Debug.Assert(!RightToLeftInternal || (x >= data.X && x <= data.Right), "x must be inside the horizontal bounds of this.layout.Data");
8441Debug.Assert(dataGridViewColumn.Visible && !dataGridViewColumn.Frozen);
8474Debug.Assert(xOffset > 0);
8509Debug.Assert(index < Columns.Count);
8510Debug.Assert(Columns[index].Visible);
8551Debug.Assert(dataGridViewColumn!.Visible && !dataGridViewColumn.Frozen);
8601Debug.Fail("Could not find column in GetColumnXFromIndex");
8628Debug.Assert(!_vertScrollBar.Enabled
8661Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
8697Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
8708Debug.Assert(mouseY > rectScrollingArea.Bottom);
8753Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingCol >= 0);
8804Debug.Assert((!RightToLeftInternal && mouseX > rectScrollingArea.Right) || (RightToLeftInternal && mouseX < rectScrollingArea.Left));
8878Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
9089Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count);
9167Debug.Assert(y >= data.Y - 1 && y < data.Bottom, "y must be inside the vertical bounds of the data area.");
9197Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0
9221Debug.Assert(yOffset > 0);
9254Debug.Assert(index >= 0 && index < Rows.Count);
9255Debug.Assert((Rows.GetRowState(index) & DataGridViewElementStates.Visible) != 0);
9291Debug.Assert(indexTmp != -1);
9296Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0
9313Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow != -1);
9330Debug.Fail("Could not find row in GetRowYFromIndex");
9403Debug.Assert(xColumnLeftEdge == GetColumnXFromIndex(hti._col));
9477Debug.Assert(yRowTopEdge == GetRowYFromIndex(hti._row));
9544Debug.Assert(xColumnLeftEdge == GetColumnXFromIndex(hti._col));
9545Debug.Assert(yRowTopEdge == GetRowYFromIndex(hti._row));
9665Debug.Assert(rowIndex >= 0);
9686Debug.Assert(_dataGridViewOper[OperationTrackColSelect] || _dataGridViewOper[OperationTrackCellSelect]);
9697Debug.Assert(_horizScrollTimer is not null);
9752Debug.Assert(_ptCurrentCell.X == dataGridViewCell.ColumnIndex);
9780Debug.Assert(EditingControl is not null);
9831Debug.Assert(dataGridViewCell.DataGridView == this);
9871Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count);
9915Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count);
9943Debug.Assert(lo <= hi);
9944Debug.Assert(lo < Rows.Count);
9945Debug.Assert(hi < Rows.Count);
9975Debug.Assert(lo <= hi);
9976Debug.Assert(lo > -1);
10234Debug.Assert(_layout.Data.Height >= 0);
10257Debug.Assert(_layout.RowHeaders.Height >= 0);
10278Debug.Assert(_layout.Data.Width >= 0);
10287Debug.Assert(_layout.ColumnHeaders.Width >= 0);
10324Debug.Assert(_layout.Data.Height >= 0);
10335Debug.Assert(_layout.Data.Width >= 0);
10344Debug.Assert(_layout.ColumnHeaders.Width >= 0);
10373Debug.Assert(_horizScrollBar.Maximum > 0);
10415Debug.Assert(_vertScrollBar.Maximum > 0);
10457Debug.Assert(success);
10478Debug.Fail("Unexpected autoSizeRowsMode value in MapAutoSizeRowsModeToRowMode");
10506Debug.Assert(DataSource is not null, "this method should only be called when we have a data connection");
10507Debug.Assert(dataGridViewColumn.DataPropertyName.Length != 0, "this method should be called only for columns which have DataPropertyName set");
10589Debug.Assert(dataGridViewColumn.Index >= 0);
10590Debug.Assert(dataGridViewColumn.DataGridView == this);
10609Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet);
10642Debug.Assert(rowIndex >= 0);
10648Debug.Assert(rowIndex == Rows.Count - 1);
10669Debug.Assert(dataGridViewCell.OwningColumn is not null);
10680Debug.Assert(rowIndex >= 0);
10894Debug.Assert(dataGridViewRow.Cells.Count < newColumnCount);
10908Debug.Assert(weightSum <= ushort.MaxValue);
10911Debug.Assert(dataGridViewColumns is not null);
10973Debug.Assert(weightSum <= ushort.MaxValue);
10996Debug.Assert(dataGridViewColumn.CellType is not null);
11014Debug.Assert(dataGridViewColumn.CellType is not null);
11091Debug.Assert(dataGridViewRows is not null);
11131Debug.Assert(!AllowUserToAddRowsInternal);
11221Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet);
11304Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet);
11360Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet);
11791Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count);
11809Debug.Assert(_noDimensionChangeCount >= 0);
11815Debug.Assert(dataGridViewCell.RowIndex >= -1);
11816Debug.Assert(dataGridViewCell.ColumnIndex >= -1);
11831Debug.Assert(columnIndex >= 0);
11832Debug.Assert(rowIndex >= 0);
11879Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count);
11897Debug.Assert(_noDimensionChangeCount >= 0);
11962Debug.Assert(hti.Type is not DataGridViewHitTestType.None
11965Debug.Assert(_ptMouseDownCell.X == hti._col);
11966Debug.Assert(_ptMouseDownCell.Y == hti._row);
12014Debug.Assert(Columns[columnIndex].Resizable == DataGridViewTriState.True);
12121Debug.Assert(hti.Type == DataGridViewHitTestType.Cell);
12198Debug.Assert(MultiSelect || _individualSelectedCells.Count <= 1);
12247Debug.Assert(success);
12270Debug.Assert(MultiSelect || _selectedBandIndexes.Count <= 1);
12326Debug.Assert(_selectedBandIndexes.Contains(hti._col));
12336Debug.Assert(success);
12353Debug.Assert(_selectedBandIndexes.Count <= 1);
12426Debug.Assert(_selectedBandIndexes.Count <= 1);
12448Debug.Assert(success);
12473Debug.Assert(MultiSelect || _selectedBandIndexes.Count <= 1);
12524Debug.Assert(_selectedBandIndexes.Contains(hti._row) ==
12531Debug.Assert(_selectedBandIndexes.Contains(hti._row));
12541Debug.Assert(success);
12559Debug.Assert(_selectedBandIndexes.Count <= 1);
12632Debug.Assert(_selectedBandIndexes.Count <= 1);
12743Debug.Assert(hti.Type is not DataGridViewHitTestType.None
12755Debug.Assert(!_dataGridViewState2[State2_MessageFromEditingCtrls]);
12820Debug.Assert(MultiSelect);
12854Debug.Assert(success);
12870Debug.Assert(dataGridViewCell.RowIndex >= 0);
12914Debug.Assert(dataGridViewCellStyle is not null);
13115Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count);
13137Debug.Assert(_noDimensionChangeCount >= 0);
13161Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count);
13187Debug.Assert(_noDimensionChangeCount >= 0);
13422Debug.Assert(newDisplayIndex != dataGridViewColumn.DisplayIndex);
13480Debug.Assert(_dataGridViewOper[OperationInDisplayIndexAdjustments]);
13490Debug.Assert(_dataGridViewOper[OperationInDisplayIndexAdjustments]);
13593Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count);
13672Debug.Assert(autoSizeColumnCriteriaInternal != DataGridViewAutoSizeColumnCriteriaInternal.None);
13673Debug.Assert(autoSizeColumnCriteriaInternal != DataGridViewAutoSizeColumnCriteriaInternal.Fill);
13706Debug.Assert(SortOrder != SortOrder.None);
13732Debug.Assert(hti.Type == DataGridViewHitTestType.ColumnHeader);
13832Debug.Assert(MultiSelect || _selectedBandIndexes.Count <= 1);
13862Debug.Assert(_individualSelectedCells.Count == 0);
13906Debug.Assert(success);
13918Debug.Assert(success);
13929Debug.Assert(success);
13934Debug.Assert(CurrentCellAddress == new Point(-1, -1));
13939Debug.Assert(_selectedBandIndexes.Contains(hti._col));
14093Debug.Assert(dataGridViewColumn.Width == minimumWidth);
14173Debug.Assert(dataGridViewColumn.DataGridView is null);
14182Debug.Assert(hti._col >= 0);
14183Debug.Assert(MultiSelect);
14280Debug.Assert(success);
14393Debug.Assert(Columns.DisplayInOrder(dataGridViewColumn.Index, DisplayedBandsInfo.FirstDisplayedScrollingCol));
14446Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet);
14642Debug.Assert(AllowUserToAddRowsInternal);
14807Debug.Assert(!ReadOnly);
14828Debug.Fail("Unexpected DataGridViewElementStates param in DataGridView.OnDataGridViewElementStateChanging");
14844Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0);
14848Debug.Assert(DataConnection is not null);
14849Debug.Assert(DataConnection.CurrencyManager is not null);
14850Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y);
14890Debug.Fail("Unexpected DataGridViewElementStates param in DataGridView.OnDataGridViewElementStateChanging");
14908Debug.Assert(!Columns[dataGridViewCell.ColumnIndex].ReadOnly);
14909Debug.Assert(!Rows[dataGridViewCell.RowIndex].ReadOnly);
14910Debug.Assert(!ReadOnly);
14931Debug.Fail("Unexpected DataGridViewElementStates param in DataGridView.OnDataGridViewElementStateChanging");
14937Debug.Fail("Unexpected DataGridViewElement type in DataGridView.OnDataGridViewElementStateChanging");
15336Debug.Assert(_ptCurrentCell.X == -1);
15345Debug.Assert(success);
15351Debug.Assert(rowIndex >= 0);
15352Debug.Assert(insertionCount > 0);
15366Debug.Assert(rowIndex >= 0);
15374Debug.Assert(_ptCurrentCell.X == -1);
15383Debug.Assert(success);
15389Debug.Assert(rowIndex >= 0);
15390Debug.Assert(dataGridViewRows is not null);
15391Debug.Assert(dataGridViewRows.Length > 0);
15405Debug.Assert(dataGridViewRows is not null);
15406Debug.Assert(dataGridViewRows.Length > 0);
15414Debug.Assert(_ptCurrentCell.X == -1);
15423Debug.Assert(success);
15534Debug.Assert(dataGridViewRow.Cells.Count < newColumnCount);
15607Debug.Assert(success);
15673Debug.Assert(dataGridViewRows is not null);
15982Debug.Assert(dgvcme is not null);
15993Debug.Assert(dgvcme is not null);
16050Debug.Assert(dgvcme is not null);
16073Debug.Assert(Columns[columnIndex].Resizable == DataGridViewTriState.True);
16093Debug.Assert(_columnHeadersHeightSizeMode == DataGridViewColumnHeadersHeightSizeMode.EnableResizing);
16100Debug.Assert(dgvcme is not null);
16123Debug.Assert(Rows[rowIndex].Resizable == DataGridViewTriState.True);
16143Debug.Assert(_rowHeadersWidthSizeMode == DataGridViewRowHeadersWidthSizeMode.EnableResizing);
16170Debug.Assert(_ptMouseDownCell.Y != -2);
16544Debug.Assert(_cumulativeVerticalWheelDelta > -PInvoke.WHEEL_DELTA);
16545Debug.Assert(_cumulativeVerticalWheelDelta < PInvoke.WHEEL_DELTA);
16546Debug.Assert(_cumulativeHorizontalWheelDelta > -PInvoke.WHEEL_DELTA);
16547Debug.Assert(_cumulativeHorizontalWheelDelta < PInvoke.WHEEL_DELTA);
16645Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
16654Debug.Assert(totalVisibleFrozenHeight == Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen));
16655Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
16787Debug.Fail($"DataGridView.OnPaint exception: {ex.Message} stack trace {ex.StackTrace}");
16935Debug.Assert(dataGridViewColumn.Index >= 0);
16936Debug.Assert(dataGridViewColumn.DataGridView is null);
16961Debug.Assert(_ptCurrentCell.X == -1);
16970Debug.Assert(success);
16986Debug.Assert(autoSizeColumnMode != DataGridViewAutoSizeColumnMode.NotSet);
17012Debug.Assert(_ptCurrentCell.X == -1);
17021Debug.Assert(success);
17088Debug.Assert(dataGridViewColumn.Index >= 0 && dataGridViewColumn.Index < Columns.Count);
17139Debug.Assert(success);
17152Debug.Assert(success);
17168Debug.Assert(columnIndex == 0);
17211Debug.Assert(Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time");
17212Debug.Assert(Columns[i].HeaderCell.SortGlyphDirection == dataGridViewColumn.HeaderCell.SortGlyphDirection, "DataBound columns should have the same SortGlyphDirection as the one on the DataGridView");
17251Debug.Assert(_horizontalOffset >= dataGridViewColumn.Thickness);
17302Debug.Assert(rowIndexDeleted >= 0 && rowIndexDeleted < Rows.Count);
17325Debug.Assert(NewRowIndex != -1);
17326Debug.Assert(NewRowIndex == Rows.Count - 1);
17340Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y);
17354Debug.Assert(success);
17367Debug.Assert(success);
17624Debug.Assert(rowIndex >= 0);
17717Debug.Assert(columnIndex >= 0 && rowIndex >= 0);
17790Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count);
17811Debug.Assert(_noDimensionChangeCount >= 0);
17834Debug.Assert(rowIndex >= 0);
17990Debug.Assert(hti.Type == DataGridViewHitTestType.RowHeader);
18095Debug.Assert(success);
18120Debug.Assert(MultiSelect || _selectedBandIndexes.Count <= 1);
18150Debug.Assert(_individualSelectedCells.Count == 0);
18180Debug.Assert(_selectedBandIndexes.Contains(hti._row) ==
18196Debug.Assert(success);
18203Debug.Assert(success);
18214Debug.Assert(success);
18219Debug.Assert(CurrentCellAddress == new Point(-1, -1));
18224Debug.Assert(_selectedBandIndexes.Contains(hti._row));
18363Debug.Assert(rowIndex != -1);
18364Debug.Assert(_autoSizeRowsMode == DataGridViewAutoSizeRowsMode.None);
18384Debug.Assert(columnIndex >= 0 && rowIndex >= 0);
18397Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count);
18418Debug.Assert(_noDimensionChangeCount >= 0);
18464Debug.Assert(hti._row >= 0);
18465Debug.Assert(MultiSelect);
18558Debug.Assert(success);
18618Debug.Assert(rowIndex >= -1);
18820Debug.Assert(_noDimensionChangeCount >= 0);
18844Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count);
18865Debug.Assert(_noDimensionChangeCount >= 0);
19001Debug.Assert(dataGridViewColumnHeaderCell is not null);
19025Debug.Assert(Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time");
19053Debug.Assert(success);
19160Debug.Assert(success);
19170Debug.Assert(success);
19200Debug.Assert(rowIndexTmp != -1);
19228Debug.Assert((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Visible) != 0);
19230Debug.Assert(numDisplayedScrollingRows > 0);
19233Debug.Assert(rowIndexTmp != -1);
19339Debug.Assert(bounds.Left == 0);
19340Debug.Assert(bounds.Top == 0);
19393Debug.Fail("DataGridView.PaintBorder - Unexpected BorderStyle value.");
19425Debug.Assert(cellBounds.Width > 0);
19494Debug.Assert(dataGridViewColumn.Visible && !dataGridViewColumn.Frozen);
19503Debug.Assert(cellBounds.Width > 0);
19542Debug.Assert(clipRegion is not null);
19603Debug.Assert(_dataGridViewOper[OperationTrackColHeadersResize] || _dataGridViewOper[OperationTrackRowResize]);
19608Debug.Assert(_dataGridViewOper[OperationTrackRowHeadersResize]
19683Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0);
19684Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0);
19826Debug.Assert(_inPerformLayoutCount >= 0);
19855Debug.Assert(EditingControl is not null);
20010Debug.Assert(rowIndex >= 0);
20076Debug.Assert(dataGridViewRow.Index == -1);
20088Debug.Assert(dataGridViewRow.Index == -1);
20245Debug.Assert(success);
20271Debug.Assert(_ptAnchorCell.Y >= 0);
20323Debug.Assert(success);
20368Debug.Assert(success);
20438Debug.Assert(success);
20498Debug.Assert(success);
20527Debug.Assert(_ptAnchorCell.Y >= 0);
20565Debug.Assert(success);
20610Debug.Assert(success);
20679Debug.Assert(success);
20734Debug.Assert(success);
20756Debug.Assert(_ptAnchorCell.Y >= 0);
20826Debug.Assert(success);
20880Debug.Assert(success);
20978Debug.Assert(success);
21040Debug.Assert(success);
21080Debug.Assert(success);
21565Debug.Assert(_ptCurrentCell.Y != -1);
21566Debug.Assert(CurrentCellInternal is not null);
21567Debug.Assert(EditMode != DataGridViewEditMode.EditOnEnter
21576Debug.Assert(success);
21965Debug.Assert(success);
22184Debug.Assert(success);
22191Debug.Assert(success);
22212Debug.Assert(_ptAnchorCell.X >= 0);
22235Debug.Assert(success);
22245Debug.Assert(success);
22252Debug.Assert(success);
22274Debug.Assert(success);
22295Debug.Assert(success);
22302Debug.Assert(success);
22344Debug.Assert(success);
22354Debug.Assert(success);
22361Debug.Assert(success);
22383Debug.Assert(success);
22404Debug.Assert(success);
22411Debug.Assert(success);
22479Debug.Assert(success);
22489Debug.Assert(success);
22496Debug.Assert(success);
22527Debug.Assert(success);
22546Debug.Assert(success);
22553Debug.Assert(success);
22573Debug.Assert(success);
22608Debug.Assert(success);
22615Debug.Assert(success);
22626Debug.Assert(_ptAnchorCell.X >= 0);
22647Debug.Assert(success);
22669Debug.Assert(success);
22680Debug.Assert(success);
22692Debug.Assert(success);
22714Debug.Assert(success);
22728Debug.Assert(success);
22740Debug.Assert(success);
22757Debug.Assert(_ptAnchorCell.X >= 0);
22760Debug.Assert(success);
22777Debug.Assert(success);
22788Debug.Assert(success);
22795Debug.Assert(success);
22812Debug.Assert(success);
22826Debug.Assert(success);
22833Debug.Assert(success);
22849Debug.Assert(_ptAnchorCell.X >= 0);
22869Debug.Assert(success);
22895Debug.Assert(success);
22906Debug.Assert(success);
22913Debug.Assert(success);
22939Debug.Assert(success);
22951Debug.Assert(success);
22958Debug.Assert(success);
22973Debug.Assert(success);
23019Debug.Assert(firstDisplayedScrollingRowIndex != -1);
23039Debug.Assert(nextScreenVisibleRowIndexTmp != -1);
23077Debug.Assert(success);
23103Debug.Assert(_ptAnchorCell.Y >= 0);
23126Debug.Assert(success);
23143Debug.Assert(_ptAnchorCell.Y >= 0);
23179Debug.Assert(_ptAnchorCell.Y >= 0);
23285Debug.Assert(previousScreenVisibleRowIndexTmp != -1);
23313Debug.Assert(previousScreenVisibleRowIndex != -1);
23362Debug.Assert(_ptAnchorCell.Y >= 0);
23401Debug.Assert(_ptAnchorCell.Y >= 0);
23437Debug.Assert(_ptAnchorCell.Y >= 0);
23563Debug.Assert(success);
23570Debug.Assert(success);
23613Debug.Assert(success);
23623Debug.Assert(success);
23630Debug.Assert(success);
23652Debug.Assert(success);
23673Debug.Assert(success);
23680Debug.Assert(success);
23722Debug.Assert(success);
23732Debug.Assert(success);
23739Debug.Assert(success);
23761Debug.Assert(success);
23782Debug.Assert(success);
23789Debug.Assert(success);
23859Debug.Assert(success);
23869Debug.Assert(success);
23876Debug.Assert(success);
23907Debug.Assert(success);
23926Debug.Assert(success);
23933Debug.Assert(success);
23953Debug.Assert(success);
23988Debug.Assert(success);
23995Debug.Assert(success);
24011Debug.Assert(_ptAnchorCell.X >= 0);
24027Debug.Assert(success);
24034Debug.Assert(success);
24045Debug.Assert(success);
24052Debug.Assert(success);
24069Debug.Assert(success);
24083Debug.Assert(success);
24090Debug.Assert(success);
24112Debug.Assert(_ptAnchorCell.X >= 0);
24115Debug.Assert(success);
24122Debug.Assert(success);
24133Debug.Assert(success);
24140Debug.Assert(success);
24157Debug.Assert(success);
24171Debug.Assert(success);
24178Debug.Assert(success);
24194Debug.Assert(_ptAnchorCell.X >= 0);
24219Debug.Assert(success);
24235Debug.Assert(success);
24246Debug.Assert(success);
24253Debug.Assert(success);
24279Debug.Assert(success);
24291Debug.Assert(success);
24298Debug.Assert(success);
24313Debug.Assert(success);
24344Debug.Assert(MultiSelect || _selectedBandIndexes.Count <= 1);
24362Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.X));
24371Debug.Assert(MultiSelect || _selectedBandIndexes.Count <= 1);
24389Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y));
24654Debug.Assert(_ptAnchorCell.Y >= 0);
24751Debug.Assert(_ptAnchorCell.Y >= 0);
24853Debug.Assert(_ptAnchorCell.Y >= 0);
25036Debug.Assert(_ptAnchorCell.Y >= 0);
25351Debug.Assert(success);
25362Debug.Assert(dataGridViewCurrentCell is not null);
25375Debug.Assert(_dataGridViewState1[State1_CurrentCellInEditMode]);
25377Debug.Assert(dataGridViewEditingCell is not null);
25406Debug.Assert(NewRowIndex == Rows.Count - 1);
25415Debug.Assert(IsCurrentCellInEditMode);
25469Debug.Assert(dgvcme.Clicks == 1);
25545Debug.Assert(_ptCurrentCell.Y != -1);
25567Debug.Assert(_dataGridViewState1[State1_CurrentCellInEditMode]);
25571Debug.Assert(dataGridViewEditingCell is not null);
25626Debug.Assert(list.Count == rowsCount);
25743Debug.Assert(_noSelectionChangeCount > 0);
25770Debug.Assert(_noSelectionChangeCount > 0);
25792Debug.Assert(dataGridViewCell.ColumnIndex != columnIndexException || dataGridViewCell.RowIndex != rowIndexException);
25811Debug.Assert(_noSelectionChangeCount > 0);
25863Debug.Assert(_noSelectionChangeCount > 0);
26027Debug.Assert(rowIndex >= 0);
26028Debug.Assert(rowIndex < Rows.Count);
26073Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count);
26205Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingCol >= 0);
26222Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingCol >= 0);
26272Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count);
26273Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingCol >= -1 && DisplayedBandsInfo.FirstDisplayedScrollingCol < Columns.Count);
26274Debug.Assert(DisplayedBandsInfo.LastTotallyDisplayedScrollingCol >= -1 && DisplayedBandsInfo.LastTotallyDisplayedScrollingCol < Columns.Count);
26275Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count);
26276Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= -1 && DisplayedBandsInfo.FirstDisplayedScrollingRow < Rows.Count);
26277Debug.Assert(Columns[columnIndex].Visible);
26278Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0);
26335Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count);
26365Debug.Assert(firstDisplayedScrollingRow != -1);
26390Debug.Assert(rowCount != 0);
26391Debug.Assert(deltaY != 0);
26392Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen));
26414Debug.Assert(rowsRect.X > 0);
26421Debug.Assert(rowsRect.Height >= 0);
26425Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow > -1);
26450Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
26452Debug.Assert(firstVisibleScrollingRow != -1);
26454Debug.Assert(newScrolledOffRowCount >= rowCount);
26461Debug.Assert(rows != 0);
26462Debug.Assert((rows > 0 && (scrollEventType == ScrollEventType.SmallIncrement || scrollEventType == ScrollEventType.LargeIncrement))
26466Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
26477Debug.Assert(newFirstVisibleScrollingRow != -1);
26495Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow == oldFirstVisibleScrollingRow);
26518Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow == newFirstVisibleScrollingRow);
26532Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
26558Debug.Assert(newFirstVisibleScrollingRow != -1);
26684Debug.Assert(_noDimensionChangeCount >= 0);
26685Debug.Assert(_noSelectionChangeCount >= 0);
26712Debug.Assert(index >= 0);
26786Debug.Assert(_columnHeadersHeight != columnHeadersHeight);
26787Debug.Assert(columnHeadersHeight >= MinimumColumnHeadersHeight);
26788Debug.Assert(columnHeadersHeight <= MaxHeadersThickness);
26854Debug.Assert(rowIndex >= 0 && columnIndex < Columns.Count && rowIndex < Rows.Count);
26922Debug.Assert(oldCurrentCellX == _ptCurrentCell.X);
26923Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y);
27020Debug.Assert(oldCurrentCellY >= 0);
27128Debug.Assert(oldCurrentCellX == _ptCurrentCell.X);
27129Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y);
27184Debug.Assert(oldCurrentCellY >= 0);
27216Debug.Assert(columnIndexFrom >= 0 && columnIndexTo >= 0);
27217Debug.Assert((Columns[columnIndexFrom]).DisplayIndex <= (Columns[columnIndexTo]).DisplayIndex);
27218Debug.Assert(rowIndexFrom >= 0 && rowIndexTo >= 0);
27219Debug.Assert(rowIndexFrom <= rowIndexTo);
27220Debug.Assert(_noSelectionChangeCount > 0);
27303Debug.Assert(_noSelectionChangeCount > 0);
27338Debug.Assert(columnIndexFrom >= 0 && columnIndexTo >= 0);
27339Debug.Assert((Columns[columnIndexFrom]).DisplayIndex <= (Columns[columnIndexTo]).DisplayIndex);
27340Debug.Assert(_noSelectionChangeCount > 0);
27354Debug.Assert(_selectedBandIndexes.Contains(columnIndex));
27381Debug.Assert(_selectedBandIndexes.Contains(columnIndexTo));
27389Debug.Assert(rowIndexFrom >= 0 && rowIndexTo >= 0);
27390Debug.Assert(rowIndexFrom <= rowIndexTo);
27391Debug.Assert(_noSelectionChangeCount > 0);
27410Debug.Assert(!_selectedBandIndexes.Contains(rowIndex));
27419Debug.Assert(_selectedBandIndexes.Contains(rowIndex));
27541Debug.Assert(columnIndex >= 0 && rowIndex >= 0 && columnIndex < Columns.Count && rowIndex < Rows.Count);
27614Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count);
27650Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count);
27711Debug.Assert(_individualSelectedCells.Contains(dataGridViewCell));
27729Debug.Assert(_selectedBandIndexes.Contains(columnIndex));
27765Debug.Assert(_selectedBandIndexes.Contains(rowIndex));
27830Debug.Assert(_individualSelectedCells.Count <= 1);
27844Debug.Assert(_selectedBandIndexes.Count <= 1);
27882Debug.Assert(_selectedBandIndexes.Count <= 1);
27899Debug.Assert(_selectedBandIndexes.Count <= 1);
27924Debug.Assert(_selectedBandIndexes.Count <= 1);
27942Debug.Assert(_selectedBandIndexes.Contains(rowIndex) ==
27951Debug.Assert(_selectedBandIndexes.Contains(rowIndex) ==
27966Debug.Assert(_selectedBandIndexes.Count <= 1);
27983Debug.Assert(_selectedBandIndexes.Count <= 1);
28011Debug.Assert(success);
28032Debug.Assert(!_selectedBandIndexes.Contains(columnIndex));
28038Debug.Assert(_selectedBandIndexes.Contains(columnIndex));
28051Debug.Assert(MultiSelect || _selectedBandIndexes.Count <= 1);
28063Debug.Assert(_selectedBandIndexes.Count <= 1);
28151Debug.Assert(!_selectedBandIndexes.Contains(rowIndex));
28158Debug.Assert(_selectedBandIndexes.Contains(rowIndex));
28171Debug.Assert(MultiSelect || _selectedBandIndexes.Count <= 1);
28183Debug.Assert(_selectedBandIndexes.Count <= 1);
28289Debug.Assert(!(comparer is not null && DataSource is not null));
28290Debug.Assert(direction is ListSortDirection.Ascending or ListSortDirection.Descending);
28315Debug.Assert(rowVFIndex != -1);
28317Debug.Assert(Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) == 0);
28379Debug.Assert(rowVIndex != -1);
28383Debug.Assert(rowVIndex != -1);
28394Debug.Assert(_dataGridViewOper[OperationInSort]);
28415Debug.Assert(rowIndex1 != NewRowIndex);
28416Debug.Assert(rowIndex2 != NewRowIndex);
28501Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
28525Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0);
28753Debug.Assert(lastVisibleRowIndex != -1);
28890Debug.Assert(_editingPanel is not null);
28901Debug.Assert(EditingControl is not null);
28965Debug.Assert(dataGridViewColumnTmp is not null);
28969Debug.Assert(ColumnNeedsDisplayedState(dataGridViewColumnTmp));
28982Debug.Assert(numDisplayedScrollingCols > 0);
28986Debug.Assert(dataGridViewColumnTmp is not null);
28990Debug.Assert(ColumnNeedsDisplayedState(dataGridViewColumnTmp));
29126Debug.Assert(rowVisible);
29188Debug.Assert(rowIndexTmp != -1);
29204Debug.Assert(numDisplayedScrollingRows > 0);
29207Debug.Assert(rowIndexTmp != -1);
29287Debug.Assert(anchorColumnIndex >= 0);
29288Debug.Assert(anchorRowIndex >= 0);
29289Debug.Assert(newEdgeColumnIndex >= 0);
29290Debug.Assert(newEdgeRowIndex >= 0);
29291Debug.Assert(_noSelectionChangeCount > 0);
29473Debug.Assert(oldEdgeRowIndex < anchorRowIndex);
29518Debug.Assert(oldEdgeRowIndex <= anchorRowIndex);
29701Debug.Assert(oldEdgeRowIndex >= anchorRowIndex);
29849Debug.Assert(oldEdgeRowIndex >= anchorRowIndex);
29935Debug.Assert(_dataGridViewOper[OperationTrackRowSelect] || _dataGridViewOper[OperationTrackCellSelect]);
29988Debug.Assert(_editingPanel is not null);
29999Debug.Assert(EditingControl is not null);
30053Debug.Assert(hti._row == -1);
30057Debug.Assert(hti._col == -1);
30061Debug.Assert(hti._row == -1);
30062Debug.Assert(hti._col == -1);
System\Windows\Forms\Controls\ListView\ListView.cs (44)
851Debug.Assert(!_listViewState[LISTVIEWSTATE_flipViewToLargeIconAndSmallIcon] || View == View.SmallIcon, "we need this bit only in SmallIcon view");
852Debug.Assert(!_listViewState[LISTVIEWSTATE_flipViewToLargeIconAndSmallIcon] || Application.ComCtlSupportsVisualStyles, "we need this bit only when loading ComCtl 6.0");
859Debug.Assert(!value || View == View.SmallIcon, "we need this bit only in SmallIcon view");
860Debug.Assert(!value || Application.ComCtlSupportsVisualStyles, "we need this bit only when loading ComCtl 6.0");
1692Debug.Assert(result != 0, "LVM_SETTILEVIEWINFO failed");
2471Debug.Assert(_listItemSorter is not null, "null sorter!");
2770Debug.Assert(item is not null, "Item was null in ITEMPREPAINT");
2935Debug.Fail("Exception occurred attempting to setup custom draw. Disabling custom draw for this control", e.ToString());
3103Debug.Assert(fi.Exists, "who deleted our temp file?");
3128Debug.Assert(fi.Exists, "who deleted our temp file?");
3268Debug.Assert(false, "these are all the search directions");
3407Debug.Assert(item._listView == this, "Can't GetDisplayIndex if the list item doesn't belong to us");
3408Debug.Assert(item._id != -1, "ListViewItem has no ID yet");
3431Debug.Assert(displayIndex != -1, "This item is in the list view -- why can't we find a display index for it?");
3438Debug.Assert(_listViewItems is not null, "listItemsArray is null, but the handle isn't created");
3569Debug.Assert(IsHandleCreated, "How did we add items without a handle?");
3940Debug.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");
3941Debug.Assert(group != DefaultGroup, "this method should be used only when the user adds a group, not when we add our own DefaultGroup");
3987Debug.Assert(IsHandleCreated, "InsertGroupNative precondition: list-view handle must be created");
3988Debug.Assert(group == DefaultGroup || Groups.Contains(group), "Make sure ListView.Groups contains this group before adding the native LVGROUP. Otherwise, custom-drawing may break.");
3991Debug.Assert(result != -1, "Failed to insert group");
4027Debug.Assert(itemList is not null, "In Begin/EndUpdate with no delayed array!");
4054Debug.Assert(!_listItemsTable.ContainsKey(itemID), "internal hash table inconsistent -- inserting item, but it's already in the hash table");
4063Debug.Assert(_listViewItems is not null, "listItemsArray is null, but the handle isn't created");
4087Debug.Assert(!FlipViewToLargeIconAndSmallIcon, "if we added even 1 item then we should have been done w/ FlipViewToLargeIconAndSmallIcon");
4102Debug.Assert(IsHandleCreated, "InsertItemsNative precondition: list-view handle must be created");
4127Debug.Assert(Items.Contains(li), "Make sure ListView.Items contains this item before adding the native LVITEM. Otherwise, custom-drawing may break.");
4751Debug.Assert(_listViewItems is null, "listItemsArray not null, even though handle created");
5057Debug.Assert(retval != 0);
5163Debug.Assert(IsHandleCreated, "RemoveGroupNative precondition: list-view handle must be created");
5260Debug.Assert((mask & ~(LVCOLUMNW_MASK.LVCF_FMT | LVCOLUMNW_MASK.LVCF_TEXT | LVCOLUMNW_MASK.LVCF_IMAGE)) == 0, "Unsupported mask in setColumnInfo");
5421Debug.Assert(_savedCheckedItems.Contains(item), "somehow we lost track of one item");
5493Debug.Assert(IsHandleCreated, "How did we add items without a handle?");
5530Debug.Assert(IsHandleCreated, "SetItemText with no handle");
5761Debug.Assert(IsHandleCreated, "UpdateGroupNative precondition: list-view handle must be created");
5764Debug.Assert(result != -1);
5870Debug.Assert(retval != -1, "Error enabling group view");
5877Debug.Assert(Application.ComCtlSupportsVisualStyles, "this function works only when ComCtl 6.0 and higher is loaded");
5878Debug.Assert(_viewStyle == View.Tile, "this function should be called only in Tile view");
5891Debug.Assert(retval != 0, "LVM_SETTILEVIEWINFO failed");
6106Debug.Fail("Exception occurred attempting to setup header custom draw. Disabling custom draw for the column header", e.ToString());
6228Debug.Assert(_listViewState[LISTVIEWSTATE_headerControlTracking], "HDN_ENDTRACK and HDN_BEGINTRACK are out of sync.");
6490Debug.Assert(_labelEdit is null,
6546Debug.Assert(_labelEdit is not null, "There is no active label edit to end");
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (15)
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");
235Debug.Assert(item is not null, $"Failed to get item at index {i}");
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\ListView\ListViewItem.cs (10)
455Debug.Assert(_group == value, "BUG: group member variable wasn't updated!");
997Debug.Assert(_listView is null || !_listView.VirtualMode, "ListViewItem::Host can't be used w/ a virtual item");
998Debug.Assert(parent is null || !parent.VirtualMode, "ListViewItem::Host can't be used w/ a virtual list");
1037Debug.Assert(_listView is not null, "This method is used only when items are parented in a list view");
1038Debug.Assert(!_listView.VirtualMode, "we need to update the group only when the user specifies the list view items in localizable forms");
1063Debug.Assert(_listView!.IsHandleCreated, "Should only invoke UpdateStateToListView when handle is created.");
1100Debug.Assert(!updateOwner || result != 0, "Groups not enabled");
1102Debug.Assert(!updateOwner || result != 0, $"Doesn't contain group id: {lvItem.iGroupId}");
1297Debug.Assert(listView is not null && listView.VirtualMode, "ListViewItem::SetItemIndex should be used only when the list is virtual");
1298Debug.Assert(index > -1, "can't set the index on a virtual list view item to -1");
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (17)
245Debug.Fail(ex.ToString());
1176Debug.Assert(_selectedTab is not null, "Invalid tab selection!");
1511Debug.Assert(_tabs[i] is not null, "Null item in tab array!");
1598Debug.Fail("Bad tab. We're going to remove it.", e.ToString());
1692Debug.Fail($"{nameof(CreatePropertyTab)} failed. {exception.Message}");
1729Debug.Fail($"Failed to create {nameof(PropertyTab)}. {exception.Message}");
1855Debug.Assert(
2087Debug.Fail("Bad Tab. Disable for now.", e.ToString());
2165Debug.Fail($"Failed to add a large property grid toolstrip button, {ex}");
3559Debug.Fail("Bad Tab. It's going away.", e.ToString());
3600Debug.Assert(_tabs.Count > 0, "We don't have any tabs left!");
3615Debug.Assert(_tabs.Count > 0, "Tab array destroyed!");
3695Debug.Assert(oldObject is not null && newObject is not null && oldObject.GetType() == newObject.GetType());
3753Debug.Assert(_tabs.Count > 0, "No view tab buttons to select!");
3757Debug.Fail("Failed to find the tab!");
3843Debug.Assert(view < _viewSortButtons.Length, "Can't select view type > 1");
3983Debug.Fail(ex.ToString());
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (10)
76Debug.Assert(OwnerGrid is not null, "GridEntry w/o PropertyGrid owner, text rendering will fail.");
181Debug.Assert(value is null || !Disposed, "Why are we putting new children in after we are disposed?");
681Debug.Assert(value != this, "how can we be our own parent?");
917Debug.Assert(!Disposed, "Why are we creating children after we are disposed?");
1271Debug.Assert(ownerTab is not null, "No current tab!");
1371Debug.Assert(!s_pbrsAssertPropsSwitch.Enabled, $"Bad property '{PropertyLabel}.{property.Name}': {w}");
1400Debug.Fail($"Failed to get properties: {e.GetType().Name},{e.Message}\n{e.StackTrace}");
1444Debug.Fail($"Bad Type Converter! {t.GetType().Name}, {t.Message},{converter}", t.ToString());
1977Debug.Assert(gridHost is not null, "No prop entry host!");
2212Debug.Assert(o is not null, "Collection contains a null element.");
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (24)
146Debug.Assert(maskedTextProvider is not null, "Initializing from a null MaskProvider ref.");
572Debug.Fail("Invalid InsertKeyMode. This code path should have never been executed.");
1086Debug.Fail("Could not get IME input context.");
1223Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
1499Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
1500Debug.Assert(keyCode is Keys.Delete or Keys.Back, $"Delete called with keyCode == {keyCode}");
1501Debug.Assert(startPosition >= 0 && ((startPosition + selectionLen) <= _maskedTextProvider.Length), "Invalid position range.");
1694Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
1772Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2058Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2158Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2159Debug.Assert(text is not null, "text is null.");
2277Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2381Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2492Debug.Assert(newProvider is not null, "Initializing from a null MaskProvider ref.");
2541Debug.Assert(srcPos != MaskedTextProvider.InvalidIndex, "InvalidIndex unexpected at this time.");
2696Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2715Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2753Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2802Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2859Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
2876Debug.Fail(ex.ToString());
2997Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
3016Debug.Assert(!_flagState[s_isNullMask], "This method must be called when a Mask is provided.");
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (25)
351Debug.Fail($"error in processMnemonic: {ex}");
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");
615Debug.Fail("bad state");
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");
656Debug.Fail("bad state");
674Debug.Assert(hr.Succeeded, $"DoVerb call failed for verb 0x{verb}");
829Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Passive, "Wrong start state to transition from");
833Debug.Assert(_activeXInstance is null, "activeXInstance must be null");
850Debug.Assert(_activeXInstance is not null, "w/o an exception being thrown we must have an object...");
862Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Loaded, "Wrong start state to transition from");
891Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Loaded, "Wrong start state to transition from");
919Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Running, "Wrong start state to transition from");
938Debug.Assert(ActiveXState == WebBrowserHelper.AXState.Running, "Wrong start state to transition from");
960Debug.Assert(ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Wrong start state to transition from");
981Debug.Assert(ActiveXState == WebBrowserHelper.AXState.InPlaceActive, "Wrong start state to transition from");
1001Debug.Assert(ActiveXState == WebBrowserHelper.AXState.UIActive, "Wrong start state to transition from");
1005Debug.Assert(hr.Succeeded, "Failed to UIDeactivate");
1017Debug.Assert(_activeXInstance is not null, "The native control is null");
1177Debug.Assert(!result.Failed, $"{result}");
System\Windows\Forms\Form.cs (35)
183Debug.Assert(_formState[s_formStateAllowTransparency] == 0, "Failed to set formState[FormStateAllowTransparency]");
184Debug.Assert(_formState[s_formStateBorderStyle] == (int)FormBorderStyle.Sizable, "Failed to set formState[FormStateBorderStyle]");
185Debug.Assert(_formState[s_formStateTaskBar] == 1, "Failed to set formState[FormStateTaskBar]");
186Debug.Assert(_formState[s_formStateControlBox] == 1, "Failed to set formState[FormStateControlBox]");
187Debug.Assert(_formState[s_formStateKeyPreview] == 0, "Failed to set formState[FormStateKeyPreview]");
188Debug.Assert(_formState[s_formStateLayered] == 0, "Failed to set formState[FormStateLayered]");
189Debug.Assert(_formState[s_formStateMaximizeBox] == 1, "Failed to set formState[FormStateMaximizeBox]");
190Debug.Assert(_formState[s_formStateMinimizeBox] == 1, "Failed to set formState[FormStateMinimizeBox]");
191Debug.Assert(_formState[s_formStateHelpButton] == 0, "Failed to set formState[FormStateHelpButton]");
192Debug.Assert(_formState[s_formStateStartPos] == (int)FormStartPosition.WindowsDefaultLocation, "Failed to set formState[FormStateStartPos]");
193Debug.Assert(_formState[s_formStateWindowState] == (int)FormWindowState.Normal, "Failed to set formState[FormStateWindowState]");
194Debug.Assert(_formState[s_formStateShowWindowOnCreate] == 0, "Failed to set formState[FormStateShowWindowOnCreate]");
195Debug.Assert(_formState[s_formStateAutoScaling] == 1, "Failed to set formState[FormStateAutoScaling]");
196Debug.Assert(_formState[s_formStateSetClientSize] == 0, "Failed to set formState[FormStateSetClientSize]");
197Debug.Assert(_formState[s_formStateTopMost] == 0, "Failed to set formState[FormStateTopMost]");
198Debug.Assert(_formState[s_formStateSWCalled] == 0, "Failed to set formState[FormStateSWCalled]");
199Debug.Assert(_formState[s_formStateMdiChildMax] == 0, "Failed to set formState[FormStateMdiChildMax]");
200Debug.Assert(_formState[s_formStateRenderSizeGrip] == 0, "Failed to set formState[FormStateRenderSizeGrip]");
201Debug.Assert(_formState[s_formStateSizeGripStyle] == 0, "Failed to set formState[FormStateSizeGripStyle]");
202Debug.Assert(_formState[s_formStateIsWindowActivated] == 0, "Failed to set formState[FormStateIsWindowActivated]");
203Debug.Assert(_formState[s_formStateIsTextEmpty] == 0, "Failed to set formState[FormStateIsTextEmpty]");
204Debug.Assert(_formState[s_formStateIsActive] == 0, "Failed to set formState[FormStateIsActive]");
205Debug.Assert(_formState[s_formStateIconSet] == 0, "Failed to set formState[FormStateIconSet]");
461Debug.Assert(!DesignMode, "Form designer should not allow base size set in design mode.");
510Debug.Assert(AutoSize == value, "Error detected setting Form.AutoSize.");
1104Debug.Assert(_ctlClient is null, "why isn't ctlClient null");
1110Debug.Assert(_ctlClient is not null, "why is ctlClient null");
3761Debug.Assert(IsHandleCreated, "Attempt to set focus to a form that has not yet created its handle.");
4641Debug.WriteLine($"AutoScaleFactor computed for new DPI = {autoScaleFactor.Width} - {autoScaleFactor.Height}");
4954Debug.Assert(result);
4998Debug.Assert(result);
6151Debug.Assert(containerControl is not null);
6244Debug.Assert(IsMdiContainer, "Not an MDI container!");
7004Debug.Assert(Properties.ContainsKey(s_propFormMdiParent), "how is formMdiParent null?");
7005Debug.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 (20)
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
175Debug.WriteLineIf(width < 0 || height < 0, $"\t\t'{element}' destination bounds resulted in negative");
373Debug.Assert(GetAnchorInfo(element) is not null, "AnchorInfo should be initialized before LayoutAnchorControls().");
380Debug.Assert(!HasCachedBounds(container), "Do not call this method with an active cached bounds list.");
395Debug.Assert(element.Bounds == GetCachedBounds(element), "Why do we have cachedBounds for a docked element?");
456Debug.Assert(mdiClient is null, "How did we end up with multiple MdiClients?");
469Debug.Fail("Unsupported value for dock.");
553Debug.Assert((measureOnly && (newSize.Width >= remainingSize.Width)) || (newSize.Width == remainingSize.Width),
570Debug.Assert((measureOnly && (newSize.Height >= remainingSize.Height)) || (newSize.Height == remainingSize.Height),
590Debug.Assert(desiredSize.Width >= 0 && desiredSize.Height >= 0, "Error detected in xGetDockSize: Element size was negative.");
716Debug.Assert(!HasCachedBounds(element.Container), "Do not call this method with an active cached bounds list.");
840Debug.Assert(AppContextSwitches.AnchorLayoutV2, $"AnchorLayoutV2 should be called only when {AppContextSwitches.AnchorLayoutV2SwitchName} is enabled.");
942Debug.Assert(!HasCachedBounds(element.Container), "Do not call this method with an active cached bounds list.");
977Debug.Assert(GetDock(element) == value, "Error setting Dock value.");
1059Debug.Assert(element.Container == container, "We have non-children in our containers cached bounds store.");
1100Debug.Assert(specified == BoundsSpecified.None || GetCachedBounds(element) == element.Bounds,
1112Debug.Assert(!HasCachedBounds(container), "Do not call this method with an active cached bounds list.");
System\Windows\Forms\Layout\LayoutUtils.cs (24)
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.");
529Debug.Fail("Unsupported value for region1Align.");
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.");
563Debug.Fail("Unsupported value for region1Align.");
567Debug.Assert(Rectangle.Union(region1, region2) == bounds, "region1 and region2 do not add up to bounds.");
System\Windows\Forms\Layout\TableLayout.cs (18)
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");
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");
1490Debug.Assert(containerInfo.ColumnStyles[k].SizeType == SizeType.Absolute, $"column {k} is not absolutely sized");
1495Debug.Assert(containerInfo.ColumnStyles[k].SizeType == SizeType.Absolute, $"column {k} is not absolutely sized");
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");
1507Debug.Assert(containerInfo.RowStyles[k].SizeType == SizeType.Absolute, $"column {k} is not absolutely sized");
1512Debug.Assert(containerInfo.RowStyles[k].SizeType == SizeType.Absolute, $"column {k} is not absolutely sized");
System\Windows\Forms\SendKeys\SendKeys.SendKeysHookProc.cs (1)
53Debug.Assert(
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)
System.Windows.Forms.Design (559)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (33)
145Debug.Fail("GetReflectionTypeFromTypeHelper does not accept null arguments.");
195Debug.Fail("GetReflectionTypeHelper does not accept null arguments.");
214Debug.Fail("GetPropertiesHelper does not accept null arguments.");
246Debug.Fail("GetEventsHelper does not accept null arguments.");
278Debug.Fail("GetAttributesHelper does not accept null arguments.");
300Debug.Fail("GetAttributesFromTypeHelper does not accept null arguments.");
360Debug.Assert(resourceName is not null, "non-string keys in dictionary entry");
465Debug.Assert(manager.Context.Current == statement, "Someone corrupted the context stack");
994Debug.Assert(o is IConvertible, $"Array size expression could not be resolved to IConvertible: {(o.GetType().Name)}");
1165Debug.Fail($"Unrecognized expression type: {result.GetType().Name}");
1181Debug.Assert(targetObject is not null, "Failed to get target object for event attach");
1182Debug.Assert(eventName is not null, "Failed to get eventName for event attach");
1202Debug.Fail("Encountered delegate object create with more or less than 1 parameter?");
1278Debug.Fail($"Unsupported binary operator type: {op}");
1325Debug.Fail("Could not convert left or right side to binary-compatible value.");
1460Debug.Fail("Should never get here!");
1477Debug.Fail("Addition operator not supported for this type");
1482Debug.Fail("Math operators are not supported");
1693Debug.Assert(nameParts.Length > 0, "How can we fail to split when IndexOf succeeded?");
1952Debug.Assert(argumentValues is not null && parameters is not null, "These should have been allocated when the argument array was created.");
1973Debug.Assert(manager.Context.Current == newCtx, "Context stack corrupted.");
2012Debug.Assert(arguments.Length == 0, "Property serialization does not support arguments");
2018Debug.Assert(arguments.Length == 0, "Field serialization does not support arguments");
2025Debug.Fail($"Unrecognized reflection type in instance descriptor: {descriptor.MemberInfo.GetType().Name}");
2118Debug.Assert(manager.Context.Current == descriptor, "Context stack corrupted.");
2159Debug.Assert(manager.Context.Current == inheritance, "Somebody messed up our context stack.");
2227Debug.Assert(manager.Context.Current == tree, "Context stack corrupted.");
2235Debug.Assert(manager.Context.Current == statements, "Context stack corrupted.");
2263Debug.Assert(manager.Context.Current == propertyToSerialize, "Context stack corrupted.");
2370Debug.Assert(manager.Context.Current == saveStatements, "Context stack corrupted.");
2402Debug.Assert(saveStatements != statements, "The serializer returned the same collection that exists on the context stack.");
2563Debug.Assert(manager.Context.Current == saveStatements, "Context stack corrupted.");
2769Debug.Assert(className is not null, "FillStatementTable expected a valid className but received null");
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (20)
125Debug.Fail("We expected to get IResourceService -- no resource serialization will be available");
209Debug.Assert(name is not null, "name is null");
219Debug.Assert(culture.Parent != culture, "should have returned when culture = InvariantCulture");
364Debug.Assert(_manager is not null, "This resource manager object has been destroyed.");
390Debug.Assert(culture is not null, "null parameter");
463Debug.Assert(invariantWriter is not null, "GetResourceWriter returned null for the InvariantCulture");
468Debug.Assert(!ReadCulture.Equals(CultureInfo.InvariantCulture), "invariantCultureResourcesDirty should only come into play when readCulture != CultureInfo.InvariantCulture; check that CompareWithParentValue is correct");
470Debug.Assert(resourceSet is not null, "ResourceSet for the InvariantCulture not loaded, but it's considered dirty?");
481Debug.Assert(_metadata is not null, "No metadata, but it's dirty?");
491Debug.Fail("Metadata not supported, but it's dirty?");
503Debug.Fail("Couldn't find IResourceService");
518Debug.Fail($"Cannot save a non-serializable value into resources. Add serializable to {(value is null ? "(null)" : value.GetType().Name)}");
568Debug.Assert(metadata is not null, "Don't know where to push metadata.");
603Debug.Fail($"Cannot save a non-serializable value into resources. Add serializable to {(value is null ? "(null)" : value.GetType().Name)}");
620Debug.Assert(resourceSet is not null, "No ResourceSet for the InvariantCulture?");
648Debug.Assert(!ReadCulture.Equals(CultureInfo.InvariantCulture), "invariantCultureResourcesDirty should only come into play when readCulture != CultureInfo.InvariantCulture; check that CompareWithParentValue is correct");
650Debug.Assert(resourceSet is not null, "No ResourceSet for the InvariantCulture?");
686Debug.Assert(!ReadCulture.Equals(CultureInfo.InvariantCulture), "invariantCultureResourcesDirty should only come into play when readCulture != CultureInfo.InvariantCulture; check that CompareWithParentValue is correct");
688Debug.Assert(resourceSet is not null, "No ResourceSet for the InvariantCulture?");
697Debug.Fail($"Unknown CompareValue {comparison}");
System\Windows\Forms\Design\CommandSet.cs (17)
201Debug.Assert(SelectionService is not null, "CommandSet relies on the selection service, which is unavailable.");
218Debug.Assert(ds is not null, "No dictionary service");
300Debug.Fail("non-CLS compliant exception");
541Debug.Fail("Commands may be disabled, the location property was not accessible", e.ToString());
774Debug.Fail($"Unknown command mapped to OnKeyMove: {cmd}");
1082Debug.Fail($"Unrecognized command: {id}");
1399Debug.Assert(ds is not null, "No designer serialization service -- we cannot copy to clipboard");
1444Debug.Assert(ds is not null, "No designer serialization service -- we cannot copy to clipboard");
2192Debug.Assert(SelectionService is not null, "We need the SelectionService, but we can't find it!");
2308Debug.Assert(selectedObjects is not null, "queryStatus should have disabled this");
2389Debug.Assert(selectedObjects is not null, "queryStatus should have disabled this");
2414Debug.Assert(sizeProp is not null, "No size property on component");
2415Debug.Assert(locProp is not null, "No location property on component");
2464Debug.Assert(false, "Invoking pbrs command failed");
2548Debug.Assert(selectedObjects is not null, "queryStatus should have disabled this");
2895Debug.Assert(designerHost is not null, "Failed to get designer host");
3081Debug.Assert(attr is not null, "Type descriptor gave us a null attribute -- problem in type descriptor");
System\Windows\Forms\Design\ComponentTray.cs (29)
87Debug.Assert(es is not null, "Component tray wants an extender provider service, but there isn't one.");
102Debug.Assert(_menucmdArrangeIcons is null, "Non-Null Menu Command for ArrangeIcons");
103Debug.Assert(_menucmdLineupIcons is null, "Non-Null Menu Command for LineupIcons");
104Debug.Assert(_menucmdLargeIcons is null, "Non-Null Menu Command for LargeIcons");
528Debug.Fail("Don't know how to add component!");
543Debug.Fail("component is not IComponent");
746Debug.Assert(host is not null, "Service object could not provide us with a designer host.");
873Debug.Assert(_menucmdArrangeIcons is not null, "Null Menu Command for ArrangeIcons");
874Debug.Assert(_menucmdLineupIcons is not null, "Null Menu Command for LineupIcons");
875Debug.Assert(_menucmdLargeIcons is not null, "Null Menu Command for LargeIcons");
973Debug.Fail("Anything we're extending should have a component view.");
988Debug.Assert(_serviceProvider is not null, "Trying to access services too late or too early.");
1114Debug.Assert((de.AllowedEffect & (DragDropEffects.Move | DragDropEffects.Copy)) != 0, "DragDropEffect.Move | .Copy isn't allowed?");
1148Debug.Assert((de.AllowedEffect & DragDropEffects.Copy) != 0, "DragDropEffect.Move isn't allowed?");
1553Debug.Fail("Anything we're extending should have a component view.");
1740Debug.Assert(c.Visible, $"TrayControl for {c.Component} should not be positioned");
1759Debug.Assert(index >= 1, "Got the wrong index, how could that be?");
1781Debug.Assert(index >= 1, "Got the wrong index, how could that be?");
1795Debug.Assert(_controls.IndexOf(c) != -1, "Add control to the list of controls before autoarranging.!!!");
1796Debug.Assert(Visible == c.Visible, $"TrayControl for {((TrayControl)c).Component} should not be positioned");
1805Debug.Assert(c.Visible, $"TrayControl for {c.Component} should not be positioned");
1808Debug.Assert(_selectionUISvc is not null, "No SelectionUIService available for tray.");
1824Debug.Assert(comp is not null, "Component for the TrayControl is null");
1859Debug.Assert(comp is not null, "Component for the TrayControl is null");
1922Debug.Assert(ds is not null, "ComponentTray relies on IDictionaryService, which is not available.");
2075Debug.Assert(host is not null, "Component tray does not have access to designer host.");
2119Debug.Assert(_tray._selectionUISvc is not null, "We shouldn't be able to begin a drag without this");
2362Debug.Fail(e.Message);
2752Debug.Assert(o1 is not null && o2 is not null, "Null objects sent for comparison!!!");
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (15)
63Debug.Assert(host is not null, "Designer host is null");
88Debug.Assert(tlbRef is not null, $"Null reference returned by AddActiveX (tlbimp) by the project system for: {_clsid}");
98Debug.Assert(axRef is not null, $"Null reference returned by AddActiveX (aximp) by the project system for: {_clsid}");
137Debug.Fail($"Could not create type: {e}");
141Debug.Assert(comps[0] is not null, "Could not create instance of ActiveX control wrappers!!!");
175Debug.Assert(trs is not null, "No type resolution service found.");
178Debug.Assert(a is not null, $"No assembly found at {fullPath}");
200Debug.Assert(attrs is not null && attrs.Length == 1, $"Invalid number of GuidAttributes found on: {t.FullName}");
231Debug.Assert(project is not null, $"No DTE Project for the current project item: {name}");
234Debug.Assert(vsproject is not null, $"No VS Project for the current project item: {name}");
237Debug.Assert(references is not null, $"No References for the current project item: {name}");
261Debug.Assert(verKey is not null, $"No version registry key found for: {controlKey}");
280Debug.Assert(majorVer > 0 && minorVer >= 0, $"No Major version number found for: {controlKey}");
287Debug.Assert(!tlbGuid.Equals(Guid.Empty), $"No valid Guid found for: {controlKey}");
306Debug.Assert(inprocServer is not null, $"No valid InprocServer32 found for: {controlKey}");
System\Windows\Forms\Design\ToolStripDesigner.cs (12)
476Debug.Assert(_host is not null, "Why didn't we get a designer host?");
525Debug.Assert(_host is not null, "Why didn't we get a designer host?");
526Debug.Assert(_pendingTransaction is null, "Adding item with pending transaction?");
559Debug.Assert(textProperty is not null, "Could not find 'Text' property in ToolStripItem.");
578Debug.Assert(imageProperty is not null, "Could not find 'Image' property in ToolStripItem.");
585Debug.Assert(displayProperty is not null, "Could not find 'DisplayStyle' property in ToolStripItem.");
589Debug.Assert(imageTransProperty is not null, "Could not find 'DisplayStyle' property in ToolStripItem.");
969Debug.Assert(_host is not null, "Why didn't we get a designer host?");
1077Debug.Assert(_host is not null, "Why didn't we get a designer host?");
1078Debug.Assert(_pendingTransaction is null, "Removing item with pending transaction?");
1697Debug.Assert(defaultName is not null && defaultName.Length > 0, "Couldn't create default name for item");
2449Debug.Assert(NewItemTransaction is null, "NewItemTransaction should have been nulled out and cancelled by now.");
System\Windows\Forms\Design\ToolStripItemBehavior.cs (10)
113Debug.Assert(item is not null, "Item passed is null, SelectionService cannot be obtained");
117Debug.Assert(selSvc is not null, "Failed to get Selection Service!");
127Debug.Assert(item is not null, "Item passed is null, BehaviorService cannot be obtained");
131Debug.Assert(behaviorSvc is not null, "Failed to get Behavior Service!");
141Debug.Assert(item is not null, "Item passed is null, ToolStripKeyBoardHandlingService cannot be obtained");
145Debug.Assert(keyBoardSvc is not null, "Failed to get ToolStripKeyboardHandlingService!");
294Debug.Assert(designerHost is not null, "Invalid DesignerHost");
545Debug.Assert(designerHost is not null, "Invalid DesignerHost");
649Debug.Assert(designerHost is not null, "Invalid DesignerHost");
963Debug.Assert(designerHost is not null, "Invalid DesignerHost");
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (14)
255Debug.Assert(item is not null, "Why is item null?");
259Debug.Assert(propertyName is not null, "Why is propertyName null?");
271Debug.Assert(item is not null, "Why is item null?");
275Debug.Assert(desc is not null, "Why is desc null?");
373Debug.Assert(designerHost is not null, "Why didn't we get a designer host?");
435Debug.Assert(designerHost is not null, "Why didn't we get a designer host?");
448Debug.Assert(dummyIndex != -1, "Why is item index negative?");
474Debug.Assert(designerHost is not null, "Why didn't we get a designer host?");
487Debug.Assert(dummyIndex != -1, "Why is item index negative?");
513Debug.Assert(designerHost is not null, "Why didn't we get a designer host?");
544Debug.Assert(dummyIndex != -1, "Why is item index negative?");
569Debug.Assert(getProperty is not null, "Could not find given property in control.");
585Debug.Assert(getProperty is not null, "Could not find given property in control.");
603Debug.Assert(changingProperty is not null, "Could not find given property in control.");
System.Windows.Forms.Primitives (39)
System.Windows.Input.Manipulations (107)
System.Xaml (176)
System\Xaml\Schema\TypeReflector.cs (13)
314Debug.Assert(_positionalParameterTypes is not null, "TryGetPositionalParameters should have been called first");
357Debug.Assert(!IsUnknown);
441Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
453Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
467Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
468Debug.Assert(_nonAttachableMemberCache is not null, "Members property should have been invoked before this");
480Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
481Debug.Assert(_nonAttachableMemberCache is not null, "Members property should have been invoked before this");
708Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
725Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
986Debug.Assert(UnderlyingType is not null, "Caller should check for UnderlyingType == null");
987Debug.Assert(_attachableMemberCache is not null, "AttachableMembers property should have been invoked before this");
1147Debug.Assert(value);
System\Xaml\XamlType.cs (26)
201Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsDictionary");
220Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind");
241Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind");
261Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsCollection");
337Debug.Assert(_reflector is not null, "_reflector should have been initialized by IsMarkupExtension");
523Debug.Assert(_reflector is not null, "_reflector should have been initialized by ItemType");
597Debug.Assert(_reflector is not null, "_reflector should have been initialized by GetCollectionKind");
824Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
861Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
955Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
969Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1030Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1208Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1222Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1233Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1267Debug.Assert(typeArgs.Length == 1);
1280Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1309Debug.Assert(typeArgs.Length == 1);
1324Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1343Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1423Debug.Assert(UnderlyingTypeInternal.IsSet, "EnsureReflector should have caused UnderlyingType to be initialized");
1673Debug.Assert(GetType() != typeof(XamlType), "Default GetAllMembers logic should have already captured all writeable properties");
1782Debug.Fail("Enum out of range");
1811Debug.Assert(_reflector is not null, "_reflector should have been initialized by AreAttributesAvailable");
1930Debug.Assert(xamlType1.IsUnknown);
1931Debug.Assert(xamlType2.IsUnknown);
testhost (1)
testhost.arm64 (1)
testhost.x86 (1)
UIAutomationClient (38)
UIAutomationClientSideProviders (95)
MS\Internal\AutomationProxies\Accessible.cs (14)
143Debug.Assert(acc != null, "null IAccessible");
316Debug.Assert(parent != null);
327Debug.Assert(false);
343Debug.Assert(parent != null);
354Debug.Assert(false);
685Debug.Assert( false, "Need to handle Accessible.accFocus case!" );
728Debug.Assert(_idChild == NativeMethods.CHILD_SELF);
773Debug.Assert(false);
916System.Diagnostics.Debug.Fail("Call to AccessibleChildren() returned E_INVALIDARG.");
979Debug.Assert(_accessibleChildrenIndex < 0);
1158Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected exception thrown for AccessibleChildren: {0}", e));
1166Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected hresult from AccessibleChildren: {0} count is {1} and actualCount is {2}", hr, count, actualCount));
1370Debug.Fail(string.Format(CultureInfo.CurrentCulture, "MsaaNativeProvider: IAccessible threw a COMException: {0}", e.Message));
1387Debug.Fail(string.Format(CultureInfo.CurrentCulture, "Unexpected IAccessible exception: {0}", e));
MS\Internal\AutomationProxies\WindowsEditBox.cs (17)
436Debug.Assert(point.x >= 0 && point.x < 65536, "WindowsEditBox.CharFromPos() x coordinate out of range.");
437Debug.Assert(point.y >= 0 && point.y < 65536, "WindowsEditBox.CharFromPos() y coordinate out of range.");
514Debug.Assert(!IsMultiline);
521Debug.Assert(IsMultiline);
551Debug.Assert(hfont != IntPtr.Zero, "WindowsEditBox.GetLogfont got null HFONT");
556Debug.Fail("WindowsEditBox.GetObject unexpected return value");
677Debug.Assert(index >= 0, "WindowsEditBox.LineFromChar negative index.");
678Debug.Assert(index <= GetTextLength(), "WindowsEditBox.LineFromChar index out of range.");
739Debug.Assert(index >= 0, "WindowsEditBox.PosFromChar negative index.");
740Debug.Assert(index < GetTextLength(), "WindowsEditBox.PosFromChar index out of range.");
743Debug.Assert(result!=-1, "WindowsEditBox.PosFromChar index out of bounds.");
798Debug.Assert(start >= 0, "WindowsEditBox.SetSel negative start.");
799Debug.Assert(start <= GetTextLength(), "WindowsEditBox.SetSel start out of range.");
800Debug.Assert(end >= 0, "WindowsEditBox.SetSel negative end.");
801Debug.Assert(end <= GetTextLength(), "WindowsEditBox.SetSel end out of range.");
961Debug.Assert(floor >= 0);
972Debug.Assert(i >= floor);
UIAutomationTypes (12)
vbc (16)
VBCSCompiler (34)
vstest.console (7)
vstest.console.arm64 (7)
WindowsFormsIntegration (25)