35959 references to Assert
Aspire.Components.Common.Tests (1)
Aspire.Confluent.Kafka (2)
Aspire.Dashboard (5)
Aspire.Hosting (5)
Aspire.Hosting.Azure (2)
Aspire.Hosting.Azure.ServiceBus (1)
Aspire.Playground.Tests (2)
Aspire.RabbitMQ.Client (5)
BuildActionTelemetryTable (2)
BuildBoss (1)
BuildValidator (11)
ClientSample (3)
CodeGenerator (6)
CodeStyleConfigFileGenerator (2)
ConfigurationSchemaGenerator (29)
csc (8)
CSharpSyntaxGenerator (7)
dotnet-dev-certs (2)
dotnet-svcutil-lib (1179)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (168)
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);
822Debug.Assert(xmlFragment != null);
848default: Debug.Assert(false); goto case XmlNodeType.None;
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);
2228Debug.Assert(_stringBuilder.Length == 0);
2269Debug.Assert(_outerReader is XmlTextReader);
2311Debug.Assert(_outerReader is XmlTextReader);
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);
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);
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);
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);
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);
5090Debug.Assert(_curNode.type == XmlNodeType.Element);
5227Debug.Assert(_stringBuilder.Length == 0);
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);
7169Debug.Assert(_ps.isEof);
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);
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);
8676Debug.Assert(_fragmentType == XmlNodeType.Attribute);
8693Debug.Assert(_parsingFunction == ParsingFunction.InReadAttributeValue);
8720Debug.Assert(_stringBuilder.Length == 0);
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);
9159Debug.Assert(_nameTableFromSettings == false);
9187Debug.Assert(_dtdInfo == null);
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);
GetDocument.Insider (1)
http2cat (30)
IIS.FunctionalTests (31)
IIS.LongTests (30)
IIS.NewHandler.FunctionalTests (30)
IIS.NewShim.FunctionalTests (30)
IIS.ShadowCopy.Tests (7)
IISExpress.FunctionalTests (31)
illink (196)
ILLink.RoslynAnalyzer (74)
InMemory.FunctionalTests (10)
IntegrationTestsWebsite (1)
InteractiveHost.UnitTests (1)
IOperationGenerator (4)
KeyManagementSimulator (3)
Microsoft.Arcade.Test.Common (2)
Microsoft.AspNetCore (3)
Microsoft.AspNetCore.Analyzer.Testing (1)
Microsoft.AspNetCore.Analyzers (3)
Microsoft.AspNetCore.Antiforgery (14)
Microsoft.AspNetCore.App.Analyzers (63)
Microsoft.AspNetCore.Authentication (1)
Microsoft.AspNetCore.Authentication.Cookies (1)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Authentication.Negotiate (3)
Microsoft.AspNetCore.Components (42)
Microsoft.AspNetCore.Components.Endpoints (29)
Microsoft.AspNetCore.Components.Server (10)
Microsoft.AspNetCore.Components.Web (10)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.CookiePolicy (1)
Microsoft.AspNetCore.Cryptography.Internal (4)
Microsoft.AspNetCore.Cryptography.KeyDerivation (17)
Microsoft.AspNetCore.DataProtection (39)
Microsoft.AspNetCore.DataProtection.Abstractions (2)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
Microsoft.AspNetCore.Diagnostics (10)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (8)
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
Microsoft.AspNetCore.Grpc.Swagger (3)
Microsoft.AspNetCore.Hosting (11)
Microsoft.AspNetCore.Html.Abstractions (2)
Microsoft.AspNetCore.Http (12)
Microsoft.AspNetCore.Http.Abstractions (24)
Microsoft.AspNetCore.Http.Connections (4)
Microsoft.AspNetCore.Http.Connections.Client (9)
Microsoft.AspNetCore.Http.Connections.Common (3)
Microsoft.AspNetCore.Http.Extensions (21)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
Microsoft.AspNetCore.Http.Results (6)
Microsoft.AspNetCore.HttpLogging (14)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.Identity.FunctionalTests (4)
Microsoft.AspNetCore.Mvc.Abstractions (7)
Microsoft.AspNetCore.Mvc.Analyzers (3)
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
Microsoft.AspNetCore.Mvc.Core (231)
Microsoft.AspNetCore.Mvc.Core.Test (1)
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
Microsoft.AspNetCore.Mvc.Formatters.Xml (3)
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
Microsoft.AspNetCore.Mvc.Localization (1)
Microsoft.AspNetCore.Mvc.Razor (7)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (16)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
Microsoft.AspNetCore.Mvc.RazorPages (78)
Microsoft.AspNetCore.Mvc.TagHelpers (7)
Microsoft.AspNetCore.Mvc.Testing (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (46)
Microsoft.AspNetCore.OpenApi (5)
Microsoft.AspNetCore.OutputCaching (20)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (6)
Microsoft.AspNetCore.Razor (1)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Microsoft.AspNetCore.ResponseCaching (3)
Microsoft.AspNetCore.ResponseCompression (4)
Microsoft.AspNetCore.Rewrite (6)
Microsoft.AspNetCore.Routing (84)
Microsoft.AspNetCore.Routing.Abstractions (19)
Microsoft.AspNetCore.Server.HttpSys (29)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (24)
Microsoft.AspNetCore.Server.IIS (27)
Microsoft.AspNetCore.Server.Kestrel.Core (267)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (10)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (6)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (22)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (12)
Microsoft.AspNetCore.Shared.Tests (89)
Microsoft.AspNetCore.SignalR.Client.Core (7)
Microsoft.AspNetCore.SignalR.Client.Tests (3)
Microsoft.AspNetCore.SignalR.Common (5)
Microsoft.AspNetCore.SignalR.Core (18)
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.SignalR.Tests (1)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.StaticAssets (5)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
Microsoft.AspNetCore.TestHost (3)
Microsoft.AspNetCore.WebSockets (10)
Microsoft.AspNetCore.WebUtilities (21)
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (2)
Microsoft.Build (56)
Microsoft.Build.Engine.OM.UnitTests (7)
Microsoft.Build.Framework (63)
Microsoft.Build.Tasks.CodeAnalysis (11)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
Microsoft.Build.Tasks.Core (18)
Microsoft.Build.Utilities.Core (10)
Microsoft.CodeAnalysis (2224)
DiagnosticAnalyzer\AnalyzerDriver.cs (58)
75Debug.Assert(_lazyAnalyzerExecutor != null);
85Debug.Assert(_lazyCurrentCompilationData != null);
103Debug.Assert(_lazyUnsuppressedAnalyzers != null);
120Debug.Assert(_lazyPerSymbolAnalyzerActionsCache != null);
139Debug.Assert(_lazyCompilationEndAnalyzers != null);
161Debug.Assert(_lazyAnalyzerGateMap != null);
175Debug.Assert(!_lazyGeneratedCodeAnalysisFlagsMap.IsDefault);
195Debug.Assert(_lazyNonConfigurableAndCustomConfigurableAnalyzers != null);
209Debug.Assert(_lazySymbolStartAnalyzers != null);
223Debug.Assert(_lazyTreatAllCodeAsNonGeneratedCode.HasValue);
242Debug.Assert(_lazyGeneratedCodeFilesMap != null);
256Debug.Assert(_lazyGeneratedCodeSymbolsForTreeMap != null);
270Debug.Assert(_lazySuppressedAnalyzersForTreeMap != null);
286Debug.Assert(_lazySuppressedDiagnosticIdsForUnsuppressedAnalyzers != null);
300Debug.Assert(_lazyIsGeneratedCodeSymbolMap != null);
345Debug.Assert(_lazyCompilationEventQueue != null);
359Debug.Assert(_lazyDiagnosticQueue != null);
373Debug.Assert(!severityFilter.Contains(ReportDiagnostic.Suppress));
374Debug.Assert(!severityFilter.Contains(ReportDiagnostic.Default));
401Debug.Assert(_lazyInitializeTask == null);
470Debug.Assert(_lazyInitializeTask == null);
471Debug.Assert(compilation.SemanticModelProvider != null);
696Debug.Assert(analysisScope != null);
718Debug.Assert(faultedTask.IsFaulted);
983Debug.Assert(severity != ReportDiagnostic.Default);
1007Debug.Assert(compilation.ContainsSyntaxTree(tree));
1014Debug.Assert(!reportedDiagnostics.IsEmptyWithoutResolution);
1038Debug.Assert(HasDiagnosticSuppressors);
1039Debug.Assert(!reportedDiagnostics.IsEmpty);
1040Debug.Assert(_programmaticSuppressions != null);
1041Debug.Assert(_diagnosticsProcessedForProgrammaticSuppressions != null);
1071Debug.Assert(suppressableDiagnostics.Contains(diagnostic));
1072Debug.Assert(!diagnostic.IsSuppressed);
1074Debug.Assert(suppressedDiagnostic.IsSuppressed);
1252Debug.Assert(location.SourceTree != null);
1272Debug.Assert(declaredSymbols != null);
1289Debug.Assert(GeneratedCodeSymbolsForTreeMap != null);
1290Debug.Assert(_lazyGeneratedCodeAttribute != null);
1312Debug.Assert(existingGeneratedCodeSymbols.SetEquals(generatedCodeSymbols));
1433Debug.Assert(_lazyInitializeTask != null);
1445Debug.Assert(_lazyPrimaryTask != null);
1779Debug.Assert(!subsetProcessedAnalyzers.IsDefault);
1817Debug.Assert(AnalyzerActions.SymbolStartActionsCount > 0);
1868Debug.Assert(completedAnalyzers.Count < analysisScope.Analyzers.Length);
1944Debug.Assert(compilationEvent is CompilationStartedEvent || compilationEvent is CompilationCompletedEvent);
2144Debug.Assert(AnalyzerActions.SymbolStartActionsCount > 0);
2145Debug.Assert(SymbolStartAnalyzers.Contains(analyzer));
2235Debug.Assert(!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken));
2260Debug.Assert(!IsDiagnosticAnalyzerSuppressed(analyzer, analyzerExecutor.Compilation.Options, analyzerManager, analyzerExecutor, analysisScope, severityFilter, cancellationToken));
2325Debug.Assert(_lazyDoNotAnalyzeGeneratedCode.HasValue);
2580Debug.Assert(shouldExecuteSyntaxNodeActions || shouldExecuteOperationActions || shouldExecuteCodeBlockActions || shouldExecuteOperationBlockActions);
2581Debug.Assert(!isInGeneratedCode || !DoNotAnalyzeGeneratedCode);
2975Debug.Assert(!operationBlock.Parent.IsImplicit);
2982Debug.Assert(operationBlock.Kind is OperationKind.Invocation or OperationKind.Invalid);
2983Debug.Assert(operationBlock.Parent.IsImplicit);
2984Debug.Assert(operationBlock.Parent.Parent is IConstructorBodyOperation ctorBody &&
2986Debug.Assert(!operationBlock.Parent.Parent.IsImplicit);
3004Debug.Assert(operationsToAnalyze.ToImmutableHashSet().Count == operationsToAnalyze.Count);
DiagnosticAnalyzer\AnalyzerExecutor.cs (44)
119Debug.Assert((addNonCategorizedDiagnostic != null) ^ (addCategorizedLocalDiagnostic != null));
120Debug.Assert((addCategorizedLocalDiagnostic != null) == (addCategorizedNonLocalDiagnostic != null));
184Debug.Assert(_analyzerExecutionTimeMap != null);
268Debug.Assert(startAction.Analyzer == symbolScope.Analyzer);
287Debug.Assert(_addSuppression != null);
327Debug.Assert(compilationEvent is CompilationStartedEvent || compilationEvent is CompilationCompletedEvent);
373Debug.Assert(getTopMostNodeForAnalysis != null);
374Debug.Assert(!filterSpan.HasValue || filterTree != null);
487Debug.Assert(getTopMostNodeForAnalysis != null);
488Debug.Assert(!isGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(analyzer));
489Debug.Assert(!IsAnalyzerSuppressedForSymbol(analyzer, symbolDeclaredEvent.Symbol, cancellationToken));
490Debug.Assert(!filterSpan.HasValue || filterTree != null);
586Debug.Assert(file.SourceTree != null);
637Debug.Assert(file.AdditionalFile != null);
679Debug.Assert(!isGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(syntaxNodeAction.Analyzer));
680Debug.Assert(!IsAnalyzerSuppressedForTree(syntaxNodeAction.Analyzer, node.SyntaxTree, cancellationToken));
705Debug.Assert(!isGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(operationAction.Analyzer));
706Debug.Assert(!IsAnalyzerSuppressedForTree(operationAction.Analyzer, semanticModel.SyntaxTree, cancellationToken));
800Debug.Assert(declaredNode != null);
801Debug.Assert(declaredSymbol != null);
802Debug.Assert(CanHaveExecutableCodeBlock(declaredSymbol));
803Debug.Assert(startActions.Any() || endActions.Any() || actions.Any());
804Debug.Assert(!executableBlocks.IsEmpty);
882Debug.Assert(getKind != null);
918Debug.Assert(!isGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(analyzer));
919Debug.Assert(!IsAnalyzerSuppressedForTree(analyzer, declaredNode.SyntaxTree, cancellationToken));
963Debug.Assert(nodeActions != null && nodeActions.Any());
1025Debug.Assert(nodeActionsByKind.Any());
1026Debug.Assert(!isGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(analyzer));
1027Debug.Assert(!IsAnalyzerSuppressedForTree(analyzer, model.SyntaxTree, cancellationToken));
1057Debug.Assert(operationActions.Any());
1119Debug.Assert(operationActionsByKind != null);
1120Debug.Assert(operationActionsByKind.Any());
1121Debug.Assert(!isGeneratedCode || !_shouldSkipAnalysisOnGeneratedCode(analyzer));
1122Debug.Assert(!IsAnalyzerSuppressedForTree(analyzer, model.SyntaxTree, cancellationToken));
1162Debug.Assert(((IFieldSymbol)symbol).AssociatedSymbol == null);
1221Debug.Assert(false);
1373Debug.Assert(IsAnalyzerExceptionDiagnostic(exceptionDiagnostic));
1423Debug.Assert(addNonCategorizedDiagnostic != null);
1428Debug.Assert(addNonCategorizedDiagnostic == null);
1429Debug.Assert(addCategorizedNonLocalDiagnostic != null);
1462Debug.Assert(_addNonCategorizedDiagnostic != null);
1518Debug.Assert(_analyzerExecutionTimeMap != null);
1529Debug.Assert(operation.Parent == null);
Microsoft.CodeAnalysis.CodeStyle (488)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
57Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
261Debug.Assert(
Microsoft.CodeAnalysis.CodeStyle.Fixes (18)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
395Debug.Assert(
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
Microsoft.CodeAnalysis.Collections.Package (72)
Microsoft.CodeAnalysis.CSharp (6704)
Binder\Binder.ValueChecks.cs (73)
116Debug.Assert(parameter.RefKind.IsWritableReference() && parameter.Type.IsRefLikeOrAllowsRefLikeType());
117Debug.Assert(GetParameterValEscapeLevel(parameter).HasValue);
158Debug.Assert(!isArgList || parameter is null);
416Debug.Assert(parameters.Length == indexerAccess.Indexer.Parameters.Length);
496Debug.Assert(expr.Syntax.Kind() != SyntaxKind.Argument || valueKind == BindValueKind.RefOrOut);
501Debug.Assert(valueKind == BindValueKind.RefOrOut);
612Debug.Assert(methodGroup.ResultKind != LookupResultKind.Viable);
676Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
847Debug.Assert(!RequiresRefAssignableVariable(valueKind));
1111Debug.Assert(!RequiresAssignableVariable(BindValueKind.AddressOf));
1130Debug.Assert(parameterSymbol.RefKind != RefKind.None || !RequiresRefAssignableVariable(valueKind));
1138Debug.Assert(backingField.RefKind == RefKind.None);
1139Debug.Assert(!RequiresRefAssignableVariable(valueKind));
1143Debug.Assert(backingField.RefKind == RefKind.None);
1176Debug.Assert(valueKind != BindValueKind.AddressOf); // If this assert fails, we probably should report ErrorCode.ERR_InvalidAddrOp
1280Debug.Assert(parameterSymbol.RefKind == RefKind.None || isRefScoped || refSafeToEscape.IsReturnOnly);
1362Debug.Assert(!fieldSymbol.IsStatic);
1363Debug.Assert(valueKind == BindValueKind.RefAssignable);
1504Debug.Assert(fieldAccess.ReceiverOpt is { });
1560Debug.Assert(!RequiresVariableReceiver(receiver, eventSymbol));
1607Debug.Assert(receiver != null);
1687Debug.Assert((object)propertySymbol != null);
1688Debug.Assert(propertySyntax != null);
1700Debug.Assert(propertySymbol.TypeWithAnnotations.HasType);
1902Debug.Assert(member.Kind != SymbolKind.Property);
1903Debug.Assert(member.Kind != SymbolKind.Event);
1970Debug.Assert(AllParametersConsideredInEscapeAnalysisHaveArguments(argsOpt, parameters, argsToParamsOpt));
2127Debug.Assert(AllParametersConsideredInEscapeAnalysisHaveArguments(argsOpt, parameters, argsToParamsOpt));
2291Debug.Assert(receiver.Type is { });
2292Debug.Assert(receiverIsSubjectToCloning != ThreeState.Unknown);
2296Debug.Assert(receiver is not BoundValuePlaceholderBase && method is not null && receiver.Type?.IsReferenceType == false);
2320Debug.Assert(argIndex == argsOpt.Length - 1);
2396Debug.Assert(!getArgument.RefKind.IsWritableReference());
2758Debug.Assert(symbol is null or SourceLocalSymbol or GlobalExpressionVariable);
2991Debug.Assert(underlyingParameter.IsThis);
2992Debug.Assert(underlyingParameter.RefKind != RefKind.Out); // Shouldn't get here for a constructor
2993Debug.Assert(underlyingParameter.ContainingSymbol is MethodSymbol);
3066Debug.Assert((object)local != null);
3067Debug.Assert(kind != BindValueKind.RValue);
3225Debug.Assert((object)field != null);
3226Debug.Assert(field.RefKind == RefKind.None ? RequiresAssignableVariable(kind) : RequiresRefAssignableVariable(kind));
3227Debug.Assert(field.Type != (object)null);
3231Debug.Assert(kind != BindValueKind.AddressOf); // If this assert fails, we probably should report ErrorCode.ERR_InvalidAddrOp
3261Debug.Assert((object)symbol != null);
3262Debug.Assert(RequiresAssignableVariable(kind));
3298Debug.Assert(expr.Type is not null);
3380Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
3533Debug.Assert(GetInlineArrayAccessEquivalentSignatureMethod(elementAccess, out _, out _).RefKind == RefKind.None);
3541Debug.Assert(equivalentSignatureMethod.RefKind != RefKind.None);
3582Debug.Assert(expr is BoundConversion conversion &&
3589Debug.Assert(expr is BoundUnaryOperator unaryOperator &&
3596Debug.Assert(expr is BoundBinaryOperator binaryOperator &&
3603Debug.Assert(expr is BoundUserDefinedConditionalLogicalOperator logicalOperator &&
3609Debug.Assert(expr is BoundCompoundAssignmentOperator compoundAssignmentOperator &&
3631Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
3706Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
3854Debug.Assert(GetInlineArrayAccessEquivalentSignatureMethod(elementAccess, out _, out _).RefKind == RefKind.None);
3862Debug.Assert(equivalentSignatureMethod.RefKind != RefKind.None);
3953Debug.Assert(!conversion.Conversion.IsUserDefined ||
3959Debug.Assert(expr is BoundUnaryOperator unaryOperator &&
3966Debug.Assert(expr is BoundBinaryOperator binaryOperator &&
3973Debug.Assert(expr is BoundUserDefinedConditionalLogicalOperator logicalOperator &&
3979Debug.Assert(expr is BoundCompoundAssignmentOperator compoundAssignmentOperator &&
4050Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
4357Debug.Assert(operatorMethod is not null);
4529Debug.Assert(elementType.Type is { });
4544Debug.Assert(constructMethod.ReturnType.Equals(expr.Type, TypeCompareKind.AllIgnoreOptions));
4545Debug.Assert(parameter.Type.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions));
4628Debug.Assert(expr.AccessorKind != AccessorKind.Unknown);
4715Debug.Assert(!checkingReceiver || expr.Type.IsValueType || expr.Type.IsTypeParameter());
4747Debug.Assert(thisParam.Type.Equals(((BoundThisReference)expr).Type, TypeCompareKind.ConsiderEverything));
5141Debug.Assert(operatorMethod is not null);
5503Debug.Assert(conversion.Conversion.IsInlineArray);
Binder\Binder_Conversions.cs (83)
67Debug.Assert(result is BoundConversion || (conversion.IsIdentity && ((object)result == source) || source.NeedsToBeConverted()) || hasErrors);
72Debug.Assert(filterConversion(conversion));
73Debug.Assert(BoundNode.GetConversion(result, placeholder1) == conversion);
79Debug.Assert(BoundNode.GetConversion(result2, placeholder2) == conversion);
191Debug.Assert(destination.SpecialType != SpecialType.System_String);
214Debug.Assert(!conversion.Exists);
233Debug.Assert(conversion.IsCollectionExpression
255Debug.Assert(source.Type is null);
256Debug.Assert(!conversion.Exists);
303Debug.Assert(!conversion.IsMethodGroup);
318Debug.Assert(conversion.UnderlyingConversions.Length == 1);
378Debug.Assert(elementConversions.Length == sourceTypes.Length);
400Debug.Assert(conversion.UnderlyingConversions.IsDefault);
409Debug.Assert(syntax.SyntaxTree is object);
417Debug.Assert(conversion.ConstrainedToTypeOpt is TypeParameterSymbol);
446Debug.Assert(source.Type is { });
449Debug.Assert(elementField is { });
468Debug.Assert(destination.OriginalDefinition.Equals(Compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.AllIgnoreOptions));
485Debug.Assert(source.Type is not null);
486Debug.Assert(destination.IsSpan() || destination.IsReadOnlySpan());
507Debug.Assert(destination.IsReadOnlySpan());
519Debug.Assert(destination.IsReadOnlySpan());
576Debug.Assert(type.IsSpan() || type.IsReadOnlySpan());
577Debug.Assert(type.IsDefinition);
586Debug.Assert(spanType.IsSpan() && readonlySpanType.IsReadOnlySpan());
587Debug.Assert(spanType.IsDefinition && readonlySpanType.IsDefinition);
609Debug.Assert(source.IsSpan() || source.IsReadOnlySpan());
610Debug.Assert(destination.IsReadOnlySpan());
611Debug.Assert(!source.IsDefinition && !destination.IsDefinition);
618Debug.Assert(!source.IsReadOnlySpan() || !sameElementTypes);
626Debug.Assert(source.IsReadOnlySpan() && destination.IsReadOnlySpan());
627Debug.Assert(source.IsDefinition && destination.IsDefinition);
654Debug.Assert(readOnlySpanType.IsReadOnlySpan());
655Debug.Assert(!readOnlySpanType.IsDefinition);
656Debug.Assert(((NamedTypeSymbol)readOnlySpanType).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].SpecialType is SpecialType.System_Char);
709Debug.Assert(destination.Equals(Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) ||
749Debug.Assert(expr is BoundObjectCreationExpressionBase { WasTargetTyped: true } or
754Debug.Assert(expr is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node.Syntax, node));
824Debug.Assert(conversion.Kind is ConversionKind.NoConversion);
853Debug.Assert(elementType is { });
888Debug.Assert(inProgressConstructor is not null);
895Debug.Assert((collectionCreation is BoundNewT && !isExpanded && constructor is null) ||
945Debug.Assert(elementType is { });
946Debug.Assert(elements.Length == elementConversions.Length);
947Debug.Assert(elementConversions.All(c => c.Exists));
989Debug.Assert(enumeratorInfo is { });
990Debug.Assert(enumeratorInfo.ElementType is { }); // ElementType is set always, even for IEnumerable.
1040Debug.Assert(result);
1044Debug.Assert(result);
1062Debug.Assert(parameterType.OriginalDefinition.Equals(Compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions));
1108Debug.Assert(!isParamsModifierValidation || syntax is ParameterSyntax);
1240Debug.Assert(!targetType.IsDynamic());
1356Debug.Assert(methodGroup.ReceiverOpt is not null);
1357Debug.Assert(methodGroup.ReceiverOpt.Type is not null);
1451Debug.Assert(methodGroup.ReceiverOpt is not null);
1467Debug.Assert(receiverType is not null);
1528Debug.Assert(constructed is not null);
1561Debug.Assert(node != null);
1562Debug.Assert(methodGroup != null);
1563Debug.Assert(methodGroup.Error == null);
1564Debug.Assert(methodGroup.Methods.Count > 0);
1617Debug.Assert(!method.IsRuntimeFinalizer());
1653Debug.Assert(call.Method.Name == "Add");
1656Debug.Assert(false); // Add test if we hit this assert.
1684Debug.Assert(false);
1752Debug.Assert(elementTypeWithAnnotations.Type is null); // GetCollectionExpressionTypeKind() does not set elementType for these cases.
1764Debug.Assert(elementTypeWithAnnotations.HasType);
1774Debug.Assert(elementType is { });
1821Debug.Assert(reportedErrors);
1931Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
1970Debug.Assert(targetTyped || destination.IsErrorType() || destination.Equals(source.Type, TypeCompareKind.ConsiderEverything));
2003Debug.Assert(conversionGroup != null);
2052Debug.Assert(conversion.BestUserDefinedConversionAnalysis is object); // All valid user-defined conversions have this populated
2166Debug.Assert(conversion.Kind == ConversionKind.FunctionType);
2167Debug.Assert(source.Kind is BoundKind.MethodGroup or BoundKind.UnboundLambda);
2172Debug.Assert(delegateType is { });
2312Debug.Assert(delegateType is not null);
2316Debug.Assert(lambdaSymbol.ParameterCount == delegateParameters.Length);
2429Debug.Assert(conversion.IsNullable == destination.IsNullableType());
2668Debug.Assert(!invokedAsExtensionMethod);
2832Debug.Assert(methodParameters.Length > numParams + (isExtensionMethod ? 1 : 0));
2998Debug.Assert(conversion.Method is object);
3200Debug.Assert(underlyingType.SpecialType != SpecialType.None);
Binder\Binder_Expressions.cs (230)
196Debug.Assert(expr != null);
197Debug.Assert(resultKind != LookupResultKind.Viable);
310Debug.Assert(op.NoCommonTypeError != 0);
411Debug.Assert(expr.Kind is BoundKind.UnboundLambda or BoundKind.MethodGroup);
441Debug.Assert((object)this.ContainingMemberOrLambda == field);
449Debug.Assert(initializerBinder != null);
499Debug.Assert(this.InParameterDefaultValue);
500Debug.Assert(this.ContainingMemberOrLambda.Kind == SymbolKind.Method || this.ContainingMemberOrLambda.Kind == SymbolKind.Property);
504Debug.Assert(defaultValueBinder != null);
522Debug.Assert(initializerBinder != null);
590Debug.Assert(node != null);
1440Debug.Assert(ContainingType is { });
1458Debug.Assert((this.Flags & BinderFlags.InContextualAttributeBinder) != 0);
1502Debug.Assert(symbol is null or LocalSymbol or LocalFunctionSymbol or RangeVariableSymbol or TypeParameterSymbol);
1580Debug.Assert(node != null);
1618Debug.Assert(node.Arity == typeArgumentList.Count);
1669Debug.Assert(isError); // Should have been reported by GetSymbolOrMethodOrPropertyGroup.
1743Debug.Assert(SyntaxFacts.IsInvoked(id) == invoked);
1806Debug.Assert(!isError);
1807Debug.Assert(!primaryConstructor.GetCapturedParameters().ContainsKey(shadowedParameter)); // How could we capture a shadowed parameter?
1834Debug.Assert((options & LookupOptions.NamespacesOrTypesOnly) == 0);
1863Debug.Assert(node.Identifier.IsUnderscoreToken());
1971Debug.Assert(!symbol.ContainingSymbol.Equals(containingMethod));
2120Debug.Assert(primaryCtor is null ||
2139Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType());
2162Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType());
2485Debug.Assert(node != null);
2513Debug.Assert(location is not null);
2523Debug.Assert(this.ContainingMemberOrLambda is not null);
2587Debug.Assert(node.OperatorToken.IsKind(SyntaxKind.CaretToken));
2786Debug.Assert(conversion.IsUserDefined);
2871Debug.Assert((object)operand.Type != null);
2912Debug.Assert(targetTypeWithAnnotations.HasType && targetTypeWithAnnotations.IsNullableType());
2913Debug.Assert((object)operand.Type != null && !operand.Type.IsNullableType());
3162Debug.Assert(isVar != declType.HasType);
3178Debug.Assert(declarationExpression.IsOutVarDeclaration());
3202Debug.Assert(localSymbol.DeclarationKind == LocalDeclarationKind.OutVariable);
3320Debug.Assert(argumentSyntax is ArgumentSyntax || argumentSyntax is AttributeArgumentSyntax);
3432Debug.Assert(result.ConversionForArg(arg).IsIdentity);
3433Debug.Assert(!argument.NeedsToBeConverted());
3434Debug.Assert(!expanded || result.ParameterFromArgument(arg) != parameters.Length - 1);
3450Debug.Assert(!available);
3462Debug.Assert(argNumber > 0);
3475Debug.Assert(argNumber >= 0); // can be 0 for receiver of extension method
3484Debug.Assert(argNumber > 0);
3510Debug.Assert(paramsArgsBuilder is null);
3550Debug.Assert(argument is BoundUnconvertedInterpolatedString or BoundBinaryOperator { IsUnconvertedInterpolatedStringAddition: true });
3571Debug.Assert(parameterTypeWithAnnotations.HasType);
3576Debug.Assert(kind.IsIdentity);
3604Debug.Assert(arguments[arg].Kind is not
3633Debug.Assert(methodResult.Result.ParamsElementTypeOpt.HasType);
3634Debug.Assert(methodResult.Result.ParamsElementTypeOpt.Type != (object)ErrorTypeSymbol.EmptyParamsCollectionElementTypeSentinel);
3656Debug.Assert(collectionArgs.Length != 0);
3661Debug.Assert(firstParamsArgument != -1);
3675Debug.Assert(argsToParamsBuilder is not null || argsToParamsOpt.IsDefault);
3725Debug.Assert(unconvertedString is BoundUnconvertedInterpolatedString or BoundBinaryOperator { IsUnconvertedInterpolatedStringAddition: true });
3727Debug.Assert(interpolatedStringConversion.IsInterpolatedStringHandler);
3728Debug.Assert(handlerType is NamedTypeSymbol { IsInterpolatedStringHandlerType: true });
3735Debug.Assert(handlerParameterIndexes.IsEmpty);
3748Debug.Assert(arguments is not null);
3779Debug.Assert(handlerParameterIndexes.All((index, paramLength) => index >= BoundInterpolatedStringArgumentPlaceholder.InstanceParameter && index < paramLength,
3798Debug.Assert(handlerArgumentIndexesBuilder[handlerParameterIndex] is BoundInterpolatedStringArgumentPlaceholder.UnspecifiedParameter);
3831Debug.Assert(argumentIndex != interpolatedStringArgNum);
3838Debug.Assert(receiver!.Type is not null);
3891Debug.Assert(receiver != null);
4178Debug.Assert(rank > 0);
4179Debug.Assert(dimension > 0 && dimension <= rank);
4180Debug.Assert(exprBuilder != null);
4251Debug.Assert(!boundInitExpr.IsDefault);
4261Debug.Assert(boundInitExprIndex >= 0 && boundInitExprIndex < boundInitExpr.Length);
4286Debug.Assert(boundInitExprIndex >= 0 && boundInitExprIndex < boundInitExpr.Length);
4289Debug.Assert(init.HasAnyErrors);
4290Debug.Assert(init.Type.IsErrorType());
4399Debug.Assert(creationSyntax == null ||
4402Debug.Assert(initSyntax != null);
4403Debug.Assert((object)type != null);
4404Debug.Assert(boundInitExprOpt.IsDefault || creationSyntax.Kind() == SyntaxKind.ImplicitArrayCreationExpression);
4556Debug.Assert(node is StackAllocArrayCreationExpressionSyntax || node is ImplicitStackAllocArrayCreationExpressionSyntax);
4607Debug.Assert(node != null);
4646Debug.Assert(node.IsKind(SyntaxKind.ImplicitStackAllocArrayCreationExpression) || node.IsKind(SyntaxKind.StackAllocArrayCreationExpression));
4692Debug.Assert(expression != null);
4710Debug.Assert(expression != null);
4736Debug.Assert(type == SpecialType.System_UInt32 || type == SpecialType.System_UInt64);
4771Debug.Assert(argumentListBinder.IsSemanticModelBinder);
4803Debug.Assert((object)constructor != null);
4804Debug.Assert(constructor.MethodKind == MethodKind.Constructor ||
4806Debug.Assert(diagnostics != null);
4820Debug.Assert(constructorReturnType.IsVoidType()); //true of all constructors
4839Debug.Assert((object)initializerType != null ||
4875Debug.Assert(initializerArgumentListOpt.Parent.Kind() == SyntaxKind.ThisConstructorInitializer);
4981Debug.Assert(initializerType.IsErrorType() ||
5168Debug.Assert(result is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node, node));
5275Debug.Assert(expression.Type is { });
5282Debug.Assert(conversion.IsValid);
5291Debug.Assert(length > 0);
5377Debug.Assert(!type.IsGenericOrNonGenericExpressionType(out _));
5464Debug.Assert(!conv.IsExtensionMethod);
5465Debug.Assert(conv.IsValid); // i.e. if it exists, then it is valid.
5532Debug.Assert(type.TypeKind is TypeKind.Class or TypeKind.Struct);
5576Debug.Assert(typeSyntax is not null);
5595Debug.Assert(syntax != null);
5596Debug.Assert((object)type != null);
5627Debug.Assert(syntax != null);
5628Debug.Assert((object)type != null);
5634Debug.Assert(syntax.Parent.Parent.Kind() != SyntaxKind.WithInitializerExpression);
5635Debug.Assert(rhsValueKind == BindValueKind.RValue);
5655Debug.Assert(initializerSyntax.Kind() == SyntaxKind.ObjectInitializerExpression ||
5657Debug.Assert((object)initializerType != null);
5713Debug.Assert(objectInitializerMemberBinder != null);
5719Debug.Assert((object)boundLeft.Type != null);
5747Debug.Assert(objectInitializerMemberBinder != null);
6051Debug.Assert(!boundMember.NeedsToBeConverted());
6073Debug.Assert(boundMember.HasAnyErrors);
6087Debug.Assert(memberNameMap != null);
6097Debug.Assert(memberInitializerSyntax.Kind() == SyntaxKind.SimpleAssignmentExpression);
6231Debug.Assert(initializerSyntax.Kind() == SyntaxKind.CollectionInitializerExpression);
6232Debug.Assert(initializerSyntax.Expressions.Any());
6233Debug.Assert((object)initializerType != null);
6386Debug.Assert(node.Kind() == SyntaxKind.ComplexElementInitializerExpression);
6417Debug.Assert(!boundElementInitializerExpressions.IsEmpty);
6450Debug.Assert(collectionInitializerAddMethodBinder != null);
6451Debug.Assert(collectionInitializerAddMethodBinder.Flags.Includes(BinderFlags.CollectionInitializerAddMethod));
6452Debug.Assert(implicitReceiver != null);
6453Debug.Assert((object)implicitReceiver.Type != null);
6519Debug.Assert(addMethodInvocation.Kind == BoundKind.BadExpression);
6565Debug.Assert(enumeratorInfo.ElementType is { }); // ElementType is set always, even for IEnumerable.
6612Debug.Assert((object)constructor != null);
6613Debug.Assert(constructor.MethodKind == MethodKind.Constructor || constructor.MethodKind == MethodKind.StaticConstructor);
6640Debug.Assert((object)this.Compilation.Assembly != null);
6690Debug.Assert(finalApplicableCandidates[0].IsApplicable);
6911Debug.Assert((object)type != null);
6937Debug.Assert((object)interfaceType != null);
6938Debug.Assert(interfaceType.IsInterfaceType());
6939Debug.Assert((object)coClassType != null);
6940Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2));
6941Debug.Assert(coClassType.TypeKind == TypeKind.Class || coClassType.TypeKind == TypeKind.Error);
7351Debug.Assert(
7372Debug.Assert(node.Kind() == SyntaxKind.Utf8StringLiteralExpression);
7373Debug.Assert(node.Token.Kind() is SyntaxKind.Utf8StringLiteralToken or SyntaxKind.Utf8SingleLineRawStringLiteralToken or SyntaxKind.Utf8MultiLineRawStringLiteralToken);
7403Debug.Assert(node != null);
7404Debug.Assert(invoked == SyntaxFacts.IsInvoked(node));
7416Debug.Assert(node.Kind() == SyntaxKind.PointerMemberAccessExpression);
7465Debug.Assert((left.Parent is MemberAccessExpressionSyntax { RawKind: (int)SyntaxKind.SimpleMemberAccessExpression } memberAccess && memberAccess.Expression == left) ||
7502Debug.Assert((object)leftType != null);
7511Debug.Assert(!leftType.IsDynamic());
7512Debug.Assert(IsPotentialColorColorReceiver(left, leftType));
7523Debug.Assert(!IsPotentialColorColorReceiver(left, leftType));
7640Debug.Assert(node != null);
7641Debug.Assert(boundLeft != null);
7675Debug.Assert((object)leftType == null);
7817Debug.Assert(sym.Kind == SymbolKind.NamedType);
7833Debug.Assert(symbols[0].Kind == SymbolKind.NamedType);
7843Debug.Assert(lookupResult.Error == null);
7868Debug.Assert((object)leftType != null);
7935Debug.Assert(!resolution.IsEmpty);
7966Debug.Assert(rightArity == (typeArgumentsWithAnnotations.IsDefault ? 0 : typeArgumentsWithAnnotations.Length));
8225Debug.Assert(receiver != null);
8263Debug.Assert(node != null);
8264Debug.Assert(left != null);
8265Debug.Assert(lookupResult.IsMultiViable);
8266Debug.Assert(lookupResult.Symbols.Any());
8301Debug.Assert(symbol.Kind != SymbolKind.Method);
8381Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
8484Debug.Assert((actualArguments == null) || !firstResult.IsEmpty);
8515Debug.Assert(lookupResult.Symbols.Any());
8519Debug.Assert((object)symbol == null);
8680Debug.Assert((object)underlyingType != null);
8730Debug.Assert(symbol is not TypeSymbol);
8882Debug.Assert(!methodOrPropertyGroup.Any());
8887Debug.Assert(result.Kind != LookupResultKind.Empty);
8888Debug.Assert(!result.Symbols.Any(s => s.IsIndexer()));
8934Debug.Assert(methodOrPropertyGroup.Any() || ((object)other != null));
8969Debug.Assert(members.All(m => m.Kind == member.Kind));
8977Debug.Assert(members.All(m => !m.IsIndexer()));
9015Debug.Assert(propertyGroup.ReceiverOpt is not null);
9065Debug.Assert(expr.Type.TryGetInlineArrayElementField() is not null);
9081Debug.Assert(tryInlineArrayAccess);
9082Debug.Assert(diagnosticsForBindElementAccessCore.DiagnosticBag is { });
9309Debug.Assert(node != null);
9310Debug.Assert(expr != null);
9311Debug.Assert((object)expr.Type != null);
9312Debug.Assert(arguments != null);
9340Debug.Assert(node != null);
9341Debug.Assert(expr != null);
9342Debug.Assert(arguments != null);
9401Debug.Assert(convertedArguments.Length == 1);
9423Debug.Assert(index != null);
9528Debug.Assert(expr != null);
9529Debug.Assert((object)targetType != null);
9545Debug.Assert(result != null); // If this ever fails (it shouldn't), then put a null-check around the diagnostics update.
9552Debug.Assert(node != null);
9553Debug.Assert(expr != null);
9554Debug.Assert(analyzedArguments != null);
9568Debug.Assert(expr.Type.IsPointerType());
9613Debug.Assert(node != null);
9614Debug.Assert(expr != null);
9615Debug.Assert((object)expr.Type != null);
9616Debug.Assert(analyzedArguments != null);
9648Debug.Assert(symbol.IsIndexer());
9667Debug.Assert(property.ParameterCount > 0);
9685Debug.Assert(receiver is not null);
9713Debug.Assert(receiver is not null);
9775Debug.Assert(receiver is not null);
9797Debug.Assert(finalApplicableCandidates[0].IsApplicable);
9922Debug.Assert(receiver is not null);
9942Debug.Assert(receiver.Type is not null);
9956Debug.Assert(lengthOrCountAccess is BoundPropertyAccess);
9957Debug.Assert(indexerOrSliceAccess is BoundIndexerAccess or BoundCall);
9958Debug.Assert(indexerOrSliceAccess.Type is not null);
10041Debug.Assert(receiver.Type is not null);
10089Debug.Assert(!argIsIndex);
10101Debug.Assert(!argIsIndex);
10179Debug.Assert(receiverPlaceholder.Type is not null);
10203Debug.Assert(lookupResult.IsClear);
10278Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
10382Debug.Assert(!methodResolution.HasAnyApplicableMethod);
10383Debug.Assert(!extensionMethodResolution.HasAnyApplicableMethod);
10384Debug.Assert(!methodResolution.IsEmpty);
10385Debug.Assert(!extensionMethodResolution.IsEmpty);
10399Debug.Assert(!extensionMethodResolution.IsEmpty);
10417Debug.Assert((options & ~(OverloadResolution.Options.IsMethodGroupConversion |
10844Debug.Assert(ContainingMemberOrLambda is { });
10845Debug.Assert(parameterRefKinds.IsDefault || parameterRefKinds.Length == parameterTypes.Length);
10847Debug.Assert(returnType.Type is { }); // Expecting System.Void rather than null return type.
10848Debug.Assert(!hasParams || parameterTypes.Length != 0);
10937Debug.Assert((location == null) ^ (node == null));
10987Debug.Assert((object)receiverType != null);
11098Debug.Assert(node != null);
11099Debug.Assert(node.Expression != null);
11105Debug.Assert(receiver != null);
FlowAnalysis\NullableWalker.cs (287)
63Debug.Assert(variables.Id == variableNullableStates.Id);
130Debug.Assert(TypeSymbol.Equals(RValueType.Type, LValueType.Type, TypeCompareKind.ConsiderEverything));
147Debug.Assert(!StateForLambda.HasValue);
344Debug.Assert(TypeAllowsConditionalState(visitResult.RValueType.Type)
442Debug.Assert(_targetTypedAnalysisCompletionOpt is null or { Count: 0 });
465Debug.Assert(!TrackingRegions);
466Debug.Assert(!useDelegateInvokeParameterTypes || delegateInvokeMethodOpt is object);
467Debug.Assert(baseOrThisInitializer is null or { MethodKind: MethodKind.Constructor });
539Debug.Assert(AreCloseEnough(placeholder.Type, result.RValueType.Type));
540Debug.Assert(expression != null || placeholder.Kind == BoundKind.InterpolatedStringArgumentPlaceholder);
549Debug.Assert(_resultForPlaceholdersOpt is { });
551Debug.Assert(removed);
557Debug.Assert(placeholder is { });
635Debug.Assert(_useConstructorExitWarnings);
640Debug.Assert(thisParameter is object);
980Debug.Assert(requiredMember.IsRequired());
1439Debug.Assert(node.SyntaxTree is object);
1484Debug.Assert(method.IsConstructor());
1798Debug.Assert(diagnostics != null);
1820Debug.Assert(!walker.IsConditionalState);
1838Debug.Assert(snapshotBuilderOpt is null || symbol is object);
1845Debug.Assert(walker._variables.Id == initialState.Value.Id);
1851Debug.Assert(!badRegion);
1872Debug.Assert(result.RequiredAnalysis == requiredAnalysis);
1888Debug.Assert(!IsConditionalState);
1911Debug.Assert(node is object);
1961Debug.Assert(slot > 0);
2050Debug.Assert(member?.RequiresInstanceReceiver() ?? true);
2069Debug.Assert(node.HasErrors ||
2189Debug.Assert(containingSlot == 0);
2586Debug.Assert(!IsConditionalState);
2640Debug.Assert(ErrorFacts.NullableWarnings.Contains(MessageProvider.Instance.GetIdForErrorCode((int)errorCode)));
2649Debug.Assert(targetSlot > 0);
2650Debug.Assert(EmptyStructTypeCache.IsTrackableStructType(targetType));
2684Debug.Assert(targetContainerSlot > 0);
2685Debug.Assert(skipSlot > 0);
2750Debug.Assert(slot > 0);
2771Debug.Assert(targetSlot > 0);
2775Debug.Assert(actualType is { });
2783Debug.Assert(conversion.Kind is ConversionKind.Identity or ConversionKind.ImplicitReference);
2804Debug.Assert(targetSlot > 0);
2805Debug.Assert(valueSlot > 0);
2887Debug.Assert(!IsConditionalState);
2941Debug.Assert(!IsConditionalState);
3046Debug.Assert((object)returnType != LambdaSymbol.ReturnTypeIsBeingInferred);
3096Debug.Assert(node.Type.IsErrorType() || type.Type.IsErrorType());
3128Debug.Assert(!TrackingRegions);
3195Debug.Assert(newBodiesVisited);
3285Debug.Assert((object?)variables.Container == container);
3297Debug.Assert(!useDelegateInvokeParameterTypes || delegateInvokeMethod is object);
3298Debug.Assert(!useDelegateInvokeReturnType || delegateInvokeMethod is object);
3420Debug.Assert(!IsConditionalState);
3446Debug.Assert(!IsConditionalState);
3535Debug.Assert(!IsConditionalState);
3570Debug.Assert(type.Type.IsErrorType());
3589Debug.Assert(node is BoundExpression or BoundPattern);
3590Debug.Assert(!IsConditionalState);
3607Debug.Assert((object?)resultType.Type != _invalidType.Type);
3608Debug.Assert(AreCloseEnough(resultType.Type, node.Type));
3706Debug.Assert(!_completingTargetTypedExpression);
3766Debug.Assert(node.Placeholder is { });
3781Debug.Assert(completion is not null);
3797Debug.Assert(completion is not null);
3830Debug.Assert(TypeSymbol.Equals(strippedTargetCollectionType, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
3892Debug.Assert(node.ExpressionPlaceholder is { });
3893Debug.Assert(node.EnumeratorInfoOpt is { });
3906Debug.Assert(node.HasErrors);
3907Debug.Assert(node.Conversion is null);
3908Debug.Assert(node.EnumeratorInfoOpt is null);
3916Debug.Assert(!IsConditionalState);
3926Debug.Assert(isTargetTyped == argumentsCompletion is not null);
3957Debug.Assert(argumentsCompletion is not null);
3958Debug.Assert(initialStateInferenceCompletion is not null);
3963Debug.Assert(argumentsCompletion is null);
3964Debug.Assert(initialStateInferenceCompletion is null);
3965Debug.Assert(initializerCompletion is null);
3981Debug.Assert(resultState == NullableFlowState.NotNull);
3986Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4024Debug.Assert(node.Kind is BoundKind.ObjectCreationExpression or BoundKind.DynamicObjectCreationExpression or BoundKind.NewT or BoundKind.NoPiaObjectCreationExpression);
4093Debug.Assert(completion is null);
4094Debug.Assert(resultState == NullableFlowState.NotNull);
4106Debug.Assert(!delayCompletionForType || containingSlot == -1);
4156Debug.Assert(!delayCompletionForType || containingSlot == -1);
4224Debug.Assert(argumentsCompletion is null);
4225Debug.Assert(initializationCompletion is null);
4244Debug.Assert(initializationCompletion is null || symbol is not null);
4250Debug.Assert(result is null);
4260Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, symbol.GetTypeOrReturnType().Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4275Debug.Assert(!delayCompletionForType || slot == -1);
4291Debug.Assert(nestedCompletion is null);
4316Debug.Assert(!delayCompletionForType || conversionCompletion is null);
4323Debug.Assert(symbol.GetTypeOrReturnType().HasType);
4335Debug.Assert(conversionCompletion is not null);
4339Debug.Assert(conversionCompletion is null);
4352Debug.Assert(result is null);
4391Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4392Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4408Debug.Assert(visitArgumentsCompletion is not null);
4412Debug.Assert(visitArgumentsCompletion is null);
4413Debug.Assert(reinferredMethod is object);
4416Debug.Assert(node.ImplicitReceiverOpt.Kind == BoundKind.ObjectOrCollectionValuePlaceholder);
4449Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4450Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4526Debug.Assert(node.Type is object);
4544Debug.Assert((object)placeholder != null);
4550Debug.Assert(!IsConditionalState);
4551Debug.Assert(node.Type.IsAnonymousType);
4728Debug.Assert(namedType.Name == "Span");
4729Debug.Assert(namedType.OriginalDefinition.Arity == 1);
4735Debug.Assert(namedType.Name == "Span");
4736Debug.Assert(namedType.OriginalDefinition.Arity == 1);
4844Debug.Assert(!IsConditionalState);
4848Debug.Assert(!IsConditionalState);
4849Debug.Assert(!node.Expression.Type!.IsValueType);
4878Debug.Assert(!IsConditionalState);
4882Debug.Assert(!IsConditionalState);
4883Debug.Assert(expressionType is not null);
4884Debug.Assert(expressionType.IsValueType);
4958Debug.Assert(!IsConditionalState);
5116Debug.Assert(binary.Type.SpecialType == SpecialType.System_Boolean);
5149Debug.Assert(!IsConditionalState);
5220Debug.Assert(operand == expr);
5238Debug.Assert(!IsConditionalState);
5242Debug.Assert(binary.Type!.SpecialType == SpecialType.System_Boolean);
5275Debug.Assert(!IsConditionalState);
5376Debug.Assert(operand != null);
5624Debug.Assert(targetType.Type.ContainsErrorType() ||
5636Debug.Assert(TypeSymbol.Equals(targetType.Type, rightResult.Type, TypeCompareKind.AllIgnoreOptions));
5647Debug.Assert(!IsConditionalState);
5698Debug.Assert(rightType is object);
5705Debug.Assert(!conversion.IsUserDefined);
5710Debug.Assert(!conversion.IsUserDefined);
5733Debug.Assert(conversionResult.Type is not null);
5762Debug.Assert(targetType.HasType);
5774Debug.Assert(!IsConditionalState);
5812Debug.Assert(!IsConditionalState);
5857Debug.Assert(innerCondAccess.Receiver is not (BoundConditionalAccess or BoundConversion));
5869Debug.Assert(expr is BoundExpression);
5879Debug.Assert(expr is BoundExpression);
6040Debug.Assert(!wasTargetTyped);
6047Debug.Assert(node is BoundUnconvertedConditionalOperator);
6048Debug.Assert(_returnTypesOpt is not null || _disableDiagnostics);
6140Debug.Assert(!isRef);
6152Debug.Assert(isRef);
6283Debug.Assert(node.InvokedAsExtensionMethod);
6317Debug.Assert(node.ReceiverOpt is null);
6391Debug.Assert(arguments.Length == 2);
6402Debug.Assert(arguments.Length == 1);
6491Debug.Assert(baseType is object);
6563Debug.Assert(!compareExchangeInfo.IsDefault);
6585Debug.Assert(argsToParamsOpt is { IsDefault: true } or { Length: 3 });
6819Debug.Assert(result.completion is null);
6840Debug.Assert(!arguments.IsDefault);
6841Debug.Assert(!expanded || !parametersOpt.IsDefault);
6842Debug.Assert(refKindsOpt.IsDefaultOrEmpty || refKindsOpt.Length == arguments.Length);
6843Debug.Assert(argsToParamsOpt.IsDefault || argsToParamsOpt.Length == arguments.Length);
6851Debug.Assert(!arguments.Any(a => a.IsParamsArrayOrCollection));
6934Debug.Assert(method is ErrorMethodSymbol);
7053Debug.Assert(result.completion is null);
7065Debug.Assert(arguments.Count(a => a.IsParamsArrayOrCollection) <= 1);
7072Debug.Assert(parametersOpt.IsDefault || arguments.Length == parametersOpt.Length);
7100Debug.Assert(defaultArguments.IsNull || elements.Length == 1);
7101Debug.Assert(elements.Length == 1 || a == arguments.Length - 1);
7204Debug.Assert(receiverSlot >= 0);
7287Debug.Assert(!IsConditionalState);
7351Debug.Assert(!IsConditionalState);
7399Debug.Assert(!IsConditionalState);
7418Debug.Assert(!this.IsConditionalState);
7435Debug.Assert(argumentResultType is not null);
7491Debug.Assert(!this.IsConditionalState);
7676Debug.Assert(!IsConditionalState);
7681Debug.Assert(!IsConditionalState);
7841Debug.Assert(variables.Id == localState.Id);
7860Debug.Assert(!expanded);
7870Debug.Assert(paramsIterationType.HasType);
7886Debug.Assert(method.IsGenericMethod);
7972Debug.Assert(false); // unexpected value
8011Debug.Assert(lambdaState.HasValue);
8024Debug.Assert(collectionExpressionVisitResults is not null);
8025Debug.Assert(collectionExpressionVisitResults.Length == collection.Elements.Length);
8121Debug.Assert(group != null || !conversion.ExplicitCastInCode); // Explicit conversions should include a group.
8234Debug.Assert((object)symbol != null);
8268Debug.Assert(symbol.ContainingType.IsDefinition);
8304Debug.Assert(false); // If this assert fails, add an appropriate test.
8334Debug.Assert(targetType.HasType);
8379Debug.Assert(completion is null);
8410Debug.Assert(targetTypeOpt.HasType);
8439Debug.Assert(result.completion is null);
8469Debug.Assert(!IsConditionalState);
8505Debug.Assert(diagnostics.DiagnosticBag is { });
8531Debug.Assert(tupleType.IsTupleType);
8532Debug.Assert(values.Length == types.Length);
8533Debug.Assert(values.Length == (useRestField ? Math.Min(tupleType.TupleElements.Length, NamedTypeSymbol.ValueTupleRestPosition) : tupleType.TupleElements.Length));
8566Debug.Assert(index != -1);
8573Debug.Assert(containingType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T);
8574Debug.Assert(containingSlot > 0);
8575Debug.Assert(valueSlot > 0);
8596Debug.Assert(conversion.Kind == ConversionKind.ImplicitTuple || conversion.Kind == ConversionKind.ExplicitTuple);
8597Debug.Assert(slot > 0);
8598Debug.Assert(valueSlot > 0);
8700Debug.Assert(diagnostics.DiagnosticBag is { });
8756Debug.Assert(diagnostics.DiagnosticBag is { });
8811Debug.Assert(conversionOpt is null
8858Debug.Assert(!trackMembers || !IsConditionalState);
8859Debug.Assert(conversionOperand != null);
8885Debug.Assert(conversionOpt is null);
9053Debug.Assert(conversionOperand != null);
9061Debug.Assert(containingSlot > 0);
9100Debug.Assert(conversionOperand != null);
9156Debug.Assert(targetType.IsValueType || targetType.IsErrorType());
9259Debug.Assert(dependsOn); // If this case fails, add a corresponding test.
9332Debug.Assert(handlerData.ArgumentPlaceholders.IsEmpty
9405Debug.Assert(conversionOperand != null);
9406Debug.Assert(targetTypeWithNullability.HasType);
9407Debug.Assert(diagnosticLocation != null);
9408Debug.Assert(conversion.Kind == ConversionKind.ExplicitUserDefined || conversion.Kind == ConversionKind.ImplicitUserDefined);
9440Debug.Assert(method is object);
9441Debug.Assert(method.ParameterCount == 1);
9442Debug.Assert(operandType.Type is object);
9549Debug.Assert(conversionOpt.ConversionGroupOpt == conversionGroup);
9561Debug.Assert(conversionOpt.ConversionGroupOpt == conversionGroup);
9622Debug.Assert(operandType.Type is object);
9623Debug.Assert(diagnosticLocation != null);
9656Debug.Assert(node.Type.IsDelegateType());
9703Debug.Assert(analysisCompletion is null);
9715Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
9792Debug.Assert(arg.Type is not null);
9811Debug.Assert(arg.Type is not null);
9832Debug.Assert(!IsConditionalState);
9894Debug.Assert(_binder is object);
9929Debug.Assert(delegateTypeOpt?.IsDelegateType() != false);
9997Debug.Assert(!IsConditionalState);
10088Debug.Assert(expr is not BoundObjectInitializerMember);
10197Debug.Assert(conversion.Kind == ConversionKind.Deconstruction);
10225Debug.Assert(invocation is object);
10226Debug.Assert(rightResult.Type is object);
10262Debug.Assert(parameters.Length - offset == n);
10311Debug.Assert(rightParts.Length == n);
10478Debug.Assert(!IsConditionalState);
10632Debug.Assert(MakeSlot(node) == -1);
10821Debug.Assert(!IsConditionalState);
10852Debug.Assert(!IsConditionalState);
10889Debug.Assert(containingType.IsNullableType());
10890Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
10902Debug.Assert(node.HasErrors);
10954Debug.Assert(resultType is object);
11001Debug.Assert(!foundMultiple);
11002Debug.Assert(targetTypeWithAnnotations.HasType);
11063Debug.Assert(wellKnownSpan is WellKnownType.System_Span_T or WellKnownType.System_ReadOnlySpan_T);
11109Debug.Assert(disposalPlaceholder is not null);
11287Debug.Assert(!IsConditionalState);
11418Debug.Assert(!IsConditionalState);
11428Debug.Assert(!((BoundBinaryOperator)node).OperatorKind.IsUserDefined());
11448Debug.Assert(trueFalseOperator is null || logicalOperator is object);
11449Debug.Assert(logicalOperator is null || left is object);
11490Debug.Assert(placeholder is object);
11547Debug.Assert(!this.IsConditionalState);
11567Debug.Assert(!this.IsConditionalState);
11586Debug.Assert(node.Type.SpecialType == SpecialType.System_Boolean);
11638Debug.Assert(node.Type.SpecialType == SpecialType.System_RuntimeArgumentHandle);
11646Debug.Assert(node.Type is null);
11653Debug.Assert(!IsConditionalState);
11661Debug.Assert(!IsConditionalState);
11670Debug.Assert(node.WasCompilerGenerated);
11678Debug.Assert(node.WasCompilerGenerated);
11717Debug.Assert(node.Type.IsDynamic());
11736Debug.Assert(node.Type.IsDynamic());
11737Debug.Assert(node.Type.IsReferenceType);
11747Debug.Assert(!IsConditionalState);
11843Debug.Assert(node.Type.IsDynamic());
11856Debug.Assert(!this.IsConditionalState);
11866Debug.Assert(receiverOpt.Type is null || AreCloseEnough(receiverOpt.Type, resultTypeSymbol));
11987Debug.Assert(node.Type is null || node.Type.IsErrorType() || node.Type.IsRefLikeType);
12007Debug.Assert(node.Type is not null);
12166Debug.Assert(ResultType is TypeWithState { Type: FunctionPointerTypeSymbol { }, State: NullableFlowState.NotNull });
12237Debug.Assert(!otherIsConditional);
12374Debug.Assert(Id == variables.Container!.Id);
12433Debug.Assert(state.Id > id);
12447Debug.Assert(Id < variables.Id);
12493Debug.Assert(Id > id);
12506Debug.Assert(index < Capacity);
12508Debug.Assert((_state[index], _state[index + 1]) != (false, false));
12525Debug.Assert(Id > id);
12580Debug.Assert(Id == other.Id);
12587Debug.Assert(_state.Capacity == other._state.Capacity);
12609Debug.Assert(Id == other.Id);
12616Debug.Assert(_state.Capacity == other._state.Capacity);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (72)
33Debug.Assert(conversion.Kind == ConversionKind.CollectionExpression);
34Debug.Assert(!_inExpressionLambda);
35Debug.Assert(_additionalLocals is { });
36Debug.Assert(node.Type is { });
62Debug.Assert(elementType is { });
119Debug.Assert(spreadElement.IteratorBody is { });
137Debug.Assert(spreadElement.IteratorBody is { });
139Debug.Assert(iteratorBody is { });
152Debug.Assert(result is { });
176Debug.Assert(singleSpread.Expression.Type is not null);
193Debug.Assert(targetEnumerableType.OriginalDefinition == (object)_compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T));
248Debug.Assert(!_inExpressionLambda);
249Debug.Assert(_additionalLocals is { });
250Debug.Assert(node.CollectionCreation is null); // shouldn't have generated a constructor call
251Debug.Assert(node.Placeholder is null);
263Debug.Assert(collectionTypeKind is CollectionExpressionTypeKind.Span or CollectionExpressionTypeKind.ReadOnlySpan);
264Debug.Assert(spanType.OriginalDefinition.Equals(_compilation.GetWellKnownType(
266Debug.Assert(elementType.Equals(spanType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0], TypeCompareKind.AllIgnoreOptions));
278Debug.Assert(!IsAllocatingRefStructCollectionExpression(node, collectionTypeKind, elementType.Type, _compilation));
287Debug.Assert(!IsAllocatingRefStructCollectionExpression(node, collectionTypeKind, elementType.Type, _compilation));
295Debug.Assert(IsAllocatingRefStructCollectionExpression(node, collectionTypeKind, elementType.Type, _compilation));
316Debug.Assert(list.Type is { });
317Debug.Assert(list.Type.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_List_T), TypeCompareKind.AllIgnoreOptions));
328Debug.Assert(TypeSymbol.Equals(array.Type, spanConstructor.Parameters[0].Type, TypeCompareKind.AllIgnoreOptions));
334Debug.Assert(!_inExpressionLambda);
339Debug.Assert(rewrittenReceiver is { });
348Debug.Assert(placeholder is { });
396Debug.Assert(!_inExpressionLambda);
397Debug.Assert(_factory.ModuleBuilderOpt is { });
398Debug.Assert(_diagnostics.DiagnosticBag is { });
399Debug.Assert(node.Type is NamedTypeSymbol);
400Debug.Assert(node.CollectionCreation is null);
401Debug.Assert(node.Placeholder is null);
419Debug.Assert(numberIncludingLastSpread == 0);
470Debug.Assert(!_inExpressionLambda);
471Debug.Assert(node.Type is { });
472Debug.Assert(node.CollectionCreation is null);
473Debug.Assert(node.Placeholder is null);
474Debug.Assert(node.CollectionBuilderMethod is { });
475Debug.Assert(node.CollectionBuilderInvocationPlaceholder is { });
476Debug.Assert(node.CollectionBuilderInvocationConversion is { });
481Debug.Assert(spanType.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions));
546Debug.Assert(elements.Length > 0);
547Debug.Assert(elements.All(e => e is BoundExpression));
548Debug.Assert(_factory.ModuleBuilderOpt is { });
549Debug.Assert(_diagnostics.DiagnosticBag is { });
550Debug.Assert(_compilation.Assembly.RuntimeSupportsInlineArrayTypes);
551Debug.Assert(_additionalLocals is { });
572Debug.Assert(inlineArrayType.HasInlineArrayAttribute(out int inlineArrayLength) && inlineArrayLength == arrayLength);
613Debug.Assert(span.Type is { });
732Debug.Assert(TryOptimizeSingleSpreadToArray(node, arrayType) is null);
789Debug.Assert(arrayTemp.Type is ArrayTypeSymbol);
790Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 });
904Debug.Assert(type is not null);
1000Debug.Assert((object)spreadOperandAsSpan != rewrittenSpreadOperand || spreadOperandAsSpan is BoundLocal { LocalSymbol.SynthesizedKind: SynthesizedLocalKind.LoweringTemp });
1023Debug.Assert(!_inExpressionLambda);
1094Debug.Assert(useKnownLength);
1095Debug.Assert(setCount is { });
1096Debug.Assert(asSpan is { });
1097Debug.Assert(knownLengthTemp is { });
1125Debug.Assert(spanTemp.Type is NamedTypeSymbol);
1126Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 });
1178Debug.Assert(rewrittenSpreadOperand.Type is not null);
1259Debug.Assert(statements.Length > 0);
1287Debug.Assert(collectionPlaceholder is { });
1292Debug.Assert(lengthAccess is { });
1311Debug.Assert(sum is { });
1333Debug.Assert(enumeratorInfo is { });
1334Debug.Assert(convertedExpression is { });
1335Debug.Assert(expressionPlaceholder is { });
1336Debug.Assert(elementPlaceholder is { });
1337Debug.Assert(iteratorBody is { });
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (89)
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));
305Debug.Assert(oldNodeOpt == null || oldNodeOpt.Syntax == syntax);
306Debug.Assert(rewrittenType is { });
307Debug.Assert(_factory.ModuleBuilderOpt is { });
308Debug.Assert(_diagnostics.DiagnosticBag is { });
318Debug.Assert(rewrittenOperand.Type is { });
426Debug.Assert(rewrittenOperand.Type is { });
441Debug.Assert(rewrittenOperand.Type is { });
444Debug.Assert(rewrittenOperand.Type.Equals(rewrittenType, TypeCompareKind.IgnoreDynamicAndTupleNames | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
487Debug.Assert(rewrittenOperand.Type is { });
497Debug.Assert(rewrittenOperand.Type.IsEnumType());
508Debug.Assert(rewrittenType.IsEnumType());
533Debug.Assert(conversion.Method is null);
534Debug.Assert(!conversion.IsExtensionMethod);
552Debug.Assert(symbolOpt is { });
562Debug.Assert(oldNodeOpt is { });
565Debug.Assert(method is { });
569Debug.Assert(receiver is { });
576Debug.Assert(_factory.TopLevelMethod is { });
594Debug.Assert(rewrittenOperand.Type is not null);
605Debug.Assert(spanType.OriginalDefinition.Equals(_compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.AllIgnoreOptions));
621Debug.Assert(sourceType is not null);
646Debug.Assert(destinationType.IsReadOnlySpan());
647Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
678Debug.Assert(destinationType.IsReadOnlySpan());
679Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
697Debug.Assert(destinationType.IsReadOnlySpan());
698Debug.Assert(conversion.Kind is ConversionKind.ImplicitSpan);
740Debug.Assert(_factory.ModuleBuilderOpt is { });
753Debug.Assert((object)target != null);
811Debug.Assert(rewrittenOperand.Type is { });
843Debug.Assert(conversion.IsValid);
868Debug.Assert(conversion.Method is { });
869Debug.Assert(conversion.BestUserDefinedConversionAnalysis is { });
895Debug.Assert(rewrittenOperand.Type is { });
952Debug.Assert(rewrittenOperand.Type is { });
993Debug.Assert(expression.Type is { });
1039Debug.Assert((object)rewrittenType != null);
1047Debug.Assert(rewrittenOperandType is { });
1048Debug.Assert(rewrittenType.IsNullableType() || rewrittenOperandType.IsNullableType());
1095Debug.Assert((object)rewrittenType != null);
1096Debug.Assert(rewrittenOperand.Type is { });
1098Debug.Assert(rewrittenType.IsNullableType() || rewrittenOperandType.IsNullableType());
1220Debug.Assert(conversion.Method is { });
1240Debug.Assert(operand != null);
1241Debug.Assert((object)type != null);
1309Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
1310Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
1311Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
1342Debug.Assert(conversion.Method is { } && !conversion.Method.ReturnsVoid && conversion.Method.ParameterCount == 1);
1343Debug.Assert(rewrittenOperand.Type is { });
1373Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2));
1381Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2));
1396Debug.Assert(rewrittenOperand.Type is { });
1410Debug.Assert((object)rewrittenType != null);
1411Debug.Assert(rewrittenOperand.Type.IsNullableType());
1442Debug.Assert(conversion.Method is { });
1486Debug.Assert(rewrittenOperand != null);
1487Debug.Assert((object)rewrittenType != null);
1488Debug.Assert(rewrittenOperand.Type is { });
1489Debug.Assert(!_compilation.Assembly.RuntimeSupportsNumericIntPtr);
1502Debug.Assert(!method.ReturnsVoid);
1503Debug.Assert(method.ParameterCount == 1);
1509Debug.Assert(target.IsNullableType());
1535Debug.Assert((object)source != null);
1536Debug.Assert((object)target != null);
1695Debug.Assert(fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal);
1714Debug.Assert(operand.Type is { });
1742Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2));
1759Debug.Assert(meth is { });
1788Debug.Assert(!_compilation.Assembly.RuntimeSupportsNumericIntPtr);
1819Debug.Assert(underlying is { });
1832Debug.Assert(underlying is { });
1864Debug.Assert(!meth.ContainingType.IsInterface);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (34)
38Debug.Assert(!_inExpressionLambda);
39Debug.Assert(rewrittenReceiver != null);
68Debug.Assert(_inExpressionLambda);
90Debug.Assert(rewrittenReceiver is { } || _inExpressionLambda);
104Debug.Assert(!_inExpressionLambda);
105Debug.Assert(initializer.Kind == BoundKind.DynamicCollectionElementInitializer);
144Debug.Assert(addMethod.Name == "Add");
145Debug.Assert(addMethod.Parameters
148Debug.Assert(initializer.Arguments.Any());
149Debug.Assert(rewrittenReceiver != null || _inExpressionLambda);
191Debug.Assert(addMethod.IsStatic);
192Debug.Assert(addMethod.IsExtensionMethod);
256Debug.Assert(!_inExpressionLambda);
276Debug.Assert(rewrittenReceiver != null);
277Debug.Assert(!_inExpressionLambda);
299Debug.Assert(memberInit is { });
303Debug.Assert(memberInit.Arguments.Count(a => a.IsParamsArrayOrCollection) <= (memberInit.Expanded ? 1 : 0));
327Debug.Assert(!memberInit.Expanded);
344Debug.Assert(setMember.SiteInitialization is { });
356Debug.Assert(getMember.SiteInitialization is { });
367Debug.Assert(assignment.Type.IsDynamic() || TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
378Debug.Assert(initializerMember is { });
388Debug.Assert(setMember.SiteInitialization is { });
395Debug.Assert(getMember.SiteInitialization is { });
404Debug.Assert(rewrittenArrayAccess is { });
408Debug.Assert(!arrayAccess.Indices.Any(a => a.IsParamsArrayOrCollection));
419Debug.Assert(getSubArrayCall.Arguments.Length == 2);
421Debug.Assert(TypeSymbol.Equals(rangeArgument.Type, _compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything));
439Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
472Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
506Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
545Debug.Assert(initializers is not null);
663Debug.Assert(memberSymbol is object);
667Debug.Assert(_compilation.Conversions.ClassifyConversionFromType(rewrittenReceiver.Type, memberSymbol.ContainingType, isChecked: false, ref discardedUseSiteInfo).IsImplicit ||
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (33)
37Debug.Assert(false); // these should have been represented as a BoundIncrementOperator
84Debug.Assert((kind == UnaryOperatorKind.DynamicTrue || kind == UnaryOperatorKind.DynamicFalse) && type.SpecialType == SpecialType.System_Boolean
86Debug.Assert(method is null);
112Debug.Assert(method is { });
113Debug.Assert(TypeSymbol.Equals(type, method.ReturnType, TypeCompareKind.ConsiderEverything2));
133Debug.Assert(underlyingType is { });
276Debug.Assert(result.Type is { });
327Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
328Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
329Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
440Debug.Assert(operandType is { });
441Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.ConsiderEverything2));
492Debug.Assert(!IsCapturedPrimaryConstructorParameter(expression));
512Debug.Assert(boundTemp.Type is not null);
540Debug.Assert(boundTemp.Type is not null);
543Debug.Assert(tempValue.Type is { });
599Debug.Assert(placeholder is not null);
632Debug.Assert(node.MethodOpt is { });
633Debug.Assert(node.MethodOpt.ParameterCount == 1);
644Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2));
741Debug.Assert(constantOne != null);
742Debug.Assert(constantOne.SpecialType != SpecialType.None);
743Debug.Assert(binaryOperandType.SpecialType != SpecialType.None);
744Debug.Assert(binaryOperatorKind.OperandTypes() != 0);
771Debug.Assert(binaryOperatorKind.OperandTypes() == BinaryOperatorKind.PointerAndInt);
772Debug.Assert(binaryOperand.Type is { TypeKind: TypeKind.Pointer });
773Debug.Assert(boundOne.Type is { SpecialType: SpecialType.System_Int32 });
819Debug.Assert((object)method != null); // Should have been checked during Warnings pass
826Debug.Assert(operand.Type is { SpecialType: SpecialType.System_Decimal });
833Debug.Assert(operand.Type is { } && operand.Type.IsNullableType() && operand.Type.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal);
1019Debug.Assert(underlyingType is { });
1024Debug.Assert(underlyingType.IsEnumType());
1026Debug.Assert(underlyingType is { });
Lowering\SyntheticBoundNodeFactory.cs (76)
116Debug.Assert(node != null);
117Debug.Assert(compilationState != null);
118Debug.Assert(diagnostics != null);
134Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2));
140Debug.Assert(CurrentFunction is null ||
150Debug.Assert(ModuleBuilderOpt is { });
172Debug.Assert(CurrentType is { });
180Debug.Assert(CurrentType is { });
188Debug.Assert(CurrentType is { });
196Debug.Assert(CurrentType is { });
204Debug.Assert(CurrentType is { });
213Debug.Assert(ModuleBuilderOpt is { });
224Debug.Assert(CurrentFunction is { IsStatic: false });
235Debug.Assert(CurrentFunction is { IsStatic: false });
267Debug.Assert(receiverOpt is null || receiverOpt.Type is { } &&
275Debug.Assert((receiverOpt is null) == property.IsStatic);
284Debug.Assert(accessor is not null);
290Debug.Assert((receiverOpt is null) == property.IsStatic);
292Debug.Assert(accessor is not null);
361Debug.Assert(result is not null);
402Debug.Assert(result is not null);
439Debug.Assert(left.Type is { } && right.Type is { } &&
553Debug.Assert(CurrentFunction is { });
566Debug.Assert(conversion.Kind != ConversionKind.NoConversion);
569Debug.Assert(CurrentFunction.RefKind == RefKind.None);
579Debug.Assert(CurrentFunction is { });
658Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
659Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
665Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
666Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
810Debug.Assert(methodSymbol.IsStatic);
818Debug.Assert(methodSymbol.IsStatic);
819Debug.Assert(methodSymbol.IsGenericMethod);
820Debug.Assert(methodSymbol.Arity == typeArgs.Length);
828Debug.Assert(methodSymbol.IsStatic);
857Debug.Assert(method.ParameterCount == args.Length);
894Debug.Assert(method.ParameterCount == args.Length);
909Debug.Assert(valueTypeReceiver.Type is { });
910Debug.Assert(TypeSymbol.Equals(valueTypeReceiver.Type, referenceTypeReceiver.Type, TypeCompareKind.ConsiderEverything2));
916Debug.Assert(left.Type!.Equals(right.Type, TypeCompareKind.IgnoreCustomModifiersAndArraySizesAndLowerBounds | TypeCompareKind.IgnoreNullableModifiersForReferenceTypes) || left.Type.IsErrorType());
917Debug.Assert(left.Type.IsReferenceType);
945Debug.Assert(thenClause != null);
1027Debug.Assert(result.Type is { });
1034Debug.Assert(result.Type is { });
1043Debug.Assert(result.Type is { });
1073Debug.Assert(ex.Type is { SpecialType: CodeAnalysis.SpecialType.System_Int32 });
1100Debug.Assert(statements[0] is null);
1117Debug.Assert(!labels.Contains(v2));
1146Debug.Assert(stringConst.IsString || stringConst.IsNull);
1168Debug.Assert(array.Type is { TypeKind: TypeKind.Array });
1174Debug.Assert(array.Type is { TypeKind: TypeKind.Array });
1187Debug.Assert(array.Type is { TypeKind: TypeKind.Array });
1194Debug.Assert(CurrentFunction is { });
1239Debug.Assert(type.CanBeAssignedNull());
1258Debug.Assert(systemType.ExtendedSpecialType == InternalSpecialType.System_Type ||
1272Debug.Assert(TypeSymbol.Equals(systemType, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions));
1294Debug.Assert(this.CompilationState is { DynamicOperationContextType: { } });
1316Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
1423Debug.Assert(result.Type.IsErrorType() || result.Type!.IsDerivedFrom(result.GetMethodFromHandle!.ReturnType, TypeCompareKind.AllIgnoreOptions, ref discardedUseSiteInfo));
1440Debug.Assert(systemReflectionMethodOrConstructorInfo.ExtendedSpecialType == InternalSpecialType.System_Reflection_MethodInfo ||
1472Debug.Assert(!allowBoxingByRefLikeTypeParametersToObject || type.IsObjectType());
1493Debug.Assert(c.Exists);
1514Debug.Assert(arg.Type is { });
1630Debug.Assert(expression is { Type: { SpecialType: CodeAnalysis.SpecialType.System_Boolean } });
1651Debug.Assert(argument.Type is { });
1653Debug.Assert(containingMethod is { });
1654Debug.Assert(kind != SynthesizedLocalKind.UserDefined);
1671Debug.Assert(argument.GetRefKind() != RefKind.In);
1728Debug.Assert(node.Type is { });
1751Debug.Assert((operatorKind == BinaryOperatorKind.Equal) || (operatorKind == BinaryOperatorKind.NotEqual) ||
1757Debug.Assert(
1827Debug.Assert(loweredLeft != null);
1828Debug.Assert(loweredRight != null);
1829Debug.Assert((object)returnType != null);
1830Debug.Assert(returnType.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
1831Debug.Assert(loweredLeft.IsLiteralNull() != loweredRight.IsLiteralNull());
Symbols\Metadata\PE\PEMethodSymbol.cs (30)
123Debug.Assert((int)value == ((int)value & MethodKindMask));
170Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
177Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
183Debug.Assert((int)methodKind == ((int)methodKind & MethodKindMask));
185Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
195Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
250Debug.Assert(BitsAreUnsetOrSame(_bits, bitsToSet));
406Debug.Assert((object)moduleSymbol != null);
407Debug.Assert((object)containingType != null);
408Debug.Assert(!methodDef.IsNil);
420Debug.Assert((uint)implFlags <= ushort.MaxValue);
433Debug.Assert((uint)localflags <= ushort.MaxValue);
455Debug.Assert(flag != 0 && ((ushort)flag & ((ushort)flag - 1)) == 0);
611Debug.Assert(_packedFlags.IsExplicitOverrideIsPopulated);
624Debug.Assert(_packedFlags.IsExplicitOverrideIsPopulated);
711Debug.Assert(!memberNotNull.IsDefault);
719Debug.Assert(!memberNotNullWhenTrue.IsDefault);
725Debug.Assert(!memberNotNullWhenFalse.IsDefault);
786Debug.Assert((methodKind == MethodKind.PropertyGet) || (methodKind == MethodKind.PropertySet));
796Debug.Assert((methodKind == MethodKind.EventAdd) || (methodKind == MethodKind.EventRemove));
804Debug.Assert(TypeSymbol.Equals(propertyOrEventSymbol.ContainingType, _containingType, TypeCompareKind.ConsiderEverything2));
812Debug.Assert(
1052Debug.Assert(!attributeData.IsDefault);
1445Debug.Assert(!ReferenceEquals(data, UnmanagedCallersOnlyAttributeData.Uninitialized));
1446Debug.Assert(!ReferenceEquals(data, UnmanagedCallersOnlyAttributeData.AttributePresentDataNotBound));
1528Debug.Assert(!result.IsDefault);
1556Debug.Assert(MethodKind == MethodKind.Constructor);
1612Debug.Assert(!ReferenceEquals(unmanagedCallersOnlyData, UnmanagedCallersOnlyAttributeData.Uninitialized)
1636Debug.Assert(result != null);
1718Debug.Assert(_uncommonFields is null or { _lazyOverloadResolutionPriority: 0 });
Symbols\Retargeting\RetargetingSymbolTranslator.cs (37)
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());
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\SourceMemberContainerSymbol.cs (79)
147Debug.Assert(BitsAreUnsetOrSame(_flags, bitsToSet));
231Debug.Assert(containingSymbol is NamespaceSymbol { IsGlobalNamespace: true } || !declaration.Declarations.Any(static d => d.IsSimpleProgram));
260Debug.Assert(typeKind is TypeKind.Struct or TypeKind.Class || !HasPrimaryConstructor);
624Debug.Assert(thisThreadCompleted);
674Debug.Assert(thisThreadCompleted);
685Debug.Assert((incompletePart & CompletionPart.NamedTypeSymbolAll) == 0);
825Debug.Assert(!useSiteDiagnostics.IsDefault);
834Debug.Assert(!useSiteDependencies.IsDefault);
1064Debug.Assert(!nonTypeMembers.IsDefault);
1065Debug.Assert(!staticInitializers.IsDefault);
1066Debug.Assert(staticInitializers.All(g => !g.IsDefault));
1067Debug.Assert(!instanceInitializers.IsDefault);
1068Debug.Assert(instanceInitializers.All(g => !g.IsDefault));
1070Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol));
1071Debug.Assert(haveIndexers == nonTypeMembers.Any(static s => s.IsIndexer()));
1138Debug.Assert(ctorInitializerLength >= 0);
1161Debug.Assert(distanceFromCtorBody > 0);
1366Debug.Assert(s_emptyTypeMembers.Count == 0);
1423Debug.Assert(symbol is not null);
1428Debug.Assert(attr is SourceAttributeData);
1885Debug.Assert(IsFileLocal);
1893Debug.Assert(fileIdentifier.FilePathChecksumOpt.IsDefault);
2161Debug.Assert(method1.ParameterCount == method2.ParameterCount);
2269Debug.Assert(!membersByName[indexerName.AsMemory()].Any(SymbolExtensions.IsIndexer));
2371Debug.Assert(value == _lazyKnownCircularStruct);
2382Debug.Assert(TypeKind == TypeKind.Struct);
2676Debug.Assert(IsSubmissionClass || IsScriptClass);
2702Debug.Assert(ReferenceEquals(this, this.OriginalDefinition));
2988Debug.Assert(!nonTypeMembersWithPartialImplementations.IsDefault);
2992Debug.Assert(!nonTypeMembersWithPartialImplementations.Any(static s => s is TypeSymbol));
2993Debug.Assert(declarationWithParameters is object == primaryConstructor is object);
3008Debug.Assert(!initializers.IsDefault);
3016Debug.Assert(!group.IsDefaultOrEmpty);
3023Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i - 1].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0);
3028Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i + 1].Last().Syntax, compilation)) < 0);
3033Debug.Assert(LexicalSortKey.Compare(new LexicalSortKey(initializers[i].First().Syntax, compilation), new LexicalSortKey(initializers[i].Last().Syntax, compilation)) < 0);
3058Debug.Assert(declaredMembersAndInitializers != DeclaredMembersAndInitializers.UninitializedSentinel);
3084Debug.Assert(declaredMembers.PrimaryConstructor is object);
3085Debug.Assert(declaredMembers.DeclarationWithParameters is object);
3086Debug.Assert(declaredMembers.DeclarationWithParameters.SyntaxTree == InstanceInitializersForPositionalMembers[0].Syntax.SyntaxTree);
3087Debug.Assert(declaredMembers.DeclarationWithParameters.Span.Contains(InstanceInitializersForPositionalMembers[0].Syntax.Span.Start));
3120Debug.Assert(insertedInitializers[insertedInitializers.Count - 1].Syntax.SyntaxTree == declaredInitializers[0].Syntax.SyntaxTree);
3121Debug.Assert(insertedInitializers[insertedInitializers.Count - 1].Syntax.Span.Start < declaredInitializers[0].Syntax.Span.Start);
3134Debug.Assert(!declaredMembers.InstanceInitializers.Any(g => declaredMembers.DeclarationWithParameters.SyntaxTree == g[0].Syntax.SyntaxTree &&
3365Debug.Assert(!_lazySimpleProgramEntryPoints.IsDefault);
3424Debug.Assert(result is object);
3447Debug.Assert(primaryConstructor is not null);
3448Debug.Assert(!this.IsDelegateType());
3482Debug.Assert(declared.PrimaryConstructor is not null);
3488Debug.Assert(membersAndInituializers.PrimaryConstructor is not null);
3517Debug.Assert(primaryConstructor is not null);
3686Debug.Assert(symbol.IsPartialMember());
3710Debug.Assert(symbol is SourceOrdinaryMethodSymbol or SourcePropertySymbol or SourcePropertyAccessorSymbol);
3711Debug.Assert(prev is SourceOrdinaryMethodSymbol or SourcePropertySymbol or SourcePropertyAccessorSymbol);
3719Debug.Assert(symbol.IsPartialMember());
3775Debug.Assert(symbol.IsPartialMember());
3926Debug.Assert(!propertySymbol.IsExplicitInterfaceImplementation); // checked by caller
3974Debug.Assert(!eventSymbol.IsExplicitInterfaceImplementation); // checked by caller
4109Debug.Assert(node.SyntaxTree == initializers.Last().Syntax.SyntaxTree);
4110Debug.Assert(node.SpanStart > initializers.Last().Syntax.Span.Start);
4213Debug.Assert(TypeKind == TypeKind.Struct);
4217Debug.Assert(builder.DeclarationWithParameters is TypeDeclarationSyntax { ParameterList: not null } type
4262Debug.Assert(ctor is object);
4272Debug.Assert(declaredMembersAndInitializers.PrimaryConstructor?.GetBackingFields().Any() != true);
4308Debug.Assert(declaredMembersAndInitializers.DeclarationWithParameters is object);
4312Debug.Assert(ctor is object);
4360Debug.Assert(isRecordClass || !members.Any(m => m is PropertySymbol { GetMethod.IsEffectivelyReadOnly: false }));
4371Debug.Assert(positionalMembers.All(p => p is PropertySymbol or FieldSymbol));
4419Debug.Assert(isRecordClass);
4463Debug.Assert(isRecordClass);
4670Debug.Assert(property.GetMethod is object);
4671Debug.Assert(property.SetMethod is object);
4675Debug.Assert(backingField is object);
4737Debug.Assert(isRecordClass);
4859Debug.Assert(isRecordClass);
5198Debug.Assert((object)@event.AddMethod != null);
5199Debug.Assert((object)@event.RemoveMethod != null);
5223Debug.Assert(@event.AssociatedField is null);
5331Debug.Assert(
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (28)
33Debug.Assert((object)result == calculated);
37Debug.Assert(result.ExternAliases.SequenceEqual(calculated.ExternAliases));
39Debug.Assert(result.Usings.SequenceEqual(calculated.Usings));
51Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetImports(this, declarationSyntax, basesBeingResolved) == Imports.Empty);
120Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetExternAliases(this, declarationSyntax).IsEmpty);
130Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetExternAliases(this, declarationSyntax).IsEmpty);
151Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingAliases(this, declarationSyntax, basesBeingResolved).IsEmpty);
161Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingAliases(this, declarationSyntax, basesBeingResolved).IsEmpty);
193Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingAliasesMap(this, declarationSyntax, basesBeingResolved).IsEmpty);
215Debug.Assert(result.SequenceEqual(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingNamespacesOrTypes(this, declarationSyntax, basesBeingResolved)));
225Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingNamespacesOrTypes(this, declarationSyntax, basesBeingResolved).IsEmpty);
447Debug.Assert(result.IsEmpty);
448Debug.Assert(diagnostics.IsEmptyWithoutResolution);
564Debug.Assert(!onlyGlobal);
580Debug.Assert(calculated.UsingAliases.IsEmpty);
581Debug.Assert(calculated.UsingAliasesMap?.IsEmpty ?? true);
582Debug.Assert(calculated.UsingNamespacesOrTypes.IsEmpty);
598Debug.Assert(calculated.UsingAliases.SequenceEqual(result.UsingAliases));
600Debug.Assert(calculated.UsingNamespacesOrTypes.SequenceEqual(result.UsingNamespacesOrTypes));
762Debug.Assert(directiveDiagnostics.DiagnosticBag is object);
763Debug.Assert(directiveDiagnostics.DependenciesBag is object);
945Debug.Assert(_state.HasComplete(CompletionPart.StartValidatingImports));
969Debug.Assert(diagnostics.DiagnosticBag is object);
970Debug.Assert(diagnostics.DependenciesBag is object);
980Debug.Assert(declaringSymbol.IsGlobalNamespace);
1006Debug.Assert(declaringSymbol.IsGlobalNamespace);
1037Debug.Assert(target.IsGlobalNamespace);
1176Debug.Assert(_state.HasComplete(CompletionPart.StartValidatingImports));
Utilities\ValueSetFactory.NumericValueSet.cs (9)
33Debug.Assert(tc.Related(LessThanOrEqual, first, last));
39Debug.Assert(intervals.Length == 0 || tc.Related(GreaterThanOrEqual, intervals[0].first, tc.MinValue));
42Debug.Assert(tc.Related(LessThanOrEqual, intervals[i].first, intervals[i].last));
46Debug.Assert(tc.Related(LessThan, tc.Next(intervals[i - 1].last), intervals[i].first));
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));
242Debug.Assert(this._tc.GetType() == other._tc.GetType());
Microsoft.CodeAnalysis.CSharp.CodeStyle (54)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (19)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (17)
Microsoft.CodeAnalysis.CSharp.Features (122)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
Microsoft.CodeAnalysis.CSharp.Workspaces (58)
Microsoft.CodeAnalysis.Debugging.Package (21)
Microsoft.CodeAnalysis.EditorFeatures (21)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (8)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (13)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (38)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (32)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (129)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (139)
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Microsoft.CodeAnalysis.Features (440)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
395Debug.Assert(
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.InteractiveHost (40)
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (31)
Microsoft.CodeAnalysis.PooledObjects.Package (14)
Microsoft.CodeAnalysis.Rebuild (3)
Microsoft.CodeAnalysis.Remote.ServiceHub (9)
Microsoft.CodeAnalysis.Remote.Workspaces (3)
Microsoft.CodeAnalysis.Scripting (63)
Microsoft.CodeAnalysis.Test.Utilities (54)
Microsoft.CodeAnalysis.UnitTests (20)
Microsoft.CodeAnalysis.VisualBasic (462)
Microsoft.CodeAnalysis.Workspaces (632)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
57Debug.Assert(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
261Debug.Assert(
Microsoft.CodeAnalysis.Workspaces.MSBuild (11)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (165)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.CSharp (800)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MemberGroup.cs (1)
14Debug.Assert(
Microsoft.Data.Analysis (31)
Microsoft.DotNet.ArcadeLogging (4)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Internal.SymbolHelper (4)
Microsoft.DotNet.NuGetRepack.Tests (2)
Microsoft.DotNet.Open.Api.Tools.Tests (1)
Microsoft.DotNet.SignTool (22)
Microsoft.DotNet.SignTool.Tests (1)
Microsoft.DotNet.XliffTasks (1)
Microsoft.DotNet.XUnitExtensions (2)
Microsoft.Extensions.AI.OpenAI (15)
Microsoft.Extensions.ApiDescription.Client.Tests (1)
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
Microsoft.Extensions.Caching.Memory (2)
Microsoft.Extensions.Caching.StackExchangeRedis (8)
Microsoft.Extensions.Configuration (5)
Microsoft.Extensions.Configuration.Binder (9)
Microsoft.Extensions.Configuration.Json (1)
Microsoft.Extensions.DependencyInjection (8)
Microsoft.Extensions.DependencyInjection.Abstractions (10)
Microsoft.Extensions.DependencyModel (14)
Microsoft.Extensions.Diagnostics (7)
Microsoft.Extensions.FileProviders.Embedded (1)
Microsoft.Extensions.FileProviders.Physical (5)
Microsoft.Extensions.Hosting (2)
Microsoft.Extensions.Hosting.Systemd (1)
Microsoft.Extensions.Hosting.WindowsServices (3)
Microsoft.Extensions.Http (5)
Microsoft.Extensions.Identity.Core (2)
Microsoft.Extensions.Logging (4)
Microsoft.Extensions.Logging.Abstractions (5)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.Logging.Configuration (1)
Microsoft.Extensions.Logging.Console (16)
Microsoft.Extensions.Logging.EventSource (17)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Options.DataAnnotations (2)
Microsoft.Extensions.Primitives (4)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.Extensions.ServiceDiscovery (4)
Microsoft.Interop.ComInterfaceGenerator (10)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Microsoft.Interop.LibraryImportGenerator (2)
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
Microsoft.Interop.SourceGeneration (12)
Microsoft.JSInterop (3)
Microsoft.JSInterop.Tests (2)
Microsoft.Maui (2)
Microsoft.Maui.Controls (4)
Microsoft.Maui.Controls.Xaml (5)
Microsoft.Maui.Graphics (1)
Microsoft.ML.AutoML.Samples (1)
Microsoft.ML.Core (8)
Microsoft.ML.Data (1)
Microsoft.ML.DataView (46)
Microsoft.ML.ImageAnalytics (6)
Microsoft.ML.InternalCodeAnalyzer (3)
Microsoft.ML.Tokenizers (65)
Microsoft.ML.TorchSharp (7)
Microsoft.Net.Http.Headers (1)
Microsoft.VisualBasic.Core (48)
Microsoft.VisualStudio.IntegrationTest.Setup (1)
Microsoft.VisualStudio.LanguageServices (85)
Microsoft.VisualStudio.LanguageServices.CSharp (60)
Microsoft.VisualStudio.LanguageServices.DevKit (5)
MSBuild (7)
MSBuildTaskHost (15)
PresentationBuildTasks (88)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (13)
360Debug.Assert(null != XmlReader);
1507Debug.Assert( (null==ContentPropertyInfo && null==ContentPropertyName)
2070Debug.Assert(false == endTagHasBeenRead);
2220Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2229Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2238Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2247Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2256Debug.Assert(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2265Debug.Assert (attributeFound || !IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2758Debug.Assert(unknownTagName != null || null != parentType);
3703Debug.Assert(typeAndSerializer == null ||
4818Debug.Assert( collectionTypeID >= 0
5496Debug.Assert(currentPos > 0 && currentPos < s.Length - 1);
PresentationCore (1614)
PresentationFramework (1110)
PresentationFramework.Aero (1)
PresentationFramework.Aero2 (1)
PresentationFramework.AeroLite (1)
PresentationFramework.Classic (1)
PresentationFramework.Luna (1)
PresentationFramework.Royale (1)
ReachFramework (42)
Replay (8)
Roslyn.Test.PdbUtilities (9)
RunTests (4)
SemanticSearch.BuildTask (10)
Shared (17)
System.CodeDom (2)
System.Collections (101)
System.Collections.Concurrent (71)
System.Collections.Immutable (172)
System.Collections.Specialized (14)
System.ComponentModel.Annotations (9)
System.ComponentModel.Composition (53)
System.ComponentModel.TypeConverter (23)
System.Composition.Hosting (1)
System.Composition.Runtime (2)
System.Configuration.ConfigurationManager (20)
System.Console (43)
System.Data.Common (370)
System.Data.Odbc (21)
System.Diagnostics.DiagnosticSource (65)
System.Diagnostics.Process (47)
System.Diagnostics.StackTrace (1)
System.Diagnostics.TextWriterTraceListener (3)
System.Diagnostics.TraceSource (2)
System.Drawing.Primitives (8)
System.Formats.Asn1 (80)
System.Formats.Cbor (31)
System.Formats.Nrbf (7)
System.Formats.Tar (118)
System.IO.Compression (99)
System.IO.Compression.Brotli (13)
System.IO.Compression.ZipFile (5)
System.IO.FileSystem.DriveInfo (1)
System.IO.FileSystem.Watcher (25)
System.IO.Hashing (63)
System.IO.IsolatedStorage (2)
System.IO.MemoryMappedFiles (19)
System.IO.Packaging (31)
System.IO.Pipelines (31)
System.IO.Pipes (12)
System.IO.Ports (5)
System.Linq (196)
System.Linq.AsyncEnumerable (31)
System.Linq.Expressions (450)
System.Linq.Parallel (518)
System.Linq.Queryable (2)
System.Memory (53)
System.Net.Http (761)
System.Net.Http.Json (5)
System.Net.HttpListener (16)
System.Net.Mail (19)
System.Net.NameResolution (12)
System.Net.NetworkInformation (11)
System.Net.Ping (5)
System.Net.Primitives (65)
System.Net.Quic (105)
System.Net.Requests (15)
System.Net.Security (148)
System.Net.ServerSentEvents (17)
System.Net.Sockets (105)
System.Net.WebClient (19)
System.Net.WebHeaderCollection (1)
System.Net.WebProxy (1)
System.Net.WebSockets (54)
System.Net.WebSockets.Client (13)
System.Numerics.Tensors (340)
System.ObjectModel (3)
System.Private.CoreLib (2809)
System.Private.CoreLib.Generators (5)
System.Private.DataContractSerialization (328)
System.Private.Uri (93)
System.Private.Windows.Core (34)
System.Private.Windows.GdiPlus (1)
System.Private.Xml (2412)
System.Private.Xml.Linq (13)
System.Reflection.Context (72)
System.Reflection.DispatchProxy (11)
System.Reflection.Emit (27)
System.Reflection.Metadata (366)
System\Reflection\Metadata\PortablePdb\ImportDefinition.cs (1)
24Debug.Assert(
System.Reflection.MetadataLoadContext (145)
System.Resources.Extensions (20)
System.Resources.Writer (3)
System.Runtime.Caching (5)
System.Runtime.InteropServices (3)
System.Runtime.Numerics (231)
System.Runtime.Serialization.Formatters (18)
System.Runtime.Serialization.Schema (32)
System.Security.Cryptography (512)
System.Security.Cryptography.Cose (41)
System.Security.Cryptography.Pkcs (90)
System.Security.Cryptography.ProtectedData (8)
System.Security.Cryptography.Xml (8)
System.ServiceModel.Syndication (7)
System.Text.Encoding.CodePages (20)
System.Text.Encodings.Web (43)
System.Text.Json (1292)
System.Text.Json.SourceGeneration (53)
System.Text.RegularExpressions (440)
System.Text.RegularExpressions.Generator (155)
System.Threading (76)
System.Threading.Channels (17)
System.Threading.RateLimiting (42)
System.Threading.Tasks.Dataflow (7)
System.Threading.Tasks.Parallel (26)
System.Transactions.Local (110)
System.Web.HttpUtility (7)
System.Windows.Controls.Ribbon (57)
System.Windows.Forms (1467)
System.Windows.Forms.Design (40)
System.Windows.Forms.Primitives (21)
System.Windows.Forms.Tests (1)
System.Windows.Input.Manipulations (77)
System.Xaml (117)
Templates.Blazor.Tests (2)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
UIAutomationClient (10)
UIAutomationClientSideProviders (38)
UIAutomationTypes (2)
vbc (8)
VBCSCompiler (24)
VBCSCompiler.UnitTests (1)
WindowsFormsIntegration (1)
xunit.console (1)