1320 references to Assert
Aspire.Dashboard (1)
Components\Controls\Chart\MetricTable.razor.cs (1)
217Debug.Assert(exemplars.Count == newMetrics.Sum(m => m.Value.Exemplars.Count), $"Expected {exemplars.Count} exemplars but got {newMetrics.Sum(m => m.Value.Exemplars.Count)} exemplars.");
Aspire.Hosting (1)
Dcp\OtlpEndpointReferenceGatherer.cs (1)
74Debug.Assert(url is not null, $"We should be able to get a URL value from the reference dashboard endpoint '{endpointReference.EndpointName}'");
CodeStyleConfigFileGenerator (1)
Program.cs (1)
160Debug.Assert(rule.CustomTags.Any(c => c == s_neverTag || c == s_whenExplicitlyEnabledTag || c == s_recommendedTag || c == s_highlyRecommendedTag),
dotnet (1)
Telemetry\ExternalTelemetryProperties.cs (1)
68Debug.Assert(false, $"Unexpected exception from GetProductInfo: ${e.GetType().Name}: ${e.Message}");
dotnet-aot (1)
src\sdk\src\Cli\dotnet\Telemetry\ExternalTelemetryProperties.cs (1)
68Debug.Assert(false, $"Unexpected exception from GetProductInfo: ${e.GetType().Name}: ${e.Message}");
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
320Debug.Assert(operation.Kind is OperationKind.None or OperationKind.Attribute, $"Unexpected root operation kind: {operation.Kind}");
ILCompiler.Compiler (1)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (1)
421Debug.Assert(codeNode.Signature != null, $"Wasm code node {codeNode.GetType()} has null signature");
ILCompiler.ReadyToRun (12)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (1)
421Debug.Assert(codeNode.Signature != null, $"Wasm code node {codeNode.GetType()} has null signature");
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmObjectWriter.cs (8)
92Debug.Assert(added, 282Debug.Assert(section != null || alignment == 1, $"Section: {sectionIndex} is not a WebcilSection but alignment {alignment} requested"); 570Debug.Assert(added, $"Duplicate global name: {name}"); 739Debug.Assert(section.Header.SizeOfRawData - bytesWritten == section.Padding, $"Unexpected padding: {section.Header.SizeOfRawData - bytesWritten} != {section.Padding}"); 757Debug.Assert(webcilStream.Position == _webcilSegment.GetFlatMappedSize(), $"Total Size Mismatch: {webcilStream.Position} != {_webcilSegment.GetFlatMappedSize()}"); 1112Debug.Assert(assigned == import.Index.Value, $"Import {import.Module}.{import.Name} of kind {import.Kind} assigned index {assigned}, needs {import.Index.Value}"); 1220Debug.Assert(_dataStream != null, $"{this.Name} has null data stream"); 1464Debug.Assert(headerBuffer.Slice(len).Length == Relocation.WASM_PADDED_RELOC_SIZE_32, $"{headerBuffer.Slice(len).Length} != {Relocation.WASM_PADDED_RELOC_SIZE_32}");
src\runtime\src\coreclr\tools\Common\JitInterface\WasmLowering.cs (3)
255Debug.Assert(returnType is not null, $"No cached struct of size {structSize} for return type in signature '{sig}'"); 288Debug.Assert(cachedStruct is not null, $"No cached struct of size {structSize} for parameter in signature '{sig}'"); 308Debug.Assert(roundtripped.Equals(wasmSignature),
ILCompiler.RyuJit (3)
src\runtime\src\coreclr\tools\Common\JitInterface\WasmLowering.cs (3)
255Debug.Assert(returnType is not null, $"No cached struct of size {structSize} for return type in signature '{sig}'"); 288Debug.Assert(cachedStruct is not null, $"No cached struct of size {structSize} for parameter in signature '{sig}'"); 308Debug.Assert(roundtripped.Equals(wasmSignature),
illink (1)
Microsoft.AspNetCore.Components (1)
Rendering\RenderTreeBuilder.cs (1)
845Debug.Assert(frame.FrameTypeField == RenderTreeFrameType.Attribute, $"Frame type is {frame.FrameTypeField} at {i}");
Microsoft.AspNetCore.Http.Results (1)
ResultsOfTHelper.cs (1)
44Debug.Assert(populateMetadataMethod != null, $"Couldn't find PopulateMetadata method on {typeof(TTarget)}.");
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelMetadata.cs (1)
790Debug.Assert(
Microsoft.AspNetCore.OpenApi (3)
Transformers\TypeBasedOpenApiDocumentTransformer.cs (1)
25Debug.Assert(transformer != null, $"The type {_transformerType} does not implement {nameof(IOpenApiDocumentTransformer)}.");
Transformers\TypeBasedOpenApiOperationTransformer.cs (1)
25Debug.Assert(transformer != null, $"The type {_transformerType} does not implement {nameof(IOpenApiOperationTransformer)}.");
Transformers\TypeBasedOpenApiSchemaTransformer.cs (1)
25Debug.Assert(transformer != null, $"The type {_transformerType} does not implement {nameof(IOpenApiSchemaTransformer)}.");
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http2\FlowControl\FlowControl.cs (1)
31Debug.Assert(bytes == 0 || (bytes > 0 && bytes <= Available), $"{nameof(Advance)}({bytes}) called with {Available} bytes available.");
src\aspnetcore\src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (2)
603Debug.Assert(success, $"Stack-allocated space was too small for index '{index}'."); 615Debug.Assert(success, $"Stack-allocated space was too small for \"{name}\".");
Microsoft.AspNetCore.SignalR.Core (1)
Internal\DefaultHubDispatcher.cs (1)
860Debug.Assert(false, $"Failed to bind argument of type '{descriptor.OriginalParameterTypes[parameterPointer].Name}' for hub method '{descriptor.MethodExecutor.MethodInfo.Name}'.");
Microsoft.AspNetCore.StaticAssets (4)
Development\StaticAssetDevelopmentRuntimeHandler.cs (4)
51Debug.Assert(originalETag != null, $"The static asset descriptor {asset.Route} - {asset.AssetPath} does not have an original-resource property."); 52Debug.Assert(originalAsset != null, $"The static asset descriptor {asset.Route} - {asset.AssetPath} has an original-resource property that does not match any known static asset descriptor."); 122Debug.Assert(etag != null, $"The static asset descriptor {descriptor.Route} - {descriptor.AssetPath} does not have an ETag response header."); 123Debug.Assert(_descriptorsMap.ContainsKey((descriptor.Route, etag)),
Microsoft.Build (1)
Evaluation\Expander.Function.cs (1)
158System.Diagnostics.Debug.Assert(
Microsoft.Build.Framework (1)
ChangeWaves.cs (1)
183Debug.Assert(_runningTests || Array.IndexOf(AllWaves, wave) >= 0, $"Change wave version {wave} is invalid");
Microsoft.Build.Tasks.Core (7)
BootstrapperUtil\BootstrapperBuilder.cs (2)
953Debug.Assert(langNode != null, $"Unable to find a package node in {strLangManifestFilename}"); 1995Debug.Assert(s != null, $"EmbeddedResource '{name}' not found");
ManifestUtil\Util.cs (1)
203Debug.Assert(s != null, $"EmbeddedResource '{name}' not found");
ResolveManifestFiles.cs (4)
367Debug.Assert(!String.IsNullOrEmpty(itemCulture), $"Satellite item '{item.ItemSpec}' is missing expected attribute 'Culture'"); 888Debug.Assert(!_dictionary.ContainsKey(key), $"Two or more items with same key '{key}' detected"); 957Debug.Assert(!_dictionary.ContainsKey(key), $"Two or more items with same key '{key}' detected"); 998Debug.Assert(!_dictionary.ContainsKey(key), $"Two or more items with same '{(object)ItemMetadataNames.targetPath}' attribute detected");
Microsoft.CodeAnalysis (3)
CodeGen\LocalSlotManager.cs (1)
165Debug.Assert(removed, $"Attempted to free '{symbol}' more than once.");
CommandLine\Feature.cs (1)
43Debug.Assert(flags.Contains(s), $"Unknown feature flag: {s}");
Operations\ControlFlowGraphBuilder.cs (1)
96Debug.Assert(body.Kind == OperationKind.Block ||
Microsoft.CodeAnalysis.CSharp (8)
Binder\DecisionDagBuilder_CheckOrReachability.cs (1)
799Debug.Assert(node is BoundBinaryPattern
Binder\RefSafetyAnalysis.cs (1)
1438Debug.Assert(element is BoundCollectionElementInitializer or BoundExpression, $"Unexpected collection expression element {element}");
BoundTree\BoundDecisionDagNode.cs (1)
67Debug.Assert(_id == -1, $"Id was set to {_id} and set again to {value}");
BoundTree\BoundExpression.cs (1)
22Debug.Assert(this.WasCompilerGenerated ||
BoundTree\Constructors.cs (1)
201Debug.Assert(argumentRefKind is RefKind.None or RefKind.Ref or RefKind.In or RefKind.Out or RefKindExtensions.StrictIn &&
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (1)
66Debug.Assert(
Lowering\LocalRewriter\PipelinePhaseValidator.cs (1)
101Debug.Assert(false, $"Bound nodes of kind {node.Kind} should not survive past {DoesNotSurvive(node.Kind)}");
Symbols\Synthesized\SynthesizedTypeParameterSymbol.cs (1)
30Debug.Assert(this.TypeParameterKind == (ContainingSymbol is MethodSymbol ? TypeParameterKind.Method :
Microsoft.CodeAnalysis.Features (2)
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (1)
116Debug.Assert(document.Name != FileName, $"New document name is same as old document name:{FileName}");
Completion\CompletionService_GetCompletions.cs (1)
227Debug.Assert(lspProvider.TriggerCharacters.Contains(character),
Microsoft.CodeAnalysis.Razor.Compiler (6)
Language\CodeGeneration\CodeWriter.WriteInterpolatedStringHandler.cs (1)
81Debug.Assert(!typeof(T).IsValueType, $"Handle {typeof(T).FullName} to avoid boxing to {nameof(IWriteableValue)}");
Language\Legacy\RoslynCSharpTokenizer.cs (1)
97Debug.Assert(CurrentState == RoslynCSharpTokenizerState.TriviaForCSharpToken, $"Unexpected state: {CurrentState}");
Language\Legacy\Tokenizer.cs (1)
206Debug.Assert(tokenContent == Buffer.ToString(), $"Token content mismatch: '{tokenContent}' != '{Buffer}'. Token Type: '{type}'.");
Language\RazorCodeDocument.cs (1)
322Debug.Assert(validateNamespace == @namespace, $"We cached a namespace of {@namespace} but calculated that it should be {validateNamespace}");
Language\RazorHtmlWriter.cs (1)
53Debug.Assert(
Language\TagHelpers\Producers\ComponentTagHelperProducer.cs (1)
499Debug.Assert(false, $"Need to add support for '{arg.Kind}' and make sure the output is 'global::' prefixed.");
Microsoft.Diagnostics.DataContractReader (2)
ContractDescriptorTarget.cs (2)
805Debug.Assert( 833Debug.Assert(
Microsoft.Diagnostics.DataContractReader.Abstractions (7)
TargetFieldExtensions.cs (7)
75Debug.Assert( 88Debug.Assert( 101Debug.Assert( 116Debug.Assert( 180Debug.Assert( 207Debug.Assert( 215Debug.Assert(
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Contracts\StackWalk\StackWalk_1.cs (1)
813Debug.Assert(
Microsoft.Diagnostics.DataContractReader.Legacy (630)
ClrDataAppDomain.cs (5)
79Debug.Assert(*nameLen == nameLenLocal, $"cDAC: {*nameLen}, DAC: {nameLenLocal}"); 90Debug.Assert(dacName == cdacName, $"cDAC: {cdacName}, DAC: {dacName}"); 121Debug.Assert(*id == idLocal, $"cDAC: {*id}, DAC: {idLocal}"); 150Debug.Assert(*flags == flagsLocal, $"cDAC: {*flags}, DAC: {flagsLocal}"); 177Debug.Assert(hrLocal == hr, $"cDAC: {hr}, DAC: {hrLocal}");
ClrDataExceptionState.cs (1)
63Debug.Assert(*flags == legacyFlags, $"cDAC flags: {*flags:x}, DAC flags: {legacyFlags:x}");
ClrDataFrame.cs (2)
162Debug.Assert(*numArgs == numArgsLocal, $"cDAC: {*numArgs}, DAC: {numArgsLocal}"); 284Debug.Assert(*numLocals == numLocalsLocal, $"cDAC: {*numLocals}, DAC: {numLocalsLocal}");
ClrDataMethodDefinition.cs (4)
311Debug.Assert(nameLenLocal == *nameLen, $"cDAC: {*nameLen:x}, DAC: {nameLenLocal:x}"); 317Debug.Assert(dacName == cdacName, $"cDAC: {cdacName}, DAC: {dacName}"); 369Debug.Assert(tokenLocal == *token, $"cDAC: {*token:x}, DAC: {tokenLocal:x}"); 480Debug.Assert(bGenericLocal == *bGeneric, $"cDAC: {*bGeneric}, DAC: {bGenericLocal}");
ClrDataMethodInstance.cs (12)
100Debug.Assert(tokenLocal == *token, $"cDAC: {*token:x}, DAC: {tokenLocal:x}"); 172Debug.Assert(nameLenLocal == *nameLen, $"cDAC: {*nameLen:x}, DAC: {nameLenLocal:x}"); 178Debug.Assert(dacName == cdacName, $"cDAC: {cdacName}, DAC: {dacName}"); 275Debug.Assert(localOffsetsNeeded == *offsetsNeeded, $"cDAC: {*offsetsNeeded:x}, DAC: {localOffsetsNeeded:x}"); 282Debug.Assert(localIlOffsets[i] == ilOffsets[i], $"cDAC: {localIlOffsets[i]:x}, DAC: {ilOffsets[i]:x}"); 371Debug.Assert(mapsLocal[i].ilOffset == maps![i].ilOffset, $"ILOffset - cDAC: {maps[i].ilOffset:x}, DAC: {mapsLocal[i].ilOffset:x}"); 372Debug.Assert(mapsLocal[i].startAddress == maps[i].startAddress, $"StartAddress - cDAC: {maps[i].startAddress:x}, DAC: {mapsLocal[i].startAddress:x}"); 373Debug.Assert(mapsLocal[i].endAddress == maps[i].endAddress, $"EndAddress - cDAC: {maps[i].endAddress:x}, DAC: {mapsLocal[i].endAddress:x}"); 374Debug.Assert(mapsLocal[i].type == maps[i].type, $"Type - cDAC: {maps[i].type:x}, DAC: {mapsLocal[i].type:x}"); 503Debug.Assert(extent->startAddress == extentLocal.startAddress, $"StartAddress - cDAC: {extent->startAddress:x}, DAC: {extentLocal.startAddress:x}"); 504Debug.Assert(extent->endAddress == extentLocal.endAddress, $"EndAddress - cDAC: {extent->endAddress:x}, DAC: {extentLocal.endAddress:x}"); 579Debug.Assert(addrLocal == *addr, $"cDAC: {*addr:x}, DAC: {addrLocal:x}");
ClrDataModule.cs (8)
576Debug.Assert(hrLocal == HResults.S_OK, $"cDAC: {HResults.S_OK}, DAC: {hrLocal}"); 577Debug.Assert(flagsLocal == *flags, $"cDAC: {*flags}, DAC: {flagsLocal}"); 629Debug.Assert(hrLocal == HResults.S_OK, $"cDAC: {HResults.S_OK}, DAC: {hrLocal}"); 672Debug.Assert(hr == hrLocal, $"cDAC: {hr}, DAC: {hrLocal}"); 676Debug.Assert(dataModuleExtent->baseAddress == dataModuleExtentLocal.baseAddress, $"cDAC: {dataModuleExtent->baseAddress}, DAC: {dataModuleExtentLocal.baseAddress}"); 677Debug.Assert(dataModuleExtent->length == dataModuleExtentLocal.length, $"cDAC: {dataModuleExtent->length}, DAC: {dataModuleExtentLocal.length}"); 678Debug.Assert(dataModuleExtent->type == dataModuleExtentLocal.type, $"cDAC: {dataModuleExtent->type}, DAC: {dataModuleExtentLocal.type}"); 691Debug.Assert(hrLocal == HResults.S_OK, $"cDAC: {HResults.S_OK}, DAC: {hrLocal}");
ClrDataStackWalk.cs (1)
219Debug.Assert(localOutBuffer[i] == outBuffer[i], $"cDAC: {outBuffer[i]:x}, DAC: {localOutBuffer[i]:x}");
ClrDataValue.cs (7)
76Debug.Assert(*flags == flagsLocal, $"GetFlags cDAC: 0x{*flags:X}, DAC: 0x{flagsLocal:X}"); 108Debug.Assert((ulong)*address == (ulong)addressLocal, $"GetAddress cDAC: 0x{(ulong)*address:X}, DAC: 0x{(ulong)addressLocal:X}"); 140Debug.Assert(*size == sizeLocal, $"GetSize cDAC: {*size}, DAC: {sizeLocal}"); 202Debug.Assert(*dataSize == legacyDataSize, $"GetBytes dataSize cDAC: {*dataSize}, DAC: {legacyDataSize}"); 206Debug.Assert(buffer[i] == legacyBuf[i], $"GetBytes mismatch at byte {i}: cDAC: 0x{buffer[i]:X2}, DAC: 0x{legacyBuf[i]:X2}"); 324Debug.Assert(*numLocs == numLocsLocal, $"GetNumLocations cDAC: {*numLocs}, DAC: {numLocsLocal}"); 360Debug.Assert(*flags == flagsLocal, $"GetLocationByIndex[{loc}] flags cDAC: {*flags}, DAC: {flagsLocal}");
Dbi\DacDbiImpl.cs (198)
125Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 176Debug.Assert( 215Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 293Debug.Assert(pTargetRefInfo->vmAssembly == targetLocal.vmAssembly, $"cDAC: {pTargetRefInfo->vmAssembly:x}, DAC: {targetLocal.vmAssembly:x}"); 294Debug.Assert(pTargetRefInfo->typeToken == targetLocal.typeToken, $"cDAC: {pTargetRefInfo->typeToken:x}, DAC: {targetLocal.typeToken:x}"); 344Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 386Debug.Assert(pTargetBuffer->pAddress == pTargetBufferLocal.pAddress, $"pAddress: cDAC: {pTargetBuffer->pAddress:x}, DAC: {pTargetBufferLocal.pAddress:x}"); 387Debug.Assert(pTargetBuffer->cbSize == pTargetBufferLocal.cbSize, $"cbSize: cDAC: {pTargetBuffer->cbSize}, DAC: {pTargetBufferLocal.cbSize}"); 434Debug.Assert(pTargetBuffer->pAddress == bufferLocal.pAddress, $"pAddress: cDAC: {pTargetBuffer->pAddress:x}, DAC: {bufferLocal.pAddress:x}"); 435Debug.Assert(pTargetBuffer->cbSize == bufferLocal.cbSize, $"cbSize: cDAC: {pTargetBuffer->cbSize}, DAC: {bufferLocal.cbSize}"); 436Debug.Assert(*pSymbolFormat == formatLocal, $"pSymbolFormat: cDAC: {*pSymbolFormat}, DAC: {formatLocal}"); 482Debug.Assert(pData->vmAssembly == dataLocal.vmAssembly, $"vmAssembly: cDAC: {pData->vmAssembly:x}, DAC: {dataLocal.vmAssembly:x}"); 483Debug.Assert(pData->vmPEAssembly == dataLocal.vmPEAssembly, $"vmPEAssembly: cDAC: {pData->vmPEAssembly:x}, DAC: {dataLocal.vmPEAssembly:x}"); 484Debug.Assert(pData->fIsDynamic == dataLocal.fIsDynamic, $"fIsDynamic: cDAC: {pData->fIsDynamic}, DAC: {dataLocal.fIsDynamic}"); 485Debug.Assert(pData->fInMemory == dataLocal.fInMemory, $"fInMemory: cDAC: {pData->fInMemory}, DAC: {dataLocal.fInMemory}"); 486Debug.Assert(pData->pPEBaseAddress == dataLocal.pPEBaseAddress, $"pPEBaseAddress: cDAC: {pData->pPEBaseAddress:x}, DAC: {dataLocal.pPEBaseAddress:x}"); 487Debug.Assert(pData->nPESize == dataLocal.nPESize, $"nPESize: cDAC: {pData->nPESize}, DAC: {dataLocal.nPESize}"); 526Debug.Assert(*pModule == moduleLocal, $"cDAC: {*pModule:x}, DAC: {moduleLocal:x}"); 528Debug.Assert(*pIsModuleLoaded == isModuleLoadedLocal, $"cDAC: {*pIsModuleLoaded}, DAC: {isModuleLoadedLocal}"); 561Debug.Assert(*pIsManaged == isManagedLocal, $"cDAC: {*pIsManaged}, DAC: {isManagedLocal}"); 598Debug.Assert(*pfAllowJITOpts == allowJITOptsLocal, $"cDAC: {*pfAllowJITOpts}, DAC: {allowJITOptsLocal}"); 599Debug.Assert(*pfEnableEnC == enableEnCLocal, $"cDAC: {*pfEnableEnC}, DAC: {enableEnCLocal}"); 698Debug.Assert( 923Debug.Assert( 961Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 986Debug.Assert(*pRetVal == retValLocal, $"cDAC: {(nuint)(*pRetVal):x}, DAC: {(nuint)retValLocal:x}"); 1015Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 1047Debug.Assert(pThreadAllocInfo->allocBytesSOH == allocInfoLocal.allocBytesSOH, $"cDAC: {pThreadAllocInfo->allocBytesSOH}, DAC: {allocInfoLocal.allocBytesSOH}"); 1048Debug.Assert(pThreadAllocInfo->allocBytesUOH == allocInfoLocal.allocBytesUOH, $"cDAC: {pThreadAllocInfo->allocBytesUOH}, DAC: {allocInfoLocal.allocBytesUOH}"); 1109Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 1150Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 1195Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 1212Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 1229Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 1258Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 1284Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 1317Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 1366Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 1392Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 1418Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 1451Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 1574Debug.Assert(*pRetVal == pRetValLocal, $"cDAC: {*pRetVal:x}, DAC: {pRetValLocal:x}"); 1857Debug.Assert(*pResult == localResult, $"cDAC: {*pResult}, DAC: {localResult}"); 1944Debug.Assert(*pRetVal == dacCount, $"Internal frame count mismatch - cDAC: {*pRetVal}, DAC: {dacCount}"); 2013Debug.Assert(cdacFrames!.Count == dacFrames.Count, $"Internal frame count mismatch - cDAC: {cdacFrames!.Count}, DAC: {dacFrames.Count}"); 2019Debug.Assert(c.fp == d.fp, $"Frame[{i}] fp mismatch - cDAC: 0x{c.fp:x}, DAC: 0x{d.fp:x}"); 2020Debug.Assert(c.vmCurrentAppDomainToken == d.vmCurrentAppDomainToken, $"Frame[{i}] vmCurrentAppDomainToken mismatch - cDAC: 0x{c.vmCurrentAppDomainToken:x}, DAC: 0x{d.vmCurrentAppDomainToken:x}"); 2021Debug.Assert(c.eType == d.eType, $"Frame[{i}] eType mismatch - cDAC: {c.eType}, DAC: {d.eType}"); 2022Debug.Assert(c.stubFrame.funcMetadataToken == d.stubFrame.funcMetadataToken, $"Frame[{i}] funcMetadataToken mismatch - cDAC: 0x{c.stubFrame.funcMetadataToken:x}, DAC: 0x{d.stubFrame.funcMetadataToken:x}"); 2023Debug.Assert(c.stubFrame.vmAssembly == d.stubFrame.vmAssembly, $"Frame[{i}] vmAssembly mismatch - cDAC: 0x{c.stubFrame.vmAssembly:x}, DAC: 0x{d.stubFrame.vmAssembly:x}"); 2024Debug.Assert(c.stubFrame.vmMethodDesc == d.stubFrame.vmMethodDesc, $"Frame[{i}] vmMethodDesc mismatch - cDAC: 0x{c.stubFrame.vmMethodDesc:x}, DAC: 0x{d.stubFrame.vmMethodDesc:x}"); 2025Debug.Assert(c.stubFrame.frameType == d.stubFrame.frameType, $"Frame[{i}] frameType mismatch - cDAC: {c.stubFrame.frameType}, DAC: {d.stubFrame.frameType}"); 2106Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 2156Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 2230Debug.Assert(*pRetVal == resultLocal, $"cDAC: {*pRetVal}, DAC: {resultLocal}"); 2263Debug.Assert(*pArgBase == argBaseLocal, $"cDAC argBase: 0x{*pArgBase:X}, DAC argBase: 0x{argBaseLocal:X}"); 2264Debug.Assert(pRetVal->pAddress == retValLocal.pAddress, $"cDAC sigAddr: 0x{pRetVal->pAddress:X}, DAC sigAddr: 0x{retValLocal.pAddress:X}"); 2265Debug.Assert(pRetVal->cbSize == retValLocal.cbSize, $"cDAC sigLen: {pRetVal->cbSize}, DAC sigLen: {retValLocal.cbSize}"); 2302Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 2354Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 2419Debug.Assert(pTargetBuffer->pAddress == bufferLocal.pAddress, $"cDAC ILAddr: 0x{pTargetBuffer->pAddress:X}, DAC ILAddr: 0x{bufferLocal.pAddress:X}"); 2420Debug.Assert(pTargetBuffer->cbSize == bufferLocal.cbSize, $"cDAC ILSize: {pTargetBuffer->cbSize}, DAC ILSize: {bufferLocal.cbSize}"); 2421Debug.Assert(*pLocalSigToken == sigLocal, $"cDAC LocalSig: 0x{*pLocalSigToken:X}, DAC LocalSig: 0x{sigLocal:X}"); 2455Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 2482Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 2731Debug.Assert(cdacObjectSize == dacObjectSize, $"{label} object size mismatch - cDAC: {cdacObjectSize}, DAC: {dacObjectSize}"); 2738Debug.Assert(cdacFields!.Count == dacFields.Count, $"{label} field count mismatch - cDAC: {cdacFields!.Count}, DAC: {dacFields.Count}"); 2744Debug.Assert(c.m_fldMetadataToken == d.m_fldMetadataToken, $"{label} field[{i}] m_fldMetadataToken mismatch - cDAC: 0x{c.m_fldMetadataToken:x}, DAC: 0x{d.m_fldMetadataToken:x}"); 2745Debug.Assert(c.m_fFldStorageAvailable == d.m_fFldStorageAvailable, $"{label} field[{i}] m_fFldStorageAvailable mismatch - cDAC: {c.m_fFldStorageAvailable}, DAC: {d.m_fFldStorageAvailable}"); 2746Debug.Assert(c.m_fFldIsStatic == d.m_fFldIsStatic, $"{label} field[{i}] m_fFldIsStatic mismatch - cDAC: {c.m_fFldIsStatic}, DAC: {d.m_fFldIsStatic}"); 2747Debug.Assert(c.m_fFldIsRVA == d.m_fFldIsRVA, $"{label} field[{i}] m_fFldIsRVA mismatch - cDAC: {c.m_fFldIsRVA}, DAC: {d.m_fFldIsRVA}"); 2748Debug.Assert(c.m_fFldIsTLS == d.m_fFldIsTLS, $"{label} field[{i}] m_fFldIsTLS mismatch - cDAC: {c.m_fFldIsTLS}, DAC: {d.m_fFldIsTLS}"); 2749Debug.Assert(c.m_fFldIsPrimitive == d.m_fFldIsPrimitive, $"{label} field[{i}] m_fFldIsPrimitive mismatch - cDAC: {c.m_fFldIsPrimitive}, DAC: {d.m_fFldIsPrimitive}"); 2750Debug.Assert(c.m_fFldIsCollectibleStatic == d.m_fFldIsCollectibleStatic, $"{label} field[{i}] m_fFldIsCollectibleStatic mismatch - cDAC: {c.m_fFldIsCollectibleStatic}, DAC: {d.m_fFldIsCollectibleStatic}"); 2751Debug.Assert(c.m_fldInstanceOffset == d.m_fldInstanceOffset, $"{label} field[{i}] m_fldInstanceOffset mismatch - cDAC: 0x{c.m_fldInstanceOffset:x}, DAC: 0x{d.m_fldInstanceOffset:x}"); 2752Debug.Assert(c.m_pFldStaticAddress == d.m_pFldStaticAddress, $"{label} field[{i}] m_pFldStaticAddress mismatch - cDAC: 0x{c.m_pFldStaticAddress:x}, DAC: 0x{d.m_pFldStaticAddress:x}"); 2753Debug.Assert(c.m_vmFieldDesc == d.m_vmFieldDesc, $"{label} field[{i}] m_vmFieldDesc mismatch - cDAC: 0x{c.m_vmFieldDesc:x}, DAC: 0x{d.m_vmFieldDesc:x}"); 2818Debug.Assert(cdac->elementType == dac->elementType, 2824Debug.Assert(cdac->ClassTypeData_metadataToken == dac->ClassTypeData_metadataToken, 2826Debug.Assert(cdac->ClassTypeData_vmAssembly == dac->ClassTypeData_vmAssembly, 2828Debug.Assert(cdac->ClassTypeData_typeHandle == dac->ClassTypeData_typeHandle, 2833Debug.Assert(cdac->ArrayTypeData_arrayRank == dac->ArrayTypeData_arrayRank, 2835Debug.Assert(cdac->ArrayTypeData_arrayTypeArg.elementType == dac->ArrayTypeData_arrayTypeArg.elementType, 2837Debug.Assert(cdac->ArrayTypeData_arrayTypeArg.metadataToken == dac->ArrayTypeData_arrayTypeArg.metadataToken, 2839Debug.Assert(cdac->ArrayTypeData_arrayTypeArg.vmAssembly == dac->ArrayTypeData_arrayTypeArg.vmAssembly, 2841Debug.Assert(cdac->ArrayTypeData_arrayTypeArg.vmTypeHandle == dac->ArrayTypeData_arrayTypeArg.vmTypeHandle, 2846Debug.Assert(cdac->UnaryTypeData_unaryTypeArg.elementType == dac->UnaryTypeData_unaryTypeArg.elementType, 2848Debug.Assert(cdac->UnaryTypeData_unaryTypeArg.metadataToken == dac->UnaryTypeData_unaryTypeArg.metadataToken, 2850Debug.Assert(cdac->UnaryTypeData_unaryTypeArg.vmAssembly == dac->UnaryTypeData_unaryTypeArg.vmAssembly, 2852Debug.Assert(cdac->UnaryTypeData_unaryTypeArg.vmTypeHandle == dac->UnaryTypeData_unaryTypeArg.vmTypeHandle, 2856Debug.Assert(cdac->NaryTypeData_typeHandle == dac->NaryTypeData_typeHandle, 2898Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 2936Debug.Assert(*pRetVal == vmLocal, $"cDAC: {*pRetVal:x}, DAC: {vmLocal:x}"); 2990Debug.Assert(*pVmTypeHandle == vmLocal, $"cDAC: {*pVmTypeHandle:x}, DAC: {vmLocal:x}"); 3214Debug.Assert(cClassParams == cClassParamsLocal, 3220Debug.Assert(entries.Count == legacyEntries.Count, 3226Debug.Assert(entries[i].Equals(legacyEntries[i]), 3266Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 3293Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal}, DAC: {retValLocal}"); 3367Debug.Assert(pFieldData->m_fldMetadataToken == fieldDataLocal.m_fldMetadataToken, 3369Debug.Assert(pFieldData->m_fFldStorageAvailable == fieldDataLocal.m_fFldStorageAvailable, 3371Debug.Assert(pFieldData->m_fFldIsStatic == fieldDataLocal.m_fFldIsStatic, 3373Debug.Assert(pFieldData->m_fFldIsRVA == fieldDataLocal.m_fFldIsRVA, 3375Debug.Assert(pFieldData->m_fFldIsTLS == fieldDataLocal.m_fFldIsTLS, 3377Debug.Assert(pFieldData->m_fFldIsPrimitive == fieldDataLocal.m_fFldIsPrimitive, 3379Debug.Assert(pFieldData->m_fFldIsCollectibleStatic == fieldDataLocal.m_fFldIsCollectibleStatic, 3381Debug.Assert(pFieldData->m_vmFieldDesc == fieldDataLocal.m_vmFieldDesc, 3384Debug.Assert(pFieldData->m_pFldStaticAddress == fieldDataLocal.m_pFldStaticAddress, 3387Debug.Assert(pFieldData->m_fldInstanceOffset == fieldDataLocal.m_fldInstanceOffset, 3469Debug.Assert(entries.Count == legacyEntries.Count, 3475Debug.Assert(entries[i].Equals(legacyEntries[i]), 3540Debug.Assert(*pMetadataToken == metadataTokenLocal, $"cDAC: {*pMetadataToken}, DAC: {metadataTokenLocal}"); 3541Debug.Assert(*pVmModule == vmModuleLocal, $"cDAC: {*pVmModule}, DAC: {vmModuleLocal}"); 3582Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 3643Debug.Assert(frames.SequenceEqual(legacyFrames), 3675Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 3735Debug.Assert(itfPtrs.SequenceEqual(legacyItfPtrs), 3769Debug.Assert(*pObjRef == objRefLocal, $"cDAC objRef: 0x{*pObjRef:x}, DAC: 0x{objRefLocal:x}"); 3772Debug.Assert(pTypedByRefType->elementType == typeLocal.elementType, 3774Debug.Assert(pTypedByRefType->metadataToken == typeLocal.metadataToken, 3776Debug.Assert(pTypedByRefType->vmAssembly == typeLocal.vmAssembly, 3812Debug.Assert(*pLength == lengthLocal, $"cDAC length: {*pLength}, DAC: {lengthLocal}"); 3813Debug.Assert(*pOffsetToStringBase == offsetLocal, $"cDAC offsetToStringBase: {*pOffsetToStringBase}, DAC: {offsetLocal}"); 3866Debug.Assert(*pIsValidArray == isValidLocal, $"cDAC isValidArray: {*pIsValidArray}, DAC: {isValidLocal}"); 3869Debug.Assert(pArrayInfo->rank == arrayInfoLocal.rank, $"cDAC rank: {pArrayInfo->rank}, DAC: {arrayInfoLocal.rank}"); 3870Debug.Assert(pArrayInfo->componentCount == arrayInfoLocal.componentCount, $"cDAC componentCount: {pArrayInfo->componentCount}, DAC: {arrayInfoLocal.componentCount}"); 3871Debug.Assert(pArrayInfo->offsetToArrayBase == arrayInfoLocal.offsetToArrayBase, $"cDAC offsetToArrayBase: {pArrayInfo->offsetToArrayBase}, DAC: {arrayInfoLocal.offsetToArrayBase}"); 3872Debug.Assert(pArrayInfo->offsetToUpperBounds == arrayInfoLocal.offsetToUpperBounds, $"cDAC offsetToUpperBounds: {pArrayInfo->offsetToUpperBounds}, DAC: {arrayInfoLocal.offsetToUpperBounds}"); 3873Debug.Assert(pArrayInfo->offsetToLowerBounds == arrayInfoLocal.offsetToLowerBounds, $"cDAC offsetToLowerBounds: {pArrayInfo->offsetToLowerBounds}, DAC: {arrayInfoLocal.offsetToLowerBounds}"); 3874Debug.Assert(pArrayInfo->elementSize == arrayInfoLocal.elementSize, $"cDAC elementSize: {pArrayInfo->elementSize}, DAC: {arrayInfoLocal.elementSize}"); 3932Debug.Assert(*pIsValidRef == isValidLocal, $"cDAC isValidRef: {*pIsValidRef}, DAC: {isValidLocal}"); 3935Debug.Assert(*pObjSize == objSizeLocal, $"cDAC objSize: {*pObjSize}, DAC: {objSizeLocal}"); 3936Debug.Assert(*pObjOffsetToVars == objOffsetLocal, $"cDAC objOffsetToVars: {*pObjOffsetToVars}, DAC: {objOffsetLocal}"); 3937Debug.Assert(pObjTypeData->elementType == typeDataLocal.elementType, 3965Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 3990Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 4008Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 4025Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 4051Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 4068Debug.Assert(*pRetVal == retValLocal, $"cDAC: {*pRetVal:x}, DAC: {retValLocal:x}"); 4113Debug.Assert(pRetVal->lockOwner == pRetValLocal.lockOwner, 4115Debug.Assert(pRetVal->acquisitionCount == pRetValLocal.acquisitionCount, 4203Debug.Assert(*pResult == resultLocal, $"GetModuleMetaDataFileInfo result mismatch - cDAC: {*pResult}, DAC: {resultLocal}"); 4206Debug.Assert(*dwTimeStamp == timeStampLocal, $"GetModuleMetaDataFileInfo timestamp mismatch - cDAC: {*dwTimeStamp}, DAC: {timeStampLocal}"); 4207Debug.Assert(*dwImageSize == imageSizeLocal, $"GetModuleMetaDataFileInfo image size mismatch - cDAC: {*dwImageSize}, DAC: {imageSizeLocal}"); 4208Debug.Assert( 4347Debug.Assert(*fetched == fetchedLocal, 4351Debug.Assert(objects[k].address == objectsLocal[k].address, 4353Debug.Assert(objects[k].size == objectsLocal[k].size, 4355Debug.Assert(objects[k].type.token1 == objectsLocal[k].type.token1, 4444Debug.Assert(segments.Count == legacySegments.Count, 4450Debug.Assert(segments[i] == legacySegments[i], 4520Debug.Assert(*pResult == resultLocal, $"cDAC: {*pResult}, DAC: {resultLocal}"); 4642Debug.Assert( 4649Debug.Assert(refs[j].dwType == legacyRefs[j].dwType, 4651Debug.Assert(refs[j].vmDomain == legacyRefs[j].vmDomain, 4653Debug.Assert(refs[j].objHnd == legacyRefs[j].objHnd, 4655Debug.Assert(refs[j].i64ExtraData == legacyRefs[j].i64ExtraData, 4874Debug.Assert(*pceltFetched == fetchedLocal, $"cDAC: {*pceltFetched}, DAC: {fetchedLocal}"); 4878Debug.Assert(layout[i].token == localFieldsPtr[i].token, $"field[{i}].token cDAC: {layout[i].token:x}, DAC: {localFieldsPtr[i].token:x}"); 4879Debug.Assert(layout[i].offset == localFieldsPtr[i].offset, $"field[{i}].offset cDAC: {layout[i].offset}, DAC: {localFieldsPtr[i].offset}"); 4880Debug.Assert(layout[i].fieldType == localFieldsPtr[i].fieldType, $"field[{i}].fieldType cDAC: {layout[i].fieldType}, DAC: {localFieldsPtr[i].fieldType}"); 4881Debug.Assert(layout[i].id.token1 == localFieldsPtr[i].id.token1, $"field[{i}].id.token1 cDAC: {layout[i].id.token1:x}, DAC: {localFieldsPtr[i].id.token1:x}"); 4882Debug.Assert(layout[i].id.token2 == localFieldsPtr[i].id.token2, $"field[{i}].id.token2 cDAC: {layout[i].id.token2:x}, DAC: {localFieldsPtr[i].id.token2:x}"); 4936Debug.Assert(pLayout->parentID.token1 == resultLocal.parentID.token1, $"cDAC: {pLayout->parentID.token1:x}, DAC: {resultLocal.parentID.token1:x}"); 4937Debug.Assert(pLayout->parentID.token2 == resultLocal.parentID.token2, $"cDAC: {pLayout->parentID.token2:x}, DAC: {resultLocal.parentID.token2:x}"); 4938Debug.Assert(pLayout->objectSize == resultLocal.objectSize, $"cDAC: {pLayout->objectSize}, DAC: {resultLocal.objectSize}"); 4939Debug.Assert(pLayout->numFields == resultLocal.numFields, $"cDAC: {pLayout->numFields}, DAC: {resultLocal.numFields}"); 4940Debug.Assert(pLayout->boxOffset == resultLocal.boxOffset, $"cDAC: {pLayout->boxOffset}, DAC: {resultLocal.boxOffset}"); 4941Debug.Assert(pLayout->type == resultLocal.type, $"cDAC: {pLayout->type}, DAC: {resultLocal.type}"); 5009Debug.Assert(pLayout->componentID.token1 == resultLocal.componentID.token1, $"cDAC: {pLayout->componentID.token1:x}, DAC: {resultLocal.componentID.token1:x}"); 5010Debug.Assert(pLayout->componentID.token2 == resultLocal.componentID.token2, $"cDAC: {pLayout->componentID.token2:x}, DAC: {resultLocal.componentID.token2:x}"); 5011Debug.Assert(pLayout->componentType == resultLocal.componentType, $"cDAC: {pLayout->componentType}, DAC: {resultLocal.componentType}"); 5012Debug.Assert(pLayout->firstElementOffset == resultLocal.firstElementOffset, $"cDAC: {pLayout->firstElementOffset}, DAC: {resultLocal.firstElementOffset}"); 5013Debug.Assert(pLayout->elementSize == resultLocal.elementSize, $"cDAC: {pLayout->elementSize}, DAC: {resultLocal.elementSize}"); 5014Debug.Assert(pLayout->countOffset == resultLocal.countOffset, $"cDAC: {pLayout->countOffset}, DAC: {resultLocal.countOffset}"); 5015Debug.Assert(pLayout->rankSize == resultLocal.rankSize, $"cDAC: {pLayout->rankSize}, DAC: {resultLocal.rankSize}"); 5016Debug.Assert(pLayout->numRanks == resultLocal.numRanks, $"cDAC: {pLayout->numRanks}, DAC: {resultLocal.numRanks}"); 5017Debug.Assert(pLayout->rankOffset == resultLocal.rankOffset, $"cDAC: {pLayout->rankOffset}, DAC: {resultLocal.rankOffset}"); 5225Debug.Assert(*pVmILCodeVersionNode == resultLocal, $"cDAC: {*pVmILCodeVersionNode:x}, DAC: {resultLocal:x}"); 5263Debug.Assert(*pVmNativeCodeVersionNode == resultLocal, $"cDAC: {*pVmNativeCodeVersionNode:x}, DAC: {resultLocal:x}"); 5300Debug.Assert(*pVmILCodeVersionNode == resultLocal, $"cDAC: {*pVmILCodeVersionNode:x}, DAC: {resultLocal:x}"); 5346Debug.Assert(pData->pbIL == dataLocal.pbIL, $"cDAC: {pData->pbIL:x}, DAC: {dataLocal.pbIL:x}"); 5347Debug.Assert(pData->cInstrumentedMapEntries == dataLocal.cInstrumentedMapEntries, $"cDAC: {pData->cInstrumentedMapEntries:x}, DAC: {dataLocal.cInstrumentedMapEntries:x}"); 5348Debug.Assert(pData->rgInstrumentedMapEntries == dataLocal.rgInstrumentedMapEntries, $"cDAC: {pData->rgInstrumentedMapEntries:x}, DAC: {dataLocal.rgInstrumentedMapEntries:x}"); 5402Debug.Assert(*pResult == pResultLocal, $"cDAC: {*pResult}, DAC: {pResultLocal}"); 5460Debug.Assert(*ppFunctionAssembly == asmLocal, $"cDAC: {*ppFunctionAssembly:x}, DAC: {asmLocal:x}"); 5461Debug.Assert(*pMethodDef == methodDefLocal, $"cDAC: {*pMethodDef:x}, DAC: {methodDefLocal:x}"); 5497Debug.Assert(*ppTargetObj == targetObjLocal, $"cDAC: {*ppTargetObj:x}, DAC: {targetObjLocal:x}"); 5542Debug.Assert(*isModuleMapped == isModuleMappedLocal, $"cDAC: {*isModuleMapped}, DAC: {isModuleMappedLocal}"); 5604Debug.Assert(*pVmAssembly == assemblyLocal, $"cDAC: {*pVmAssembly:x}, DAC: {assemblyLocal:x}"); 5637Debug.Assert(*pDiagnosticIP == diagnosticIPLocal, $"cDAC: {*pDiagnosticIP:x}, DAC: {diagnosticIPLocal:x}"); 5638Debug.Assert(*pNextContinuation == nextLocal, $"cDAC: {*pNextContinuation:x}, DAC: {nextLocal:x}"); 5639Debug.Assert(*pState == stateLocal, $"cDAC: {*pState}, DAC: {stateLocal}"); 5730Debug.Assert(locals.Count == legacyLocals.Count, 5734Debug.Assert(locals[i].Offset == legacyLocals[i].Offset, 5736Debug.Assert(locals[i].IlVarNum == legacyLocals[i].IlVarNum, 5785Debug.Assert(*pIndex == indexLocal, $"cDAC: {*pIndex}, DAC: {indexLocal}");
Dbi\DacDbiImpl.NativeCodeInfo.cs (24)
155Debug.Assert(*pFixedArgCount == dacFixedArgCount, 169Debug.Assert(cdac.Count == dac.Count, 176Debug.Assert(c.nativeOffset == d.nativeOffset, 178Debug.Assert(c.ilOffset == d.ilOffset, 180Debug.Assert(c.source == d.source, 187Debug.Assert(cdac.Count == dac.Count, 194Debug.Assert(c.startOffset == d.startOffset, 196Debug.Assert(c.endOffset == d.endOffset, 198Debug.Assert(c.callReturnValueILOffset == d.callReturnValueILOffset, 200Debug.Assert(c.varNumber == d.varNumber, 202Debug.Assert(c.loc.vlType == d.loc.vlType, 210Debug.Assert(c.loc.vlrReg == d.loc.vlrReg, 216Debug.Assert(c.loc.vlsBaseReg == d.loc.vlsBaseReg, 218Debug.Assert(c.loc.vlsOffset == d.loc.vlsOffset, 222Debug.Assert(c.loc.vlrrReg1 == d.loc.vlrrReg1, 224Debug.Assert(c.loc.vlrrReg2 == d.loc.vlrrReg2, 228Debug.Assert(c.loc.vlrsReg == d.loc.vlrsReg, 230Debug.Assert(c.loc.vlrssBaseReg == d.loc.vlrssBaseReg, 232Debug.Assert(c.loc.vlrssOffset == d.loc.vlrssOffset, 236Debug.Assert(c.loc.vlsrsBaseReg == d.loc.vlsrsBaseReg, 238Debug.Assert(c.loc.vlsrsOffset == d.loc.vlsrsOffset, 240Debug.Assert(c.loc.vlsrReg == d.loc.vlsrReg, 244Debug.Assert(c.loc.vlfReg == d.loc.vlfReg, 248Debug.Assert(c.loc.vlfvOffset == d.loc.vlfvOffset,
MetaDataImportImpl.cs (89)
198Debug.Assert(tokens.Count == legacyTokens.Count, $"EnumTypeDefs count mismatch: cDAC={tokens.Count}, DAC={legacyTokens.Count}"); 200Debug.Assert(tokens[i] == legacyTokens[i], $"EnumTypeDefs token mismatch at [{i}]: cDAC=0x{tokens[i]:X}, DAC=0x{legacyTokens[i]:X}"); 246Debug.Assert(tokens.Count == legacyTokens.Count, $"EnumInterfaceImpls count mismatch for 0x{td:X}: cDAC={tokens.Count}, DAC={legacyTokens.Count}"); 248Debug.Assert(tokens[i] == legacyTokens[i], $"EnumInterfaceImpls token mismatch at [{i}] for 0x{td:X}: cDAC=0x{tokens[i]:X}, DAC=0x{legacyTokens[i]:X}"); 300Debug.Assert(tokens.Count == legacyTokens.Count, $"EnumMethods count mismatch for 0x{cl:X}: cDAC={tokens.Count}, DAC={legacyTokens.Count}"); 302Debug.Assert(tokens[i] == legacyTokens[i], $"EnumMethods token mismatch at [{i}] for 0x{cl:X}: cDAC=0x{tokens[i]:X}, DAC=0x{legacyTokens[i]:X}"); 348Debug.Assert(tokens.Count == legacyTokens.Count, $"EnumFields count mismatch for 0x{cl:X}: cDAC={tokens.Count}, DAC={legacyTokens.Count}"); 350Debug.Assert(tokens[i] == legacyTokens[i], $"EnumFields token mismatch at [{i}] for 0x{cl:X}: cDAC=0x{tokens[i]:X}, DAC=0x{legacyTokens[i]:X}"); 409Debug.Assert(tokens.Count == legacyTokens.Count, $"EnumGenericParams count mismatch for 0x{tk:X}: cDAC={tokens.Count}, DAC={legacyTokens.Count}"); 411Debug.Assert(tokens[i] == legacyTokens[i], $"EnumGenericParams token mismatch at [{i}] for 0x{tk:X}: cDAC=0x{tokens[i]:X}, DAC=0x{legacyTokens[i]:X}"); 454Debug.Assert(*pdwTypeDefFlags == flagsLocal, $"TypeDefFlags mismatch: cDAC=0x{*pdwTypeDefFlags:X}, DAC=0x{flagsLocal:X}"); 456Debug.Assert(*ptkExtends == extendsLocal, $"Extends mismatch: cDAC=0x{*ptkExtends:X}, DAC=0x{extendsLocal:X}"); 458Debug.Assert(*pchTypeDef == pchLocal, $"Name length mismatch: cDAC={*pchTypeDef}, DAC={pchLocal}"); 463Debug.Assert(cdacName == dacName, $"TypeDef name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 505Debug.Assert(*ptkResolutionScope == scopeLocal, $"ResolutionScope mismatch: cDAC=0x{*ptkResolutionScope:X}, DAC=0x{scopeLocal:X}"); 507Debug.Assert(*pchName == pchLocal, $"Name length mismatch: cDAC={*pchName}, DAC={pchLocal}"); 512Debug.Assert(cdacName == dacName, $"TypeRef name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 572Debug.Assert(*pClass == classLocal, $"Class mismatch: cDAC=0x{*pClass:X}, DAC=0x{classLocal:X}"); 574Debug.Assert(*pdwAttr == attrLocal, $"Attr mismatch: cDAC=0x{*pdwAttr:X}, DAC=0x{attrLocal:X}"); 576Debug.Assert(*pchMethod == pchLocal, $"Name length mismatch: cDAC={*pchMethod}, DAC={pchLocal}"); 581Debug.Assert(cdacName == dacName, $"Method name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 584Debug.Assert(*pulCodeRVA == rvaLocal, $"RVA mismatch: cDAC=0x{*pulCodeRVA:X}, DAC=0x{rvaLocal:X}"); 586Debug.Assert(*pdwImplFlags == implLocal, $"ImplFlags mismatch: cDAC=0x{*pdwImplFlags:X}, DAC=0x{implLocal:X}"); 590Debug.Assert(*pcbSigBlob == cbSigLocal, $"SigBlob length mismatch: cDAC={*pcbSigBlob}, DAC={cbSigLocal}"); 668Debug.Assert(*pClass == classLocal, $"Class mismatch: cDAC=0x{*pClass:X}, DAC=0x{classLocal:X}"); 670Debug.Assert(*pdwAttr == attrLocal, $"Attr mismatch: cDAC=0x{*pdwAttr:X}, DAC=0x{attrLocal:X}"); 672Debug.Assert(*pchField == pchLocal, $"Name length mismatch: cDAC={*pchField}, DAC={pchLocal}"); 677Debug.Assert(cdacName == dacName, $"Field name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 680Debug.Assert(*pdwCPlusTypeFlag == cpTypeLocal, $"CPlusTypeFlag mismatch: cDAC=0x{*pdwCPlusTypeFlag:X}, DAC=0x{cpTypeLocal:X}"); 684Debug.Assert(*pcbSigBlob == cbSigLocal, $"SigBlob length mismatch: cDAC={*pcbSigBlob}, DAC={cbSigLocal}"); 688Debug.Assert(*pcchValue == cchValueLocal, $"Constant length mismatch: cDAC={*pcchValue}, DAC={cchValueLocal}"); 759Debug.Assert(*pClass == classLocal, $"Class mismatch: cDAC=0x{*pClass:X}, DAC=0x{classLocal:X}"); 761Debug.Assert(*ptkIface == ifaceLocal, $"Interface mismatch: cDAC=0x{*ptkIface:X}, DAC=0x{ifaceLocal:X}"); 794Debug.Assert(*ptdEnclosingClass == enclosingLocal, $"Enclosing class mismatch: cDAC=0x{*ptdEnclosingClass:X}, DAC=0x{enclosingLocal:X}"); 841Debug.Assert(*pulParamSeq == seqLocal, $"ParamSeq mismatch: cDAC={*pulParamSeq}, DAC={seqLocal}"); 843Debug.Assert(*pdwParamFlags == flagsLocal, $"ParamFlags mismatch: cDAC=0x{*pdwParamFlags:X}, DAC=0x{flagsLocal:X}"); 845Debug.Assert(*ptOwner == ownerLocal, $"Owner mismatch: cDAC=0x{*ptOwner:X}, DAC=0x{ownerLocal:X}"); 847Debug.Assert(*pchName == pchLocal, $"Name length mismatch: cDAC={*pchName}, DAC={pchLocal}"); 852Debug.Assert(cdacName == dacName, $"GenericParam name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 903Debug.Assert(*pulCodeRVA == rvaLocal, $"RVA mismatch: cDAC=0x{*pulCodeRVA:X}, DAC=0x{rvaLocal:X}"); 905Debug.Assert(*pdwImplFlags == implLocal, $"ImplFlags mismatch: cDAC=0x{*pdwImplFlags:X}, DAC=0x{implLocal:X}"); 945Debug.Assert(*pcbSig == cbLocal, $"Sig length mismatch: cDAC={*pcbSig}, DAC={cbLocal}"); 1002Debug.Assert(*pcbData == cbLocal, $"CustomAttribute length mismatch: cDAC={*pcbData}, DAC={cbLocal}"); 1105Debug.Assert(*ptd == tdLocal, $"TypeDef mismatch: cDAC=0x{*ptd:X}, DAC=0x{tdLocal:X}"); 1195Debug.Assert(*ptk == tkLocal, $"Parent mismatch: cDAC=0x{*ptk:X}, DAC=0x{tkLocal:X}"); 1197Debug.Assert(*pchMember == pchLocal, $"Name length mismatch: cDAC={*pchMember}, DAC={pchLocal}"); 1202Debug.Assert(cdacName == dacName, $"MemberRef name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 1207Debug.Assert(*pbSig == cbSigLocal, $"SigBlob length mismatch: cDAC={*pbSig}, DAC={cbSigLocal}"); 1288Debug.Assert(*pdwPackSize == packLocal, $"PackSize mismatch: cDAC={*pdwPackSize}, DAC={packLocal}"); 1290Debug.Assert(*pulClassSize == sizeLocal, $"ClassSize mismatch: cDAC={*pulClassSize}, DAC={sizeLocal}"); 1292Debug.Assert(*pcFieldOffset == fieldCountLocal, $"FieldOffset count mismatch: cDAC={*pcFieldOffset}, DAC={fieldCountLocal}"); 1333Debug.Assert(*pchName == pchLocal, $"Name length mismatch: cDAC={*pchName}, DAC={pchLocal}"); 1338Debug.Assert(cdacName == dacName, $"ModuleRef name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 1382Debug.Assert(*pcbSig == cbLocal, $"Sig length mismatch: cDAC={*pcbSig}, DAC={cbLocal}"); 1456Debug.Assert(*pchString == pchLocal, $"String length mismatch: cDAC={*pchString}, DAC={pchLocal}"); 1464Debug.Assert(cdacStr == dacStr, $"UserString content mismatch: cDAC='{cdacStr}', DAC='{dacStr}'"); 1524Debug.Assert(*ppd == pdLocal, $"Param token mismatch: cDAC=0x{*ppd:X}, DAC=0x{pdLocal:X}"); 1606Debug.Assert(*pmd == mdLocal, $"Method mismatch: cDAC=0x{*pmd:X}, DAC=0x{mdLocal:X}"); 1608Debug.Assert(*pulSequence == seqLocal, $"Sequence mismatch: cDAC={*pulSequence}, DAC={seqLocal}"); 1610Debug.Assert(*pdwAttr == attrLocal, $"Attr mismatch: cDAC=0x{*pdwAttr:X}, DAC=0x{attrLocal:X}"); 1612Debug.Assert(*pchName == pchLocal, $"Name length mismatch: cDAC={*pchName}, DAC={pchLocal}"); 1617Debug.Assert(cdacName == dacName, $"Param name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 1732Debug.Assert(*pchName == pchLocal, $"Name length mismatch: cDAC={*pchName}, DAC={pchLocal}"); 1737Debug.Assert(cdacName == dacName, $"Assembly name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 1740Debug.Assert(*pulHashAlgId == hashAlgLocal, $"HashAlgId mismatch: cDAC=0x{*pulHashAlgId:X}, DAC=0x{hashAlgLocal:X}"); 1742Debug.Assert(*pdwAssemblyFlags == flagsLocal, $"Flags mismatch: cDAC=0x{*pdwAssemblyFlags:X}, DAC=0x{flagsLocal:X}"); 1746Debug.Assert(*pcbPublicKey == cbPublicKeyLocal, $"PublicKey length mismatch: cDAC={*pcbPublicKey}, DAC={cbPublicKeyLocal}"); 1749Debug.Assert(pMetaData->usMajorVersion == metaLocal.usMajorVersion, $"MajorVersion mismatch: cDAC={pMetaData->usMajorVersion}, DAC={metaLocal.usMajorVersion}"); 1750Debug.Assert(pMetaData->usMinorVersion == metaLocal.usMinorVersion, $"MinorVersion mismatch: cDAC={pMetaData->usMinorVersion}, DAC={metaLocal.usMinorVersion}"); 1751Debug.Assert(pMetaData->usBuildNumber == metaLocal.usBuildNumber, $"BuildNumber mismatch: cDAC={pMetaData->usBuildNumber}, DAC={metaLocal.usBuildNumber}"); 1752Debug.Assert(pMetaData->usRevisionNumber == metaLocal.usRevisionNumber, $"RevisionNumber mismatch: cDAC={pMetaData->usRevisionNumber}, DAC={metaLocal.usRevisionNumber}"); 1843Debug.Assert(*pchName == pchLocal, $"Name length mismatch: cDAC={*pchName}, DAC={pchLocal}"); 1848Debug.Assert(cdacName == dacName, $"AssemblyRef name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 1851Debug.Assert(*pdwAssemblyRefFlags == flagsLocal, $"Flags mismatch: cDAC=0x{*pdwAssemblyRefFlags:X}, DAC=0x{flagsLocal:X}"); 1855Debug.Assert(*pcbPublicKeyOrToken == cbPublicKeyLocal, $"PublicKey length mismatch: cDAC={*pcbPublicKeyOrToken}, DAC={cbPublicKeyLocal}"); 1859Debug.Assert(*pcbHashValue == cbHashLocal, $"Hash length mismatch: cDAC={*pcbHashValue}, DAC={cbHashLocal}"); 1862Debug.Assert(pMetaData->usMajorVersion == metaLocal.usMajorVersion, $"MajorVersion mismatch: cDAC={pMetaData->usMajorVersion}, DAC={metaLocal.usMajorVersion}"); 1863Debug.Assert(pMetaData->usMinorVersion == metaLocal.usMinorVersion, $"MinorVersion mismatch: cDAC={pMetaData->usMinorVersion}, DAC={metaLocal.usMinorVersion}"); 1864Debug.Assert(pMetaData->usBuildNumber == metaLocal.usBuildNumber, $"BuildNumber mismatch: cDAC={pMetaData->usBuildNumber}, DAC={metaLocal.usBuildNumber}"); 1865Debug.Assert(pMetaData->usRevisionNumber == metaLocal.usRevisionNumber, $"RevisionNumber mismatch: cDAC={pMetaData->usRevisionNumber}, DAC={metaLocal.usRevisionNumber}"); 1927Debug.Assert(cdacName == dacName, $"ExportedType name mismatch: cDAC='{cdacName}', DAC='{dacName}'"); 1930Debug.Assert(*pchName == pchNameLocal, $"ExportedType name length mismatch: cDAC={*pchName}, DAC={pchNameLocal}"); 1932Debug.Assert(*ptkImplementation == tkImplementationLocal, $"ExportedType implementation mismatch: cDAC=0x{*ptkImplementation:X}, DAC=0x{tkImplementationLocal:X}"); 1934Debug.Assert(*ptkTypeDef == tkTypeDefLocal, $"ExportedType typeDef mismatch: cDAC=0x{*ptkTypeDef:X}, DAC=0x{tkTypeDefLocal:X}"); 1936Debug.Assert(*pdwExportedTypeFlags == dwExportedTypeFlagsLocal, $"ExportedType flags mismatch: cDAC=0x{*pdwExportedTypeFlags:X}, DAC=0x{dwExportedTypeFlagsLocal:X}"); 1972Debug.Assert(*ptkAssembly == tkLocal, $"Assembly token mismatch: cDAC=0x{*ptkAssembly:X}, DAC=0x{tkLocal:X}"); 2028Debug.Assert(*ptkExportedType == tkExportedTypeLocal, $"ExportedType mismatch: cDAC=0x{*ptkExportedType:X}, DAC=0x{tkExportedTypeLocal:X}"); 2071Debug.Assert(cdacLen == dacLen, $"{name} length mismatch: cDAC={cdacLen}, DAC={dacLen}"); 2076Debug.Assert(cdacSpan.SequenceEqual(dacSpan), $"{name} content mismatch (length={cdacLen})");
SOSDacImpl.cs (279)
213Debug.Assert(values[0] == valuesLocal[0], $"cDAC: {values[0]:x}, DAC: {valuesLocal[0]:x}"); 311Debug.Assert(appDomainStoreData->sharedDomain == dataLocal.sharedDomain, $"cDAC: {appDomainStoreData->sharedDomain:x}, DAC: {dataLocal.sharedDomain:x}"); 312Debug.Assert(appDomainStoreData->systemDomain == dataLocal.systemDomain, $"cDAC: {appDomainStoreData->systemDomain:x}, DAC: {dataLocal.systemDomain:x}"); 313Debug.Assert(appDomainStoreData->DomainCount == dataLocal.DomainCount, $"cDAC: {appDomainStoreData->DomainCount}, DAC: {dataLocal.DomainCount}"); 375Debug.Assert(data->AssemblyPtr == dataLocal.AssemblyPtr, $"cDAC: {data->AssemblyPtr:x}, DAC: {dataLocal.AssemblyPtr:x}"); 376Debug.Assert(data->ClassLoader == dataLocal.ClassLoader, $"cDAC: {data->ClassLoader:x}, DAC: {dataLocal.ClassLoader:x}"); 377Debug.Assert(data->ParentDomain == dataLocal.ParentDomain, $"cDAC: {data->ParentDomain:x}, DAC: {dataLocal.ParentDomain:x}"); 378Debug.Assert(data->DomainPtr == dataLocal.DomainPtr, $"cDAC: {data->DomainPtr:x}, DAC: {dataLocal.DomainPtr:x}"); 379Debug.Assert(data->AssemblySecDesc == dataLocal.AssemblySecDesc, $"cDAC: {data->AssemblySecDesc:x}, DAC: {dataLocal.AssemblySecDesc:x}"); 380Debug.Assert(data->isDynamic == dataLocal.isDynamic, $"cDAC: {data->isDynamic}, DAC: {dataLocal.isDynamic}"); 381Debug.Assert(data->ModuleCount == dataLocal.ModuleCount, $"cDAC: {data->ModuleCount}, DAC: {dataLocal.ModuleCount}"); 382Debug.Assert(data->LoadContext == dataLocal.LoadContext, $"cDAC: {data->LoadContext:x}, DAC: {dataLocal.LoadContext:x}"); 383Debug.Assert(data->isDomainNeutral == dataLocal.isDomainNeutral, $"cDAC: {data->isDomainNeutral}, DAC: {dataLocal.isDomainNeutral}"); 384Debug.Assert(data->dwLocationFlags == dataLocal.dwLocationFlags, $"cDAC: {data->dwLocationFlags:x}, DAC: {dataLocal.dwLocationFlags:x}"); 460Debug.Assert(values[i] == valuesLocal![i], $"cDAC: {values[i]:x}, DAC: {valuesLocal[i]:x}"); 509Debug.Assert(modules[0] == modulesLocal[0], $"cDAC: {modules[0]:x}, DAC: {modulesLocal[0]:x}"); 616Debug.Assert(data->outerIUnknown == dataLocal.outerIUnknown, $"cDAC outerIUnknown: {data->outerIUnknown:x}, DAC: {dataLocal.outerIUnknown:x}"); 617Debug.Assert(data->managedObject == dataLocal.managedObject, $"cDAC managedObject: {data->managedObject:x}, DAC: {dataLocal.managedObject:x}"); 618Debug.Assert(data->handle == dataLocal.handle, $"cDAC handle: {data->handle:x}, DAC: {dataLocal.handle:x}"); 619Debug.Assert(data->ccwAddress == dataLocal.ccwAddress, $"cDAC ccwAddress: {data->ccwAddress:x}, DAC: {dataLocal.ccwAddress:x}"); 620Debug.Assert(data->refCount == dataLocal.refCount, $"cDAC refCount: {data->refCount}, DAC: {dataLocal.refCount}"); 621Debug.Assert(data->interfaceCount == dataLocal.interfaceCount, $"cDAC interfaceCount: {data->interfaceCount}, DAC: {dataLocal.interfaceCount}"); 622Debug.Assert(data->isNeutered == dataLocal.isNeutered, $"cDAC isNeutered: {data->isNeutered}, DAC: {dataLocal.isNeutered}"); 623Debug.Assert(data->jupiterRefCount == dataLocal.jupiterRefCount, $"cDAC jupiterRefCount: {data->jupiterRefCount}, DAC: {dataLocal.jupiterRefCount}"); 624Debug.Assert(data->isPegged == dataLocal.isPegged, $"cDAC isPegged: {data->isPegged}, DAC: {dataLocal.isPegged}"); 625Debug.Assert(data->isGlobalPegged == dataLocal.isGlobalPegged, $"cDAC isGlobalPegged: {data->isGlobalPegged}, DAC: {dataLocal.isGlobalPegged}"); 626Debug.Assert(data->hasStrongRef == dataLocal.hasStrongRef, $"cDAC hasStrongRef: {data->hasStrongRef}, DAC: {dataLocal.hasStrongRef}"); 627Debug.Assert(data->isExtendsCOMObject == dataLocal.isExtendsCOMObject, $"cDAC isExtendsCOMObject: {data->isExtendsCOMObject}, DAC: {dataLocal.isExtendsCOMObject}"); 628Debug.Assert(data->isAggregated == dataLocal.isAggregated, $"cDAC isAggregated: {data->isAggregated}, DAC: {dataLocal.isAggregated}"); 702Debug.Assert(pNeeded is null || *pNeeded == pNeededLocal, $"cDAC count: {(pNeeded is null ? "null" : (*pNeeded).ToString())}, DAC count: {pNeededLocal}"); 707Debug.Assert(interfaces[i].methodTable == interfacesLocal![i].methodTable, $"cDAC methodTable[{i}]: {interfaces[i].methodTable:x}, DAC: {interfacesLocal[i].methodTable:x}"); 708Debug.Assert(interfaces[i].interfacePtr == interfacesLocal![i].interfacePtr, $"cDAC interfacePtr[{i}]: {interfaces[i].interfacePtr:x}, DAC: {interfacesLocal[i].interfacePtr:x}"); 709Debug.Assert(interfaces[i].comContext == interfacesLocal![i].comContext, $"cDAC comContext[{i}]: {interfaces[i].comContext:x}, DAC: {interfacesLocal[i].comContext:x}"); 835Debug.Assert(data->MethodDescPtr == dataLocal.MethodDescPtr, $"cDAC: {data->MethodDescPtr:x}, DAC: {dataLocal.MethodDescPtr:x}"); 836Debug.Assert(data->JITType == dataLocal.JITType, $"cDAC: {data->JITType}, DAC: {dataLocal.JITType}"); 837Debug.Assert(data->GCInfo == dataLocal.GCInfo, $"cDAC: {data->GCInfo:x}, DAC: {dataLocal.GCInfo:x}"); 838Debug.Assert(data->MethodStart == dataLocal.MethodStart, $"cDAC: {data->MethodStart:x}, DAC: {dataLocal.MethodStart:x}"); 839Debug.Assert(data->MethodSize == dataLocal.MethodSize, $"cDAC: {data->MethodSize}, DAC: {dataLocal.MethodSize}"); 840Debug.Assert(data->HotRegionSize == dataLocal.HotRegionSize, $"cDAC: {data->HotRegionSize}, DAC: {dataLocal.HotRegionSize}"); 841Debug.Assert(data->ColdRegionStart == dataLocal.ColdRegionStart, $"cDAC: {data->ColdRegionStart:x}, DAC: {dataLocal.ColdRegionStart:x}"); 842Debug.Assert(data->ColdRegionSize == dataLocal.ColdRegionSize, $"cDAC: {data->ColdRegionSize}, DAC: {dataLocal.ColdRegionSize}"); 906Debug.Assert(*pNeeded == neededLocal, $"cDAC count: {(*pNeeded):x}, DAC count: {neededLocal:x}"); 912Debug.Assert(codeHeaps[i].codeHeapType == legacyHeaps![i].codeHeapType, 915Debug.Assert(codeHeaps[i].LoaderHeap == legacyHeaps[i].LoaderHeap, 919Debug.Assert(codeHeaps[i].baseAddr == legacyHeaps[i].baseAddr, 921Debug.Assert(codeHeaps[i].currentAddr == legacyHeaps[i].currentAddr, 954Debug.Assert(domainLocal == context, $"cDAC: {context:x}, DAC: {domainLocal:x}"); 1159Debug.Assert(data->Type == dataLocal.Type, $"cDAC: {data->Type}, DAC: {dataLocal.Type}"); 1160Debug.Assert(data->sigType == dataLocal.sigType, $"cDAC: {data->sigType}, DAC: {dataLocal.sigType}"); 1161Debug.Assert(data->TokenOfType == dataLocal.TokenOfType, $"cDAC: {data->TokenOfType:x}, DAC: {dataLocal.TokenOfType:x}"); 1162Debug.Assert(data->MTOfType == dataLocal.MTOfType, $"cDAC: {data->MTOfType:x}, DAC: {dataLocal.MTOfType:x}"); 1163Debug.Assert(data->ModuleOfType == dataLocal.ModuleOfType, $"cDAC: {data->ModuleOfType:x}, DAC: {dataLocal.ModuleOfType:x}"); 1164Debug.Assert(data->mb == dataLocal.mb, $"cDAC: {data->mb:x}, DAC: {dataLocal.mb:x}"); 1165Debug.Assert(data->MTOfEnclosingClass == dataLocal.MTOfEnclosingClass, $"cDAC: {data->MTOfEnclosingClass:x}, DAC: {dataLocal.MTOfEnclosingClass:x}"); 1166Debug.Assert(data->dwOffset == dataLocal.dwOffset, $"cDAC: {data->dwOffset:x}, DAC: {dataLocal.dwOffset:x}"); 1167Debug.Assert(data->bIsThreadLocal == dataLocal.bIsThreadLocal, $"cDAC: {data->bIsThreadLocal}, DAC: {dataLocal.bIsThreadLocal}"); 1168Debug.Assert(data->bIsContextLocal == dataLocal.bIsContextLocal, $"cDAC: {data->bIsContextLocal}, DAC: {dataLocal.bIsContextLocal}"); 1169Debug.Assert(data->bIsStatic == dataLocal.bIsStatic, $"cDAC: {data->bIsStatic}, DAC: {dataLocal.bIsStatic}"); 1173Debug.Assert(data->NextField == dataLocal.NextField || data->NextField == 0, $"cDAC: {data->NextField:x}, DAC: {dataLocal.NextField:x}"); 1221Debug.Assert(frameName == null || new ReadOnlySpan<char>(nameLocal, 0, (int)neededLocal).SequenceEqual(new string(frameName)), 1265Debug.Assert(data->bServerMode == dataLocal.bServerMode, $"cDAC: {data->bServerMode}, DAC: {dataLocal.bServerMode}"); 1266Debug.Assert(data->bGcStructuresValid == dataLocal.bGcStructuresValid, $"cDAC: {data->bGcStructuresValid}, DAC: {dataLocal.bGcStructuresValid}"); 1267Debug.Assert(data->HeapCount == dataLocal.HeapCount, $"cDAC: {data->HeapCount}, DAC: {dataLocal.HeapCount}"); 1268Debug.Assert(data->g_max_generation == dataLocal.g_max_generation, $"cDAC: {data->g_max_generation}, DAC: {dataLocal.g_max_generation}"); 1330Debug.Assert(heaps[i] == heapsLocal[i], $"cDAC: {heaps[i]:x}, DAC: {heapsLocal[i]:x}"); 1433Debug.Assert(details->heapAddr == detailsLocal.heapAddr, $"cDAC: {details->heapAddr:x}, DAC: {detailsLocal.heapAddr:x}"); 1434Debug.Assert(details->alloc_allocated == detailsLocal.alloc_allocated, $"cDAC: {details->alloc_allocated:x}, DAC: {detailsLocal.alloc_allocated:x}"); 1435Debug.Assert(details->mark_array == detailsLocal.mark_array, $"cDAC: {details->mark_array:x}, DAC: {detailsLocal.mark_array:x}"); 1436Debug.Assert(details->current_c_gc_state == detailsLocal.current_c_gc_state, $"cDAC: {details->current_c_gc_state:x}, DAC: {detailsLocal.current_c_gc_state:x}"); 1437Debug.Assert(details->next_sweep_obj == detailsLocal.next_sweep_obj, $"cDAC: {details->next_sweep_obj:x}, DAC: {detailsLocal.next_sweep_obj:x}"); 1438Debug.Assert(details->saved_sweep_ephemeral_seg == detailsLocal.saved_sweep_ephemeral_seg, $"cDAC: {details->saved_sweep_ephemeral_seg:x}, DAC: {detailsLocal.saved_sweep_ephemeral_seg:x}"); 1439Debug.Assert(details->saved_sweep_ephemeral_start == detailsLocal.saved_sweep_ephemeral_start, $"cDAC: {details->saved_sweep_ephemeral_start:x}, DAC: {detailsLocal.saved_sweep_ephemeral_start:x}"); 1440Debug.Assert(details->background_saved_lowest_address == detailsLocal.background_saved_lowest_address, $"cDAC: {details->background_saved_lowest_address:x}, DAC: {detailsLocal.background_saved_lowest_address:x}"); 1441Debug.Assert(details->background_saved_highest_address == detailsLocal.background_saved_highest_address, $"cDAC: {details->background_saved_highest_address:x}, DAC: {detailsLocal.background_saved_highest_address:x}"); 1446Debug.Assert(details->generation_table[i].start_segment == detailsLocal.generation_table[i].start_segment, $"cDAC gen[{i}].start_segment: {details->generation_table[i].start_segment:x}, DAC: {detailsLocal.generation_table[i].start_segment:x}"); 1447Debug.Assert(details->generation_table[i].allocation_start == detailsLocal.generation_table[i].allocation_start, $"cDAC gen[{i}].allocation_start: {details->generation_table[i].allocation_start:x}, DAC: {detailsLocal.generation_table[i].allocation_start:x}"); 1448Debug.Assert(details->generation_table[i].allocContextPtr == detailsLocal.generation_table[i].allocContextPtr, $"cDAC gen[{i}].allocContextPtr: {details->generation_table[i].allocContextPtr:x}, DAC: {detailsLocal.generation_table[i].allocContextPtr:x}"); 1449Debug.Assert(details->generation_table[i].allocContextLimit == detailsLocal.generation_table[i].allocContextLimit, $"cDAC gen[{i}].allocContextLimit: {details->generation_table[i].allocContextLimit:x}, DAC: {detailsLocal.generation_table[i].allocContextLimit:x}"); 1452Debug.Assert(details->ephemeral_heap_segment == detailsLocal.ephemeral_heap_segment, $"cDAC: {details->ephemeral_heap_segment:x}, DAC: {detailsLocal.ephemeral_heap_segment:x}"); 1457Debug.Assert(details->finalization_fill_pointers[i] == detailsLocal.finalization_fill_pointers[i], $"cDAC finalization_fill_pointers[{i}]: {details->finalization_fill_pointers[i]:x}, DAC: {detailsLocal.finalization_fill_pointers[i]:x}"); 1460Debug.Assert(details->lowest_address == detailsLocal.lowest_address, $"cDAC: {details->lowest_address:x}, DAC: {detailsLocal.lowest_address:x}"); 1461Debug.Assert(details->highest_address == detailsLocal.highest_address, $"cDAC: {details->highest_address:x}, DAC: {detailsLocal.highest_address:x}"); 1462Debug.Assert(details->card_table == detailsLocal.card_table, $"cDAC: {details->card_table:x}, DAC: {detailsLocal.card_table:x}"); 1566Debug.Assert(details->heapAddr == detailsLocal.heapAddr, $"cDAC: {details->heapAddr:x}, DAC: {detailsLocal.heapAddr:x}"); 1567Debug.Assert(details->alloc_allocated == detailsLocal.alloc_allocated, $"cDAC: {details->alloc_allocated:x}, DAC: {detailsLocal.alloc_allocated:x}"); 1568Debug.Assert(details->mark_array == detailsLocal.mark_array, $"cDAC: {details->mark_array:x}, DAC: {detailsLocal.mark_array:x}"); 1569Debug.Assert(details->current_c_gc_state == detailsLocal.current_c_gc_state, $"cDAC: {details->current_c_gc_state:x}, DAC: {detailsLocal.current_c_gc_state:x}"); 1570Debug.Assert(details->next_sweep_obj == detailsLocal.next_sweep_obj, $"cDAC: {details->next_sweep_obj:x}, DAC: {detailsLocal.next_sweep_obj:x}"); 1571Debug.Assert(details->saved_sweep_ephemeral_seg == detailsLocal.saved_sweep_ephemeral_seg, $"cDAC: {details->saved_sweep_ephemeral_seg:x}, DAC: {detailsLocal.saved_sweep_ephemeral_seg:x}"); 1572Debug.Assert(details->saved_sweep_ephemeral_start == detailsLocal.saved_sweep_ephemeral_start, $"cDAC: {details->saved_sweep_ephemeral_start:x}, DAC: {detailsLocal.saved_sweep_ephemeral_start:x}"); 1573Debug.Assert(details->background_saved_lowest_address == detailsLocal.background_saved_lowest_address, $"cDAC: {details->background_saved_lowest_address:x}, DAC: {detailsLocal.background_saved_lowest_address:x}"); 1574Debug.Assert(details->background_saved_highest_address == detailsLocal.background_saved_highest_address, $"cDAC: {details->background_saved_highest_address:x}, DAC: {detailsLocal.background_saved_highest_address:x}"); 1579Debug.Assert(details->generation_table[i].start_segment == detailsLocal.generation_table[i].start_segment, $"cDAC gen[{i}].start_segment: {details->generation_table[i].start_segment:x}, DAC: {detailsLocal.generation_table[i].start_segment:x}"); 1580Debug.Assert(details->generation_table[i].allocation_start == detailsLocal.generation_table[i].allocation_start, $"cDAC gen[{i}].allocation_start: {details->generation_table[i].allocation_start:x}, DAC: {detailsLocal.generation_table[i].allocation_start:x}"); 1581Debug.Assert(details->generation_table[i].allocContextPtr == detailsLocal.generation_table[i].allocContextPtr, $"cDAC gen[{i}].allocContextPtr: {details->generation_table[i].allocContextPtr:x}, DAC: {detailsLocal.generation_table[i].allocContextPtr:x}"); 1582Debug.Assert(details->generation_table[i].allocContextLimit == detailsLocal.generation_table[i].allocContextLimit, $"cDAC gen[{i}].allocContextLimit: {details->generation_table[i].allocContextLimit:x}, DAC: {detailsLocal.generation_table[i].allocContextLimit:x}"); 1585Debug.Assert(details->ephemeral_heap_segment == detailsLocal.ephemeral_heap_segment, $"cDAC: {details->ephemeral_heap_segment:x}, DAC: {detailsLocal.ephemeral_heap_segment:x}"); 1590Debug.Assert(details->finalization_fill_pointers[i] == detailsLocal.finalization_fill_pointers[i], $"cDAC finalization_fill_pointers[{i}]: {details->finalization_fill_pointers[i]:x}, DAC: {detailsLocal.finalization_fill_pointers[i]:x}"); 1593Debug.Assert(details->lowest_address == detailsLocal.lowest_address, $"cDAC: {details->lowest_address:x}, DAC: {detailsLocal.lowest_address:x}"); 1594Debug.Assert(details->highest_address == detailsLocal.highest_address, $"cDAC: {details->highest_address:x}, DAC: {detailsLocal.highest_address:x}"); 1595Debug.Assert(details->card_table == detailsLocal.card_table, $"cDAC: {details->card_table:x}, DAC: {detailsLocal.card_table:x}"); 1674Debug.Assert(*pNeeded == neededLocal, $"cDAC: {*pNeeded}, DAC: {neededLocal}"); 1677Debug.Assert(handles[i].AppDomain == handlesLocal[i].AppDomain, $"cDAC: {handles[i].AppDomain:x}, DAC: {handlesLocal[i].AppDomain:x}"); 1678Debug.Assert(handles[i].Handle == handlesLocal[i].Handle, $"cDAC: {handles[i].Handle:x}, DAC: {handlesLocal[i].Handle:x}"); 1679Debug.Assert(handles[i].Secondary == handlesLocal[i].Secondary, $"cDAC: {handles[i].Secondary:x}, DAC: {handlesLocal[i].Secondary:x}"); 1680Debug.Assert(handles[i].Type == handlesLocal[i].Type, $"cDAC: {handles[i].Type}, DAC: {handlesLocal[i].Type}"); 1681Debug.Assert(handles[i].StrongReference == handlesLocal[i].StrongReference, $"cDAC: {handles[i].StrongReference}, DAC: {handlesLocal[i].StrongReference}"); 1682Debug.Assert(handles[i].RefCount == handlesLocal[i].RefCount, $"cDAC: {handles[i].RefCount}, DAC: {handlesLocal[i].RefCount}"); 1683Debug.Assert(handles[i].JupiterRefCount == handlesLocal[i].JupiterRefCount, $"cDAC: {handles[i].JupiterRefCount}, DAC: {handlesLocal[i].JupiterRefCount}"); 1684Debug.Assert(handles[i].IsPegged == handlesLocal[i].IsPegged, $"cDAC: {handles[i].IsPegged}, DAC: {handlesLocal[i].IsPegged}"); 1781Debug.Assert(*pNeeded == neededLocal, $"cDAC: {*pNeeded}, DAC: {neededLocal}"); 1784Debug.Assert(memRegions[i].Start == regionsLocal[i].Start, $"cDAC: {memRegions[i].Start:x}, DAC: {regionsLocal[i].Start:x}"); 1785Debug.Assert(memRegions[i].Size == regionsLocal[i].Size, $"cDAC: {memRegions[i].Size:x}, DAC: {regionsLocal[i].Size:x}"); 1786Debug.Assert(memRegions[i].ExtraData == regionsLocal[i].ExtraData, $"cDAC: {memRegions[i].ExtraData:x}, DAC: {regionsLocal[i].ExtraData:x}"); 1787Debug.Assert(memRegions[i].Heap == regionsLocal[i].Heap, $"cDAC: {memRegions[i].Heap}, DAC: {regionsLocal[i].Heap}"); 1919Debug.Assert(data->heapAddr == dataLocal.heapAddr, $"cDAC: {data->heapAddr:x}, DAC: {dataLocal.heapAddr:x}"); 1920Debug.Assert(data->internal_root_array == dataLocal.internal_root_array, $"cDAC: {data->internal_root_array:x}, DAC: {dataLocal.internal_root_array:x}"); 1921Debug.Assert(data->internal_root_array_index == dataLocal.internal_root_array_index, $"cDAC: {data->internal_root_array_index}, DAC: {dataLocal.internal_root_array_index}"); 1922Debug.Assert(data->heap_analyze_success == dataLocal.heap_analyze_success, $"cDAC: {data->heap_analyze_success}, DAC: {dataLocal.heap_analyze_success}"); 1965Debug.Assert(data->heapAddr == dataLocal.heapAddr, $"cDAC: {data->heapAddr:x}, DAC: {dataLocal.heapAddr:x}"); 1966Debug.Assert(data->internal_root_array == dataLocal.internal_root_array, $"cDAC: {data->internal_root_array:x}, DAC: {dataLocal.internal_root_array:x}"); 1967Debug.Assert(data->internal_root_array_index == dataLocal.internal_root_array_index, $"cDAC: {data->internal_root_array_index}, DAC: {dataLocal.internal_root_array_index}"); 1968Debug.Assert(data->heap_analyze_success == dataLocal.heap_analyze_success, $"cDAC: {data->heap_analyze_success}, DAC: {dataLocal.heap_analyze_success}"); 2026Debug.Assert(data->segmentAddr == dataLocal.segmentAddr, $"segmentAddr - cDAC: {data->segmentAddr:x}, DAC: {dataLocal.segmentAddr:x}"); 2027Debug.Assert(data->allocated == dataLocal.allocated, $"allocated - cDAC: {data->allocated:x}, DAC: {dataLocal.allocated:x}"); 2028Debug.Assert(data->committed == dataLocal.committed, $"committed - cDAC: {data->committed:x}, DAC: {dataLocal.committed:x}"); 2029Debug.Assert(data->reserved == dataLocal.reserved, $"reserved - cDAC: {data->reserved:x}, DAC: {dataLocal.reserved:x}"); 2030Debug.Assert(data->used == dataLocal.used, $"used - cDAC: {data->used:x}, DAC: {dataLocal.used:x}"); 2031Debug.Assert(data->mem == dataLocal.mem, $"mem - cDAC: {data->mem:x}, DAC: {dataLocal.mem:x}"); 2032Debug.Assert(data->next == dataLocal.next, $"next - cDAC: {data->next:x}, DAC: {dataLocal.next:x}"); 2033Debug.Assert(data->gc_heap == dataLocal.gc_heap, $"gc_heap - cDAC: {data->gc_heap:x}, DAC: {dataLocal.gc_heap:x}"); 2034Debug.Assert(data->highAllocMark == dataLocal.highAllocMark, $"highAllocMark - cDAC: {data->highAllocMark:x}, DAC: {dataLocal.highAllocMark:x}"); 2035Debug.Assert(data->flags == dataLocal.flags, $"flags - cDAC: {data->flags:x}, DAC: {dataLocal.flags:x}"); 2036Debug.Assert(data->background_allocated == dataLocal.background_allocated, $"background_allocated - cDAC: {data->background_allocated:x}, DAC: {dataLocal.background_allocated:x}"); 2085Debug.Assert(*il == ilLocal, $"cDAC: {*il:x}, DAC: {ilLocal:x}"); 2241Debug.Assert(*targetIP == targetIPLocal, $"cDAC: {*targetIP:x}, DAC: {targetIPLocal:x}"); 2242Debug.Assert(*targetMD == targetMDLocal, $"cDAC: {*targetMD:x}, DAC: {targetMDLocal:x}"); 2459Debug.Assert(data->bHasNativeCode == dataLocal.bHasNativeCode, $"cDAC: {data->bHasNativeCode}, DAC: {dataLocal.bHasNativeCode}"); 2460Debug.Assert(data->bIsDynamic == dataLocal.bIsDynamic, $"cDAC: {data->bIsDynamic}, DAC: {dataLocal.bIsDynamic}"); 2461Debug.Assert(data->wSlotNumber == dataLocal.wSlotNumber, $"cDAC: {data->wSlotNumber}, DAC: {dataLocal.wSlotNumber}"); 2462Debug.Assert(data->NativeCodeAddr == dataLocal.NativeCodeAddr, $"cDAC: {data->NativeCodeAddr:x}, DAC: {dataLocal.NativeCodeAddr:x}"); 2463Debug.Assert(data->AddressOfNativeCodeSlot == dataLocal.AddressOfNativeCodeSlot, $"cDAC: {data->AddressOfNativeCodeSlot:x}, DAC: {dataLocal.AddressOfNativeCodeSlot:x}"); 2464Debug.Assert(data->MethodDescPtr == dataLocal.MethodDescPtr, $"cDAC: {data->MethodDescPtr:x}, DAC: {dataLocal.MethodDescPtr:x}"); 2465Debug.Assert(data->MethodTablePtr == dataLocal.MethodTablePtr, $"cDAC: {data->MethodTablePtr:x}, DAC: {dataLocal.MethodTablePtr:x}"); 2466Debug.Assert(data->ModulePtr == dataLocal.ModulePtr, $"cDAC: {data->ModulePtr:x}, DAC: {dataLocal.ModulePtr:x}"); 2467Debug.Assert(data->MDToken == dataLocal.MDToken, $"cDAC: {data->MDToken:x}, DAC: {dataLocal.MDToken:x}"); 2468Debug.Assert(data->GCInfo == dataLocal.GCInfo, $"cDAC: {data->GCInfo:x}, DAC: {dataLocal.GCInfo:x}"); 2469Debug.Assert(data->GCStressCodeCopy == dataLocal.GCStressCodeCopy, $"cDAC: {data->GCStressCodeCopy:x}, DAC: {dataLocal.GCStressCodeCopy:x}"); 2472Debug.Assert(data->requestedIP == dataLocal.requestedIP, $"cDAC: {data->requestedIP:x}, DAC: {dataLocal.requestedIP:x}"); 2473Debug.Assert(data->cJittedRejitVersions == dataLocal.cJittedRejitVersions, $"cDAC: {data->cJittedRejitVersions}, DAC: {dataLocal.cJittedRejitVersions}"); 2476Debug.Assert(data->rejitDataCurrent.rejitID == dataLocal.rejitDataCurrent.rejitID, $"cDAC: {data->rejitDataCurrent.rejitID}, DAC: {dataLocal.rejitDataCurrent.rejitID}"); 2477Debug.Assert(data->rejitDataCurrent.NativeCodeAddr == dataLocal.rejitDataCurrent.NativeCodeAddr, $"cDAC: {data->rejitDataCurrent.NativeCodeAddr:x}, DAC: {dataLocal.rejitDataCurrent.NativeCodeAddr:x}"); 2478Debug.Assert(data->rejitDataCurrent.flags == dataLocal.rejitDataCurrent.flags, $"cDAC: {data->rejitDataCurrent.flags}, DAC: {dataLocal.rejitDataCurrent.flags}"); 2481Debug.Assert(data->rejitDataRequested.rejitID == dataLocal.rejitDataRequested.rejitID, $"cDAC: {data->rejitDataRequested.rejitID}, DAC: {dataLocal.rejitDataRequested.rejitID}"); 2482Debug.Assert(data->rejitDataRequested.NativeCodeAddr == dataLocal.rejitDataRequested.NativeCodeAddr, $"cDAC: {data->rejitDataRequested.NativeCodeAddr:x}, DAC: {dataLocal.rejitDataRequested.NativeCodeAddr:x}"); 2483Debug.Assert(data->rejitDataRequested.flags == dataLocal.rejitDataRequested.flags, $"cDAC: {data->rejitDataRequested.flags}, DAC: {dataLocal.rejitDataRequested.flags}"); 2488Debug.Assert(cNeededRevertedRejitDataLocal == *pcNeededRevertedRejitData, $"cDAC: {*pcNeededRevertedRejitData}, DAC: {cNeededRevertedRejitDataLocal}"); 2491Debug.Assert(rgRevertedRejitData[i].rejitID == rgRevertedRejitDataLocal[i].rejitID, $"cDAC: {rgRevertedRejitData[i].rejitID}, DAC: {rgRevertedRejitDataLocal[i].rejitID}"); 2492Debug.Assert(rgRevertedRejitData[i].NativeCodeAddr == rgRevertedRejitDataLocal[i].NativeCodeAddr, $"cDAC: {rgRevertedRejitData[i].NativeCodeAddr:x}, DAC: {rgRevertedRejitDataLocal[i].NativeCodeAddr:x}"); 2493Debug.Assert(rgRevertedRejitData[i].flags == rgRevertedRejitDataLocal[i].flags, $"cDAC: {rgRevertedRejitData[i].flags}, DAC: {rgRevertedRejitDataLocal[i].flags}"); 2584Debug.Assert(*methodDesc == methodDescLocal, $"cDAC: {*methodDesc:x}, DAC: {methodDescLocal:x}"); 2672Debug.Assert(name == null || new ReadOnlySpan<char>(nameLocal, 0, (int)neededLocal - 1).SequenceEqual(new string(name)), $"cDAC: {new string(name)}, DAC: {new string(nameLocal, 0, (int)neededLocal - 1)}"); 3061Debug.Assert(*value == valueLocal, $"cDAC: {*value:x}, DAC: {valueLocal:x}"); 3508Debug.Assert(data->reason == dataLocal.reason, $"cDAC: {data->reason}, DAC: {dataLocal.reason}"); 3509Debug.Assert(data->alloc_size == dataLocal.alloc_size, $"cDAC: {data->alloc_size}, DAC: {dataLocal.alloc_size}"); 3510Debug.Assert(data->available_pagefile_mb == dataLocal.available_pagefile_mb, $"cDAC: {data->available_pagefile_mb}, DAC: {dataLocal.available_pagefile_mb}"); 3511Debug.Assert(data->gc_index == dataLocal.gc_index, $"cDAC: {data->gc_index}, DAC: {dataLocal.gc_index}"); 3512Debug.Assert(data->fgm == dataLocal.fgm, $"cDAC: {data->fgm}, DAC: {dataLocal.fgm}"); 3513Debug.Assert(data->size == dataLocal.size, $"cDAC: {data->size}, DAC: {dataLocal.size}"); 3514Debug.Assert(data->loh_p == dataLocal.loh_p, $"cDAC: {data->loh_p}, DAC: {dataLocal.loh_p}"); 3558Debug.Assert(data->reason == dataLocal.reason, $"cDAC: {data->reason}, DAC: {dataLocal.reason}"); 3559Debug.Assert(data->alloc_size == dataLocal.alloc_size, $"cDAC: {data->alloc_size}, DAC: {dataLocal.alloc_size}"); 3560Debug.Assert(data->available_pagefile_mb == dataLocal.available_pagefile_mb, $"cDAC: {data->available_pagefile_mb}, DAC: {dataLocal.available_pagefile_mb}"); 3561Debug.Assert(data->gc_index == dataLocal.gc_index, $"cDAC: {data->gc_index}, DAC: {dataLocal.gc_index}"); 3562Debug.Assert(data->fgm == dataLocal.fgm, $"cDAC: {data->fgm}, DAC: {dataLocal.fgm}"); 3563Debug.Assert(data->size == dataLocal.size, $"cDAC: {data->size}, DAC: {dataLocal.size}"); 3564Debug.Assert(data->loh_p == dataLocal.loh_p, $"cDAC: {data->loh_p}, DAC: {dataLocal.loh_p}"); 3711Debug.Assert(data->identityPointer == dataLocal.identityPointer, $"cDAC: {data->identityPointer:x}, DAC: {dataLocal.identityPointer:x}"); 3712Debug.Assert(data->unknownPointer == dataLocal.unknownPointer, $"cDAC: {data->unknownPointer:x}, DAC: {dataLocal.unknownPointer:x}"); 3713Debug.Assert(data->managedObject == dataLocal.managedObject, $"cDAC: {data->managedObject:x}, DAC: {dataLocal.managedObject:x}"); 3714Debug.Assert(data->vtablePtr == dataLocal.vtablePtr, $"cDAC: {data->vtablePtr:x}, DAC: {dataLocal.vtablePtr:x}"); 3715Debug.Assert(data->creatorThread == dataLocal.creatorThread, $"cDAC: {data->creatorThread:x}, DAC: {dataLocal.creatorThread:x}"); 3716Debug.Assert(data->ctxCookie == dataLocal.ctxCookie, $"cDAC: {data->ctxCookie:x}, DAC: {dataLocal.ctxCookie:x}"); 3717Debug.Assert(data->refCount == dataLocal.refCount, $"cDAC: {data->refCount}, DAC: {dataLocal.refCount}"); 3718Debug.Assert(data->interfaceCount == dataLocal.interfaceCount, $"cDAC: {data->interfaceCount}, DAC: {dataLocal.interfaceCount}"); 3719Debug.Assert(data->isAggregated == dataLocal.isAggregated, $"cDAC: {data->isAggregated}, DAC: {dataLocal.isAggregated}"); 3720Debug.Assert(data->isContained == dataLocal.isContained, $"cDAC: {data->isContained}, DAC: {dataLocal.isContained}"); 3721Debug.Assert(data->isFreeThreaded == dataLocal.isFreeThreaded, $"cDAC: {data->isFreeThreaded}, DAC: {dataLocal.isFreeThreaded}"); 3722Debug.Assert(data->isDisconnected == dataLocal.isDisconnected, $"cDAC: {data->isDisconnected}, DAC: {dataLocal.isDisconnected}"); 3800Debug.Assert(numWritten == pNeededLocal, $"cDAC: {numWritten}, DAC: {pNeededLocal}"); 3805Debug.Assert(interfaces[i].methodTable == interfacesLocal![i].methodTable, $"cDAC: {interfaces[i].methodTable:x}, DAC: {interfacesLocal[i].methodTable:x}"); 3806Debug.Assert(interfaces[i].interfacePtr == interfacesLocal![i].interfacePtr, $"cDAC: {interfaces[i].interfacePtr:x}, DAC: {interfacesLocal[i].interfacePtr:x}"); 3807Debug.Assert(interfaces[i].comContext == interfacesLocal![i].comContext, $"cDAC: {interfaces[i].comContext:x}, DAC: {interfacesLocal[i].comContext:x}"); 3966Debug.Assert(lower == null || *lower == lowerLocal, $"cDAC: {*lower:x}, DAC: {lowerLocal:x}"); 3967Debug.Assert(upper == null || *upper == upperLocal, $"cDAC: {*upper:x}, DAC: {upperLocal:x}"); 3968Debug.Assert(fp == null || *fp == fpLocal, $"cDAC: {*fp:x}, DAC: {fpLocal:x}"); 4174Debug.Assert(data->SyncBlockPointer == dataLocal.SyncBlockPointer, $"cDAC: {data->SyncBlockPointer:x}, DAC: {dataLocal.SyncBlockPointer:x}"); 4175Debug.Assert(data->nextSyncBlock == dataLocal.nextSyncBlock, $"cDAC: {data->nextSyncBlock:x}, DAC: {dataLocal.nextSyncBlock:x}"); 4176Debug.Assert(data->blockRCW == dataLocal.blockRCW, $"cDAC: {data->blockRCW:x}, DAC: {dataLocal.blockRCW:x}"); 4177Debug.Assert(data->blockClassFactory == dataLocal.blockClassFactory, $"cDAC: {data->blockClassFactory:x}, DAC: {dataLocal.blockClassFactory:x}"); 4178Debug.Assert(data->blockCCW == dataLocal.blockCCW, $"cDAC: {data->blockCCW:x}, DAC: {dataLocal.blockCCW:x}"); 4245Debug.Assert(data->Object == dataLocal.Object, $"cDAC: {data->Object:x}, DAC: {dataLocal.Object:x}"); 4246Debug.Assert(data->bFree == dataLocal.bFree, $"cDAC: {data->bFree}, DAC: {dataLocal.bFree}"); 4247Debug.Assert(data->SyncBlockPointer == dataLocal.SyncBlockPointer, $"cDAC: {data->SyncBlockPointer:x}, DAC: {dataLocal.SyncBlockPointer:x}"); 4248Debug.Assert(data->COMFlags == dataLocal.COMFlags, $"cDAC: {data->COMFlags}, DAC: {dataLocal.COMFlags}"); 4249Debug.Assert(data->MonitorHeld == dataLocal.MonitorHeld, $"cDAC: {data->MonitorHeld}, DAC: {dataLocal.MonitorHeld}"); 4252Debug.Assert(data->Recursion == dataLocal.Recursion, $"cDAC: {data->Recursion}, DAC: {dataLocal.Recursion}"); 4253Debug.Assert(data->HoldingThread == dataLocal.HoldingThread, $"cDAC: {data->HoldingThread:x}, DAC: {dataLocal.HoldingThread:x}"); 4255Debug.Assert(data->AdditionalThreadCount == dataLocal.AdditionalThreadCount, $"cDAC: {data->AdditionalThreadCount}, DAC: {dataLocal.AdditionalThreadCount}"); 4256Debug.Assert(data->appDomainPtr == dataLocal.appDomainPtr, $"cDAC: {data->appDomainPtr:x}, DAC: {dataLocal.appDomainPtr:x}"); 4257Debug.Assert(data->SyncBlockCount == dataLocal.SyncBlockCount, $"cDAC: {data->SyncBlockCount}, DAC: {dataLocal.SyncBlockCount}"); 4292Debug.Assert(data->allocBytes == dataLocal.allocBytes, $"cDAC: {data->allocBytes:x}, DAC: {dataLocal.allocBytes:x}"); 4293Debug.Assert(data->allocBytesLoh == dataLocal.allocBytesLoh, $"cDAC: {data->allocBytesLoh:x}, DAC: {dataLocal.allocBytesLoh:x}"); 4341Debug.Assert(data->corThreadId == dataLocal.corThreadId, $"cDAC: {data->corThreadId}, DAC: {dataLocal.corThreadId}"); 4342Debug.Assert(data->osThreadId == dataLocal.osThreadId, $"cDAC: {data->osThreadId}, DAC: {dataLocal.osThreadId}"); 4348Debug.Assert(data->state == (dataLocal.state & wrappedStateMask), $"cDAC: {data->state}, DAC: {dataLocal.state & wrappedStateMask}"); 4349Debug.Assert(data->preemptiveGCDisabled == dataLocal.preemptiveGCDisabled, $"cDAC: {data->preemptiveGCDisabled}, DAC: {dataLocal.preemptiveGCDisabled}"); 4350Debug.Assert(data->allocContextPtr == dataLocal.allocContextPtr, $"cDAC: {data->allocContextPtr:x}, DAC: {dataLocal.allocContextPtr:x}"); 4351Debug.Assert(data->allocContextLimit == dataLocal.allocContextLimit, $"cDAC: {data->allocContextLimit:x}, DAC: {dataLocal.allocContextLimit:x}"); 4352Debug.Assert(data->fiberData == dataLocal.fiberData, $"cDAC: {data->fiberData:x}, DAC: {dataLocal.fiberData:x}"); 4353Debug.Assert(data->context == dataLocal.context, $"cDAC: {data->context:x}, DAC: {dataLocal.context:x}"); 4354Debug.Assert(data->domain == dataLocal.domain, $"cDAC: {data->domain:x}, DAC: {dataLocal.domain:x}"); 4355Debug.Assert(data->lockCount == dataLocal.lockCount, $"cDAC: {data->lockCount}, DAC: {dataLocal.lockCount}"); 4356Debug.Assert(data->pFrame == dataLocal.pFrame, $"cDAC: {data->pFrame:x}, DAC: {dataLocal.pFrame:x}"); 4357Debug.Assert(data->firstNestedException == dataLocal.firstNestedException, $"cDAC: {data->firstNestedException:x}, DAC: {dataLocal.firstNestedException:x}"); 4358Debug.Assert(data->lastThrownObjectHandle == dataLocal.lastThrownObjectHandle, $"cDAC: {data->lastThrownObjectHandle:x}, DAC: {dataLocal.lastThrownObjectHandle:x}"); 4359Debug.Assert(data->nextThread == dataLocal.nextThread, $"cDAC: {data->nextThread:x}, DAC: {dataLocal.nextThread:x}"); 4593Debug.Assert(clauseIndex < totalClauses, $"Invalid clause index {clauseIndex} of {totalClauses}"); 4597Debug.Assert(pEHInfo->clauseType == expectedEhClause.clauseType, $"cDAC: {expectedEhClause.clauseType}, DAC: {pEHInfo->clauseType}"); 4598Debug.Assert(pEHInfo->tryStartOffset == expectedEhClause.tryStartOffset, $"cDAC: {expectedEhClause.tryStartOffset:x}, DAC: {pEHInfo->tryStartOffset:x}"); 4599Debug.Assert(pEHInfo->tryEndOffset == expectedEhClause.tryEndOffset, $"cDAC: {expectedEhClause.tryEndOffset:x}, DAC: {pEHInfo->tryEndOffset:x}"); 4600Debug.Assert(pEHInfo->handlerStartOffset == expectedEhClause.handlerStartOffset, $"cDAC: {expectedEhClause.handlerStartOffset:x}, DAC: {pEHInfo->handlerStartOffset:x}"); 4601Debug.Assert(pEHInfo->handlerEndOffset == expectedEhClause.handlerEndOffset, $"cDAC: {expectedEhClause.handlerEndOffset:x}, DAC: {pEHInfo->handlerEndOffset:x}"); 4602Debug.Assert(pEHInfo->isDuplicateClause == expectedEhClause.isDuplicateClause, $"cDAC: {expectedEhClause.isDuplicateClause}, DAC: {pEHInfo->isDuplicateClause}"); 4603Debug.Assert(pEHInfo->filterOffset == expectedEhClause.filterOffset, $"cDAC: {expectedEhClause.filterOffset:x}, DAC: {pEHInfo->filterOffset:x}"); 4604Debug.Assert(pEHInfo->isCatchAllHandler == expectedEhClause.isCatchAllHandler, $"cDAC: {expectedEhClause.isCatchAllHandler}, DAC: {pEHInfo->isCatchAllHandler}"); 4605Debug.Assert(pEHInfo->moduleAddr == expectedEhClause.moduleAddr, $"cDAC: {expectedEhClause.moduleAddr:x}, DAC: {pEHInfo->moduleAddr:x}"); 4606Debug.Assert(pEHInfo->mtCatch == expectedEhClause.mtCatch, $"cDAC: {expectedEhClause.mtCatch:x}, DAC: {pEHInfo->mtCatch:x}"); 4607Debug.Assert(pEHInfo->tokCatch == expectedEhClause.tokCatch, $"cDAC: {expectedEhClause.tokCatch:x}, DAC: {pEHInfo->tokCatch:x}"); 4724Debug.Assert(found, $"Unexpected loader heap block: address={virtualAddress:x}, size={virtualSize:x}"); 4786Debug.Assert(DebugTraverseLoaderHeapBlocks.Count == 0, 4788Debug.Assert(_debugTraverseLoaderDebugCount == (uint)cdacCount, 4807Debug.Assert(false, $"Unexpected module address {moduleAddr:x} at index {index}"); 4855Debug.Assert(expectedElements[default] == elements.Count(), $"cDAC: {elements.Count()} elements, DAC: {expectedElements[default]} elements"); 4915Debug.Assert(expectedElements[default] == (ulong)cleanupInfos.Count(), $"cDAC: {cleanupInfos.Count()} elements, DAC: {expectedElements[default]} elements"); 4963Debug.Assert(DebugTraverseLoaderHeapBlocks.Count == 0, 4965Debug.Assert(_debugTraverseLoaderDebugCount == (uint)cdacCount, 5150Debug.Assert(cdacData->interestingDataPoints[i] == legacyData->interestingDataPoints[i], 5157Debug.Assert(cdacData->compactReasons[i] == legacyData->compactReasons[i], 5164Debug.Assert(cdacData->expandMechanisms[i] == legacyData->expandMechanisms[i], 5171Debug.Assert(cdacData->bitMechanisms[i] == legacyData->bitMechanisms[i], 5178Debug.Assert(cdacData->globalMechanisms[i] == legacyData->globalMechanisms[i], 5225Debug.Assert(globalMechanisms[i] == globalMechanismsLocal[i], 5396Debug.Assert(*pcNativeCodeAddrs == legacyCount, $"cDAC count: {*pcNativeCodeAddrs}, DAC count: {legacyCount}"); 5401Debug.Assert(nativeCodeAddrs[i].nativeCodeAddr == legacyBuffer[i].nativeCodeAddr, 5403Debug.Assert(nativeCodeAddrs[i].nativeCodeVersionNodePtr == legacyBuffer[i].nativeCodeVersionNodePtr, 5405Debug.Assert(nativeCodeAddrs[i].optimizationTier == legacyBuffer[i].optimizationTier, 5452Debug.Assert((data->bCollectible == 0) == (dataLocal.bCollectible == 0), $"cDAC: {data->bCollectible}, DAC: {dataLocal.bCollectible}"); 5453Debug.Assert(data->LoaderAllocatorObjectHandle == dataLocal.LoaderAllocatorObjectHandle, $"cDAC: {data->LoaderAllocatorObjectHandle:x}, DAC: {dataLocal.LoaderAllocatorObjectHandle:x}"); 5614Debug.Assert(pILData->type == ilDataLocal.type, $"cDAC: {pILData->type}, DAC: {ilDataLocal.type}"); 5615Debug.Assert(pILData->rejitID == ilDataLocal.rejitID, $"cDAC: {pILData->rejitID}, DAC: {ilDataLocal.rejitID}"); 5616Debug.Assert(pILData->il == ilDataLocal.il, $"cDAC: {pILData->il:x}, DAC: {ilDataLocal.il:x}"); 5680Debug.Assert(*pcMethodDescs == pcMethodDescsLocal, $"cDAC: {*pcMethodDescs}, DAC: {pcMethodDescsLocal}"); 5683Debug.Assert(methodDescs[i] == methodDescsLocal[i], $"cDAC: {methodDescs[i]:x}, DAC: {methodDescsLocal[i]:x}"); 6417Debug.Assert(DebugTraverseLoaderHeapBlocks.Count == 0, 6419Debug.Assert(_debugTraverseLoaderDebugCount == (uint)cdacCount, 6552Debug.Assert(pNeeded is null || *pNeeded == pNeededLocal, $"cDAC needed: {(pNeeded != null ? *pNeeded : -1)}, DAC needed: {pNeededLocal}"); 6562Debug.Assert(cdacName == dacName, $"HeapName[{i}] - cDAC: {cdacName}, DAC: {dacName}"); 6609Debug.Assert(pNeeded is null || *pNeeded == pNeededLocal, $"cDAC needed: {(pNeeded != null ? *pNeeded : -1)}, DAC needed: {pNeededLocal}"); 6615Debug.Assert(hrLocal == hr, $"cDAC: {hr:x}, DAC: {hrLocal:x}"); 6620Debug.Assert(pLoaderHeaps[i] == pLoaderHeapsLocal[i], $"Heap[{i}] - cDAC: {pLoaderHeaps[i]:x}, DAC: {pLoaderHeapsLocal[i]:x}"); 6621Debug.Assert(pKinds[i] == pKindsLocal[i], $"Kind[{i}] - cDAC: {pKinds[i]}, DAC: {pKindsLocal[i]}"); 6973Debug.Assert(*pNeeded == neededLocal, $"cDAC: {*pNeeded}, DAC: {neededLocal}"); 6976Debug.Assert(values[i].MethodDesc == valuesLocal[i].MethodDesc, $"cDAC: {values[i].MethodDesc:x}, DAC: {valuesLocal[i].MethodDesc:x}"); 6977Debug.Assert(values[i].DefiningMethodTable == valuesLocal[i].DefiningMethodTable, $"cDAC: {values[i].DefiningMethodTable:x}, DAC: {valuesLocal[i].DefiningMethodTable:x}"); 6978Debug.Assert(values[i].DefiningModule == valuesLocal[i].DefiningModule, $"cDAC: {values[i].DefiningModule:x}, DAC: {valuesLocal[i].DefiningModule:x}"); 6979Debug.Assert(values[i].Token == valuesLocal[i].Token, $"cDAC: {values[i].Token}, DAC: {valuesLocal[i].Token}"); 6980Debug.Assert(values[i].Entrypoint == valuesLocal[i].Entrypoint, $"cDAC: {values[i].Entrypoint:x}, DAC: {valuesLocal[i].Entrypoint:x}"); 6981Debug.Assert(values[i].Slot == valuesLocal[i].Slot, $"cDAC: {values[i].Slot}, DAC: {valuesLocal[i].Slot}");
Microsoft.DotNet.HotReload.Watch (2)
src\sdk\src\Dotnet.Watch\AspireService\Models\RunSessionRequest.cs (1)
68Debug.Assert(LaunchConfigurations.Length == 1, $"Unexpected number of launch configurations {LaunchConfigurations.Length}");
UI\IReporter.cs (1)
306Debug.Assert(actualArity == expectedArity, $"Arguments of format string '{format}' do not match the specified type: {typeof(TArgs)} (actual arity: {actualArity}, expected arity: {expectedArity})");
Microsoft.Extensions.AI.Abstractions (2)
Utilities\AIJsonUtilities.Schema.Create.cs (2)
287Debug.Assert(refUri is "#" || refUri.StartsWith("#/", StringComparison.Ordinal), $"Expected {nameof(refUri)} to be either # or start with #/, got {refUri}"); 409Debug.Assert(kind is JsonValueKind.True, $"Invalid schema type: {kind}");
Microsoft.Extensions.Logging.Console (1)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
105Debug.Assert(byteCount <= ActiveLength, $"Expected {byteCount} <= {ActiveLength}");
Microsoft.NET.Build.Containers (2)
Resources\Resource.cs (2)
35Debug.Assert(resource != null, $"Resource with name {name} was not found"); 49Debug.Assert(resource != null, $"Resource with name {name} was not found");
Microsoft.NET.HostModel (5)
Bundle\Bundler.cs (3)
345Debug.Assert(endOfHost == hostLength, $"Host file size on disk does not match bytes written to the bundle. Expected {hostLength}, but got {endOfHost}. This may indicate that the host file is not a valid native binary or that it is not a single-file apphost."); 373Debug.Assert(bundleStream.Position - endOfHost <= bundledFilesSize, $"Not enough space allocated for bundled files. Allocated {bundledFilesSize}, but written {bundleStream.Position - endOfHost}"); 384Debug.Assert((long)endOfBundle == endOfBundledFiles + bundleManifestLength, $"Bundle manifest is unexpected size. Expected {bundleManifestLength}, but got {(long)endOfBundle - endOfBundledFiles}");
Bundle\FileEntry.cs (1)
56Debug.Assert(writer.BaseStream.Position - start == GetFileEntryLength(BundleMajorVersion, RelativePath),
Bundle\Manifest.cs (1)
176Debug.Assert(writer.BaseStream.Position - startOffset == GetManifestLength(BundleMajorVersion, Files.Select(static f => f.RelativePath)),
Microsoft.TemplateEngine.Core (1)
Expressions\Cpp\CppStyleEvaluatorDefinition.cs (1)
269Debug.Assert(
Microsoft.Win32.Registry (2)
Microsoft\Win32\RegistryKey.cs (2)
407Debug.Assert(errorCode == 0, $"RegDeleteValue failed. Here's your error code: {errorCode}"); 1078Debug.Assert((uint)dataLength <= span.Length, $"Expected {dataLength} <= {span.Length}");
NuGet.Packaging (5)
Signing\DerEncoding\DerEncoder.cs (4)
1107Debug.Assert(x!.Length == 3, $"x.Length is {x.Length} when it should be 3"); 1108Debug.Assert(y!.Length == 3, $"y.Length is {y.Length} when it should be 3"); 1139Debug.Assert(x[0].Length == 1, $"x[0].Length is {x[0].Length} when it should be 1"); 1140Debug.Assert(y[0].Length == 1, $"y[0].Length is {y[0].Length} when it should be 1");
Signing\DerEncoding\DerSequenceReader.cs (1)
483Debug.Assert(
NuGet.ProjectModel (2)
PackageSpecReferenceDependencyProvider.cs (2)
65Debug.Assert( 74Debug.Assert(
PresentationBuildTasks (4)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleModeStack.cs (2)
46Debug.Assert(Depth >= 0, $"StyleModeStack's depth was {Depth}, should be >= 0"); 63Debug.Assert(Depth >= 0, $"StyleMode::Pop() with depth of {Depth}, should be >= 0");
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
5051Debug.Assert( xmlNodeType == XmlNodeType.Text || 5132Debug.Assert (parentNodeType == ElementContextType.Unknown,
PresentationFramework (15)
MS\Internal\Annotations\AnnotationMap.cs (1)
77Debug.Assert(list != null, $"there should be an attached annotation list for the annotationId: {annotationId}");
MS\Internal\Data\PropertyPathWorker.cs (1)
1279Debug.Assert(sb.Length == 0,
MS\Internal\Ink\StrokeCollectionDefaultValueFactory.cs (1)
37Debug.Assert(property.PropertyType == typeof(StrokeCollection),
System\Windows\Interop\ActiveXHost.cs (1)
505Debug.Assert(hr == NativeMethods.S_OK, $"DoVerb call failed for verb 0x{verb:X}");
System\Windows\Markup\BamlRecordReader.cs (1)
4225Debug.Assert(!context.CreateUsingTypeConverter,
System\Windows\Markup\StyleModeStack.cs (2)
46Debug.Assert(Depth >= 0, $"StyleModeStack's depth was {Depth}, should be >= 0"); 63Debug.Assert(Depth >= 0, $"StyleMode::Pop() with depth of {Depth}, should be >= 0");
System\Windows\Media\Animation\Storyboard.cs (2)
574Debug.Assert( mappedObject == null || mappedObject is AnimationClock || mappedObject is List<AnimationClock>, 615Debug.Assert( value is AnimationClock || value is List<AnimationClock> ,
System\Windows\StyleHelper.cs (5)
3066Debug.Assert(!StyleHelper.IsSetOnContainer(conditions[j].Property, ref containerDependents, true), 4340Debug.Assert(candidateTrigger is List<TriggerBase>, 5051Debug.Assert( existing is List<TriggerBase>, 5097Debug.Assert( existing is List<TriggerBase>, 5270Debug.Assert(candidateTrigger is List<TriggerBase>,
System\Windows\SystemResourceKey.cs (1)
1956Debug.Assert(((SystemResourceKeyID.InternalSystemColorsStart < id) && (id < SystemResourceKeyID.InternalSystemColorsEnd)) ||
System.Collections (1)
System\Collections\Generic\OrderedDictionary.cs (1)
417Debug.Assert(behavior is InsertionBehavior.IgnoreInsertion, $"Unknown behavior: {behavior}");
System.Collections.Concurrent (4)
System\Collections\Concurrent\ConcurrentBag.cs (1)
1058Debug.Assert(count >= 0, $"Expected _addTakeCount ({addTakeCount}) >= _stealCount ({stealCount}).");
System\Collections\Concurrent\PartitionerStatic.cs (3)
695Debug.Assert(requestedChunkSize == 1, $"Got requested chunk size of {requestedChunkSize} when single-chunking was on"); 696Debug.Assert(actualNumElementsGrabbed == 0, $"Expected actualNumElementsGrabbed == 0, instead it is {actualNumElementsGrabbed}"); 697Debug.Assert(destArray.Length == 1, $"Expected destArray to be of length 1, instead its length is {destArray.Length}");
System.ComponentModel.TypeConverter (7)
System\ComponentModel\Design\DesigntimeLicenseContextSerializer.cs (1)
175Debug.Assert(binaryWriterIdentifier == BinaryWriterMagic, $"Expected the first byte to be {BinaryWriterMagic}");
System\ComponentModel\ReflectEventDescriptor.cs (3)
89Debug.Assert(type.IsSubclassOf(typeof(Delegate)), $"Not a valid ReflectEvent: {componentClass.FullName}. {name} {type.FullName}"); 243Debug.Assert(_removeMethod != null, $"Null remove method for {Name}"); 246Debug.Assert(_addMethod != null, $"Null remove method for {Name}");
System\ComponentModel\ReflectTypeDescriptionProvider.cs (3)
611Debug.Assert(eppa != null, $"Extender property {prop.Name} has no provider attribute. We will skip it."); 1205Debug.Assert(dbgEvent != null, $"Holes in event array for type {type}"); 1399Debug.Assert(Array.TrueForAll(properties, dbgProp => dbgProp is not null), $"Holes in property array for type {type}");
System.Data.Common (37)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (3)
494Debug.Assert(parsetableContainsKey, $"{nameof(ParseInternal)} code vs. regex mismatch keyname <{keyname}>"); 495Debug.Assert(value1 == value2, $"{nameof(ParseInternal)} code vs. regex mismatch keyvalue <{value1}> <{value2}>"); 520Debug.Assert(isEquivalent, $"ParseInternal code vs regex message mismatch: <{msg1}> <{msg2}>");
System\Data\Common\DBCommandBuilder.cs (1)
201Debug.Assert(_isMutatedName[iMutatedName], $"{_baseParameterNames[iMutatedName]} expected to be a mutated name");
System\Data\Common\DbConnectionStringBuilder.cs (1)
254Debug.Assert(null != values[i], $"null value {keylist.Current}");
System\Data\Filter\AggregateNode.cs (1)
117Debug.Assert(_column != null, $"Failed to bind column {_columnName}");
System\Data\Filter\FunctionNode.cs (18)
321Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 332Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 344Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 348Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 352Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 356Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 360Debug.Assert(_argumentCount == 2, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 362Debug.Assert(argumentValues[0] is string, $"Invalid argument type for {s_funcs[_info]._name}"); 363Debug.Assert(argumentValues[1] is string, $"Invalid argument type for {s_funcs[_info]._name}"); 377Debug.Assert(_argumentCount == 3, $"Invalid argument argumentCount: {_argumentCount.ToString(FormatProvider)}"); 404Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 405Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[_info]._name}"); 423Debug.Assert(_argumentCount == 3, $"Invalid argument argumentCount: {_argumentCount.ToString(FormatProvider)}"); 424Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid first argument {argumentValues[0].GetType().FullName} in {s_funcs[_info]._name}"); 425Debug.Assert(argumentValues[1] is int, $"Invalid second argument {argumentValues[1].GetType().FullName} in {s_funcs[_info]._name}"); 426Debug.Assert(argumentValues[2] is int, $"Invalid third argument {argumentValues[2].GetType().FullName} in {s_funcs[_info]._name}"); 465Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[_info]._name} : {_argumentCount.ToString(FormatProvider)}"); 466Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[_info]._name}");
System\Data\Filter\NameNode.cs (1)
61Debug.Assert(_column != null, $"Failed to bind column {_name}");
System\Data\ForeignKeyConstraint.cs (2)
507Debug.Assert(Table?.DataSet != null, $"Relation {ConstraintName} isn't part of a DataSet, so this check shouldn't be happening."); 520Debug.Assert(Table?.DataSet != null, $"ForeignKeyConstraint {ConstraintName} isn't part of a DataSet, so this check shouldn't be happening.");
System\Data\Merger.cs (1)
597Debug.Assert(MissingSchemaAction.Error == _missingSchemaAction, $"Unexpected value of MissingSchemaAction parameter : {_missingSchemaAction}");
System\Data\SQLTypes\SQLDecimal.cs (1)
421Debug.Assert(precision == bActualPrecision, $"CalculatePrecision={precision}, BActualPrec={bActualPrecision}. Results must be equal!");
System\Data\XDRSchema.cs (3)
133Debug.Assert(FEqualIdentity(node, Keywords.XDR_ELEMENTTYPE, Keywords.XDRNS), $"Invalid node type {node.LocalName}"); 285Debug.Assert(nt.name != name, $"FindNameType('{name}') -- failed. Existed name not found"); 290Debug.Assert(s_mapNameTypeXdr[index].name == name, $"FindNameType('{name}') -- failed. Wrong name found");
System\Data\XMLSchema.cs (5)
1785Debug.Assert((s_mapNameTypeXsd[i - 1].CompareTo(s_mapNameTypeXsd[i].name)) < 0, $"incorrect sorting {s_mapNameTypeXsd[i].name}"); 1851Debug.Assert((s_mapNameTypeXsd[i - 1].CompareTo(s_mapNameTypeXsd[i].name)) < 0, $"incorrect sorting {s_mapNameTypeXsd[i].name}"); 1899Debug.Assert((s_mapNameTypeXsd[i - 1].CompareTo(s_mapNameTypeXsd[i].name)) < 0, $"incorrect sorting {s_mapNameTypeXsd[i].name}"); 1909Debug.Assert(nt.name != name, $"FindNameType('{name}') -- failed. Existed name not found"); 1914Debug.Assert(s_mapNameTypeXsd[index].name == name, $"FindNameType('{name}') -- failed. Wrong name found");
System.Data.Odbc (6)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (3)
494Debug.Assert(parsetableContainsKey, $"{nameof(ParseInternal)} code vs. regex mismatch keyname <{keyname}>"); 495Debug.Assert(value1 == value2, $"{nameof(ParseInternal)} code vs. regex mismatch keyvalue <{value1}> <{value2}>"); 520Debug.Assert(isEquivalent, $"ParseInternal code vs regex message mismatch: <{msg1}> <{msg2}>");
System\Data\Odbc\OdbcParameter.cs (3)
410Debug.Assert((0 <= cch) && (cch < 0x3fffffff), $"GetColumnSize: cch = {cch} out of range, _internalShouldSerializeSize = {_internalShouldSerializeSize}, _internalSize = {_internalSize}"); 455Debug.Assert((0 <= cch) && (cch < 0x3fffffff), $"GetValueSize: cch = {cch} out of range, _internalShouldSerializeSize = {_internalShouldSerializeSize}, _internalSize = {_internalSize}"); 529Debug.Assert((0 <= ccb) && (ccb < 0x3fffffff), $"GetParameterSize: out of range {ccb}");
System.Data.OleDb (6)
ColumnBinding.cs (1)
58Debug.Assert(ODB.SizeOf_tagDBBINDING <= offset, $"invalid offset {offset}");
DbConnectionOptions.cs (3)
844Debug.Assert(parsetable.Contains(keyname), $"ParseInternal code vs. regex mismatch keyname <{keyname}>"); 845Debug.Assert(value1 == value2, $"ParseInternal code vs. regex mismatch keyvalue <{value1}> <{value2}>"); 871Debug.Assert(isEquivalent, $"ParseInternal code vs regex message mismatch: <{msg1}> <{msg2}>");
DbPropSet.cs (1)
264Debug.Assert(null != properties[i], $"null tagDBPROP {i.ToString(CultureInfo.InvariantCulture)}");
System\Data\ProviderBase\DbConnectionPoolCounters.cs (1)
260Debug.Assert(result.Length == CounterInstanceNameMaxLength,
System.Diagnostics.PerformanceCounter (1)
System\Diagnostics\SharedPerformanceCounter.cs (1)
696Debug.Assert(counterNamesObject is string[], $"Expected string[], got '{counterNamesObject}' of type '{counterNamesObject?.GetType()}' with kind '{categoryKey.GetValueKind("Counter Names")}' for category '{_categoryName}'");
System.Drawing.Common (14)
System\Drawing\Brush.cs (1)
33Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Drawing2D\CustomLineCap.cs (1)
81Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Drawing2D\GraphicsPath.cs (1)
126Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Drawing2D\GraphicsPathIterator.cs (1)
36Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Font.cs (1)
185Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\FontFamily.cs (1)
217Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Graphics.cs (1)
186Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Image.cs (1)
215Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Imaging\ImageAttributes.cs (1)
77Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Internal\SystemColorTracker.cs (1)
55Debug.Assert(!reference.TryGetTarget(out _), $"Trying to reuse a weak reference that isn't broken yet: list[{index}], length = {s_list.Length}");
System\Drawing\Pen.cs (1)
123Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Region.cs (1)
97Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\StringFormat.cs (1)
77Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System\Drawing\Text\PrivateFontCollection.cs (1)
39Debug.Assert(status == Status.Ok, $"GDI+ returned an error status: {status}");
System.Drawing.Primitives (1)
System\Drawing\Color.cs (1)
403Debug.Assert(tableName != null, $"Could not find known color '{(KnownColor)knownColor}' in the KnownColorTable");
System.Formats.Asn1 (3)
System\Formats\Asn1\AsnWriter.BitString.cs (1)
192Debug.Assert(_offset - savedOffset == expectedSize, $"expected size was {expectedSize}, actual was {_offset - savedOffset}");
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (1)
92Debug.Assert(bytesWritten > 2, $"{bytesWritten} should be > 2");
System\Formats\Asn1\AsnWriter.OctetString.cs (1)
165Debug.Assert(_offset - savedOffset == expectedSize, $"expected size was {expectedSize}, actual was {_offset - savedOffset}");
System.Formats.Tar (1)
System\Formats\Tar\TarEntry.cs (1)
523Debug.Assert(Path.IsPathFullyQualified(qualifiedPath), $"{qualifiedPath} is not qualified");
System.IO.Compression (3)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
105Debug.Assert(byteCount <= ActiveLength, $"Expected {byteCount} <= {ActiveLength}");
System\IO\Compression\WinZipAesKeyMaterial.cs (1)
60Debug.Assert(salt.Length == saltSize, $"Salt must be {saltSize} bytes for AES-{keySizeBits}.");
System\IO\Compression\Zstandard\ZstandardStream.Decompress.cs (1)
104Debug.Assert(
System.IO.Compression.Brotli (1)
System\IO\Compression\dec\BrotliStream.Decompress.cs (1)
243Debug.Assert(
System.IO.FileSystem.AccessControl (1)
src\runtime\src\libraries\Common\src\System\IO\FileSystem.Attributes.Windows.cs (1)
66Debug.Assert(errorCode == Interop.Errors.ERROR_ACCESS_DENIED || errorCode == Interop.Errors.ERROR_SHARING_VIOLATION || errorCode == Interop.Errors.ERROR_SEM_TIMEOUT,
System.IO.Ports (1)
System\IO\Ports\SafeSerialDeviceHandle.Unix.cs (1)
42Debug.Assert(result == 0, $"Close failed with result {result} and error {Interop.Sys.GetLastErrorInfo()}");
System.Linq.Expressions (3)
System\Linq\Expressions\Interpreter\InstructionList.cs (2)
198Debug.Assert(_currentStackDepth >= 0, $"negative stack depth {instruction}"); 206Debug.Assert(_currentContinuationsDepth >= 0, $"negative continuations {instruction}");
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
3118Debug.Assert(_instructions.CurrentStackDepth == startingStackDepth + (expr.Type == typeof(void) ? 0 : 1),
System.Net.Http (39)
src\runtime\src\libraries\Common\src\System\CharArrayHelpers.cs (3)
14Debug.Assert(startIndex >= 0, $"Expected {nameof(startIndex)} to be >= 0, got {startIndex}"); 15Debug.Assert(length >= 0, $"Expected {nameof(length)} to be >= 0, got {length}"); 16Debug.Assert(startIndex <= array.Length - length, $"Expected {startIndex} to be <= {array.Length} - {length}, got {startIndex}");
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
105Debug.Assert(byteCount <= ActiveLength, $"Expected {byteCount} <= {ActiveLength}");
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackEncoder.cs (2)
603Debug.Assert(success, $"Stack-allocated space was too small for index '{index}'."); 615Debug.Assert(success, $"Stack-allocated space was too small for \"{name}\".");
src\runtime\src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (8)
71Debug.Assert(byteCount <= ActiveMemory.Length, $"MultiArrayBuffer.Discard: Expected byteCount={byteCount} <= {ActiveMemory.Length}"); 121Debug.Assert(byteCount <= AvailableMemory.Length, $"MultiArrayBuffer.Commit: Expected byteCount={byteCount} <= {AvailableMemory.Length}"); 220Debug.Assert(_activeStart / BlockSize == 0, $"Start is not in first block after move or resize?? _activeStart={_activeStart}"); 257Debug.Assert(_allocatedEnd % BlockSize == 0, $"_allocatedEnd={_allocatedEnd} not at block boundary?"); 279Debug.Assert(_activeStart == 0, $"No active bytes but _activeStart={_activeStart}"); 355Debug.Assert(0 <= startInBlock, $"Invalid startInBlock={startInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}"); 356Debug.Assert(startInBlock < endInBlock, $"Invalid startInBlock={startInBlock}, endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}"); 357Debug.Assert(endInBlock <= BlockSize, $"Invalid endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
src\runtime\src\libraries\Common\src\System\Net\Security\SslClientAuthenticationOptionsExtensions.cs (5)
52Debug.Assert(cloneEnumerable != null, $"{pi.Name}. Expected enumerable cloned value."); 62Debug.Assert(e2.MoveNext(), $"{pi.Name}. Cloned enumerator too short."); 63Debug.Assert(Equals(e1.Current, e2.Current), $"{pi.Name}. Cloned enumerator's values don't match."); 65Debug.Assert(!e2.MoveNext(), $"{pi.Name}. Cloned enumerator too long."); 79Debug.Assert(Equals(origValue, cloneValue), $"{pi.Name}. Expected: {origValue}, Actual: {cloneValue}");
System\Net\Http\Headers\HeaderDescriptor.cs (1)
33Debug.Assert(customHeader || KnownHeaders.TryGetKnownHeader(headerName) is null, $"The {nameof(KnownHeader)} overload should be used for {headerName}");
System\Net\Http\Headers\HttpHeaders.cs (2)
451Debug.Assert(descriptor.Parser.SupportsMultipleValues, $"Header '{descriptor.Name}' doesn't support multiple values"); 573Debug.Assert(headerRemoved, $"Existing header '{descriptor.Name}' couldn't be removed.");
System\Net\Http\HttpContent.cs (2)
264Debug.Assert(_contentReadStream is Stream, $"Expected a Stream, got ${_contentReadStream}"); 293Debug.Assert(_contentReadStream is Task<Stream>, $"Expected a Task<Stream>, got ${_contentReadStream}");
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (3)
323Debug.Assert(_chunkBytesRemaining == 0, $"Expected {nameof(_chunkBytesRemaining)} == 0, got {_chunkBytesRemaining}"); 380Debug.Assert(_chunkBytesRemaining == 0, $"Expected {nameof(_chunkBytesRemaining)} == 0, got {_chunkBytesRemaining}"); 396Debug.Assert(_chunkBytesRemaining == 0, $"Expected {nameof(_chunkBytesRemaining)} == 0, got {_chunkBytesRemaining}");
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (3)
105Debug.Assert(_associatedHttp11ConnectionCount >= connectionCount + _pendingHttp11ConnectionCount, 108Debug.Assert(_associatedHttp11ConnectionCount <= _maxHttp11Connections, 110Debug.Assert(_associatedHttp11ConnectionCount >= _pendingHttp11ConnectionCount,
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (2)
407Debug.Assert(_associatedHttp2ConnectionCount > (_availableHttp2Connections?.Count ?? 0), 430Debug.Assert((_availableHttp2Connections?.Count ?? 0) == 0, $"With {(_availableHttp2Connections?.Count ?? 0)} available HTTP2 connections, we shouldn't have a waiter.");
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (2)
393Debug.Assert(_associatedHttp3ConnectionCount > (_availableHttp3Connections?.Count ?? 0), 416Debug.Assert((_availableHttp3Connections?.Count ?? 0) == 0, $"With {(_availableHttp3Connections?.Count ?? 0)} available HTTP3 connections, we shouldn't have a waiter.");
System\Net\Http\SocketsHttpHandler\ConnectionPool\RequestQueue.cs (1)
167Debug.Assert(_attemptedConnectionsOffset < _size, $"{_attemptedConnectionsOffset} < {_size}");
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (4)
248Debug.Assert(_requestCompletionState == StreamCompletionState.InProgress, $"Request already completed with state={_requestCompletionState}"); 291Debug.Assert(_requestCompletionState == StreamCompletionState.InProgress, $"Request already completed with state={_requestCompletionState}"); 827Debug.Assert(_responseCompletionState == StreamCompletionState.InProgress, $"Response already completed with state={_responseCompletionState}"); 901Debug.Assert(_responseCompletionState == StreamCompletionState.InProgress, $"Response already completed with state={_responseCompletionState}");
System.Net.Http.WinHttpHandler (3)
src\runtime\src\libraries\Common\src\System\CharArrayHelpers.cs (3)
14Debug.Assert(startIndex >= 0, $"Expected {nameof(startIndex)} to be >= 0, got {startIndex}"); 15Debug.Assert(length >= 0, $"Expected {nameof(length)} to be >= 0, got {length}"); 16Debug.Assert(startIndex <= array.Length - length, $"Expected {startIndex} to be <= {array.Length} - {length}, got {startIndex}");
System.Net.HttpListener (1)
System\Net\HttpListenerRequestUriBuilder.cs (1)
122Debug.Assert((type == EncodingType.Primary) || (type == EncodingType.Secondary), $"Unknown 'EncodingType' value: {type}");
System.Net.Mail (17)
System\Net\Mail\DomainLiteralReader.cs (1)
34Debug.Assert(0 <= index && index < data.Length, $"index was outside the bounds of the string: {index}");
System\Net\Mail\DotAtomReader.cs (1)
40Debug.Assert(0 <= index && index < data.Length, $"index was outside the bounds of the string: {index}");
System\Net\Mail\MailAddressParser.cs (4)
30Debug.Assert(!parseSuccess || index == -1, $"The index indicates that part of the address was not parsed: {index}"); 70Debug.Assert(index >= 0 && index < data.Length, $"Index out of range: {index}, {data.Length}"); 396Debug.Assert(data[index + 1] == MailBnfHelper.Quote, $"Mis-aligned index: {index}"); 435Debug.Assert(index < 0 || data[index] == MailBnfHelper.Comma, $"Mis-aligned index: {index}");
System\Net\Mail\QuotedPairReader.cs (3)
37Debug.Assert(0 <= index && index < data.Length, $"Index out of range: {index}, {data.Length}"); 85Debug.Assert(index >= 0 && data[index] == MailBnfHelper.Backslash, $"index was not a backslash: {index}"); 96Debug.Assert(index < 0 || data[index] != MailBnfHelper.Backslash, $"index was a backslash: {index}");
System\Net\Mail\QuotedStringFormatReader.cs (3)
38Debug.Assert(0 <= index && index < data.Length, $"Index out of range: {index}, {data.Length}"); 40Debug.Assert(data[index] == MailBnfHelper.Quote, $"Initial char at index {index} was not a quote."); 129Debug.Assert(0 <= index && index < data.Length, $"Index out of range: {index}, {data.Length}");
System\Net\Mime\MediaTypeMap.cs (5)
734Debug.Assert(ExtensionToMediaTypeCount == s_extensionToMediaType.Dictionary.Count, 738Debug.Assert( 745Debug.Assert(MediaTypeToExtensionCount == s_mediaTypeToExtension.Dictionary.Count, 749Debug.Assert( 756Debug.Assert(longestExtensionLength == MaxExtensionLength,
System.Net.NameResolution (3)
src\runtime\src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (1)
16Debug.Assert(bytesWritten == sizeof(uint) || bytesWritten == Interop.Sys.IPv6AddressBytes, $"Unexpected length: {bytesWritten}");
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
27Debug.Assert(err == Interop.Error.SUCCESS, $"Unexpected err: {err}");
System\Net\NameResolutionTelemetry.cs (1)
139Debug.Assert(host is not null, $"Unknown hostNameOrAddress type: {hostNameOrAddress.GetType().Name}");
System.Net.Ping (3)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
27Debug.Assert(err == Interop.Error.SUCCESS, $"Unexpected err: {err}");
System\Net\NetworkInformation\Ping.cs (2)
101Debug.Assert(currentStatus == Disposed, $"Expected currentStatus == Disposed, got {currentStatus}"); 121Debug.Assert(_status == InProgress, $"Invalid status: {_status}");
System.Net.Primitives (1)
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
27Debug.Assert(err == Interop.Error.SUCCESS, $"Unexpected err: {err}");
System.Net.Quic (12)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
105Debug.Assert(byteCount <= ActiveLength, $"Expected {byteCount} <= {ActiveLength}");
src\runtime\src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (8)
71Debug.Assert(byteCount <= ActiveMemory.Length, $"MultiArrayBuffer.Discard: Expected byteCount={byteCount} <= {ActiveMemory.Length}"); 121Debug.Assert(byteCount <= AvailableMemory.Length, $"MultiArrayBuffer.Commit: Expected byteCount={byteCount} <= {AvailableMemory.Length}"); 220Debug.Assert(_activeStart / BlockSize == 0, $"Start is not in first block after move or resize?? _activeStart={_activeStart}"); 257Debug.Assert(_allocatedEnd % BlockSize == 0, $"_allocatedEnd={_allocatedEnd} not at block boundary?"); 279Debug.Assert(_activeStart == 0, $"No active bytes but _activeStart={_activeStart}"); 355Debug.Assert(0 <= startInBlock, $"Invalid startInBlock={startInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}"); 356Debug.Assert(startInBlock < endInBlock, $"Invalid startInBlock={startInBlock}, endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}"); 357Debug.Assert(endInBlock <= BlockSize, $"Invalid endInBlock={endInBlock}. blockIndex={blockIndex}, _blocks.Length={_blocks.Length}, _start={_start}, _length={_length}");
src\runtime\src\libraries\Common\src\System\Net\Security\CertificateValidation.Unix.cs (1)
60Debug.Assert(hostNameMatch == 0 || hostNameMatch == 1, $"Expected 0 or 1 from CheckX509Hostname, got {hostNameMatch}");
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
27Debug.Assert(err == Interop.Error.SUCCESS, $"Unexpected err: {err}");
System\Net\Quic\QuicConnection.cs (1)
634Debug.Assert(_negotiatedSslProtocol == SslProtocols.Tls13, $"Unexpected TLS version {info.TlsProtocolVersion}");
System.Net.Requests (1)
System\Net\WebRequest.cs (1)
364Debug.Assert(prefixList.Count == Count, $"Expected {Count}, got {prefixList.Count}");
System.Net.Security (6)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (1)
22Debug.Assert((offset >= 0 && offset < destination.Length) || destination.Length == 0, $"invalid offset {offset}");
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (1)
76Debug.Assert(ret == 0, $"Unexpected response from X509DecodeOcspToExpiration: {ret}");
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
910Debug.Assert(
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
105Debug.Assert(byteCount <= ActiveLength, $"Expected {byteCount} <= {ActiveLength}");
src\runtime\src\libraries\Common\src\System\Net\Security\CertificateValidation.Unix.cs (1)
60Debug.Assert(hostNameMatch == 0 || hostNameMatch == 1, $"Expected 0 or 1 from CheckX509Hostname, got {hostNameMatch}");
System\Net\Security\SslConnectionInfo.Unix.cs (1)
35Debug.Assert(data != 0, $"No mapping found for cipherSuite {cipherSuite}");
System.Net.ServerSentEvents (7)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
105Debug.Assert(byteCount <= ActiveLength, $"Expected {byteCount} <= {ActiveLength}");
System\Net\ServerSentEvents\SseParser_1.cs (6)
269Debug.Assert(searchOffset >= _lineOffset, $"{searchOffset}, {_lineLength}"); 270Debug.Assert(searchOffset <= _lineOffset + _lineLength, $"{searchOffset}, {_lineOffset}, {_lineLength}"); 271Debug.Assert(searchOffset <= _lineBuffer.Length, $"{searchOffset}, {_lineBuffer.Length}"); 273Debug.Assert(searchLength >= 0, $"{searchLength}"); 274Debug.Assert(searchLength <= _lineLength, $"{searchLength}, {_lineLength}"); 547Debug.Assert(_lineOffset == 0, $"Expected _lineOffset == 0, got {_lineOffset}");
System.Net.Sockets (41)
src\runtime\src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (1)
16Debug.Assert(bytesWritten == sizeof(uint) || bytesWritten == Interop.Sys.IPv6AddressBytes, $"Unexpected length: {bytesWritten}");
src\runtime\src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
27Debug.Assert(err == Interop.Error.SUCCESS, $"Unexpected err: {err}");
System\Net\Sockets\SafeSocketHandle.cs (2)
158Debug.Assert(ExceptionCheck.IsFatal(exception), $"handle:{handle}, error:{exception}"); 166Debug.Assert(ret, $"ReleaseHandle failed. handle:{handle}");
System\Net\Sockets\SafeSocketHandle.Unix.cs (2)
166Debug.Assert(value == -1 || value > 0, $"Unexpected value: {value}"); 179Debug.Assert(value == -1 || value > 0, $"Unexpected value: {value}");
System\Net\Sockets\Socket.Unix.cs (1)
297Debug.Assert(Equals(origValue, cloneValue), $"{pi.Name}. Expected: {origValue}, Actual: {cloneValue}");
System\Net\Sockets\SocketAsyncContext.Unix.cs (22)
164Debug.Assert(oldState == State.Waiting, $"Unexpected operation state: {(State)oldState}"); 182Debug.Assert(state is State.Running or State.RunningWithPendingCancellation, $"Unexpected operation state: {(State)state}"); 258Debug.Assert(!Interlocked.Exchange(ref _callbackQueued, true), $"Unexpected _callbackQueued: {_callbackQueued}"); 627Debug.Assert(ErrorCode == SocketError.Success || AcceptedFileDescriptor == (IntPtr)(-1), $"Unexpected values: ErrorCode={ErrorCode}, AcceptedFileDescriptor={AcceptedFileDescriptor}"); 1048Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!"); 1076Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!"); 1107Debug.Assert(_state == QueueState.Processing, $"_state={_state} while processing queue!"); 1397Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}"); 1472Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}"); 1479Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}"); 1497Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}"); 1507Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}"); 1535Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}"); 1562Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}"); 1640Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}"); 1785Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}"); 1854Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}"); 1891Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}"); 1983Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}"); 2015Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}"); 2094Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}"); 2164Debug.Assert(timeout == -1 || timeout > 0, $"Unexpected timeout: {timeout}");
System\Net\Sockets\SocketAsyncEngine.Unix.cs (1)
227Debug.Assert(numEvents > 0, $"Unexpected numEvents: {numEvents}");
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
543Debug.Assert(status == OperationState.InProgress || status == OperationState.Configuring || status == OperationState.Disposed, $"Unexpected status: {status}");
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (1)
55Debug.Assert(acceptHandle == null, $"Unexpected acceptHandle: {acceptHandle}");
System\Net\Sockets\SocketPal.Unix.cs (9)
89Debug.Assert(fd == (IntPtr)(-1), $"Unexpected fd: {fd}"); 673Debug.Assert(socketAddress.Length > 0, $"Unexpected socketAddressLen: {socketAddress.Length}"); 747Debug.Assert(err == Interop.Error.EBADF, $"Unexpected err: {err}"); 1534Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName: {optionName}"); 1557Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}"); 1705Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}"); 1730Debug.Assert(optionName == SocketOptionName.AddMembership || optionName == SocketOptionName.DropMembership, $"Unexpected optionName={optionName}"); 1950Debug.Assert(offset == eventsLength, $"Invalid adds. offset={offset}, eventsLength={eventsLength}."); 1951Debug.Assert(refsAdded == eventsLength, $"Invalid ref adds. refsAdded={refsAdded}, eventsLength={eventsLength}.");
System.Net.WebSockets (10)
System\Net\WebSockets\ManagedWebSocket.cs (10)
146Debug.Assert(keepAliveInterval == Timeout.InfiniteTimeSpan || keepAliveInterval >= TimeSpan.Zero, $"Invalid {nameof(keepAliveInterval)}: {keepAliveInterval}"); 147Debug.Assert(keepAliveTimeout == Timeout.InfiniteTimeSpan || keepAliveTimeout >= TimeSpan.Zero, $"Invalid {nameof(keepAliveTimeout)}: {keepAliveTimeout}"); 715Debug.Assert(sendBuffer.Length >= MaxMessageHeaderLength, $"Expected {nameof(sendBuffer)} to be at least {MaxMessageHeaderLength}, got {sendBuffer.Length}"); 890Debug.Assert(header.Opcode == MessageOpcode.Binary || header.Opcode == MessageOpcode.Text, $"Unexpected opcode {header.Opcode}"); 1456Debug.Assert( 1596Debug.Assert(count >= 0, $"Expected non-negative {nameof(count)}, got {count}"); 1597Debug.Assert(count <= _receiveBufferCount, $"Trying to consume {count}, which is more than exists {_receiveBufferCount}"); 1606Debug.Assert(minimumRequiredBytes <= _receiveBuffer.Length, $"Requested number of bytes {minimumRequiredBytes} must not exceed {_receiveBuffer.Length}"); 1672Debug.Assert(maskOffsetIndex < MaskLength, $"Unexpected {nameof(maskOffsetIndex)}: {maskOffsetIndex}"); 1673Debug.Assert(mask.Length >= MaskLength + maskOffset, $"Unexpected inputs: {mask.Length}, {maskOffset}");
System.Numerics.Tensors (1)
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (1)
198Debug.Assert(count >= 0 && count <= x.Length, $"Expected count to be in the range [0, {x.Length}], got {count}.");
System.Private.CoreLib (55)
src\runtime\src\libraries\Common\src\System\Number.NumberBuffer.cs (1)
81Debug.Assert(char.IsAsciiDigit((char)digit), $"Unexpected character found in Number: {digit}");
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.ThreadPoolValueTaskSource.cs (1)
56Debug.Assert(op == Operation.None, $"An operation was queued before the previous {op}'s completion.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Encoder.cs (1)
207Debug.Assert(buffer.Length == charsWritten, $"The source length: {source.Length}, chars written: {charsWritten}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (1)
162Debug.Assert(buffer.Length == charsWritten, $"The source length: {source.Length}, bytes written: {charsWritten}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueueSegment.cs (2)
48Debug.Assert(boundedLength >= 2, $"Must be >= 2, got {boundedLength}"); 49Debug.Assert(BitOperations.IsPow2(boundedLength), $"Must be a power of 2, got {boundedLength}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
2366Debug.Assert(buffer.Length == charsWritten, $"Expected {buffer.Length} == {charsWritten}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (2)
2015Debug.Assert(foundItemsCount >= 2 && foundItemsCount <= 64, $"{nameof(foundItemsCount)} == {foundItemsCount}"); 2110Debug.Assert(foundItems.Length >= 2, $"{nameof(foundItems)} == {foundItems.Length}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Icu.cs (1)
332Debug.Assert(!unsupportedDateFieldSymbols.Contains(input[index]),
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (1)
2204Debug.Assert(index >= 10, $"Couldn't read native digits for '{_sWindowsName}' successfully.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (1)
659Debug.Assert(hebrewYearType >= 1 && hebrewYearType <= 6,
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\BufferedStream.cs (5)
383Debug.Assert(_readPos <= _readLen, $"_readPos <= _readLen [{_readPos} <= {_readLen}]"); 933Debug.Assert(_writePos < _bufferSize, $"Expected {_writePos} < {_bufferSize}"); 1229Debug.Assert(newPos == Position, $"newPos (={newPos}) == Position (={Position})"); 1255Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}"); 1294Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEntry.Unix.cs (1)
86Debug.Assert(Directory.Length + FileName.Length < _pathBuffer.Length,
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileSystemInfo.Unix.cs (1)
24Debug.Assert(!PathInternal.IsPartiallyQualified(fullPath), $"'{fullPath}' should be fully qualified when constructed from directory enumeration");
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (4)
851Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}"); 882Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}"); 941Debug.Assert(newPos == Position, $"newPos (={newPos}) == Position (={Position})"); 979Debug.Assert(_readPos <= _readLen, $"_readPos <= _readLen [{_readPos} <= {_readLen}]");
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\OSFileStreamStrategy.cs (1)
221Debug.Assert(r >= 0, $"RandomAccess.ReadAtOffset returned {r}.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Math.cs (2)
1642Debug.Assert(ret == result, $"Multiply overflow got: {ret}, expected: {result}"); 1685Debug.Assert(ret == left * right, $"Multiply overflow got: {ret}, expected: {left * right}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (1)
5994Debug.Assert(_splitMode == SpanSplitEnumeratorMode.SearchValues, $"Unknown split mode: {_splitMode}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (1)
675Debug.Assert(s_lookupTable.Count == 253, $"There should be 253 HTML entities, but {nameof(s_lookupTable)} has {s_lookupTable.Count} of them.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (1)
638Debug.Assert((styles & ~TParser.AllowedStyles) == 0, $"Only handles subsets of {TParser.AllowedStyles} format");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (3)
732Debug.Assert(result >= minInclusive && result < maxExclusive, $"Expected {minInclusive} <= {result} < {maxExclusive}"); 736Debug.Assert(result == minInclusive, $"Expected {minInclusive} == {result}"); 743Debug.Assert(result >= 0.0 && result < 1.0, $"Expected 0.0 <= {result} < 1.0");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (2)
191Debug.Assert(index >= 0 && index < _numResources, $"Bad index into hash array. index: {index}"); 207Debug.Assert(index >= 0 && index < _numResources, $"Bad index into name position array. index: {index}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (1)
474Debug.Assert(m_stateObject is null or ExecutionContext, $"Expected {nameof(m_stateObject)} to be null or an ExecutionContext but was {(m_stateObject is object o ? o.GetType().ToString() : "(null)")}.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (3)
387Debug.Assert(s_perCoreCache.Length == Environment.ProcessorCount, $"{s_perCoreCache.Length} != {Environment.ProcessorCount}"); 396Debug.Assert(transientValue is null || transientValue is StateMachineBox<TStateMachine>, 420Debug.Assert(s is StateMachineBox<TStateMachine>, $"Expected {nameof(StateMachineBox<TStateMachine>)}, got '{s}'");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\GCSettings.cs (1)
49Debug.Assert(status == SetLatencyModeStatus.Succeeded, $"Unexpected return value '{status}' from {nameof(SetGCLatencyMode)}.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\SR.cs (1)
97Debug.Assert(s != null, $"Looking up resource '{key}' failed. Was your resource name misspelled? Did you rebuild after adding a resource?");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderLatin1BestFitFallback.cs (2)
42Debug.Assert(_iCount < 1, $"[EncoderLatin1BestFitFallbackBuffer.Fallback(non surrogate)] Fallback char {(int)_cBestFit:X4} caused recursive fallback"); 68Debug.Assert(_iCount < 1, $"[EncoderLatin1BestFitFallbackBuffer.Fallback(surrogate)] Fallback char {(int)_cBestFit:X4} caused recursive fallback");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (2)
2195Debug.Assert(oldValue.Length > Math.Min(count, chunk.m_ChunkLength - indexInChunk), 2215Debug.Assert(indexInChunk >= chunk.m_ChunkLength || count == 0,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (2)
829Debug.Assert(exceptionList.Count > 0, $"Expected {exceptionList.Count} > 0"); 938Debug.Assert(s is CancellationTokenSource, $"Expected {typeof(CancellationTokenSource)}, got {s}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (2)
299Debug.Assert(_numPendingRemoves <= _numUserWaits, $"Num removals {_numPendingRemoves} should be less than or equal to num user waits {_numUserWaits}"); 354Debug.Assert(originalNumUserWaits - originalNumPendingRemoves == _numUserWaits,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (5)
261Debug.Assert(context is TaskScheduler or SynchronizationContext, $"context is {context}"); 276Debug.Assert(scheduler is SynchronizationContext or TaskScheduler, $"{nameof(scheduler)} is {scheduler}"); 296Debug.Assert( 318Debug.Assert(cc._scheduler is TaskScheduler, $"{nameof(cc._scheduler)} is {cc._scheduler}"); 337Debug.Assert(capturedContext is ExecutionContext or CapturedSchedulerAndExecutionContext, $"{nameof(capturedContext)} is {capturedContext}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
6298Debug.Assert(failedOrCanceled is Task, $"Expected Task, got {failedOrCanceled}");
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (1)
64Debug.Assert(parsedName.GetNodeCount() == recursiveDepth, $"Node count mismatch for '{typeName.ToString()}'");
System.Private.DataContractSerialization (1)
System\Xml\ValueHandle.cs (1)
772Debug.Assert(byteOffset + actualByteCount < bytes.Length,
System.Private.Reflection.Execution (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SR.cs (1)
97Debug.Assert(s != null, $"Looking up resource '{key}' failed. Was your resource name misspelled? Did you rebuild after adding a resource?");
System.Private.TypeLoader (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\SR.cs (1)
97Debug.Assert(s != null, $"Looking up resource '{key}' failed. Was your resource name misspelled? Did you rebuild after adding a resource?");
System.Private.Uri (3)
System\IPv4AddressHelper.cs (1)
18Debug.Assert(result != Invalid, $"Failed to parse after already validated: {str}");
System\PercentEncodingHelper.cs (2)
89Debug.Assert(bytesConsumed >= 2, $"Rune.DecodeFromUtf8 consumed {bytesConsumed} bytes, likely indicating input was modified concurrently during UnescapePercentEncodedUTF8Sequence's execution"); 105Debug.Assert(bytesConsumed > 0, $"Rune.DecodeFromUtf8 consumed {bytesConsumed} bytes when decoding {bytesLeftInBuffer} bytes");
System.Private.Windows.Core (1)
Windows\Win32\Foundation\HRESULT.cs (1)
58public void AssertSuccess() => Debug.Assert(Succeeded, $"Result failed: {this}");
System.Private.Xml (42)
System\Xml\Cache\XPathNode.cs (3)
372Debug.Assert(lineNumOffset >= 0 && lineNumOffset <= MaxLineNumberOffset, $"Line number offset too large or small: {lineNumOffset}"); 373Debug.Assert(linePosOffset >= 0 && linePosOffset <= MaxLinePositionOffset, $"Line position offset too large or small: {linePosOffset}"); 383Debug.Assert(posOffset >= 0 && posOffset <= MaxCollapsedPositionOffset, $"Collapsed text line position offset too large or small: {posOffset}");
System\Xml\Schema\XsdDateTime.cs (1)
213Debug.Assert(dateTime.Kind == DateTimeKind.Local, $"Unknown DateTimeKind: {dateTime.Kind}");
System\Xml\XPath\XPathNavigatorReader.cs (1)
1028Debug.Assert(_nav.NodeType == XPathNodeType.Element, $"{_nav.NodeType} == XPathNodeType.Element");
System\Xml\Xsl\IlGen\IteratorDescriptor.cs (3)
100Debug.Assert(loc.LocalType == itemStorageType || 117Debug.Assert(currentMethod.ReturnType == itemStorageType, 133Debug.Assert(methGlobal.ReturnType == itemStorageType ||
System\Xml\Xsl\IlGen\OptimizerPatterns.cs (1)
236Debug.Assert(arg != null, $"There is no '{argNum}' argument.");
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (1)
5432Debug.Assert(left.XmlType == right.XmlType, $"Comparison is not defined between {left.XmlType} and {right.XmlType}");
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (2)
1753Debug.Assert(code != XmlTypeCode.QName, $"QName values do not support the {relOp} operation"); 4694Debug.Assert(_iterCurr.Storage.Location == ItemLocation.None ||
System\Xml\Xsl\Runtime\EarlyBoundInfo.cs (1)
28Debug.Assert(_constrInfo != null, $"The early bound object type {ebType.FullName} must have a public default constructor");
System\Xml\Xsl\Runtime\TreeIterators.cs (1)
930Debug.Assert(_state == IteratorState.NoNext, $"Illegal state: {_state}");
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (17)
418Debug.Assert(_xstate == XmlState.WithinSequence, $"StartTree cannot be called in the {_xstate} state."); 429Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"EndTree cannot be called in the {_xstate} state."); 445Debug.Assert(_xstate == XmlState.WithinContent, $"WriteStartElement cannot be called in the {_xstate} state."); 468Debug.Assert(_xstate == XmlState.EnumAttrs, $"StartElementContent cannot be called in the {_xstate} state."); 483Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"WriteEndElement cannot be called in the {_xstate} state."); 503Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteStartAttribute cannot be called in the {_xstate} state."); 522Debug.Assert(_xstate == XmlState.WithinAttr, $"WriteEndAttribute cannot be called in the {_xstate} state."); 538Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteNamespaceDeclaration cannot be called in the {_xstate} state."); 571Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlock cannot be called in the {_xstate} state."); 580Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlockNoEntities cannot be called in the {_xstate} state."); 761Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteNamespaceString cannot be called in the {_xstate} state."); 770Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteEndNamespace cannot be called in the {_xstate} state."); 800Debug.Assert(_xstate == XmlState.WithinComment, $"WriteCommentString cannot be called in the {_xstate} state."); 809Debug.Assert(_xstate == XmlState.WithinComment, $"WriteEndComment cannot be called in the {_xstate} state."); 843Debug.Assert(_xstate == XmlState.WithinPI, $"WriteProcessingInstructionString cannot be called in the {_xstate} state."); 852Debug.Assert(_xstate == XmlState.WithinPI, $"WriteEndProcessingInstruction cannot be called in the {_xstate} state."); 1205Debug.Assert(_xstate == XmlState.WithinContent, $"EndCopy cannot be called in the {_xstate} state.");
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (3)
483Debug.Assert(destinationType == typeof(object) || !destinationType.IsAssignableFrom(value.GetType()), 558Debug.Assert(destinationType.IsAssignableFrom(value.GetType()), $"ChangeType from type {value.GetType().Name} to type {destinationType.Name} failed"); 680Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()), $"Xml type {xmlType} is not represented in ILGen as {value.GetType().Name}");
System\Xml\Xsl\Runtime\XslNumber.cs (1)
298Debug.Assert(CharUtil.IsDecimalDigitOne(startChar), $"Unexpected startChar: {startChar}");
System\Xml\Xsl\Runtime\XsltConvert.cs (2)
49Debug.Assert(itemType == typeof(bool), $"Unexpected type of atomic sequence {itemType}"); 93Debug.Assert(itemType == typeof(bool), $"Unexpected type of atomic sequence {itemType}");
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
340Debug.Assert(itemType == typeof(bool), $"Unexpected type of atomic value {itemType}");
System\Xml\Xsl\Runtime\XsltLibrary.cs (1)
353Debug.Assert(itemType == typeof(bool), $"Unexpected type of atomic value {itemType}");
System\Xml\Xsl\XPath\XPathQilFactory.cs (1)
170Debug.Assert(IsAnyType(n), $"Unexpected expression type: {n.XmlType}");
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (1)
311Debug.Assert(
System\Xml\Xsl\Xslt\XsltQilFactory.cs (1)
37Debug.Assert(xt.IsNode, $"Unexpected expression type: {xt}");
System.Reflection.Metadata (2)
System\Reflection\Metadata\Internal\StringHeap.cs (1)
116Debug.Assert(s_virtualValues[i] != null, $"Missing virtual value for StringHandle.VirtualIndex.{(StringHandle.VirtualIndex)i}");
System\Reflection\Metadata\TypeNameParser.cs (1)
64Debug.Assert(parsedName.GetNodeCount() == recursiveDepth, $"Node count mismatch for '{typeName.ToString()}'");
System.Resources.Extensions (3)
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
617Debug.Assert(typeCode >= ResourceTypeCode.StartOfUserTypes, $"ResourceReader: Unsupported ResourceTypeCode in .resources file! {typeCode}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (2)
191Debug.Assert(index >= 0 && index < _numResources, $"Bad index into hash array. index: {index}"); 207Debug.Assert(index >= 0 && index < _numResources, $"Bad index into name position array. index: {index}");
System.Resources.Writer (1)
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
617Debug.Assert(typeCode >= ResourceTypeCode.StartOfUserTypes, $"ResourceReader: Unsupported ResourceTypeCode in .resources file! {typeCode}");
System.Runtime.Caching (1)
System\Runtime\Caching\CacheUsage.cs (1)
682Debug.Assert(maxFlush > 0, $"maxFlush is not greater than 0, instead is {maxFlush}");
System.Runtime.Numerics (2)
src\runtime\src\libraries\Common\src\System\Number.NumberBuffer.cs (1)
81Debug.Assert(char.IsAsciiDigit((char)digit), $"Unexpected character found in Number: {digit}");
System\Numerics\BigInteger.cs (1)
1534Debug.Assert(mode is GetBytesMode.AllocateArray or GetBytesMode.Count or GetBytesMode.Span, $"Unexpected mode {mode}.");
System.Security.Cryptography (16)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\DSACng.ImportExport.cs (8)
215Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB)}"); 225Debug.Assert(offset == blobSize, $"Expected offset = blobSize, got {offset} != {blobSize}"); 280Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB_V2), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB_V2), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB_V2)}"); 290Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB_V2), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB_V2), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB_V2)}"); 307Debug.Assert(offset == blobSize, $"Expected offset = blobSize, got {offset} != {blobSize}"); 363Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB)}"); 395Debug.Assert(offset == sizeof(BCRYPT_DSA_KEY_BLOB_V2), $"Expected offset = sizeof(BCRYPT_DSA_KEY_BLOB_V2), got {offset} != {sizeof(BCRYPT_DSA_KEY_BLOB_V2)}"); 415Debug.Assert(offset == dsaBlob.Length, $"Expected offset = dsaBlob.Length, got {offset} != {dsaBlob.Length}");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (1)
229Debug.Assert(cipher.BlockSize <= 128, $"Encountered unexpected block size: {cipher.BlockSize}");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (1)
86Debug.Assert(
System\Security\Cryptography\CapiHelper.Windows.cs (1)
875Debug.Assert(cbKey >= 0, $"cbKey is less than 0 ({cbKey})");
System\Security\Cryptography\HKDFManagedImplementation.cs (2)
15Debug.Assert(written == prk.Length, $"Bytes written is {written} bytes which does not match output length ({prk.Length} bytes)"); 97Debug.Assert(written == output.Length, $"Bytes written is {written} bytes which does not match output length ({output.Length} bytes)");
System\Security\Cryptography\LiteHash.Windows.cs (1)
360Debug.Assert(destination.Length >= _hashSizeInBytes, $"{destination.Length} >= {_hashSizeInBytes}");
System\Security\Cryptography\OidLookup.cs (2)
109Debug.Assert(s_friendlyNameToOid.Count == FriendlyNameToOidCount, 111Debug.Assert(s_oidToFriendlyName.Count == OidToFriendlyNameCount,
System.Security.Cryptography.Pkcs (5)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (1)
229Debug.Assert(cipher.BlockSize <= 128, $"Encountered unexpected block size: {cipher.BlockSize}");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (1)
86Debug.Assert(
System\Security\Cryptography\Pkcs\CmsSignature.cs (2)
175Debug.Assert( 234Debug.Assert(
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (1)
381Debug.Assert(hashAlgorithmName == HashAlgorithmName.MD5, $"Unsupported digest algorithm '{hashAlgorithmName.Name}'");
System.Text.Encoding.CodePages (16)
System\Text\BaseCodePageEncoding.cs (1)
348Debug.Assert(pCodePageIndex->ByteCount == 1 || pCodePageIndex->ByteCount == 2,
System\Text\DBCSCodePageEncoding.cs (1)
392Debug.Assert((arrayTemp.Length / 2) < 20,
System\Text\EncoderBestFitFallback.cs (2)
75Debug.Assert(_iCount < 1, $"[InternalEncoderBestFitFallbackBuffer.Fallback(non surrogate)] Fallback char {(int)_cBestFit:X4} caused recursive fallback"); 97Debug.Assert(_iCount < 1, $"[InternalEncoderBestFitFallbackBuffer.Fallback(surrogate)] Fallback char {(int)_cBestFit:X4} caused recursive fallback");
System\Text\GB18030Encoding.cs (4)
190Debug.Assert(count4Byte == GBLast4ByteCode + 1, 244Debug.Assert(char.IsHighSurrogate(charLeftOver), 274Debug.Assert(offset < 0x6f, 324Debug.Assert(iBytes < 0x7e,
System\Text\ISCIIEncoding.cs (6)
60Debug.Assert(_defaultCodePage >= CodeDevanagari && _defaultCodePage <= CodePunjabi, 239Debug.Assert(currentCodePage >= CodeDevanagari && currentCodePage <= CodePunjabi, 254Debug.Assert((indicTwoBytes >> 12) > 0 && (indicTwoBytes >> 12) <= 3, 352Debug.Assert(currentCodePage >= CodeDevanagari && currentCodePage <= CodePunjabi, 372Debug.Assert(((bLastVirama ? 1 : 0) + (bLastATR ? 1 : 0) + 600Debug.Assert(currentCodePage == CodeDevanagari && b == DevenagariExt,
System\Text\SBCSCodePageEncoding.cs (2)
171Debug.Assert(arrayTemp[byteTemp] == UNKNOWN_CHAR, $"[SBCSCodePageEncoding::ReadBestFitTable] Expected unallocated byte (not 0x{(int)arrayTemp[byteTemp]:X2}) for best fit byte at 0x{byteTemp:X2} for code page {CodePage}"); 270Debug.Assert(arrayTemp[iBestFitCount - 1] != (char)0,
System.Text.Json (25)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
105Debug.Assert(byteCount <= ActiveLength, $"Expected {byteCount} <= {ActiveLength}");
System\Text\Json\BitStack.cs (7)
80Debug.Assert(index >= 0, $"Set - Negative - index: {index}, arrayLength: {_array.Length}"); 83Debug.Assert(_array.Length <= int.MaxValue / 32 + 1, $"index: {index}, arrayLength: {_array.Length}"); 92Debug.Assert(index >= 0 && index > (int)((uint)_array.Length * 32 - 1), $"Only grow when necessary - index: {index}, arrayLength: {_array.Length}"); 96Debug.Assert(elementIndex < _array.Length, $"Set - index: {index}, elementIndex: {elementIndex}, arrayLength: {_array.Length}, extraBits: {extraBits}"); 145Debug.Assert(index >= 0, $"Get - Negative - index: {index}, arrayLength: {_array.Length}"); 149Debug.Assert(elementIndex < _array.Length, $"Get - index: {index}, elementIndex: {elementIndex}, arrayLength: {_array.Length}, extraBits: {extraBits}"); 165Debug.Assert(_array.Length < int.MaxValue / 2, $"Array too large - arrayLength: {_array.Length}");
System\Text\Json\Document\JsonDocument.MetadataDb.cs (6)
263Debug.Assert(index <= Length - DbRow.Size, $"index {index} is out of bounds"); 264Debug.Assert(index % DbRow.Size == 0, $"index {index} is not at a record start position"); 341Debug.Assert( 354Debug.Assert( 360Debug.Assert( 366Debug.Assert(
System\Text\Json\Document\JsonDocument.Parse.cs (4)
583Debug.Assert( 587Debug.Assert( 607Debug.Assert( 611Debug.Assert(
System\Text\Json\Document\JsonDocument.PropertyNameSet.cs (1)
126Debug.Assert(success, $"Property name {propertyName} should not already exist in the set.");
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (1)
20Debug.Assert(TypeIsSupportedPrimitive, $"The type {typeof(TValue)} is not a supported primitive.");
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableConverterFactory.cs (1)
25Debug.Assert(asyncEnumerableInterface is not null, $"{typeToConvert} not supported by converter.");
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (4)
421Debug.Assert( 425Debug.Assert( 441Debug.Assert( 445Debug.Assert(
System.Text.RegularExpressions (68)
System\Text\RegularExpressions\RegexCharClass.cs (2)
197Debug.Assert( 204Debug.Assert(string.Compare(s_propTable[i][0], s_propTable[i + 1][0], StringComparison.Ordinal) < 0, $"RegexCharClass s_propTable is out of order at ({s_propTable[i][0]}, {s_propTable[i + 1][0]})");
System\Text\RegularExpressions\RegexCompiler.cs (42)
1673Debug.Assert(node.Kind is RegexNodeKind.Alternate, $"Unexpected type: {node.Kind}"); 1674Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}"); 2095Debug.Assert(multi.Kind is RegexNodeKind.Multi, $"Expected a Multi node, got {multi.Kind}"); 2105Debug.Assert(node.Kind is RegexNodeKind.Backreference, $"Unexpected type: {node.Kind}"); 2295Debug.Assert(node.Kind is RegexNodeKind.BackreferenceConditional, $"Unexpected type: {node.Kind}"); 2296Debug.Assert(node.ChildCount() == 2, $"Expected 2 children, found {node.ChildCount()}"); 2454Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}"); 2455Debug.Assert(node.ChildCount() == 3, $"Expected 3 children, found {node.ChildCount()}"); 2647Debug.Assert(node.Kind is RegexNodeKind.Capture, $"Unexpected type: {node.Kind}"); 2648Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}"); 2773Debug.Assert(node.Kind is RegexNodeKind.PositiveLookaround, $"Unexpected type: {node.Kind}"); 2774Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}"); 2817Debug.Assert(node.Kind is RegexNodeKind.NegativeLookaround, $"Unexpected type: {node.Kind}"); 2818Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}"); 3076Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround or RegexNodeKind.ExpressionConditional, $"Unexpected type: {node.Kind}"); 3077Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional ? node.ChildCount() >= 1 : node.ChildCount() == 1, $"Unexpected number of children: {node.ChildCount()}"); 3120Debug.Assert(node.Kind is RegexNodeKind.UpdateBumpalong, $"Unexpected type: {node.Kind}"); 3140Debug.Assert(node.Kind is RegexNodeKind.Concatenate, $"Unexpected type: {node.Kind}"); 3141Debug.Assert(node.ChildCount() >= 2, $"Expected at least 2 children, found {node.ChildCount()}"); 3211Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}"); 3286Debug.Assert(node.Kind is RegexNodeKind.Boundary or RegexNodeKind.NonBoundary or RegexNodeKind.ECMABoundary or RegexNodeKind.NonECMABoundary, $"Unexpected type: {node.Kind}"); 3346Debug.Assert(node.Kind is RegexNodeKind.Beginning or RegexNodeKind.Start or RegexNodeKind.Bol or RegexNodeKind.End or RegexNodeKind.EndZ or RegexNodeKind.Eol, $"Unexpected type: {node.Kind}"); 3484Debug.Assert(node.Kind is RegexNodeKind.Multi, $"Unexpected type: {node.Kind}"); 3536Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop, $"Unexpected type: {node.Kind}"); 3811Debug.Assert(node.Kind is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy, $"Unexpected type: {node.Kind}"); 4158Debug.Assert(node.Kind is RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}"); 4159Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 4160Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}"); 4161Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}"); 4530Debug.Assert(node.IsOneFamily || node.IsNotoneFamily || node.IsSetFamily, $"Unexpected type: {node.Kind}"); 4680Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}"); 4927Debug.Assert(node.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic, $"Unexpected type: {node.Kind}"); 5016Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}"); 5017Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 5018Debug.Assert(node.M == node.N, $"Unexpected M={node.M} == N={node.N}"); 5019Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}"); 5020Debug.Assert(!analysis.MayBacktrack(node.Child(0)), $"Expected non-backtracking node {node.Kind}"); 5054Debug.Assert(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop, $"Unexpected type: {node.Kind}"); 5055Debug.Assert(node.M < int.MaxValue, $"Unexpected M={node.M}"); 5056Debug.Assert(node.N >= node.M, $"Unexpected M={node.M}, N={node.N}"); 5057Debug.Assert(node.ChildCount() == 1, $"Expected 1 child, found {node.ChildCount()}"); 6480Debug.Assert(chars.Length > 3, $"chars.Length == {chars.Length}");
System\Text\RegularExpressions\RegexFindOptimizations.cs (2)
86Debug.Assert(maxLength >= MinRequiredLength, $"{maxLength} should have been greater than {MinRequiredLength} minimum"); 865Debug.Assert(FindMode == FindNextStartingPositionMode.NoSearch, $"Unexpected FindMode {FindMode}");
System\Text\RegularExpressions\RegexNode.cs (12)
256Debug.Assert(child.Parent == node, $"{child.Describe()} missing reference to parent {node.Describe()}"); 298Debug.Assert(childCount == 0, $"Expected zero children for {node.Kind}, got {childCount}."); 307Debug.Assert(childCount == 1, $"Expected one and only one child for {node.Kind}, got {childCount}."); 311Debug.Assert(childCount == 2, $"Expected two children for {node.Kind}, got {childCount}"); 315Debug.Assert(childCount == 3, $"Expected three children for {node.Kind}, got {childCount}"); 320Debug.Assert(childCount >= 2, $"Expected at least two children for {node.Kind}, got {childCount}."); 333Debug.Assert(node.Str.Length >= 2, $"Expected {node.Str} to be at least two characters"); 340Debug.Assert(!string.IsNullOrEmpty(node.Str), $"Expected non-null, non-empty string for {node.Kind}."); 344Debug.Assert(node.Str is null, $"Expected null string for {node.Kind}, got \"{node.Str}\"."); 355Debug.Assert((node.Options & RegexOptions.IgnoreCase) == 0, $"{node.Kind} node should not have RegexOptions.IgnoreCase"); 3105Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}"); 3241Debug.Assert(Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {Kind}");
System\Text\RegularExpressions\RegexReplacement.cs (3)
36Debug.Assert(concat.Kind == RegexNodeKind.Concatenate, $"Expected Concatenate, got {concat.Kind}"); 259Debug.Assert(state.offsetAndCounts.Count % 2 == 0, $"{state.offsetAndCounts.Count}"); 260Debug.Assert(state.offsetAndCounts.Count >= 4, $"{state.offsetAndCounts.Count}");
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (2)
428Debug.Assert(cat >= 0 && cat < categoryCodes.Length, $"Expected {cat} to be in range [0, {categoryCodes.Length})."); 523Debug.Assert(Enum.IsDefined(code) || code == (UnicodeCategory)(RegexCharClass.SpaceConst - 1), $"Unknown category: {code}");
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (5)
171Debug.Assert(builder._solver is UInt64Solver or BitVectorSolver, $"Unsupported solver: {builder._solver}"); 356Debug.Assert(startat >= 0 && startat <= input.Length, $"{nameof(startat)} == {startat}, {nameof(input.Length)} == {input.Length}"); 865Debug.Assert(i >= 0, $"{nameof(i)} == {i}"); 866Debug.Assert(matchStartBoundary >= 0 && matchStartBoundary <= input.Length, $"{nameof(matchStartBoundary)} == {matchStartBoundary}"); 867Debug.Assert(i >= matchStartBoundary, $"Expected {i} >= {matchStartBoundary}.");
System.Threading.Channels (1)
System\Threading\Channels\AsyncOperation.cs (1)
420Debug.Assert(scheduler is SynchronizationContext or TaskScheduler, $"{nameof(scheduler)} is {scheduler}");
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\Parallel.ForEachAsync.cs (2)
641Debug.Assert(_completionRefCount == 0, $"Expected {nameof(_completionRefCount)} == 0, got {_completionRefCount}"); 671Debug.Assert(_scheduler == TaskScheduler.Default, $"Expected {nameof(_scheduler)} == TaskScheduler.Default, got {_scheduler}");
System.Windows.Forms (56)
System\Windows\Forms\Accessibility\AccessibleObject.cs (5)
434Debug.Assert(child is not null, $"GetChild({index}) returned null!"); 458Debug.Assert(result == HRESULT.DISP_E_MEMBERNOTFOUND, $"{nameof(GetSystemIAccessibleFocus)} failed with {result}"); 502Debug.Assert(child is not null, $"GetChild({index}) returned null!"); 526Debug.Assert(result == HRESULT.DISP_E_MEMBERNOTFOUND, $"{nameof(TryGetSystemIAccessibleSelection)} failed with {result}"); 545Debug.Assert(child is not null, $"GetChild({index}) returned null!");
System\Windows\Forms\Accessibility\AccessibleObjectExtensions.cs (11)
42Debug.Assert( 62Debug.Assert( 96Debug.Assert( 116Debug.Assert( 136Debug.Assert( 156Debug.Assert(result.Succeeded, $"{nameof(TryGetName)}: get_accName call failed with {result}"); 195Debug.Assert(result.Succeeded, $"{nameof(TryGetRole)}: get_accRole call failed with {result}"); 214Debug.Assert( 232Debug.Assert( 253Debug.Assert( 268Debug.Assert(
System\Windows\Forms\ActiveX\AxHost.cs (2)
2589Debug.Assert(baseProps[i] is not null, $"Null base prop at location: {i}"); 2625Debug.Assert(propDesc is not null, $"Cannot find cached entry for: {propName}");
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
1166Debug.Assert( 1550Debug.Assert(
System\Windows\Forms\Application.ComponentThreadContext.cs (1)
149Debug.Assert(result,
System\Windows\Forms\ComponentModel\COM2Interop\Com2AboutBoxPropertyDescriptor.AboutBoxUITypeEditor.cs (1)
34Debug.Assert(hr.Succeeded, $"Failed to launch about box. {hr}");
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (2)
27Debug.Assert(nativeValue.IsEmpty, $"Expected IUnknown, got {nativeValue.Type}"); 82Debug.Assert(nativeValue.IsEmpty, $"Expected IUnknown, got {nativeValue.Type}");
System\Windows\Forms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (2)
122Debug.Assert(typeof(Attribute).IsAssignableFrom(type), $"Attribute type {type.FullName} does not derive from Attribute"); 142Debug.Assert(typeof(Attribute).IsAssignableFrom(type), $"Attribute type {type.FullName} does not derive from Attribute");
System\Windows\Forms\ComponentModel\COM2Interop\COM2PictureConverter.cs (1)
37Debug.Assert(nativeValue.IsEmpty, $"Expected IUnknown, got {nativeValue.Type}");
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (1)
50Debug.Assert(hr.Succeeded, $"Failed to get IProvidePropertyBuilder: {hr}");
System\Windows\Forms\Control.cs (1)
1951Debug.Assert(
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (1)
184Debug.Assert(false, $"Exception in PaintOver: {ex.Message}");
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
2215Debug.Assert(insertIndex == index, $"NativeComboBox inserted at {insertIndex} not the requested index of {index}");
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
3591Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count, $"Invalid columnIndex: {columnIndex}");
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (1)
260Debug.Assert(child is not null, $"GetChild({index}) returned null");
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1603Debug.Assert(insertIndex == index, $"NativeListBox inserted at {insertIndex} not the requested index of {index}");
System\Windows\Forms\Controls\ListView\ListView.cs (1)
4148Debug.Assert(result != IntPtr.Zero, $"Doesn't contain group id: {lvItem.iGroupId}");
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (1)
235Debug.Assert(item is not null, $"Failed to get item at index {i}");
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
1102Debug.Assert(!updateOwner || result != 0, $"Doesn't contain group id: {lvItem.iGroupId}");
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1371Debug.Assert(!s_pbrsAssertPropsSwitch.Enabled, $"Bad property '{PropertyLabel}.{property.Name}': {w}");
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
3589Debug.Assert(childCount == e.NewChildCount, $"parent reports {childCount} new children, event reports {e.NewChildCount}");
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
1500Debug.Assert(keyCode is Keys.Delete or Keys.Back, $"Delete called with keyCode == {keyCode}");
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
910Debug.Assert(end <= len,
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.HostedWindowsFormsMessageHook.cs (1)
32Debug.Assert(
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.ToolStripPanelCellToControlEnumerator.cs (1)
29Debug.Assert(cell is not null, $"Expected ToolStripPanel cells only!!!{_arrayListEnumerator.Current.GetType()}");
System\Windows\Forms\Controls\TreeView\TreeNode.cs (1)
338Debug.Assert(
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (1)
397Debug.Assert(_domainIndex >= 0 || UserEdit, $"UserEdit should be true when domainIndex < 0 {UserEdit}");
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
674Debug.Assert(hr.Succeeded, $"DoVerb call failed for verb 0x{verb}"); 1170Debug.Assert(!result.Failed, $"{result}");
System\Windows\Forms\Input\CursorConverter.cs (1)
168Debug.Assert(prop.GetValue(null, tempIndex) is not null, $"Property {prop.Name} returned NULL");
System\Windows\Forms\Input\InputLanguage.cs (1)
158Debug.Assert(subKeyName.Length == 8, $"unexpected key length in registry: {subKey.Name}");
System\Windows\Forms\Layout\TableLayout.cs (5)
1435Debug.Assert(layoutInfo.Equals(oldLayoutInfo[layoutInfo.Element]), 1490Debug.Assert(containerInfo.ColumnStyles[k].SizeType == SizeType.Absolute, $"column {k} is not absolutely sized"); 1495Debug.Assert(containerInfo.ColumnStyles[k].SizeType == SizeType.Absolute, $"column {k} is not absolutely sized"); 1507Debug.Assert(containerInfo.RowStyles[k].SizeType == SizeType.Absolute, $"column {k} is not absolutely sized"); 1512Debug.Assert(containerInfo.RowStyles[k].SizeType == SizeType.Absolute, $"column {k} is not absolutely sized");
System\Windows\Forms\NativeWindow.cs (1)
484Debug.Assert(DpiAwarenessContext.IsEquivalent(controlHandleDpiContext),
System\Windows\Forms\WinCategoryAttribute.cs (1)
35Debug.Assert(localizedValue is not null, $"All Windows Forms category attributes should have localized strings. Category '{value}' not found.");
System.Windows.Forms.Design (35)
System\ComponentModel\Design\DesignSurface.cs (1)
429Debug.Assert(serviceType == typeof(IReferenceService), $"Demand created service not supported: {serviceType.Name}");
System\ComponentModel\Design\InheritedPropertyDescriptor.cs (2)
25Debug.Assert(propertyDescriptor is not InheritedPropertyDescriptor, $"Recursive inheritance propertyDescriptor {propertyDescriptor}"); 126Debug.Assert(value is not InheritedPropertyDescriptor, $"Recursive inheritance propertyDescriptor {_propertyDescriptor}");
System\ComponentModel\Design\ReferenceService.cs (4)
320Debug.Assert(sitedComponent.Site is not null, $"Sited component is not really sited: {sitedComponent}"); 321Debug.Assert(TypeDescriptor.GetComponentName(sitedComponent) is not null, $"Sited component has no name: {sitedComponent}"); 350Debug.Assert(SitedComponent.Site is not null, $"Sited component is not really sited: {SitedComponent}"); 351Debug.Assert(siteName is not null, $"Sited component has no name: {SitedComponent}");
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
264Debug.Assert(instance is not null, $"Failed to deserialize object {name}");
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
792Debug.Assert(_rootSerializer is not null || _typeSerializer is not null, $"What are we saving right now? Base component has no serializer: {LoaderHost.RootComponent.GetType().FullName}");
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
994Debug.Assert(o is IConvertible, $"Array size expression could not be resolved to IConvertible: {(o.GetType().Name)}");
System\Drawing\Design\CursorEditor.CursorUI.cs (1)
30Debug.Assert(
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (1)
50Debug.Assert(
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
397Debug.Assert(false, $"Could not find the behavior to pop - did it already get popped off? {behavior}");
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
197Debug.Assert(itemsEditor is not null, $"Didn't get a collection editor for type '{_targetProperty.PropertyType.FullName}'");
System\Windows\Forms\Design\ComponentTray.cs (3)
1740Debug.Assert(c.Visible, $"TrayControl for {c.Component} should not be positioned"); 1796Debug.Assert(Visible == c.Visible, $"TrayControl for {((TrayControl)c).Component} should not be positioned"); 1805Debug.Assert(c.Visible, $"TrayControl for {c.Component} should not be positioned");
System\Windows\Forms\Design\DesignerFrame.cs (3)
417Debug.Assert(_overlayList.IndexOf(control) == -1, $"Duplicate overlay in overlay service: {control.GetType().FullName}"); 435Debug.Assert(_overlayList.IndexOf(control) != -1, $"Control is not in overlay service: {control.GetType().FullName}"); 446Debug.Assert(_overlayList.IndexOf(control) == -1, $"Duplicate overlay in overlay service: {control.GetType().FullName}");
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (11)
88Debug.Assert(tlbRef is not null, $"Null reference returned by AddActiveX (tlbimp) by the project system for: {_clsid}"); 98Debug.Assert(axRef is not null, $"Null reference returned by AddActiveX (aximp) by the project system for: {_clsid}"); 178Debug.Assert(a is not null, $"No assembly found at {fullPath}"); 200Debug.Assert(attrs is not null && attrs.Length == 1, $"Invalid number of GuidAttributes found on: {t.FullName}"); 231Debug.Assert(project is not null, $"No DTE Project for the current project item: {name}"); 234Debug.Assert(vsproject is not null, $"No VS Project for the current project item: {name}"); 237Debug.Assert(references is not null, $"No References for the current project item: {name}"); 261Debug.Assert(verKey is not null, $"No version registry key found for: {controlKey}"); 280Debug.Assert(majorVer > 0 && minorVer >= 0, $"No Major version number found for: {controlKey}"); 287Debug.Assert(!tlbGuid.Equals(Guid.Empty), $"No valid Guid found for: {controlKey}"); 306Debug.Assert(inprocServer is not null, $"No valid InprocServer32 found for: {controlKey}");
System\Windows\Forms\Design\EditorServiceContext.cs (1)
149Debug.Assert(itemsEditor is not null, $"Didn't get a collection editor for type '{_targetProperty!.PropertyType.FullName}'");
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
47Debug.Assert(_components[i] is IComponent, $"Item {_components[i].GetType().Name} is not an IComponent");
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
232Debug.Assert(_splitContainer is not null, $"Component must be a non-null SplitContainer, it is a: {component.GetType().FullName}");
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
1136Debug.Assert(Table.RowStyles[i] is not null, $"Table's RowStyle[{i}] is null!");
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (1)
85Debug.Assert(result.Succeeded, $"Failed to get ProcessDpi HRESULT: {result}");
Windows\Win32\PInvoke.UiaDisconnectProvider.cs (1)
24Debug.Assert(result == HRESULT.S_OK || result == HRESULT.E_INVALIDARG, $"UiaDisconnectProvider failed with {result}");