19894 references to Assert
ClientSample (3)
Tcp\SocketAwaitable.cs (1)
36
Debug.
Assert
(ReferenceEquals(_callback, _callbackCompleted));
Tcp\SocketSender.cs (2)
82
Debug.
Assert
(!buffer.IsEmpty);
83
Debug.
Assert
(!buffer.IsSingleSegment);
CodeGenerator (6)
src\Servers\Kestrel\shared\KnownHeaders.cs (4)
773
Debug.
Assert
(requestHeaders.Length <= 64);
774
Debug.
Assert
(requestHeaders.Max(x => x.Index) <= 62);
778
Debug.
Assert
(responseHeaders.Length <= 63);
779
Debug.
Assert
(responseHeaders.Count(x => x.Index == 63) == 1);
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http3\QPack\HeaderField.cs (1)
17
Debug.
Assert
(name.Length > 0);
dotnet-dev-certs (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
574
Debug.
Assert
(pemEnvelope != null);
GetDocument.Insider (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
293
Debug.
Assert
(_hostTcs.Task.IsCompleted);
http2cat (35)
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
IIS.FunctionalTests (35)
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
IIS.LongTests (35)
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
IIS.NewHandler.FunctionalTests (35)
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
IIS.NewShim.FunctionalTests (35)
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
IIS.ShadowCopy.Tests (12)
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
IISExpress.FunctionalTests (35)
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
ILCompiler.DependencyAnalysisFramework (15)
ComputedStaticDependencyNode.cs (3)
18
Debug.
Assert
(_dependencies == null);
19
Debug.
Assert
(_conditionalDependencies == null);
20
Debug.
Assert
(dependencies != null);
DependencyAnalyzer.cs (2)
245
Debug.
Assert
(currentNode.Marked);
319
Debug.
Assert
(node.StaticDependenciesAreComputed);
DependencyNode.cs (2)
18
Debug.
Assert
(mark != null);
19
Debug.
Assert
(_mark == null);
DgmlWriter.cs (1)
114
Debug.
Assert
(!_nodeMappings.ContainsKey(node));
FirstMarkLogStrategy.cs (3)
50
Debug.
Assert
(reason != null);
101
Debug.
Assert
(markData.Reason1 != null);
110
Debug.
Assert
(markData.Reason != null);
FullGraphLogStrategy.cs (3)
121
Debug.
Assert
(reason != null);
175
Debug.
Assert
(markData.Reason1 != null);
184
Debug.
Assert
(markData.Reason != null);
src\coreclr\tools\Common\Sorting\ICompareAsEqualAction.cs (1)
17
Debug.
Assert
(false);
illink (191)
Linker.Dataflow\ArrayValue.cs (1)
91
System.Diagnostics.Debug.
Assert
(v is not ArrayValue);
Linker.Dataflow\CompilerGeneratedCallGraph.cs (4)
27
Debug.
Assert
(CompilerGeneratedNames.IsLambdaOrLocalFunction (toMethod.Name));
33
Debug.
Assert
(CompilerGeneratedNames.IsStateMachineType (toType.Name));
39
Debug.
Assert
(CompilerGeneratedNames.IsStateMachineType (fromType.Name));
40
Debug.
Assert
(CompilerGeneratedNames.IsLambdaOrLocalFunction (toMethod.Name));
Linker.Dataflow\CompilerGeneratedState.cs (7)
138
Debug.
Assert
(added);
143
Debug.
Assert
(!isStateMachineMember);
209
Debug.
Assert
(stateMachineType.DeclaringType == type ||
263
Debug.
Assert
(CompilerGeneratedNames.IsLambdaOrLocalFunction (nestedFunction.Name));
276
Debug.
Assert
(CompilerGeneratedNames.IsStateMachineType (stateMachineType.Name));
328
Debug.
Assert
(CompilerGeneratedNames.IsStateMachineOrDisplayClass (generatedType.Name));
448
Debug.
Assert
(CompilerGeneratedNames.IsStateMachineOrDisplayClass (generatedType.Name));
Linker.Dataflow\DynamicallyAccessedMembersTypeHierarchy.cs (3)
83
Debug.
Assert
(!apply || annotation != DynamicallyAccessedMemberTypes.None);
211
Debug.
Assert
(annotation != DynamicallyAccessedMemberTypes.None);
257
Debug.
Assert
(!type.IsInterface);
Linker.Dataflow\FlowAnnotations.cs (3)
406
Debug.
Assert
(attrs is null || attrs.Count == typeDef.GenericParameters.Count);
538
Debug.
Assert
(provider.GetType () == baseProvider.GetType ());
539
Debug.
Assert
(!(provider is GenericParameter genericParameter) || genericParameter.DeclaringMethod != null);
Linker.Dataflow\GenericArgumentDataFlow.cs (1)
29
Debug.
Assert
(genericParameterValue.DynamicallyAccessedMemberTypes != DynamicallyAccessedMemberTypes.None);
Linker.Dataflow\HandleCallAction.cs (2)
58
Debug.
Assert
(calledMethod.Method == _context.Resolve (_calledMethodReference));
63
Debug.
Assert
(comDangerousMethod); // Currently COM dangerous is the only one we detect
Linker.Dataflow\HoistedLocalKey.cs (1)
20
Debug.
Assert
(CompilerGeneratedState.IsHoistedLocal (field));
Linker.Dataflow\InterproceduralState.cs (2)
56
Debug.
Assert
(!MethodBodies.IsUnknown ());
65
Debug.
Assert
(!CompilerGeneratedNames.IsLambdaOrLocalFunction (stateMachineMethod.Name));
Linker.Dataflow\MethodBodyScanner.cs (2)
246
Debug.
Assert
(!oldInterproceduralState.MethodBodies.IsUnknown ());
262
Debug.
Assert
(interproceduralState.MethodBodies.GetKnownValues().Count () == 1);
Linker.Dataflow\ReflectionMethodBodyScanner.cs (4)
127
Debug.
Assert
(callingMethodBody.Method == _origin.Provider);
177
Debug.
Assert
(calledMethodDefinition != null);
179
Debug.
Assert
(callingMethodDefinition != null);
184
Debug.
Assert
(requiresDataFlowAnalysis || annotatedMethodReturnValue.DynamicallyAccessedMemberTypes == DynamicallyAccessedMemberTypes.None);
Linker.Dataflow\TrimAnalysisAssignmentPattern.cs (1)
27
Debug.
Assert
(Origin == other.Origin);
Linker.Dataflow\TrimAnalysisMethodCallPattern.cs (5)
30
Debug.
Assert
(origin.Provider is MethodDefinition);
47
Debug.
Assert
(Operation == other.Operation);
48
Debug.
Assert
(Origin == other.Origin);
49
Debug.
Assert
(CalledMethod == other.CalledMethod);
50
Debug.
Assert
(Arguments.Length == other.Arguments.Length);
Linker.Steps\AddBypassNGenStep.cs (1)
62
Debug.
Assert
(coreLibAssembly != null);
Linker.Steps\BaseStep.cs (1)
45
Debug.
Assert
(_context != null);
Linker.Steps\BaseSubStep.cs (1)
16
Debug.
Assert
(_context != null);
Linker.Steps\BodySubstitutionParser.cs (3)
47
Debug.
Assert
(ShouldProcessElement (nav));
53
Debug.
Assert
(_substitutionInfo != null);
90
Debug.
Assert
(_substitutionInfo != null);
Linker.Steps\CodeRewriterStep.cs (6)
17
Debug.
Assert
(assembly != null);
268
Debug.
Assert
(value == null);
275
Debug.
Assert
(value == null);
282
Debug.
Assert
(value == null);
295
Debug.
Assert
(value == null);
303
Debug.
Assert
(value == null);
Linker.Steps\DescriptorMarker.cs (1)
111
Debug.
Assert
(ShouldProcessElement (nav));
Linker.Steps\DiscoverCustomOperatorsHandler.cs (4)
16
Debug.
Assert
(_context != null);
100
Debug.
Assert
(_seenLinqExpressions);
136
Debug.
Assert
(typeDef.HasGenericParameters);
142
Debug.
Assert
(nullableType != null && nullableType.HasGenericArguments && nullableType.GenericArguments.Count == 1);
Linker.Steps\DiscoverSerializationHandler.cs (1)
19
Debug.
Assert
(_context != null);
Linker.Steps\LinkAttributesParser.cs (3)
465
Debug.
Assert
(ShouldProcessElement (nav));
495
Debug.
Assert
(_attributeInfo != null);
581
Debug.
Assert
(_attributeInfo != null);
Linker.Steps\MarkStep.cs (35)
59
Debug.
Assert
(_context != null);
84
Debug.
Assert
(_markContext != null);
93
Debug.
Assert
(_dynamicallyAccessedMembersTypeHierarchy != null);
417
Debug.
Assert
(Annotations.GetAction (assembly) == action);
493
Debug.
Assert
(Annotations.IsProcessed (type));
602
Debug.
Assert
(TypeIsDynamicInterfaceCastableImplementation (type));
645
Debug.
Assert
(method.DeclaringType.IsInterface);
673
Debug.
Assert
(Annotations.IsMarked (overrideInformation.Base) || IgnoreScope (overrideInformation.Base.DeclaringType.Scope));
702
Debug.
Assert
(ShouldMarkOverrideForBase (overrideInformation));
707
Debug.
Assert
(!Context.IsOptimizationEnabled (CodeOptimizations.OverrideRemoval, overrideInformation.Override) || overrideInformation.Base.IsAbstract);
714
Debug.
Assert
(Annotations.IsMarked (method.DeclaringType));
768
Debug.
Assert
(ov.IsOverrideOfInterfaceMember);
876
Debug.
Assert
(context is MethodDefinition || context is FieldDefinition);
886
Debug.
Assert
(assembly != null);
1074
Debug.
Assert
(provider is ModuleDefinition or AssemblyDefinition);
1395
Debug.
Assert
(Annotations.IsProcessed (assembly));
1485
Debug.
Assert
(provider is ModuleDefinition or AssemblyDefinition);
1568
Debug.
Assert
(reason.Kind == DependencyKind.FieldAccess || reason.Kind == DependencyKind.Ldtoken);
1656
Debug.
Assert
(member is MethodDefinition or FieldDefinition);
1664
Debug.
Assert
(type != null);
1721
Debug.
Assert
(Annotations.IsMarked (field));
1852
Debug.
Assert
(Annotations.IsMarked (module));
1965
Debug.
Assert
(Annotations.IsMarked (type));
2495
Debug.
Assert
(overrideInformation.IsOverrideOfInterfaceMember);
2670
Debug.
Assert
(Context.GetTargetRuntimeVersion () < TargetRuntimeVersion.NET6 || !Context.DisableEventSourceSpecialHandling);
2687
Debug.
Assert
(!(specification.ElementType is TypeSpecification));
2744
Debug.
Assert
(instance is MemberReference);
2985
Debug.
Assert
(Annotations.IsMarked (method));
3123
Debug.
Assert
(!(method is MethodSpecification));
3586
Debug.
Assert
(CompilerGeneratedState.IsNestedFunctionOrStateMachineMember (methodIL.Method));
3590
Debug.
Assert
(owningMethod != methodIL.Method);
3591
Debug.
Assert
(Annotations.IsProcessed (owningMethod));
3620
Debug.
Assert
(requiresReflectionMethodBodyScanner == CheckRequiresReflectionMethodBodyScanner (methodIL));
3700
Debug.
Assert
(instruction.OpCode.Code == Code.Ldtoken);
3784
Debug.
Assert
(!CompilerGeneratedState.IsNestedFunctionOrStateMachineMember (methodIL.Method));
Linker.Steps\MarkSubStepsDispatcher.cs (1)
26
Debug.
Assert
(categorized.HasValue);
Linker.Steps\ProcessLinkerXmlBase.cs (3)
124
Debug.
Assert
(!processAllAssemblies);
125
Debug.
Assert
(_resource != null);
141
Debug.
Assert
(!processAllAssemblies);
Linker.Steps\ReflectionBlockedStep.cs (1)
15
Debug.
Assert
(assembly != null);
Linker.Steps\SealerStep.cs (1)
90
Debug.
Assert
(Annotations.IsMarked (method));
Linker.Steps\SubStepsDispatcher.cs (1)
34
Debug.
Assert
(categorized.HasValue);
Linker.Steps\SweepStep.cs (1)
85
Debug.
Assert
(!IsMarkedAssembly (assembly));
Linker.Steps\UnreachableBlocksOptimizer.cs (10)
605
Debug.
Assert
(mapping != null);
919
Debug.
Assert
(FoldedInstructions != null);
1070
Debug.
Assert
(FoldedInstructions != null);
1187
Debug.
Assert
(FoldedInstructions != null && mapping != null);
1192
Debug.
Assert
(idx >= 0);
1198
Debug.
Assert
(mapping != null);
1207
Debug.
Assert
(FoldedInstructions != null);
1242
Debug.
Assert
(FoldedInstructions != null);
1261
Debug.
Assert
(ilprocessor != null);
1939
Debug.
Assert
(length != 0);
Linker\Annotations.cs (10)
176
Debug.
Assert
(!(reason.Kind == DependencyKind.AlreadyMarked));
190
Debug.
Assert
(!(reason.Kind == DependencyKind.AlreadyMarked));
297
Debug.
Assert
(!pending_preserve.Contains (type));
319
Debug.
Assert
(preserve != TypePreserve.Nothing);
326
Debug.
Assert
(addedPending);
330
Debug.
Assert
(existing.preserve != TypePreserve.Nothing);
335
Debug.
Assert
(addedPending);
525
Debug.
Assert
(GetPreservedMethods (definition) == null);
657
Debug.
Assert
(owningMethod != member);
708
Debug.
Assert
(method.DeclaringType.IsInterface);
Linker\AttributeInfo.cs (1)
26
Debug.
Assert
(customAttributes.Length == origins.Length);
Linker\DgmlDependencyRecorder.cs (1)
51
Debug.
Assert
(writer != null);
Linker\DocumentationSignatureGenerator.PartVisitor.cs (3)
116
Debug.
Assert
(genericParameter.DeclaringMethod == null ^ genericParameter.DeclaringType == null);
121
Debug.
Assert
(genericParameter.DeclaringType != null);
151
Debug.
Assert
(typeReference is not SentinelType && typeReference is not PinnedType);
Linker\DocumentationSignatureParser.cs (14)
57
Debug.
Assert
(results.Count <= 1);
95
Debug.
Assert
(results.Count == 0);
163
Debug.
Assert
(results.Count <= 1);
167
Debug.
Assert
(result is TypeDefinition);
273
Debug.
Assert
(results.Count == 0);
283
Debug.
Assert
(results.Count == 0);
303
Debug.
Assert
(bounds > 0);
336
Debug.
Assert
(PeekNextChar (id, index) == '`');
339
Debug.
Assert
(
374
Debug.
Assert
(results.Count == 0);
398
Debug.
Assert
(typeArguments != null && typeArguments.Count != 0);
494
Debug.
Assert
(module != null);
508
Debug.
Assert
(string.IsNullOrEmpty (nestedType.Namespace));
652
System.Diagnostics.Debug.
Assert
(typeParameterContext != null);
Linker\Driver.cs (5)
83
Debug.
Assert
(context != null);
87
Debug.
Assert
(context == null);
844
Debug.
Assert
(lex.MessageContainer.Category == MessageCategory.Error);
845
Debug.
Assert
(lex.MessageContainer.Code != null);
846
Debug.
Assert
(lex.MessageContainer.Code.Value != 0);
Linker\InterfaceImplementor.cs (1)
32
Debug.
Assert
(resolver.Resolve (interfaceImplementation.InterfaceType) == interfaceType);
Linker\LinkContext.cs (2)
261
Debug.
Assert
(!string.IsNullOrEmpty (feature));
1056
Debug.
Assert
(optimizations != 0 && (optimizations & (optimizations - 1)) == 0);
Linker\LinkerAttributesInformation.cs (1)
37
Debug.
Assert
(context.CustomAttributes.HasAny (provider));
Linker\MessageOrigin.cs (1)
54
Debug.
Assert
(provider == null || provider is IMemberDefinition || provider is AssemblyDefinition);
Linker\MethodReferenceComparer.cs (2)
46
Debug.
Assert
(x is not null);
47
Debug.
Assert
(y is not null);
Linker\OverrideInformation.cs (2)
25
Debug.
Assert
(@base.DeclaringType.IsInterface && interfaceImplementor != null
28
Debug.
Assert
(@base.DeclaringType.IsInterface ? interfaceImplementor!.InterfaceType == @base.DeclaringType : true);
Linker\TypeMapInfo.cs (3)
115
Debug.
Assert
(@base.DeclaringType.IsInterface);
146
Debug.
Assert
(firstImplementationChain.All (kvp => context.Resolve (kvp.Item1) == context.Resolve (kvp.Item2.Last ().InterfaceType)));
248
Debug.
Assert
(!@base.DeclaringType.IsInterface);
Linker\TypeNameResolver.cs (1)
134
Debug.
Assert
(genericTypeRef is TypeDefinition);
Linker\TypeReferenceExtensions.cs (1)
150
Debug.
Assert
(false);
Linker\UnconditionalSuppressMessageAttributeState.cs (4)
81
Debug.
Assert
(owningMethod != member);
116
Debug.
Assert
(property.DeclaringType == warningOriginMember.DeclaringType);
120
Debug.
Assert
(@event.DeclaringType == warningOriginMember.DeclaringType);
260
Debug.
Assert
(provider is not ModuleDefinition or AssemblyDefinition);
Linker\XmlDependencyRecorder.cs (1)
77
Debug.
Assert
(writer != null);
src\tools\illink\external\corert\src\System.Private.CoreLib\shared\System\Reflection\AssemblyNameParser.cs (2)
18
Debug.
Assert
(s != null);
75
Debug.
Assert
(attributeValue is not null);
src\tools\illink\external\corert\src\System.Private.CoreLib\shared\System\Reflection\RuntimeAssemblyName.cs (1)
20
Debug.
Assert
(name != null);
src\tools\illink\external\corert\src\System.Private.CoreLib\src\System\Reflection\Runtime\TypeParsing\TypeLexer.cs (1)
48
Debug.
Assert
(_index != _chars.Length);
src\tools\illink\external\corert\src\System.Private.CoreLib\src\System\Reflection\Runtime\TypeParsing\TypeName.cs (3)
26
Debug.
Assert
(typeName != null);
62
Debug.
Assert
(namespaceParts != null);
63
Debug.
Assert
(name != null);
src\tools\illink\src\ILLink.Shared\Annotations.cs (1)
54
Debug.
Assert
(memberTypes != DynamicallyAccessedMemberTypes.None);
src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (9)
69
Debug.
Assert
(entryOut != null);
70
Debug.
Assert
(cfg.GetConditionalSuccessor (cfg.Entry) == null);
315
Debug.
Assert
(isPredecessorInFinally);
377
Debug.
Assert
(result);
388
Debug.
Assert
(exceptionState != null);
389
Debug.
Assert
(oldExceptionState != null);
395
Debug.
Assert
(enclosingTryOrCatch.Kind != RegionKind.Filter);
423
Debug.
Assert
(cfg.GetConditionalSuccessor (lastFinallyBlock) == null);
425
Debug.
Assert
(finallyExit != null);
src\tools\illink\src\ILLink.Shared\DataFlow\ValueSet.cs (4)
180
Debug.
Assert
(other._values == UnknownSentinel);
189
Debug.
Assert
(other._values == UnknownSentinel);
193
Debug.
Assert
(_values == UnknownSentinel);
223
Debug.
Assert
(_values == UnknownSentinel);
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (3)
86
Debug.
Assert
(requiresDataFlowAnalysis || annotatedMethodReturnValue.DynamicallyAccessedMemberTypes == DynamicallyAccessedMemberTypes.None);
90
Debug.
Assert
(instanceValue.IsEmpty ());
91
Debug.
Assert
(argumentValues.Count == 1);
src\tools\illink\src\ILLink.Shared\TrimAnalysis\NullableSystemTypeValue.cs (1)
21
Debug.
Assert
(nullableType.IsTypeOf (WellKnownType.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\NullableValueWithDynamicallyAccessedMembers.cs (1)
23
Debug.
Assert
(nullableType.IsTypeOf (WellKnownType.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\RuntimeTypeHandleForNullableSystemTypeValue.cs (1)
21
Debug.
Assert
(nullableType.IsTypeOf (WellKnownType.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\RuntimeTypeHandleForNullableValueWithDynamicallyAccessedMembers.cs (1)
21
Debug.
Assert
(nullableType.IsTypeOf (WellKnownType.System_Nullable_T));
ILLink.RoslynAnalyzer (72)
DataFlow\ControlFlowGraphExtensions.cs (2)
18
Debug.
Assert
(firstBlock.Kind == BasicBlockKind.Entry);
25
Debug.
Assert
(lastBlock.Kind == BasicBlockKind.Exit);
DataFlow\ControlFlowGraphProxy.cs (2)
65
Debug.
Assert
(region != null);
146
Debug.
Assert
(enclosingRegion.Kind == ControlFlowRegionKind.TryAndCatch);
DataFlow\InterproceduralState.cs (1)
54
Debug.
Assert
(!Methods.IsUnknown ());
DataFlow\LocalDataFlowAnalysis.cs (2)
74
Debug.
Assert
(Context.OwningSymbol is not IMethodSymbol methodSymbol ||
82
Debug.
Assert
(!oldInterproceduralState.Methods.IsUnknown ());
DataFlow\LocalDataFlowVisitor.cs (17)
176
Debug.
Assert
(assemblyType != null);
180
Debug.
Assert
(method != null);
343
Debug.
Assert
(operation.Target is not IFlowCaptureReferenceOperation);
397
Debug.
Assert
(IsLValueFlowCapture (flowCaptureReference.Id));
398
Debug.
Assert
(flowCaptureReference.GetValueUsageInfo (OwningSymbol).HasFlag (ValueUsageInfo.Write));
400
Debug.
Assert
(!capturedReferences.IsUnknown ());
436
Debug.
Assert
(addMethod != null);
442
Debug.
Assert
(removeMethod != null);
509
Debug.
Assert
(operation.Value is not IFlowCaptureReferenceOperation);
529
Debug.
Assert
(!capturedReferences.IsUnknown ());
574
Debug.
Assert
(localFunction.MethodKind == MethodKind.LocalFunction);
624
Debug.
Assert
(operation.GetValueUsageInfo (OwningSymbol).HasFlag (ValueUsageInfo.Read));
638
Debug.
Assert
(operation.GetValueUsageInfo (OwningSymbol).HasFlag (ValueUsageInfo.Reference));
672
Debug.
Assert
(operation.GetValueUsageInfo (OwningSymbol).HasFlag (ValueUsageInfo.Read));
715
Debug.
Assert
(operation.Symbol.ContainingSymbol is IMethodSymbol or IFieldSymbol);
717
Debug.
Assert
(lambda.MethodKind == MethodKind.LambdaMethod);
824
Debug.
Assert
(localFunction.MethodKind == MethodKind.LocalFunction);
DataFlow\MethodBodyValue.cs (2)
23
Debug.
Assert
(owningSymbol is (IMethodSymbol or IFieldSymbol or IPropertySymbol));
33
Debug.
Assert
(ControlFlowGraph == other.ControlFlowGraph);
DynamicallyAccessedMembersAnalyzer.cs (1)
67
Debug.
Assert
((int) first < (int) last);
IOperationExtensions.cs (1)
116
Debug.
Assert
(parenthesizedOperation.Language == LanguageNames.VisualBasic);
src\tools\illink\src\ILLink.Shared\Annotations.cs (1)
54
Debug.
Assert
(memberTypes != DynamicallyAccessedMemberTypes.None);
src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (9)
69
Debug.
Assert
(entryOut != null);
70
Debug.
Assert
(cfg.GetConditionalSuccessor (cfg.Entry) == null);
315
Debug.
Assert
(isPredecessorInFinally);
377
Debug.
Assert
(result);
388
Debug.
Assert
(exceptionState != null);
389
Debug.
Assert
(oldExceptionState != null);
395
Debug.
Assert
(enclosingTryOrCatch.Kind != RegionKind.Filter);
423
Debug.
Assert
(cfg.GetConditionalSuccessor (lastFinallyBlock) == null);
425
Debug.
Assert
(finallyExit != null);
src\tools\illink\src\ILLink.Shared\DataFlow\ValueSet.cs (4)
180
Debug.
Assert
(other._values == UnknownSentinel);
189
Debug.
Assert
(other._values == UnknownSentinel);
193
Debug.
Assert
(_values == UnknownSentinel);
223
Debug.
Assert
(_values == UnknownSentinel);
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (3)
86
Debug.
Assert
(requiresDataFlowAnalysis || annotatedMethodReturnValue.DynamicallyAccessedMemberTypes == DynamicallyAccessedMemberTypes.None);
90
Debug.
Assert
(instanceValue.IsEmpty ());
91
Debug.
Assert
(argumentValues.Count == 1);
src\tools\illink\src\ILLink.Shared\TrimAnalysis\NullableSystemTypeValue.cs (1)
21
Debug.
Assert
(nullableType.IsTypeOf (WellKnownType.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\NullableValueWithDynamicallyAccessedMembers.cs (1)
23
Debug.
Assert
(nullableType.IsTypeOf (WellKnownType.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\RuntimeTypeHandleForNullableSystemTypeValue.cs (1)
21
Debug.
Assert
(nullableType.IsTypeOf (WellKnownType.System_Nullable_T));
src\tools\illink\src\ILLink.Shared\TrimAnalysis\RuntimeTypeHandleForNullableValueWithDynamicallyAccessedMembers.cs (1)
21
Debug.
Assert
(nullableType.IsTypeOf (WellKnownType.System_Nullable_T));
TrimAnalysis\ArrayValue.cs (1)
77
System.Diagnostics.Debug.
Assert
(v is not ArrayValue);
TrimAnalysis\DiagnosticContext.cs (1)
57
Debug.
Assert
(Location != null);
TrimAnalysis\FlowAnnotations.cs (3)
48
Debug.
Assert
(parameterMethod != null);
58
Debug.
Assert
(property != null);
74
Debug.
Assert
(property != null);
TrimAnalysis\HandleCallAction.cs (1)
221
Debug.
Assert
(property != null);
TrimAnalysis\TrimAnalysisAssignmentPattern.cs (2)
45
Debug.
Assert
(Operation == other.Operation);
46
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
TrimAnalysis\TrimAnalysisFieldAccessPattern.cs (3)
38
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (Field, other.Field));
39
Debug.
Assert
(Operation == other.Operation);
40
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
TrimAnalysis\TrimAnalysisGenericInstantiationPattern.cs (3)
35
Debug.
Assert
(Operation == other.Operation);
36
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (GenericInstantiation, other.GenericInstantiation));
37
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (4)
56
Debug.
Assert
(Operation == other.Operation);
57
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (CalledMethod, other.CalledMethod));
58
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
59
Debug.
Assert
(Arguments.Length == other.Arguments.Length);
TrimAnalysis\TrimAnalysisReflectionAccessPattern.cs (3)
37
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (ReferencedMethod, other.ReferencedMethod));
38
Debug.
Assert
(Operation == other.Operation);
39
Debug.
Assert
(SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
TrimAnalysis\TrimAnalysisVisitor.cs (2)
345
Debug.
Assert
(OwningSymbol is IMethodSymbol);
362
Debug.
Assert
(OwningSymbol is IMethodSymbol);
InMemory.FunctionalTests (10)
Http2\Http2TestBase.cs (2)
430
Debug.
Assert
(index <= H2StaticTable.Count);
438
Debug.
Assert
(index <= H2StaticTable.Count);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
294
Debug.
Assert
(success);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (1)
314
System.Diagnostics.Debug.
Assert
(read == requestBytes.Length);
src\Servers\Kestrel\shared\TransportConnection.cs (1)
72
Debug.
Assert
(Application != null);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
204
Debug.
Assert
(_memoryHandle.HasValue);
src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (4)
34
Debug.
Assert
(_blockSize >= 0);
84
Debug.
Assert
(myString is not null);
119
Debug.
Assert
(sizeHint >= 0);
143
Debug.
Assert
(count >= 0);
IntegrationTestsWebsite (1)
Infrastructure\DynamicServiceModelProvider.cs (1)
15
Debug.
Assert
(CreateMethod != null);
KeyManagementSimulator (3)
Program.cs (3)
402
Debug.
Assert
(now >= _now);
485
Debug.
Assert
(pFail >= 0);
486
Debug.
Assert
(pFail <= 1); // Allow 100% failure rate
Microsoft.Arcade.Test.Common (2)
DiffUtil.cs (2)
198
Debug.
Assert
(lengthA >= 0 && lengthB >= 0);
212
Debug.
Assert
(lcsLength <= max);
Microsoft.AspNetCore (3)
BootstrapHostBuilder.cs (1)
111
Debug.
Assert
(descriptor.ImplementationType?.Name == "GenericWebHostService");
WebApplicationBuilder.cs (2)
391
Debug.
Assert
(_builtApplication is not null);
495
Debug.
Assert
(_builtApplication is not null);
Microsoft.AspNetCore.Analyzer.Testing (1)
DiagnosticVerifier.cs (1)
144
Debug.
Assert
(sources.Length == documents.Length);
Microsoft.AspNetCore.Analyzers (3)
BuildServiceProviderAnalyzer.cs (1)
21
Debug.
Assert
(context.Symbol.Kind == SymbolKind.NamedType);
UseAuthorizationAnalyzer.cs (1)
22
Debug.
Assert
(context.Symbol.Kind == SymbolKind.NamedType);
UseMvcAnalyzer.cs (1)
21
Debug.
Assert
(context.Symbol.Kind == SymbolKind.NamedType);
Microsoft.AspNetCore.Antiforgery (14)
Internal\BinaryBlob.cs (2)
73
Debug.
Assert
(_data.Length == other._data.Length);
86
Debug.
Assert
(_data != null && _data.Length >= (32 / 8));
Internal\DefaultAntiforgery.cs (7)
54
Debug.
Assert
(antiforgeryFeature.NewCookieTokenString != null);
184
Debug.
Assert
(!string.IsNullOrEmpty(antiforgeryTokenSet.CookieToken));
185
Debug.
Assert
(!string.IsNullOrEmpty(antiforgeryTokenSet.RequestToken));
284
Debug.
Assert
(antiforgeryFeature.HaveDeserializedCookieToken);
313
Debug.
Assert
(_tokenGenerator.IsCookieTokenValid(newCookieToken));
407
Debug.
Assert
(antiforgeryFeature.HaveGeneratedNewCookieToken);
408
Debug.
Assert
(antiforgeryFeature.NewRequestToken != null);
Internal\DefaultAntiforgeryTokenStore.cs (4)
24
Debug.
Assert
(httpContext != null);
38
Debug.
Assert
(httpContext != null);
81
Debug.
Assert
(httpContext != null);
82
Debug.
Assert
(token != null);
Internal\DefaultClaimUidExtractor.cs (1)
26
Debug.
Assert
(claimsPrincipal != null);
Microsoft.AspNetCore.App.Analyzers (60)
Infrastructure\EmbeddedSyntax\EmbeddedSeparatedSyntaxNodeList.cs (4)
26
Debug.
Assert
(!nodesAndTokens.IsDefault);
44
Debug.
Assert
(NodesAndTokens[i].IsNode);
45
Debug.
Assert
(NodesAndTokens[i].Node is EmbeddedSyntaxNode<TSyntaxKind, TSyntaxNode>);
50
Debug.
Assert
(!NodesAndTokens[i].IsNode);
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxNode.cs (1)
25
Debug.
Assert
((int)(object)kind != 0);
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxNodeOrToken.cs (2)
25
Debug.
Assert
((int)(object)token.Kind != 0);
33
Debug.
Assert
(Node == null);
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxToken.cs (1)
30
Debug.
Assert
(!diagnostics.IsDefault);
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxTrivia.cs (1)
27
Debug.
Assert
(virtualChars.Length > 0);
Infrastructure\RoutePattern\RoutePatternNodes.cs (20)
19
Debug.
Assert
(parts != null);
20
Debug.
Assert
(endOfFileToken.Kind == RoutePatternKind.EndOfFile);
72
Debug.
Assert
(openBracketToken.Kind == RoutePatternKind.OpenBracketToken);
73
Debug.
Assert
(textToken.Kind == RoutePatternKind.ReplacementToken);
74
Debug.
Assert
(closeBracketToken.Kind == RoutePatternKind.CloseBracketToken);
108
Debug.
Assert
(openBraceToken.Kind == RoutePatternKind.OpenBraceToken);
109
Debug.
Assert
(closeBraceToken.Kind == RoutePatternKind.CloseBraceToken);
146
Debug.
Assert
(literalToken.Kind == RoutePatternKind.Literal);
170
Debug.
Assert
(separatorToken.Kind == RoutePatternKind.DotToken);
194
Debug.
Assert
(separatorToken.Kind == RoutePatternKind.SlashToken);
218
Debug.
Assert
(asteriskToken.Kind == RoutePatternKind.AsteriskToken);
242
Debug.
Assert
(questionMarkToken.Kind == RoutePatternKind.QuestionMarkToken);
266
Debug.
Assert
(equalsToken.Kind == RoutePatternKind.EqualsToken);
267
Debug.
Assert
(defaultValueToken.Kind == RoutePatternKind.DefaultValueToken);
294
Debug.
Assert
(parameterNameToken.Kind == RoutePatternKind.ParameterNameToken);
318
Debug.
Assert
(colonToken.Kind == RoutePatternKind.ColonToken);
345
Debug.
Assert
(openParenToken.Kind == RoutePatternKind.OpenParenToken);
346
Debug.
Assert
(argumentToken.Kind == RoutePatternKind.PolicyFragmentToken);
347
Debug.
Assert
(closeParenToken.Kind == RoutePatternKind.CloseParenToken);
377
Debug.
Assert
(argumentToken.Kind == RoutePatternKind.PolicyFragmentToken);
Infrastructure\RoutePattern\RoutePatternParser.cs (3)
65
Debug.
Assert
(_lexer.Position == _lexer.Text.Length);
66
Debug.
Assert
(_currentToken.Kind == RoutePatternKind.EndOfFile);
439
Debug.
Assert
(_routePatternOptions.SupportTokenReplacement);
Infrastructure\VirtualChars\AbstractVirtualCharService.cs (5)
76
Debug.
Assert
(expectedValueText == actualValueText);
132
Debug.
Assert
(!token.ContainsDiagnostics);
136
Debug.
Assert
(startDelimiter == "");
137
Debug.
Assert
(endDelimiter == "");
218
Debug.
Assert
(char.IsSurrogate(ch));
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (9)
58
Debug.
Assert
(!token.ContainsDiagnostics);
341
Debug.
Assert
(char.IsSurrogate(ch));
351
Debug.
Assert
(tokenText[index] == '\\');
364
Debug.
Assert
(tokenText[index] == '\\');
397
Debug.
Assert
(tokenText[index] == '\\');
416
Debug.
Assert
(tokenText[index] == '\\');
461
Debug.
Assert
(uintChar is > 0x0000FFFF and <= 0x0010FFFF);
501
Debug.
Assert
(character == 'x');
533
Debug.
Assert
(IsHexDigit(c));
Infrastructure\VirtualChars\VirtualCharSequence.Chunks.cs (2)
72
Debug.
Assert
(index >= 0);
150
Debug.
Assert
(index + 1 >= _underlyingData.Length ||
Infrastructure\VirtualChars\VirtualCharSequence.cs (3)
214
Debug.
Assert
(_leafCharacters == virtualChars._leafCharacters);
215
Debug.
Assert
(_span.End == virtualChars._span.Start);
226
Debug.
Assert
(chars1._leafCharacters == chars2._leafCharacters);
Mvc\DetectAmbiguousActionRoutes.cs (1)
110
Debug.
Assert
(!httpMethods.IsDefault);
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
549
Debug.
Assert
(token.IsKind(SyntaxKind.StringLiteralToken));
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
401
Debug.
Assert
(token.IsKind(SyntaxKind.StringLiteralToken));
RouteHandlers\DetectAmbiguousRoutes.cs (1)
153
Debug.
Assert
(!httpMethods.IsDefault);
src\Shared\Diagnostics\AnalyzerDebug.cs (2)
12
/// <inheritdoc cref="Debug.
Assert
(bool)"/>
14
public static void Assert([DoesNotReturnIf(false)] bool b) => Debug.
Assert
(b);
src\Shared\Roslyn\CodeAnalysisExtensions.cs (3)
34
Debug.
Assert
(methodSymbol != null);
159
Debug.
Assert
(method.PartialImplementationPart == null && !SymbolEqualityComparer.Default.Equals(method.PartialDefinitionPart, method));
165
Debug.
Assert
(!SymbolEqualityComparer.Default.Equals(method.PartialImplementationPart, method));
Microsoft.AspNetCore.Authentication (1)
RemoteAuthenticationHandler.cs (1)
145
Debug.
Assert
(ticket != null);
Microsoft.AspNetCore.Authentication.Cookies (1)
CookieAuthenticationHandler.cs (1)
212
Debug.
Assert
(result.Ticket != null);
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
47
Debug.
Assert
(tfms.Length > 0);
Microsoft.AspNetCore.Authentication.Negotiate (3)
Internal\LdapAdapter.cs (1)
47
Debug.
Assert
(settings.LdapConnection != null);
NegotiateHandler.cs (1)
140
Debug.
Assert
(exception != null);
PostConfigureNegotiateOptions.cs (1)
49
Debug.
Assert
(_serverAuth.AuthenticationScheme != null);
Microsoft.AspNetCore.Components (41)
Rendering\RenderTreeBuilder.cs (1)
790
Debug.
Assert
(_hasSeenAddMultipleAttributes);
RenderTree\Renderer.cs (2)
282
Debug.
Assert
(_pendingTasks == null);
339
Debug.
Assert
(_pendingTasks is null || _pendingTasks.Count == 0);
Routing\SupplyParameterFromQueryValueProvider.cs (3)
54
Debug.
Assert
(_subscribers is not null);
96
Debug.
Assert
(url is not null);
126
Debug.
Assert
(_subscribers is not null);
src\Components\Shared\src\ArrayBuilder.cs (1)
180
Debug.
Assert
(newCapacity > _items.Length);
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
491
Debug.
Assert
(_arrayStorage != null);
src\Http\Routing\src\Constraints\RegexRouteConstraint.cs (1)
68
Debug.
Assert
(_regexFactory is not null);
src\Http\Routing\src\ParameterPolicyActivator.cs (1)
161
Debug.
Assert
(constructors.Count > 0);
src\Http\Routing\src\PathTokenizer.cs (3)
47
Debug.
Assert
(_path[0] == '/');
97
Debug.
Assert
(_path[_path.Length - 1] != '/');
98
Debug.
Assert
(currentSegmentIndex == index);
src\Http\Routing\src\Patterns\RoutePattern.cs (5)
48
Debug.
Assert
(defaults != null);
49
Debug.
Assert
(parameterPolicies != null);
50
Debug.
Assert
(parameters != null);
51
Debug.
Assert
(requiredValues != null);
52
Debug.
Assert
(pathSegments != null);
src\Http\Routing\src\Patterns\RoutePatternLiteralPart.cs (1)
22
Debug.
Assert
(!string.IsNullOrEmpty(content));
src\Http\Routing\src\Patterns\RoutePatternMatcher.cs (8)
111
Debug.
Assert
(pathSegment != null);
168
Debug.
Assert
(pathSegment != null);
169
Debug.
Assert
(pathSegment.IsSimple);
172
Debug.
Assert
(part.IsParameter);
240
Debug.
Assert
(!pathSegment.IsSimple);
338
Debug.
Assert
(routeSegment != null);
339
Debug.
Assert
(routeSegment.Parts.Count > 1);
361
Debug.
Assert
(part.IsLiteral || part.IsSeparator);
src\Http\Routing\src\Patterns\RoutePatternParser.cs (8)
51
Debug.
Assert
(context.AtEnd() || context.Current == Separator);
73
Debug.
Assert
(context != null);
74
Debug.
Assert
(segments != null);
145
Debug.
Assert
(context.Current == OpenBrace);
445
Debug.
Assert
(context != null);
446
Debug.
Assert
(literal != null);
485
Debug.
Assert
(template != null);
526
Debug.
Assert
(_index >= 0);
src\Http\Routing\src\Patterns\RoutePatternSeparatorPart.cs (1)
39
Debug.
Assert
(!string.IsNullOrEmpty(content));
src\Http\Routing\src\Template\RoutePrecedence.cs (3)
69
Debug.
Assert
(digit >= 0 && digit < 10);
125
Debug.
Assert
(digit >= 0 && digit < 10);
191
Debug.
Assert
(parameterPart != null);
src\Http\Routing\src\Tree\TreeEnumerator.cs (1)
94
Debug.
Assert
(next.Depth < _tokenizer.Count);
src\Http\Routing\src\Tree\UrlMatchingTree.cs (1)
98
Debug.
Assert
(segment.Parts.Count == 1);
Microsoft.AspNetCore.Components.Endpoints (29)
Builder\RazorComponentEndpointDataSource.cs (4)
78
Debug.
Assert
(_changeToken != null);
79
Debug.
Assert
(_endpoints != null);
168
Debug.
Assert
(_changeToken != null);
169
Debug.
Assert
(_endpoints != null);
FormMapping\Factories\NullableConverterFactory.cs (3)
26
Debug.
Assert
(underlyingType != null);
29
Debug.
Assert
(underlyingConverter != null);
32
Debug.
Assert
(expectedConverterType != null);
FormMapping\FormDataReader.cs (3)
202
Debug.
Assert
(_currentDepth >= 0);
206
Debug.
Assert
(_currentPrefixBuffer.Length >= keyLength);
235
Debug.
Assert
(_prefixBuffer.Length >= (_currentPrefixBuffer.Length + separator.Length));
FormMapping\HttpContextFormValueMapper.cs (1)
88
Debug.
Assert
(deserializer != null);
src\Shared\PropertyHelper\PropertyHelper.cs (18)
161
Debug.
Assert
(propertyInfo != null);
181
Debug.
Assert
(propertyInfo != null);
195
Debug.
Assert
(propertyInfo != null);
198
Debug.
Assert
(propertyGetterWrapperMethod != null);
199
Debug.
Assert
(propertyGetterWrapperMethod.IsGenericMethodDefinition);
200
Debug.
Assert
(propertyGetterWrapperMethod.GetParameters().Length == 2);
203
Debug.
Assert
(propertyGetterByRefWrapperMethod != null);
204
Debug.
Assert
(propertyGetterByRefWrapperMethod.IsGenericMethodDefinition);
205
Debug.
Assert
(propertyGetterByRefWrapperMethod.GetParameters().Length == 2);
208
Debug.
Assert
(getMethod != null);
209
Debug.
Assert
(!getMethod.IsStatic);
210
Debug.
Assert
(getMethod.GetParameters().Length == 0);
277
Debug.
Assert
(propertyInfo != null);
278
Debug.
Assert
(!propertyInfo.DeclaringType!.IsValueType);
281
Debug.
Assert
(setMethod != null);
282
Debug.
Assert
(!setMethod.IsStatic);
283
Debug.
Assert
(setMethod.ReturnType == typeof(void));
285
Debug.
Assert
(parameters.Length == 1);
Microsoft.AspNetCore.Components.Server (10)
src\Components\Shared\src\ArrayBuilder.cs (1)
180
Debug.
Assert
(newCapacity > _items.Length);
src\Shared\PooledArrayBufferWriter.cs (6)
80
Debug.
Assert
(_rentedBuffer != null);
144
Debug.
Assert
(_rentedBuffer != null);
165
Debug.
Assert
(oldBuffer.Length >= _index);
166
Debug.
Assert
(_rentedBuffer.Length >= _index);
174
Debug.
Assert
(_rentedBuffer.Length - _index > 0);
175
Debug.
Assert
(_rentedBuffer.Length - _index >= sizeHint);
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (1)
376
Debug.
Assert
(written == prefixLength);
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
Microsoft.AspNetCore.Components.Web (10)
Forms\EditForm.cs (2)
133
Debug.
Assert
(_editContext != null);
194
Debug.
Assert
(_editContext != null);
Forms\InputDate.cs (1)
114
Debug.
Assert
(result != null);
Forms\InputRadio.cs (1)
63
Debug.
Assert
(Context != null);
Forms\InputRadioGroup.cs (1)
71
Debug.
Assert
(_context != null);
Forms\Mapping\SupplyParameterFromFormValueProvider.cs (1)
74
Debug.
Assert
(mappingContext != null);
HtmlRendering\StaticHtmlRenderer.HtmlWriting.cs (2)
162
Debug.
Assert
(afterElement == position + frame.ElementSubtreeLength);
177
Debug.
Assert
(afterAttributes == position + frame.ElementSubtreeLength);
Routing\NavLink.cs (1)
132
Debug.
Assert
(_hrefAbsolute != null);
Virtualization\Virtualize.cs (1)
170
Debug.
Assert
(refreshTask.IsCompletedSuccessfully);
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\ArrayBuilder.cs (1)
180
Debug.
Assert
(newCapacity > _items.Length);
Microsoft.AspNetCore.CookiePolicy (1)
ResponseCookiesWrapper.cs (1)
98
Debug.
Assert
(key != null);
Microsoft.AspNetCore.Cryptography.Internal (4)
SafeHandles\BCryptAlgorithmHandle.cs (1)
45
Debug.
Assert
(pbKey != null);
WeakReferenceHelpers.cs (3)
38
Debug.
Assert
(newTarget != null);
41
Debug.
Assert
(newWeakRef != null);
53
Debug.
Assert
(currentWeakRef != null);
Microsoft.AspNetCore.Cryptography.KeyDerivation (17)
PBKDF2\ManagedPbkdf2Provider.cs (5)
19
Debug.
Assert
(password != null);
20
Debug.
Assert
(salt != null);
21
Debug.
Assert
(iterationCount > 0);
22
Debug.
Assert
(numBytesRequested > 0);
96
Debug.
Assert
(src.Length == dest.Length);
PBKDF2\NetCorePbkdf2Provider.cs (4)
19
Debug.
Assert
(password != null);
20
Debug.
Assert
(salt != null);
21
Debug.
Assert
(iterationCount > 0);
22
Debug.
Assert
(numBytesRequested > 0);
PBKDF2\Win7Pbkdf2Provider.cs (4)
18
Debug.
Assert
(password != null);
19
Debug.
Assert
(salt != null);
20
Debug.
Assert
(iterationCount > 0);
21
Debug.
Assert
(numBytesRequested > 0);
PBKDF2\Win8Pbkdf2Provider.cs (4)
20
Debug.
Assert
(password != null);
21
Debug.
Assert
(salt != null);
22
Debug.
Assert
(iterationCount > 0);
23
Debug.
Assert
(numBytesRequested > 0);
Microsoft.AspNetCore.DataProtection (40)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (1)
82
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactory.cs (1)
43
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactory.cs (1)
44
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Cng\DpapiSecretSerializerHelper.cs (9)
45
Debug.
Assert
(secret != null);
120
Debug.
Assert
(secret != null);
121
Debug.
Assert
(protectionDescriptorHandle != null);
146
Debug.
Assert
(protectionDescriptorHandle != null);
147
Debug.
Assert
(pbData != null);
198
Debug.
Assert
(protectedSecret != null);
261
Debug.
Assert
(protectedData != null);
274
Debug.
Assert
(pbData != null);
322
Debug.
Assert
(protectedData != null);
DataProtectionServiceCollectionExtensions.cs (1)
64
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
EphemeralDataProtectionProvider.cs (2)
50
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
103
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
KeyManagement\Key.cs (2)
135
Debug.
Assert
(_descriptorException is null); // Mutually exclusive with _descriptor
172
Debug.
Assert
(_descriptorException is null); // Mutually exclusive with _descriptor
KeyManagement\KeyRingBasedDataProtector.cs (5)
35
Debug.
Assert
(keyRingProvider != null);
188
Debug.
Assert
(protectedData != null);
331
Debug.
Assert
(ms.Position == sizeof(uint));
338
Debug.
Assert
(purpose != null);
356
Debug.
Assert
(existingTemplate.Length >= sizeof(uint) /* MAGIC_HEADER */ + sizeof(Guid) /* keyId */);
KeyManagement\KeyRingProvider.cs (6)
173
Debug.
Assert
(defaultKey != null);
176
Debug.
Assert
(defaultKey.CreateEncryptor() != null);
228
Debug.
Assert
(utcNow.Kind == DateTimeKind.Utc);
312
Debug.
Assert
(existingCacheableKeyRing != null);
328
Debug.
Assert
(utcNow.Kind == DateTimeKind.Utc);
446
Debug.
Assert
(task.IsCompleted);
KeyManagement\XmlKeyManager.cs (9)
268
Debug.
Assert
(keyElement.Name == KeyElementName);
314
Debug.
Assert
(_knownKeyMap.TryGetValue(key.KeyId, out var existingKey));
315
Debug.
Assert
(existingKey.CreationDate == key.CreationDate);
316
Debug.
Assert
(existingKey.ActivationDate == key.ActivationDate);
317
Debug.
Assert
(existingKey.ExpirationDate == key.ExpirationDate);
324
Debug.
Assert
(revocationElement.Name == RevocationElementName);
576
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); // Hint for the platform compatibility analyzer.
601
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); // Hint for the platform compatibility analyzer.
606
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); // Hint for the platform compatibility analyzer.
Repositories\DefaultKeyStorageDirectories.cs (1)
74
Debug.
Assert
(retVal != null);
XmlEncryption\XmlEncryptionExtensions.cs (2)
62
Debug.
Assert
(placeholderReplacements.Count > 0);
143
Debug.
Assert
(placeholderReplacements.Count > 0);
Microsoft.AspNetCore.DataProtection.Abstractions (2)
DataProtectionCommonExtensions.cs (1)
53
Debug.
Assert
(retVal is IDataProtector); // CreateProtector is supposed to return an instance of this interface
src\Shared\WebEncoders\WebEncoders.cs (1)
344
Debug.
Assert
(output.Length >= GetArraySizeRequiredToEncode(input.Length));
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
574
Debug.
Assert
(pemEnvelope != null);
Microsoft.AspNetCore.Diagnostics (10)
src\Shared\Diagnostics\AnalyzerDebug.cs (2)
12
/// <inheritdoc cref="Debug.
Assert
(bool)"/>
14
public static void Assert([DoesNotReturnIf(false)] bool b) => Debug.
Assert
(b);
src\Shared\Diagnostics\BaseView.cs (3)
110
Debug.
Assert
(string.IsNullOrEmpty(AttributeEnding));
118
Debug.
Assert
(AttributeValues != null);
119
Debug.
Assert
(!string.IsNullOrEmpty(AttributeEnding));
src\Shared\RazorViews\BaseView.cs (3)
150
Debug.
Assert
(string.IsNullOrEmpty(AttributeEnding));
158
Debug.
Assert
(AttributeValues != null);
159
Debug.
Assert
(!string.IsNullOrEmpty(AttributeEnding));
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
198
Debug.
Assert
(method != null);
199
Debug.
Assert
(method.DeclaringType != null);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (8)
src\Shared\Diagnostics\AnalyzerDebug.cs (2)
12
/// <inheritdoc cref="Debug.
Assert
(bool)"/>
14
public static void Assert([DoesNotReturnIf(false)] bool b) => Debug.
Assert
(b);
src\Shared\Diagnostics\BaseView.cs (3)
110
Debug.
Assert
(string.IsNullOrEmpty(AttributeEnding));
118
Debug.
Assert
(AttributeValues != null);
119
Debug.
Assert
(!string.IsNullOrEmpty(AttributeEnding));
src\Shared\RazorViews\BaseView.cs (3)
150
Debug.
Assert
(string.IsNullOrEmpty(AttributeEnding));
158
Debug.
Assert
(AttributeValues != null);
159
Debug.
Assert
(!string.IsNullOrEmpty(AttributeEnding));
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Internal\JsonRequestHelpers.cs (1)
357
Debug.
Assert
(read == data.Length);
src\Grpc\JsonTranscoding\src\Shared\HttpRoutePatternParser.cs (3)
343
Debug.
Assert
(CurrentVariable.FieldPath.Any());
344
Debug.
Assert
(CurrentVariable.StartSegment < CurrentVariable.EndSegment);
345
Debug.
Assert
(CurrentVariable.EndSegment <= _segments.Count);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
ConverterTests\JsonConverterReadTests.cs (1)
661
Debug.
Assert
(objectOld != null);
UnaryServerCallHandlerTests.cs (2)
594
Debug.
Assert
(requestMessage != null);
630
Debug.
Assert
(requestMessage != null);
Microsoft.AspNetCore.Grpc.Swagger (3)
src\Grpc\JsonTranscoding\src\Shared\HttpRoutePatternParser.cs (3)
343
Debug.
Assert
(CurrentVariable.FieldPath.Any());
344
Debug.
Assert
(CurrentVariable.StartSegment < CurrentVariable.EndSegment);
345
Debug.
Assert
(CurrentVariable.EndSegment <= _segments.Count);
Microsoft.AspNetCore.Hosting (11)
Http\DefaultHttpContextFactory.cs (2)
56
Debug.
Assert
(featureCollection != null);
57
Debug.
Assert
(httpContext != null);
Internal\HostingRequestFinishedLog.cs (2)
28
Debug.
Assert
(_context.HttpContext != null);
62
Debug.
Assert
(_context.HttpContext != null);
Internal\StartupMethods.cs (2)
14
Debug.
Assert
(configure != null);
15
Debug.
Assert
(configureServices != null);
src\Shared\RazorViews\BaseView.cs (3)
150
Debug.
Assert
(string.IsNullOrEmpty(AttributeEnding));
158
Debug.
Assert
(AttributeValues != null);
159
Debug.
Assert
(!string.IsNullOrEmpty(AttributeEnding));
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
198
Debug.
Assert
(method != null);
199
Debug.
Assert
(method.DeclaringType != null);
Microsoft.AspNetCore.Html.Abstractions (2)
HtmlFormattableString.cs (2)
89
Debug.
Assert
(formatProvider != null);
90
Debug.
Assert
(encoder != null);
Microsoft.AspNetCore.Http (12)
src\Http\Shared\StreamCopyOperationInternal.cs (4)
39
Debug.
Assert
(source != null);
40
Debug.
Assert
(destination != null);
41
Debug.
Assert
(!bytesRemaining.HasValue || bytesRemaining.GetValueOrDefault() >= 0);
42
Debug.
Assert
(buffer != null);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (8)
229
Debug.
Assert
(_arrayStorage == null);
515
Debug.
Assert
(_arrayStorage != null);
545
Debug.
Assert
(_arrayStorage is not null);
546
Debug.
Assert
(_count <= _arrayStorage.Length);
556
Debug.
Assert
(_dictionaryStorage == null);
557
Debug.
Assert
(_arrayStorage != null);
576
Debug.
Assert
(_dictionaryStorage == null);
577
Debug.
Assert
(_arrayStorage != null);
Microsoft.AspNetCore.Http.Abstractions (24)
PathString.cs (2)
158
Debug.
Assert
(count > 0);
159
Debug.
Assert
(buffer is not null);
Routing\RouteValueDictionary.cs (3)
491
Debug.
Assert
(_arrayStorage != null);
774
Debug.
Assert
(_propertyStorage != null);
887
Debug.
Assert
(value != null);
src\Shared\PropertyHelper\PropertyHelper.cs (18)
161
Debug.
Assert
(propertyInfo != null);
181
Debug.
Assert
(propertyInfo != null);
195
Debug.
Assert
(propertyInfo != null);
198
Debug.
Assert
(propertyGetterWrapperMethod != null);
199
Debug.
Assert
(propertyGetterWrapperMethod.IsGenericMethodDefinition);
200
Debug.
Assert
(propertyGetterWrapperMethod.GetParameters().Length == 2);
203
Debug.
Assert
(propertyGetterByRefWrapperMethod != null);
204
Debug.
Assert
(propertyGetterByRefWrapperMethod.IsGenericMethodDefinition);
205
Debug.
Assert
(propertyGetterByRefWrapperMethod.GetParameters().Length == 2);
208
Debug.
Assert
(getMethod != null);
209
Debug.
Assert
(!getMethod.IsStatic);
210
Debug.
Assert
(getMethod.GetParameters().Length == 0);
277
Debug.
Assert
(propertyInfo != null);
278
Debug.
Assert
(!propertyInfo.DeclaringType!.IsValueType);
281
Debug.
Assert
(setMethod != null);
282
Debug.
Assert
(!setMethod.IsStatic);
283
Debug.
Assert
(setMethod.ReturnType == typeof(void));
285
Debug.
Assert
(parameters.Length == 1);
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
47
Debug.
Assert
(_pos == _span.Length);
Microsoft.AspNetCore.Http.Connections (5)
Internal\HttpConnectionContext.cs (1)
522
Debug.
Assert
(Status == HttpConnectionStatus.Disposed);
Internal\HttpConnectionsMetrics.cs (1)
57
Debug.
Assert
(transportType != HttpTransportType.None);
src\Shared\WebEncoders\WebEncoders.cs (1)
344
Debug.
Assert
(output.Length >= GetArraySizeRequiredToEncode(input.Length));
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
Microsoft.AspNetCore.Http.Connections.Client (9)
Internal\Constants.cs (1)
24
Debug.
Assert
(assemblyVersion != null);
Internal\LongPollingTransport.cs (2)
73
Debug.
Assert
(_application != null);
143
Debug.
Assert
(_application != null);
Internal\ServerSentEventsTransport.cs (2)
91
Debug.
Assert
(_application != null);
129
Debug.
Assert
(_application != null);
Internal\WebSocketsTransport.cs (4)
339
Debug.
Assert
(_application != null);
349
Debug.
Assert
(_notifyOnReconnect is not null);
435
Debug.
Assert
(_application != null);
532
Debug.
Assert
(_application != null);
Microsoft.AspNetCore.Http.Connections.Common (3)
NegotiateProtocol.cs (2)
64
Debug.
Assert
(writer.CurrentDepth == 0);
133
Debug.
Assert
(writer.CurrentDepth == 0);
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
126
Debug.
Assert
(charsUsed == 1);
Microsoft.AspNetCore.Http.Extensions (21)
RequestDelegateFactory.cs (4)
246
Debug.
Assert
(untargetableRequestDelegate is not null);
258
Debug.
Assert
(targetableRequestDelegate is not null);
416
Debug.
Assert
(factoryContext.EndpointBuilder.FilterFactories.Count > 0);
1952
Debug.
Assert
(bindAsyncMethod.Expression is not null);
src\Components\Endpoints\src\FormMapping\Factories\NullableConverterFactory.cs (3)
26
Debug.
Assert
(underlyingType != null);
29
Debug.
Assert
(underlyingConverter != null);
32
Debug.
Assert
(expectedConverterType != null);
src\Components\Endpoints\src\FormMapping\FormDataReader.cs (3)
202
Debug.
Assert
(_currentDepth >= 0);
206
Debug.
Assert
(_currentPrefixBuffer.Length >= keyLength);
235
Debug.
Assert
(_prefixBuffer.Length >= (_currentPrefixBuffer.Length + separator.Length));
src\Http\Shared\StreamCopyOperationInternal.cs (4)
39
Debug.
Assert
(source != null);
40
Debug.
Assert
(destination != null);
41
Debug.
Assert
(!bytesRemaining.HasValue || bytesRemaining.GetValueOrDefault() >= 0);
42
Debug.
Assert
(buffer != null);
src\Shared\ParameterBindingMethodCache.cs (1)
719
Debug.
Assert
(obj is ParameterLookupKey);
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
47
Debug.
Assert
(_pos == _span.Length);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (5)
37
Debug.
Assert
(value >= 0);
38
Debug.
Assert
(value <= _chars.Length);
48
Debug.
Assert
(capacity >= 0);
86
Debug.
Assert
(index < _pos);
289
Debug.
Assert
(additionalCapacityBeyondPos > 0);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\Diagnostics\AnalyzerDebug.cs (2)
12
/// <inheritdoc cref="Debug.
Assert
(bool)"/>
14
public static void Assert([DoesNotReturnIf(false)] bool b) => Debug.
Assert
(b);
Microsoft.AspNetCore.Http.Results (6)
src\Http\Shared\StreamCopyOperationInternal.cs (4)
39
Debug.
Assert
(source != null);
40
Debug.
Assert
(destination != null);
41
Debug.
Assert
(!bytesRemaining.HasValue || bytesRemaining.GetValueOrDefault() >= 0);
42
Debug.
Assert
(buffer != null);
src\Shared\RangeHelper\RangeHelper.cs (1)
67
Debug.
Assert
(rangeHeader.Ranges.Count == 1);
src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
26
Debug.
Assert
(path.HasValue);
Microsoft.AspNetCore.HttpLogging (14)
BufferingStream.cs (1)
147
Debug.
Assert
(_tail != null);
src\Shared\Buffers\BufferSegment.cs (4)
27
Debug.
Assert
(value <= AvailableMemory.Length);
64
Debug.
Assert
(_memoryOwner != null);
102
Debug.
Assert
(segment != null);
103
Debug.
Assert
(Next == null);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
47
Debug.
Assert
(_pos == _span.Length);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (5)
37
Debug.
Assert
(value >= 0);
38
Debug.
Assert
(value <= _chars.Length);
48
Debug.
Assert
(capacity >= 0);
86
Debug.
Assert
(index < _pos);
289
Debug.
Assert
(additionalCapacityBeyondPos > 0);
Microsoft.AspNetCore.Identity (1)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
431
Debug.
Assert
(!result.Succeeded);
Microsoft.AspNetCore.Identity.FunctionalTests (4)
src\Identity\Extensions.Core\src\Rfc6238AuthenticationService.cs (4)
40
Debug.
Assert
(res);
53
Debug.
Assert
(res);
54
Debug.
Assert
(written == hash.Length);
61
Debug.
Assert
(offset + 4 < hash.Length);
Microsoft.AspNetCore.Mvc.Abstractions (6)
ModelBinding\ModelMetadata.cs (3)
564
Debug.
Assert
(_parameterMapping != null);
565
Debug.
Assert
(_boundConstructorPropertyMapping != null);
652
Debug.
Assert
(ModelType != null);
ModelBinding\ModelStateDictionary.cs (2)
552
Debug.
Assert
(key != null);
930
Debug.
Assert
(ChildNodes != null);
src\Shared\ParameterBindingMethodCache.cs (1)
719
Debug.
Assert
(obj is ParameterLookupKey);
Microsoft.AspNetCore.Mvc.Analyzers (3)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (3)
34
Debug.
Assert
(methodSymbol != null);
159
Debug.
Assert
(method.PartialImplementationPart == null && !SymbolEqualityComparer.Default.Equals(method.PartialDefinitionPart, method));
165
Debug.
Assert
(!SymbolEqualityComparer.Default.Equals(method.PartialImplementationPart, method));
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (3)
34
Debug.
Assert
(methodSymbol != null);
159
Debug.
Assert
(method.PartialImplementationPart == null && !SymbolEqualityComparer.Default.Equals(method.PartialDefinitionPart, method));
165
Debug.
Assert
(!SymbolEqualityComparer.Default.Equals(method.PartialImplementationPart, method));
Microsoft.AspNetCore.Mvc.Core (231)
ActionConstraints\ActionConstraintCache.cs (1)
95
Debug.
Assert
(entry.ActionConstraints != null || entry.Items != null);
ApplicationModels\ApplicationModelFactory.cs (1)
79
Debug.
Assert
(result != null);
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
134
Debug.
Assert
(IsAttributeRouted(actionDescriptor));
Authorization\AuthorizeFilter.cs (1)
205
Debug.
Assert
(AuthorizeData != null);
Controllers\ControllerBinderDelegateProvider.cs (1)
60
Debug.
Assert
(valueProvider is not null);
Formatters\AcceptHeaderParser.cs (2)
124
Debug.
Assert
(input != null);
125
Debug.
Assert
(startIndex <= input.Length); // it's OK if index == value.Length.
Infrastructure\ActionSelectionTable.cs (2)
178
Debug.
Assert
(matches != null);
179
Debug.
Assert
(matches.Count >= 0);
Infrastructure\ControllerActionInvoker.cs (15)
116
Debug.
Assert
(state != null);
117
Debug.
Assert
(_actionExecutingContext != null);
140
Debug.
Assert
(state != null);
141
Debug.
Assert
(_actionExecutingContext != null);
171
Debug.
Assert
(state != null);
172
Debug.
Assert
(_actionExecutingContext != null);
220
Debug.
Assert
(state != null);
221
Debug.
Assert
(_actionExecutingContext != null);
222
Debug.
Assert
(_actionExecutedContext != null);
314
Debug.
Assert
(_actionExecutedContext != null);
336
Debug.
Assert
(invoker._actionExecutedContext != null);
342
Debug.
Assert
(_actionExecutingContext != null);
355
Debug.
Assert
(_actionExecutedContext != null);
362
Debug.
Assert
(invoker._actionExecutedContext != null);
523
Debug.
Assert
(_cacheEntry.ControllerBinderDelegate != null);
Infrastructure\DefaultActionDescriptorCollectionProvider.cs (4)
57
Debug.
Assert
(_collection != null);
58
Debug.
Assert
(_changeToken != null);
72
Debug.
Assert
(_collection != null);
73
Debug.
Assert
(_changeToken != null);
Infrastructure\ObjectResultExecutor.cs (1)
124
Debug.
Assert
(result.ContentTypes != null);
Infrastructure\ResourceInvoker.cs (49)
335
Debug.
Assert
(state != null);
336
Debug.
Assert
(_authorizationContext != null);
359
Debug.
Assert
(state != null);
360
Debug.
Assert
(_authorizationContext != null);
381
Debug.
Assert
(state != null);
382
Debug.
Assert
(_authorizationContext != null);
411
Debug.
Assert
(state != null);
412
Debug.
Assert
(_authorizationContext != null);
413
Debug.
Assert
(_authorizationContext.Result != null);
471
Debug.
Assert
(state != null);
472
Debug.
Assert
(_resourceExecutingContext != null);
495
Debug.
Assert
(state != null);
496
Debug.
Assert
(_resourceExecutingContext != null);
530
Debug.
Assert
(state != null);
531
Debug.
Assert
(_resourceExecutingContext != null);
573
Debug.
Assert
(state != null);
574
Debug.
Assert
(_resourceExecutingContext != null);
575
Debug.
Assert
(_resourceExecutedContext != null);
599
Debug.
Assert
(state != null);
600
Debug.
Assert
(_resourceExecutingContext != null);
601
Debug.
Assert
(_resourceExecutedContext != null);
647
Debug.
Assert
(scope == Scope.Invoker || scope == Scope.Resource);
666
Debug.
Assert
(state != null);
696
Debug.
Assert
(state != null);
697
Debug.
Assert
(_exceptionContext != null);
733
Debug.
Assert
(state != null);
782
Debug.
Assert
(state != null);
783
Debug.
Assert
(_exceptionContext != null);
856
Debug.
Assert
(scope == Scope.Invoker || scope == Scope.Resource);
889
Debug.
Assert
(scope == Scope.Invoker);
908
Debug.
Assert
(_resourceExecutingContext != null);
922
Debug.
Assert
(_resourceExecutedContext != null);
929
Debug.
Assert
(invoker._resourceExecutedContext != null);
971
Debug.
Assert
(_resourceExecutedContext != null);
993
Debug.
Assert
(invoker._resourceExecutedContext != null);
1168
Debug.
Assert
(state != null);
1169
Debug.
Assert
(_resultExecutingContext != null);
1192
Debug.
Assert
(state != null);
1193
Debug.
Assert
(_resultExecutingContext != null);
1225
Debug.
Assert
(state != null);
1226
Debug.
Assert
(_resultExecutingContext != null);
1274
Debug.
Assert
(state != null);
1275
Debug.
Assert
(_resultExecutingContext != null);
1276
Debug.
Assert
(_resultExecutedContext != null);
1373
Debug.
Assert
(_resultExecutedContext != null);
1396
Debug.
Assert
(invoker._resultExecutedContext != null);
1404
Debug.
Assert
(_resultExecutingContext != null);
1418
Debug.
Assert
(_resultExecutedContext != null);
1425
Debug.
Assert
(invoker._resultExecutedContext != null);
ModelBinding\Binders\CollectionModelBinder.cs (1)
168
Debug.
Assert
(model != null);
ModelBinding\Binders\ComplexObjectModelBinder.cs (3)
68
Debug.
Assert
(propertyData == GreedyPropertiesMayHaveData || propertyData == ValueProviderDataAvailable);
440
Debug.
Assert
(property.MetadataKind == ModelMetadataKind.Property);
485
Debug.
Assert
(parameter.MetadataKind == ModelMetadataKind.Parameter);
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
97
Debug.
Assert
(propertyData == GreedyPropertiesMayHaveData || propertyData == ValueProviderDataAvailable);
ModelBinding\Binders\DictionaryModelBinder.cs (1)
119
Debug.
Assert
(result.Model != null);
ModelBinding\Binders\FormFileModelBinder.cs (2)
105
Debug.
Assert
(postedFiles is List<IFormFile>);
110
Debug.
Assert
(postedFiles is List<IFormFile>);
ModelBinding\Binders\HeaderModelBinder.cs (1)
194
Debug.
Assert
(values != null);
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
358
Debug.
Assert
(propertyKey.MetadataKind == ModelMetadataKind.Property);
ModelBinding\ModelBinderFactory.cs (4)
79
Debug.
Assert
(!(binder is PlaceholderBinder));
176
Debug.
Assert
(metadata != null);
177
Debug.
Assert
(binder != null);
189
Debug.
Assert
(metadata != null);
ModelBinding\PrefixContainer.cs (2)
202
Debug.
Assert
(candidate.StartsWith(prefix, StringComparison.OrdinalIgnoreCase));
259
Debug.
Assert
(candidate.StartsWith(prefix, StringComparison.OrdinalIgnoreCase));
ModelBinding\SuppressChildValidationMetadataProvider.cs (1)
85
Debug.
Assert
(FullTypeName != null);
ModelBinding\Validation\ClientValidatorCache.cs (1)
83
Debug.
Assert
(entry.Items != null);
ModelBinding\Validation\ValidationStack.cs (1)
56
Debug.
Assert
(ReferenceEquals(List[List.Count - 1], model));
ModelBinding\Validation\ValidationVisitor.cs (3)
203
Debug.
Assert
(Key != null);
204
Debug.
Assert
(Metadata != null);
427
Debug.
Assert
(Metadata is not null && Key is not null && Model is not null);
ModelBinding\Validation\ValidatorCache.cs (1)
73
Debug.
Assert
(entry.Items != null);
MvcCoreDiagnosticListenerExtensions.cs (100)
26
Debug.
Assert
(diagnosticListener != null);
27
Debug.
Assert
(actionDescriptor != null);
28
Debug.
Assert
(httpContext != null);
29
Debug.
Assert
(routeData != null);
54
Debug.
Assert
(diagnosticListener != null);
55
Debug.
Assert
(actionDescriptor != null);
56
Debug.
Assert
(httpContext != null);
57
Debug.
Assert
(routeData != null);
81
Debug.
Assert
(diagnosticListener != null);
82
Debug.
Assert
(authorizationContext != null);
83
Debug.
Assert
(filter != null);
111
Debug.
Assert
(diagnosticListener != null);
112
Debug.
Assert
(authorizationContext != null);
113
Debug.
Assert
(filter != null);
141
Debug.
Assert
(diagnosticListener != null);
142
Debug.
Assert
(authorizationContext != null);
143
Debug.
Assert
(filter != null);
171
Debug.
Assert
(diagnosticListener != null);
172
Debug.
Assert
(authorizationContext != null);
173
Debug.
Assert
(filter != null);
201
Debug.
Assert
(diagnosticListener != null);
202
Debug.
Assert
(resourceExecutingContext != null);
203
Debug.
Assert
(filter != null);
231
Debug.
Assert
(diagnosticListener != null);
232
Debug.
Assert
(resourceExecutedContext != null);
233
Debug.
Assert
(filter != null);
261
Debug.
Assert
(diagnosticListener != null);
262
Debug.
Assert
(resourceExecutingContext != null);
263
Debug.
Assert
(filter != null);
291
Debug.
Assert
(diagnosticListener != null);
292
Debug.
Assert
(resourceExecutingContext != null);
293
Debug.
Assert
(filter != null);
321
Debug.
Assert
(diagnosticListener != null);
322
Debug.
Assert
(resourceExecutedContext != null);
323
Debug.
Assert
(filter != null);
351
Debug.
Assert
(diagnosticListener != null);
352
Debug.
Assert
(resourceExecutedContext != null);
353
Debug.
Assert
(filter != null);
381
Debug.
Assert
(diagnosticListener != null);
382
Debug.
Assert
(exceptionContext != null);
383
Debug.
Assert
(filter != null);
411
Debug.
Assert
(diagnosticListener != null);
412
Debug.
Assert
(exceptionContext != null);
413
Debug.
Assert
(filter != null);
441
Debug.
Assert
(diagnosticListener != null);
442
Debug.
Assert
(exceptionContext != null);
443
Debug.
Assert
(filter != null);
471
Debug.
Assert
(diagnosticListener != null);
472
Debug.
Assert
(exceptionContext != null);
473
Debug.
Assert
(filter != null);
501
Debug.
Assert
(diagnosticListener != null);
502
Debug.
Assert
(actionExecutingContext != null);
503
Debug.
Assert
(filter != null);
531
Debug.
Assert
(diagnosticListener != null);
532
Debug.
Assert
(actionExecutedContext != null);
533
Debug.
Assert
(filter != null);
561
Debug.
Assert
(diagnosticListener != null);
562
Debug.
Assert
(actionExecutingContext != null);
563
Debug.
Assert
(filter != null);
591
Debug.
Assert
(diagnosticListener != null);
592
Debug.
Assert
(actionExecutingContext != null);
593
Debug.
Assert
(filter != null);
621
Debug.
Assert
(diagnosticListener != null);
622
Debug.
Assert
(actionExecutedContext != null);
623
Debug.
Assert
(filter != null);
651
Debug.
Assert
(diagnosticListener != null);
652
Debug.
Assert
(actionExecutedContext != null);
653
Debug.
Assert
(filter != null);
682
Debug.
Assert
(diagnosticListener != null);
683
Debug.
Assert
(actionContext != null);
684
Debug.
Assert
(actionArguments != null);
685
Debug.
Assert
(controller != null);
728
Debug.
Assert
(diagnosticListener != null);
729
Debug.
Assert
(actionContext != null);
730
Debug.
Assert
(actionArguments != null);
731
Debug.
Assert
(controller != null);
774
Debug.
Assert
(diagnosticListener != null);
775
Debug.
Assert
(resultExecutingContext != null);
776
Debug.
Assert
(filter != null);
804
Debug.
Assert
(diagnosticListener != null);
805
Debug.
Assert
(resultExecutedContext != null);
806
Debug.
Assert
(filter != null);
834
Debug.
Assert
(diagnosticListener != null);
835
Debug.
Assert
(resultExecutingContext != null);
836
Debug.
Assert
(filter != null);
864
Debug.
Assert
(diagnosticListener != null);
865
Debug.
Assert
(resultExecutingContext != null);
866
Debug.
Assert
(filter != null);
894
Debug.
Assert
(diagnosticListener != null);
895
Debug.
Assert
(resultExecutedContext != null);
896
Debug.
Assert
(filter != null);
924
Debug.
Assert
(diagnosticListener != null);
925
Debug.
Assert
(resultExecutedContext != null);
926
Debug.
Assert
(filter != null);
954
Debug.
Assert
(diagnosticListener != null);
955
Debug.
Assert
(actionContext != null);
956
Debug.
Assert
(result != null);
980
Debug.
Assert
(diagnosticListener != null);
981
Debug.
Assert
(actionContext != null);
982
Debug.
Assert
(result != null);
Routing\ActionEndpointDataSourceBase.cs (4)
46
Debug.
Assert
(_changeToken != null);
47
Debug.
Assert
(_endpoints != null);
90
Debug.
Assert
(_changeToken != null);
91
Debug.
Assert
(_endpoints != null);
Routing\DynamicControllerEndpointMatcherPolicy.cs (1)
166
Debug.
Assert
(currentSelector == null || ReferenceEquals(currentSelector, selector));
Routing\UrlHelperBase.cs (2)
308
Debug.
Assert
(path.HasValue);
377
Debug.
Assert
(pageName.Length > 0);
Routing\ViewEnginePath.cs (3)
18
Debug.
Assert
(!string.IsNullOrEmpty(first));
31
Debug.
Assert
(index >= 0);
48
Debug.
Assert
(!string.IsNullOrEmpty(path));
src\Shared\PropertyHelper\PropertyHelper.cs (18)
161
Debug.
Assert
(propertyInfo != null);
181
Debug.
Assert
(propertyInfo != null);
195
Debug.
Assert
(propertyInfo != null);
198
Debug.
Assert
(propertyGetterWrapperMethod != null);
199
Debug.
Assert
(propertyGetterWrapperMethod.IsGenericMethodDefinition);
200
Debug.
Assert
(propertyGetterWrapperMethod.GetParameters().Length == 2);
203
Debug.
Assert
(propertyGetterByRefWrapperMethod != null);
204
Debug.
Assert
(propertyGetterByRefWrapperMethod.IsGenericMethodDefinition);
205
Debug.
Assert
(propertyGetterByRefWrapperMethod.GetParameters().Length == 2);
208
Debug.
Assert
(getMethod != null);
209
Debug.
Assert
(!getMethod.IsStatic);
210
Debug.
Assert
(getMethod.GetParameters().Length == 0);
277
Debug.
Assert
(propertyInfo != null);
278
Debug.
Assert
(!propertyInfo.DeclaringType!.IsValueType);
281
Debug.
Assert
(setMethod != null);
282
Debug.
Assert
(!setMethod.IsStatic);
283
Debug.
Assert
(setMethod.ReturnType == typeof(void));
285
Debug.
Assert
(parameters.Length == 1);
src\Shared\RangeHelper\RangeHelper.cs (1)
67
Debug.
Assert
(rangeHeader.Ranges.Count == 1);
src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
26
Debug.
Assert
(path.HasValue);
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\StubModelBinder.cs (1)
64
Debug.
Assert
(bindingContext.Result == ModelBindingResult.Failed());
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
ActivityReplacer.cs (1)
20
Debug.
Assert
(Activity.Current == _activity);
Microsoft.AspNetCore.Mvc.Formatters.Xml (3)
XmlDataContractSerializerOutputFormatter.cs (2)
242
Debug.
Assert
(valueType is not null);
251
Debug.
Assert
(wrapperProvider is not null);
XmlSerializerOutputFormatter.cs (1)
228
Debug.
Assert
(wrapperProvider is not null);
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
BinderTypeBasedModelBinderIntegrationTest.cs (5)
322
Debug.
Assert
(bindingContext.Result == ModelBindingResult.Failed());
347
Debug.
Assert
(bindingContext.Result == ModelBindingResult.Failed());
371
Debug.
Assert
(bindingContext.Result == ModelBindingResult.Failed());
389
Debug.
Assert
(bindingContext.Result == ModelBindingResult.Failed());
401
Debug.
Assert
(bindingContext.Result == ModelBindingResult.Failed());
GenericModelBinderIntegrationTest.cs (1)
170
Debug.
Assert
(bindingContext.Result == ModelBindingResult.Failed());
Microsoft.AspNetCore.Mvc.Localization (1)
Properties\Resources.Designer.cs (1)
49
System.Diagnostics.Debug.
Assert
(value != null);
Microsoft.AspNetCore.Mvc.Razor (7)
Compilation\DefaultViewCompiler.cs (1)
120
Debug.
Assert
(relativePath != null);
RazorPageBase.cs (2)
304
Debug.
Assert
(_valueBuffer is not null);
607
Debug.
Assert
(_tagHelperAttributeInfo.ExecutionContext != null);
RazorView.cs (2)
97
Debug.
Assert
(_bufferScope != null);
280
Debug.
Assert
(originalLocations is not null && layoutPageResult.SearchedLocations is not null);
RazorViewEngine.cs (2)
482
Debug.
Assert
(!string.IsNullOrEmpty(name));
488
Debug.
Assert
(!string.IsNullOrEmpty(name));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (16)
CSharpCompiler.cs (3)
117
Debug.
Assert
(_parseOptions is not null);
118
Debug.
Assert
(_compilationOptions is not null);
119
Debug.
Assert
(_emitOptions is not null);
PageActionDescriptorChangeProvider.cs (1)
32
Debug.
Assert
(!string.IsNullOrEmpty(rootDirectory));
RuntimeViewCompiler.cs (5)
138
Debug.
Assert
(item.ExpirationTokens != null);
152
Debug.
Assert
(item.Descriptor != null);
162
Debug.
Assert
(taskSource != null);
168
Debug.
Assert
(item.Descriptor != null);
383
Debug.
Assert
(relativePath != null);
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (7)
89
Debug.
Assert
(relativePath.StartsWith('/'));
129
Debug.
Assert
(path.StartsWith(rootDirectory, StringComparison.OrdinalIgnoreCase));
130
Debug.
Assert
(path.EndsWith(RazorViewEngine.ViewExtension, StringComparison.OrdinalIgnoreCase));
140
Debug.
Assert
(!string.IsNullOrEmpty(areaName));
141
Debug.
Assert
(!string.IsNullOrEmpty(viewEnginePath));
142
Debug.
Assert
(viewEnginePath.StartsWith('/'));
175
Debug.
Assert
(directory.StartsWith('/'));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
TestInfrastructure\DirectoryNode.cs (2)
34
Debug.
Assert
(directory != null);
113
Debug.
Assert
(!string.IsNullOrEmpty(path));
Microsoft.AspNetCore.Mvc.RazorPages (78)
ApplicationModels\PageRouteModelFactory.cs (7)
89
Debug.
Assert
(relativePath.StartsWith('/'));
129
Debug.
Assert
(path.StartsWith(rootDirectory, StringComparison.OrdinalIgnoreCase));
130
Debug.
Assert
(path.EndsWith(RazorViewEngine.ViewExtension, StringComparison.OrdinalIgnoreCase));
140
Debug.
Assert
(!string.IsNullOrEmpty(areaName));
141
Debug.
Assert
(!string.IsNullOrEmpty(viewEnginePath));
142
Debug.
Assert
(viewEnginePath.StartsWith('/'));
175
Debug.
Assert
(directory.StartsWith('/'));
DependencyInjection\RazorPagesRazorViewEngineOptionsSetup.cs (1)
26
Debug.
Assert
(!string.IsNullOrEmpty(rootDirectory));
Infrastructure\DynamicPageEndpointMatcherPolicy.cs (1)
183
Debug.
Assert
(currentSelector == null || ReferenceEquals(currentSelector, selector));
Infrastructure\DynamicPageEndpointSelectorCache.cs (1)
35
Debug.
Assert
(dataSourceId is not null);
Infrastructure\PageActionInvoker.cs (28)
192
Debug.
Assert
(_instance is not null);
213
Debug.
Assert
(handlerBinder is not null);
214
Debug.
Assert
(_arguments is not null);
253
Debug.
Assert
(_instance is not null);
254
Debug.
Assert
(_arguments is not null);
321
Debug.
Assert
(_instance is not null);
357
Debug.
Assert
(state != null);
358
Debug.
Assert
(_handlerSelectedContext != null);
381
Debug.
Assert
(state != null);
382
Debug.
Assert
(_handlerSelectedContext != null);
397
Debug.
Assert
(state != null);
398
Debug.
Assert
(_handlerSelectedContext != null);
439
Debug.
Assert
(_instance is not null);
440
Debug.
Assert
(_arguments is not null);
471
Debug.
Assert
(state != null);
472
Debug.
Assert
(_handlerExecutingContext != null);
495
Debug.
Assert
(state != null);
496
Debug.
Assert
(_handlerExecutingContext != null);
498
Debug.
Assert
(_instance is not null);
529
Debug.
Assert
(state != null);
530
Debug.
Assert
(_handlerExecutingContext != null);
531
Debug.
Assert
(_instance is not null);
580
Debug.
Assert
(state != null);
581
Debug.
Assert
(_handlerExecutingContext != null);
582
Debug.
Assert
(_handlerExecutedContext != null);
670
Debug.
Assert
(_handlerExecutedContext != null);
675
Debug.
Assert
(_handlerExecutingContext != null);
690
Debug.
Assert
(_handlerExecutedContext != null);
MvcRazorPagesDiagnosticListenerExtensions.cs (40)
20
Debug.
Assert
(diagnosticListener != null);
21
Debug.
Assert
(actionContext != null);
22
Debug.
Assert
(handlerMethodDescriptor != null);
23
Debug.
Assert
(arguments != null);
24
Debug.
Assert
(instance != null);
56
Debug.
Assert
(diagnosticListener != null);
57
Debug.
Assert
(actionContext != null);
58
Debug.
Assert
(handlerMethodDescriptor != null);
59
Debug.
Assert
(arguments != null);
60
Debug.
Assert
(instance != null);
90
Debug.
Assert
(diagnosticListener != null);
91
Debug.
Assert
(handlerExecutionContext != null);
92
Debug.
Assert
(filter != null);
120
Debug.
Assert
(diagnosticListener != null);
121
Debug.
Assert
(handlerExecutedContext != null);
122
Debug.
Assert
(filter != null);
150
Debug.
Assert
(diagnosticListener != null);
151
Debug.
Assert
(handlerExecutingContext != null);
152
Debug.
Assert
(filter != null);
180
Debug.
Assert
(diagnosticListener != null);
181
Debug.
Assert
(handlerExecutingContext != null);
182
Debug.
Assert
(filter != null);
210
Debug.
Assert
(diagnosticListener != null);
211
Debug.
Assert
(handlerExecutedContext != null);
212
Debug.
Assert
(filter != null);
240
Debug.
Assert
(diagnosticListener != null);
241
Debug.
Assert
(handlerExecutedContext != null);
242
Debug.
Assert
(filter != null);
270
Debug.
Assert
(diagnosticListener != null);
271
Debug.
Assert
(handlerSelectedContext != null);
272
Debug.
Assert
(filter != null);
300
Debug.
Assert
(diagnosticListener != null);
301
Debug.
Assert
(handlerSelectedContext != null);
302
Debug.
Assert
(filter != null);
330
Debug.
Assert
(diagnosticListener != null);
331
Debug.
Assert
(handlerSelectedContext != null);
332
Debug.
Assert
(filter != null);
360
Debug.
Assert
(diagnosticListener != null);
361
Debug.
Assert
(handlerSelectedContext != null);
362
Debug.
Assert
(filter != null);
Microsoft.AspNetCore.Mvc.TagHelpers (7)
CacheTagHelper.cs (1)
269
Debug.
Assert
(length == 0);
CurrentValues.cs (1)
12
Debug.
Assert
(values != null);
LinkTagHelper.cs (2)
324
Debug.
Assert
(url != null);
450
Debug.
Assert
(fallbackHrefs[i] != null);
ScriptTagHelper.cs (2)
291
Debug.
Assert
(url != null);
319
Debug.
Assert
(src != null);
TagHelperOutputExtensions.cs (1)
99
Debug.
Assert
(found);
Microsoft.AspNetCore.Mvc.Testing (2)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
293
Debug.
Assert
(_hostTcs.Task.IsCompleted);
Handlers\RedirectHandler.cs (1)
137
Debug.
Assert
(response.RequestMessage is not null);
Microsoft.AspNetCore.Mvc.ViewFeatures (46)
AttributeDictionary.cs (8)
76
Debug.
Assert
(index >= 0 && index < Count && _items != null);
82
Debug.
Assert
(index >= 0 && index <= Count);
83
Debug.
Assert
(value.Key != null);
95
Debug.
Assert
(index >= 0 && index <= Count);
96
Debug.
Assert
(value.Key != null);
108
Debug.
Assert
(index >= 0 && index < Count);
110
Debug.
Assert
(_items != null);
119
Debug.
Assert
(key != null);
Buffers\PagedBufferedTextWriter.cs (2)
50
Debug.
Assert
(length > 0);
66
Debug.
Assert
(length == 0);
Buffers\PagedCharBuffer.cs (2)
61
Debug.
Assert
(copyLength > 0);
82
Debug.
Assert
(copyLength > 0);
CachedExpressionCompiler.cs (2)
45
Debug.
Assert
(expression != null);
223
Debug.
Assert
(combinedNullTest.Type == typeof(bool));
DefaultDisplayTemplates.cs (1)
89
Debug.
Assert
(elementMetadata != null);
DefaultEditorTemplates.cs (1)
71
Debug.
Assert
(elementMetadata != null);
DefaultHtmlGenerator.cs (4)
199
Debug.
Assert
(!isChecked.HasValue);
454
Debug.
Assert
(!isChecked.HasValue);
457
Debug.
Assert
(value != null);
966
Debug.
Assert
(isTargetEnum ^ enumNames == null);
ExpressionHelper.cs (7)
131
Debug.
Assert
(segmentCount >= 0);
134
Debug.
Assert
(!doNotCache);
148
Debug.
Assert
(doNotCache);
157
Debug.
Assert
(doNotCache);
168
Debug.
Assert
(!name.Contains("__"));
182
Debug.
Assert
(false);
187
Debug.
Assert
(segmentCount == 0);
ExpressionMetadataProvider.cs (1)
118
Debug.
Assert
(metadata != null);
ModelExplorer.cs (2)
127
Debug.
Assert
(Container != null);
202
Debug.
Assert
(propertyHelper != null);
ModelExplorerExtensions.cs (1)
53
Debug.
Assert
(enumGroupedDisplayNamesAndValues != null);
src\Shared\PooledArrayBufferWriter.cs (6)
80
Debug.
Assert
(_rentedBuffer != null);
144
Debug.
Assert
(_rentedBuffer != null);
165
Debug.
Assert
(oldBuffer.Length >= _index);
166
Debug.
Assert
(_rentedBuffer.Length >= _index);
174
Debug.
Assert
(_rentedBuffer.Length - _index > 0);
175
Debug.
Assert
(_rentedBuffer.Length - _index >= sizeHint);
TempDataDictionary.cs (1)
152
Debug.
Assert
(_initialKeys is not null && _retainedKeys is not null && _data is not null);
TemplateBuilder.cs (1)
107
Debug.
Assert
(enumGrouped != null);
ValidationHelpers.cs (4)
13
Debug.
Assert
(modelError != null);
29
Debug.
Assert
(modelError != null);
30
Debug.
Assert
(containingEntry != null);
31
Debug.
Assert
(modelExplorer != null);
ViewDataDictionaryFactory.cs (2)
18
Debug.
Assert
(constructor != null);
39
Debug.
Assert
(constructor != null);
ViewDataEvaluator.cs (1)
100
Debug.
Assert
(expression != null);
Microsoft.AspNetCore.OpenApi (17)
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (8)
226
Debug.
Assert
(typeInfo.IsReadOnly);
310
Debug.
Assert
(derivedType.TypeDiscriminator is null or int or string);
597
Debug.
Assert
(parameterTypeInfo.Type == parameter.ParameterType);
657
Debug.
Assert
(_currentPath != null);
664
Debug.
Assert
(_currentDepth > 0);
669
Debug.
Assert
(_currentPath != null);
682
Debug.
Assert
(_currentPath != null);
683
Debug.
Assert
(_generatedTypePaths != null);
Schemas\JsonSchemaMapper\JsonSchemaMapper.ReflectionHelpers.cs (5)
27
Debug.
Assert
(typeInfo.Kind is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary);
73
Debug.
Assert
(converter is null || IsBuiltInConverter(converter));
95
Debug.
Assert
(typeInfo.Type.IsEnum && IsBuiltInConverter(converter));
157
Debug.
Assert
(typeInfo.Kind is JsonTypeInfoKind.Object);
277
Debug.
Assert
(memberInfo is PropertyInfo or FieldInfo);
src\Shared\ParameterBindingMethodCache.cs (1)
719
Debug.
Assert
(obj is ParameterLookupKey);
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
126
Debug.
Assert
(charsUsed == 1);
Microsoft.AspNetCore.OutputCaching (20)
FormatterBinaryWriter.cs (6)
46
Debug.
Assert
(target is not null);
50
Debug.
Assert
(length == 0 && offset == 0);
55
Debug.
Assert
(offset >= 0 && offset <= length);
56
Debug.
Assert
(length > 0);
94
Debug.
Assert
(actual == bytes);
102
Debug.
Assert
(actual == bytes);
Memory\MemoryOutputCacheStore.cs (5)
97
Debug.
Assert
(keys != null);
115
Debug.
Assert
(key != null);
136
Debug.
Assert
(tags != null);
137
Debug.
Assert
(tags.Length > 0);
138
Debug.
Assert
(key is string);
RecyclableArrayBufferWriter.cs (4)
66
Debug.
Assert
(_buffer.Length > _index);
73
Debug.
Assert
(_buffer.Length > _index);
107
Debug.
Assert
(needed > currentLength);
127
Debug.
Assert
(FreeCapacity > 0 && FreeCapacity >= sizeHint);
RecyclableSequenceBuilder.cs (2)
73
Debug.
Assert
(_currentSegment is not null);
75
Debug.
Assert
(_currentSegmentIndex >= 0 && _currentSegmentIndex <= current.Length);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (6)
RedisOutputCacheStore.cs (6)
99
Debug.
Assert
(secondsWithJitter >= 270 && secondsWithJitter <= 330);
168
Debug.
Assert
(cache is not null);
193
Debug.
Assert
(cache is not null);
212
Debug.
Assert
(cache is not null);
246
Debug.
Assert
(cache is not null);
345
Debug.
Assert
(_cache is not null);
Microsoft.AspNetCore.Razor (1)
TagHelpers\DefaultTagHelperContent.cs (1)
34
Debug.
Assert
(_buffer.Count == 0);
Microsoft.AspNetCore.Razor.Runtime (1)
Runtime\TagHelpers\TagHelperExecutionContext.cs (1)
221
Debug.
Assert
(!Output.IsContentModified);
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Runtime\TagHelpers\TagHelperRunnerTest.cs (1)
259
Debug.
Assert
(ProcessOrderTracker != null);
Microsoft.AspNetCore.ResponseCaching (3)
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
Microsoft.AspNetCore.ResponseCompression (4)
ResponseCompressionMiddleware.cs (1)
51
Debug.
Assert
(originalBodyFeature != null);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
Microsoft.AspNetCore.Rewrite (6)
ApacheModRewrite\CookieActionFactory.cs (1)
59
Debug.
Assert
(action != null || tokenType == Fields.Name);
ApacheModRewrite\RuleBuilder.cs (4)
65
Debug.
Assert
(input.Operand != null);
76
Debug.
Assert
(input.Operand != null);
102
Debug.
Assert
(input.Operand != null);
162
Debug.
Assert
(input.Operand != null);
PatternSegments\RuleMatchSegment.cs (1)
19
Debug.
Assert
(ruleBackReferences != null);
Microsoft.AspNetCore.Routing (84)
ArrayBuilder.cs (7)
32
Debug.
Assert
(capacity >= 0);
61
Debug.
Assert
(index >= 0 && index < _count);
85
Debug.
Assert
(_count > 0);
94
Debug.
Assert
(_count > 0);
111
Debug.
Assert
(_array != null); // Nonzero _count should imply this
141
Debug.
Assert
(_count < Capacity);
148
Debug.
Assert
(minimum > Capacity);
Constraints\RegexRouteConstraint.cs (1)
68
Debug.
Assert
(_regexFactory is not null);
Matching\CandidateSet.cs (2)
289
Debug.
Assert
(cmp <= 0);
335
Debug.
Assert
(count > 0);
Matching\DfaMatcher.cs (2)
198
Debug.
Assert
(candidateStateArray is not null);
205
Debug.
Assert
(candidateStateArray is not null);
Matching\DfaMatcherBuilder.cs (1)
396
Debug.
Assert
(i == segment.Parts.Count - 1 && partParameter.IsOptional);
Matching\EndpointComparer.cs (4)
43
Debug.
Assert
(x != null);
44
Debug.
Assert
(y != null);
79
Debug.
Assert
(x != null);
80
Debug.
Assert
(y != null);
Matching\ILEmitTrieFactory.cs (3)
534
Debug.
Assert
(index + 4 <= text.Length);
544
Debug.
Assert
(index + 4 <= text.Length);
552
Debug.
Assert
(index + 1 <= text.Length);
Matching\SingleEntryAsciiJumpTable.cs (1)
47
Debug.
Assert
(a.Length == b.Length && b.Length == length);
ParameterPolicyActivator.cs (1)
161
Debug.
Assert
(constructors.Count > 0);
ParameterPolicyFactory.cs (1)
40
Debug.
Assert
(reference.ParameterPolicy != null || reference.Content != null);
PathTokenizer.cs (3)
47
Debug.
Assert
(_path[0] == '/');
97
Debug.
Assert
(_path[_path.Length - 1] != '/');
98
Debug.
Assert
(currentSegmentIndex == index);
Patterns\RoutePattern.cs (5)
48
Debug.
Assert
(defaults != null);
49
Debug.
Assert
(parameterPolicies != null);
50
Debug.
Assert
(parameters != null);
51
Debug.
Assert
(requiredValues != null);
52
Debug.
Assert
(pathSegments != null);
Patterns\RoutePatternLiteralPart.cs (1)
22
Debug.
Assert
(!string.IsNullOrEmpty(content));
Patterns\RoutePatternMatcher.cs (8)
111
Debug.
Assert
(pathSegment != null);
168
Debug.
Assert
(pathSegment != null);
169
Debug.
Assert
(pathSegment.IsSimple);
172
Debug.
Assert
(part.IsParameter);
240
Debug.
Assert
(!pathSegment.IsSimple);
338
Debug.
Assert
(routeSegment != null);
339
Debug.
Assert
(routeSegment.Parts.Count > 1);
361
Debug.
Assert
(part.IsLiteral || part.IsSeparator);
Patterns\RoutePatternParser.cs (8)
51
Debug.
Assert
(context.AtEnd() || context.Current == Separator);
73
Debug.
Assert
(context != null);
74
Debug.
Assert
(segments != null);
145
Debug.
Assert
(context.Current == OpenBrace);
445
Debug.
Assert
(context != null);
446
Debug.
Assert
(literal != null);
485
Debug.
Assert
(template != null);
526
Debug.
Assert
(_index >= 0);
Patterns\RoutePatternSeparatorPart.cs (1)
39
Debug.
Assert
(!string.IsNullOrEmpty(content));
RequestDelegateFilterPipelineBuilder.cs (1)
19
Debug.
Assert
(options.EndpointBuilder != null);
RouteBase.cs (2)
313
Debug.
Assert
(_constraintLogger != null);
324
Debug.
Assert
(_constraintLogger != null);
RouteCollection.cs (1)
150
Debug.
Assert
(_options != null);
RouteEndpointDataSource.cs (1)
247
Debug.
Assert
(factoryCreatedRequestDelegate is not null);
src\Shared\PropertyHelper\PropertyHelper.cs (18)
161
Debug.
Assert
(propertyInfo != null);
181
Debug.
Assert
(propertyInfo != null);
195
Debug.
Assert
(propertyInfo != null);
198
Debug.
Assert
(propertyGetterWrapperMethod != null);
199
Debug.
Assert
(propertyGetterWrapperMethod.IsGenericMethodDefinition);
200
Debug.
Assert
(propertyGetterWrapperMethod.GetParameters().Length == 2);
203
Debug.
Assert
(propertyGetterByRefWrapperMethod != null);
204
Debug.
Assert
(propertyGetterByRefWrapperMethod.IsGenericMethodDefinition);
205
Debug.
Assert
(propertyGetterByRefWrapperMethod.GetParameters().Length == 2);
208
Debug.
Assert
(getMethod != null);
209
Debug.
Assert
(!getMethod.IsStatic);
210
Debug.
Assert
(getMethod.GetParameters().Length == 0);
277
Debug.
Assert
(propertyInfo != null);
278
Debug.
Assert
(!propertyInfo.DeclaringType!.IsValueType);
281
Debug.
Assert
(setMethod != null);
282
Debug.
Assert
(!setMethod.IsStatic);
283
Debug.
Assert
(setMethod.ReturnType == typeof(void));
285
Debug.
Assert
(parameters.Length == 1);
Template\RoutePrecedence.cs (7)
48
Debug.
Assert
(digit >= 0 && digit < 10);
69
Debug.
Assert
(digit >= 0 && digit < 10);
102
Debug.
Assert
(digit >= 0 && digit < 10);
125
Debug.
Assert
(digit >= 0 && digit < 10);
163
Debug.
Assert
(part.IsParameter);
191
Debug.
Assert
(parameterPart != null);
231
Debug.
Assert
(part.IsParameter);
Template\TemplateBinder.cs (2)
518
Debug.
Assert
(context.BufferState == SegmentState.Beginning);
519
Debug.
Assert
(context.UriState == SegmentState.Beginning);
Tree\TreeEnumerator.cs (1)
94
Debug.
Assert
(next.Depth < _tokenizer.Count);
Tree\UrlMatchingTree.cs (1)
98
Debug.
Assert
(segment.Parts.Count == 1);
UriBuildingContext.cs (1)
171
Debug.
Assert
(result);
Microsoft.AspNetCore.Routing.Abstractions (19)
RouteData.cs (1)
146
Debug.
Assert
(_routers != null);
src\Shared\PropertyHelper\PropertyHelper.cs (18)
161
Debug.
Assert
(propertyInfo != null);
181
Debug.
Assert
(propertyInfo != null);
195
Debug.
Assert
(propertyInfo != null);
198
Debug.
Assert
(propertyGetterWrapperMethod != null);
199
Debug.
Assert
(propertyGetterWrapperMethod.IsGenericMethodDefinition);
200
Debug.
Assert
(propertyGetterWrapperMethod.GetParameters().Length == 2);
203
Debug.
Assert
(propertyGetterByRefWrapperMethod != null);
204
Debug.
Assert
(propertyGetterByRefWrapperMethod.IsGenericMethodDefinition);
205
Debug.
Assert
(propertyGetterByRefWrapperMethod.GetParameters().Length == 2);
208
Debug.
Assert
(getMethod != null);
209
Debug.
Assert
(!getMethod.IsStatic);
210
Debug.
Assert
(getMethod.GetParameters().Length == 0);
277
Debug.
Assert
(propertyInfo != null);
278
Debug.
Assert
(!propertyInfo.DeclaringType!.IsValueType);
281
Debug.
Assert
(setMethod != null);
282
Debug.
Assert
(!setMethod.IsStatic);
283
Debug.
Assert
(setMethod.ReturnType == typeof(void));
285
Debug.
Assert
(parameters.Length == 1);
Microsoft.AspNetCore.Server.HttpSys (33)
AsyncAcceptContext.cs (2)
72
Debug.
Assert
(_requestContext != null);
172
Debug.
Assert
(_requestContext != null);
MessagePump.cs (3)
106
Debug.
Assert
(application != null);
162
Debug.
Assert
(RequestContextFactory != null);
270
Debug.
Assert
(_messagePump.Stopping);
NativeInterop\RequestQueue.cs (2)
109
Debug.
Assert
(Created);
125
Debug.
Assert
(Created);
RequestProcessing\RequestContext.FeatureCollection.cs (1)
79
Debug.
Assert
(_features != null);
RequestProcessing\Response.cs (2)
602
Debug.
Assert
(HasTrailers);
648
Debug.
Assert
(unknownHeadersOffset == trailerCount);
RequestProcessing\ResponseBody.cs (1)
223
Debug.
Assert
(hasData);
RequestProcessing\ResponseStreamAsyncResult.cs (2)
94
Debug.
Assert
(currentChunk == _dataChunks.Length);
135
Debug.
Assert
(currentChunk == _dataChunks.Length);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
204
Debug.
Assert
(_memoryHandle.HasValue);
src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (4)
34
Debug.
Assert
(_blockSize >= 0);
84
Debug.
Assert
(myString is not null);
119
Debug.
Assert
(sizeHint >= 0);
143
Debug.
Assert
(count >= 0);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
168
Debug.
Assert
(_backingBuffer != null);
226
Debug.
Assert
((int)HTTP_VERB.HttpVerbMaximum == HttpVerbs.Length);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
UrlPrefixCollection.cs (2)
214
Debug.
Assert
(_urlGroup != null);
224
Debug.
Assert
(port >= 5000 || port < 8000);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (24)
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
Microsoft.AspNetCore.Server.IIS (31)
Core\IISHttpContext.cs (2)
442
Debug.
Assert
(_hasResponseStarted == false);
482
Debug.
Assert
(!HasStartedConsumingRequestBody);
Core\IISHttpContext.FeatureCollection.cs (1)
364
Debug.
Assert
(_readBodyTask == null || _readBodyTask.IsCompleted);
Core\IO\AsyncIOEngine.cs (1)
175
Debug.
Assert
(_runningOperation != null);
Core\IO\WebSocketsAsyncIOEngine.cs (2)
37
Debug.
Assert
(!read.InUse());
53
Debug.
Assert
(!write.InUse());
Core\OutputProducer.cs (1)
119
Debug.
Assert
(false);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
204
Debug.
Assert
(_memoryHandle.HasValue);
src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (4)
34
Debug.
Assert
(_blockSize >= 0);
84
Debug.
Assert
(myString is not null);
119
Debug.
Assert
(sizeHint >= 0);
143
Debug.
Assert
(count >= 0);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
168
Debug.
Assert
(_backingBuffer != null);
226
Debug.
Assert
((int)HTTP_VERB.HttpVerbMaximum == HttpVerbs.Length);
src\Shared\RazorViews\BaseView.cs (3)
150
Debug.
Assert
(string.IsNullOrEmpty(AttributeEnding));
158
Debug.
Assert
(AttributeValues != null);
159
Debug.
Assert
(!string.IsNullOrEmpty(AttributeEnding));
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
198
Debug.
Assert
(method != null);
199
Debug.
Assert
(method.DeclaringType != null);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
Microsoft.AspNetCore.Server.Kestrel.Core (264)
AnyIPListenOptions.cs (1)
20
Debug.
Assert
(IPEndPoint != null);
HttpsConfigurationService.cs (4)
135
Debug.
Assert
(_useHttpsWithDefaults is not null);
136
Debug.
Assert
(_tlsConfigurationLoader is not null);
137
Debug.
Assert
(_populateMultiplexedTransportFeatures is not null);
138
Debug.
Assert
(_httpsLogger is not null);
Internal\Http\Http1Connection.cs (1)
149
Debug.
Assert
(MinRequestBodyDataRate != null);
Internal\Http\Http1OutputProducer.cs (7)
171
Debug.
Assert
(!producer._pipeWriterCompleted);
172
Debug.
Assert
(producer._autoChunk && producer._advancedBytesForChunk > 0);
524
Debug.
Assert
(_currentSegmentOwner == null);
525
Debug.
Assert
(_completedSegments == null || _completedSegments.Count == 0);
631
Debug.
Assert
(_advancedBytesForChunk <= _currentChunkMemory.Length);
632
Debug.
Assert
(_advancedBytesForChunk > 0);
636
Debug.
Assert
(bytesWritten <= _currentMemoryPrefixBytes);
Internal\Http\HttpHeaders.Generated.cs (131)
8403
Debug.
Assert
((_currentBits & 0x1L) != 0);
8408
Debug.
Assert
((_currentBits & 0x2L) != 0);
8413
Debug.
Assert
((_currentBits & 0x4L) != 0);
8418
Debug.
Assert
((_currentBits & 0x8L) != 0);
8423
Debug.
Assert
((_currentBits & 0x10L) != 0);
8428
Debug.
Assert
((_currentBits & 0x20L) != 0);
8433
Debug.
Assert
((_currentBits & 0x40L) != 0);
8438
Debug.
Assert
((_currentBits & 0x80L) != 0);
8443
Debug.
Assert
((_currentBits & 0x100L) != 0);
8448
Debug.
Assert
((_currentBits & 0x200L) != 0);
8453
Debug.
Assert
((_currentBits & 0x400L) != 0);
8458
Debug.
Assert
((_currentBits & 0x800L) != 0);
8463
Debug.
Assert
((_currentBits & 0x1000L) != 0);
8468
Debug.
Assert
((_currentBits & 0x2000L) != 0);
8473
Debug.
Assert
((_currentBits & 0x4000L) != 0);
8478
Debug.
Assert
((_currentBits & 0x8000L) != 0);
8483
Debug.
Assert
((_currentBits & 0x10000L) != 0);
8488
Debug.
Assert
((_currentBits & 0x20000L) != 0);
8493
Debug.
Assert
((_currentBits & 0x40000L) != 0);
8498
Debug.
Assert
((_currentBits & 0x80000L) != 0);
8503
Debug.
Assert
((_currentBits & 0x100000L) != 0);
8508
Debug.
Assert
((_currentBits & 0x200000L) != 0);
8513
Debug.
Assert
((_currentBits & 0x400000L) != 0);
8518
Debug.
Assert
((_currentBits & 0x800000L) != 0);
8523
Debug.
Assert
((_currentBits & 0x1000000L) != 0);
8528
Debug.
Assert
((_currentBits & 0x2000000L) != 0);
8533
Debug.
Assert
((_currentBits & 0x4000000L) != 0);
8538
Debug.
Assert
((_currentBits & 0x8000000L) != 0);
8543
Debug.
Assert
((_currentBits & 0x10000000L) != 0);
8548
Debug.
Assert
((_currentBits & 0x20000000L) != 0);
8553
Debug.
Assert
((_currentBits & 0x40000000L) != 0);
8558
Debug.
Assert
((_currentBits & 0x80000000L) != 0);
8563
Debug.
Assert
((_currentBits & 0x100000000L) != 0);
8568
Debug.
Assert
((_currentBits & 0x200000000L) != 0);
8573
Debug.
Assert
((_currentBits & 0x400000000L) != 0);
8578
Debug.
Assert
((_currentBits & 0x800000000L) != 0);
8583
Debug.
Assert
((_currentBits & 0x1000000000L) != 0);
8588
Debug.
Assert
((_currentBits & 0x2000000000L) != 0);
8593
Debug.
Assert
((_currentBits & 0x4000000000L) != 0);
8598
Debug.
Assert
((_currentBits & 0x8000000000L) != 0);
8603
Debug.
Assert
((_currentBits & 0x10000000000L) != 0);
8608
Debug.
Assert
((_currentBits & 0x20000000000L) != 0);
8613
Debug.
Assert
((_currentBits & 0x40000000000L) != 0);
8618
Debug.
Assert
((_currentBits & 0x80000000000L) != 0);
8623
Debug.
Assert
((_currentBits & 0x100000000000L) != 0);
8628
Debug.
Assert
((_currentBits & 0x200000000000L) != 0);
8633
Debug.
Assert
((_currentBits & 0x400000000000L) != 0);
8638
Debug.
Assert
((_currentBits & 0x800000000000L) != 0);
8643
Debug.
Assert
((_currentBits & 0x1000000000000L) != 0);
8648
Debug.
Assert
(_currentBits == 0);
14835
Debug.
Assert
((tempBits & 0x1L) != 0);
14854
Debug.
Assert
((tempBits & 0x2L) != 0);
14861
Debug.
Assert
((tempBits & 0x4L) != 0);
14880
Debug.
Assert
((tempBits & 0x8L) != 0);
14899
Debug.
Assert
((tempBits & 0x10L) != 0);
14906
Debug.
Assert
((tempBits & 0x20L) != 0);
14913
Debug.
Assert
((tempBits & 0x40L) != 0);
14920
Debug.
Assert
((tempBits & 0x80L) != 0);
14927
Debug.
Assert
((tempBits & 0x100L) != 0);
14934
Debug.
Assert
((tempBits & 0x200L) != 0);
14941
Debug.
Assert
((tempBits & 0x400L) != 0);
14948
Debug.
Assert
((tempBits & 0x800L) != 0);
14955
Debug.
Assert
((tempBits & 0x1000L) != 0);
14962
Debug.
Assert
((tempBits & 0x2000L) != 0);
14981
Debug.
Assert
((tempBits & 0x4000L) != 0);
14988
Debug.
Assert
((tempBits & 0x8000L) != 0);
14995
Debug.
Assert
((tempBits & 0x10000L) != 0);
15002
Debug.
Assert
((tempBits & 0x20000L) != 0);
15009
Debug.
Assert
((tempBits & 0x40000L) != 0);
15016
Debug.
Assert
((tempBits & 0x80000L) != 0);
15023
Debug.
Assert
((tempBits & 0x100000L) != 0);
15030
Debug.
Assert
((tempBits & 0x200000L) != 0);
15037
Debug.
Assert
((tempBits & 0x400000L) != 0);
15044
Debug.
Assert
((tempBits & 0x800000L) != 0);
15051
Debug.
Assert
((tempBits & 0x1000000L) != 0);
15058
Debug.
Assert
((tempBits & 0x2000000L) != 0);
15065
Debug.
Assert
((tempBits & 0x4000000L) != 0);
15072
Debug.
Assert
((tempBits & 0x8000000L) != 0);
15079
Debug.
Assert
((tempBits & 0x10000000L) != 0);
15086
Debug.
Assert
((tempBits & 0x20000000L) != 0);
15093
Debug.
Assert
((tempBits & 0x40000000L) != 0);
15100
Debug.
Assert
((tempBits & 0x80000000L) != 0);
15107
Debug.
Assert
((tempBits & 0x100000000L) != 0);
15126
Debug.
Assert
((tempBits & 0x200000000L) != 0);
15133
Debug.
Assert
((tempBits & 0x400000000L) != 0);
15140
Debug.
Assert
((tempBits & 0x800000000L) != 0);
15147
Debug.
Assert
((tempBits & 0x1000000000L) != 0);
15154
Debug.
Assert
((tempBits & 0x2000000000L) != 0);
15172
Debug.
Assert
(valueCount > 0);
15253
Debug.
Assert
((_currentBits & 0x1L) != 0);
15259
Debug.
Assert
((_currentBits & 0x2L) != 0);
15265
Debug.
Assert
((_currentBits & 0x4L) != 0);
15271
Debug.
Assert
((_currentBits & 0x8L) != 0);
15277
Debug.
Assert
((_currentBits & 0x10L) != 0);
15283
Debug.
Assert
((_currentBits & 0x20L) != 0);
15289
Debug.
Assert
((_currentBits & 0x40L) != 0);
15295
Debug.
Assert
((_currentBits & 0x80L) != 0);
15301
Debug.
Assert
((_currentBits & 0x100L) != 0);
15307
Debug.
Assert
((_currentBits & 0x200L) != 0);
15313
Debug.
Assert
((_currentBits & 0x400L) != 0);
15319
Debug.
Assert
((_currentBits & 0x800L) != 0);
15325
Debug.
Assert
((_currentBits & 0x1000L) != 0);
15331
Debug.
Assert
((_currentBits & 0x2000L) != 0);
15337
Debug.
Assert
((_currentBits & 0x4000L) != 0);
15343
Debug.
Assert
((_currentBits & 0x8000L) != 0);
15349
Debug.
Assert
((_currentBits & 0x10000L) != 0);
15355
Debug.
Assert
((_currentBits & 0x20000L) != 0);
15361
Debug.
Assert
((_currentBits & 0x40000L) != 0);
15367
Debug.
Assert
((_currentBits & 0x80000L) != 0);
15373
Debug.
Assert
((_currentBits & 0x100000L) != 0);
15379
Debug.
Assert
((_currentBits & 0x200000L) != 0);
15385
Debug.
Assert
((_currentBits & 0x400000L) != 0);
15391
Debug.
Assert
((_currentBits & 0x800000L) != 0);
15397
Debug.
Assert
((_currentBits & 0x1000000L) != 0);
15403
Debug.
Assert
((_currentBits & 0x2000000L) != 0);
15409
Debug.
Assert
((_currentBits & 0x4000000L) != 0);
15415
Debug.
Assert
((_currentBits & 0x8000000L) != 0);
15421
Debug.
Assert
((_currentBits & 0x10000000L) != 0);
15427
Debug.
Assert
((_currentBits & 0x20000000L) != 0);
15433
Debug.
Assert
((_currentBits & 0x40000000L) != 0);
15439
Debug.
Assert
((_currentBits & 0x80000000L) != 0);
15445
Debug.
Assert
((_currentBits & 0x100000000L) != 0);
15451
Debug.
Assert
((_currentBits & 0x200000000L) != 0);
15457
Debug.
Assert
((_currentBits & 0x400000000L) != 0);
15463
Debug.
Assert
((_currentBits & 0x800000000L) != 0);
15469
Debug.
Assert
((_currentBits & 0x1000000000L) != 0);
15475
Debug.
Assert
((_currentBits & 0x2000000000L) != 0);
15481
Debug.
Assert
(_currentBits == 0);
17589
Debug.
Assert
((_currentBits & 0x1L) != 0);
17595
Debug.
Assert
((_currentBits & 0x2L) != 0);
17601
Debug.
Assert
((_currentBits & 0x4L) != 0);
Internal\Http\HttpParser.cs (1)
333
Debug.
Assert
(result);
Internal\Http\HttpProtocol.cs (3)
718
Debug.
Assert
(_bodyControl != null);
1010
Debug.
Assert
(_requestRejectedException != null);
1616
Debug.
Assert
(!HasResponseStarted);
Internal\Http\ReasonPhrases.cs (1)
84
Debug.
Assert
(!string.IsNullOrEmpty(reasonPhrase));
Internal\Http2\Http2Connection.cs (9)
233
Debug.
Assert
(Limits.MinRequestBodyDataRate != null);
378
Debug.
Assert
(_currentHeadersStream != null);
1136
Debug.
Assert
(_currentHeadersStream != null);
1163
Debug.
Assert
(_currentHeadersStream != null);
1178
Debug.
Assert
(_currentHeadersStream != null);
1444
Debug.
Assert
(TimeoutControl.TimerReason == TimeoutReason.RequestHeaders ||
1462
Debug.
Assert
(index <= H2StaticTable.Count);
1470
Debug.
Assert
(index <= H2StaticTable.Count);
1488
Debug.
Assert
(_currentHeadersStream != null);
Internal\Http2\Http2FrameWriter.cs (5)
223
Debug.
Assert
(actual <= int.MaxValue);
609
Debug.
Assert
(dataLength == data.Length);
636
Debug.
Assert
(dataLength == data.Length);
640
Debug.
Assert
(dataLength > dataPayloadLength);
859
Debug.
Assert
(payload.Length == _outgoingFrame.PayloadLength); // 8
Internal\Http2\Http2OutputProducer.cs (2)
179
Debug.
Assert
(_completedResponse);
309
Debug.
Assert
(_unconsumedBytes > 0);
Internal\Http2\Http2Stream.cs (3)
152
Debug.
Assert
(_decrementCalled);
434
Debug.
Assert
(32 < ch && ch < 127);
501
Debug.
Assert
(flushTask.IsCompletedSuccessfully);
Internal\Http3\Http3Connection.cs (7)
377
Debug.
Assert
(streamDirectionFeature != null);
378
Debug.
Assert
(streamIdFeature != null);
605
Debug.
Assert
(_context.ServiceContext.ServerOptions.EnableWebTransportAndH3Datagrams);
871
Debug.
Assert
(!stream.IsReceivingHeader);
882
Debug.
Assert
(Limits.MinRequestBodyDataRate != null);
898
Debug.
Assert
(_context.ServiceContext.ServerOptions.EnableWebTransportAndH3Datagrams);
903
Debug.
Assert
(!_webtransportSessions.ContainsKey(http3Stream.StreamId));
Internal\Http3\Http3FrameWriter.cs (3)
179
Debug.
Assert
(dataLength == data.Length);
202
Debug.
Assert
(dataLength == data.Length);
206
Debug.
Assert
(dataLength > dataPayloadLength);
Internal\Http3\Http3OutputProducer.cs (1)
60
Debug.
Assert
(_dataWriteProcessingTask.IsCompleted);
Internal\Http3\Http3Stream.cs (3)
205
Debug.
Assert
(index <= H3StaticTable.Count);
213
Debug.
Assert
(index <= H3StaticTable.Count);
1156
Debug.
Assert
(32 < ch && ch < 127);
Internal\Http3\QPackHeaderWriter.cs (1)
15
Debug.
Assert
(hasValue == true);
Internal\Infrastructure\HttpUtilities.cs (3)
60
Debug.
Assert
(operationStatus == OperationStatus.Done);
72
Debug.
Assert
(operationStatus == OperationStatus.Done);
265
Debug.
Assert
(WordListForPerfectHashOfMethods.Length == (MaxHashValue + 1) && methodsLookup.Length == (MaxHashValue + 1));
Internal\Infrastructure\PipeWriterHelpers\ConcurrentPipeWriter.cs (4)
163
Debug.
Assert
(_currentFlushTcs != null);
240
Debug.
Assert
(_tail != null);
296
Debug.
Assert
(_currentFlushTcs != null);
329
Debug.
Assert
(_tail != null);
Internal\Infrastructure\StatusCheckPipeWriter.cs (1)
33
Debug.
Assert
(_context != null);
Internal\Infrastructure\StatusCheckWriteStream.cs (1)
27
Debug.
Assert
(_context != null);
Internal\Infrastructure\StreamCloseAwaitable.cs (1)
22
Debug.
Assert
(ReferenceEquals(_callback, _callbackCompleted));
Internal\Infrastructure\TimeoutControl.cs (1)
116
Debug.
Assert
(_minReadRate != null);
Internal\WebTransport\WebTransportSession.cs (1)
136
Debug.
Assert
(success);
KestrelConfigurationLoader.cs (1)
297
Debug.
Assert
(ReloadOnChange);
KestrelServerOptions.cs (1)
312
Debug.
Assert
(DevelopmentCertificate is null);
Middleware\HttpsConnectionMiddleware.cs (1)
93
Debug.
Assert
(_serverCertificate != null);
src\Shared\Buffers\BufferSegment.cs (4)
27
Debug.
Assert
(value <= AvailableMemory.Length);
64
Debug.
Assert
(_memoryOwner != null);
102
Debug.
Assert
(segment != null);
103
Debug.
Assert
(Next == null);
src\Shared\CertificateGeneration\CertificateManager.cs (1)
574
Debug.
Assert
(pemEnvelope != null);
src\Shared\Hpack\DynamicHPackEncoder.cs (1)
158
Debug.
Assert
(removed != null);
src\Shared\Hpack\EncoderHeaderEntry.cs (2)
32
Debug.
Assert
(name != null);
33
Debug.
Assert
(value != null);
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\runtime\Http3\Helpers\VariableLengthIntegerHelper.cs (8)
69
Debug.
Assert
((firstByte & LengthMask) == InitialEightByteLengthMask);
118
Debug.
Assert
(result);
119
Debug.
Assert
(bytesRead == length);
149
Debug.
Assert
(longToEncode >= 0);
150
Debug.
Assert
(longToEncode <= EightByteLimit);
193
Debug.
Assert
(res);
199
Debug.
Assert
(value >= 0);
200
Debug.
Assert
(value <= EightByteLimit);
src\Shared\runtime\Http3\QPack\HeaderField.cs (1)
17
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http3\QPack\QPackEncoder.cs (14)
42
Debug.
Assert
(res);
97
Debug.
Assert
(res);
106
Debug.
Assert
(res);
167
Debug.
Assert
(res);
177
Debug.
Assert
(res);
204
Debug.
Assert
(written == encodedStringLength);
235
Debug.
Assert
(separator != null);
236
Debug.
Assert
(Ascii.IsValid(separator));
303
Debug.
Assert
(buffer.Length >= s.Length);
312
Debug.
Assert
(status == OperationStatus.Done);
313
Debug.
Assert
(bytesWritten == s.Length);
318
Debug.
Assert
(Ascii.IsValid(s));
331
Debug.
Assert
(status == OperationStatus.Done);
332
Debug.
Assert
(valueBytesWritten == s.Length);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
src\Servers\Kestrel\shared\KnownHeaders.cs (4)
773
Debug.
Assert
(requestHeaders.Length <= 64);
774
Debug.
Assert
(requestHeaders.Max(x => x.Index) <= 62);
778
Debug.
Assert
(responseHeaders.Length <= 63);
779
Debug.
Assert
(responseHeaders.Count(x => x.Index == 63) == 1);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (1)
314
System.Diagnostics.Debug.
Assert
(read == requestBytes.Length);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
204
Debug.
Assert
(_memoryHandle.HasValue);
src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (4)
34
Debug.
Assert
(_blockSize >= 0);
84
Debug.
Assert
(myString is not null);
119
Debug.
Assert
(sizeHint >= 0);
143
Debug.
Assert
(count >= 0);
src\Shared\test\Shared.Tests\runtime\Http2\DynamicTableTest.cs (1)
157
Debug.
Assert
(data.Length == 16);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (10)
Http2\Http2ConnectionBenchmarkBase.cs (3)
103
Debug.
Assert
(_receiveHttpFrame.Type == Http2FrameType.SETTINGS);
105
Debug.
Assert
(_receiveHttpFrame.Type == Http2FrameType.WINDOW_UPDATE);
107
Debug.
Assert
(_receiveHttpFrame.Type == Http2FrameType.SETTINGS);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
294
Debug.
Assert
(success);
src\Servers\Kestrel\shared\TransportConnection.cs (1)
72
Debug.
Assert
(Application != null);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
204
Debug.
Assert
(_memoryHandle.HasValue);
src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (4)
34
Debug.
Assert
(_blockSize >= 0);
84
Debug.
Assert
(myString is not null);
119
Debug.
Assert
(sizeHint >= 0);
143
Debug.
Assert
(count >= 0);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (6)
src\Servers\Kestrel\shared\TransportConnection.cs (1)
72
Debug.
Assert
(Application != null);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
204
Debug.
Assert
(_memoryHandle.HasValue);
src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (4)
34
Debug.
Assert
(_blockSize >= 0);
84
Debug.
Assert
(myString is not null);
119
Debug.
Assert
(sizeHint >= 0);
143
Debug.
Assert
(count >= 0);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (27)
Internal\QuicConnectionListener.cs (2)
169
Debug.
Assert
(connectionContext != null);
170
Debug.
Assert
(connectionContext.GetInnerConnection() == quicConnection);
Internal\QuicStreamContext.cs (8)
81
Debug.
Assert
(_stream == null);
143
Debug.
Assert
(_processingTask.IsCompletedSuccessfully);
150
Debug.
Assert
(_stream != null);
184
Debug.
Assert
(_stream != null);
204
Debug.
Assert
(_stream != null);
352
Debug.
Assert
(_streamClosedTokenSource != null);
367
Debug.
Assert
(_stream != null);
522
Debug.
Assert
(_stream != null);
src\Servers\Kestrel\shared\TransportConnection.cs (1)
72
Debug.
Assert
(Application != null);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
204
Debug.
Assert
(_memoryHandle.HasValue);
src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (4)
34
Debug.
Assert
(_blockSize >= 0);
84
Debug.
Assert
(myString is not null);
119
Debug.
Assert
(sizeHint >= 0);
143
Debug.
Assert
(count >= 0);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (12)
Internal\SocketConnection.cs (3)
44
Debug.
Assert
(socket != null);
45
Debug.
Assert
(memoryPool != null);
46
Debug.
Assert
(logger != null);
Internal\SocketSender.cs (2)
78
Debug.
Assert
(!buffer.IsEmpty);
79
Debug.
Assert
(!buffer.IsSingleSegment);
SocketConnectionListener.cs (1)
51
Debug.
Assert
(listenSocket.LocalEndPoint != null);
src\Servers\Kestrel\shared\TransportConnection.cs (1)
72
Debug.
Assert
(Application != null);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
204
Debug.
Assert
(_memoryHandle.HasValue);
src\Shared\Buffers.MemoryPool\UnmanagedBufferAllocator.cs (4)
34
Debug.
Assert
(_blockSize >= 0);
84
Debug.
Assert
(myString is not null);
119
Debug.
Assert
(sizeHint >= 0);
143
Debug.
Assert
(count >= 0);
Microsoft.AspNetCore.Shared.Tests (93)
runtime\Http2\DynamicTableTest.cs (1)
157
Debug.
Assert
(data.Length == 16);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (8)
229
Debug.
Assert
(_arrayStorage == null);
515
Debug.
Assert
(_arrayStorage != null);
545
Debug.
Assert
(_arrayStorage is not null);
546
Debug.
Assert
(_count <= _arrayStorage.Length);
556
Debug.
Assert
(_dictionaryStorage == null);
557
Debug.
Assert
(_arrayStorage != null);
576
Debug.
Assert
(_dictionaryStorage == null);
577
Debug.
Assert
(_arrayStorage != null);
src\Shared\Hpack\DynamicHPackEncoder.cs (1)
158
Debug.
Assert
(removed != null);
src\Shared\Hpack\EncoderHeaderEntry.cs (2)
32
Debug.
Assert
(name != null);
33
Debug.
Assert
(value != null);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (2)
168
Debug.
Assert
(_backingBuffer != null);
226
Debug.
Assert
((int)HTTP_VERB.HttpVerbMaximum == HttpVerbs.Length);
src\Shared\PropertyHelper\PropertyHelper.cs (18)
161
Debug.
Assert
(propertyInfo != null);
181
Debug.
Assert
(propertyInfo != null);
195
Debug.
Assert
(propertyInfo != null);
198
Debug.
Assert
(propertyGetterWrapperMethod != null);
199
Debug.
Assert
(propertyGetterWrapperMethod.IsGenericMethodDefinition);
200
Debug.
Assert
(propertyGetterWrapperMethod.GetParameters().Length == 2);
203
Debug.
Assert
(propertyGetterByRefWrapperMethod != null);
204
Debug.
Assert
(propertyGetterByRefWrapperMethod.IsGenericMethodDefinition);
205
Debug.
Assert
(propertyGetterByRefWrapperMethod.GetParameters().Length == 2);
208
Debug.
Assert
(getMethod != null);
209
Debug.
Assert
(!getMethod.IsStatic);
210
Debug.
Assert
(getMethod.GetParameters().Length == 0);
277
Debug.
Assert
(propertyInfo != null);
278
Debug.
Assert
(!propertyInfo.DeclaringType!.IsValueType);
281
Debug.
Assert
(setMethod != null);
282
Debug.
Assert
(!setMethod.IsStatic);
283
Debug.
Assert
(setMethod.ReturnType == typeof(void));
285
Debug.
Assert
(parameters.Length == 1);
src\Shared\runtime\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\Shared\runtime\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\Shared\runtime\Http3\Helpers\VariableLengthIntegerHelper.cs (8)
69
Debug.
Assert
((firstByte & LengthMask) == InitialEightByteLengthMask);
118
Debug.
Assert
(result);
119
Debug.
Assert
(bytesRead == length);
149
Debug.
Assert
(longToEncode >= 0);
150
Debug.
Assert
(longToEncode <= EightByteLimit);
193
Debug.
Assert
(res);
199
Debug.
Assert
(value >= 0);
200
Debug.
Assert
(value <= EightByteLimit);
src\Shared\runtime\Http3\QPack\HeaderField.cs (1)
17
Debug.
Assert
(name.Length > 0);
src\Shared\runtime\Http3\QPack\QPackEncoder.cs (14)
42
Debug.
Assert
(res);
97
Debug.
Assert
(res);
106
Debug.
Assert
(res);
167
Debug.
Assert
(res);
177
Debug.
Assert
(res);
204
Debug.
Assert
(written == encodedStringLength);
235
Debug.
Assert
(separator != null);
236
Debug.
Assert
(Ascii.IsValid(separator));
303
Debug.
Assert
(buffer.Length >= s.Length);
312
Debug.
Assert
(status == OperationStatus.Done);
313
Debug.
Assert
(bytesWritten == s.Length);
318
Debug.
Assert
(Ascii.IsValid(s));
331
Debug.
Assert
(status == OperationStatus.Done);
332
Debug.
Assert
(valueBytesWritten == s.Length);
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
246
Debug.
Assert
(totalBytesUsed == encodedLength);
src\Shared\ServerInfrastructure\StringUtilities.cs (8)
121
Debug.
Assert
(input != null);
122
Debug.
Assert
(output != null);
126
Debug.
Assert
((long)end >= Vector256<sbyte>.Count);
311
Debug.
Assert
(input != null);
312
Debug.
Assert
(output != null);
417
Debug.
Assert
(IsValidHeaderString(previousValue));
564
Debug.
Assert
(Avx2.IsSupported);
573
Debug.
Assert
(Sse2.IsSupported);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
198
Debug.
Assert
(method != null);
199
Debug.
Assert
(method.DeclaringType != null);
src\Shared\TaskToApm.cs (3)
79
Debug.
Assert
(task != null);
104
Debug.
Assert
(!CompletedSynchronously);
105
Debug.
Assert
(_callback != null);
src\Shared\WebEncoders\WebEncoders.cs (1)
344
Debug.
Assert
(output.Length >= GetArraySizeRequiredToEncode(input.Length));
Microsoft.AspNetCore.SignalR.Client.Core (5)
HubConnection.cs (1)
2086
Debug.
Assert
(_messageBuffer is not null);
src\SignalR\common\Shared\MessageBuffer.cs (3)
326
Debug.
Assert
(_currentIndex == -1);
332
Debug.
Assert
(_startingSequenceId + _currentIndex + 1 == sequenceId);
374
Debug.
Assert
(numElements > 0 && numElements < BufferLength + 1);
src\SignalR\common\Shared\ReflectionHelper.cs (1)
37
Debug.
Assert
(nullableType.GetGenericArguments().Length == 1);
Microsoft.AspNetCore.SignalR.Client.Tests (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
Microsoft.AspNetCore.SignalR.Common (5)
Protocol\HandshakeProtocol.cs (2)
69
Debug.
Assert
(writer.CurrentDepth == 0);
100
Debug.
Assert
(writer.CurrentDepth == 0);
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
126
Debug.
Assert
(charsUsed == 1);
Microsoft.AspNetCore.SignalR.Core (17)
HubConnectionContext.cs (1)
300
Debug.
Assert
(_messageBuffer is not null);
Internal\ChannelBasedSemaphore.cs (1)
74
Debug.
Assert
(false);
Internal\DefaultHubDispatcher.cs (2)
343
Debug.
Assert
(hub.Clients is HubCallerClients);
612
Debug.
Assert
(authorizePolicy != null);
src\SignalR\common\Shared\ClientResultsManager.cs (9)
34
Debug.
Assert
(result);
44
Debug.
Assert
(result);
169
public static new void SetCanceled(CancellationToken cancellationToken) => Debug.
Assert
(false);
170
public static new void SetException(IEnumerable<Exception> exceptions) => Debug.
Assert
(false);
173
Debug.
Assert
(false);
178
Debug.
Assert
(false);
183
Debug.
Assert
(false);
188
Debug.
Assert
(false);
193
Debug.
Assert
(false);
src\SignalR\common\Shared\MessageBuffer.cs (3)
326
Debug.
Assert
(_currentIndex == -1);
332
Debug.
Assert
(_startingSequenceId + _currentIndex + 1 == sequenceId);
374
Debug.
Assert
(numElements > 0 && numElements < BufferLength + 1);
src\SignalR\common\Shared\ReflectionHelper.cs (1)
37
Debug.
Assert
(nullableType.GetGenericArguments().Length == 1);
Microsoft.AspNetCore.SignalR.Protocols.Json (4)
Protocol\JsonHubProtocol.cs (3)
571
Debug.
Assert
(writer.CurrentDepth == 0);
791
Debug.
Assert
(arguments != null);
809
Debug.
Assert
(arguments != null);
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
126
Debug.
Assert
(charsUsed == 1);
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (3)
Protocol\MessagePackHubProtocolWorker.cs (1)
376
Debug.
Assert
(written == prefixLength);
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (5)
Protocol\NewtonsoftJsonHubProtocol.cs (2)
783
Debug.
Assert
(arguments != null);
800
Debug.
Assert
(arguments != null);
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
126
Debug.
Assert
(charsUsed == 1);
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
Microsoft.AspNetCore.SignalR.StackExchangeRedis (16)
Internal\RedisProtocol.cs (1)
244
Debug.
Assert
(isArray);
RedisHubLifetimeManager.cs (4)
821
Debug.
Assert
(success);
825
Debug.
Assert
(success);
826
Debug.
Assert
(written == 24);
828
Debug.
Assert
(base64.EndsWith("=="));
src\SignalR\common\Shared\ClientResultsManager.cs (9)
34
Debug.
Assert
(result);
44
Debug.
Assert
(result);
169
public static new void SetCanceled(CancellationToken cancellationToken) => Debug.
Assert
(false);
170
public static new void SetException(IEnumerable<Exception> exceptions) => Debug.
Assert
(false);
173
Debug.
Assert
(false);
178
Debug.
Assert
(false);
183
Debug.
Assert
(false);
188
Debug.
Assert
(false);
193
Debug.
Assert
(false);
src\SignalR\common\Shared\MemoryBufferWriter.cs (2)
249
Debug.
Assert
(span.Length >= _bytesWritten);
273
Debug.
Assert
(_bytesWritten == totalWritten + _position);
Microsoft.AspNetCore.SignalR.Tests (1)
TestFilters.cs (1)
48
Debug.
Assert
(syncPoints.Length == 3);
Microsoft.AspNetCore.SpaServices.Extensions (1)
Npm\NodeScriptRunner.cs (1)
109
Debug.
Assert
(chunk.Array != null);
Microsoft.AspNetCore.StaticAssets (5)
src\Shared\RangeHelper\RangeHelper.cs (1)
67
Debug.
Assert
(rangeHeader.Ranges.Count == 1);
StaticAssetEndpointDataSource.cs (4)
64
Debug.
Assert
(_changeToken != null);
65
Debug.
Assert
(_endpoints != null);
110
Debug.
Assert
(_changeToken != null);
111
Debug.
Assert
(_endpoints != null);
Microsoft.AspNetCore.StaticFiles (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
67
Debug.
Assert
(rangeHeader.Ranges.Count == 1);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
src\Shared\RangeHelper\RangeHelper.cs (1)
67
Debug.
Assert
(rangeHeader.Ranges.Count == 1);
Microsoft.AspNetCore.TestHost (3)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
293
Debug.
Assert
(_hostTcs.Task.IsCompleted);
ResponseBodyReaderStream.cs (1)
113
Debug.
Assert
(innerException != null);
WebSocketClient.cs (1)
104
Debug.
Assert
(webSocketFeature != null);
Microsoft.AspNetCore.WebSockets (10)
HandshakeHelpers.cs (4)
175
Debug.
Assert
(ret);
176
Debug.
Assert
(written == len);
270
Debug.
Assert
(ret);
271
Debug.
Assert
(written == len);
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
47
Debug.
Assert
(_pos == _span.Length);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (5)
37
Debug.
Assert
(value >= 0);
38
Debug.
Assert
(value <= _chars.Length);
48
Debug.
Assert
(capacity >= 0);
86
Debug.
Assert
(index < _pos);
289
Debug.
Assert
(additionalCapacityBeyondPos > 0);
Microsoft.AspNetCore.WebUtilities (21)
FileBufferingReadStream.cs (2)
238
Debug.
Assert
(_tempFileDirectoryAccessor != null);
240
Debug.
Assert
(_tempFileDirectory != null);
FileBufferingWriteStream.cs (2)
124
Debug.
Assert
(PagedByteBuffer.Length <= _memoryThreshold);
163
Debug.
Assert
(PagedByteBuffer.Length <= _memoryThreshold);
FormPipeReader.cs (1)
269
Debug.
Assert
(segmentConsumed == keyValuePair.FirstSpan.Length);
HttpRequestStreamReader.cs (3)
258
Debug.
Assert
(charsRemaining == 0);
269
Debug.
Assert
(charsRemaining == 0);
279
Debug.
Assert
(charsRemaining > 0);
HttpResponseStreamWriter.cs (8)
215
Debug.
Assert
(_charBufferCount == _charBufferSize);
251
Debug.
Assert
(count > 0);
252
Debug.
Assert
(_charBufferSize - _charBufferCount < count);
295
Debug.
Assert
(count > 0);
296
Debug.
Assert
(_charBufferSize - _charBufferCount < count);
344
Debug.
Assert
(value.Length > 0);
345
Debug.
Assert
(_charBufferSize - _charBufferCount < value.Length);
616
Debug.
Assert
(_charBufferSize - _charBufferCount >= value.Length);
MultipartReaderStream.cs (4)
202
Debug.
Assert
(matchCount == length);
219
Debug.
Assert
(read == length); // It should have all been buffered
288
Debug.
Assert
(matchCount == length);
305
Debug.
Assert
(read == length); // It should have all been buffered
src\Shared\WebEncoders\WebEncoders.cs (1)
344
Debug.
Assert
(output.Length >= GetArraySizeRequiredToEncode(input.Length));
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (2)
HttpRequestStreamReaderReadLineBenchmark.cs (2)
33
Debug.
Assert
(result.Length == Length - 2);
42
Debug.
Assert
(result.Length == Length - 2);
Microsoft.Build (50)
BackEnd\BuildManager\BuildManager.cs (20)
682
Debug.
Assert
(Monitor.IsEntered(_syncLock));
1368
Debug.
Assert
(!Monitor.IsEntered(_syncLock));
1382
Debug.
Assert
(Monitor.IsEntered(_syncLock));
1449
Debug.
Assert
(Monitor.IsEntered(_syncLock));
1640
Debug.
Assert
(!Monitor.IsEntered(_syncLock));
1661
Debug.
Assert
(!Monitor.IsEntered(_syncLock));
1717
Debug.
Assert
(!Monitor.IsEntered(_syncLock));
2224
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2257
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2265
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2382
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2408
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2485
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2580
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2630
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2795
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2821
Debug.
Assert
(Monitor.IsEntered(_syncLock));
2964
Debug.
Assert
(Monitor.IsEntered(_syncLock));
3164
Debug.
Assert
(Monitor.IsEntered(_syncLock));
3245
Debug.
Assert
(Monitor.IsEntered(_syncLock));
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
843
Debug.
Assert
(coresAcquired >= 1);
Collections\RetrievableEntryHashSet\HashSet.cs (4)
238
Debug.
Assert
(String.Equals(name, value.Key, StringComparison.Ordinal));
287
Debug.
Assert
(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal));
401
Debug.
Assert
(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal));
607
Debug.
Assert
(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal));
Definition\BuiltInMetadata.cs (1)
76
Debug.
Assert
(FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name));
Definition\ProjectCollection.cs (2)
1653
Debug.
Assert
(_locker.IsWriteLockHeld);
1671
Debug.
Assert
(_locker.IsWriteLockHeld);
Evaluation\Conditionals\Scanner.cs (1)
111
Debug.
Assert
(-1 != _errorPosition); // We should have set it
Evaluation\LazyItemEvaluator.cs (1)
213
Debug.
Assert
(_cache == null);
FileMatcher.cs (3)
1963
Debug.
Assert
(projectDirectoryUnescaped != null);
1964
Debug.
Assert
(filespecUnescaped != null);
1965
Debug.
Assert
(Path.IsPathRooted(projectDirectoryUnescaped));
FileUtilities.cs (2)
721
Debug.
Assert
(allowedExtensions?.Length > 0);
729
Debug.
Assert
(!String.IsNullOrEmpty(extension) && extension[0] == '.');
Graph\ProjectGraph.cs (1)
840
Debug.
Assert
(_evaluationContext is not null);
Utilities\FileSpecMatchTester.cs (4)
23
Debug.
Assert
(!string.IsNullOrEmpty(unescapedFileSpec));
24
Debug.
Assert
(currentDirectory != null);
58
Debug.
Assert
(!string.IsNullOrEmpty(fileToMatch));
78
Debug.
Assert
(!string.IsNullOrEmpty(normalizedFileToMatch));
Utilities\SimpleVersion.cs (1)
183
Debug.
Assert
(value >= 0);
WindowsFileSystem.cs (2)
128
Debug.
Assert
(hr != WindowsNative.ErrorFileNotFound);
190
Debug.
Assert
(hr != WindowsNative.ErrorSuccess);
WindowsNative.cs (3)
158
Debug.
Assert
(Status == EnumerateDirectoryStatus.UnknownError);
168
Debug.
Assert
(Status != EnumerateDirectoryStatus.UnknownError &&
178
Debug.
Assert
(Status != EnumerateDirectoryStatus.Success);
Xml\ProjectXmlUtilities.XmlElementChildIterator.cs (4)
33
Debug.
Assert
(element != null);
43
Debug.
Assert
(_state > -1);
60
Debug.
Assert
(_state == -1);
70
Debug.
Assert
(_state == 1 && _current != null);
Microsoft.Build.Engine (6)
Conditionals\Scanner.cs (1)
128
Debug.
Assert
(-1 != errorPosition); // We should have set it
Engine\TaskEngine.cs (5)
430
Debug.
Assert
(howToExecuteTask == TaskExecutionMode.InferOutputsOnly);
864
Debug.
Assert
(howToExecuteTask == TaskExecutionMode.InferOutputsOnly);
1016
Debug.
Assert
(taskOutputSpecification.IsProperty);
1067
Debug.
Assert
(taskOutputSpecification.IsProperty);
1163
Debug.
Assert
(taskOutputSpecification.IsProperty);
Microsoft.Build.Engine.OM.UnitTests (7)
FileUtilities.cs (2)
721
Debug.
Assert
(allowedExtensions?.Length > 0);
729
Debug.
Assert
(!String.IsNullOrEmpty(extension) && extension[0] == '.');
WindowsFileSystem.cs (2)
128
Debug.
Assert
(hr != WindowsNative.ErrorFileNotFound);
190
Debug.
Assert
(hr != WindowsNative.ErrorSuccess);
WindowsNative.cs (3)
158
Debug.
Assert
(Status == EnumerateDirectoryStatus.UnknownError);
168
Debug.
Assert
(Status != EnumerateDirectoryStatus.UnknownError &&
178
Debug.
Assert
(Status != EnumerateDirectoryStatus.Success);
Microsoft.Build.Framework (62)
ArraySortHelper.cs (49)
108
Debug.
Assert
(i != j);
121
Debug.
Assert
(i != j);
130
Debug.
Assert
(comparer != null);
140
Debug.
Assert
(keys.Length > 0);
141
Debug.
Assert
(depthLimit >= 0);
142
Debug.
Assert
(comparer != null);
185
Debug.
Assert
(keys.Length >= SegmentedArrayHelper.IntrosortSizeThreshold);
186
Debug.
Assert
(comparer != null);
230
Debug.
Assert
(comparer != null);
231
Debug.
Assert
(keys.Length > 0);
248
Debug.
Assert
(comparer != null);
249
Debug.
Assert
(lo >= 0);
250
Debug.
Assert
(lo < keys.Length);
410
Debug.
Assert
(!Unsafe.AreSame(ref i, ref j));
419
Debug.
Assert
(keys.Length > 0);
420
Debug.
Assert
(depthLimit >= 0);
466
Debug.
Assert
(keys.Length >= SegmentedArrayHelper.IntrosortSizeThreshold);
529
Debug.
Assert
(keys.Length > 0);
546
Debug.
Assert
(lo >= 0);
547
Debug.
Assert
(lo < keys.Length);
689
Debug.
Assert
(comparer != null);
690
Debug.
Assert
(0 <= i && i < keys.Length && i < values.Length);
691
Debug.
Assert
(0 <= j && j < keys.Length && j < values.Length);
692
Debug.
Assert
(i != j);
709
Debug.
Assert
(i != j);
722
Debug.
Assert
(comparer != null);
723
Debug.
Assert
(keys.Length == values.Length);
733
Debug.
Assert
(keys.Length > 0);
734
Debug.
Assert
(values.Length == keys.Length);
735
Debug.
Assert
(depthLimit >= 0);
736
Debug.
Assert
(comparer != null);
779
Debug.
Assert
(keys.Length >= SegmentedArrayHelper.IntrosortSizeThreshold);
780
Debug.
Assert
(comparer != null);
824
Debug.
Assert
(comparer != null);
825
Debug.
Assert
(keys.Length > 0);
842
Debug.
Assert
(comparer != null);
843
Debug.
Assert
(lo >= 0);
844
Debug.
Assert
(lo < keys.Length);
871
Debug.
Assert
(comparer != null);
944
Debug.
Assert
(i != j);
962
Debug.
Assert
(i != j);
975
Debug.
Assert
(keys.Length > 0);
976
Debug.
Assert
(values.Length == keys.Length);
977
Debug.
Assert
(depthLimit >= 0);
1020
Debug.
Assert
(keys.Length >= SegmentedArrayHelper.IntrosortSizeThreshold);
1079
Debug.
Assert
(keys.Length > 0);
1096
Debug.
Assert
(lo >= 0);
1097
Debug.
Assert
(lo < keys.Length);
1237
Debug.
Assert
(typeof(TKey) == typeof(double) || typeof(TKey) == typeof(float));
HashHelpers.cs (2)
111
Debug.
Assert
(divisor <= int.MaxValue);
117
Debug.
Assert
(highbits == value % divisor);
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
22
Debug.
Assert
(dictionary is not null);
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
22
Debug.
Assert
(dictionary is not null);
SegmentedArray.cs (5)
106
Debug.
Assert
(length > 0);
107
Debug.
Assert
(sourceIndex >= 0);
108
Debug.
Assert
(destinationIndex >= 0);
109
Debug.
Assert
((uint)(sourceIndex + length) <= array.Length);
110
Debug.
Assert
((uint)(destinationIndex + length) <= array.Length);
SegmentedDictionary`2.cs (4)
195
Debug.
Assert
(modified);
202
Debug.
Assert
(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
479
Debug.
Assert
(_buckets.Length > 0);
651
Debug.
Assert
(newSize >= _entries.Length);
Microsoft.Build.Tasks.Core (18)
FileMatcher.cs (3)
1963
Debug.
Assert
(projectDirectoryUnescaped != null);
1964
Debug.
Assert
(filespecUnescaped != null);
1965
Debug.
Assert
(Path.IsPathRooted(projectDirectoryUnescaped));
FileUtilities.cs (2)
721
Debug.
Assert
(allowedExtensions?.Length > 0);
729
Debug.
Assert
(!String.IsNullOrEmpty(extension) && extension[0] == '.');
GenerateApplicationManifest.cs (2)
396
Debug.
Assert
(!String.IsNullOrEmpty(manifest.Product));
414
Debug.
Assert
(!String.IsNullOrEmpty(manifest.Publisher));
GenerateDeploymentManifest.cs (2)
138
Debug.
Assert
(!String.IsNullOrEmpty(manifest.Product));
150
Debug.
Assert
(!String.IsNullOrEmpty(manifest.Publisher));
GenerateResource.cs (1)
3370
Debug.
Assert
(_logger.HasLoggedErrors);
RedistList.cs (2)
895
Debug.
Assert
(firstEntry != null && secondEntry != null);
1084
Debug.
Assert
(name != null && frameworkDirectory != null);
ResolveManifestFiles.cs (1)
958
Debug.
Assert
(!String.IsNullOrEmpty(targetPath));
WindowsFileSystem.cs (2)
128
Debug.
Assert
(hr != WindowsNative.ErrorFileNotFound);
190
Debug.
Assert
(hr != WindowsNative.ErrorSuccess);
WindowsNative.cs (3)
158
Debug.
Assert
(Status == EnumerateDirectoryStatus.UnknownError);
168
Debug.
Assert
(Status != EnumerateDirectoryStatus.UnknownError &&
178
Debug.
Assert
(Status != EnumerateDirectoryStatus.Success);
Microsoft.Build.Utilities.Core (10)
FileMatcher.cs (3)
1963
Debug.
Assert
(projectDirectoryUnescaped != null);
1964
Debug.
Assert
(filespecUnescaped != null);
1965
Debug.
Assert
(Path.IsPathRooted(projectDirectoryUnescaped));
FileUtilities.cs (2)
721
Debug.
Assert
(allowedExtensions?.Length > 0);
729
Debug.
Assert
(!String.IsNullOrEmpty(extension) && extension[0] == '.');
WindowsFileSystem.cs (2)
128
Debug.
Assert
(hr != WindowsNative.ErrorFileNotFound);
190
Debug.
Assert
(hr != WindowsNative.ErrorSuccess);
WindowsNative.cs (3)
158
Debug.
Assert
(Status == EnumerateDirectoryStatus.UnknownError);
168
Debug.
Assert
(Status != EnumerateDirectoryStatus.UnknownError &&
178
Debug.
Assert
(Status != EnumerateDirectoryStatus.Success);
Microsoft.CSharp (800)
Microsoft\CSharp\RuntimeBinder\ArgumentObject.cs (1)
22
Debug.
Assert
(type != null);
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (8)
43
Debug.
Assert
(o.HasValue);
264
Debug.
Assert
(action.ReturnType == typeof(object));
273
Debug.
Assert
(action.ReturnType == typeof(object));
288
Debug.
Assert
(args != null);
289
Debug.
Assert
(args.Length != 0);
290
Debug.
Assert
(args[0].Value is Type);
367
Debug.
Assert
(discard <= argCount);
368
Debug.
Assert
(argNames.Count <= argCount - discard);
Microsoft\CSharp\RuntimeBinder\CSharpBinaryOperationBinder.cs (2)
41
Debug.
Assert
(name != null);
84
Debug.
Assert
(_argumentInfo.Length == 2);
Microsoft\CSharp\RuntimeBinder\CSharpConvertBinder.cs (1)
35
Debug.
Assert
(arguments.Length == 1);
Microsoft\CSharp\RuntimeBinder\CSharpGetMemberBinder.cs (1)
26
Debug.
Assert
(arguments.Length == 1);
Microsoft\CSharp\RuntimeBinder\CSharpUnaryOperationBinder.cs (1)
70
Debug.
Assert
(_argumentInfo.Length == 1);
Microsoft\CSharp\RuntimeBinder\Errors\ErrorHandling.cs (3)
71
Debug.
Assert
(0 != (arg.eaf & ErrArgFlags.Unique) && 0 == (arg.eaf & ErrArgFlags.NoStr));
101
Debug.
Assert
(0 != (args[prgiarg[j]].eaf & ErrArgFlags.Unique));
115
Debug.
Assert
(0 != (arg2.eaf & ErrArgFlags.Unique) && 0 == (arg2.eaf & ErrArgFlags.NoStr));
Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs (4)
18
Debug.
Assert
(_strBuilder == null || _strBuilder.Length == 0);
24
Debug.
Assert
(_strBuilder != null);
189
Debug.
Assert
(meth == prop.SetterMethod);
209
Debug.
Assert
(meth == @event.methRemove);
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (18)
55
Debug.
Assert
(binOp != null);
56
Debug.
Assert
(binOp.Kind == ExpressionKind.Sequence);
57
Debug.
Assert
(binOp.OptionalRightChild is ExprCall);
58
Debug.
Assert
(((ExprCall)binOp.OptionalRightChild).PredefinedMethod == PREDEFMETH.PM_EXPRESSION_LAMBDA);
59
Debug.
Assert
(binOp.OptionalLeftChild != null);
77
Debug.
Assert
(call?.PredefinedMethod == PREDEFMETH.PM_EXPRESSION_PARAMETER);
78
Debug.
Assert
(pExpr.OptionalRightChild is ExprWrap);
296
Debug.
Assert
(list != null);
306
Debug.
Assert
(pExpr.PredefinedMethod == PREDEFMETH.PM_EXPRESSION_ARRAYINDEX2);
339
Debug.
Assert
((pExpr.Flags & EXPRFLAG.EXF_UNBOXRUNTIME) == 0);
351
Debug.
Assert
(pm == PREDEFMETH.PM_EXPRESSION_CONVERT ||
427
Debug.
Assert
(fieldInfo != null);
501
Debug.
Assert
(list != null);
573
Debug.
Assert
(isLifted != null);
703
Debug.
Assert
(pExpr.Type is NullType);
710
Debug.
Assert
(call != null);
712
Debug.
Assert
(pm == PREDEFMETH.PM_EXPRESSION_CONVERT ||
912
Debug.
Assert
(expressions.Count == arrinit.DimensionSizes[0]);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (18)
76
Debug.
Assert
(args.Length >= 1);
118
Debug.
Assert
(pResult != null);
129
Debug.
Assert
(System.Threading.Monitor.IsEntered(s_bindLock));
206
Debug.
Assert
(t != null);
257
Debug.
Assert
(array[i].Type != null);
393
Debug.
Assert
(type.IsByRef);
484
Debug.
Assert
(argument.Info.Name != null);
693
Debug.
Assert
(t != null); // Would have thrown in PopulateSymbolTableWithPayloadInformation already
821
Debug.
Assert
(result != null);
857
Debug.
Assert
(prop != null);
945
Debug.
Assert
(arguments.Length == 1);
985
Debug.
Assert
(arguments.Length == 2);
1137
Debug.
Assert
(type != typeof(string));
1145
Debug.
Assert
(callingObject.Type is ArrayType);
1193
Debug.
Assert
(arguments.Length == 1);
1228
Debug.
Assert
(arguments.Length == 1);
1251
Debug.
Assert
(arguments.Length >= 2);
1252
Debug.
Assert
(Array.TrueForAll(arguments, a => a.Type != null));
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (4)
141
Debug.
Assert
(!(member1 is MethodBase) ||
223
Debug.
Assert
(typeParam.IsGenericParameter);
322
Debug.
Assert
(type != null);
342
Debug.
Assert
(type != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs (9)
185
Debug.
Assert
(index != -1);
208
Debug.
Assert
(!(args.prgexpr[i] is ExprNamedArgumentSpecification));
352
Debug.
Assert
(betterMethod == BetterType.Neither);
400
Debug.
Assert
(argType != null);
401
Debug.
Assert
(p1 != null);
402
Debug.
Assert
(p2 != null);
489
Debug.
Assert
(list.Count != 0);
490
Debug.
Assert
(list[0].mpwi != null);
515
Debug.
Assert
(candidate != contender);
Microsoft\CSharp\RuntimeBinder\Semantics\BinOpArgInfo.cs (2)
15
Debug.
Assert
(op1 != null);
16
Debug.
Assert
(op2 != null);
Microsoft\CSharp\RuntimeBinder\Semantics\BinOpSig.cs (2)
107
Debug.
Assert
(((_grflt & LiftFlags.Lift1) == 0) || ((_grflt & LiftFlags.Convert1) == 0));
108
Debug.
Assert
(((_grflt & LiftFlags.Lift2) == 0) || ((_grflt & LiftFlags.Convert2) == 0));
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (39)
222
Debug.
Assert
(s_simpleTypeBetter[i][i] == same);
225
Debug.
Assert
(s_simpleTypeBetter[i][j] != same && s_simpleTypeBetter[j][i] != same);
226
Debug.
Assert
(
230
Debug.
Assert
(
248
Debug.
Assert
((int)pt1 < NUM_EXT_TYPES);
249
Debug.
Assert
((int)pt2 < NUM_EXT_TYPES);
298
Debug.
Assert
(type1 != null && type2 != null);
360
Debug.
Assert
(!(expr is ExprMemberGroup));
441
Debug.
Assert
(!(expr is ExprMemberGroup));
442
Debug.
Assert
(dest != null);
517
Debug.
Assert
(expr.Type != null);
629
Debug.
Assert
(exprSrc == null || exprSrc.Type == typeSrc);
721
Debug.
Assert
(convCur.getClass() == aggCur);
809
Debug.
Assert
((typeBestSrc == null) == (typeBestDst == null)); // If typeBestSrc is null then typeBestDst should be null.
810
Debug.
Assert
(fFromImplicit);
817
Debug.
Assert
(iuciBestSrc == -1);
823
Debug.
Assert
(0 <= iuciBestSrc && iuciBestSrc < prguci.Count - 1);
837
Debug.
Assert
(fToImplicit);
844
Debug.
Assert
(iuciBestDst == -1);
850
Debug.
Assert
(0 <= iuciBestDst && iuciBestDst < prguci.Count - 1);
863
Debug.
Assert
((typeBestSrc == null) == (typeBestDst == null));
866
Debug.
Assert
(iuciBestSrc == -1 && iuciBestDst == -1);
870
Debug.
Assert
(0 <= iuciBestSrc && iuciBestSrc < prguci.Count);
871
Debug.
Assert
(0 <= iuciBestDst && iuciBestDst < prguci.Count);
933
Debug.
Assert
(typeFrom != typeBestSrc || typeTo != typeBestDst);
941
Debug.
Assert
(n <= 0);
955
Debug.
Assert
(n <= 0);
982
Debug.
Assert
(ctypeLiftBest <= 2);
996
Debug.
Assert
(fLiftSrc || fLiftDst);
1034
Debug.
Assert
(pConversionArgument != null);
1057
Debug.
Assert
(0 <= iuciBestSrc && iuciBestSrc < prguci.Count);
1058
Debug.
Assert
(0 <= iuciBestDst && iuciBestDst < prguci.Count);
1066
Debug.
Assert
(pExpr != null);
1102
Debug.
Assert
(pTransformedArgument != null);
1106
Debug.
Assert
(pCast != null);
1126
Debug.
Assert
(constSrc != null);
1327
Debug.
Assert
(type1 != type2);
1361
Debug.
Assert
(type1 != type2);
1487
Debug.
Assert
(typeDest != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (5)
78
Debug.
Assert
(typeSrc != null);
79
Debug.
Assert
(typeDst != null);
186
Debug.
Assert
(!(typeArr is MethodGroupType));
241
Debug.
Assert
(pTypeParams.Count == pSourceArgs.Count);
242
Debug.
Assert
(pTypeParams.Count == pTargetArgs.Count);
Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs (31)
74
Debug.
Assert
((_flags & CONVERTTYPE.STANDARD) == 0);
189
Debug.
Assert
(_typeSrc != null);
190
Debug.
Assert
(_typeDest != null);
204
Debug.
Assert
(valueSrc.Type == _typeSrc.StripNubs());
235
Debug.
Assert
(_typeSrc != null);
236
Debug.
Assert
(_typeDest != null);
299
Debug.
Assert
(!(typeArr is MethodGroupType));
345
Debug.
Assert
(_typeSrc != null);
346
Debug.
Assert
(arrayDest != null);
412
Debug.
Assert
(_typeSrc != null);
413
Debug.
Assert
(aggTypeDest != null);
455
Debug.
Assert
(_typeSrc != null);
456
Debug.
Assert
(_typeSrc.IsPredefType(PredefinedType.PT_DECIMAL));
457
Debug.
Assert
(aggTypeDest.IsEnumType);
497
Debug.
Assert
(_typeSrc != null);
498
Debug.
Assert
(aggTypeDest != null);
499
Debug.
Assert
(aggTypeDest.IsPredefType(PredefinedType.PT_DECIMAL));
500
Debug.
Assert
(_typeSrc.IsEnumType);
542
Debug.
Assert
(ok);
551
Debug.
Assert
(_typeSrc != null);
552
Debug.
Assert
(aggTypeDest != null);
603
Debug.
Assert
(_typeSrc != null);
604
Debug.
Assert
(aggTypeDest != null);
613
Debug.
Assert
(_typeSrc.IsPredefined && aggDest.IsPredefined());
618
Debug.
Assert
((int)ptSrc < NUM_SIMPLE_TYPES && (int)ptDest < NUM_SIMPLE_TYPES);
622
Debug.
Assert
(convertKind != ConvKind.Implicit);
623
Debug.
Assert
(convertKind != ConvKind.Identity);
678
Debug.
Assert
(_typeSrc != null);
679
Debug.
Assert
(aggTypeDest != null);
736
Debug.
Assert
(_typeSrc != null);
737
Debug.
Assert
(aggTypeDest != null);
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (45)
275
Debug.
Assert
(pt != PredefinedType.PT_VOID); // use getVoidType()
290
Debug.
Assert
(op1 is ExprCast
308
Debug.
Assert
(pArrayType != null);
349
Debug.
Assert
(typeDest != null);
377
Debug.
Assert
(exprCast.Argument != null);
392
Debug.
Assert
(mwi.Sym is MethodSymbol && (!mwi.Meth().isOverride || mwi.Meth().isHideByName));
393
Debug.
Assert
(pMemGroup != null);
422
Debug.
Assert
(pResult.Type == VoidType.Instance);
437
Debug.
Assert
(fwt.GetType() != null && fwt.Field().getClass() == fwt.GetType().OwningAggregate);
452
Debug.
Assert
(BindingFlag.BIND_MEMBERSET == (BindingFlag)EXPRFLAG.EXF_MEMBERSET);
463
Debug.
Assert
(pwt.Sym is PropertySymbol &&
466
Debug.
Assert
(pwt.Prop().Params.Count == 0 || pwt.Prop() is IndexerSymbol);
540
Debug.
Assert
(pName != null);
598
Debug.
Assert
(methCur.typeVars.Count == 0);
660
Debug.
Assert
(arg.Type is NullableType);
716
Debug.
Assert
(grp.SymKind == SYMKIND.SK_MethodSymbol || grp.SymKind == SYMKIND.SK_PropertySymbol && ((grp.Flags & EXPRFLAG.EXF_INDEXER) != 0));
721
Debug.
Assert
(grp.Name != null);
730
Debug.
Assert
((grp.Flags & EXPRFLAG.EXF_INDEXER) != 0);
763
Debug.
Assert
(arg != null);
796
Debug.
Assert
(pOperand1 != null);
797
Debug.
Assert
(pOperand1.Type != null);
805
Debug.
Assert
(pOperand2.Type != null);
814
Debug.
Assert
(kind >= CheckLvalueKind.Assignment && kind <= CheckLvalueKind.Increment);
823
Debug.
Assert
(prop != null);
824
Debug.
Assert
(prop.isLvalue());
865
Debug.
Assert
(!(expr is ExprLocal));
866
Debug.
Assert
(!(expr is ExprMemberGroup));
872
Debug.
Assert
(!prop.MethWithTypeSet || ExprProperty.HasIsExternalInitModifier(prop.MethWithTypeSet));
900
Debug.
Assert
(field.FieldWithType.Field().isReadOnly);
929
Debug.
Assert
(prop != null);
948
Debug.
Assert
(swt.GetType() != null && swt.GetType().OwningAggregate == swt.Sym.parent as AggregateSymbol);
1000
Debug.
Assert
(swt.GetType().OwningAggregate == aggCalled);
1003
Debug.
Assert
(pObject != null);
1050
Debug.
Assert
(
1064
Debug.
Assert
(call != null);
1077
Debug.
Assert
(mp != null);
1078
Debug.
Assert
(mp.Params != null);
1089
Debug.
Assert
(!Array.Exists(@params.Items, p => p is ArgumentListType)); // We should never have picked a varargs method to bind to.
1136
Debug.
Assert
(index != mp.Params.Count);
1190
Debug.
Assert
(rval != null);
1331
Debug.
Assert
(arg != null);
1332
Debug.
Assert
(arg.Type != null);
1338
Debug.
Assert
(iarg <= argInfo.carg);
1607
Debug.
Assert
(ek >= ExpressionKind.FirstOp && (ek - ExpressionKind.FirstOp) < (int)EK2NAME.Length);
1645
Debug.
Assert
(arg != null);
Microsoft\CSharp\RuntimeBinder\Semantics\EXPRExtensions.cs (2)
14
Debug.
Assert
(f != null);
52
Debug.
Assert
(expr?.Kind >= ExpressionKind.TypeLimit && 0 != (expr.Flags & EXPRFLAG.EXF_BINOP));
Microsoft\CSharp\RuntimeBinder\Semantics\ExprFactory.cs (11)
104
Debug.
Assert
(type != null);
113
Debug.
Assert
(type.FundamentalType > FUNDTYPE.FT_NONE);
114
Debug.
Assert
(type.FundamentalType < FUNDTYPE.FT_COUNT);
160
Debug.
Assert
(arg1 != null);
161
Debug.
Assert
(exprKind.IsUnaryOperator() == (arg2 == null));
176
Debug.
Assert
(operand != null);
202
Debug.
Assert
(wrap != null);
219
Debug.
Assert
(last == first);
226
Debug.
Assert
(last == first);
231
Debug.
Assert
((last as ExprList)?.OptionalNextListNode != null);
232
Debug.
Assert
((last as ExprList).OptionalNextListNode.Kind != ExpressionKind.List);
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (26)
61
Debug.
Assert
(grp != null);
62
Debug.
Assert
(args != null);
93
Debug.
Assert
(_pGroup.SymKind == SYMKIND.SK_MethodSymbol || _pGroup.SymKind == SYMKIND.SK_PropertySymbol && 0 != (_pGroup.Flags & EXPRFLAG.EXF_INDEXER));
106
Debug.
Assert
(pGroup != null);
242
Debug.
Assert
(!_results.InaccessibleResult);
247
Debug.
Assert
(!_misnamed);
254
Debug.
Assert
(!_mpwiBogus);
274
Debug.
Assert
(type.IsInterfaceType);
345
Debug.
Assert
(pmethBest != null);
572
Debug.
Assert
(optionalArgument != null);
631
Debug.
Assert
(meth is MethodSymbol);
647
Debug.
Assert
(method.parent is AggregateSymbol);
852
Debug.
Assert
(_methList.IsEmpty() || _methList.Head().mpwi.MethProp() != _pCurrentSym);
874
Debug.
Assert
(methSym.typeVars.Count > 0);
1034
Debug.
Assert
(pMethod != null);
1036
Debug.
Assert
(pMethod.IsParameterOptional(iParam));
1076
Debug.
Assert
(_pGroup.SymKind == SYMKIND.SK_MethodSymbol || _pGroup.SymKind == SYMKIND.SK_PropertySymbol && 0 != (_pGroup.Flags & EXPRFLAG.EXF_INDEXER));
1077
Debug.
Assert
(_pGroup.TypeArgs.Count == 0 || _pGroup.SymKind == SYMKIND.SK_MethodSymbol);
1078
Debug.
Assert
(0 == (_pGroup.Flags & EXPRFLAG.EXF_USERCALLABLE) || _results.BestResult.MethProp().isUserCallable());
1082
Debug.
Assert
(_results.BestResult.MethProp() is MethodSymbol);
1101
Debug.
Assert
(_methList.IsEmpty());
1155
Debug.
Assert
(!_results.BestResult || _results.BestResult.MethProp().getClass().IsDelegate());
1156
Debug.
Assert
(!_results.BestResult || _results.BestResult.GetType().OwningAggregate.IsDelegate());
1174
Debug.
Assert
(_results.UninferableResult.Sym is MethodSymbol);
1218
Debug.
Assert
(0 == (_pGroup.Flags & EXPRFLAG.EXF_CTOR));
1224
Debug.
Assert
(!(_pGroup.ParentType is TypeParameterType));
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (18)
87
Debug.
Assert
(_typeSrc != null && _typeDest != null); // types must be supplied.
88
Debug.
Assert
(_exprSrc == null || _typeSrc == _exprSrc.Type); // type of source should be correct if source supplied
89
Debug.
Assert
(!_needsExprDest || _exprSrc != null); // need source expr to create dest expr
144
Debug.
Assert
(ftDest != FUNDTYPE.FT_NONE || _typeDest is ParameterModifierType);
268
Debug.
Assert
(0 != (~_flags & (CONVERTTYPE.STANDARD | CONVERTTYPE.ISEXPLICIT)));
269
Debug.
Assert
(_exprSrc == null || _exprSrc.Type == _typeSrc);
270
Debug.
Assert
(!_needsExprDest || _exprSrc != null);
271
Debug.
Assert
(_typeSrc != nubDst); // BindImplicitConversion should have taken care of this already.
278
Debug.
Assert
(atsDst != _typeSrc);
304
Debug.
Assert
(_typeSrc == typeSrcBase);
347
Debug.
Assert
(exprTmp.Type == nubDst);
671
Debug.
Assert
(aggSrc.getThisType().IsSimpleType);
672
Debug.
Assert
(_typeDest.IsSimpleType);
674
Debug.
Assert
(aggSrc.IsPredefined() && _typeDest.IsPredefined);
679
Debug.
Assert
((int)ptSrc < NUM_SIMPLE_TYPES && (int)ptDest < NUM_SIMPLE_TYPES);
701
Debug.
Assert
(ptSrc == PredefinedType.PT_FLOAT || ptSrc == PredefinedType.PT_DOUBLE);
702
Debug.
Assert
(0 != (_flags & CONVERTTYPE.ISEXPLICIT));
708
Debug.
Assert
(convertKind != ConvKind.Identity);
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (30)
70
Debug.
Assert
(type != null && sym != null);
85
Debug.
Assert
(_csym == 1);
86
Debug.
Assert
(_prgtype[0] == type);
117
Debug.
Assert
(!(symCur is AggregateSymbol));
228
Debug.
Assert
(_fMulti || typeCur == _prgtype[0]);
299
Debug.
Assert
(!fInaccess || !fFoundSome);
328
Debug.
Assert
(sym is PropertySymbol);
360
Debug.
Assert
(!_swtFirst || _fMulti);
361
Debug.
Assert
(typeStart != null && !typeStart.IsInterfaceType && (ptypeEnd == null || typeStart != ptypeEnd));
369
Debug.
Assert
(!typeCur.IsInterfaceType);
395
Debug.
Assert
(typeCur == typeEnd);
405
Debug.
Assert
(!_swtFirst || _fMulti);
406
Debug.
Assert
(typeStart == null || typeStart.IsInterfaceType);
407
Debug.
Assert
(typeStart != null || types.Count != 0);
420
Debug.
Assert
(type.IsInterfaceType);
430
Debug.
Assert
(typeCur != null);
435
Debug.
Assert
(typeCur != null && typeCur.IsInterfaceType);
444
Debug.
Assert
(type.IsInterfaceType);
472
Debug.
Assert
(CSemanticChecker.CheckBogus(swt.Sym));
475
Debug.
Assert
((meth1 ?? meth2) != null);
523
Debug.
Assert
((flags & ~MemLookFlags.All) == 0);
524
Debug.
Assert
(obj == null || obj.Type != null);
525
Debug.
Assert
(typeSrc is AggregateType);
545
Debug.
Assert
((_flags & (MemLookFlags.Ctor | MemLookFlags.NewObj | MemLookFlags.Operator | MemLookFlags.BaseCall)) == 0);
568
Debug.
Assert
(typeCls2 != null && typeCls2.IsPredefType(PredefinedType.PT_OBJECT));
596
Debug.
Assert
(FError());
600
Debug.
Assert
(!_swtFirst || _swtAmbig);
617
Debug.
Assert
(_typeSrc is AggregateType);
645
Debug.
Assert
(_arity != 0);
646
Debug.
Assert
(!(_swtBadArity.Sym is AggregateSymbol));
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookupResults.cs (2)
24
Debug.
Assert
(containingTypes != null);
25
Debug.
Assert
(containingTypes.Count != 0);
Microsoft\CSharp\RuntimeBinder\Semantics\MethodIterator.cs (3)
29
Debug.
Assert
(name != null);
30
Debug.
Assert
(containingTypes != null);
31
Debug.
Assert
(containingTypes.Count != 0);
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (55)
90
Debug.
Assert
(pMethod != null);
91
Debug.
Assert
(pMethod.typeVars.Count > 0);
92
Debug.
Assert
(pMethod.isParamArray || pMethod.Params == pMethodFormalParameterTypes);
98
Debug.
Assert
(pMethodArguments != null);
99
Debug.
Assert
(pMethodFormalParameterTypes != null);
100
Debug.
Assert
(pMethodArguments.carg <= pMethodFormalParameterTypes.Count);
147
Debug.
Assert
(0 <= iParam);
148
Debug.
Assert
(iParam < _pMethodTypeParameters.Count);
156
Debug.
Assert
(pParam != null);
157
Debug.
Assert
(pParam.IsMethodTypeParameter);
159
Debug.
Assert
(_pMethodTypeParameters[iParam] == pParam);
181
Debug.
Assert
(IsUnfixed(pParam));
193
Debug.
Assert
(IsUnfixed(pParam));
205
Debug.
Assert
(IsUnfixed(pParam));
217
Debug.
Assert
(0 <= iParam);
218
Debug.
Assert
(iParam < _pMethodTypeParameters.Count);
254
Debug.
Assert
(_pMethodFormalParameterTypes != null);
255
Debug.
Assert
(_pMethodArguments != null);
256
Debug.
Assert
(_pMethodArguments.carg <= _pMethodFormalParameterTypes.Count);
399
Debug.
Assert
(res != NewInferenceResult.NoProgress);
579
Debug.
Assert
(_ppDependencies == null);
593
Debug.
Assert
(_ppDependencies != null);
599
Debug.
Assert
(0 <= iParam && iParam < _pMethodTypeParameters.Count);
600
Debug.
Assert
(0 <= jParam && jParam < _pMethodTypeParameters.Count);
614
Debug.
Assert
(_ppDependencies != null);
615
Debug.
Assert
(0 <= iParam && iParam < _pMethodTypeParameters.Count);
616
Debug.
Assert
(0 <= jParam && jParam < _pMethodTypeParameters.Count);
654
Debug.
Assert
(_ppDependencies != null);
677
Debug.
Assert
(_ppDependencies != null);
694
Debug.
Assert
(_ppDependencies != null);
728
Debug.
Assert
(0 <= iParam && iParam < _pMethodTypeParameters.Count);
743
Debug.
Assert
(0 <= iParam && iParam < _pMethodTypeParameters.Count);
871
Debug.
Assert
(pSource != null);
872
Debug.
Assert
(pDest != null);
873
Debug.
Assert
(pSource.OwningAggregate == pDest.OwningAggregate);
878
Debug.
Assert
(pSourceArgs != null);
879
Debug.
Assert
(pDestArgs != null);
880
Debug.
Assert
(pSourceArgs.Count == pDestArgs.Count);
1233
Debug.
Assert
(pSource != null);
1234
Debug.
Assert
(pDest != null);
1235
Debug.
Assert
(pSource.OwningAggregate == pDest.OwningAggregate);
1241
Debug.
Assert
(pTypeParams != null);
1242
Debug.
Assert
(pSourceArgs != null);
1243
Debug.
Assert
(pDestArgs != null);
1245
Debug.
Assert
(pTypeParams.Count == pSourceArgs.Count);
1246
Debug.
Assert
(pTypeParams.Count == pDestArgs.Count);
1540
Debug.
Assert
(pSource != null);
1541
Debug.
Assert
(pDest != null);
1542
Debug.
Assert
(pSource.OwningAggregate == pDest.OwningAggregate);
1548
Debug.
Assert
(pTypeParams != null);
1549
Debug.
Assert
(pSourceArgs != null);
1550
Debug.
Assert
(pDestArgs != null);
1552
Debug.
Assert
(pTypeParams.Count == pSourceArgs.Count);
1553
Debug.
Assert
(pTypeParams.Count == pDestArgs.Count);
1588
Debug.
Assert
(IsUnfixed(iParam));
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (5)
13
Debug.
Assert
(expr != null);
31
Debug.
Assert
(pExpr != null && !(pExpr is ExprList));
41
Debug.
Assert
(exprSrc != null && exprSrc.Type is NullableType);
47
Debug.
Assert
(args != null && !(args is ExprList));
65
Debug.
Assert
(exprSrc != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (128)
177
Debug.
Assert
(prgbofs != null);
193
Debug.
Assert
(rgbofs != null);
238
Debug.
Assert
(typeSig1.IsValueType);
265
Debug.
Assert
(typeSig1.IsValueType);
322
Debug.
Assert
(typeSig2.IsValueType);
350
Debug.
Assert
(typeSig2.IsValueType);
399
Debug.
Assert
(binopSignatures != null);
488
Debug.
Assert
(arg1 != null);
489
Debug.
Assert
(arg2 != null);
527
Debug.
Assert
(binopSignatures.Count > 0);
553
Debug.
Assert
(bestBinopSignature < binopSignatures.Count);
585
Debug.
Assert
(bofs.fnkind != BinOpFuncKind.BoolBitwiseOp);
605
Debug.
Assert
(bofs.Type1() is NullableType || bofs.Type2() is NullableType);
649
Debug.
Assert
((exprRes.Flags & EXPRFLAG.EXF_LVALUE) == 0);
737
Debug.
Assert
(!(typeDst is NullableType));
770
Debug.
Assert
(!(typeDst is NullableType));
811
Debug.
Assert
(info.type1 is NullableType);
822
Debug.
Assert
(info.type2 is NullableType);
948
Debug.
Assert
(type1.FundamentalType != FUNDTYPE.FT_VAR);
964
Debug.
Assert
(type2.FundamentalType != FUNDTYPE.FT_VAR);
999
Debug.
Assert
(
1002
Debug.
Assert
(
1049
Debug.
Assert
(Enum.IsDefined(bt1));
1050
Debug.
Assert
(Enum.IsDefined(bt2));
1156
Debug.
Assert
(pArgument != null);
1159
Debug.
Assert
(type != null);
1192
Debug.
Assert
(pResult != null);
1259
Debug.
Assert
(nBestSignature < pSignatures.Count);
1299
Debug.
Assert
(pArgument != null);
1300
Debug.
Assert
(pArgument.Type != null);
1316
Debug.
Assert
(pRawType == pArgumentType);
1317
Debug.
Assert
(pArgumentType is AggregateType);
1345
Debug.
Assert
(!(pArgumentType is PointerType));
1358
Debug.
Assert
(pArgument != null);
1393
Debug.
Assert
(pArgument != null);
1394
Debug.
Assert
(pArgument.Type != null);
1516
Debug.
Assert
(arg?.Type != null);
1530
Debug.
Assert
((exprRes.Flags & EXPRFLAG.EXF_LVALUE) == 0);
1553
Debug.
Assert
(Enum.IsDefined(bt));
1567
Debug.
Assert
(arg1.Type.IsPredefined && arg2.Type.IsPredefined && arg1.Type.PredefinedType == arg2.Type.PredefinedType);
1577
Debug.
Assert
(arg.Type.IsPredefined);
1587
Debug.
Assert
(arg1.Type.IsPredefined && arg2.Type.IsPredefined && arg1.Type.PredefinedType == arg2.Type.PredefinedType);
1597
Debug.
Assert
(arg.Type.IsPredefined);
1608
Debug.
Assert
(ek == ExpressionKind.Add || ek == ExpressionKind.Subtract);
1632
Debug.
Assert
(ek == ExpressionKind.Add || ek == ExpressionKind.Subtract);
1641
Debug.
Assert
(type.FundamentalType != FUNDTYPE.FT_PTR); // Can't have a pointer.
1645
Debug.
Assert
(type.IsPredefType(PredefinedType.PT_DECIMAL));
1704
Debug.
Assert
(ek == ExpressionKind.Add || ek == ExpressionKind.Subtract);
1705
Debug.
Assert
(!uofs.isLifted());
1707
Debug.
Assert
(arg != null);
1711
Debug.
Assert
(!(type is NullableType));
1731
Debug.
Assert
(ek == ExpressionKind.Add || ek == ExpressionKind.Subtract);
1732
Debug.
Assert
(uofs.isLifted());
1735
Debug.
Assert
(arg != null);
1765
Debug.
Assert
(arg1.Type.IsPredefType(PredefinedType.PT_DECIMAL) && arg2.Type.IsPredefType(PredefinedType.PT_DECIMAL));
1768
Debug.
Assert
(typeDec != null);
1807
Debug.
Assert
(arg.Type.IsPredefType(PredefinedType.PT_DECIMAL));
1808
Debug.
Assert
(ek == ExpressionKind.Negate || ek == ExpressionKind.UnaryPlus);
1811
Debug.
Assert
(typeDec != null);
1827
Debug.
Assert
(ek == ExpressionKind.Add);
1828
Debug.
Assert
(arg1.Type.IsPredefType(PredefinedType.PT_STRING) || arg2.Type.IsPredefType(PredefinedType.PT_STRING));
1839
Debug.
Assert
(ek == ExpressionKind.LeftShirt || ek == ExpressionKind.RightShift);
1840
Debug.
Assert
(arg1.Type.IsPredefined);
1841
Debug.
Assert
(arg2.Type.IsPredefType(PredefinedType.PT_INT));
1844
Debug.
Assert
(ptOp == PredefinedType.PT_INT || ptOp == PredefinedType.PT_UINT || ptOp == PredefinedType.PT_LONG || ptOp == PredefinedType.PT_ULONG);
1857
Debug.
Assert
(arg1 != null);
1858
Debug.
Assert
(arg2 != null);
1859
Debug.
Assert
(arg1.Type.IsPredefType(PredefinedType.PT_BOOL) || arg1.Type is NullableType argNubType1 && argNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1860
Debug.
Assert
(arg2.Type.IsPredefType(PredefinedType.PT_BOOL) || arg2.Type is NullableType argNubType2 && argNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1868
Debug.
Assert
(ek == ExpressionKind.BitwiseAnd || ek == ExpressionKind.BitwiseOr);
1869
Debug.
Assert
(expr1.Type.IsPredefType(PredefinedType.PT_BOOL) || expr1.Type is NullableType expNubType1 && expNubType1.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1870
Debug.
Assert
(expr2.Type.IsPredefType(PredefinedType.PT_BOOL) || expr2.Type is NullableType expNubType2 && expNubType2.UnderlyingType.IsPredefType(PredefinedType.PT_BOOL));
1896
Debug.
Assert
((exprRes.Flags & EXPRFLAG.EXF_LVALUE) == 0);
1912
Debug.
Assert
(arg.Type.IsPredefType(PredefinedType.PT_BOOL));
1913
Debug.
Assert
(ek == ExpressionKind.LogicalNot);
1937
Debug.
Assert
(ek == ExpressionKind.Eq || ek == ExpressionKind.NotEq);
1938
Debug.
Assert
(arg1.Type.IsPredefType(PredefinedType.PT_STRING) && arg2.Type.IsPredefType(PredefinedType.PT_STRING));
1955
Debug.
Assert
(ek == ExpressionKind.Eq || ek == ExpressionKind.NotEq);
1971
Debug.
Assert
(ek == ExpressionKind.Add || ek == ExpressionKind.Subtract || ek == ExpressionKind.Eq || ek == ExpressionKind.NotEq);
1972
Debug.
Assert
(arg1.Type == arg2.Type && (arg1.Type.IsDelegateType || arg1.Type.IsPredefType(PredefinedType.PT_DELEGATE)));
2014
Debug.
Assert
(typeEnum != null);
2031
Debug.
Assert
(!typeDst.IsPredefType(PredefinedType.PT_BOOL));
2041
Debug.
Assert
(ek == ExpressionKind.Add || ek == ExpressionKind.Subtract);
2055
Debug.
Assert
(typeEnum != null);
2071
Debug.
Assert
((exprRes.Flags & EXPRFLAG.EXF_LVALUE) == 0);
2088
Debug.
Assert
(ek == ExpressionKind.BitwiseNot);
2089
Debug.
Assert
((ExprCast)arg != null);
2090
Debug.
Assert
(((ExprCast)arg).Argument.Type.IsEnumType);
2190
Debug.
Assert
(ptOp == PredefinedType.PT_INT || ptOp == PredefinedType.PT_UINT || ptOp == PredefinedType.PT_LONG || ptOp == PredefinedType.PT_ULONG);
2192
Debug.
Assert
(typeOp != null);
2193
Debug.
Assert
(op1 != null && op1.Type == typeOp);
2194
Debug.
Assert
(op2 == null || op2.Type == typeOp);
2195
Debug.
Assert
((op2 == null) == (kind == ExpressionKind.Negate || kind == ExpressionKind.UnaryPlus || kind == ExpressionKind.BitwiseNot));
2206
Debug.
Assert
((exprRes.Flags & EXPRFLAG.EXF_LVALUE) == 0);
2244
Debug.
Assert
(ptOp == PredefinedType.PT_INT || ptOp == PredefinedType.PT_UINT || ptOp == PredefinedType.PT_LONG || ptOp == PredefinedType.PT_ULONG);
2246
Debug.
Assert
(typeOp != null);
2247
Debug.
Assert
(op != null && op.Type == typeOp);
2260
Debug.
Assert
(0 == (exprRes.Flags & EXPRFLAG.EXF_LVALUE));
2275
Debug.
Assert
(op2 == null || op1.Type == op2.Type);
2276
Debug.
Assert
(op1.Type.IsPredefType(PredefinedType.PT_FLOAT) || op1.Type.IsPredefType(PredefinedType.PT_DOUBLE));
2307
Debug.
Assert
(op1 != null);
2308
Debug.
Assert
(op2 != null);
2317
Debug.
Assert
(op1 != null);
2332
Debug.
Assert
(pCall != null);
2333
Debug.
Assert
(pCall.MethWithInst.Meth() != null);
2334
Debug.
Assert
(pCall.OptionalArguments != null);
2335
Debug.
Assert
(kind == ExpressionKind.LogicalAnd || kind == ExpressionKind.LogicalOr);
2339
Debug.
Assert
(pCall.MethWithInst.Meth().Params.Count == 2);
2347
Debug.
Assert
(list != null);
2457
Debug.
Assert
(method.typeVars.Count == 0);
2493
Debug.
Assert
(name != null);
2543
Debug.
Assert
(cats == 2);
2572
Debug.
Assert
(pmethBest.ctypeLift == 2);
2620
Debug.
Assert
(Params != paramsRaw);
2621
Debug.
Assert
(paramsRaw[0] == Params[0].BaseOrParameterOrElementType);
2622
Debug.
Assert
(paramsRaw[1] == Params[1].BaseOrParameterOrElementType);
2641
Debug.
Assert
(paramsRaw[0] == paramsRaw[1]);
2642
Debug.
Assert
(typeRetRaw.IsPredefType(PredefinedType.PT_BOOL));
2650
Debug.
Assert
(typeRetRaw.IsPredefType(PredefinedType.PT_BOOL));
2658
Debug.
Assert
(!(ek == ExpressionKind.Eq || ek == ExpressionKind.NotEq) || nonLiftedArg1.Type == nonLiftedArg2.Type);
2682
Debug.
Assert
(argType1.IsEnumType || argType2.IsEnumType);
2689
Debug.
Assert
(type1 == typeEnum || type1 == typeEnum.UnderlyingEnumType);
2690
Debug.
Assert
(type2 == typeEnum || type2 == typeEnum.UnderlyingEnumType);
2699
Debug.
Assert
(type1 == type2);
2703
Debug.
Assert
(type1 != type2);
2712
Debug.
Assert
(ek.IsRelational());
2725
Debug.
Assert
(methSym != null);
2740
Debug.
Assert
(methSym != null);
Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedMembers.cs (22)
214
Debug.
Assert
(propertyName != null);
215
Debug.
Assert
(propertyGetter >= 0 && propertyGetter < PREDEFMETH.PM_COUNT);
223
Debug.
Assert
(property != null);
233
Debug.
Assert
(signature != null);
253
Debug.
Assert
(current >= 0 && (int)current < (int)PredefinedType.PT_COUNT);
274
Debug.
Assert
(signature != null);
279
Debug.
Assert
(count >= 0);
296
Debug.
Assert
((int)GetMethInfo((PREDEFMETH)i).method == i);
300
Debug.
Assert
((int)GetPropInfo((PREDEFPROP)i).property == i);
308
Debug.
Assert
(property >= 0 && property < PREDEFPROP.PP_COUNT);
315
Debug.
Assert
(method >= 0 && method < PREDEFMETH.PM_COUNT);
330
Debug.
Assert
(signature != null);
331
Debug.
Assert
(cMethodTyVars >= 0);
332
Debug.
Assert
(methodName != null);
333
Debug.
Assert
(type != null);
338
Debug.
Assert
(returnType != null);
341
Debug.
Assert
(argumentTypes != null);
394
Debug.
Assert
(result >= 0 && result < PREDEFMETH.PM_COUNT);
412
Debug.
Assert
(property >= 0 && property < PREDEFPROP.PP_COUNT);
413
Debug.
Assert
(s_predefinedProperties[(int)property].property == property);
420
Debug.
Assert
(method >= 0 && method < PREDEFMETH.PM_COUNT);
421
Debug.
Assert
(s_predefinedMethods[(int)method].method == method);
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (13)
35
Debug.
Assert
(symCheck != null);
36
Debug.
Assert
(atsCheck == null || symCheck.parent == atsCheck.OwningAggregate);
37
Debug.
Assert
(typeThru == null ||
51
Debug.
Assert
(atsCheck != null);
71
Debug.
Assert
(atsCheck != null);
85
Debug.
Assert
(type != null);
92
Debug.
Assert
(type is VoidType || type is TypeParameterType);
119
Debug.
Assert
(symCheck != null);
120
Debug.
Assert
(atsCheck == null || symCheck.parent == atsCheck.OwningAggregate);
121
Debug.
Assert
(typeThru == null ||
210
Debug.
Assert
(symCheck.GetAccess() == ACCESS.ACC_PROTECTED
228
Debug.
Assert
(agg != aggCheck); // We checked for this above.
256
Debug.
Assert
(!CheckAccess(swtBad.Sym, swtBad.GetType(), symWhere, typeQual) ||
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\AggregateSymbol.cs (3)
86
Debug.
Assert
(GetTypeVars() == GetTypeVarsAll() || isNested());
286
Debug.
Assert
(GetOuterAgg().GetTypeVars() != null);
287
Debug.
Assert
(GetOuterAgg().GetTypeVarsAll() != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\FieldSymbol.cs (1)
41
Debug.
Assert
(isEvent);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs (9)
92
Debug.
Assert
(index < Params.Count);
103
Debug.
Assert
(_optionalParameterIndex != null);
125
Debug.
Assert
(index < Params.Count);
126
Debug.
Assert
(_defaultParameterIndex != null);
132
Debug.
Assert
(_defaultParameterIndex != null);
140
Debug.
Assert
(HasDefaultParameterValue(index));
141
Debug.
Assert
(_defaultParameterIndex != null);
147
Debug.
Assert
(HasDefaultParameterValue(index));
164
Debug.
Assert
(IsMarshalAsParameter(index));
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodSymbol.cs (6)
40
Debug.
Assert
(!_inferenceMustFail);
114
Debug.
Assert
(isPropertyAccessor());
120
Debug.
Assert
(isPropertyAccessor());
126
Debug.
Assert
(isEventAccessor());
132
Debug.
Assert
(isEventAccessor());
139
Debug.
Assert
(MethKind == MethodKindEnum.ExplicitConv || MethKind == MethodKindEnum.ImplicitConv);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\ParentSymbol.cs (5)
24
Debug.
Assert
(sym != null /*&& this != null */);
27
Debug.
Assert
(sym.parent == null || sym.parent == this);
29
Debug.
Assert
(sym.nextChild == null);
33
Debug.
Assert
(firstChild == null);
48
Debug.
Assert
(_lastChild == psym || count == 0);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\Symbol.cs (1)
86
Debug.
Assert
(_access != ACCESS.ACC_UNKNOWN);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (28)
23
Debug.
Assert
(atsDer != null);
24
Debug.
Assert
(pBase != null);
47
Debug.
Assert
(pDerived != null);
48
Debug.
Assert
(pBase != null);
58
Debug.
Assert
(pDerived != null);
59
Debug.
Assert
(pBase != null);
96
Debug.
Assert
(pSource != null);
97
Debug.
Assert
(pDest != null);
108
Debug.
Assert
(pSource != null);
109
Debug.
Assert
(pDest != null);
123
Debug.
Assert
(pSource != null);
124
Debug.
Assert
(pDest != null);
157
Debug.
Assert
(atsDest.TypeArgsAll.Count == 1);
165
Debug.
Assert
(pSource != null);
166
Debug.
Assert
(pDest != null);
167
Debug.
Assert
(!(pSource is TypeParameterType));
330
Debug.
Assert
(pSource != null && pSource.IsInterfaceType);
331
Debug.
Assert
(pDest != null && pDest.IsInterfaceType);
340
Debug.
Assert
(pSource != null && pSource.IsDelegateType);
341
Debug.
Assert
(pDest != null && pDest.IsDelegateType);
350
Debug.
Assert
(pSource != null);
351
Debug.
Assert
(pDest != null);
367
Debug.
Assert
(pTypeParams.Count == pSourceArgs.Count);
368
Debug.
Assert
(pTypeParams.Count == pDestArgs.Count);
405
Debug.
Assert
(pSource != null);
406
Debug.
Assert
(pDest != null);
407
Debug.
Assert
(!(pSource is TypeParameterType));
486
Debug.
Assert
(!derived.IsEnum() && !@base.IsEnum());
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolStore.cs (3)
28
Debug.
Assert
(child.nextSameName == null);
29
Debug.
Assert
(child.parent == null || child.parent == parent);
54
Debug.
Assert
(sym != null && sym.nextSameName == null);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactory.cs (7)
87
Debug.
Assert
(name != null);
88
Debug.
Assert
(parent != null);
104
Debug.
Assert
(name != null);
108
Debug.
Assert
(sym != null);
128
Debug.
Assert
(sym != null);
136
Debug.
Assert
(sym != null);
172
Debug.
Assert
(sym != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TypeParameterSymbol.cs (1)
61
Debug.
Assert
(index >= _nIndexInOwnParameters);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BinaryOperator.cs (7)
13
Debug.
Assert
(kind > ExpressionKind.TypeLimit);
14
Debug.
Assert
(left != null);
15
Debug.
Assert
(right != null);
24
Debug.
Assert
(kind > ExpressionKind.TypeLimit);
25
Debug.
Assert
(left != null);
26
Debug.
Assert
(right != null);
27
Debug.
Assert
(call != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BoundAnonymousFunction.cs (3)
13
Debug.
Assert
(type != null);
14
Debug.
Assert
(type.IsDelegateType);
15
Debug.
Assert
(argumentScope != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Call.cs (1)
13
Debug.
Assert
(
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Cast.cs (2)
14
Debug.
Assert
(argument != null);
15
Debug.
Assert
((flags & ~(EXPRFLAG.EXF_CAST_ALL | EXPRFLAG.EXF_MASK_ANY)) == 0);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Class.cs (1)
13
Debug.
Assert
(type != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\CompoundOperator.cs (3)
13
Debug.
Assert
((flags & ~EXPRFLAG.EXF_MASK_ANY) == 0);
26
Debug.
Assert
(left != null);
27
Debug.
Assert
(op != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Concatenate.cs (4)
14
Debug.
Assert
(first?.Type != null);
15
Debug.
Assert
(second?.Type != null);
16
Debug.
Assert
(first.Type.IsPredefType(PredefinedType.PT_STRING) || second.Type.IsPredefType(PredefinedType.PT_STRING));
29
Debug.
Assert
(second.Type.IsPredefType(PredefinedType.PT_STRING));
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\EXPR.cs (2)
34
Debug.
Assert
(!(this is ExprList));
35
Debug.
Assert
(_type != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprOperator.cs (1)
13
Debug.
Assert
(kind.IsUnaryOperator() || kind > ExpressionKind.TypeLimit);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\FieldInfo.cs (2)
13
Debug.
Assert
(field != null);
14
Debug.
Assert
(fieldType != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MemberGroup.cs (1)
14
Debug.
Assert
(
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (4)
16
Debug.
Assert
(method != null);
17
Debug.
Assert
(methodType != null);
56
Debug.
Assert
(m.Name == methodInfo.Name &&
125
Debug.
Assert
(c.GetParameters() == null || c.GetParameters().Length == genericInstanceParams.Count);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (3)
16
Debug.
Assert
(propertySymbol != null);
17
Debug.
Assert
(propertyType != null);
52
Debug.
Assert
((p.Name == propertyInfo.Name) &&
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UnaryOperator.cs (7)
13
Debug.
Assert
(kind.IsUnaryOperator());
14
Debug.
Assert
(operand != null);
21
Debug.
Assert
(kind.IsUnaryOperator());
22
Debug.
Assert
(operand != null);
23
Debug.
Assert
(type != null);
24
Debug.
Assert
(call != null);
25
Debug.
Assert
(userMethod != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UserDefinedConversion.cs (2)
15
Debug.
Assert
(argument != null);
16
Debug.
Assert
(call != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UserDefinedLogicalOperator.cs (3)
13
Debug.
Assert
(trueFalseCall != null);
14
Debug.
Assert
((operatorCall?.OptionalArguments as ExprList)?.OptionalElement != null);
21
Debug.
Assert
(FirstOperandToExamine != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (55)
18
Debug.
Assert
(expr != null);
33
Debug.
Assert
(assignment != null);
89
Debug.
Assert
(anonmeth != null);
97
Debug.
Assert
(createParameters != null);
98
Debug.
Assert
(anonmeth.Expression != null);
100
Debug.
Assert
(anonmeth.ArgumentScope.nextChild == null);
113
Debug.
Assert
(expr != null);
120
Debug.
Assert
(local != null);
121
Debug.
Assert
(local.Local.wrap != null);
128
Debug.
Assert
(expr != null);
145
Debug.
Assert
(expr != null);
152
Debug.
Assert
(pExpr != null);
186
Debug.
Assert
(expr != null);
206
Debug.
Assert
(expr != null);
220
Debug.
Assert
(pExpr != null);
234
Debug.
Assert
(pExpr != null);
248
Debug.
Assert
(expr != null);
305
Debug.
Assert
(!expr.MethWithInst.Meth().isVirtual || expr.MemberGroup.OptionalObject != null);
313
Debug.
Assert
(expr != null);
337
Debug.
Assert
(expr != null);
348
Debug.
Assert
(expr != null);
355
Debug.
Assert
(expr != null);
362
Debug.
Assert
(expr != null);
364
Debug.
Assert
(memberGroup.IsDelegate);
366
Debug.
Assert
(oldObject != null);
376
Debug.
Assert
(expr != null);
405
Debug.
Assert
(origL != null);
406
Debug.
Assert
(origR != null);
420
Debug.
Assert
(expr.IsLifted);
427
Debug.
Assert
(expr.IsLifted);
434
Debug.
Assert
(expr.IsLifted);
441
Debug.
Assert
(expr.IsLifted);
477
Debug.
Assert
(expr != null);
494
Debug.
Assert
(!(origOp.Type is NullableType nub) || !nub.UnderlyingType.IsEnumType);
501
Debug.
Assert
(expr != null);
545
Debug.
Assert
(udcall.Kind == ExpressionKind.Call || udcall.Kind == ExpressionKind.UserLogicalOp);
549
Debug.
Assert
(args.OptionalNextListNode.Kind != ExpressionKind.List);
556
Debug.
Assert
(userLogOp != null);
558
Debug.
Assert
(args.OptionalNextListNode.Kind != ExpressionKind.List);
581
Debug.
Assert
(expr != null);
592
Debug.
Assert
(arg != null && arg.Kind != ExpressionKind.List);
632
Debug.
Assert
(expr != null);
654
Debug.
Assert
(args.OptionalNextListNode.Kind != ExpressionKind.List);
682
Debug.
Assert
(pArgument != null);
775
Debug.
Assert
(pUDConversion is ExprUserDefinedConversion);
813
Debug.
Assert
(anonmeth.Expression != null);
833
Debug.
Assert
(expr != null);
834
Debug.
Assert
(expr.MethWithInst.Meth().IsConstructor());
976
Debug.
Assert
(expr != null);
977
Debug.
Assert
(pp1 != null);
978
Debug.
Assert
(pp1 != null);
979
Debug.
Assert
(pp2 != null);
980
Debug.
Assert
(pp2 != null);
984
Debug.
Assert
(orig1 != null && orig2 != null);
1022
Debug.
Assert
(pExpr != null);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExprVisitorBase.cs (17)
94
Debug.
Assert
(pExpr != null);
125
Debug.
Assert
(exprRet != null);
128
Debug.
Assert
(exprRet != null);
134
Debug.
Assert
(exprRet != null);
137
Debug.
Assert
(exprRet != null);
155
Debug.
Assert
(exprRet != null);
161
Debug.
Assert
(exprRet != null);
164
Debug.
Assert
(exprRet != null);
167
Debug.
Assert
(exprRet != null);
176
Debug.
Assert
(exprRet != null);
182
Debug.
Assert
(exprRet != null);
200
Debug.
Assert
(exprRet != null);
208
Debug.
Assert
(exprRet != null);
254
Debug.
Assert
(exprRet != null);
257
Debug.
Assert
(exprRet != null);
263
Debug.
Assert
(exprRet != null);
266
Debug.
Assert
(exprRet != null);
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (11)
79
Debug.
Assert
(typeVars.Count == typeArgsThis.Count);
125
Debug.
Assert
(mwi.Meth() != null && mwi.GetType() != null && mwi.TypeArgs != null);
126
Debug.
Assert
(mwi.Meth().typeVars.Count == mwi.TypeArgs.Count);
127
Debug.
Assert
(mwi.GetType().OwningAggregate == mwi.Meth().getClass());
142
Debug.
Assert
(typeVars.Count == typeArgs.Count);
143
Debug.
Assert
(typeVars.Count > 0);
144
Debug.
Assert
(flags == CheckConstraintsFlags.None || flags == CheckConstraintsFlags.NoErrors);
164
Debug.
Assert
(!(arg is PointerType));
165
Debug.
Assert
(!arg.IsStaticClass);
253
Debug.
Assert
(typeBnd.IsInterfaceType);
334
Debug.
Assert
(typeBnd is AggregateType || typeBnd is TypeParameterType || typeBnd is ArrayType);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (7)
30
Debug.
Assert
(typeArgsThis != null);
62
Debug.
Assert
(outerType == null || outerType.TypeArgsAll != null);
105
Debug.
Assert
(baseClass != null);
194
Debug.
Assert
(type.IsInterfaceType);
222
Debug.
Assert
(IsPredefined);
298
Debug.
Assert
(IsEnumType);
383
Debug.
Assert
(
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
187
Debug.
Assert
(s_types[i].Type == (PredefinedType)i);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs (3)
88
Debug.
Assert
(types != null);
101
Debug.
Assert
(Count >= 0);
102
Debug.
Assert
(Array.TrueForAll(Items, item => item != null));
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (40)
45
Debug.
Assert
(iv >= 0);
62
Debug.
Assert
(tpt != null);
69
Debug.
Assert
(args > 0 && args < 32767);
70
Debug.
Assert
(args == 1 || !isSZArray);
83
Debug.
Assert
(pArray.Rank == args);
84
Debug.
Assert
(pArray.ElementType == elementType);
95
Debug.
Assert
(agg.GetTypeVars().Count == typeArgs.Count);
101
Debug.
Assert
(!pAggregate.ConstraintError.HasValue);
106
Debug.
Assert
(pAggregate.OwningAggregate == agg);
107
Debug.
Assert
(pAggregate.TypeArgsThis != null && pAggregate.TypeArgsAll != null);
108
Debug.
Assert
(pAggregate.TypeArgsThis == typeArgs);
115
Debug.
Assert
(typeArgsAll != null && typeArgsAll.Count == agg.GetTypeVarsAll().Count);
126
Debug.
Assert
(cvarOuter <= typeArgsAll.Count);
145
Debug.
Assert
(pPointer.ReferentType == baseType);
174
Debug.
Assert
(pParamModifier.ParameterType == paramType);
184
Debug.
Assert
(typeSrc != null);
191
Debug.
Assert
(typeSrc != null);
298
Debug.
Assert
(tvs.GetIndexInOwnParameters() == tvs.GetIndexInTotalParameters());
301
Debug.
Assert
(pctx.MethodTypes != null);
317
Debug.
Assert
(typeDst.Equals(SubstType(typeSrc, typeArgsCls, typeArgsMeth, denormMeth)));
378
Debug.
Assert
(typeDst.TypeKind != typeSrc.TypeKind);
413
Debug.
Assert
(atsSrc.TypeArgsAll.Count == atsDst.TypeArgsAll.Count);
434
Debug.
Assert
(typeDst != typeSrc);
438
Debug.
Assert
(tvs.GetIndexInOwnParameters() == index);
439
Debug.
Assert
(tvs.GetIndexInTotalParameters() < pctx.MethodTypes.Length);
447
Debug.
Assert
(index < pctx.ClassTypes.Length);
474
Debug.
Assert
(typeFind.TypeKind != type.TypeKind);
578
Debug.
Assert
(pSymbol.GetTypeParameterType() == null); // Should have been checked first before creating
595
Debug.
Assert
(typeSrc != null);
596
Debug.
Assert
(!(typeSrc is ParameterModifierType));
597
Debug.
Assert
(!(typeSrc is PointerType));
606
Debug.
Assert
(!(typeSrc is VoidType) && !(typeSrc is TypeParameterType));
617
Debug.
Assert
(CSemanticChecker.CheckTypeAccess(typeDst, context));
648
Debug.
Assert
(CSemanticChecker.CheckTypeAccess(typeDst, context));
657
Debug.
Assert
(typeSrc is NullableType);
666
Debug.
Assert
(typeSrc != null);
667
Debug.
Assert
(typeSrc.IsInterfaceType || typeSrc.IsDelegateType);
720
Debug.
Assert
(CSemanticChecker.CheckTypeAccess(typeDst, context));
727
Debug.
Assert
(typeSrc != null);
740
Debug.
Assert
(CSemanticChecker.CheckTypeAccess(typeDst, context));
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeParameterType.cs (1)
19
Debug.
Assert
(symbol.GetTypeParameterType() == null);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs (5)
77
Debug.
Assert
(LookupAggregate(aggregate, outer, args) == null);
92
Debug.
Assert
(LookupArray(elementType, rankNum) == null);
106
Debug.
Assert
(LookupParameterModifier(elementType, isOut) == null);
118
Debug.
Assert
(LookupPointer(elementType) == null);
130
Debug.
Assert
(LookupNullable(underlyingType) == null);
Microsoft\CSharp\RuntimeBinder\Semantics\UnaOpSig.cs (5)
44
Debug.
Assert
(type != null);
61
Debug.
Assert
(pt != PredefinedType.PT_UNDEFINEDINDEX);
72
Debug.
Assert
((_grflt & LiftFlags.Lift2) == 0);
73
Debug.
Assert
((_grflt & LiftFlags.Convert2) == 0);
79
Debug.
Assert
(((_grflt & LiftFlags.Lift1) == 0) || ((_grflt & LiftFlags.Convert1) == 0));
Microsoft\CSharp\RuntimeBinder\Semantics\WithType.cs (2)
131
Debug.
Assert
(ats == null || sym.parent == ats.OwningAggregate);
225
Debug.
Assert
(ats == null || mps != null && mps.getClass() == ats.OwningAggregate);
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (25)
140
Debug.
Assert
(!s_namesLoadedForEachType.Contains(key));
210
Debug.
Assert
(addedField == null);
407
Debug.
Assert
(t1.IsGenericParameter && t2.IsGenericParameter);
457
Debug.
Assert
(t.IsGenericParameter);
524
Debug.
Assert
((agg != null && bIsAggregate) || (meth != null && !bIsAggregate));
611
Debug.
Assert
(!(ctype is AggregateType));
629
Debug.
Assert
(i + 1 < declarationChain.Count);
634
Debug.
Assert
(o is string);
657
Debug.
Assert
(meth != null);
694
Debug.
Assert
(agg != null);
755
Debug.
Assert
(!bAdded);
759
Debug.
Assert
(bAdded);
811
Debug.
Assert
(types != null);
823
Debug.
Assert
(t != null);
916
Debug.
Assert
(type.IsPublic || type.IsNestedPublic);
1058
Debug.
Assert
(fieldInfo.IsFamilyAndAssembly);
1083
Debug.
Assert
(ev.AssociatedEventInfo == eventInfo);
1108
Debug.
Assert
(ev.methAdd != null || ev.methRemove != null);
1339
Debug.
Assert
(method != null || member is ConstructorInfo);
1397
Debug.
Assert
(member.IsFamilyAndAssembly);
1511
Debug.
Assert
(Type.GetTypeCode(defValue.GetType()) != TypeCode.Decimal); // Handled above
1697
Debug.
Assert
(baseMethod != null);
1710
Debug.
Assert
(t is AggregateType);
1712
Debug.
Assert
(aggregate != null);
1787
Debug.
Assert
(t is AggregateType);
Microsoft\CSharp\RuntimeBinder\Syntax\NameManager.cs (3)
161
Debug.
Assert
(key != null);
162
Debug.
Assert
(key.Length >= length);
168
Debug.
Assert
(id < PredefinedName.PN_COUNT);
Microsoft\CSharp\RuntimeBinder\Syntax\NameTable.cs (6)
67
Debug.
Assert
(Array.TrueForAll(_entries, e => e?.Name.Text != name.Text));
94
Debug.
Assert
(key != null);
95
Debug.
Assert
(length <= key.Length);
115
Debug.
Assert
(candidate != null);
116
Debug.
Assert
(key != null);
117
Debug.
Assert
(length <= key.Length);
Microsoft.DotNet.ApiCompat (12)
DifferenceWriter.cs (1)
69
Debug.
Assert
(_differences.Count == 0);
NamespaceRemappingComparer.cs (3)
39
Debug.
Assert
(name != null);
88
Debug.
Assert
(name != null);
102
Debug.
Assert
(!String.IsNullOrEmpty(mappingFile));
Rules\Compat\CannotAddAttributes.cs (1)
73
Debug.
Assert
(implMethod.ParameterCount == contractMethod.ParameterCount);
Rules\Compat\DelegatesMustMatch.cs (2)
30
Debug.
Assert
(implMethod != null && contractMethod != null);
61
Debug.
Assert
(paramCount == contractMethod.ParameterCount);
Rules\Compat\EnumValuesMustMatch.cs (1)
25
Debug.
Assert
(implField != null || contractField != null);
Rules\Compat\ParameterModifiersCannotChange.cs (1)
40
Debug.
Assert
(paramCount == contractMethod.ParameterCount);
Rules\Compat\ParameterNamesCannotChange.cs (1)
34
Debug.
Assert
(paramCount == contractMethod.ParameterCount);
Rules\InheritanceHierarchyChangeTracker.cs (2)
51
Debug.
Assert
(_typeComparer != null);
103
Debug.
Assert
(baseClasses != null);
Microsoft.DotNet.ArcadeLogging (4)
MessageBuilder.cs (4)
24
Debug.
Assert
(_state == State.NotStarted || _state == State.Finished);
32
Debug.
Assert
(_state == State.Properties);
43
Debug.
Assert
(_state == State.Properties);
55
Debug.
Assert
(_state == State.Finished);
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\GetPkgDefAssemblyDependencyGuid.cs (1)
63
Debug.
Assert
(reducedHash.Length == targetBlockSize);
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\DiffUtil.cs (2)
198
Debug.
Assert
(lengthA >= 0 && lengthB >= 0);
212
Debug.
Assert
(lcsLength <= max);
Microsoft.DotNet.Open.Api.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
47
Debug.
Assert
(tfms.Length > 0);
Microsoft.DotNet.SignTool (21)
src\BatchSignInput.cs (3)
35
Debug.
Assert
(!filesToSign.IsDefault);
36
Debug.
Assert
(zipDataMap != null);
37
Debug.
Assert
(!filesToCopy.IsDefault);
src\ByteSequenceComparer.cs (2)
68
Debug.
Assert
(x != null);
74
Debug.
Assert
(!x.IsDefault);
src\Configuration.cs (8)
112
Debug.
Assert
(tempDir != null);
113
Debug.
Assert
(itemsToSign != null && !itemsToSign.Any(i => i == null));
114
Debug.
Assert
(strongNameInfo != null);
115
Debug.
Assert
(fileSignInfo != null);
208
Debug.
Assert
(!isNested);
298
Debug.
Assert
(parentContainer.FullPath != file.FullPath);
630
Debug.
Assert
(Path.GetExtension(archivePath) == ".zip");
634
Debug.
Assert
(zipFileSignInfo.IsZipContainer());
src\ExplicitCertificateKey.cs (1)
18
Debug.
Assert
(fileName != null);
src\FileSignInfo.cs (3)
101
Debug.
Assert
(pathWithHash.FullPath != null);
102
Debug.
Assert
(!pathWithHash.ContentHash.IsDefault && pathWithHash.ContentHash.Length == 256 / 8);
103
Debug.
Assert
(targetFramework != "");
src\PathWithHash.cs (2)
33
Debug.
Assert
(!contentHash.IsDefault);
34
Debug.
Assert
(fullPath != null);
src\SignedFileContentKey.cs (2)
34
Debug.
Assert
(!contentHash.IsDefault);
35
Debug.
Assert
(fileName != null);
Microsoft.DotNet.SignTool.Tests (1)
StreamUtilities.cs (1)
29
Debug.
Assert
(count > 0);
Microsoft.DotNet.XUnitExtensions (2)
DiscovererHelpers.cs (1)
64
Debug.
Assert
(ctorArgs.Count() >= 2);
Discoverers\ConditionalClassDiscoverer.cs (1)
39
Debug.
Assert
(conditionArguments.Count() == 2);
Microsoft.Extensions.ApiDescription.Client.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
47
Debug.
Assert
(tfms.Length > 0);
Microsoft.Extensions.Caching.Hybrid (13)
Internal\DefaultHybridCache.L2.cs (1)
86
Debug.
Assert
(buffer.Array is not null);
Internal\DefaultHybridCache.Stampede.cs (1)
100
Debug.
Assert
(existingType != newType);
Internal\DefaultHybridCache.StampedeStateT.cs (6)
35
Debug.
Assert
(_underlying is null);
36
Debug.
Assert
(underlying is not null);
52
Debug.
Assert
(_underlying is null);
53
Debug.
Assert
(underlying is not null);
126
Debug.
Assert
(_result is not null);
272
Debug.
Assert
(ReferenceEquals(first, stampede.Task));
Internal\RecyclableArrayBufferWriter.cs (5)
50
Debug.
Assert
(obj._index == 0);
137
Debug.
Assert
(_buffer.Length > _index);
144
Debug.
Assert
(_buffer.Length > _index);
176
Debug.
Assert
(needed > currentLength);
196
Debug.
Assert
(FreeCapacity > 0 && FreeCapacity >= sizeHint);
Microsoft.Extensions.Caching.Memory (1)
CacheEntry.CacheEntryTokens.cs (1)
116
Debug.
Assert
(entry._tokens != null);
Microsoft.Extensions.Caching.MicroBenchmarks (5)
src\Caching\Hybrid\src\Internal\RecyclableArrayBufferWriter.cs (5)
50
Debug.
Assert
(obj._index == 0);
137
Debug.
Assert
(_buffer.Length > _index);
144
Debug.
Assert
(_buffer.Length > _index);
176
Debug.
Assert
(needed > currentLength);
196
Debug.
Assert
(FreeCapacity > 0 && FreeCapacity >= sizeHint);
Microsoft.Extensions.Caching.StackExchangeRedis (8)
RedisCache.cs (8)
215
Debug.
Assert
(cache is not null);
279
Debug.
Assert
(_cache is not null);
302
Debug.
Assert
(_cache is not null);
319
Debug.
Assert
(_cache is not null);
346
Debug.
Assert
(_cache is not null);
428
Debug.
Assert
(cache is not null);
483
Debug.
Assert
(cache is not null);
747
Debug.
Assert
(cache is not null);
Microsoft.Extensions.Configuration (5)
ConfigurationProvider.cs (2)
76
Debug.
Assert
(ConfigurationPath.KeyDelimiter == ":");
98
Debug.
Assert
(ConfigurationPath.KeyDelimiter == ":");
ReferenceCountedProviders.cs (3)
48
Debug.
Assert
(_refCount > 0);
53
Debug.
Assert
(_refCount > 0);
63
Debug.
Assert
(_refCount > 0);
Microsoft.Extensions.Configuration.Binder (9)
BindingPoint.cs (2)
60
Debug.
Assert
(!IsReadOnly);
61
Debug.
Assert
(!_valueSet);
ConfigurationBinder.cs (7)
408
Debug.
Assert
(bindingPoint.Value is not null);
451
Debug.
Assert
(!type.IsArray);
611
Debug.
Assert
(source is not null);
612
Debug.
Assert
(addMethod is not null);
633
Debug.
Assert
(dictionaryType.IsGenericType &&
829
Debug.
Assert
(source is not null);
830
Debug.
Assert
(addMethod is not null);
Microsoft.Extensions.Configuration.Json (1)
JsonConfigurationFileParser.cs (1)
83
Debug.
Assert
(_paths.Count > 0);
Microsoft.Extensions.DependencyInjection (8)
ServiceLookup\CallSiteFactory.cs (7)
72
Debug.
Assert
(implementationType != null);
105
Debug.
Assert
(serviceTypeGenericArguments.Length == implementationTypeGenericArguments.Length);
301
Debug.
Assert
(callSite != null);
554
Debug.
Assert
(parameterCallSites != null);
726
Debug.
Assert
(_item != null);
737
Debug.
Assert
(_items == null);
787
Debug.
Assert
(_items == null);
ServiceProvider.cs (1)
180
System.Diagnostics.Debug.
Assert
(result is null || CallSiteFactory.IsService(serviceIdentifier));
Microsoft.Extensions.DependencyInjection.Abstractions (10)
ActivatorUtilities.cs (8)
133
Debug.
Assert
(!constructor.IsPreferred);
596
Debug.
Assert
(false);
626
Debug.
Assert
(parameterMap != null);
679
Debug.
Assert
(parameterMap != null);
932
Debug.
Assert
(parameters.Length >= 1 && parameters.Length <= FixedArgumentThreshold);
933
Debug.
Assert
(FixedArgumentThreshold == 4);
991
Debug.
Assert
(parameters.Length >= 1 && parameters.Length <= FixedArgumentThreshold);
992
Debug.
Assert
(FixedArgumentThreshold == 4);
ServiceDescriptor.cs (2)
308
Debug.
Assert
(typeArguments.Length == 2);
327
Debug.
Assert
(typeArguments.Length == 3);
Microsoft.Extensions.DependencyModel (14)
DependencyContextJsonReader.cs (1)
81
Debug.
Assert
(rented.Length >= utf8Bom.Length);
DependencyContextLoader.cs (1)
93
Debug.
Assert
(_fileSystem.File.Exists(location));
DependencyContextWriter.cs (7)
159
Debug.
Assert
(compilationLibrary.Serviceable == runtimeLibrary.Serviceable);
160
Debug.
Assert
(compilationLibrary.Version == runtimeLibrary.Version);
161
Debug.
Assert
(compilationLibrary.Hash == runtimeLibrary.Hash);
162
Debug.
Assert
(compilationLibrary.Type == runtimeLibrary.Type);
163
Debug.
Assert
(compilationLibrary.Path == runtimeLibrary.Path);
164
Debug.
Assert
(compilationLibrary.HashPath == runtimeLibrary.HashPath);
165
Debug.
Assert
(compilationLibrary.RuntimeStoreManifestName == null);
Resolution\AppBaseCompilationAssemblyResolver.cs (1)
85
Debug.
Assert
(sharedDirectory != null);
Utf8JsonReaderExtensions.cs (4)
91
Debug.
Assert
(reader.IsTokenTypeProperty());
101
Debug.
Assert
(!reader.IsTokenTypeProperty());
107
Debug.
Assert
(reader.IsTokenTypeProperty());
122
Debug.
Assert
(reader.IsTokenTypeProperty());
Microsoft.Extensions.Diagnostics (7)
Metrics\DebugConsoleMetricListener.cs (2)
44
Debug.
Assert
(userState == this);
63
Debug.
Assert
(state == this);
Metrics\DefaultMeterFactory.cs (1)
30
Debug.
Assert
(options.Name is not null);
src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (4)
141
Debug.
Assert
(index >= 0);
142
Debug.
Assert
(index < _maxIndex);
152
Debug.
Assert
(index >= 0);
153
Debug.
Assert
(index < _maxIndex);
Microsoft.Extensions.FileProviders.Embedded (1)
Manifest\EmbeddedFilesManifest.cs (1)
65
Debug.
Assert
(path.Length > 0);
Microsoft.Extensions.FileProviders.Physical (5)
Internal\FileSystemInfoHelper.cs (1)
51
Debug.
Assert
(fileInfo.Exists);
PhysicalFileProvider.cs (1)
153
Debug.
Assert
(!_fileWatcherInitialized);
PhysicalFilesWatcher.cs (1)
469
Debug.
Assert
(state != null);
PollingWildCardChangeToken.cs (2)
160
Debug.
Assert
(previousHash.Length == currentHash.Length);
176
Debug.
Assert
(_byteBuffer.Length > sizeof(long));
Microsoft.Extensions.Hosting (2)
Internal\ConsoleLifetime.netcoreapp.cs (1)
26
Debug.
Assert
(context.Signal == PosixSignal.SIGINT || context.Signal == PosixSignal.SIGQUIT || context.Signal == PosixSignal.SIGTERM);
Internal\ServiceFactoryAdapter.cs (1)
36
Debug.
Assert
(_factoryResolver != null && _contextResolver != null);
Microsoft.Extensions.Hosting.Systemd (1)
SystemdLifetime.netcoreapp.cs (1)
23
Debug.
Assert
(context.Signal == PosixSignal.SIGTERM);
Microsoft.Extensions.Hosting.WindowsServices (3)
WindowsServiceLifetimeHostBuilderExtensions.cs (3)
110
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
116
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
137
Debug.
Assert
(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Microsoft.Extensions.Http (5)
ActiveHandlerTrackingEntry.cs (3)
61
Debug.
Assert
(Lifetime != Timeout.InfiniteTimeSpan);
78
Debug.
Assert
(_callback != null);
79
Debug.
Assert
(_timer != null);
DependencyInjection\DefaultHttpClientBuilder.cs (1)
15
Debug.
Assert
(tracker != null);
DependencyInjection\HttpClientBuilderExtensions.cs (1)
657
Debug.
Assert
(registry != null);
Microsoft.Extensions.Identity.Core (2)
DefaultPersonalDataProtector.cs (1)
36
Debug.
Assert
(data != null);
Rfc6238AuthenticationService.cs (1)
61
Debug.
Assert
(offset + 4 < hash.Length);
Microsoft.Extensions.Logging (4)
LoggerFactoryScopeProvider.cs (2)
139
Debug.
Assert
(activity != null);
140
Debug.
Assert
(activityTrackingOption != ActivityTrackingOptions.None);
LoggerInformation.cs (1)
67
Debug.
Assert
(Logger != null);
src\libraries\Common\src\Extensions\ProviderAliasUtilities\ProviderAliasUtilities.cs (1)
27
Debug.
Assert
(arg.ArgumentType == typeof(string));
Microsoft.Extensions.Logging.Abstractions (5)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
Microsoft.Extensions.Logging.AzureAppServices (1)
BlobLoggerProvider.cs (1)
81
System.Diagnostics.Debug.
Assert
(tryGetBuffer);
Microsoft.Extensions.Logging.Configuration (1)
src\libraries\Common\src\Extensions\ProviderAliasUtilities\ProviderAliasUtilities.cs (1)
27
Debug.
Assert
(arg.ArgumentType == typeof(string));
Microsoft.Extensions.Logging.Console (23)
ConsoleLoggerProcessor.cs (2)
122
Debug.
Assert
(FullMode == ConsoleLoggerQueueFullMode.Wait);
128
Debug.
Assert
(_messageQueue.Count < MaxQueueLength);
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (21)
32
Debug.
Assert
(MaximumBufferSize == Array.MaxLength);
38
Debug.
Assert
(initialCapacity > 0);
48
Debug.
Assert
(_rentedBuffer != null);
49
Debug.
Assert
(_index <= _rentedBuffer.Length);
58
Debug.
Assert
(_rentedBuffer != null);
67
Debug.
Assert
(_rentedBuffer != null);
76
Debug.
Assert
(_rentedBuffer != null);
88
Debug.
Assert
(_rentedBuffer != null);
98
Debug.
Assert
(_rentedBuffer != null);
99
Debug.
Assert
(_index <= _rentedBuffer.Length);
121
Debug.
Assert
(initialCapacity > 0);
122
Debug.
Assert
(_rentedBuffer is null);
132
Debug.
Assert
(_rentedBuffer != null);
133
Debug.
Assert
(count >= 0);
134
Debug.
Assert
(_index <= _rentedBuffer.Length - count);
176
Debug.
Assert
(_rentedBuffer != null);
177
Debug.
Assert
(sizeHint > 0);
208
Debug.
Assert
(oldBuffer.Length >= _index);
209
Debug.
Assert
(_rentedBuffer.Length >= _index);
217
Debug.
Assert
(_rentedBuffer.Length - _index > 0);
218
Debug.
Assert
(_rentedBuffer.Length - _index >= sizeHint);
Microsoft.Extensions.Logging.EventSource (1)
LoggingEventSource.cs (1)
510
Debug.
Assert
(pinnedString == rePinnedString);
Microsoft.Extensions.Logging.Generators (11)
LoggerMessageGenerator.Parser.cs (1)
740
Debug.
Assert
(searchedBrace is '{' or '}');
src\libraries\Common\src\Roslyn\CSharpSyntaxHelper.cs (1)
42
Debug.
Assert
(container != null);
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs (2)
109
Debug.
Assert
(lastDotIndex > 0);
124
Debug.
Assert
(syntaxNodes.All(n => n.SyntaxTree == syntaxTree));
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs (2)
161
Debug.
Assert
(compilationUnit is ICompilationUnitSyntax);
198
Debug.
Assert
(compilationUnit is ICompilationUnitSyntax);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (5)
28
Debug.
Assert
(value >= 0);
29
Debug.
Assert
(value <= _span.Length);
38
Debug.
Assert
(index < _pos);
106
Debug.
Assert
(length >= 0);
134
Debug.
Assert
(_pos == _span.Length);
Microsoft.Extensions.Options.DataAnnotations (2)
DataAnnotationValidateOptions.cs (2)
67
Debug.
Assert
(errors is not null && errors.Count > 0);
76
Debug.
Assert
(options is not null);
Microsoft.Extensions.Primitives (4)
CompositeChangeToken.cs (2)
124
Debug.
Assert
(state != null);
149
Debug.
Assert
(disposables != null);
StringSegment.cs (1)
108
Debug.
Assert
(Buffer is not null);
StringValues.cs (1)
192
Debug.
Assert
(value is string[]);
Microsoft.Extensions.SecretManager.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
47
Debug.
Assert
(tfms.Length > 0);
Microsoft.Interop.ComInterfaceGenerator (10)
ComInterfaceContext.cs (1)
65
Debug.
Assert
(baseContext.HasValue);
ComMethodInfo.cs (1)
75
Debug.
Assert
(method is { IsStatic: false, MethodKind: MethodKind.Ordinary });
GeneratedComInterfaceAttributeData.cs (2)
56
Debug.
Assert
(found);
62
Debug.
Assert
(attr.AttributeClass.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute);
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (2)
51
Debug.
Assert
(info.MarshallingAttributeInfo is ManagedHResultExceptionMarshallingInfo);
79
Debug.
Assert
(info.MarshallingAttributeInfo is ManagedHResultExceptionMarshallingInfo);
Marshallers\ObjectUnwrapperResolver.cs (1)
25
Debug.
Assert
(info.MarshallingAttributeInfo is ObjectUnwrapperInfo);
UnmanagedToManagedStubGenerator.cs (1)
54
Debug.
Assert
(statements.CleanupCalleeAllocated.IsEmpty);
VirtualMethodPointerStubGenerator.cs (1)
39
Debug.
Assert
(methodStub.TypeKeyOwner.Syntax is NameSyntax);
VtableIndexStubGenerator.cs (1)
231
Debug.
Assert
(virtualMethodIndexAttr is not null);
Microsoft.Interop.JavaScript.JSImportGenerator (3)
JSExportGenerator.cs (1)
182
Debug.
Assert
(jsExportAttr is not null);
JSGeneratorFactory.cs (1)
18
Debug.
Assert
(context != null);
JSImportGenerator.cs (1)
167
Debug.
Assert
(jsImportAttr is not null);
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (2)
259
Debug.
Assert
(generatedDllImportAttr is not null);
499
Debug.
Assert
(target.StringMarshalling == StringMarshalling.Utf16);
Microsoft.Interop.SourceGeneration (13)
BoundGenerators.cs (3)
41
Debug.
Assert
(managedExceptionInfo == null);
53
Debug.
Assert
(managedReturnMarshaller == defaultBoundGenerator);
58
Debug.
Assert
(nativeReturnMarshaller == defaultBoundGenerator);
DiagnosticOr.cs (3)
99
Debug.
Assert
(value is not null);
108
Debug.
Assert
(value is not null);
109
Debug.
Assert
(diagnostics is not null);
ManagedToNativeStubCodeContext.cs (1)
47
Debug.
Assert
(info.ManagedIndex == TypePositionInfo.UnsetIndex);
Marshalling\BoolMarshaller.cs (1)
31
Debug.
Assert
(info.ManagedType is SpecialTypeInfo(_, _, SpecialType.System_Boolean));
Marshalling\ByValueContentsMarshalKindValidator.cs (1)
38
Debug.
Assert
(support == ByValueMarshalKindSupport.Supported || diagnostic is not null);
Marshalling\ByValueMarshalKindSupportDescriptor.cs (1)
92
Debug.
Assert
(marshalKind is ByValueContentsMarshalKind.Default);
Marshalling\CharMarshaller.cs (1)
38
Debug.
Assert
(info.ManagedType is SpecialTypeInfo(_, _, SpecialType.System_Char));
MarshalUsingAttributeParser.cs (1)
30
Debug.
Assert
(attributeData.AttributeClass!.ToDisplayString() == TypeNames.MarshalUsingAttribute);
NativeMarshallingAttributeParser.cs (1)
24
Debug.
Assert
(attributeData.AttributeClass!.ToDisplayString() == TypeNames.NativeMarshallingAttribute);
Microsoft.JSInterop (3)
Infrastructure\DotNetDispatcher.cs (1)
227
Debug.
Assert
(count == receivedBytes);
JSRuntime.cs (1)
317
Debug.
Assert
(dotNetObjectReference.ObjectId != 0);
src\Components\Shared\src\ArrayBuilder.cs (1)
180
Debug.
Assert
(newCapacity > _items.Length);
Microsoft.JSInterop.Tests (2)
JSRuntimeTest.cs (2)
144
Debug.
Assert
(poco != null);
167
Debug.
Assert
(poco != null);
Microsoft.Net.Http.Headers (1)
SetCookieHeaderValue.cs (1)
269
Debug.
Assert
(formatted);
Microsoft.VisualBasic.Core (48)
Microsoft\VisualBasic\Collection.vb (6)
78
Debug.
Assert
(BeforeNode IsNot Nothing)
93
Debug.
Assert
(AfterNode IsNot Nothing)
156
Debug.
Assert
(node IsNot Nothing)
170
Debug.
Assert
(node Is Nothing)
213
Debug.
Assert
(node IsNot Nothing)
337
Debug.
Assert
(CultureInfo IsNot Nothing)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (2)
293
Debug.
Assert
(OperatingSystem.IsWindows())
851
Debug.
Assert
(False)
Microsoft\VisualBasic\CompilerServices\Operators.vb (12)
148
Debug.
Assert
(comparison = CompareClass.Less OrElse
167
Debug.
Assert
(comparison = CompareClass.Less OrElse
186
Debug.
Assert
(comparison = CompareClass.Less OrElse
205
Debug.
Assert
(comparison = CompareClass.Less OrElse
224
Debug.
Assert
(comparison = CompareClass.Less OrElse
243
Debug.
Assert
(comparison = CompareClass.Less OrElse
262
Debug.
Assert
(comparison = CompareClass.Less OrElse
281
Debug.
Assert
(comparison = CompareClass.Less OrElse
300
Debug.
Assert
(comparison = CompareClass.Less OrElse
319
Debug.
Assert
(comparison = CompareClass.Less OrElse
338
Debug.
Assert
(comparison = CompareClass.Less OrElse
357
Debug.
Assert
(comparison = CompareClass.Less OrElse
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (1)
1348
Debug.
Assert
(parameter IsNot Nothing AndAlso parameterType IsNot Nothing)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
1393
Debug.
Assert
(rawMethod IsNot Nothing)
Microsoft\VisualBasic\CompilerServices\Utils.vb (2)
261
Debug.
Assert
(Not (TypeOf member1 Is MethodBase) OrElse
323
Debug.
Assert
(typeParam.IsGenericParameter)
Microsoft\VisualBasic\CompilerServices\VB6BinaryFile.vb (1)
184
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
Microsoft\VisualBasic\CompilerServices\VB6File.vb (13)
672
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
1026
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
1037
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
1049
Diagnostics.Debug.
Assert
(ByteLength <= lengthToWrite)
1057
Diagnostics.Debug.
Assert
(m_Encoding.GetByteCount(s) = lengthToWrite)
1070
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
1090
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
1108
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
1852
Debug.
Assert
(m_Encoding.GetByteCount(sTemp) = ByteLength)
1859
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
1867
Debug.
Assert
(m_Encoding.GetByteCount(sTemp) = FixedStringLength)
1877
Debug.
Assert
(ByteLength <= FixedStringLength)
1891
Debug.
Assert
(ByteLength = m_Encoding.GetByteCount(sTemp) AndAlso ByteLength <= FixedStringLength)
Microsoft\VisualBasic\CompilerServices\VB6InputFile.vb (1)
60
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
Microsoft\VisualBasic\CompilerServices\VB6OutputFile.vb (2)
86
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
108
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (1)
417
Diagnostics.Debug.
Assert
(Not m_Encoding Is Nothing)
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (1)
1060
Diagnostics.Debug.
Assert
(AmbiguousCount > 0)
Microsoft\VisualBasic\FileIO\FileSystem.vb (3)
1313
Debug.
Assert
(ByteCount <= ByteBuffer.Length)
1600
Debug.
Assert
([Enum].IsDefined(Operation))
1601
Debug.
Assert
([Enum].IsDefined(TargetType))
Microsoft\VisualBasic\Helpers\ForEachEnum.vb (2)
69
Debug.
Assert
(Not mAtBeginning)
80
Debug.
Assert
(mNext Is Nothing)
MSBuild (8)
CoreCLRAssemblyLoader.cs (1)
51
Debug.
Assert
(Path.IsPathRooted(fullPath));
FileUtilities.cs (2)
721
Debug.
Assert
(allowedExtensions?.Length > 0);
729
Debug.
Assert
(!String.IsNullOrEmpty(extension) && extension[0] == '.');
WindowsFileSystem.cs (2)
128
Debug.
Assert
(hr != WindowsNative.ErrorFileNotFound);
190
Debug.
Assert
(hr != WindowsNative.ErrorSuccess);
WindowsNative.cs (3)
158
Debug.
Assert
(Status == EnumerateDirectoryStatus.UnknownError);
168
Debug.
Assert
(Status != EnumerateDirectoryStatus.UnknownError &&
178
Debug.
Assert
(Status != EnumerateDirectoryStatus.Success);
MSBuildTaskHost (14)
Concurrent\ConcurrentDictionary.cs (10)
128
Debug.
Assert
(_comparer.GetHashCode(key) == hashcode);
162
Debug.
Assert
(_comparer.GetHashCode(key) == hashcode);
191
Debug.
Assert
((prev == null && node == tables._buckets[bucketNo]) || prev._next == node);
374
Debug.
Assert
(newLength % 2 != 0);
458
Debug.
Assert
(bucketNo >= 0 && bucketNo < bucketCount);
470
Debug.
Assert
(bucketNo >= 0 && bucketNo < bucketCount);
471
Debug.
Assert
(lockNo >= 0 && lockNo < lockCount);
487
Debug.
Assert
(locksAcquired == _tables._locks.Length);
497
Debug.
Assert
(fromInclusive <= toExclusive);
522
Debug.
Assert
(fromInclusive <= toExclusive);
Concurrent\ConcurrentQueue.cs (2)
167
Debug.
Assert
(head._frozenForEnqueues);
231
Debug.
Assert
(next == s._nextSegment);
FileUtilities.cs (2)
721
Debug.
Assert
(allowedExtensions?.Length > 0);
729
Debug.
Assert
(!String.IsNullOrEmpty(extension) && extension[0] == '.');
PresentationBuildTasks (88)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (4)
195
Debug.
Assert
(targetOutputs.ContainsKey(CompileTargetName));
196
Debug.
Assert
(targetOutputs[CompileTargetName].Length == 1);
310
Debug.
Assert
(targetOutputs.ContainsKey(CompileTargetName));
311
Debug.
Assert
(targetOutputs[CompileTargetName].Length == 1);
MS\Internal\MarkupCompiler\MarkupCompiler.cs (26)
266
Debug.
Assert
(!cu.Pass2);
288
Debug.
Assert
(!cu.Pass2);
299
Debug.
Assert
(!cu.Pass2 || _pendingLocalFiles == null);
300
Debug.
Assert
(_pendingLocalFiles == null || _pendingLocalFiles.Count == 0);
587
Debug.
Assert
(_codeContexts.Count == 0);
959
Debug.
Assert
(_ccRoot.StyleConnectorFn.Statements.Count > 0);
961
Debug.
Assert
(ccsConnector != null);
1830
Debug.
Assert
(desc != null);
1905
Debug.
Assert
(pis != null && pis.Length == 2 && KnownTypes.Types[(int)KnownElements.DependencyObject].IsAssignableFrom(pis[0].ParameterType));
2032
Debug.
Assert
(_ccRoot != null && _ccRoot.SubClass.Length > 0);
2105
Debug.
Assert
(CompilerInfo != null && CompilerInfo.IsCodeDomProviderTypeValid);
2305
Debug.
Assert
(genericName.Length > 0 || t.IsGenericTypeDefinition);
2309
Debug.
Assert
(genericName.Length == 0 && typeArgsList != null);
2395
Debug.
Assert
(typeArgsList != null && typeArgsList.Length == refTypeParams.Length);
2460
Debug.
Assert
(_typeArgsList == null || (baseClass.IsGenericType && baseClass.IsGenericTypeDefinition));
2461
Debug.
Assert
(_typeArgsList != null || !baseClass.IsGenericType);
2528
Debug.
Assert
(!string.IsNullOrEmpty(baseName));
2534
Debug.
Assert
(_ccRoot == null);
3000
Debug.
Assert
(_ccRoot != null);
3049
Debug.
Assert
(cc != null);
3053
Debug.
Assert
(_ccRoot == (cc as CodeContextRoot));
3054
Debug.
Assert
(_ccRoot.CodeClass != null);
3078
Debug.
Assert
(_ccRoot.HookupFn == null);
3132
Debug.
Assert
(_ccRoot == (_codeContexts.Peek() as CodeContextRoot));
3133
Debug.
Assert
(_ccRoot.ElementType == null ||
3157
Debug.
Assert
(_ccRoot == (_codeContexts.Peek() as CodeContextRoot));
MS\Internal\MarkupCompiler\ParserExtension.cs (1)
907
Debug.
Assert
(bamlMemStream != null);
MS\Internal\MarkupCompiler\PathInternal.cs (1)
62
Debug.
Assert
(comparisonType == StringComparison.Ordinal || comparisonType == StringComparison.OrdinalIgnoreCase);
MS\Internal\MarkupCompiler\VersionHelper.cs (2)
62
Debug.
Assert
(!allowWildcard || maxValue < ushort.MaxValue);
200
Debug.
Assert
(revision < ushort.MaxValue);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\MS\Internal\Globalization\LocalizationComments.cs (1)
355
Debug.
Assert
(enumPrefix != null && enumNames != null);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlMapTable.cs (8)
72
Debug.
Assert
(null != xamlTypeMapper);
158
Debug.
Assert
(cmp > 0);
1058
Debug.
Assert
(bamlAssemblyInfoRecord.AssemblyId >= 0);
1094
Debug.
Assert
(
1106
Debug.
Assert
(bamlAssemblyInfoRecord.AssemblyId >= 0);
1286
Debug.
Assert
(ownerTypeName != null);
1287
Debug.
Assert
(attributeName != null);
1504
Debug.
Assert
(targetType != null && memberName != null);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (7)
778
Debug.
Assert
(null == _writeCache[(int)record.RecordType]);
915
Debug.
Assert
( value <= 3 && value >= 0 );
1103
Debug.
Assert
(RecordSize < 0);
2399
Debug.
Assert
(value <= ExtensionIdMask);
4555
Debug.
Assert
( SerializerTypeId != 0 );
4728
Debug.
Assert
(arr.Length == 3 && arr[0] != null && arr[1] != null);
4771
Debug.
Assert
(arr.Length == 3 && arr[0] != null && arr[1] != null);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (10)
137
Debug.
Assert
(null != DocumentStartRecord);
408
Debug.
Assert
(_deferElementDepth == 0);
409
Debug.
Assert
(_deferComplexPropertyDepth == 0);
410
Debug.
Assert
(_staticResourceElementDepth == 0);
411
Debug.
Assert
(_dynamicResourceElementDepth == 0);
412
Debug.
Assert
(_staticResourceRecordList == null);
430
Debug.
Assert
(_staticResourceElementDepth == 0);
881
Debug.
Assert
(_deferElementDepth == 2);
1070
Debug.
Assert
(extensionTypeId != (short)KnownElements.TypeExtension);
1087
Debug.
Assert
(typeValue != null);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (2)
1189
Debug.
Assert
(sb.Length > 0);
1190
Debug.
Assert
(!Char.IsWhiteSpace(sb[0]));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleXamlParser.cs (2)
510
Debug.
Assert
(_inEventSetter);
1225
Debug.
Assert
(!xamlClrEventNode.IsTemplateEvent && _inEventSetter);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (3)
567
Debug.
Assert
(_setterOrTriggerValueNode != null);
1340
Debug.
Assert
(_styleModeStack.Mode == StyleMode.VisualTree);
1350
Debug.
Assert
(!xamlClrEventNode.IsStyleSetterEvent);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (1)
1247
Debug.
Assert
(SkipActionDepthCount == -1);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (13)
370
Debug.
Assert
(null != XmlReader);
1518
Debug.
Assert
( (null==ContentPropertyInfo && null==ContentPropertyName)
2077
Debug.
Assert
(false == endTagHasBeenRead);
2227
Debug.
Assert
(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2236
Debug.
Assert
(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2245
Debug.
Assert
(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2254
Debug.
Assert
(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2263
Debug.
Assert
(IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2272
Debug.
Assert
(attributeFound || !IsElementScopedAttribute(attribName, attribLocalName, attributeNamespaceUri));
2762
Debug.
Assert
(unknownTagName != null || null != parentType);
3709
Debug.
Assert
(typeAndSerializer == null ||
4823
Debug.
Assert
( collectionTypeID >= 0
5504
Debug.
Assert
(currentPos > 0 && currentPos < s.Length - 1);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (3)
2319
Debug.
Assert
(memberName != null);
2322
Debug.
Assert
(memberInfo != null);
2337
Debug.
Assert
(targetType != null);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsDictionary.cs (1)
713
Debug.
Assert
(prefix != null);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\TokenizerHelper.cs (1)
337
Debug.
Assert
(null != numberFormat);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
341
Debug.
Assert
(Scope.ShouldProcessContent(namespaceName, Reader.LocalName));
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlWrappingReader.cs (1)
33
Debug.
Assert
( baseReader != null );
PresentationCore (1617)
MS\Internal\AppModel\CookieHandler.cs (1)
116
Debug.
Assert
(size > 0);
MS\Internal\Automation\EventPropertyMap.cs (1)
115
Debug.
Assert
(properties != null);
MS\Internal\FontCache\FamilyCollection.cs (1)
662
Debug.
Assert
(i == FamilyCount);
MS\Internal\FontCache\FontCacheUtil.cs (1)
60
Debug.
Assert
(stream.Position == 0);
MS\Internal\FontCache\FontResourceCache.cs (3)
63
Debug.
Assert
(uri.IsAbsoluteUri && uri.Scheme == PackUriHelper.UriSchemePack && BaseUriHelper.IsPackApplicationUri(uri));
76
Debug.
Assert
(escapedPath.EndsWith(FakeFileName, StringComparison.OrdinalIgnoreCase));
144
Debug.
Assert
(!folderResourceMap.ContainsKey(resourceFullName));
MS\Internal\FontCache\FontSource.cs (3)
88
Debug.
Assert
(_isInternalCompositeFont || String.IsNullOrEmpty(_fontUri.Fragment));
345
Debug.
Assert
(memoryFontSize <= fileReadBufferSize);
410
Debug.
Assert
(_memoryHandle.IsAllocated);
MS\Internal\FontFace\CompositeFontInfo.cs (3)
218
Debug.
Assert
(IsFamilyMapRangesValid(familyMapRanges));
226
Debug.
Assert
(begin < end && end <= _familyMaps.Count);
254
Debug.
Assert
(count == FirstFamilyMapRange);
MS\Internal\FontFace\PhysicalFontFamily.cs (4)
129
Debug.
Assert
(bestMatch != null);
213
Debug.
Assert
(bestStyleTypeface != null);
341
Debug.
Assert
(advance <= unicodeString.Length);
347
Debug.
Assert
(advance + sizeofChar <= unicodeString.Length);
MS\Internal\FontFace\TypefaceCollection.cs (2)
96
Debug.
Assert
((_family != null && _familyTypefaceCollection == null)|| (_familyTypefaceCollection != null && _family == null));
147
Debug.
Assert
((typefaceCollection._family != null && typefaceCollection._familyTypefaceCollection == null)
MS\Internal\Generic\Span.cs (1)
142
Debug.
Assert
(fc <= first);
MS\Internal\Ink\Bezier.cs (2)
116
Debug.
Assert
(to - from >= 4);
357
Debug.
Assert
(data.Node(to) - data.Node(from) > data.Node(j) - data.Node(from));
MS\Internal\Ink\CuspData.cs (1)
281
Debug.
Assert
(bReverse);
MS\Internal\Ink\EllipticalNodeOperations.cs (9)
28
System.Diagnostics.Debug.
Assert
((nodeShape != null) && nodeShape.IsEllipse);
175
System.Diagnostics.Debug.
Assert
(node.IsEmpty == false);
578
System.Diagnostics.Debug.
Assert
(result.IsEmpty);
616
System.Diagnostics.Debug.
Assert
(DoubleUtil.AreClose(beginRadius, endRadius) == false);
648
System.Diagnostics.Debug.
Assert
(!double.IsNaN(findex));
657
System.Diagnostics.Debug.
Assert
(DoubleUtil.IsBetweenZeroAndOne(x) == false);
659
System.Diagnostics.Debug.
Assert
(!double.IsNaN(findex));
675
System.Diagnostics.Debug.
Assert
(!double.IsNaN(findex));
687
System.Diagnostics.Debug.
Assert
(!double.IsNaN(findex));
MS\Internal\Ink\ErasingStroke.cs (6)
33
System.Diagnostics.Debug.
Assert
(erasingShape != null);
59
System.Diagnostics.Debug.
Assert
((path != null) && (IEnumerablePointHelper.GetCount(path) != 0));
100
System.Diagnostics.Debug.
Assert
(iterator != null);
139
System.Diagnostics.Debug.
Assert
(iterator != null);
140
System.Diagnostics.Debug.
Assert
(intersections != null);
262
System.Diagnostics.Debug.
Assert
(path.Length > 1);
MS\Internal\Ink\ExtendedPropertyCollection.cs (1)
188
System.Diagnostics.Debug.
Assert
(propertyToRemove != null);
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (8)
66
Debug.
Assert
(NativeRecognizer.RecognizerHandleSingleton != null);
368
Debug.
Assert
(recContext != null && !recContext.IsInvalid);
415
Debug.
Assert
(recContext != null && !recContext.IsInvalid);
504
Debug.
Assert
(stylusPoints != null);
505
Debug.
Assert
(propertyGuids.Length == StylusPointDescription.RequiredCountOfProperties);
637
Debug.
Assert
(ApplicationGestureHelper.IsDefined(gesture));
725
Debug.
Assert
(pProps->cbPropertyValue == sizeof(uint) / sizeof(byte));
737
Debug.
Assert
(ApplicationGestureHelper.IsDefined(gesture));
MS\Internal\Ink\InkSerializedFormat\AlgoModule.cs (4)
225
Debug.
Assert
(outputBufferIndex < outputBuffer.Length);
234
Debug.
Assert
(outputBufferIndex < outputBuffer.Length);
286
Debug.
Assert
(countPerItem == 4 || countPerItem == 2 || countPerItem == 1);
347
Debug.
Assert
(countPerItem == 4 || countPerItem == 2 || countPerItem == 1);
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (2)
326
Debug.
Assert
(strm != null);
441
System.Diagnostics.Debug.
Assert
(guid == Guid.Empty);
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (13)
342
System.Diagnostics.Debug.
Assert
(penTip == PenTip.Rectangle);
431
Debug.
Assert
(DrawingAttributes.MaxHeight == DrawingAttributes.MaxWidth &&
460
System.Diagnostics.Debug.
Assert
(compressionAlgorithm == 0);
461
System.Diagnostics.Debug.
Assert
(fTag == true);
463
Debug.
Assert
(stream != null);
489
Debug.
Assert
(bw != null);
495
Debug.
Assert
(bw != null);
515
Debug.
Assert
(bw != null);
528
Debug.
Assert
(bw != null);
546
Debug.
Assert
(bw != null);
615
Debug.
Assert
(bw != null);
669
Debug.
Assert
(bw != null);
680
Debug.
Assert
(bw != null);
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (5)
233
Debug.
Assert
(intReader != null);
234
Debug.
Assert
(shortReader != null);
246
Debug.
Assert
(shortReader != null);
544
Debug.
Assert
(outputBufferIndex < outputBuffer.Length);
561
Debug.
Assert
(outputBufferIndex < outputBuffer.Length);
MS\Internal\Ink\InkSerializedFormat\HuffCodec.cs (9)
96
Debug.
Assert
(input != null);
97
Debug.
Assert
(input.Length >= 2);
98
Debug.
Assert
(startIndex == 1);
99
Debug.
Assert
(outputBuffer != null);
100
Debug.
Assert
(outputBuffer.Length != 0);
112
Debug.
Assert
(outputBufferIndex < outputBuffer.Length);
127
Debug.
Assert
(outputBufferIndex < outputBuffer.Length);
189
Debug.
Assert
(nDataLen > 0 && nDataLen - 1 <= Int32.MaxValue);
193
Debug.
Assert
(nDataLen <= Int32.MaxValue);
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (7)
104
System.Diagnostics.Debug.
Assert
(inkData.Length > isfBase64PrefixLength);
249
Debug.
Assert
(inkdata != null);
308
Debug.
Assert
(inputStream != null);
2112
Debug.
Assert
(data != null);
2499
Debug.
Assert
(sizeOfHeaderInBytes == bytesWritten);
2538
Debug.
Assert
(sizes[i] == bytesWritten);
2738
System.Diagnostics.Debug.
Assert
(strokes != null);
MS\Internal\Ink\InkSerializedFormat\LZCodec.cs (4)
44
Debug.
Assert
(input != null);
45
Debug.
Assert
(input.Length > 1);
46
Debug.
Assert
(inputIndex < input.Length);
47
Debug.
Assert
(inputIndex >= 0);
MS\Internal\Ink\InkSerializedFormat\MultiByteCodec.cs (3)
79
Debug.
Assert
(input != null);
80
Debug.
Assert
(inputIndex < input.Length);
114
Debug.
Assert
(input != null); //already validated at the AlgoModule level
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (1)
967
Debug.
Assert
(stream != null);
MS\Internal\Ink\Lasso.cs (19)
53
System.Diagnostics.Debug.
Assert
(_points != null);
67
System.Diagnostics.Debug.
Assert
(_points != null);
81
System.Diagnostics.Debug.
Assert
(_points != null);
82
System.Diagnostics.Debug.
Assert
((0 <= index) && (index < _points.Count));
94
System.Diagnostics.Debug.
Assert
(null != points);
108
System.Diagnostics.Debug.
Assert
(_points != null);
124
System.Diagnostics.Debug.
Assert
(_points != null);
175
System.Diagnostics.Debug.
Assert
(lassoSegment.Y != 0);
190
System.Diagnostics.Debug.
Assert
(_points != null);
191
System.Diagnostics.Debug.
Assert
(iterator != null);
339
System.Diagnostics.Debug.
Assert
(!crossing.IsEmpty && crossing.StartNode.IsValid && crossing.EndNode.IsValid);
342
System.Diagnostics.Debug.
Assert
(!mcrossing.IsEmpty && mcrossing.StartNode.IsValid && mcrossing.EndNode.IsValid);
349
System.Diagnostics.Debug.
Assert
(!mcrossing.IsEmpty && mcrossing.StartNode.IsValid && mcrossing.EndNode.IsValid);
426
System.Diagnostics.Debug.
Assert
(DoubleUtil.AreClose(si.InBegin, StrokeFIndices.BeforeFirst));
561
System.Diagnostics.Debug.
Assert
(!newFIndices.IsEmpty);
562
System.Diagnostics.Debug.
Assert
(strokeNode.IsValid);
603
System.Diagnostics.Debug.
Assert
(obj is LassoCrossing);
708
System.Diagnostics.Debug.
Assert
(intersection >= 0 && intersection <= points.Count - 2);
811
System.Diagnostics.Debug.
Assert
(hitEnd != hitBegin && orgBegin != orgEnd);
MS\Internal\Ink\Renderer.cs (8)
47
Debug.
Assert
(renderer != null);
434
System.Diagnostics.Debug.
Assert
(sender == _strokes);
484
System.Diagnostics.Debug.
Assert
(_strokes.IndexOf(sender as Stroke) != -1);
535
System.Diagnostics.Debug.
Assert
(_strokes != null);
541
Debug.
Assert
(visual is StrokeVisual);
635
System.Diagnostics.Debug.
Assert
(stroke != null);
644
System.Diagnostics.Debug.
Assert
(stroke != null);
656
System.Diagnostics.Debug.
Assert
(drawingAttributes != null);
MS\Internal\Ink\StrokeFIndices.cs (1)
187
System.Diagnostics.Debug.
Assert
(!double.IsNaN(_beginFIndex) && !double.IsNaN(_endFIndex) && DoubleUtil.LessThan(_beginFIndex, _endFIndex));
MS\Internal\Ink\StrokeIntersection.cs (6)
191
System.Diagnostics.Debug.
Assert
(intersections != null);
192
System.Diagnostics.Debug.
Assert
(intersections.Length > 0);
197
System.Diagnostics.Debug.
Assert
(!intersections[j].IsEmpty);
223
System.Diagnostics.Debug.
Assert
(intersections != null);
224
System.Diagnostics.Debug.
Assert
(intersections.Length > 0);
229
System.Diagnostics.Debug.
Assert
(!intersections[j].IsEmpty);
MS\Internal\Ink\StrokeNode.cs (17)
42
System.Diagnostics.Debug.
Assert
(operations != null);
43
System.Diagnostics.Debug.
Assert
((nodeData.IsEmpty == false) && (index >= 0));
292
Debug.
Assert
(!endNodeRect.Contains(point));
904
System.Diagnostics.Debug.
Assert
(!double.IsNaN(cutAt.BeginFIndex) && !double.IsNaN(cutAt.EndFIndex));
922
System.Diagnostics.Debug.
Assert
(IsValid && (_index >= 0));
929
System.Diagnostics.Debug.
Assert
(fragment.BeginFIndex >= 0 && fragment.BeginFIndex <= 1);
934
System.Diagnostics.Debug.
Assert
(fragment.EndFIndex >= 0 && fragment.EndFIndex <= 1);
953
System.Diagnostics.Debug.
Assert
(IsValid);
965
System.Diagnostics.Debug.
Assert
(DoubleUtil.GreaterThanOrClose(fragment.BeginFIndex, 0f));
967
System.Diagnostics.Debug.
Assert
(DoubleUtil.LessThanOrClose(fragment.BeginFIndex, 1f));
981
System.Diagnostics.Debug.
Assert
(DoubleUtil.GreaterThanOrClose(fragment.EndFIndex, 0f));
983
System.Diagnostics.Debug.
Assert
(DoubleUtil.LessThanOrClose(fragment.EndFIndex, 1f));
1007
System.Diagnostics.Debug.
Assert
(IsValid);
1025
System.Diagnostics.Debug.
Assert
(IsValid);
1043
System.Diagnostics.Debug.
Assert
(IsValid);
1047
System.Diagnostics.Debug.
Assert
(findex == 0);
1051
System.Diagnostics.Debug.
Assert
((findex >= _index - 1) && (findex <= _index));
MS\Internal\Ink\StrokeNodeData.cs (2)
50
System.Diagnostics.Debug.
Assert
(DoubleUtil.GreaterThan((double)pressure, 0d));
61
Debug.
Assert
(DoubleUtil.AreClose(0, s_empty._pressure));
MS\Internal\Ink\StrokeNodeOperations.cs (19)
49
System.Diagnostics.Debug.
Assert
(nodeShape != null);
80
System.Diagnostics.Debug.
Assert
((boundingBox.X <= 0) && (boundingBox.Y <= 0));
126
System.Diagnostics.Debug.
Assert
(node.IsEmpty == false);
324
System.Diagnostics.Debug.
Assert
(DoubleUtil.IsZero(pressureFactor) == false);
375
System.Diagnostics.Debug.
Assert
(count > 0);
401
System.Diagnostics.Debug.
Assert
(count > 0);
423
System.Diagnostics.Debug.
Assert
(count > 0);
484
System.Diagnostics.Debug.
Assert
(DoubleUtil.IsZero(pressureFactor) == false);
625
System.Diagnostics.Debug.
Assert
(findex >= 0 && findex <= 1);
639
System.Diagnostics.Debug.
Assert
(findex >= 0 && findex <= 1);
776
System.Diagnostics.Debug.
Assert
(true == DoubleUtil.IsBetweenZeroAndOne(findex));
964
System.Diagnostics.Debug.
Assert
(DoubleUtil.IsZero(pressureFactor) == false);
989
System.Diagnostics.Debug.
Assert
(DoubleUtil.IsZero(pressureFactor) == false);
1021
System.Diagnostics.Debug.
Assert
(!quad.IsEmpty);
1091
System.Diagnostics.Debug.
Assert
(i < count);
1131
System.Diagnostics.Debug.
Assert
(count > 0);
1153
System.Diagnostics.Debug.
Assert
(count > 0);
1226
System.Diagnostics.Debug.
Assert
(DoubleUtil.IsZero(pressureFactor) == false);
1297
System.Diagnostics.Debug.
Assert
(findex >= 0 && findex <= 1);
MS\Internal\Ink\StrokeNodeOperations2.cs (3)
44
System.Diagnostics.Debug.
Assert
((null != vertices) && (2 < vertices.Length));
82
System.Diagnostics.Debug.
Assert
(quad.IsEmpty == false);
508
System.Diagnostics.Debug.
Assert
((false == DoubleUtil.IsZero(shortest.X)) || (false == DoubleUtil.IsZero(shortest.Y)));
MS\Internal\Ink\StrokeRenderer.cs (26)
45
Debug.
Assert
(iterator != null);
46
Debug.
Assert
(drawingAttributes != null);
77
System.Diagnostics.Debug.
Assert
(true == strokeNode.IsValid);
159
Debug.
Assert
(index == iterator.Count - 1);
218
Debug.
Assert
(iterator != null && drawingAttributes != null);
488
Debug.
Assert
(pathFigureDCSide.Count == 0);
630
Debug.
Assert
(!strokeNode.IsValid);
652
Debug.
Assert
(pathFigureDCSide.Count == 0);
678
Debug.
Assert
(pathFigureABSide.Count == 0);
713
Debug.
Assert
(pathFigureDCSide.Count == 0);
759
Debug.
Assert
(pointBuffer1 != null);
760
Debug.
Assert
(pointBuffer2 != null);
761
Debug.
Assert
(pointBuffer3 != null);
762
Debug.
Assert
(context != null);
835
Debug.
Assert
(percentIntersect >= 0.0 && percentIntersect <= 100.0d);
871
Debug.
Assert
(context != null);
872
Debug.
Assert
(points != null);
873
Debug.
Assert
(points.Count > 0);
899
Debug.
Assert
(context != null);
900
Debug.
Assert
(abPoints != null && dcPoints != null);
901
Debug.
Assert
(abPoints.Count > 0 && dcPoints.Count > 0);
921
Debug.
Assert
(context != null);
922
Debug.
Assert
(abPoints != null && dcPoints != null);
923
Debug.
Assert
(polyLinePoints != null);
952
Debug.
Assert
(i + 2 < points.Count);
1102
System.Diagnostics.Debug.
Assert
(da.IsHighlighter = true);
MS\Internal\Ink\StylusShape.cs (4)
164
System.Diagnostics.Debug.
Assert
(value.HasInverse);
234
System.Diagnostics.Debug.
Assert
(vertices.Length == 4);
259
System.Diagnostics.Debug.
Assert
(clockWiseIndex == vertices.Length || counterClockIndex == vertices.Length);
277
System.Diagnostics.Debug.
Assert
(m_tip == StylusTip.Ellipse);
MS\Internal\IO\Packaging\NetStream.cs (8)
818
Debug.
Assert
(offset >= 0);
819
Debug.
Assert
(length >= 0);
844
Debug.
Assert
(value >= 0);
857
Debug.
Assert
(value >= 0);
903
Debug.
Assert
(_offset <= b._offset);
904
Debug.
Assert
(Mergeable(b));
952
Debug.
Assert
(block.Length > 0);
1052
Debug.
Assert
(block.Length > 0);
MS\Internal\LoadedOrUnloadedOperation.cs (1)
27
Debug.
Assert
(callback != null && target != null);
MS\Internal\Media\VisualTreeUtils.cs (1)
120
Debug.
Assert
(element == null);
MS\Internal\Media3D\GeneralTransform3DTo2DTo3D.cs (1)
42
Debug.
Assert
(transform3DTo2D != null && transform2DTo3D != null);
MS\Internal\Media3D\M3DUtil.cs (2)
148
Debug.
Assert
(matrix.IsAffine);
326
Debug.
Assert
(!matrix.IsAffine);
MS\Internal\PartialArray.cs (1)
37
Debug.
Assert
(initialIndex >= 0 && initialIndex + count <= array.Length);
MS\Internal\Shaping\OpenTypeCommon.cs (7)
232
Debug.
Assert
(TableTag==OpenTypeTags.GSUB || TableTag==OpenTypeTags.GPOS);
233
Debug.
Assert
(FirstGlyph<AfterLastGlyph);
234
Debug.
Assert
(AfterLastGlyph<=GlyphInfo.Length);
735
Debug.
Assert
(featureDescription.Parameter != 0);
785
Debug.
Assert
( FlagToSet==GlyphFlags.NotChanged ||
929
Debug.
Assert
(tableTag == OpenTypeTags.GSUB || tableTag == OpenTypeTags.GPOS);
1700
Debug.
Assert
(Index < SubTableCount());
MS\Internal\Shaping\OpenTypeLayoutCache.cs (16)
80
Debug.
Assert
(tableTag == OpenTypeTags.GSUB || tableTag == OpenTypeTags.GPOS);
320
Debug.
Assert
(totalSize <= maxCacheSize);
324
Debug.
Assert
(totalSize <= maxCacheSize);
391
Debug.
Assert
(tableTag == OpenTypeTags.GSUB || tableTag == OpenTypeTags.GPOS);
411
Debug.
Assert
(false);
544
Debug.
Assert
(lastLookup >= 0); // There are lookups, so there was an index
571
Debug.
Assert
(cacheSize > 0); // We've calcucalted them at least ones, and
572
Debug.
Assert
(glyphCount > 0); // if there is no records, we already should've exited
638
Debug.
Assert
((pList - pCache) * sizeof(ushort) < cacheSize);
643
Debug.
Assert
((pList - pCache) * sizeof(ushort) < cacheSize);
676
Debug.
Assert
((pList - pCache) * sizeof(ushort) < cacheSize);
681
Debug.
Assert
((pList - pCache) * sizeof(ushort) < cacheSize);
693
Debug.
Assert
((pList - pCache) * sizeof(ushort) == cacheSize); // We exactly filled up the cache
694
Debug.
Assert
((pGlyphs - pCache) * sizeof(ushort) == (4 + glyphCount * 2) * sizeof(ushort)); // Glyphs ended where lists start.
840
Debug.
Assert
(tableTag == OpenTypeTags.GSUB || tableTag == OpenTypeTags.GPOS);
1058
Debug.
Assert
(recordCount > 0); // Otherwise, we would go into (glyph > maxGlyphLookup);
MS\Internal\Shaping\ShaperBuffers.cs (2)
113
Debug.
Assert
(_charMap.Length == charCount);
124
Debug.
Assert
(_glyphInfoList.Length == glyphCount);
MS\Internal\Shaping\TypefaceMap.cs (7)
167
Debug.
Assert
(ichItem == unicodeString.Length);
182
Debug.
Assert
(index >= 0);
583
Debug.
Assert
(cchMap <= unicodeString.Length - ich);
820
Debug.
Assert
(cchNextValid > 0 && cchNextValid <= unicodeString.Length - ich);
838
Debug.
Assert
(cchNextValid == 0);
848
Debug.
Assert
(recursionDepth > 0 || advance == unicodeString.Length);
1060
Debug.
Assert
(cch > 0);
MS\Internal\Span.cs (2)
108
Debug.
Assert
(cp >= 0);
160
Debug.
Assert
(spanIndex > 0);
MS\Internal\SynchronizedInputHelper.cs (3)
193
Debug.
Assert
(mbArgs != null);
241
Debug.
Assert
(mbArgs != null);
291
Debug.
Assert
(false);
MS\Internal\TextFormatting\FormatSettings.cs (3)
214
Debug.
Assert
(offsetToFirstCp == 0);
222
Debug.
Assert
(offsetToFirstCp == 0);
235
Debug.
Assert
(offsetToFirstCp == 0);
MS\Internal\TextFormatting\FormattedTextSymbols.cs (6)
57
Debug.
Assert
(symbols != null);
80
Debug.
Assert
(shapeables != null && shapeables.Count > 0);
94
Debug.
Assert
(current != null);
206
Debug.
Assert
(_glyphs != null);
229
Debug.
Assert
(_glyphs != null);
372
Debug.
Assert
(glyphAdvances.Length <= glyphIndices.Length);
MS\Internal\TextFormatting\FullTextLine.cs (18)
208
Debug.
Assert
(_metrics._formatter != null);
466
Debug.
Assert
(_collapsingSymbol == null && symbol != null);
488
Debug.
Assert
(lineLength > 0);
699
Debug.
Assert
((_statusFlags & StatusFlags.BoundingBoxComputed) != 0);
753
Debug.
Assert
(_fullText != null);
758
Debug.
Assert
(_metrics._height > 0);
834
Debug.
Assert
(HasCollapsed);
1234
Debug.
Assert
(direction == CaretDirection.Backward || direction == CaretDirection.Backspace);
1423
Debug.
Assert
(direction == CaretDirection.Backward || direction == CaretDirection.Backspace);
1475
Debug.
Assert
(_collapsingSymbol != null);
1570
Debug.
Assert
(false);
1728
Debug.
Assert
(boundsList != null);
2092
Debug.
Assert
(textRun != null);
2096
Debug.
Assert
(cchAcc > 0);
2109
Debug.
Assert
(cchAcc > 0);
2113
Debug.
Assert
(cchLeft == 0);
2455
Debug.
Assert
(_ploline.Value != IntPtr.Zero);
2508
Debug.
Assert
(_ploline.Value != IntPtr.Zero);
MS\Internal\TextFormatting\FullTextState.cs (1)
302
Debug.
Assert
(!TextStore.IsMarker(plsrun));
MS\Internal\TextFormatting\LineServicesCallbacks.cs (15)
236
Debug.
Assert
(lsrun.RunProp != null);
517
Debug.
Assert
(Draw.CurrentLine.FullTextState != null);
525
Debug.
Assert
(lsrun.Shapeable != null && stringLength > 0);
723
Debug.
Assert
(ulInfo.dvpFirstUnderlineSize >= 0);
772
Debug.
Assert
(stInfo.dvpLowerStrikethroughSize >= 0);
1632
Debug.
Assert
(lsrunFirst.Shapeable != null);
1633
Debug.
Assert
(cchText > 0); // LineServices should not pass in zero character count;
1792
Debug.
Assert
(TextStore.IsContent(plsrun) && lsruns[i] != null);
1828
Debug.
Assert
(TextStore.IsContent(plsrun) && lsrun.Shapeable != null);
2388
Debug.
Assert
(textObject != null);
2446
Debug.
Assert
(false);
2469
Debug.
Assert
(lsrun.Type == Plsrun.InlineObject);
2481
Debug.
Assert
(textObject != null);
2482
Debug.
Assert
(textFlow != LsTFlow.lstflowWS || runDirection != 0);
3181
Debug.
Assert
(lsrun.Shapeable != null);
MS\Internal\TextFormatting\LineServicesRun.cs (2)
248
Debug.
Assert
(_shapeable != null);
921
Debug.
Assert
(lsruns != null && lsruns.Length > 0 && lsruns[0] != null);
MS\Internal\TextFormatting\SimpleTextLine.cs (1)
574
Debug.
Assert
((_statusFlags & StatusFlags.BoundingBoxComputed) != 0);
MS\Internal\TextFormatting\TextFormatterImp.cs (2)
552
Debug.
Assert
(context.Owner == null);
577
Debug.
Assert
(context != null);
MS\Internal\TextFormatting\TextMarkerSource.cs (5)
55
Debug.
Assert
(markerStyle != TextMarkerStyle.None);
103
Debug.
Assert
(autoNumberingIndex > 0);
142
Debug.
Assert
(_characterArray != null);
274
Debug.
Assert
(number >= 0);
406
Debug.
Assert
(number >= 0 && number <= 9);
MS\Internal\TextFormatting\TextMetrics.cs (1)
168
Debug.
Assert
(_cchLength > 0);
MS\Internal\TextFormatting\TextStore.cs (16)
272
Debug.
Assert
(stringLength > 0 && runInfo.Length > 0);
330
Debug.
Assert
(
506
Debug.
Assert
(textEffects != null && textEffects.Count != 0);
645
Debug.
Assert
(runInfo.StringLength > 0 && runInfo.Length > 0);
849
Debug.
Assert
(runInfo.StringLength >= stringLength);
874
Debug.
Assert
(cch <= runInfo.StringLength);
1423
Debug.
Assert
(ichRun < ichEnd);
1451
Debug.
Assert
(ichRun == cchUniform);
1549
Debug.
Assert
(runInfo.OffsetToFirstChar + offsetToFirstChar + lsrunLength <= runInfo.CharacterBuffer.Count);
1569
Debug.
Assert
(offsetToFirstChar == 0);
1615
Debug.
Assert
(uniformBidiLevel == (Pap.RightToLeft ? 1 : 0));
1644
Debug.
Assert
(lsrunLength > 0);
1711
Debug.
Assert
(false);
1724
Debug.
Assert
(cch > 0 && cch <= stringLength - ich);
1963
Debug.
Assert
(i < _plsrunVector.Count);
2384
Debug.
Assert
(metrics != null);
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (2)
47
Debug.
Assert
(capacity >= 0);
57
Debug.
Assert
(realValues != null);
MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (2)
41
Debug.
Assert
(capacity >= 0);
50
Debug.
Assert
(pointValues != null);
MS\Win32\UnsafeNativeMethodsTablet.cs (3)
96
Debug.
Assert
(handle != IntPtr.Zero);
136
Debug.
Assert
(handle != IntPtr.Zero);
148
System.Diagnostics.Debug.
Assert
(_recognizerHandle == null);
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (25)
114
Debug.
Assert
((cbData == 0) || ((Int64)(IntPtr)pbFrom) % 4 == 0);
115
Debug.
Assert
((cbData == 0) || ((Int64)(IntPtr)pbTo) % 4 == 0);
116
Debug.
Assert
(cbData % 4 == 0);
117
Debug.
Assert
(cbData >= 0);
541
Debug.
Assert
(!handle.IsNull);
571
Debug.
Assert
(!handle.IsNull);
929
Debug.
Assert
(channel != null);
949
Debug.
Assert
(channel != null);
951
Debug.
Assert
(_debugOnly_Channel == channel);
967
Debug.
Assert
(_debugOnly_Channel == channel);
1144
Debug.
Assert
(_others.Count > 0);
1169
Debug.
Assert
(index == 0);
1403
Debug.
Assert
(index <= 1);
1481
Debug.
Assert
(index == 0);
1519
Debug.
Assert
(channel != null);
1544
Debug.
Assert
(sourceChannel != null);
1549
Debug.
Assert
(found);
1556
Debug.
Assert
(!(_map.Get(targetChannel, out duplicate)));
1582
Debug.
Assert
(channel != null);
1587
Debug.
Assert
(found);
1650
Debug.
Assert
(channel != null);
1655
Debug.
Assert
(found);
1923
Debug.
Assert
(!hCompositionNode.IsNull);
1949
Debug.
Assert
(!hCompositionNode.IsNull);
2127
Debug.
Assert
(!hCompositionNode.IsNull);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\AppDomainShutdownMonitor.cs (1)
40
Debug.
Assert
(listener.TryGetTarget(out _));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\GenericEnumerator.cs (1)
105
Debug.
Assert
(_position >= 0);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Ink\BitStream.cs (2)
33
Debug.
Assert
(buffer != null);
46
Debug.
Assert
(buffer != null);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\LegacyPriorityQueue.cs (2)
134
Debug.
Assert
(_count > 0);
187
Debug.
Assert
(_count != 0);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PartialList.cs (1)
50
Debug.
Assert
(initialIndex >= 0 && initialIndex + count <= list.Count);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
388
Debug.
Assert
(target != null);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Media\TypeConverterHelper.cs (1)
72
Debug.
Assert
(inputString is Uri);
System\Windows\DurationConverter.cs (1)
129
Debug.
Assert
(durationValue == Duration.Automatic); // Only other legal duration type
System\Windows\FontStretch.cs (2)
30
Debug.
Assert
(1 <= stretch && stretch <= 9);
59
Debug.
Assert
(1 <= RealStretch && RealStretch <= 9);
System\Windows\FontStyle.cs (3)
25
Debug.
Assert
(0 <= style && style <= 2);
120
Debug.
Assert
(0 <= _style && _style <= 2);
139
Debug.
Assert
(_style == 2);
System\Windows\FontWeight.cs (1)
28
Debug.
Assert
(1 <= weight && weight <= 999);
System\Windows\FreezableCollection.cs (1)
186
Debug.
Assert
(_collection.Count == 0);
System\Windows\Ink\DrawingAttributes.cs (13)
52
System.Diagnostics.Debug.
Assert
(extendedProperties != null);
63
System.Diagnostics.Debug.
Assert
(_extendedProperties != null);
82
Debug.
Assert
(Colors.Black == (Color)GetDefaultDrawingAttributeValue(KnownIds.Color));
106
Debug.
Assert
(StylusTip.Ellipse == (StylusTip)GetDefaultDrawingAttributeValue(KnownIds.StylusTip));
112
Debug.
Assert
(StylusTip.Rectangle == (StylusTip)GetExtendedPropertyBackedProperty(KnownIds.StylusTip));
135
Debug.
Assert
(Matrix.Identity == (Matrix)GetDefaultDrawingAttributeValue(KnownIds.StylusTipTransform));
164
Debug.
Assert
(DrawingAttributes.DefaultHeight == (double)GetDefaultDrawingAttributeValue(KnownIds.StylusHeight));
191
Debug.
Assert
(DrawingAttributes.DefaultWidth == (double)GetDefaultDrawingAttributeValue(KnownIds.StylusWidth));
280
Debug.
Assert
(false == (bool)GetDefaultDrawingAttributeValue(KnownIds.IsHighlighter));
285
Debug.
Assert
(true == (bool)GetExtendedPropertyBackedProperty(KnownIds.IsHighlighter));
775
System.Diagnostics.Debug.
Assert
(null != DrawingAttributes.GetDefaultDrawingAttributeValue(guid));
797
System.Diagnostics.Debug.
Assert
(sender != null);
798
System.Diagnostics.Debug.
Assert
(args != null);
System\Windows\Ink\IncrementalHitTester.cs (18)
59
System.Diagnostics.Debug.
Assert
(_strokes != null);
82
System.Diagnostics.Debug.
Assert
(_strokes != null);
128
System.Diagnostics.Debug.
Assert
(strokes != null);
171
System.Diagnostics.Debug.
Assert
((_strokes != null) && (_strokeInfos != null) && (_strokes == sender));
274
Debug.
Assert
(_strokeInfos.Count == _strokes.Count);
277
Debug.
Assert
(_strokeInfos[x].Stroke == _strokes[x]);
322
System.Diagnostics.Debug.
Assert
((percentageWithinLasso >= 0) && (percentageWithinLasso <= 100));
333
System.Diagnostics.Debug.
Assert
((points != null) && (IEnumerablePointHelper.GetCount(points)!= 0));
470
System.Diagnostics.Debug.
Assert
(eventArgs != null);
511
System.Diagnostics.Debug.
Assert
(eraserShape != null);
524
System.Diagnostics.Debug.
Assert
((points != null) && (IEnumerablePointHelper.GetCount(points) != 0));
525
System.Diagnostics.Debug.
Assert
(_erasingStroke != null);
570
System.Diagnostics.Debug.
Assert
(strokeHitEventArgCollection.Count != 0);
575
System.Diagnostics.Debug.
Assert
(eventArgs.HitStroke != null);
586
System.Diagnostics.Debug.
Assert
(eventArgs != null);
684
System.Diagnostics.Debug.
Assert
(stroke != null && hitFragments != null && hitFragments.Length > 0);
725
System.Diagnostics.Debug.
Assert
(stroke != null);
832
System.Diagnostics.Debug.
Assert
(stylusPoints != null && index >= 0 && index < stylusPoints.Count);
System\Windows\Ink\Stroke.cs (21)
129
Debug.
Assert
(_cachedGeometry == null || _cachedGeometry.IsFrozen);
266
Debug.
Assert
(bezierPoints != null && bezierPoints.Count > 0);
319
Debug.
Assert
(stylusPointsCount > stylusPointsIndex);
337
Debug.
Assert
(bezierLength >= prevUnbezierLength);
730
System.Diagnostics.Debug.
Assert
(cutAt != null);
731
System.Diagnostics.Debug.
Assert
(cutAt.Length != 0);
762
System.Diagnostics.Debug.
Assert
(false == ((!DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast)) &&
772
System.Diagnostics.Debug.
Assert
(DoubleUtil.LessThan(fragment.BeginFIndex, fragment.EndFIndex));
792
System.Diagnostics.Debug.
Assert
(cutAt != null);
793
System.Diagnostics.Debug.
Assert
(cutAt.Length != 0);
818
System.Diagnostics.Debug.
Assert
(false == ((!DoubleUtil.AreClose(cutAt[cutAt.Length - 1].EndFIndex, StrokeFIndices.AfterLast)) &&
836
System.Diagnostics.Debug.
Assert
(DoubleUtil.LessThan(beginFIndex, fragment.BeginFIndex));
865
Debug.
Assert
(sourceStylusPoints != null);
878
System.Diagnostics.Debug.
Assert
(pointCount >= 1);
888
System.Diagnostics.Debug.
Assert
(sourceStylusPoints.Count > i + beginIndex);
892
System.Diagnostics.Debug.
Assert
(stylusPoints.Count == pointCount);
1018
System.Diagnostics.Debug.
Assert
(IsValidStrokeFIndices(fragments[0]));
1029
System.Diagnostics.Debug.
Assert
(x == 0);
1032
System.Diagnostics.Debug.
Assert
(IsValidStrokeFIndices(fragments[x]) && fragments[x].EndFIndex > current);
1162
Debug.
Assert
(ienum != null);
1181
Debug.
Assert
(ienum != null);
System\Windows\Ink\Stroke2.cs (10)
499
System.Diagnostics.Debug.
Assert
(_cachedGeometry != null && _cachedGeometry.IsFrozen);
532
System.Diagnostics.Debug.
Assert
(false == _drawAsHollow);
562
System.Diagnostics.Debug.
Assert
(geometry != null);
571
System.Diagnostics.Debug.
Assert
(newBounds.IsEmpty == false);
581
System.Diagnostics.Debug.
Assert
(shape != null);
582
System.Diagnostics.Debug.
Assert
(path != null);
601
System.Diagnostics.Debug.
Assert
(lasso != null);
624
System.Diagnostics.Debug.
Assert
(cutAt != null);
648
System.Diagnostics.Debug.
Assert
(cutAt != null);
686
System.Diagnostics.Debug.
Assert
(DoubleUtil.IsZero(originalDa.StylusTipTransform.OffsetX) && DoubleUtil.IsZero(originalDa.StylusTipTransform.OffsetY));
System\Windows\Ink\StrokeCollection.cs (5)
124
Debug.
Assert
(stream != null);
125
Debug.
Assert
(stream.CanRead);
552
Debug.
Assert
(stroke != null && IndexOf(stroke) == -1);
660
Debug.
Assert
(e.Removed.Count > 0);
727
Debug.
Assert
(startingIndex >= 0);
System\Windows\Ink\StrokeCollection2.cs (2)
475
System.Diagnostics.Debug.
Assert
(original != null && toReplace != null);
476
System.Diagnostics.Debug.
Assert
(index >= 0 && index < this.Count);
System\Windows\Input\InputMethod.cs (5)
565
Debug.
Assert
(value != InputMethodState.DoNotCare);
626
Debug.
Assert
(value != InputMethodState.DoNotCare);
660
Debug.
Assert
(value != InputMethodState.DoNotCare);
829
Debug.
Assert
((value & ImeConversionModeValues.DoNotCare) == 0);
1080
Debug.
Assert
((value & ImeSentenceModeValues.DoNotCare) == 0);
System\Windows\Input\ManipulationDevice.cs (5)
158
Debug.
Assert
(manipulator != null);
176
Debug.
Assert
(manipulator != null);
363
Debug.
Assert
(!deltaEventArgs.IsInertial);
429
Debug.
Assert
(!completedEventArgs.IsInertial);
458
Debug.
Assert
(_manipulators == null || _manipulators.Count == 0);
System\Windows\Input\ManipulationLogic.cs (2)
229
Debug.
Assert
(_lastManipulationBeforeInertia != null);
647
Debug.
Assert
(_containerLayoutUpdated != null);
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (3)
512
Debug.
Assert
(si!=null); // should never get here unless we are transitioning a stroke.
963
Debug.
Assert
(si.StrokeHV.Clip == null);
965
Debug.
Assert
(_renderCompleteStrokeInfo == null);
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (1)
177
Debug.
Assert
(__inkingDispatcher != null); // We should have a valid ref here
System\Windows\Input\Stylus\Common\MultiTouchSystemGestureLogic.cs (2)
72
Debug.
Assert
(_firstStylusDeviceId != null && _firstStylusDeviceId != stylusInputReport.StylusDeviceId);
73
Debug.
Assert
(_secondStylusDeviceId == null);
System\Windows\Input\Stylus\Common\RawStylusInput.cs (1)
42
System.Diagnostics.Debug.
Assert
(tabletToElementTransform.IsFrozen);
System\Windows\Input\Stylus\Common\StylusLogic.cs (2)
427
Debug.
Assert
(_transformToDeviceMatrices[hwndSource.CompositionTarget.CurrentDpiScale].HasInverse);
745
Debug.
Assert
(GetFlickAction(flickData) == FlickAction.Scroll); // Make sure scroll action is set in flickdata.
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (4)
65
System.Diagnostics.Debug.
Assert
(this.Count > 0); // If active must have more than one plugin already
574
System.Diagnostics.Debug.
Assert
(_element.IsEnabled == (bool)e.NewValue);
580
System.Diagnostics.Debug.
Assert
(_element.IsVisible == (bool)e.NewValue);
586
System.Diagnostics.Debug.
Assert
(_element.IsHitTestVisible == (bool)e.NewValue);
System\Windows\Input\Stylus\Common\StylusPoint.cs (2)
259
Debug.
Assert
(value != null &&
515
Debug.
Assert
(StylusPointDescription.AreCompatible(stylusPoint1.Description, stylusPoint2.Description));
System\Windows\Input\Stylus\Common\StylusPointCollection.cs (3)
372
Debug.
Assert
(count <= this.Count);
541
Debug.
Assert
(additionalData.Length == countToCopy);
617
Debug.
Assert
( this.Description.ButtonCount > 0 ?
System\Windows\Input\Stylus\Common\StylusPointDescription.cs (4)
308
Debug.
Assert
( stylusPointDescription1._stylusPointPropertyInfos.Length >= RequiredCountOfProperties &&
313
Debug.
Assert
( stylusPointDescription2._stylusPointPropertyInfos.Length >= RequiredCountOfProperties &&
350
Debug.
Assert
(stylusPointDescription._stylusPointPropertyInfos.Length >= 3 &&
355
Debug.
Assert
(stylusPointDescriptionPreserveInfo._stylusPointPropertyInfos.Length >= 3 &&
System\Windows\Input\Stylus\Common\TabletDeviceBase.cs (1)
265
Debug.
Assert
(properties != null);
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (2)
827
Debug.
Assert
(transformToElement != null);
1137
Debug.
Assert
(transformToElement != null);
System\Windows\Input\Stylus\Pointer\PointerStylusPlugInManager.cs (1)
172
System.Diagnostics.Debug.
Assert
(data.Length % pointLength == 0);
System\Windows\Input\Stylus\Wisp\PenContext.cs (5)
125
Debug.
Assert
(_pimcContext != null && _pimcContext.Value != null);
153
Debug.
Assert
(_statusPropertyIndex != -1); // We should always see this.
342
System.Diagnostics.Debug.
Assert
(stylusPointerId != 0);
445
Debug.
Assert
(numPackets != 0);
446
Debug.
Assert
(data != null);
System\Windows\Input\Stylus\Wisp\PenContexts.cs (2)
489
System.Diagnostics.Debug.
Assert
(!inputReport.StylusDevice.CheckAccess());
508
System.Diagnostics.Debug.
Assert
(data.Length % pointLength == 0);
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (4)
525
Debug.
Assert
(penContext != null);
552
Debug.
Assert
(penContext != null);
1045
Debug.
Assert
(pc != null && pc.CommHandle != IntPtr.Zero);
1099
Debug.
Assert
(pc != null && pc.CommHandle != IntPtr.Zero);
System\Windows\Input\Stylus\Wisp\WispLogic.cs (12)
108
Debug.
Assert
(systemGesture != SystemGesture.None); // We should ever see this as input.
833
Debug.
Assert
((actions & ~(RawMouseActions.Button3Press | RawMouseActions.Button3Release |
1735
Debug.
Assert
(ShouldPromoteToMouse(stylusDevice) && stylusDevice.TouchDevice.PromotingToOther);
2511
Debug.
Assert
(stylusDevice.InAir);
2525
Debug.
Assert
(stylusDevice.InAir);
2794
System.Diagnostics.Debug.
Assert
(stylusDevice != null);
2819
System.Diagnostics.Debug.
Assert
(stylusDevice != null);
2884
System.Diagnostics.Debug.
Assert
(stylusDevice != null);
3028
Debug.
Assert
(__stylusDeviceMap.ContainsKey(stylusDevice.Id));
3038
Debug.
Assert
(Dispatcher.CheckAccess());
3224
Debug.
Assert
(Dispatcher.CheckAccess());
3272
Debug.
Assert
(Dispatcher.CheckAccess());
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (3)
1374
Debug.
Assert
(transformToElement != null);
1430
Debug.
Assert
(report.TabletDeviceId == _tabletDevice.Id);
1431
Debug.
Assert
((report.Actions & RawStylusActions.None) == 0);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (2)
186
Debug.
Assert
(_stylusDeviceCollection != null);
228
Debug.
Assert
(CheckAccess());
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (3)
544
Debug.
Assert
(index <= Count);
545
Debug.
Assert
(tabletDevice.Type != (TabletDeviceType)(-1)); // make sure not the mouse tablet device!
564
System.Diagnostics.Debug.
Assert
(index < Count && Count > 0);
System\Windows\Input\TextComposition.cs (1)
318
Debug.
Assert
((_resultText.Length == 1) && Char.IsControl(_resultText[0]));
System\Windows\Input\TextCompositionManager.cs (1)
732
Debug.
Assert
(_altNumpadEntryMode);
System\Windows\Input\TouchDevice.cs (1)
943
Debug.
Assert
(element != null);
System\Windows\InterOp\D3DImage.cs (8)
594
Debug.
Assert
(timeout != Duration.Automatic);
635
Debug.
Assert
(e.OldValue != e.NewValue);
672
Debug.
Assert
(_isDirty);
673
Debug.
Assert
(_isWaitingForPresent);
674
Debug.
Assert
(_lockCount == 0);
695
Debug.
Assert
(_duceResource.IsOnChannel(channel));
784
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
859
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\InterOp\HwndAppCommandInputProvider.cs (1)
39
Debug.
Assert
(null != _source);
System\Windows\InterOp\HwndKeyboardInputProvider.cs (5)
51
Debug.
Assert
( null != _source );
66
Debug.
Assert
( null != _source );
717
Debug.
Assert
( null != _source );
750
Debug.
Assert
( null != _source );
822
Debug.
Assert
( null != _source );
System\Windows\InterOp\HwndMouseInputProvider.cs (5)
48
Debug.
Assert
(null != _source && null != _source.Value);
79
Debug.
Assert
(null != _source && null != _source.Value);
129
Debug.
Assert
(null != _source && null != _source.Value);
1194
Debug.
Assert
(null != _source && null != _source.Value);
1239
Debug.
Assert
(null != _source && null != _source.Value);
System\Windows\InterOp\HwndSource.cs (3)
749
Debug.
Assert
(_weakMenuModeMessageHandler == null);
773
Debug.
Assert
(_weakMenuModeMessageHandler != null);
1546
Debug.
Assert
(_adjustSizingForNonClientArea == true);
System\Windows\InterOp\HwndStylusInputProvider.cs (1)
74
Debug.
Assert
( null != _source );
System\Windows\InterOp\HwndTarget.cs (11)
480
Debug.
Assert
(normalizedHwnd.Handle != IntPtr.Zero);
514
Debug.
Assert
(normalizedHwnd.Handle != IntPtr.Zero);
602
Debug.
Assert
(mode == RenderingMode.Software || mode == RenderingMode.Default);
728
Debug.
Assert
(!_compositionTarget.IsOnChannel(channel));
729
Debug.
Assert
(!_compositionTarget.IsOnChannel(outOfBandChannel));
748
Debug.
Assert
(resourceCreated);
1348
Debug.
Assert
(_restoreDT == sourceDT);
2386
Debug.
Assert
(!_compositionTarget.IsOnChannel(channel));
2612
Debug.
Assert
(hwndTarget != null);
2633
Debug.
Assert
(hwndTarget != null);
2636
Debug.
Assert
(_hwndTargetCount >= 0);
System\Windows\Media\Animation\Animatable.cs (1)
323
Debug.
Assert
(reference is WeakReference);
System\Windows\Media\Animation\AnimationClockResource.cs (6)
73
Debug.
Assert
(sender as System.Windows.Threading.DispatcherObject != null);
74
Debug.
Assert
(((System.Windows.Threading.DispatcherObject)sender).Dispatcher != null);
75
Debug.
Assert
(_animationClock != null);
127
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
168
Debug.
Assert
(_duceResource.IsOnChannel(channel));
184
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\AnimationLayer.cs (13)
21
Debug.
Assert
(ownerStorage != null);
32
Debug.
Assert
(
108
Debug.
Assert
(_animationClocks != null);
123
Debug.
Assert
(animationClocks != null);
124
Debug.
Assert
(animationClocks.Count > 0);
125
Debug.
Assert
(!animationClocks.Contains(null));
126
Debug.
Assert
(_animationClocks == null);
190
Debug.
Assert
(newAnimationClocks != null);
191
Debug.
Assert
(newAnimationClocks.Count > 0);
192
Debug.
Assert
(!newAnimationClocks.Contains(null));
225
Debug.
Assert
(defaultDestinationValue != DependencyProperty.UnsetValue);
245
Debug.
Assert
(_snapshotValue != DependencyProperty.UnsetValue);
266
Debug.
Assert
(count > 0);
System\Windows\Media\Animation\AnimationStorage.cs (26)
53
Debug.
Assert
( _propertyTriggerLayers == null
82
Debug.
Assert
(animationClock != null);
83
Debug.
Assert
(_dependencyObject.Target != null);
84
Debug.
Assert
(_currentTimeInvalidatedHandler != null);
110
Debug.
Assert
(animationClock != null);
111
Debug.
Assert
(_currentTimeInvalidatedHandler != null);
123
Debug.
Assert
(_dependencyObject == null);
124
Debug.
Assert
(_dependencyProperty == null);
148
Debug.
Assert
(_propertyTriggerLayers != null);
149
Debug.
Assert
(_propertyTriggerLayers.ContainsValue(layer));
153
Debug.
Assert
(index >= 0);
252
Debug.
Assert
(animatedPropertyMap[_dependencyProperty.GlobalIndex] != DependencyProperty.UnsetValue);
658
Debug.
Assert
(animationClocks[i] != null);
666
Debug.
Assert
(handoffBehavior == HandoffBehavior.Compose);
667
Debug.
Assert
(storage != null);
668
Debug.
Assert
(storage._animationClocks != null);
713
Debug.
Assert
(animationClocks != null);
714
Debug.
Assert
(!animationClocks.Contains(null));
786
Debug.
Assert
(animation == null || IsAnimationValid(dp, animation));
787
Debug.
Assert
(IsPropertyAnimatable(d, dp));
926
Debug.
Assert
(storage._snapshotValue != DependencyProperty.UnsetValue);
938
Debug.
Assert
(currentPropertyValue != DependencyProperty.UnsetValue);
948
Debug.
Assert
(count > 0);
980
Debug.
Assert
(clocksCount > 0);
981
Debug.
Assert
(defaultDestinationValue != DependencyProperty.UnsetValue);
1094
Debug.
Assert
( AnimatedPropertyMapField.GetValue(d)[dp.GlobalIndex] == DependencyProperty.UnsetValue
System\Windows\Media\Animation\Clock.cs (121)
65
Debug.
Assert
(timeline != null);
175
Debug.
Assert
(!IsTimeManager);
204
Debug.
Assert
(!IsTimeManager);
222
Debug.
Assert
(!IsTimeManager);
244
Debug.
Assert
(!IsTimeManager);
282
Debug.
Assert
(!IsTimeManager);
295
Debug.
Assert
(!IsTimeManager);
313
Debug.
Assert
(!IsTimeManager);
340
Debug.
Assert
(!IsTimeManager);
368
Debug.
Assert
(!IsTimeManager);
500
Debug.
Assert
(!IsTimeManager);
586
Debug.
Assert
(!clock.IsTimeManager);
636
Debug.
Assert
(!current.IsTimeManager); // We should not yet be connected to the TimeManager
714
Debug.
Assert
(!IsTimeManager);
789
Debug.
Assert
(!IsTimeManager);
796
Debug.
Assert
(!(IsInteractivelyPaused && PendingInteractivePause));
797
Debug.
Assert
(!(!IsInteractivelyPaused && PendingInteractiveResume));
834
Debug.
Assert
(!IsTimeManager);
841
Debug.
Assert
( !(IsInteractivelyPaused && PendingInteractivePause));
842
Debug.
Assert
( !(!IsInteractivelyPaused && PendingInteractiveResume));
869
Debug.
Assert
(IsRoot);
891
Debug.
Assert
(IsRoot);
962
Debug.
Assert
(IsRoot);
973
Debug.
Assert
(IsRoot);
1004
Debug.
Assert
(IsRoot);
1085
Debug.
Assert
(!IsTimeManager);
1121
Debug.
Assert
(!IsTimeManager);
1143
Debug.
Assert
(!IsTimeManager);
1162
Debug.
Assert
(!IsTimeManager);
1241
Debug.
Assert
(!IsTimeManager);
1389
Debug.
Assert
(!IsTimeManager);
1426
Debug.
Assert
(!IsTimeManager);
1427
Debug.
Assert
(_parent != null && !_parent.IsTimeManager);
1799
Debug.
Assert
(IsRoot); // root clocks only; non-roots have constant begin time
1800
Debug.
Assert
(_rootData != null);
1805
Debug.
Assert
(!RootBeginPending); // we can have either a begin or a seek, not both
1876
Debug.
Assert
(_beginTime.HasValue);
1927
Debug.
Assert
(IsRoot);
1933
Debug.
Assert
(_rootData.DesiredFrameRate > 0);
1953
Debug.
Assert
(!IsTimeManager);
1954
Debug.
Assert
(!IsInteractivelyStopped);
1955
Debug.
Assert
(_parent._currentClockState != ClockState.Stopped);
1956
Debug.
Assert
(_currentClockState != ClockState.Stopped);
1958
Debug.
Assert
(_beginTime.HasValue);
1960
Debug.
Assert
(parentTime >= _beginTime.Value); // We are active or in postfill
1976
Debug.
Assert
(_currentClockState != ClockState.Active);
2185
Debug.
Assert
(_currentClockState == ClockState.Active
2268
Debug.
Assert
(!IsTimeManager);
2269
Debug.
Assert
(!IsInteractivelyStopped);
2270
Debug.
Assert
(_parent._currentClockState != ClockState.Stopped);
2271
Debug.
Assert
(_beginTime.HasValue);
2320
Debug.
Assert
(!IsTimeManager);
2321
Debug.
Assert
(!IsInteractivelyStopped);
2322
Debug.
Assert
(_parent._currentClockState != ClockState.Stopped);
2323
Debug.
Assert
(_currentClockState == ClockState.Active); // Must be active at this point
2350
Debug.
Assert
(!IsTimeManager);
2351
Debug.
Assert
(!IsInteractivelyStopped);
2352
Debug.
Assert
(_parent._currentClockState != ClockState.Stopped);
2353
Debug.
Assert
(_currentClockState != ClockState.Stopped);
2443
Debug.
Assert
(!IsTimeManager);
2485
Debug.
Assert
(!IsTimeManager);
2486
Debug.
Assert
(!IsInteractivelyStopped || IsRoot);
2536
Debug.
Assert
(_beginTime.HasValue); // _currentIterationBeginTime.HasValue implies _beginTime.HasValue
2565
Debug.
Assert
(repeatBehavior == RepeatBehavior.Forever); // Only other valid enum value
2659
Debug.
Assert
(!IsTimeManager);
2660
Debug.
Assert
(!IsInteractivelyStopped || IsRoot);
2672
Debug.
Assert
(_beginTime.HasValue);
2701
Debug.
Assert
(IsRoot);
2744
Debug.
Assert
(_beginTime == null);
2745
Debug.
Assert
(_currentClockState == ClockState.Stopped);
2769
Debug.
Assert
(!IsInteractivelyPaused); // Enforce invariant: cannot be pausePending when already paused
2770
Debug.
Assert
(!PendingInteractiveResume); // Enforce invariant: cannot be both pause and resumePending
2787
Debug.
Assert
(IsInteractivelyPaused);
2788
Debug.
Assert
(!PendingInteractivePause);
2816
Debug.
Assert
(endOfActivePeriod.HasValue);
2894
Debug.
Assert
(!IsTimeManager);
2919
Debug.
Assert
(parentTime.HasValue); // If parent isn't stopped, it must have valid time and speed
2920
Debug.
Assert
(parentSpeed.HasValue);
2946
Debug.
Assert
(parentTime.HasValue); // Cannot be true unless parent is stopped
2967
Debug.
Assert
(_beginTime.HasValue);
2968
Debug.
Assert
(parentTime.HasValue);
3013
Debug.
Assert
(!IsTimeManager);
3014
Debug.
Assert
(!IsInteractivelyStopped);
3015
Debug.
Assert
(_parent._currentClockState != ClockState.Stopped);
3016
Debug.
Assert
(_beginTime.HasValue);
3088
Debug.
Assert
(!IsTimeManager);
3089
Debug.
Assert
(!IsInteractivelyStopped || IsRoot);
3171
Debug.
Assert
(!IsTimeManager);
3172
Debug.
Assert
(_parent != null);
3173
Debug.
Assert
(_parent.CurrentState != ClockState.Stopped);
3176
Debug.
Assert
(HasSeekOccuredAfterLastTick ||
3180
Debug.
Assert
(_syncData.SyncClock == this || _syncData.SyncClock._parent == this);
3181
Debug.
Assert
(CanSlip || _timeline is ParallelTimeline && ((ParallelTimeline)_timeline).SlipBehavior == SlipBehavior.Slip);
3183
Debug.
Assert
(_syncData != null);
3184
Debug.
Assert
(!_syncData.IsInSyncPeriod);
3187
Debug.
Assert
(_timeline.AutoReverse == false);
3188
Debug.
Assert
(_timeline.AccelerationRatio == 0);
3189
Debug.
Assert
(_timeline.DecelerationRatio == 0);
3236
Debug.
Assert
(syncClockDuration == Duration.Automatic);
3304
Debug.
Assert
(!IsTimeManager);
3305
Debug.
Assert
(_parent != null);
3306
Debug.
Assert
(_syncData != null);
3307
Debug.
Assert
(_syncData.IsInSyncPeriod);
3310
Debug.
Assert
(_syncData.SyncClock == this || _syncData.SyncClock._parent == this);
3314
Debug.
Assert
(!parentIntervalCollection.IsEmpty); // The parent isn't Stopped, so it must have a TIC
3318
Debug.
Assert
(parentIntervalCollection.IsEmptyOfRealPoints || parentIntervalCollection.FirstNodeTime <= currentParentTimePT);
3319
Debug.
Assert
(currentParentSpeed >= 0);
3449
Debug.
Assert
(!IsTimeManager);
3530
Debug.
Assert
(_rootData.DesiredFrameRate > 0);
3558
Debug.
Assert
(!IsTimeManager);
3581
Debug.
Assert
(!IsTimeManager);
3582
Debug.
Assert
(_parent == null);
3583
Debug.
Assert
(_timeManager == null);
3674
Debug.
Assert
(factor != 0); // Divide by zero
3761
Debug.
Assert
(IsRoot); // This should only be called on root-child clocks
3797
Debug.
Assert
(!IsTimeManager);
3879
Debug.
Assert
(!IsTimeManager);
3999
Debug.
Assert
(syncClock != null);
4000
Debug.
Assert
(syncClock.GetCanSlip());
4001
Debug.
Assert
(syncClock.IsRoot || syncClock._timeline.BeginTime.HasValue); // Only roots may later validate their _beginTime
4090
Debug.
Assert
(_syncClockBeginTime.HasValue); // This should never be queried on a root without beginTime
System\Windows\Media\Animation\ClockGroup.cs (11)
56
Debug.
Assert
(!IsTimeManager);
69
Debug.
Assert
(!IsTimeManager);
82
Debug.
Assert
(IsTimeManager);
100
Debug.
Assert
(timelineGroup != null);
189
Debug.
Assert
(IsTimeManager);
217
Debug.
Assert
(IsTimeManager);
254
Debug.
Assert
(IsTimeManager);
300
Debug.
Assert
(group != null); // We should only have this flag set for ClockGroups
314
Debug.
Assert
(_children != null);
438
Debug.
Assert
(IsRoot);
464
Debug.
Assert
(_timeManager != null); // RootActivate should be called by our own TimeManager
System\Windows\Media\Animation\DoubleAnimationUsingPath.cs (2)
173
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
266
Debug.
Assert
(!_isValid);
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\BooleanKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\ByteAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\ByteKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\CharKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\ColorAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\ColorIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\ColorKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\DecimalAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\DecimalKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\DoubleAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\DoubleIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\DoubleKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\Int16Animation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Int16KeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\Int32Animation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Int32KeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\Int64Animation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Int64KeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\MatrixIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\MatrixKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\ObjectKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\Point3DAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Point3DIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\Point3DKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\PointAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\PointIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\PointKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\QuaternionAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\QuaternionIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\QuaternionKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\RectAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\RectIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\RectKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\Rotation3DAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Rotation3DKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\SingleAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\SingleKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\SizeAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\SizeIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\SizeKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\StringKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\Vector3DAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\Vector3DIndependentAnimationStorage.cs (1)
45
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\Generated\Vector3DKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Generated\VectorAnimation.cs (1)
218
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
328
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\VectorKeyFrameCollection.cs (1)
484
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\IndependentAnimationStorage.cs (14)
67
Debug.
Assert
(d != null);
71
Debug.
Assert
(d.Dispatcher != null);
74
Debug.
Assert
(d.CheckAccess());
96
Debug.
Assert
(_duceResource.IsOnChannel(channel));
112
Debug.
Assert
(d != null);
115
Debug.
Assert
(d.Dispatcher != null);
118
Debug.
Assert
(d.CheckAccess());
183
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
215
Debug.
Assert
(d != null);
219
Debug.
Assert
(_duceResource.IsOnAnyChannel);
235
Debug.
Assert
(d != null);
236
Debug.
Assert
(dp != null);
237
Debug.
Assert
(d is Animatable ? ((Animatable)d).HasAnimatedProperties : true);
247
Debug.
Assert
(storage._duceResource.IsOnChannel(channel));
System\Windows\Media\Animation\KeySpline.cs (3)
265
Debug.
Assert
(_isDirty);
317
Debug.
Assert
(_isSpecified);
339
Debug.
Assert
(_isSpecified);
System\Windows\Media\Animation\MatrixAnimationUsingPath.cs (2)
257
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
320
Debug.
Assert
(!_isValid);
System\Windows\Media\Animation\PointAnimationUsingPath.cs (2)
150
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
223
Debug.
Assert
(!_isValid);
System\Windows\Media\Animation\TimeIntervalCollection.cs (83)
111
Debug.
Assert
(_minimumCapacity >= 2);
138
Debug.
Assert
(IsEmpty); // We should start with a new or Clear()-ed collection first
145
Debug.
Assert
(_nodeIsInterval[0] == false);
194
Debug.
Assert
(_count == 0); // The boolean constructor already did the job for us
256
Debug.
Assert
(_count > 0);
302
Debug.
Assert
(IsSingleInterval);
304
Debug.
Assert
(0 < _count && _count <= 2);
313
Debug.
Assert
(beginTime <= _nodeTime[1]);
417
Debug.
Assert
(_nodeTime[index] < time);
549
Debug.
Assert
(fromIndex <= toIndex);
560
Debug.
Assert
(toIndex >= 0); // Since fromIndex!=toIndex, toIndex must be >= 0
567
Debug.
Assert
(fromIndex + 1 < toIndex);
623
Debug.
Assert
(!_invertCollection); // Make sure we never leave inverted mode enabled
687
Debug.
Assert
(!tic1.IsEmptyOfRealPoints); // We shouldn't reach here if either TIC is empty
688
Debug.
Assert
(!tic2.IsEmptyOfRealPoints);
716
Debug.
Assert
(!intersectionFound); // If an intersection was already found, we should not reach this far
726
Debug.
Assert
(tic2.CurrentNodeIsPoint || tic2.CurrentNodeIsInterval);
744
Debug.
Assert
(!tic1.CurrentIsAtLastNode); // Thus tic1._current can be safely advanced now
750
Debug.
Assert
(tic1.CurrentNodeTime >= tic2.CurrentNodeTime);
753
Debug.
Assert
(tic2.CurrentIsAtLastNode || (tic1.CurrentNodeTime < tic2.NextNodeTime));
754
Debug.
Assert
(tic1.CurrentIsAtLastNode || (tic2.CurrentNodeTime < tic1.NextNodeTime));
786
Debug.
Assert
(tic1.NextNodeTime == tic2.NextNodeTime);
794
Debug.
Assert
(tic1.CurrentIsAtLastNode && tic2.CurrentIsAtLastNode);
802
Debug.
Assert
(tic2.CurrentIsAtLastNode || (tic1.CurrentNodeTime < tic2.NextNodeTime));
803
Debug.
Assert
(tic1.CurrentIsAtLastNode || (tic2.CurrentNodeTime < tic1.NextNodeTime));
814
Debug.
Assert
(!_invertCollection); // Make sure we never leave inverted mode enabled
862
Debug.
Assert
(!_invertCollection); // Make sure we never leave inverted mode enabled
881
Debug.
Assert
(beginTime <= CurrentNodeTime); // The PTIC is clipped by the active period, and we are a subset of the active period
882
Debug.
Assert
(CurrentIsAtLastNode || beginTime < NextNodeTime);
989
Debug.
Assert
(!_invertCollection); // Make sure we never leave inverted mode enabled
1037
Debug.
Assert
(projection.IsEmpty); // Make sure the projection was properly cleared first
1038
Debug.
Assert
(!_invertCollection); // Make sure we never leave inverted mode enabled
1039
Debug.
Assert
(beginTime <= endTime); // Ensure legitimate begin/end clipping parameters
1041
Debug.
Assert
(!IsEmptyOfRealPoints); // We assume this function is ONLY called when this collection overlaps the postfill zone. So we cannot be empty.
1042
Debug.
Assert
(!period.HasTimeSpan || period.TimeSpan > TimeSpan.Zero || beginTime == endTime); // Check the consistency of degenerate case where simple duration is zero; expiration time should equal beginTime
1043
Debug.
Assert
(!_nodeIsInterval[_count - 1]); // We should not have an infinite domain set
1160
Debug.
Assert
(projection.IsEmpty);
1161
Debug.
Assert
(!_invertCollection); // Make sure we never leave inverted mode enabled
1162
Debug.
Assert
(!endTime.HasValue || beginTime <= endTime); // Ensure legitimate begin/end clipping parameters
1164
Debug.
Assert
(!IsEmptyOfRealPoints); // We assume this function is ONLY called when this collection overlaps the active zone. So we cannot be empty.
1165
Debug.
Assert
(!endTime.HasValue || endTime >= _nodeTime[0]); // EndTime must come at or after our first node (it can be infinite)
1166
Debug.
Assert
(_nodeTime[_count - 1] >= beginTime); // Our last node must come at least at begin time (since we must intersect the active period)
1167
Debug.
Assert
(endTime.HasValue || fillDuration == TimeSpan.Zero); // Either endTime is finite, or it's infinite hence we cannot have any fill zone
1168
Debug.
Assert
(!period.HasTimeSpan || period.TimeSpan > TimeSpan.Zero || (endTime.HasValue && beginTime == endTime)); // Check the consistency of degenerate case where simple duration is zero; expiration time should equal beginTime
1169
Debug.
Assert
(!_nodeIsInterval[_count - 1]); // We should not have an infinite domain set
1243
Debug.
Assert
(!IsEmptyOfRealPoints);
1244
Debug.
Assert
(projection.IsEmpty);
1283
Debug.
Assert
(_current > 0); // The only way _current could stay at zero is if the collection begins at (or past) the end of active period
1288
Debug.
Assert
(endTime.HasValue && CurrentNodeTime >= endTime.Value);
1313
Debug.
Assert
(!IsEmptyOfRealPoints); // The entire projection process assumes we are not empty (have an intersection with the active zone).
1314
Debug.
Assert
(periodInTicks > 0); // We do not handle the degenerate case here.
1318
Debug.
Assert
(CurrentNodeTime >= TimeSpan.Zero); // Verify that we are already clipped
1335
Debug.
Assert
(CurrentNodeIsPoint);
1355
Debug.
Assert
(CurrentNodeIsPoint); // We should only call this method when we project a legitimate point
1356
Debug.
Assert
(!CurrentNodeIsInterval);
1427
Debug.
Assert
(timeBeforeNextPeriod > 0);
1500
Debug.
Assert
(intervalLength > 0);
1583
Debug.
Assert
(index == -1 || _nodeTime[index] < point);
1614
Debug.
Assert
(from < to); // Our code should never call MergeInterval for a point or reversed interval
1630
Debug.
Assert
(_nodeTime.Length >= _minimumCapacity); // Assert that we indeed have memory allocated
1668
Debug.
Assert
(_nodeTime[fromIndex] == from);
1699
Debug.
Assert
(_nodeTime[toIndex] == to);
1700
Debug.
Assert
(fromIndex < toIndex);
1731
Debug.
Assert
(_count + netIncreaseInNodes >= 2); // We should never shrink past size 2
1779
Debug.
Assert
(_nodeIsPoint == null);
1780
Debug.
Assert
(_nodeIsInterval == null);
1788
Debug.
Assert
(_nodeIsPoint != null);
1789
Debug.
Assert
(_nodeIsInterval != null);
1820
Debug.
Assert
(periodInTicks > 0);
1821
Debug.
Assert
(accelRatio + decelRatio > 0);
2135
Debug.
Assert
(_count > 0); // Count cannot be negative
2161
Debug.
Assert
(right == _count - 1);
2191
Debug.
Assert
(_current <= _count);
2206
Debug.
Assert
(_current < _count);
2211
Debug.
Assert
(_current < _count);
2220
Debug.
Assert
(_current < _count);
2225
Debug.
Assert
(_current < _count);
2234
Debug.
Assert
(_current < _count);
2239
Debug.
Assert
(_current < _count);
2248
Debug.
Assert
(_current + 1 < _count);
2257
Debug.
Assert
(_current + 1 < _count);
2266
Debug.
Assert
(_current + 1 < _count);
2281
Debug.
Assert
(_invertCollection != mode); // Make sure we aren't redundantly setting the mode
System\Windows\Media\Animation\Timeline.cs (1)
933
Debug.
Assert
(sourceStore.Count > 0);
System\Windows\Media\Animation\WeakRefEnumerator.cs (2)
59
Debug.
Assert
(_valid);
77
Debug.
Assert
(_valid);
System\Windows\Media\BitmapCacheBrush.cs (10)
211
Debug.
Assert
(!_pendingLayout);
269
Debug.
Assert
(element != null);
289
Debug.
Assert
(_pendingLayout);
293
Debug.
Assert
(element != null);
304
Debug.
Assert
(_DispatcherLayoutResult != null);
305
Debug.
Assert
(_DispatcherLayoutResult.Status == DispatcherOperationStatus.Pending);
307
Debug.
Assert
(abortStatus);
319
Debug.
Assert
(_pendingLayout);
322
Debug.
Assert
(element != null);
360
Debug.
Assert
(_reentrancyFlag); // Exit must be matched with Enter. See Enter comments.
System\Windows\Media\BoundsDrawingContextWalker.cs (4)
516
Debug.
Assert
(_pushTypeStack != null);
517
Debug.
Assert
(_pushTypeStack.Count > 0);
526
Debug.
Assert
(_transformStack != null);
527
Debug.
Assert
(_transformStack.Count > 0);
System\Windows\Media\ByteStreamGeometryContext.cs (7)
328
Debug.
Assert
(sizeof(MIL_PATHGEOMETRY) <= _currOffset);
329
Debug.
Assert
(_currentPathGeometryData.Size == (uint)_currOffset);
558
Debug.
Assert
(_currentPathFigureDataOffset + sizeof(MIL_PATHFIGURE) <= _currOffset);
598
Debug.
Assert
(_currentPolySegmentDataOffset + sizeof(MIL_SEGMENT_POLY) <= _currOffset);
681
Debug.
Assert
(points != null);
682
Debug.
Assert
(count > 0);
731
Debug.
Assert
((_currentPolySegmentDataOffset != -1) &&
System\Windows\Media\ColorContext.cs (2)
170
Debug.
Assert
(_profileUri.Value == null);
598
Debug.
Assert
(stm != null);
System\Windows\Media\ColorTransformHelper.cs (2)
86
Debug.
Assert
(success);
88
Debug.
Assert
(success);
System\Windows\Media\CombinedGeometry.cs (1)
208
Debug.
Assert
(false);
System\Windows\Media\CompositionTarget.cs (6)
71
Debug.
Assert
(channel != null);
72
Debug.
Assert
(!_contentRoot.IsOnChannel(channel));
74
Debug.
Assert
(outOfBandChannel != null);
75
Debug.
Assert
(!_contentRoot.IsOnChannel(outOfBandChannel));
86
Debug.
Assert
(resourceCreated);
463
Debug.
Assert
(_cachedRenderContext == null);
System\Windows\Media\Drawing.cs (1)
82
Debug.
Assert
(ctx != null);
System\Windows\Media\DrawingContextDrawingContextWalker.cs (1)
36
Debug.
Assert
(drawingContext != null);
System\Windows\Media\DrawingContextWalker.cs (2)
43
Debug.
Assert
(false);
53
Debug.
Assert
(false);
System\Windows\Media\DrawingDrawingContext.cs (3)
1300
Debug.
Assert
(geometry != null);
1386
Debug.
Assert
(newDrawing != null);
1392
Debug.
Assert
(_currentDrawingGroup == null);
System\Windows\Media\DrawingGroup.cs (3)
110
Debug.
Assert
(_open);
111
Debug.
Assert
(rootDrawingGroupChildren != null);
190
Debug.
Assert
(!ctx.ShouldStopWalking);
System\Windows\Media\DrawingGroupDrawingContext.cs (2)
23
Debug.
Assert
(null != drawingGroup);
41
Debug.
Assert
(null != _drawingGroup);
System\Windows\Media\DrawingVisual.cs (4)
61
Debug.
Assert
(intersectionDetail != IntersectionDetail.NotCalculated);
149
Debug.
Assert
(_proxy.IsOnChannel(channel));
222
Debug.
Assert
(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentConnected));
223
Debug.
Assert
(_proxy.IsOnChannel(channel));
System\Windows\Media\DrawingVisualDrawingContext.cs (2)
35
Debug.
Assert
(null != ownerVisual);
51
Debug.
Assert
(null != _ownerVisual);
System\Windows\Media\Effects\Generated\BlurEffect.cs (2)
186
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
230
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Effects\Generated\DropShadowEffect.cs (2)
252
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
319
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Effects\Generated\ImplicitInputBrush.cs (2)
123
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
200
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Effects\Generated\PixelShader.cs (1)
187
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Effects\Generated\ShaderEffect.cs (3)
121
Debug.
Assert
(!channel.IsOutOfBandChannel);
122
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
206
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Effects\PixelShader.cs (3)
104
Debug.
Assert
(newUri.IsAbsoluteUri);
171
Debug.
Assert
(len == lengthRead);
194
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
System\Windows\Media\Effects\ShaderEffect.cs (7)
417
Debug.
Assert
(false);
557
Debug.
Assert
(!channel.IsOutOfBandChannel);
558
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
571
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
725
Debug.
Assert
(sizeof(DUCE.ResourceHandle) == sizeof(Int32));
807
Debug.
Assert
(_duceResource.IsOnChannel(channel));
960
Debug.
Assert
(false);
System\Windows\Media\FactoryMaker.cs (2)
108
Debug.
Assert
(s_pFactory != IntPtr.Zero);
124
Debug.
Assert
(s_pImagingFactory != IntPtr.Zero);
System\Windows\Media\FamilyMap.cs (1)
369
Debug.
Assert
(first <= last);
System\Windows\Media\FontFamilyConverter.cs (3)
185
Debug.
Assert
(name != null);
190
Debug.
Assert
(name != null);
195
Debug.
Assert
(name != null);
System\Windows\Media\FormattedText.cs (4)
1025
Debug.
Assert
(_nextLine == null);
1045
Debug.
Assert
(_totalHeight + _currentLine.Height <= _that._maxTextHeight);
1134
Debug.
Assert
(_that._text.Length > 0 && textSourcePosition + line.Length <= _that._text.Length + 1);
1150
Debug.
Assert
(_that._trimming == TextTrimming.WordEllipsis);
System\Windows\Media\Generated\BitmapCache.cs (2)
188
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
232
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\BitmapCacheBrush.cs (10)
125
Debug.
Assert
(!channel.IsOutOfBandChannel);
126
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
162
Debug.
Assert
(element != null);
165
Debug.
Assert
(target._DispatcherLayoutResult != null);
166
Debug.
Assert
(target._DispatcherLayoutResult.Status == System.Windows.Threading.DispatcherOperationStatus.Pending);
168
Debug.
Assert
(abortStatus);
186
Debug.
Assert
(!channel.IsOutOfBandChannel);
187
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
321
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
409
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\Brush.cs (4)
127
Debug.
Assert
(!channel.IsOutOfBandChannel);
128
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
171
Debug.
Assert
(!channel.IsOutOfBandChannel);
172
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
System\Windows\Media\Generated\CombinedGeometry.cs (6)
125
Debug.
Assert
(!channel.IsOutOfBandChannel);
126
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
169
Debug.
Assert
(!channel.IsOutOfBandChannel);
170
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
262
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
327
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\DashStyle.cs (2)
166
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
234
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\DrawingBrush.cs (4)
118
Debug.
Assert
(!channel.IsOutOfBandChannel);
119
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
181
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
284
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\DrawingContextWalker.cs (24)
51
Debug.
Assert
(false);
71
Debug.
Assert
(false);
93
Debug.
Assert
(false);
117
Debug.
Assert
(false);
149
Debug.
Assert
(false);
187
Debug.
Assert
(false);
221
Debug.
Assert
(false);
261
Debug.
Assert
(false);
283
Debug.
Assert
(false);
301
Debug.
Assert
(false);
321
Debug.
Assert
(false);
336
Debug.
Assert
(false);
366
Debug.
Assert
(false);
384
Debug.
Assert
(false);
396
Debug.
Assert
(false);
408
Debug.
Assert
(false);
422
Debug.
Assert
(false);
438
Debug.
Assert
(false);
450
Debug.
Assert
(false);
462
Debug.
Assert
(false);
473
Debug.
Assert
(false);
490
Debug.
Assert
(false);
505
Debug.
Assert
(false);
514
Debug.
Assert
(false);
System\Windows\Media\Generated\DrawingGroup.cs (18)
138
Debug.
Assert
(!channel.IsOutOfBandChannel);
139
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
151
Debug.
Assert
(resource != null);
162
Debug.
Assert
(resource != null);
205
Debug.
Assert
(!channel.IsOutOfBandChannel);
206
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
256
Debug.
Assert
(!channel.IsOutOfBandChannel);
257
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
300
Debug.
Assert
(!channel.IsOutOfBandChannel);
301
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
344
Debug.
Assert
(!channel.IsOutOfBandChannel);
345
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
547
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
656
Debug.
Assert
(_duceResource.IsOnChannel(channel));
710
Debug.
Assert
(!channel.IsOutOfBandChannel);
711
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
738
Debug.
Assert
(!channel.IsOutOfBandChannel);
739
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
System\Windows\Media\Generated\DrawingImage.cs (4)
118
Debug.
Assert
(!channel.IsOutOfBandChannel);
119
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
181
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
225
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\EllipseGeometry.cs (2)
188
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
262
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\Geometry.cs (2)
125
Debug.
Assert
(!channel.IsOutOfBandChannel);
126
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
System\Windows\Media\Generated\GeometryDrawing.cs (8)
118
Debug.
Assert
(!channel.IsOutOfBandChannel);
119
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
162
Debug.
Assert
(!channel.IsOutOfBandChannel);
163
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
206
Debug.
Assert
(!channel.IsOutOfBandChannel);
207
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
299
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
353
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\GeometryGroup.cs (10)
145
Debug.
Assert
(!channel.IsOutOfBandChannel);
146
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
158
Debug.
Assert
(resource != null);
169
Debug.
Assert
(resource != null);
246
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
330
Debug.
Assert
(_duceResource.IsOnChannel(channel));
378
Debug.
Assert
(!channel.IsOutOfBandChannel);
379
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
406
Debug.
Assert
(!channel.IsOutOfBandChannel);
407
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
System\Windows\Media\Generated\GlyphRunDrawing.cs (6)
103
Debug.
Assert
(!channel.IsOutOfBandChannel);
104
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
147
Debug.
Assert
(!channel.IsOutOfBandChannel);
148
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
225
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
274
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\GuidelineSet.cs (2)
188
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
263
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\ImageBrush.cs (4)
118
Debug.
Assert
(!channel.IsOutOfBandChannel);
119
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
181
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
284
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\ImageDrawing.cs (4)
118
Debug.
Assert
(!channel.IsOutOfBandChannel);
119
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
203
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
255
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\LinearGradientBrush.cs (1)
187
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\LineGeometry.cs (2)
166
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
234
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\MatrixTransform.cs (2)
144
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
186
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\PathGeometry.cs (1)
190
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\Pen.cs (6)
118
Debug.
Assert
(!channel.IsOutOfBandChannel);
119
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
204
Debug.
Assert
(!channel.IsOutOfBandChannel);
205
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
372
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
439
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\RadialGradientBrush.cs (1)
231
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\RectangleGeometry.cs (2)
188
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
262
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\RenderData.cs (11)
525
Debug.
Assert
(_duceResource.IsOnChannel(channel));
537
Debug.
Assert
(cbExtraData <= (uint)Int32.MaxValue);
553
Debug.
Assert
((_buffer != null) || (_curOffset == 0));
556
Debug.
Assert
((_buffer == null) || (_curOffset <= _buffer.Length));
1098
Debug.
Assert
(false);
1122
Debug.
Assert
((_buffer != null) || (_curOffset == 0));
1125
Debug.
Assert
((_buffer == null) || (_curOffset <= _buffer.Length));
1438
Debug.
Assert
(false);
1462
Debug.
Assert
((_buffer != null) || (_curOffset == 0));
1465
Debug.
Assert
((_buffer == null) || (_curOffset <= _buffer.Length));
1790
Debug.
Assert
(false);
System\Windows\Media\Generated\RenderDataDrawingContext.cs (25)
76
Debug.
Assert
(sizeof(MILCMD_DRAW_LINE) == 40);
134
Debug.
Assert
(sizeof(MILCMD_DRAW_LINE_ANIMATE) == 48);
186
Debug.
Assert
(sizeof(MILCMD_DRAW_RECTANGLE) == 40);
245
Debug.
Assert
(sizeof(MILCMD_DRAW_RECTANGLE_ANIMATE) == 48);
309
Debug.
Assert
(sizeof(MILCMD_DRAW_ROUNDED_RECTANGLE) == 56);
390
Debug.
Assert
(sizeof(MILCMD_DRAW_ROUNDED_RECTANGLE_ANIMATE) == 72);
456
Debug.
Assert
(sizeof(MILCMD_DRAW_ELLIPSE) == 40);
539
Debug.
Assert
(sizeof(MILCMD_DRAW_ELLIPSE_ANIMATE) == 56);
591
Debug.
Assert
(sizeof(MILCMD_DRAW_GEOMETRY) == 16);
639
Debug.
Assert
(sizeof(MILCMD_DRAW_IMAGE) == 40);
693
Debug.
Assert
(sizeof(MILCMD_DRAW_IMAGE_ANIMATE) == 40);
737
Debug.
Assert
(sizeof(MILCMD_DRAW_GLYPH_RUN) == 8);
777
Debug.
Assert
(sizeof(MILCMD_DRAW_DRAWING) == 8);
823
Debug.
Assert
(sizeof(MILCMD_DRAW_VIDEO) == 40);
875
Debug.
Assert
(sizeof(MILCMD_DRAW_VIDEO_ANIMATE) == 40);
911
Debug.
Assert
(sizeof(MILCMD_PUSH_CLIP) == 8);
950
Debug.
Assert
(sizeof(MILCMD_PUSH_OPACITY_MASK) == 24);
991
Debug.
Assert
(sizeof(MILCMD_PUSH_OPACITY) == 8);
1038
Debug.
Assert
(sizeof(MILCMD_PUSH_OPACITY_ANIMATE) == 16);
1076
Debug.
Assert
(sizeof(MILCMD_PUSH_TRANSFORM) == 8);
1154
Debug.
Assert
(sizeof(MILCMD_PUSH_GUIDELINE_SET) == 8);
1193
Debug.
Assert
(sizeof(MILCMD_PUSH_GUIDELINE_Y1) == 8);
1238
Debug.
Assert
(sizeof(MILCMD_PUSH_GUIDELINE_Y2) == 16);
1281
Debug.
Assert
(sizeof(MILCMD_PUSH_EFFECT) == 8);
1325
Debug.
Assert
(sizeof(MILCMD_POP) == 1);
System\Windows\Media\Generated\RotateTransform.cs (2)
188
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
242
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\ScaleTransform.cs (2)
210
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
270
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\SkewTransform.cs (2)
210
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
270
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\SolidColorBrush.cs (2)
144
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
227
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\TransformGroup.cs (10)
138
Debug.
Assert
(!channel.IsOutOfBandChannel);
139
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
151
Debug.
Assert
(resource != null);
162
Debug.
Assert
(resource != null);
224
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
289
Debug.
Assert
(_duceResource.IsOnChannel(channel));
334
Debug.
Assert
(!channel.IsOutOfBandChannel);
335
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
362
Debug.
Assert
(!channel.IsOutOfBandChannel);
363
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
System\Windows\Media\Generated\TranslateTransform.cs (2)
166
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
214
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\VideoDrawing.cs (4)
103
Debug.
Assert
(!channel.IsOutOfBandChannel);
104
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
188
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
240
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Generated\VisualBrush.cs (8)
104
Debug.
Assert
(element != null);
107
Debug.
Assert
(target._DispatcherLayoutResult != null);
108
Debug.
Assert
(target._DispatcherLayoutResult.Status == System.Windows.Threading.DispatcherOperationStatus.Pending);
110
Debug.
Assert
(abortStatus);
128
Debug.
Assert
(!channel.IsOutOfBandChannel);
129
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
215
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
319
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\Geometry.cs (5)
193
Debug.
Assert
(pWorldMatrix != null);
299
Debug.
Assert
(pbPathData != (byte*)0);
420
Debug.
Assert
(pbPathData != (byte*)0);
622
Debug.
Assert
(pbPathData != (byte*)0);
706
Debug.
Assert
(pbPathData != (byte*)0);
System\Windows\Media\GeometryDrawing.cs (1)
58
Debug.
Assert
(!ctx.ShouldStopWalking);
System\Windows\Media\GeometryGroup.cs (1)
66
Debug.
Assert
(pg.CanFreeze);
System\Windows\Media\GlyphRun.cs (6)
631
Debug.
Assert
(clusterMap[currentClusterStart] < lastGlyphInCluster);
1335
Debug.
Assert
(!IsSideways);
1594
Debug.
Assert
(!IsSideways);
1873
Debug.
Assert
(_glyphTypeface != null);
2375
Debug.
Assert
(!IsInitializing);
2386
Debug.
Assert
(!IsInitialized);
System\Windows\Media\GlyphRunDrawing.cs (1)
54
Debug.
Assert
(!ctx.ShouldStopWalking);
System\Windows\Media\GlyphsSerializer.cs (5)
109
Debug.
Assert
(_clusters[characterIndex] > glyphClusterStart);
120
Debug.
Assert
(_indices.Count > glyphClusterStart - _glyphClusterInitialOffset);
126
Debug.
Assert
(_characters == null || _characters.Count == 0 || _indices.Count == _characters.Count);
174
Debug.
Assert
(_glyphStringBuider.Length == 0);
326
Debug.
Assert
(caretStopStringLength == sb.ToString().Length);
System\Windows\Media\GlyphTypeface.cs (2)
1393
Debug.
Assert
(charBufferRange.Length > 0);
1468
Debug.
Assert
(glyphIndices != null || glyphMetrics != null);
System\Windows\Media\GuidelineCollection.cs (2)
57
Debug.
Assert
(!isDynamic || guidelinesX.Length % 2 == 0);
66
Debug.
Assert
(!isDynamic || guidelinesY.Length % 2 == 0);
System\Windows\Media\HitTestWithGeometryDrawingContextWalker.cs (8)
43
Debug.
Assert
(geometry != null);
343
Debug.
Assert
(_modifierStack != null);
344
Debug.
Assert
(_modifierStack.Count > 0);
354
Debug.
Assert
((_modifierStack.Count > 0) || (_currentTransform == null));
362
Debug.
Assert
((_modifierStack.Count > 0) || (_currentClip == null));
366
Debug.
Assert
(currentModifier == null);
392
Debug.
Assert
(_intersectionDetail != IntersectionDetail.FullyContains);
397
Debug.
Assert
(intersectionDetail != IntersectionDetail.NotCalculated);
System\Windows\Media\HitTestWithPointDrawingContextWalker.cs (7)
346
Debug.
Assert
(_pointStack != null);
347
Debug.
Assert
(_pointStack.Count > 0);
383
Debug.
Assert
(_noOpLayerDepth >= 1);
420
Debug.
Assert
(!_currentLayerIsNoOp);
421
Debug.
Assert
(_noOpLayerDepth == 0);
431
Debug.
Assert
(_currentLayerIsNoOp);
432
Debug.
Assert
(_noOpLayerDepth == 0);
System\Windows\Media\HostVisual.cs (9)
151
Debug.
Assert
(target != null);
152
Debug.
Assert
(target.Dispatcher.Thread == Thread.CurrentThread);
204
Debug.
Assert
(_target != null);
205
Debug.
Assert
(_target.Dispatcher.Thread == Thread.CurrentThread);
227
Debug.
Assert
(!targetsHandle.IsNull);
263
Debug.
Assert
(IsOnChannel(channel));
276
Debug.
Assert
(_target._contentRoot.IsOnChannel(channel));
277
Debug.
Assert
(_target.OutOfBandChannel == MediaContext.CurrentMediaContext.OutOfBandChannel);
279
Debug.
Assert
(!created);
System\Windows\Media\Imaging\BitmapCodecInfo.cs (9)
49
Debug.
Assert
(codecInfoHandle != null);
100
Debug.
Assert
(length >= 0);
143
Debug.
Assert
(length >= 0);
186
Debug.
Assert
(length >= 0);
229
Debug.
Assert
(length >= 0);
272
Debug.
Assert
(length >= 0);
315
Debug.
Assert
(length >= 0);
358
Debug.
Assert
(length >= 0);
401
Debug.
Assert
(length >= 0);
System\Windows\Media\Imaging\BitmapDecoder.cs (4)
951
Debug.
Assert
(_syncObject != null);
1033
Debug.
Assert
((uri.Scheme == Uri.UriSchemeHttp) || (uri.Scheme == Uri.UriSchemeHttps));
1034
Debug.
Assert
(stream.CanSeek);
1188
Debug.
Assert
(decoder != IntPtr.Zero);
System\Windows\Media\Imaging\BitmapDownload.cs (1)
413
Debug.
Assert
(false);
System\Windows\Media\Imaging\BitmapEncoder.cs (2)
380
Debug.
Assert
(_supportsGlobalThumbnail);
412
Debug.
Assert
(_supportsGlobalMetadata);
System\Windows\Media\Imaging\BitmapFrameDecode.cs (7)
56
Debug.
Assert
(decoder != null);
146
Debug.
Assert
(decoder != null);
451
Debug.
Assert
(_decoder != null);
705
Debug.
Assert
(_decoder is LateBoundBitmapDecoder);
706
Debug.
Assert
(IsDownloading == false);
711
Debug.
Assert
(_decoder.InternalDecoder != null);
716
Debug.
Assert
(_syncObject != null);
System\Windows\Media\Imaging\BitmapFrameEncode.cs (2)
49
Debug.
Assert
(source != null);
178
Debug.
Assert
(sourceBitmapFrameEncode._source != null);
System\Windows\Media\Imaging\BitmapImage.cs (5)
236
Debug.
Assert
(_decoder != null);
374
Debug.
Assert
(decoder.SyncObject != null);
380
Debug.
Assert
(!_decoder.IsDownloading);
449
Debug.
Assert
(oldWidth > 0 && oldHeight > 0);
476
Debug.
Assert
(false);
System\Windows\Media\Imaging\BitmapMetadata.cs (4)
504
Debug.
Assert
(blockWriter != null);
505
Debug.
Assert
(blockWriter.MetadataBlocks != null);
932
Debug.
Assert
(length >= 0);
974
Debug.
Assert
(length >= 0);
System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (1)
177
Debug.
Assert
(metadataHandle != null && !metadataHandle.IsInvalid);
System\Windows\Media\Imaging\BitmapPalette.cs (7)
165
Debug.
Assert
(source != null);
168
Debug.
Assert
(bitmapSource != null && !bitmapSource.IsInvalid);
202
Debug.
Assert
(palette != null);
270
Debug.
Assert
(palette != null && !palette.IsInvalid);
283
Debug.
Assert
(_palette != null && !_palette.IsInvalid);
312
Debug.
Assert
(_palette != null && !_palette.IsInvalid);
338
Debug.
Assert
(cActualColors == numColors);
System\Windows\Media\Imaging\BitmapPalettes.cs (1)
296
Debug.
Assert
(key < c_maxPalettes);
System\Windows\Media\Imaging\BitmapSizeOptions.cs (4)
209
Debug.
Assert
(_preservesAspectRatio == true);
216
Debug.
Assert
(_preservesAspectRatio == true);
223
Debug.
Assert
(_preservesAspectRatio == false);
264
Debug.
Assert
(false);
System\Windows\Media\Imaging\BitmapSource.cs (5)
562
Debug.
Assert
(_syncObject != null);
800
Debug.
Assert
(_isSourceCached);
980
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
1012
Debug.
Assert
(_duceResource.IsOnChannel(channel));
1198
Debug.
Assert
(destFmt == colorConvertedBitmap.Format);
System\Windows\Media\Imaging\BitmapSourceSafeMILHandle.cs (1)
91
Debug.
Assert
(wicBitmap != IntPtr.Zero);
System\Windows\Media\Imaging\BitmapVisualManager.cs (2)
91
Debug.
Assert
((sizeX > 0) && (sizeY > 0));
92
Debug.
Assert
((dpiX > 0) && (dpiY > 0));
System\Windows\Media\Imaging\InteropBitmapSource.cs (4)
65
Debug.
Assert
(_unmanagedSource != null && !_unmanagedSource.IsInvalid);
96
Debug.
Assert
(_unmanagedSource != null && !_unmanagedSource.IsInvalid);
143
Debug.
Assert
(_unmanagedSource != null && !_unmanagedSource.IsInvalid);
389
Debug.
Assert
(_sizeOptions.Rotation == Rotation.Rotate0);
System\Windows\Media\Imaging\LateBoundBitmapDecoder.cs (1)
315
Debug.
Assert
(newStream.CanSeek == true);
System\Windows\Media\Imaging\RenderTargetBitmap.cs (2)
268
Debug.
Assert
(renderTargetBitmap != null && !renderTargetBitmap.IsInvalid);
274
Debug.
Assert
(bitmapSource != null && !bitmapSource.IsInvalid);
System\Windows\Media\Imaging\TransformedBitmap.cs (1)
153
Debug.
Assert
(DoubleUtil.IsZero(m.M11) && DoubleUtil.IsZero(m.M22));
System\Windows\Media\Imaging\WriteableBitmap.cs (12)
228
Debug.
Assert
(locked);
612
Debug.
Assert
(_pBackBufferLock == null);
659
Debug.
Assert
(!_isWaitingForCommit);
834
Debug.
Assert
(!(backwardsCompat && (sourceRect.X < 0 || sourceRect.Y < 0 || sourceRect.Width < 0 || sourceRect.Height < 0)));
871
Debug.
Assert
(!(backwardsCompat && sourceBufferStride < 1));
876
Debug.
Assert
(!backwardsCompat);
1195
Debug.
Assert
(_duceResource.IsOnChannel(channel));
1238
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
1302
Debug.
Assert
(_isWaitingForCommit); // How else are we here?
1305
Debug.
Assert
(_lockCount == 0); // How else are we here?
1306
Debug.
Assert
(_hasDirtyRects); // How else are we here?
1316
Debug.
Assert
(_duceResource.IsOnChannel(channel)); // How else are we here?
System\Windows\Media\LinearGradientBrush.cs (1)
135
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
System\Windows\Media\MatrixStack.cs (4)
163
Debug.
Assert
(!IsEmpty);
175
Debug.
Assert
(!IsEmpty);
191
Debug.
Assert
(_size == 0); // The stack must be empty before this is called.
192
Debug.
Assert
(_highWaterMark <= _items.Length);
System\Windows\Media\MediaContext.cs (23)
211
Debug.
Assert
(dispatcher.Reserved0 == null);
367
Debug.
Assert
(CheckAccess());
1371
Debug.
Assert
(Channel != null);
1397
Debug.
Assert
(dispatcher.Reserved0 == cm);
1420
Debug.
Assert
(CheckAccess());
1429
Debug.
Assert
(CheckAccess());
1460
Debug.
Assert
(_timeManager != null);
1489
Debug.
Assert
(dispatcher != null);
1490
Debug.
Assert
(iv != null);
1502
Debug.
Assert
(!_isDisposed);
1503
Debug.
Assert
(iv != null);
1530
Debug.
Assert
(dispatcher != null);
1531
Debug.
Assert
(iv != null);
1542
Debug.
Assert
(iv != null);
1592
Debug.
Assert
(callback != null);
1597
Debug.
Assert
(arg != null);
1638
Debug.
Assert
(op != null);
1676
Debug.
Assert
(CheckAccess());
1800
Debug.
Assert
(CheckAccess());
1801
Debug.
Assert
(
2042
Debug.
Assert
(CheckAccess());
2044
Debug.
Assert
(!_isDisposed);
2045
Debug.
Assert
(_registeredICompositionTargets != null);
System\Windows\Media\MediaContextNotificationWindow.cs (1)
150
Debug.
Assert
(_ownerMediaContext != null);
System\Windows\Media\MediaPlayer.cs (1)
582
Debug.
Assert
(_duceResource._duceResource.IsOnChannel(channel));
System\Windows\Media\MediaPlayerState.cs (2)
887
Debug.
Assert
(absoluteUri.IsAbsoluteUri);
987
Debug.
Assert
(_nativeMedia != null && !_nativeMedia.IsInvalid);
System\Windows\Media\MediaSystem.cs (1)
136
Debug.
Assert
(s_refCount > 0);
System\Windows\Media\MILUtilities.cs (10)
90
Debug.
Assert
(pD3DMatrix[2] == 0.0f || Single.IsNaN(pD3DMatrix[2]));
91
Debug.
Assert
(pD3DMatrix[3] == 0.0f || Single.IsNaN(pD3DMatrix[3]));
99
Debug.
Assert
(pD3DMatrix[6] == 0.0f || Single.IsNaN(pD3DMatrix[6]));
100
Debug.
Assert
(pD3DMatrix[7] == 0.0f || Single.IsNaN(pD3DMatrix[7]));
106
Debug.
Assert
(pD3DMatrix[8] == 0.0f || Single.IsNaN(pD3DMatrix[8]));
107
Debug.
Assert
(pD3DMatrix[9] == 0.0f || Single.IsNaN(pD3DMatrix[9]));
108
Debug.
Assert
(pD3DMatrix[10] == 1.0f || Single.IsNaN(pD3DMatrix[10]));
109
Debug.
Assert
(pD3DMatrix[11] == 0.0f || Single.IsNaN(pD3DMatrix[11]));
117
Debug.
Assert
(pD3DMatrix[14] == 0.0f || Single.IsNaN(pD3DMatrix[14]));
118
Debug.
Assert
(pD3DMatrix[15] == 1.0f || Single.IsNaN(pD3DMatrix[15]));
System\Windows\Media\PathGeometry.cs (30)
138
Debug.
Assert
(pathData.Size >= currentOffset + sizeof(MIL_PATHGEOMETRY));
159
Debug.
Assert
(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_PATHFIGURE));
179
Debug.
Assert
(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT));
180
Debug.
Assert
(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT));
189
Debug.
Assert
(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_LINE));
190
Debug.
Assert
(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_LINE));
204
Debug.
Assert
(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_BEZIER));
205
Debug.
Assert
(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_BEZIER));
221
Debug.
Assert
(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_QUADRATICBEZIER));
222
Debug.
Assert
(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_QUADRATICBEZIER));
237
Debug.
Assert
(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_ARC));
238
Debug.
Assert
(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_ARC));
258
Debug.
Assert
(pathData.SerializedData.Length >= currentOffset + sizeof(MIL_SEGMENT_POLY));
259
Debug.
Assert
(pathData.Size >= currentOffset + sizeof(MIL_SEGMENT_POLY));
263
Debug.
Assert
(pSegmentPoly->Count <= Int32.MaxValue);
270
Debug.
Assert
(pathData.SerializedData.Length >=
274
Debug.
Assert
(pathData.Size >=
368
Debug.
Assert
(result != null);
387
Debug.
Assert
(figureCollection != null);
503
Debug.
Assert
(sameSegCount == 1);
534
Debug.
Assert
(sameSegCount == 1);
593
Debug.
Assert
(pbPathData != (byte*)0);
637
Debug.
Assert
(pPathData1 != (byte*)0);
641
Debug.
Assert
(pPathData2 != (byte*)0);
777
Debug.
Assert
(!pathData.IsEmpty());
796
Debug.
Assert
(pbPathData != (byte*)0);
852
Debug.
Assert
(pbPathData1 != (byte*)0);
856
Debug.
Assert
(pbPathData2 != (byte*)0);
885
Debug.
Assert
(detail != IntersectionDetail.NotCalculated);
1005
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
System\Windows\Media\PathStreamGeometryContext.cs (17)
84
Debug.
Assert
(figureCount > 0);
95
Debug.
Assert
(segmentCount > 0);
106
Debug.
Assert
(_currentFigure != null);
121
Debug.
Assert
(_currentFigure == null || _figures != null);
248
Debug.
Assert
(_figures != null);
249
Debug.
Assert
(_currentFigure != null);
305
Debug.
Assert
(false);
317
Debug.
Assert
(_currentSegmentPoints == null);
327
Debug.
Assert
(points != null);
344
Debug.
Assert
(_figures != null);
345
Debug.
Assert
(_currentFigure != null);
347
Debug.
Assert
(count != 0);
373
Debug.
Assert
(_currentFigure != null);
377
Debug.
Assert
(count > 0);
418
Debug.
Assert
(count % 3 == 0);
435
Debug.
Assert
(count % 2 == 0);
444
Debug.
Assert
(false);
System\Windows\Media\Pen.cs (7)
92
Debug.
Assert
((MIL_PEN_CAP)PenLineCap.Flat == MIL_PEN_CAP.MilPenCapFlat);
93
Debug.
Assert
((MIL_PEN_CAP)PenLineCap.Square == MIL_PEN_CAP.MilPenCapSquare);
94
Debug.
Assert
((MIL_PEN_CAP)PenLineCap.Round == MIL_PEN_CAP.MilPenCapRound);
95
Debug.
Assert
((MIL_PEN_CAP)PenLineCap.Triangle == MIL_PEN_CAP.MilPenCapTriangle);
102
Debug.
Assert
((MIL_PEN_JOIN)PenLineJoin.Miter == MIL_PEN_JOIN.MilPenJoinMiter);
103
Debug.
Assert
((MIL_PEN_JOIN)PenLineJoin.Bevel == MIL_PEN_JOIN.MilPenJoinBevel);
104
Debug.
Assert
((MIL_PEN_JOIN)PenLineJoin.Round == MIL_PEN_JOIN.MilPenJoinRound);
System\Windows\Media\PixelFormat.cs (7)
68
Debug.
Assert
(mask != null);
172
Debug.
Assert
(Marshal.SizeOf(typeof(Guid)) == 16);
514
Debug.
Assert
(pixelFormatInfo != IntPtr.Zero);
527
Debug.
Assert
(channelCount >= 1);
538
Debug.
Assert
(cbBytes > 0);
547
Debug.
Assert
(cbBytes == channelMask.Length);
615
Debug.
Assert
(pixelFormatInfo != IntPtr.Zero);
System\Windows\Media\RadialGradientBrush.cs (1)
76
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
System\Windows\Media\RenderCapability.cs (3)
39
Debug.
Assert
(mediaContext != null);
166
Debug.
Assert
(mediaContext != null);
177
Debug.
Assert
(mediaContext != null);
System\Windows\Media\RenderContext.cs (1)
91
Debug.
Assert
(channel != null);
System\Windows\Media\RenderData.cs (16)
87
Debug.
Assert
(cbRecordSize >= 0);
90
Debug.
Assert
((_curOffset % 8) == 0);
91
Debug.
Assert
((cbRecordSize % 8) == 0);
92
Debug.
Assert
((sizeof(RecordHeader) % 8) == 0);
110
Debug.
Assert
((_buffer != null) && (_buffer.Length >= newOffset));
113
Debug.
Assert
(_buffer.Length > 0);
138
Debug.
Assert
(ctx != null);
240
Debug.
Assert
(!this.IsFrozen);
280
Debug.
Assert
(_dependentResources[i] as Freezable == null);
372
Debug.
Assert
(_duceResource.IsOnChannel(channel));
402
Debug.
Assert
(_duceResource.IsOnChannel(channel));
454
Debug.
Assert
(_duceResource.IsOnChannel(channel));
469
Debug.
Assert
(cbRequiredSize >= 0);
479
Debug.
Assert
(_buffer.Length < cbRequiredSize);
489
Debug.
Assert
(newSize >= cbRequiredSize);
515
Debug.
Assert
(index <= (uint)Int32.MaxValue);
System\Windows\Media\StreamGeometry.cs (5)
113
Debug.
Assert
((_data != null) && (_data.Length >= sizeof(MIL_PATHGEOMETRY)));
137
Debug.
Assert
((_data != null) && (_data.Length >= sizeof(MIL_PATHGEOMETRY)));
157
Debug.
Assert
((_data != null) && (_data.Length >= sizeof(MIL_PATHGEOMETRY)));
393
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
463
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media\textformatting\TextCharacters.cs (3)
201
Debug.
Assert
(characterBufferReference.CharacterBuffer == _characterBufferReference.CharacterBuffer);
202
Debug.
Assert
(offsetToFirstChar >= 0 && offsetToFirstChar < _length);
292
Debug.
Assert
(shapeables != null);
System\Windows\Media\Typeface.cs (1)
522
Debug.
Assert
(i > 0);
System\Windows\Media\VideoDrawing.cs (1)
43
Debug.
Assert
(!ctx.ShouldStopWalking);
System\Windows\Media\Visual.cs (23)
580
Debug.
Assert
(BitmapEffectStateField.GetValue(this) != null);
658
Debug.
Assert
(IsOnChannel(channel));
659
Debug.
Assert
(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentNodeConnected));
860
Debug.
Assert
(channelsToCyclicBrushMap[channel] > 0);
886
Debug.
Assert
(cyclicBrushToChannelsMap[cyclicBrush] > 0);
911
Debug.
Assert
(cyclicBrushToChannelsMap != null);
912
Debug.
Assert
(cyclicBrushToChannelsMap.ContainsKey(cyclicBrush));
913
Debug.
Assert
(cyclicBrushToChannelsMap[cyclicBrush] > 0);
934
Debug.
Assert
(channelsToCyclicBrushMap != null);
935
Debug.
Assert
(channelsToCyclicBrushMap.ContainsKey(channel));
936
Debug.
Assert
(channelsToCyclicBrushMap[channel] > 0);
1312
Debug.
Assert
(CheckFlagsAnd(VisualFlags.ReentrancyFlag)); // Exit must be matched with Enter. See Enter comments.
2091
Debug.
Assert
(BitmapEffectStateField.GetValue(this) != null);
2222
Debug.
Assert
(bitmapEffectState != null);
2261
Debug.
Assert
(intersectionDetail != IntersectionDetail.NotCalculated);
2319
Debug.
Assert
(intersectionDetail != IntersectionDetail.NotCalculated);
2383
Debug.
Assert
(resultCallback != null);
2444
Debug.
Assert
(intersectionDetail != IntersectionDetail.NotCalculated);
3220
Debug.
Assert
(currentBitmapEffect.IsFrozen == emulatingEffect.IsFrozen);
3289
Debug.
Assert
(bitmapEffectState != null);
4490
Debug.
Assert
(ancestor != null);
4607
Debug.
Assert
((group == null) || (group.Children.Count > 0));
4685
Debug.
Assert
(ancestor != null);
System\Windows\Media\VisualBrush.cs (10)
194
Debug.
Assert
(!_pendingLayout);
237
Debug.
Assert
(element != null);
259
Debug.
Assert
(_pendingLayout);
263
Debug.
Assert
(element != null);
274
Debug.
Assert
(_DispatcherLayoutResult != null);
275
Debug.
Assert
(_DispatcherLayoutResult.Status == DispatcherOperationStatus.Pending);
277
Debug.
Assert
(abortStatus);
289
Debug.
Assert
(_pendingLayout);
292
Debug.
Assert
(element != null);
330
Debug.
Assert
(_reentrancyFlag); // Exit must be matched with Enter. See Enter comments.
System\Windows\Media\VisualCollection.cs (16)
90
Debug.
Assert
(_owner != null);
96
Debug.
Assert
(_owner != null);
102
Debug.
Assert
(_owner != null);
109
Debug.
Assert
(_owner != null);
273
Debug.
Assert
(_items != null);
403
Debug.
Assert
(value != null);
404
Debug.
Assert
(_items[index] == null);
405
Debug.
Assert
(value._parent == null);
406
Debug.
Assert
(!value.IsRootElement);
421
Debug.
Assert
(_items[index] != null);
477
Debug.
Assert
(_items[addedPosition] == null);
556
Debug.
Assert
(visual._parent != null);
671
Debug.
Assert
(_items[i]._parent == _owner);
839
Debug.
Assert
(visual._parent != null);
840
Debug.
Assert
(destination == null || destination._parent == visual._parent);
997
Debug.
Assert
(_index == -2);
System\Windows\Media\VisualProxy.cs (7)
160
Debug.
Assert
(count == 0);
182
Debug.
Assert
(count == 1);
298
Debug.
Assert
(index != PROXY_NOT_FOUND);
353
Debug.
Assert
(index >= 0 && index < Count);
396
Debug.
Assert
(index >= 0 && index < Count);
475
Debug.
Assert
(index >= 0 && index < Count);
576
Debug.
Assert
(delta % 2 == 0 && newLength >= 2);
System\Windows\Media\VisualTarget.cs (5)
51
Debug.
Assert
(!_connected);
76
Debug.
Assert
(channel != null);
77
Debug.
Assert
(outOfBandChannel != null);
99
Debug.
Assert
(!resourceCreated);
189
Debug.
Assert
(_connected);
System\Windows\Media\VisualTreeHelper.cs (1)
172
Debug.
Assert
(reference == null);
System\Windows\Media3D\Generated\AmbientLight.cs (2)
121
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
183
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\AxisAngleRotation3D.cs (2)
166
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
214
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\Camera.cs (2)
114
Debug.
Assert
(!channel.IsOutOfBandChannel);
115
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
System\Windows\Media3D\Generated\DiffuseMaterial.cs (4)
128
Debug.
Assert
(!channel.IsOutOfBandChannel);
129
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
221
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
267
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\DirectionalLight.cs (2)
140
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
208
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\EmissiveMaterial.cs (4)
121
Debug.
Assert
(!channel.IsOutOfBandChannel);
122
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
199
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
244
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\GeometryModel3D.cs (8)
114
Debug.
Assert
(!channel.IsOutOfBandChannel);
115
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
163
Debug.
Assert
(!channel.IsOutOfBandChannel);
164
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
212
Debug.
Assert
(!channel.IsOutOfBandChannel);
213
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
305
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
374
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\MaterialGroup.cs (10)
134
Debug.
Assert
(!channel.IsOutOfBandChannel);
135
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
147
Debug.
Assert
(resource != null);
158
Debug.
Assert
(resource != null);
220
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
285
Debug.
Assert
(_duceResource.IsOnChannel(channel));
330
Debug.
Assert
(!channel.IsOutOfBandChannel);
331
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
358
Debug.
Assert
(!channel.IsOutOfBandChannel);
359
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
System\Windows\Media3D\Generated\MatrixCamera.cs (2)
162
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
218
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\MatrixTransform3D.cs (2)
140
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
175
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\MeshGeometry3D.cs (2)
206
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
303
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\Model3D.cs (2)
114
Debug.
Assert
(!channel.IsOutOfBandChannel);
115
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
System\Windows\Media3D\Generated\Model3DGroup.cs (10)
134
Debug.
Assert
(!channel.IsOutOfBandChannel);
135
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
147
Debug.
Assert
(resource != null);
158
Debug.
Assert
(resource != null);
220
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
303
Debug.
Assert
(_duceResource.IsOnChannel(channel));
351
Debug.
Assert
(!channel.IsOutOfBandChannel);
352
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
379
Debug.
Assert
(!channel.IsOutOfBandChannel);
380
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
System\Windows\Media3D\Generated\OrthographicCamera.cs (2)
140
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
232
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\PerspectiveCamera.cs (2)
140
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
232
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\PointLight.cs (2)
121
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
213
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\QuaternionRotation3D.cs (2)
143
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
185
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\RotateTransform3D.cs (4)
143
Debug.
Assert
(!channel.IsOutOfBandChannel);
144
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
255
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
319
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\ScaleTransform3D.cs (2)
268
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
340
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\SpecularMaterial.cs (4)
121
Debug.
Assert
(!channel.IsOutOfBandChannel);
122
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
221
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
267
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\SpotLight.cs (2)
184
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
294
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Generated\Transform3DGroup.cs (10)
134
Debug.
Assert
(!channel.IsOutOfBandChannel);
135
Debug.
Assert
(!targetResource.GetHandle(channel).IsNull);
147
Debug.
Assert
(resource != null);
158
Debug.
Assert
(resource != null);
220
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
285
Debug.
Assert
(_duceResource.IsOnChannel(channel));
330
Debug.
Assert
(!channel.IsOutOfBandChannel);
331
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
358
Debug.
Assert
(!channel.IsOutOfBandChannel);
359
Debug.
Assert
(!thisResource.GetHandle(channel).IsNull);
System\Windows\Media3D\Generated\TranslateTransform3D.cs (2)
193
Debug.
Assert
(!skipOnChannelCheck || _duceResource.IsOnChannel(channel));
247
Debug.
Assert
(_duceResource.IsOnChannel(channel));
System\Windows\Media3D\Matrix3D.cs (7)
1045
Debug.
Assert
(IsDistinguishedIdentity);
1057
Debug.
Assert
(IsDistinguishedIdentity);
1073
Debug.
Assert
(IsDistinguishedIdentity);
1199
Debug.
Assert
(!IsDistinguishedIdentity);
1200
Debug.
Assert
(IsAffine);
1216
Debug.
Assert
(!IsDistinguishedIdentity);
1217
Debug.
Assert
(IsAffine);
System\Windows\Media3D\Rect3D.cs (1)
62
Debug.
Assert
(size.IsEmpty == IsEmpty);
System\Windows\Media3D\Viewport2DVisual3D.cs (3)
595
Debug.
Assert
(Geometry == null || Geometry is MeshGeometry3D);
623
Debug.
Assert
(Geometry == null || Geometry is MeshGeometry3D);
651
Debug.
Assert
(Geometry == null || Geometry is MeshGeometry3D);
System\Windows\Media3D\Viewport3DVisual.cs (6)
342
Debug.
Assert
(child != null);
343
Debug.
Assert
(child.InternalVisualParent == null);
393
Debug.
Assert
(child != null);
394
Debug.
Assert
(child.InternalVisualParent == this);
730
Debug.
Assert
(IsOnChannel(channel));
819
Debug.
Assert
(IsOnChannel(channel));
System\Windows\Media3D\Visual3D.cs (13)
246
Debug.
Assert
(child != null);
247
Debug.
Assert
(child.InternalVisualParent == null);
294
Debug.
Assert
(child != null);
295
Debug.
Assert
(child.InternalVisualParent == this);
960
Debug.
Assert
(InternalVisualParent == newParent);
968
Debug.
Assert
(InternalVisualParent == newParent);
1090
Debug.
Assert
(model != null);
1270
Debug.
Assert
(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentConnected));
1271
Debug.
Assert
(IsOnChannel(channel));
1462
Debug.
Assert
(IsOnChannel(channel));
1463
Debug.
Assert
(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentNodeConnected));
1660
Debug.
Assert
(ancestor != null);
1808
Debug.
Assert
(ancestor != null);
System\Windows\Navigation\BaseUriHelper.cs (2)
181
Debug.
Assert
(uri != null && uri.IsAbsoluteUri && SecurityHelper.AreStringTypesEqual(uri.Scheme, System.IO.Packaging.PackUriHelper.UriSchemePack) && IsPackApplicationUri(uri));
198
Debug.
Assert
(string.Equals(partName, uri.GetComponents(UriComponents.Path, UriFormat.UriEscaped), StringComparison.OrdinalIgnoreCase));
System\Windows\PresentationSource.cs (1)
548
Debug.
Assert
(uie is UIElement3D or UIElement);
System\Windows\ReverseInheritProperty.cs (1)
207
Debug.
Assert
(originChangedAction != null);
System\Windows\UIElement.cs (5)
3121
Debug.
Assert
(intersectionDetail != IntersectionDetail.NotCalculated);
3210
Debug.
Assert
(_proxy.IsOnChannel(channel));
3280
Debug.
Assert
(!CheckFlagsAnd(channel, VisualProxyFlags.IsContentConnected));
3281
Debug.
Assert
(_proxy.IsOnChannel(channel));
4158
Debug.
Assert
(value == Visibility.Visible || value == Visibility.Hidden || value == Visibility.Collapsed);
System\Windows\UIElement3D.cs (1)
1348
Debug.
Assert
(value == Visibility.Visible || value == Visibility.Hidden || value == Visibility.Collapsed);
PresentationFramework (1112)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (1)
301
Debug.
Assert
(tv != null);
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (2)
395
Debug.
Assert
(target != null);
465
Debug.
Assert
(startNode != null);
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (1)
235
Debug.
Assert
(textView != null);
MS\Internal\AppModel\Journaling.cs (11)
130
Debug.
Assert
(value.JEGroupState == this);
131
Debug.
Assert
(_groupExitEntry == null || _groupExitEntry.ContentId == value.ContentId);
226
Debug.
Assert
(this.KeepAliveRoot == contentObject); // set by ctor; shouldn't change
233
Debug.
Assert
(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);
234
Debug.
Assert
(this.KeepAliveRoot != null);
417
Debug.
Assert
(pageFunction != null && pageFunction.KeepAlive);
462
Debug.
Assert
(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);
467
Debug.
Assert
(pf != null);
499
Debug.
Assert
(!pageFunction.KeepAlive);
565
Debug.
Assert
(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);
578
Debug.
Assert
(pageFunction != null);
MS\Internal\AppModel\JournalNavigationScope.cs (2)
277
Debug.
Assert
(journal != null);
456
Debug.
Assert
(sender == _journal);
MS\Internal\Commands\CommandHelpers.cs (3)
101
Debug.
Assert
(controlType != null);
102
Debug.
Assert
(command != null);
103
Debug.
Assert
(executedRoutedEventHandler != null);
MS\Internal\Controls\CustomCategoryAttribute.cs (1)
23
Debug.
Assert
("Content".Equals(name, StringComparison.Ordinal)
MS\Internal\Controls\InkCanvasFeedbackAdorner.cs (1)
150
Debug.
Assert
(_frameSize != new Size(0, 0));
MS\Internal\Controls\InkCanvasInnerCanvas.cs (1)
35
Debug.
Assert
(inkCanvas != null);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (10)
89
Debug.
Assert
(annotation != null);
131
Debug.
Assert
((token & AllValues) != 0);
619
Debug.
Assert
(false);
634
Debug.
Assert
(cargo != null);
658
Debug.
Assert
(false);
706
Debug.
Assert
(false);
815
Debug.
Assert
(snc.IsExpanded);
823
Debug.
Assert
(snc.IsExpanded);
1261
Debug.
Assert
(_attachedAnnotation != null && _attachedAnnotation.Annotation == args.Annotation);
1275
Debug.
Assert
(_attachedAnnotation != null && _attachedAnnotation.Annotation == args.Annotation);
MS\Internal\Controls\StickyNote\StickyNoteContentControl.cs (3)
206
Debug.
Assert
(node != null && !IsEmpty);
233
Debug.
Assert
(node != null);
378
Debug.
Assert
(node != null && !IsEmpty);
MS\Internal\Controls\StickyNote\StickyNoteHelper.cs (2)
91
Debug.
Assert
(!helper.IsLocked(flag));
101
Debug.
Assert
(_helper.IsLocked(_flag));
MS\Internal\Data\CollectionViewGroupInternal.cs (2)
525
Debug.
Assert
(subgroup != null);
547
Debug.
Assert
(subgroup != null);
MS\Internal\Data\CompositeCollectionView.cs (1)
461
Debug.
Assert
(args.Action == NotifyCollectionChangedAction.Remove);
MS\Internal\Data\DefaultValueConverter.cs (1)
477
Debug.
Assert
(sourceType != targetType);
MS\Internal\Data\DisplayMemberTemplateSelector.cs (1)
28
Debug.
Assert
(!(String.IsNullOrEmpty(displayMemberPath) && String.IsNullOrEmpty(stringFormat)));
MS\Internal\Data\XmlBindingWorker.cs (2)
40
Debug.
Assert
(_xpath != null);
446
Debug.
Assert
(ContextNode != null);
MS\Internal\DataStreams.cs (1)
276
Debug.
Assert
(state != null);
MS\Internal\Documents\ColumnResult.cs (1)
177
Debug.
Assert
(_paragraphs != null && _paragraphs.Count > 0);
MS\Internal\Documents\ContentElementCollection.cs (5)
41
Debug.
Assert
(owner != null);
176
Debug.
Assert
(Items[item.Index] == item);
312
Debug.
Assert
(collection != null);
704
Debug.
Assert
(BelongsToOwner(item) && Items[item.Index] == item);
714
Debug.
Assert
(BelongsToOwner(Items[i + 1]));
MS\Internal\Documents\HostedElements.cs (5)
80
Debug.
Assert
(_currentTextSegment == 0);
97
Debug.
Assert
(((ITextPointer)_currentPosition).CompareTo(_textSegments[_currentTextSegment].Start) >= 0 &&
108
Debug.
Assert
(((ITextPointer)_currentPosition).CompareTo(_textSegments[_currentTextSegment].Start) >= 0);
187
Debug.
Assert
(_currentPosition.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward) is IInputElement);
191
Debug.
Assert
(_currentPosition.GetAdjacentElement(LogicalDirection.Forward) is IInputElement);
MS\Internal\Documents\TableColumnCollectionInternal.cs (8)
49
Debug.
Assert
(Items[index] == null);
68
Debug.
Assert
(BelongsToOwner(Items[i]));
115
Debug.
Assert
(BelongsToOwner(Items[i]));
140
Debug.
Assert
(item != null && item.Index == -1);
141
Debug.
Assert
(Items[index] == null);
177
Debug.
Assert
(item != null);
292
Debug.
Assert
(BelongsToOwner(Items[i]));
300
Debug.
Assert
(BelongsToOwner(Items[i + count]));
MS\Internal\Documents\TableTextElementCollectionInternal.cs (8)
72
Debug.
Assert
(BelongsToOwner(Items[i]));
241
Debug.
Assert
(BelongsToOwner(Items[i]));
261
Debug.
Assert
(item != null && item.Index == -1);
262
Debug.
Assert
(Items[index] == null);
290
Debug.
Assert
(BelongsToOwner(item) && Items[item.Index] == item);
304
Debug.
Assert
(BelongsToOwner(Items[i + 1]));
373
Debug.
Assert
(BelongsToOwner(Items[i]));
390
Debug.
Assert
(BelongsToOwner(item) && Items[item.Index] == item);
MS\Internal\Documents\TextParagraphView.cs (10)
155
Debug.
Assert
(lines != null && lines.Count > 0);
161
Debug.
Assert
(false);
273
Debug.
Assert
(lines != null && lines.Count > 0);
277
Debug.
Assert
(lineIndex >= 0 && lineIndex < lines.Count);
333
Debug.
Assert
(lineIndex < lines.Count);
419
Debug.
Assert
(dcp >= lines[lineIndex].StartPositionCP);
420
Debug.
Assert
(dcp < lines[lineIndex].EndPositionCP ||
532
Debug.
Assert
(lines != null && lines.Count > 0);
569
Debug.
Assert
(lines != null && lines.Count > 0);
696
Debug.
Assert
(lines != null && lines.Count > 0);
MS\Internal\Documents\UndoManager.cs (3)
120
Debug.
Assert
(((UndoManager)undoManager)._scope == null);
155
Debug.
Assert
(((UndoManager)undoManager)._scope == scope);
285
Debug.
Assert
(false);
MS\Internal\Globalization\BamlResourceContent.cs (1)
116
Debug.
Assert
(match.Value.Length > 0 && match.Value[0] == BamlConst.EscapeChar);
MS\Internal\Globalization\BamlResourceSerializer.cs (1)
82
Debug.
Assert
(elementNode != null);
MS\Internal\Globalization\BamlTreeMap.cs (1)
576
Debug.
Assert
(node.NodeType == BamlNodeType.StartElement);
MS\Internal\Globalization\BamlTreeNode.cs (2)
567
Debug.
Assert
(value.Category != LocalizationCategory.Ignore && value.Category != LocalizationCategory.Inherit);
701
Debug.
Assert
(value.Category != LocalizationCategory.Ignore && value.Category != LocalizationCategory.Inherit);
MS\Internal\Globalization\LocalizableResourceBuilder.cs (1)
448
Debug.
Assert
(inheritableAttribute != null);
MS\Internal\Globalization\LocalizationComments.cs (1)
355
Debug.
Assert
(enumPrefix != null && enumNames != null);
MS\Internal\Helper.cs (2)
409
Debug.
Assert
( fe != null );
847
Debug.
Assert
(item != null);
MS\Internal\Ink\ClipboardProcessor.cs (5)
85
Debug.
Assert
(dataObject != null && _preferredClipboardData!= null);
131
Debug.
Assert
(inkCanvasSelection.SelectedStrokes.Count == orderedStrokes.Count);
189
Debug.
Assert
(dataObject != null && _preferredClipboardData!= null);
259
Debug.
Assert
(_preferredClipboardData != null);
268
Debug.
Assert
(value != null);
MS\Internal\Ink\EditingCoordinator.cs (3)
259
Debug.
Assert
(behavior != null);
363
Debug.
Assert
(behavior == ActiveEditingBehavior);
611
Debug.
Assert
(newEditingBehavior != null);
MS\Internal\Ink\EraserBehavior.cs (3)
109
Debug.
Assert
(_cachedEraseMode != mode);
163
Debug.
Assert
(newEraseMode == InkCanvasEditingMode.EraseByPoint
355
Debug.
Assert
(null != e.HitStroke);
MS\Internal\Ink\InkCanvasSelection.cs (2)
142
Debug.
Assert
( _inkCanvas.EditingCoordinator.UserIsEditing == true );
208
Debug.
Assert
(strokes != null && elements != null);
MS\Internal\Ink\LassoHelper.cs (2)
172
System.Diagnostics.Debug.
Assert
(null != points);
173
System.Diagnostics.Debug.
Assert
((0 <= percentIntersect) && (100 >= percentIntersect));
MS\Internal\Ink\LassoSelectionBehavior.cs (6)
281
Debug.
Assert
(tappedElement == null);
287
Debug.
Assert
(tappedStroke == null);
376
System.Diagnostics.Debug.
Assert
(null != _lassoHelper);
393
Debug.
Assert
(canvas != null);
394
Debug.
Assert
(childElement != null);
396
Debug.
Assert
(canvas.CheckAccess());
MS\Internal\Ink\SelectionEditingBehavior.cs (2)
78
Debug.
Assert
(_hitResult != InkCanvasSelectionHitResult.None);
335
Debug.
Assert
(false);
MS\Internal\IO\Packaging\ByteStream.cs (3)
42
Debug.
Assert
(stream != null);
48
Debug.
Assert
(_access == FileAccess.Read);
117
Debug.
Assert
(_length > 0);
MS\Internal\IO\Packaging\PackageFilter.cs (7)
460
Debug.
Assert
(false);
469
Debug.
Assert
(false);
559
Debug.
Assert
(contentType != null && contentType.ToString().Length > 0);
585
Debug.
Assert
(dottedExtensionName != null);
613
Debug.
Assert
(pathWithGaps != null && stopGaps != null);
622
Debug.
Assert
(stopGaps.Length > nextStopGapToUse);
630
Debug.
Assert
(stopGaps.Length == nextStopGapToUse);
MS\Internal\IO\Packaging\XamlFilter.cs (8)
279
Debug.
Assert
(bufferCharacterCount >= 0);
345
Debug.
Assert
(_fixedPageContentExtractor != null);
380
Debug.
Assert
(_contextStack.Count == 0);
386
Debug.
Assert
(_topLevelReader != null);
393
Debug.
Assert
(false);
496
Debug.
Assert
(topOfStack.HasIndexableContent);
758
Debug.
Assert
(_xamlReader != null);
780
Debug.
Assert
(string.Equals(_xamlReader.LocalName, _fixedPageName, StringComparison.Ordinal));
MS\Internal\IO\Packaging\XmlFixedPageInfo.cs (1)
38
Debug.
Assert
(_pageNode != null);
MS\Internal\IO\Packaging\XmlGlyphRunInfo.cs (1)
41
Debug.
Assert
(_glyphsNode != null
MS\Internal\PtsHost\BaseParaClient.cs (2)
73
Debug.
Assert
(_paraHandle.Value == IntPtr.Zero || _paraHandle.Value == pfspara);
109
Debug.
Assert
(oldParaClient._visual != null);
MS\Internal\PtsHost\BaseParagraph.cs (1)
181
Debug.
Assert
(ParagraphEndCharacterPosition >= startPosition);
MS\Internal\PtsHost\CellParaClient.cs (4)
84
Debug.
Assert
(calculatedColumns != null
361
Debug.
Assert
(tableParaClient != null);
364
Debug.
Assert
( calculatedColumns != null
378
Debug.
Assert
(0 <= durCellWidth);
MS\Internal\PtsHost\CellParagraph.cs (3)
75
Debug.
Assert
(Cell.Table != null);
144
Debug.
Assert
(Cell.Table != null);
173
Debug.
Assert
(Cell.Table != null);
MS\Internal\PtsHost\ColumnPropertiesGroup.cs (1)
42
internal double ColumnWidth { get { Debug.
Assert
(!double.IsNaN(_columnWidth)); return _columnWidth; } }
MS\Internal\PtsHost\ContainerParagraph.cs (12)
235
Debug.
Assert
(_ur.ChangeType == PTS.FSKCHANGE.fskchInside); // Inconsistent UpdateRecord data
302
Debug.
Assert
(_ur == null); // UpdateRecord has been already created.
365
Debug.
Assert
(StructuralCache.CurrentFormatContext.FinitePage || _ur != null); // For bottomless case UpdateRecord needs to be created in UpdGetFirstChangeInSegment.
370
Debug.
Assert
(_ur == null);
488
Debug.
Assert
(iArea == 0);
654
Debug.
Assert
(iArea == 0);
739
Debug.
Assert
(pmcsclientOut == IntPtr.Zero);
784
Debug.
Assert
(iArea == 0);
869
Debug.
Assert
(pmcsclientOut == IntPtr.Zero);
923
Debug.
Assert
(ParagraphEndCharacterPosition >= startPosition);
1064
Debug.
Assert
(textPointer is TextPointer);
1190
Debug.
Assert
(ur.Next.FirstPara == null || ur.Next.FirstPara.Next == null);
MS\Internal\PtsHost\DtrList.cs (1)
315
Debug.
Assert
(_dtrs.Length > 0);
MS\Internal\PtsHost\FigureParaClient.cs (4)
407
Debug.
Assert
(visualChildren.Count == 1 && visualChildren[0] is ContainerVisual);
428
Debug.
Assert
(fskupd != PTS.FSKUPDATE.fskupdNoChange);
442
Debug.
Assert
(visualChildren.Count == 1 && visualChildren[0] is SectionVisual);
612
Debug.
Assert
(arrayColumnDesc.Length == 1);
MS\Internal\PtsHost\FigureParagraph.cs (1)
441
Debug.
Assert
(ParagraphEndCharacterPosition >= startPosition);
MS\Internal\PtsHost\FloaterParaClient.cs (4)
413
Debug.
Assert
(visualChildren.Count == 1 && visualChildren[0] is ContainerVisual);
434
Debug.
Assert
(fskupd != PTS.FSKUPDATE.fskupdNoChange);
448
Debug.
Assert
(visualChildren.Count == 1 && visualChildren[0] is SectionVisual);
620
Debug.
Assert
(arrayColumnDesc.Length == 1);
MS\Internal\PtsHost\FloaterParagraph.cs (4)
256
Debug.
Assert
(pmcsclientOut == IntPtr.Zero);
504
Debug.
Assert
(pmcsclientOut == IntPtr.Zero);
523
Debug.
Assert
(pmcsclientOut == IntPtr.Zero);
609
Debug.
Assert
(ParagraphEndCharacterPosition >= startPosition);
MS\Internal\PtsHost\FlowDocumentPage.cs (8)
322
Debug.
Assert
(child != null);
465
Debug.
Assert
(pageDetails.u.complex.cSections == 1); // Only one section is supported right now.
481
Debug.
Assert
(sectionDetails.u.withpagenotes.cEndnoteColumns == 0); // Footnotes are not supported yet.
483
Debug.
Assert
(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0);
484
Debug.
Assert
(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0);
521
Debug.
Assert
(false); // Complex columns are not supported yet.
932
Debug.
Assert
(e != null);
935
Debug.
Assert
(_structuralCache.TextContainer is TextContainer);
MS\Internal\PtsHost\Line.cs (2)
678
Debug.
Assert
(dcp >= 0 && (dcp + cch <= _line.Length));
698
Debug.
Assert
(cchGlyphRuns > 0 && glyphRunsCollection.Count > 0);
MS\Internal\PtsHost\ListMarkerSourceInfo.cs (1)
344
Debug.
Assert
(number >= 0 && number <= 9);
MS\Internal\PtsHost\PageVisual.cs (2)
72
Debug.
Assert
(vc.Count <= 1);
78
Debug.
Assert
(vc.Count <= 1);
MS\Internal\PtsHost\Pts.cs (1)
164
Debug.
Assert
(false);
MS\Internal\PtsHost\PtsHelper.cs (2)
593
Debug.
Assert
(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0);
594
Debug.
Assert
(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0);
MS\Internal\PtsHost\PtsHost.cs (5)
398
Debug.
Assert
(cnms == 1); // Only one section is supported right now.
2571
Debug.
Assert
(false);
2966
Debug.
Assert
(false);
3186
Debug.
Assert
(false);
3265
Debug.
Assert
(false);
MS\Internal\PtsHost\PtsPage.cs (12)
163
Debug.
Assert
(!canUpdate || _section.CanUpdate);
926
Debug.
Assert
(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0);
927
Debug.
Assert
(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0);
974
Debug.
Assert
(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0);
975
Debug.
Assert
(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0);
1054
Debug.
Assert
(visualChildren.Count == 1 && visualChildren[0] is ContainerVisual);
1137
Debug.
Assert
(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0);
1138
Debug.
Assert
(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0);
1340
Debug.
Assert
(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0);
1341
Debug.
Assert
(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0);
1401
Debug.
Assert
(sectionDetails.u.withpagenotes.cSegmentDefinedColumnSpanAreas == 0);
1402
Debug.
Assert
(sectionDetails.u.withpagenotes.cHeightDefinedColumnSpanAreas == 0);
MS\Internal\PtsHost\RowParagraph.cs (3)
196
Debug.
Assert
(cCells == Row.FormatCellCount);
260
Debug.
Assert
(_spannedCells[j] != null);
279
Debug.
Assert
(Row.Index - cell.RowIndex + 1 == cell.RowSpan);
MS\Internal\PtsHost\SubpageParaClient.cs (3)
340
Debug.
Assert
(visualChildren.Count == 1 && visualChildren[0] is ContainerVisual);
361
Debug.
Assert
(fskupd != PTS.FSKUPDATE.fskupdNoChange);
375
Debug.
Assert
(visualChildren.Count == 1 && visualChildren[0] is SectionVisual);
MS\Internal\PtsHost\SubpageParagraph.cs (3)
457
Debug.
Assert
(pmcsclientOut == IntPtr.Zero);
616
Debug.
Assert
(pmcsclientOut == IntPtr.Zero);
664
Debug.
Assert
(ParagraphEndCharacterPosition >= startPosition);
MS\Internal\PtsHost\TableParaClient.cs (22)
65
Debug.
Assert
( Table != null
324
Debug.
Assert
( TableParagraph.Table != null
367
Debug.
Assert
( TableParagraph.Table != null
438
Debug.
Assert
(TableParagraph.Table != null
607
Debug.
Assert
( TableParagraph.Table != null
826
Debug.
Assert
( TableParagraph.Table != null
897
Debug.
Assert
( TableParagraph.Table != null
951
Debug.
Assert
( TableParagraph.Table != null
1032
Debug.
Assert
( TableParagraph.Table != null
1126
Debug.
Assert
( TableParagraph.Table != null
1154
Debug.
Assert
(false);
1176
Debug.
Assert
(Table != null);
1202
Debug.
Assert
(Table != null);
1384
Debug.
Assert
(TableParagraph == (TableParagraph)(PtsContext.HandleToObject(tableObjDetails.fsnmTable)));
1414
Debug.
Assert
(tableDetails.cRows == cRowsActual);
1463
Debug.
Assert
(tableRowDetails.cCells == cCellsActual);
1592
Debug.
Assert
( cellParaClient.Visual != null
1721
Debug.
Assert
( cellParaClient.Visual != null
2050
Debug.
Assert
(0 <= _calculatedColumns[i].DurMinWidth && 0 <= _calculatedColumns[i].DurMaxWidth);
2105
Debug.
Assert
(0 < iP || DoubleUtil.IsZero(iP));
2375
Debug.
Assert
(_calculatedColumns[i].UserWidth.IsAbsolute);
2399
Debug.
Assert
(_calculatedColumns[i].DurMinWidth <= _calculatedColumns[i].DurMaxWidth);
MS\Internal\PtsHost\TableParagraph.cs (1)
316
Debug.
Assert
(Table.RowGroups.Count > 0);
MS\Internal\PtsHost\TextParaClient.cs (32)
137
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
164
Debug.
Assert
(!((TextParagraph) Paragraph).HasFiguresFloatersOrInlineObjects());
235
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
257
Debug.
Assert
(Paragraph.Element as ContentElement != e);
324
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
377
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
719
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
800
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
832
Debug.
Assert
(position is TextPointer);
863
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
882
Debug.
Assert
(position is TextPointer);
913
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
1070
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
1372
Debug.
Assert
(textDetails.fsktd == PTS.FSKTEXTDETAILS.fsktdCached);
1392
Debug.
Assert
(!PTS.ToBoolean(textDetails.fLinesComposite));
1472
Debug.
Assert
(insertionIndex >= 0 && insertionIndex <= lineVisuals.Count);
2624
Debug.
Assert
(index > 0);
2754
Debug.
Assert
(index == 0);
2755
Debug.
Assert
(elIndex == 0);
2769
Debug.
Assert
(index > 0);
2793
Debug.
Assert
(elIndex == arrayLineElement.Length - 1);
2794
Debug.
Assert
(index == arrayLineDesc.Length - 1);
2914
Debug.
Assert
(index > 0);
2962
Debug.
Assert
(backspaceCaretPosition != null);
3011
Debug.
Assert
(index == 0);
3012
Debug.
Assert
(elIndex == 0);
3026
Debug.
Assert
(index > 0);
3373
Debug.
Assert
(!PTS.ToBoolean(textDetails.fLinesComposite));
3491
Debug.
Assert
(_lineIndexFirstVisual == lineIndexFirstVisible);
3520
Debug.
Assert
(visualChildren.Count == (lineIndexFirstInvisible - lineIndexFirstVisible));
3930
Debug.
Assert
(localEnd > localStart);
4130
Debug.
Assert
(localEnd > localStart);
MS\Internal\PtsHost\TextParagraph.cs (1)
156
Debug.
Assert
(iArea == 0);
MS\Internal\PtsHost\TextParaLineResult.cs (4)
56
Debug.
Assert
(false);
72
Debug.
Assert
(false);
85
Debug.
Assert
(false);
101
Debug.
Assert
(false);
MS\Internal\PtsHost\UpdateRecord.cs (1)
42
Debug.
Assert
(Next != null); // This is the last UR, cannot merge with next.
MS\Internal\PtsTable\CalculatedColumn.cs (1)
54
Debug.
Assert
(0 <= durMinWidth && durMinWidth <= durMaxWidth);
MS\Internal\PtsTable\RowSpanVector.cs (10)
79
Debug.
Assert
(cell != null
87
Debug.
Assert
( start < _entries[i].Cell.ColumnIndex
93
Debug.
Assert
(_index < _size);
94
Debug.
Assert
(_index == 0 || _entries[_index - 1].Start < start);
95
Debug.
Assert
(start < _entries[_index].Start);
141
Debug.
Assert
(0 <= _index && _index < _size);
149
Debug.
Assert
(0 <= _index && _index < _size);
182
Debug.
Assert
(_entries[i].Cell != null);
183
Debug.
Assert
(i >= j);
249
Debug.
Assert
( _entries.Length > 0
MS\Internal\Text\ComplexLine.cs (1)
85
Debug.
Assert
(dcp >= 0);
MS\Internal\Text\DynamicPropertyReader.cs (5)
44
Debug.
Assert
(element != null);
56
Debug.
Assert
(element != null);
74
Debug.
Assert
(element != null);
233
Debug.
Assert
(element != null);
258
Debug.
Assert
(!position.IsNull);
MS\Internal\Text\LineMetrics.cs (2)
116
get { Debug.
Assert
((_packedData & HasBeenUpdatedMask) != 0); return _width; }
131
get { Debug.
Assert
((_packedData & HasBeenUpdatedMask) != 0); return _start; }
MS\Internal\Text\SimpleLine.cs (1)
130
Debug.
Assert
(content != null);
MS\Internal\Text\TextLineResult.cs (4)
56
Debug.
Assert
(false);
68
Debug.
Assert
(false);
79
Debug.
Assert
(false);
91
Debug.
Assert
(false);
MS\Internal\Text\TextProperties.cs (1)
257
Debug.
Assert
(element != null);
MS\Internal\Text\TypographyProperties.cs (1)
106
Debug.
Assert
((uint)PropertyId.PropertyCount <= 32);
MS\Internal\WindowsRuntime\Generated\WinRT.cs (1)
174
System.Diagnostics.Debug.
Assert
(_CanUnloadNow == null || _CanUnloadNow() == 0); // S_OK
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Context\XamlContextStack.cs (5)
30
Debug.
Assert
(CurrentFrame != null);
31
Debug.
Assert
(CurrentFrame.Depth == Depth);
89
Debug.
Assert
(iteratorFrame != null);
113
Debug.
Assert
(CurrentFrame.Depth == Depth);
126
Debug.
Assert
(CurrentFrame.Depth == Depth);
System\Windows\Application.cs (1)
1999
Debug.
Assert
(!uri.IsAbsoluteUri || BaseUriHelper.IsPackApplicationUri(uri));
System\Windows\Automation\Peers\DataGridAutomationPeer.cs (1)
204
Debug.
Assert
(false);
System\Windows\Automation\Peers\DateTimeAutomationPeer.cs (1)
696
Debug.
Assert
((int)owningButton.GetValue(Grid.RowProperty) > 0);
System\Windows\BroadcastEventHelper.cs (7)
26
Debug.
Assert
(d is FrameworkElement || d is FrameworkContentElement);
47
Debug.
Assert
(d is FrameworkElement || d is FrameworkContentElement);
51
Debug.
Assert
(loadedPending.Length == 3);
74
Debug.
Assert
(d is FrameworkElement || d is FrameworkContentElement);
95
Debug.
Assert
(d is FrameworkElement || d is FrameworkContentElement);
99
Debug.
Assert
(unloadedPending.Length == 3);
513
Debug.
Assert
( fo.IsFE );
System\Windows\Controls\Calendar.cs (14)
213
Debug.
Assert
(c != null);
269
Debug.
Assert
(c != null);
330
Debug.
Assert
(c != null);
387
Debug.
Assert
(c != null);
418
Debug.
Assert
(false);
545
Debug.
Assert
(c != null);
631
Debug.
Assert
(c != null);
929
Debug.
Assert
(false);
948
Debug.
Assert
(false);
988
Debug.
Assert
(false);
1021
Debug.
Assert
(false);
1093
Debug.
Assert
(false);
1195
Debug.
Assert
(this.DisplayMode == CalendarMode.Year);
1208
Debug.
Assert
(this.DisplayMode == CalendarMode.Decade);
System\Windows\Controls\CalendarBlackoutDatesCollection.cs (2)
115
Debug.
Assert
(dayInterval != 0);
330
Debug.
Assert
(day != null);
System\Windows\Controls\ColumnDefinition.cs (14)
104
Debug.
Assert
(_items != null);
126
Debug.
Assert
(_items != null);
166
Debug.
Assert
( _items[i] != null
184
Debug.
Assert
(_items[item.Index] == item);
199
Debug.
Assert
(_items[value.Index] == value);
335
Debug.
Assert
( _items[i] != null
344
Debug.
Assert
( _items[i + count] != null
600
Debug.
Assert
(value != null && value.Index == -1);
601
Debug.
Assert
(_items[index] == null);
618
Debug.
Assert
(value != null);
651
Debug.
Assert
( _items[i] != null
669
Debug.
Assert
( _items[value.Index] == value
682
Debug.
Assert
( _items[i + 1] != null
708
Debug.
Assert
(value >= _size);
System\Windows\Controls\ComboBox.cs (1)
640
Debug.
Assert
(_editableTextBoxSite == sender);
System\Windows\Controls\ContentPresenter.cs (3)
1014
Debug.
Assert
(tc.CanConvertTo(typeof(UIElement)));
1084
Debug.
Assert
(!(content is String) && !(content is UIElement)); // these are handled by different templates
1123
Debug.
Assert
(!(tc != null && tc.CanConvertTo(typeof(UIElement)))); // this is handled by a different template
System\Windows\Controls\DataGrid.cs (2)
5283
Debug.
Assert
(!IsUpdatingSelectedCells);
5289
Debug.
Assert
(IsUpdatingSelectedCells);
System\Windows\Controls\DataGridCellsPanel.cs (1)
1151
Debug.
Assert
(startIndex >= 0);
System\Windows\Controls\DataGridColumn.cs (1)
595
Debug.
Assert
(Width.IsStar);
System\Windows\Controls\DataGridColumnCollection.cs (2)
548
Debug.
Assert
(assignedDisplayIndexMap.ContainsKey(displayIndex));
692
Debug.
Assert
(removedDisplayIndex >= 0);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (1)
51
Debug.
Assert
(_columns.Contains(column));
System\Windows\Controls\DataGridRow.cs (1)
230
Debug.
Assert
(stateCode != DATAGRIDROW_stateNullCode);
System\Windows\Controls\DatePicker.cs (11)
210
Debug.
Assert
(dp != null);
256
Debug.
Assert
(dp != null);
321
Debug.
Assert
(dp != null);
339
Debug.
Assert
(dp != null);
366
Debug.
Assert
(dp != null);
438
Debug.
Assert
(dp != null);
534
Debug.
Assert
(dp != null);
586
Debug.
Assert
(dp != null);
954
Debug.
Assert
(c != null);
955
Debug.
Assert
(args != null);
977
Debug.
Assert
(e.AddedItems.Count < 2);
System\Windows\Controls\DateTimeHelper.cs (1)
181
Debug.
Assert
(DateTime.Compare(start, end) < 1);
System\Windows\Controls\DefinitionBase.cs (6)
326
Debug.
Assert
(value >= -1 && _parentIndex != value);
717
Debug.
Assert
(sharedSizeGroup != null);
733
Debug.
Assert
(_registry.Contains(key));
750
Debug.
Assert
(sharedSizeScope != null && sharedSizeGroupId != null);
763
Debug.
Assert
(!_registry.Contains(member));
847
Debug.
Assert
( _userSize.GridUnitType == GridUnitType.Auto
System\Windows\Controls\Frame.cs (21)
451
Debug.
Assert
(_ownJournalScope != null);
463
Debug.
Assert
(_ownJournalScope == null);
505
Debug.
Assert
(_journalOwnership == (JournalOwnership)GetValue(JournalOwnershipProperty));
630
Debug.
Assert
(sender == this && _ownJournalScope != null);
636
Debug.
Assert
(sender == this && _ownJournalScope != null);
643
Debug.
Assert
(sender == this && _ownJournalScope != null);
649
Debug.
Assert
(sender == this && _ownJournalScope != null);
656
Debug.
Assert
(sender == this && _ownJournalScope != null);
675
Debug.
Assert
(sender == this && _ownJournalScope != null);
680
Debug.
Assert
(sender == this && _ownJournalScope != null);
687
Debug.
Assert
(sender == this && _ownJournalScope != null);
750
Debug.
Assert
(d as Frame != null && ((Frame)d).NavigationService != null);
823
Debug.
Assert
(canGoFwd == (bool)GetValue(CanGoForwardProperty));
838
Debug.
Assert
(canGoBack == (bool)GetValue(CanGoBackProperty));
997
Debug.
Assert
(backStack == GetValue(BackStackProperty));
1009
Debug.
Assert
(fwdStack == GetValue(ForwardStackProperty));
1171
Debug.
Assert
(GetValue(BackStackProperty) == _ownJournalScope.BackStack);
1215
Debug.
Assert
(JournalEntry.GetType().IsSerializable);
1245
Debug.
Assert
(_journalOwnership == JournalOwnership.OwnsJournal);
1341
Debug.
Assert
(_ownJournalScope == null ^ _journalOwnership == JournalOwnership.OwnsJournal);
1374
Debug.
Assert
(_ownJournalScope == null ^ _journalOwnership == JournalOwnership.OwnsJournal);
System\Windows\Controls\Grid.cs (21)
424
Debug.
Assert
(DefinitionsU.Length > 0 && DefinitionsV.Length > 0);
683
Debug.
Assert
(DefinitionsU.Length > 0 && DefinitionsV.Length > 0);
931
Debug.
Assert
(0 <= cell.ColumnIndex && cell.ColumnIndex < DefinitionsU.Length);
932
Debug.
Assert
(0 <= cell.RowIndex && cell.RowIndex < DefinitionsV.Length);
1030
Debug.
Assert
(ExtData.DefinitionsU != null && ExtData.DefinitionsU.Length > 0);
1077
Debug.
Assert
(ExtData.DefinitionsV != null && ExtData.DefinitionsV.Length > 0);
1125
Debug.
Assert
(false);
1390
Debug.
Assert
(0 < count && 0 <= start && (start + count) <= definitions.Length);
1417
Debug.
Assert
(0 < count && 0 <= start && (start + count) <= definitions.Length);
1445
Debug.
Assert
(1 < count && 0 <= start && (start + count) <= definitions.Length);
1478
Debug.
Assert
( minSize <= preferredSize
1509
Debug.
Assert
(tempDefinitions[i].UserSize.IsAuto);
1518
Debug.
Assert
(!tempDefinitions[i].UserSize.IsAuto);
1526
Debug.
Assert
(_IsZero(sizeToDistribute));
1546
Debug.
Assert
(!tempDefinitions[i].UserSize.IsAuto);
1557
Debug.
Assert
(tempDefinitions[i].UserSize.IsAuto);
1566
Debug.
Assert
(_IsZero(sizeToDistribute));
1587
Debug.
Assert
( !double.IsInfinity(totalRemainingSize)
2096
Debug.
Assert
(!definitions[i].IsShared || !definitions[i].UserSize.IsStar);
2170
Debug.
Assert
(nonStarIndex == starDefinitionsCount);
3885
Debug.
Assert
(grid != null);
System\Windows\Controls\GridSplitter.cs (2)
423
Debug.
Assert
(_decorator != null);
446
Debug.
Assert
(_decorator != null);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (4)
640
Debug.
Assert
(column != null);
991
Debug.
Assert
(header != null || index != -1);
1074
Debug.
Assert
(header != null);
1083
Debug.
Assert
(header != null);
System\Windows\Controls\GridViewRowPresenter.cs (1)
287
Debug.
Assert
(column != null);
System\Windows\Controls\InkCanvas.cs (4)
2265
System.Diagnostics.Debug.
Assert
(_dynamicallySelectedStrokes.Contains(s));
2563
System.Diagnostics.Debug.
Assert
(object.ReferenceEquals(sender, DefaultDrawingAttributes));
2702
Debug.
Assert
(inkCanvas != null);
2775
Debug.
Assert
(inkCanvas != null);
System\Windows\Controls\InkPresenter.cs (3)
483
System.Diagnostics.Debug.
Assert
(sender == this.Strokes);
533
System.Diagnostics.Debug.
Assert
(stroke != null);
542
System.Diagnostics.Debug.
Assert
(stroke != null);
System\Windows\Controls\ItemCollection.cs (12)
722
Debug.
Assert
(_deferLevel == 0 || _collectionView == null || _deferInnerRefresh != null);
725
Debug.
Assert
(_deferLevel != 0 || _deferInnerRefresh == null);
1564
Debug.
Assert
(_isInitializing == false);
1572
Debug.
Assert
(_isInitializing == true);
1922
Debug.
Assert
(sender == _collectionView);
1928
Debug.
Assert
(sender == _collectionView);
1955
Debug.
Assert
(_collectionView != null);
1966
Debug.
Assert
(_collectionView == null || _deferInnerRefresh != null);
2196
Debug.
Assert
(e.NewStartingIndex >= 0);
2207
Debug.
Assert
(e.OldStartingIndex >= 0);
2215
Debug.
Assert
(e.OldStartingIndex >= 0);
2225
Debug.
Assert
(e.OldStartingIndex >= 0);
System\Windows\Controls\ItemsControl.cs (1)
3171
Debug.
Assert
(direction == FocusNavigationDirection.Up ||
System\Windows\Controls\PasswordTextNavigator.cs (1)
301
Debug.
Assert
(false);
System\Windows\Controls\PopupControlService.cs (1)
425
Debug.
Assert
(_currentToolTip == null);
System\Windows\Controls\Primitives\CalendarItem.cs (9)
231
Debug.
Assert
(false);
396
Debug.
Assert
(mode != CalendarMode.Month);
468
Debug.
Assert
(false);
550
Debug.
Assert
(e != null);
568
Debug.
Assert
(b != null);
928
Debug.
Assert
(this.Owner.DisplayMode == CalendarMode.Year);
1057
Debug.
Assert
(childButton != null);
1248
Debug.
Assert
(childButton != null);
1295
Debug.
Assert
(childButton != null);
System\Windows\Controls\Primitives\DataGridRowHeader.cs (1)
494
Debug.
Assert
(stateCode != DATAGRIDROWHEADER_stateNullCode);
System\Windows\Controls\Primitives\DatePickerTextBox.cs (1)
168
Debug.
Assert
(e.NewValue is bool);
System\Windows\Controls\Primitives\MenuBase.cs (4)
244
Debug.
Assert
(menu.HasPushedMenuMode);
898
Debug.
Assert
(_pushedMenuMode == null);
900
Debug.
Assert
(_pushedMenuMode != null);
909
Debug.
Assert
(_pushedMenuMode != null);
System\Windows\Controls\Primitives\Popup.cs (1)
2498
Debug.
Assert
(i >= 0 && i < GetNumberOfCombinations(placement));
System\Windows\Controls\Primitives\ScrollContentPresenter.cs (2)
806
Debug.
Assert
(IsScrollClient);
841
Debug.
Assert
(IsScrollClient);
System\Windows\Controls\Primitives\Selector.cs (9)
593
Debug.
Assert
(String.IsNullOrEmpty(path) || path == "/InnerText");
1536
Debug.
Assert
(IsSynchronizedWithCurrentItemPrivate);
1564
Debug.
Assert
(IsSynchronizedWithCurrentItemPrivate);
2183
Debug.
Assert
(String.IsNullOrEmpty(path) || path == "/InnerText");
2282
Debug.
Assert
(_owner.CheckAccess());
2295
Debug.
Assert
(_owner.CheckAccess());
2505
Debug.
Assert
(_owner.CheckAccess());
2562
Debug.
Assert
(_owner.CheckAccess());
2600
Debug.
Assert
(_owner.CheckAccess());
System\Windows\Controls\RowDefinition.cs (14)
104
Debug.
Assert
(_items != null);
126
Debug.
Assert
(_items != null);
166
Debug.
Assert
( _items[i] != null
184
Debug.
Assert
(_items[item.Index] == item);
199
Debug.
Assert
(_items[value.Index] == value);
335
Debug.
Assert
( _items[i] != null
344
Debug.
Assert
( _items[i + count] != null
600
Debug.
Assert
(value != null && value.Index == -1);
601
Debug.
Assert
(_items[index] == null);
618
Debug.
Assert
(value != null);
651
Debug.
Assert
( _items[i] != null
669
Debug.
Assert
( _items[value.Index] == value
682
Debug.
Assert
( _items[i + 1] != null
708
Debug.
Assert
(value >= _size);
System\Windows\Controls\ScrollViewer.cs (3)
1326
Debug.
Assert
(!MeasureDirty);
1735
Debug.
Assert
(_panningInfo != null);
1869
Debug.
Assert
(_panningInfo != null);
System\Windows\Controls\SelectedDatesCollection.cs (3)
414
Debug.
Assert
(false);
432
Debug.
Assert
(!_isAddingRange);
438
Debug.
Assert
(_isAddingRange);
System\Windows\Controls\SoundPlayerAction.cs (2)
158
Debug.
Assert
(m_player.IsLoadCompleted);
239
Debug.
Assert
(m_player.IsLoadCompleted);
System\Windows\Controls\Stack.cs (2)
814
Debug.
Assert
(measureElement.IsScrolling);
839
Debug.
Assert
(logicalOffset == 0 || (logicalOffset > 0 && logicalOffset < children.Count));
System\Windows\Controls\TextBlock.cs (23)
1426
Debug.
Assert
(lineCount == LineCount);
1539
Debug.
Assert
(lineCount == LineCount);
1691
Debug.
Assert
(lineCount == LineCount);
1795
Debug.
Assert
(lineCount == LineCount);
1800
Debug.
Assert
(lineIndex < lineCount);
1811
Debug.
Assert
(lineCount == LineCount);
1813
Debug.
Assert
(lineIndex < lineCount);
1839
Debug.
Assert
(lineBounds.Count > 0);
2063
Debug.
Assert
(lineCount == LineCount);
2207
Debug.
Assert
(lineCount == LineCount);
2478
Debug.
Assert
(lineIndex > 0);
2481
Debug.
Assert
(dcp >= 0);
2496
Debug.
Assert
(lineIndex < lineCount - 1);
2606
Debug.
Assert
(lineIndex > 0);
2609
Debug.
Assert
(dcp >= 0);
3416
Debug.
Assert
(IsLayoutDataValid);
3417
Debug.
Assert
(CheckFlags(Flags.RequiresAlignment));
3435
Debug.
Assert
(lineCount == LineCount);
3609
Debug.
Assert
(lineCount == LineCount);
3646
Debug.
Assert
(e != null);
3649
Debug.
Assert
(_complexContent.TextContainer is TextContainer);
3920
Debug.
Assert
(owner != null);
3921
Debug.
Assert
(textContainer != null);
System\Windows\Controls\TextSearch.cs (2)
783
Debug.
Assert
(_attachedTo != null);
798
Debug.
Assert
(_attachedTo != null);
System\Windows\Controls\VirtualizedCellInfoCollection.cs (10)
979
Debug.
Assert
(rowIndex >= 0);
1007
Debug.
Assert
(rowIndex >= 0);
1046
Debug.
Assert
(rowIndex >= 0);
1062
Debug.
Assert
(oldIndex >= 0);
1063
Debug.
Assert
(newIndex >= 0);
1152
Debug.
Assert
(columnIndex >= 0);
1195
Debug.
Assert
(columnIndex >= 0);
1234
Debug.
Assert
(columnIndex >= 0);
1253
Debug.
Assert
(oldIndex >= 0);
1254
Debug.
Assert
(newIndex >= 0);
System\Windows\Controls\VirtualizingStackPanel.cs (4)
3715
Debug.
Assert
(args.Action == NotifyCollectionChangedAction.Reset && args.ItemCount == 1);
9354
Debug.
Assert
(_cleanupDelay != null);
9375
Debug.
Assert
(_cleanupOperation != null);
9464
Debug.
Assert
(startIndex >= 0 && count > 0);
System\Windows\Controls\WebBrowser.cs (2)
546
Debug.
Assert
(clsid.ToString("D") == CLSID.WebBrowser);
584
Debug.
Assert
(_axIWebBrowser2 != null);
System\Windows\Data\BindingListCollectionView.cs (1)
739
Debug.
Assert
(true);
System\Windows\Data\ObjectDataProvider.cs (4)
164
Debug.
Assert
((_objectInstance == null) ? (_objectType == null) : (_objectType == _objectInstance.GetType()));
351
Debug.
Assert
(_mode != SourceMode.FromType);
452
Debug.
Assert
(_objectType != null);
525
Debug.
Assert
(_objectType != null);
System\Windows\Data\RelativeSource.cs (3)
172
Debug.
Assert
(_mode == RelativeSourceMode.FindAncestor);
210
Debug.
Assert
((!IsUninitialized) || (_mode == RelativeSourceMode.FindAncestor));
274
Debug.
Assert
(IsUninitialized);
System\Windows\Data\XmlDataProvider.cs (1)
772
Debug.
Assert
(doc != null);
System\Windows\Documents\AdornerLayer.cs (2)
640
Debug.
Assert
(adorner != null);
712
Debug.
Assert
(element != null);
System\Windows\Documents\ChildDocumentBlock.cs (4)
50
Debug.
Assert
(childContainer != null);
57
Debug.
Assert
(docRef != null);
75
Debug.
Assert
(newBlock != null);
130
Debug.
Assert
(ChildContainer.Highlights.GetLayer(typeof(TextSelection)) == null);
System\Windows\Documents\ColumnResizeAdorner.cs (1)
41
Debug.
Assert
(scope != null);
System\Windows\Documents\CompositionAdorner.cs (1)
59
Debug.
Assert
(textView != null && textView.RenderScope != null);
System\Windows\Documents\DocumentSequence.cs (9)
263
Debug.
Assert
(innerDP != null);
284
Debug.
Assert
(innerDP != null);
569
Debug.
Assert
(docRef != null);
576
Debug.
Assert
(paginator != null);
584
Debug.
Assert
(paginator != null);
1068
Debug.
Assert
(documentSequence != null);
1069
Debug.
Assert
(documentPaginator != null);
1070
Debug.
Assert
(documentPage != null);
1178
Debug.
Assert
(false);
System\Windows\Documents\DocumentSequenceHighlightLayer.cs (1)
78
Debug.
Assert
(ranges.Count > 0);
System\Windows\Documents\DocumentSequenceTextContainer.cs (12)
45
Debug.
Assert
(parent != null);
46
Debug.
Assert
(parent is FixedDocumentSequence);
233
Debug.
Assert
(_start != null);
246
Debug.
Assert
(_end != null);
398
Debug.
Assert
(docRef != null);
514
Debug.
Assert
(_parent != null);
662
Debug.
Assert
(sender != null);
663
Debug.
Assert
(args != null);
664
Debug.
Assert
(args.Ranges != null);
713
Debug.
Assert
(args.Ranges.Count > 0 && ((TextSegment)args.Ranges[0]).Start.CompareTo(((TextSegment)args.Ranges[0]).End) < 0);
1007
Debug.
Assert
(parentTextPointer != null);
1030
Debug.
Assert
(parentChangePosition != null);
System\Windows\Documents\DocumentSequenceTextPointer.cs (7)
38
Debug.
Assert
(childBlock != null);
39
Debug.
Assert
(childPosition != null);
569
Debug.
Assert
(_childTp != null);
897
Debug.
Assert
(direction == LogicalDirection.Backward);
942
Debug.
Assert
(tp != null);
954
Debug.
Assert
(thisTp.ChildBlock.ChildContainer == tp.ChildBlock.ChildContainer);
998
Debug.
Assert
(xGapAwareCompareTo(tp1, tp2) <= 0);
System\Windows\Documents\FixedDocument.cs (9)
349
Debug.
Assert
(page != null);
665
Debug.
Assert
(IsValidPageIndex(index));
711
Debug.
Assert
(fp != null);
1039
Debug.
Assert
(sender != null);
1040
Debug.
Assert
(args != null);
1041
Debug.
Assert
(args.Ranges != null);
1044
Debug.
Assert
(args.Ranges.Count > 0 && ((TextSegment)args.Ranges[0]).Start.CompareTo(((TextSegment)args.Ranges[0]).End) < 0);
1170
Debug.
Assert
(pageNo >= 0 && pageNo<PageCount);
1362
Debug.
Assert
(panel != null && page != null);
System\Windows\Documents\FixedElement.cs (3)
141
Debug.
Assert
((object)_start == (object)_end);
199
Debug.
Assert
(_object == null && e._type == ElementType.Object);
262
Debug.
Assert
(false);
System\Windows\Documents\FixedFindEngine.cs (13)
37
Debug.
Assert
(start != null);
38
Debug.
Assert
(end != null);
39
Debug.
Assert
( ((start is DocumentSequenceTextPointer) && (end is DocumentSequenceTextPointer)) ||
41
Debug.
Assert
(findPattern != null);
50
Debug.
Assert
(paginator != null);
90
Debug.
Assert
(firstSearchPageStart != null);
91
Debug.
Assert
(firstSearchPageEnd != null);
125
Debug.
Assert
(fixedDoc != null);
311
Debug.
Assert
(endAsFTP != null);
331
Debug.
Assert
(startAsFTP != null);
342
Debug.
Assert
(doc != null);
343
Debug.
Assert
(translatedPageNo >= 0 && translatedPageNo < doc.PageCount);
368
Debug.
Assert
(pageStream != null);
System\Windows\Documents\FixedFlowMap.cs (2)
136
Debug.
Assert
(fp >= 0 && fp < _flowOrder.Count);
168
Debug.
Assert
(flowOld.Type == FlowNodeType.Virtual || flowNew != null);
System\Windows\Documents\FixedHighlight.cs (3)
43
Debug.
Assert
(element != null && beginOffset >= 0 && endOffset >= 0);
143
Debug.
Assert
(_gBeginOffset >= 0);
144
Debug.
Assert
(_gEndOffset <= chrct);
System\Windows\Documents\FixedNode.cs (5)
81
Debug.
Assert
(childLevels >= 1);
97
Debug.
Assert
(childPath != null);
135
Debug.
Assert
(path != null && path.Length >= 2); // At least a page index and an element index
342
Debug.
Assert
(level < _path.Length);
353
Debug.
Assert
(_path.Length >= 2);
System\Windows\Documents\FixedPage.cs (4)
863
Debug.
Assert
(e != null);
899
Debug.
Assert
(currentLevelIndex >= 0 && currentLevelIndex <= ((Canvas)element).Children.Count);
1030
Debug.
Assert
(currentChildrens != null);
1172
Debug.
Assert
(pageStructure != null);
System\Windows\Documents\FixedPageStructure.cs (13)
41
Debug.
Assert
(pageIndex >= 0);
105
Debug.
Assert
(lineResult != null);
117
Debug.
Assert
(_lineResults != null);
155
Debug.
Assert
(_lineResults != null);
209
Debug.
Assert
(flowStart != null && flowStart.Type != FlowNodeType.Virtual);
210
Debug.
Assert
(flowEnd != null && flowEnd.Type != FlowNodeType.Virtual);
219
Debug.
Assert
(!rect.IsEmpty);
473
Debug.
Assert
(false);
537
Debug.
Assert
(glyphs!= null);
553
Debug.
Assert
(false);
624
Debug.
Assert
(false);
641
Debug.
Assert
(false);
679
Debug.
Assert
(_fixedSOMPageConstructor != null);
System\Windows\Documents\FixedSOMContainer.cs (7)
38
Debug.
Assert
(compared != null);
39
Debug.
Assert
(This != null);
47
Debug.
Assert
(compareHor != SpatialComparison.None);
48
Debug.
Assert
(compareVer != SpatialComparison.None);
103
Debug.
Assert
(false);
110
Debug.
Assert
(false);
224
Debug.
Assert
(container != null);
System\Windows\Documents\FixedSOMFixedBlock.cs (1)
163
Debug.
Assert
(SemanticBoxes[i] is FixedSOMTextRun || SemanticBoxes[i] is FixedSOMImage);
System\Windows\Documents\FixedSOMGroup.cs (5)
40
Debug.
Assert
(compared != null);
51
Debug.
Assert
(compareHor != SpatialComparison.None);
52
Debug.
Assert
(compareVer != SpatialComparison.None);
102
Debug.
Assert
(false);
109
Debug.
Assert
(false);
System\Windows\Documents\FixedSOMImage.cs (1)
70
Debug.
Assert
(path.Fill is ImageBrush);
System\Windows\Documents\FixedSOMLineCollection.cs (2)
60
Debug.
Assert
(point1.X == point2.X);
66
Debug.
Assert
(point1.Y == point2.Y);
System\Windows\Documents\FixedSOMPageConstructor.cs (10)
227
Debug.
Assert
(fixedPage != null);
241
Debug.
Assert
(_fixedPage != null);
246
Debug.
Assert
(obj != null);
374
Debug.
Assert
(obj is Image || obj is Path);
403
Debug.
Assert
(glyphs != null);
577
Debug.
Assert
(fixedBlock.SemanticBoxes.Count > 0);
632
Debug.
Assert
(textRunRect.Height != 0 && fixedBlock.LineHeight != 0);
1010
Debug.
Assert
(false);
1137
Debug.
Assert
(currentPageElement != null);
1147
Debug.
Assert
(nextPageElement != null);
System\Windows\Documents\FixedSOMSemanticBox.cs (3)
95
Debug.
Assert
(o != null);
105
Debug.
Assert
(compareHor != SpatialComparison.None && compareVer != SpatialComparison.None);
301
Debug.
Assert
(false);
System\Windows\Documents\FixedSOMTable.cs (2)
169
Debug.
Assert
(row != null);
185
Debug.
Assert
(row != null);
System\Windows\Documents\FixedSOMTextRun.cs (1)
43
Debug.
Assert
(otherRun != null);
System\Windows\Documents\FixedTextBuilder.cs (24)
197
Debug.
Assert
(!_IsBoundaryPage(pageIndex));
214
Debug.
Assert
(page != null);
215
Debug.
Assert
(page.IsInitialized);
384
Debug.
Assert
(fn.Type == FlowNodeType.Start);
474
Debug.
Assert
(pStart.CompareTo(pEnd) < 0);
513
Debug.
Assert
(fixes.Length == 1);
589
Debug.
Assert
(flowNode.Type == FlowNodeType.Run);
593
Debug.
Assert
(flowNode.Type == FlowNodeType.Run);
594
Debug.
Assert
(fixes != null);
807
Debug.
Assert
(pathPrefix != null);
830
Debug.
Assert
(prevRun != null);
831
Debug.
Assert
(currentRun != null);
1008
Debug.
Assert
(pathPrefix == null);
1009
Debug.
Assert
(level1Index >= 0);
1019
Debug.
Assert
(newPathPrefix != null);
1025
Debug.
Assert
(pathPrefix == null && newPathPrefix == null);
1089
Debug.
Assert
(false);
1292
Debug.
Assert
(false);
1315
Debug.
Assert
(e is Image);
1412
Debug.
Assert
(elem is FixedPage || elem is Canvas);
1563
Debug.
Assert
(false);
1677
Debug.
Assert
(run.EndIndex - run.StartIndex == run.Text.Length);
1751
Debug.
Assert
(uiElement != null);
1772
Debug.
Assert
(newLineResult != null);
System\Windows\Documents\FixedTextContainer.cs (8)
50
Debug.
Assert
(parent != null && parent is FixedDocument);
202
Debug.
Assert
(_start != null);
215
Debug.
Assert
(_end != null);
394
Debug.
Assert
(res);
410
Debug.
Assert
(highlights != null);
528
Debug.
Assert
(_fixedTextBuilder != null);
537
Debug.
Assert
(_containerElement != null);
619
Debug.
Assert
(start.CompareTo(end) <= 0);
System\Windows\Documents\FixedTextView.cs (11)
123
Debug.
Assert
(pos != null);
171
Debug.
Assert
(ftp != null);
248
Debug.
Assert
(startPosition != null && this.Contains(startPosition));
249
Debug.
Assert
(endPosition != null && this.Contains(endPosition));
413
Debug.
Assert
(pos != null);
472
Debug.
Assert
(false);
867
Debug.
Assert
(itp != null);
965
Debug.
Assert
(hitGlyphs != null);
1017
Debug.
Assert
(charStart - charCount == 1);
1028
Debug.
Assert
(charEnd - charCount == 1);
1135
Debug.
Assert
(symbolType == TextPointerContext.Text || symbolType == TextPointerContext.EmbeddedElement);
System\Windows\Documents\FlowNode.cs (2)
54
Debug.
Assert
( (type != FlowNodeType.Run) || ((int)cookie != 0));
99
Debug.
Assert
(_fp != fn._fp || (_fp == fn._fp) && (_scopeId == fn._scopeId));
System\Windows\Documents\FlowPosition.cs (12)
42
Debug.
Assert
(!FlowNode.IsNull(node));
131
Debug.
Assert
(flow != null);
178
Debug.
Assert
(dir == LogicalDirection.Forward || dir == LogicalDirection.Backward);
186
Debug.
Assert
(GetPointerContext(dir) == TextPointerContext.Text);
203
Debug.
Assert
(GetPointerContext(dir) == TextPointerContext.Text);
244
Debug.
Assert
(type == FlowNodeType.Object || type == FlowNodeType.Noop || type == FlowNodeType.Start || type == FlowNodeType.End);
375
Debug.
Assert
(this._OverlapAwareCompare(pEnd) < 0);
428
Debug.
Assert
(dir == LogicalDirection.Backward);
586
Debug.
Assert
(dir == LogicalDirection.Backward);
636
Debug.
Assert
(dir == LogicalDirection.Backward);
726
Debug.
Assert
(flow != null);
754
Debug.
Assert
(this._flowNode.Equals(flow._flowNode));
System\Windows\Documents\Glyphs.cs (4)
76
Debug.
Assert
(_glyphRunProperties != null);
241
Debug.
Assert
(glyphRunProperties.glyphIndices != null);
265
Debug.
Assert
(0 <= nibble && nibble <= 15);
339
Debug.
Assert
(parsedGlyphs.Count == glyphCount);
System\Windows\Documents\HighlightVisual.cs (4)
176
Debug.
Assert
(highlights != null);
245
Debug.
Assert
(bg != null);
251
Debug.
Assert
(highlightGeometry != null);
269
Debug.
Assert
(highlightGeometry != null);
System\Windows\Documents\Hyperlink.cs (1)
567
Debug.
Assert
(targetUri != null);
System\Windows\Documents\ImmComposition.cs (2)
312
Debug.
Assert
((oldSource == null) || (oldSource == _source));
332
Debug.
Assert
(newSource == _source);
System\Windows\Documents\NullTextContainer.cs (2)
183
Debug.
Assert
(_start != null);
196
Debug.
Assert
(_end != null);
System\Windows\Documents\NullTextNavigator.cs (5)
50
Debug.
Assert
(position is NullTextPointer || position is NullTextPointer);
66
Debug.
Assert
(position is NullTextPointer || position is NullTextPointer);
199
Debug.
Assert
(distance == 0);
316
Debug.
Assert
(false); // must never call this
324
Debug.
Assert
(false); // must never call this
System\Windows\Documents\PageContentAsyncResult.cs (2)
63
Debug.
Assert
(source == null || source.IsAbsoluteUri);
102
get { Debug.
Assert
(false); return null; }
System\Windows\Documents\RtfToXamlLexer.cs (1)
423
Debug.
Assert
(false);
System\Windows\Documents\RtfToXamlReader.cs (39)
2710
Debug.
Assert
(HasBorder);
5143
Debug.
Assert
(dnRow != null); // Need row
5144
Debug.
Assert
(dnRow != null && !dnRow.IsPending); // Row props attached when row is closed
5145
Debug.
Assert
(dnRow != null && dnRow.FormatState.RowFormat != null);
5574
Debug.
Assert
(Type == DocumentNodeType.dnTable);
5903
Debug.
Assert
(value >= 0);
5904
Debug.
Assert
(!IsPending);
5965
Debug.
Assert
(value == null || !value.IsPending);
6234
Debug.
Assert
(nUnfilledRowIndex != 0);
6326
Debug.
Assert
(nStart + nChild < Count);
6410
Debug.
Assert
(Count == 0 || (nStart >= 0 && nStart < Count));
6421
Debug.
Assert
(nStart + nChild < Count);
6439
Debug.
Assert
(nAt + dn.ChildCount <= nEnd);
6440
Debug.
Assert
(!dn.IsTerminated);
6449
Debug.
Assert
(dnChild.ChildCount == 0 && dnChild.IsTerminated);
6471
Debug.
Assert
(Count == 0 || (nStart >= 0 && nStart < Count));
6482
Debug.
Assert
(nStart + nChild < Count);
6500
Debug.
Assert
(nAt + dn.ChildCount <= nEnd);
6501
Debug.
Assert
(!dn.IsTerminated);
6513
Debug.
Assert
(dnChild.ChildCount == 0 && dnChild.IsTerminated);
6538
Debug.
Assert
(Count == 0 || (index >= 0 && index < Count));
6539
Debug.
Assert
(index + nChildCount < Count);
6568
Debug.
Assert
(Count == 0 || (index >= 0 && index < Count));
6610
Debug.
Assert
(EntryAt(i).ClosedParent != null);
6613
Debug.
Assert
(nAt + dn.ChildCount < Count);
6617
Debug.
Assert
(dnPa.IsPending || (nAt > dnPa.Index && nAt <= dnPa.Index + dnPa.ChildCount));
6635
Debug.
Assert
(dnPa != null && dnPa.Type == DocumentNodeType.dnTable);
6638
Debug.
Assert
(dnPa != null && dnPa.Type == DocumentNodeType.dnTableBody);
6641
Debug.
Assert
(dnPa != null && dnPa.Type == DocumentNodeType.dnRow);
6644
Debug.
Assert
(dnPa != null && dnPa.Type == DocumentNodeType.dnList);
6910
Debug.
Assert
(false);
7087
Debug.
Assert
(_fMain);
7134
Debug.
Assert
(dnPa.LastChildIndex >= nAt + nExcise - 1);
8212
Debug.
Assert
(dn.ChildCount == 0);
8240
Debug.
Assert
(dn.ChildCount == 0);
9870
Debug.
Assert
(nInsertAt >= 0 && nChildren > 0 && nInsertAt + nChildren - 1 < dna.Count);
11079
Debug.
Assert
(dna.Count > 0 && dna.EntryAt(dna.Count - 1).Type == DocumentNodeType.dnParagraph);
11294
Debug.
Assert
(!dnPara.IsTerminated);
11512
Debug.
Assert
(!dnTop.IsTerminated);
System\Windows\Documents\RubberbandSelector.cs (2)
323
Debug.
Assert
(range.first != null && range.second != null);
478
Debug.
Assert
(end >= begin);
System\Windows\Documents\Table.cs (2)
433
Debug.
Assert
(table != null);
485
Debug.
Assert
(_currentChildType != ChildrenTypes.BeforeFirst);
System\Windows\Documents\TableCell.cs (1)
406
Debug.
Assert
(value >= -1 && _parentIndex != value);
System\Windows\Documents\TableColumn.cs (1)
173
Debug.
Assert
(value >= -1 && _parentIndex != value);
System\Windows\Documents\TableRow.cs (5)
203
Debug.
Assert
(rowSpanVector != null);
230
Debug.
Assert
(i <= firstAvailableIndex);
250
Debug.
Assert
(_spannedCells != null);
260
Debug.
Assert
(_cells.Count <= _formatCellCount);
316
Debug.
Assert
(value >= -1 && _parentIndex != value);
System\Windows\Documents\TableRowGroup.cs (1)
267
Debug.
Assert
(value >= -1 && _parentIndex != value);
System\Windows\Documents\XamlToRtfWriter.cs (3)
232
Debug.
Assert
(openLists.Count > 0);
406
Debug.
Assert
(openLists.Count > 0);
437
Debug.
Assert
(openLists.Count > 0);
System\Windows\EventTrigger.cs (1)
308
Debug.
Assert
( eventTrigger._routedEventHandler == null && eventTrigger._source == null);
System\Windows\FrameworkContentElement.cs (7)
652
Debug.
Assert
(entry.Value == DependencyProperty.UnsetValue);
1482
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior0 == 0x08);
1483
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior1 == 0x10);
1484
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior2 == 0x20);
1497
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior0 == 0x08);
1498
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior1 == 0x10);
1499
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior2 == 0x20);
System\Windows\FrameworkElement.cs (12)
1937
Debug.
Assert
( IsTemplatedParentAnFE );
2347
Debug.
Assert
( foTemplatedParent.IsFE );
2612
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior0 == 0x08);
2613
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior1 == 0x10);
2614
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior2 == 0x20);
2627
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior0 == 0x08);
2628
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior1 == 0x10);
2629
Debug.
Assert
((uint)InternalFlags.InheritanceBehavior2 == 0x20);
2986
Debug.
Assert
(fe != null || fce != null);
3028
Debug.
Assert
( feTemplatedParent != null );
4097
Debug.
Assert
(sourceTransform != null);
4106
Debug.
Assert
(_transform != null);
System\Windows\FrameworkElementFactory.cs (2)
725
Debug.
Assert
( _frameworkTemplate != null );
801
Debug.
Assert
( _frameworkTemplate != null );
System\Windows\FrameworkTemplate.cs (2)
773
Debug.
Assert
(fo.TemplatedParent == templatedParent);
1144
Debug.
Assert
(!(rootElement is FrameworkElement) ||
System\Windows\Input\KeyboardNavigation.cs (2)
3118
Debug.
Assert
(DoubleUtil.GreaterThanOrClose(rangeEnd1, rangeStart1));
3119
Debug.
Assert
(DoubleUtil.GreaterThanOrClose(rangeEnd2, rangeStart2));
System\Windows\Interop\HwndHost.cs (1)
985
Debug.
Assert
(hwnd != null);
System\Windows\Localization.cs (1)
118
Debug.
Assert
(property == AttributesProperty);
System\Windows\Markup\Baml2006\Baml2006KeyRecord.cs (1)
72
Debug.
Assert
(StaticResources[StaticResources.Count - 1] is StaticResource);
System\Windows\Markup\Baml2006\Baml2006Reader.cs (4)
1533
Debug.
Assert
(dataByteSize == 1);
1673
Debug.
Assert
(ownerType != null);
1959
Debug.
Assert
(sr != null);
2594
Debug.
Assert
(property.Type.UnderlyingType == typeof(DependencyProperty));
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
196
Debug.
Assert
(wpfMember.DependencyProperty != null);
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (2)
139
Debug.
Assert
(bamlType != null);
169
Debug.
Assert
(bamlMember != null);
System\Windows\Markup\Baml2006\WpfXamlMember.cs (1)
132
Debug.
Assert
(!IsAttachable && !IsEvent);
System\Windows\Markup\BamlMapTable.cs (18)
72
Debug.
Assert
(null != xamlTypeMapper);
158
Debug.
Assert
(cmp > 0);
264
Debug.
Assert
(type.IsEnum);
269
Debug.
Assert
(ReflectionHelper.IsNullableType(type));
551
Debug.
Assert
(propType.IsEnum);
562
Debug.
Assert
(ReflectionHelper.IsNullableType(propType));
620
Debug.
Assert
(-id <= _knownStrings.Length);
625
Debug.
Assert
(id < StringIdMap.Count);
862
Debug.
Assert
(memberId < 0);
1094
Debug.
Assert
(
1106
Debug.
Assert
(bamlAssemblyInfoRecord.AssemblyId >= 0);
1117
Debug.
Assert
(AssemblyIdMap.Count == record.AssemblyId ||
1269
Debug.
Assert
(TypeIdMap.Count == record.TypeId ||
1286
Debug.
Assert
(ownerTypeName != null);
1287
Debug.
Assert
(attributeName != null);
1504
Debug.
Assert
(targetType != null && memberName != null);
1646
Debug.
Assert
(AttributeIdMap.Count == record.AttributeId ||
1662
Debug.
Assert
(StringIdMap.Count == record.StringId ||
System\Windows\Markup\BamlRecordReader.cs (35)
107
Debug.
Assert
(null != bamlStream);
108
Debug.
Assert
(null != parserContext && null != parserContext.XamlTypeMapper);
133
Debug.
Assert
(null != parserContext && null != parserContext.XamlTypeMapper);
342
Debug.
Assert
(bamlRecord.RecordType == BamlRecordType.LinePosition);
528
Debug.
Assert
( stackDepth == ReaderContextStack.Count );
544
Debug.
Assert
(bamlConnectionIdRecord.ConnectionId > 0);
556
Debug.
Assert
(0 == ReaderContextStack.Count); // if not zero we missed an EndElement
640
Debug.
Assert
(false);
729
Debug.
Assert
(ReaderFlags.DependencyObject == CurrentContext.ContextType);
811
Debug.
Assert
(ReaderFlags.DependencyObject == CurrentContext.ContextType ||
1016
Debug.
Assert
(_rootElement != null);
1066
Debug.
Assert
(null == ParentContext);
1233
Debug.
Assert
( CurrentContext.ContextType != ReaderFlags.PropertyComplexClr );
1234
Debug.
Assert
( CurrentContext.ContextType != ReaderFlags.PropertyComplexDP );
1286
Debug.
Assert
(CurrentContext.ContextType == ReaderFlags.ConstructorParams);
1316
Debug.
Assert
(parent is DependencyObject);
1435
Debug.
Assert
(param is String);
1478
Debug.
Assert
(paramString != null);
2114
Debug.
Assert
(serializerTypeId == (short)KnownElements.DependencyPropertyConverter);
2539
Debug.
Assert
(o is DependencyObject);
2755
Debug.
Assert
(element is DependencyObject);
2994
Debug.
Assert
(!holder.ReadOnly); // this is being checked in XamlReaderHelper, just assert
3019
Debug.
Assert
(arrayExt != null);
3138
Debug.
Assert
(holder.Collection == null);
3643
Debug.
Assert
(null != CurrentContext &&
3703
Debug.
Assert
(false);
3712
Debug.
Assert
(currentTarget is DependencyObject);
3726
Debug.
Assert
(false); // We do not expect to be here after all checks done in propertyType identification above
3788
Debug.
Assert
(genericType != null);
3832
Debug.
Assert
(memberInfo is MethodInfo);
3848
Debug.
Assert
(null != CurrentContext &&
3897
Debug.
Assert
(null != CurrentContext &&
4903
Debug.
Assert
(contentProperty != null);
5754
Debug.
Assert
(_attributeInfo != null);
5849
Debug.
Assert
(this.AttachedPropertyGetter != null);
System\Windows\Markup\BamlRecords.cs (8)
778
Debug.
Assert
(null == _writeCache[(int)record.RecordType]);
915
Debug.
Assert
( value <= 3 && value >= 0 );
1103
Debug.
Assert
(RecordSize < 0);
2399
Debug.
Assert
(value <= ExtensionIdMask);
2729
Debug.
Assert
(!ValueObjectSet);
4555
Debug.
Assert
( SerializerTypeId != 0 );
4728
Debug.
Assert
(arr.Length == 3 && arr[0] != null && arr[1] != null);
4771
Debug.
Assert
(arr.Length == 3 && arr[0] != null && arr[1] != null);
System\Windows\Markup\BamlRecordWriter.cs (11)
119
Debug.
Assert
(null != DocumentStartRecord);
137
Debug.
Assert
(null != DocumentStartRecord);
408
Debug.
Assert
(_deferElementDepth == 0);
409
Debug.
Assert
(_deferComplexPropertyDepth == 0);
410
Debug.
Assert
(_staticResourceElementDepth == 0);
411
Debug.
Assert
(_dynamicResourceElementDepth == 0);
412
Debug.
Assert
(_staticResourceRecordList == null);
430
Debug.
Assert
(_staticResourceElementDepth == 0);
881
Debug.
Assert
(_deferElementDepth == 2);
1070
Debug.
Assert
(extensionTypeId != (short)KnownElements.TypeExtension);
1087
Debug.
Assert
(typeValue != null);
System\Windows\Markup\BamlWriter.cs (4)
397
Debug.
Assert
(typeValue != null);
1286
Debug.
Assert
(stackNode != null);
1294
Debug.
Assert
(stackNode != null);
1302
Debug.
Assert
(stackNode != null);
System\Windows\Markup\Localizer\BamlLocalizableResource.cs (1)
62
Debug.
Assert
(other != null);
System\Windows\Markup\MarkupExtensionParser.cs (2)
1189
Debug.
Assert
(sb.Length > 0);
1190
Debug.
Assert
(!Char.IsWhiteSpace(sb[0]));
System\Windows\Markup\ParserContext.cs (1)
764
Debug.
Assert
(canDecrement);
System\Windows\Markup\Primitives\ElementMarkupObject.cs (4)
52
Debug.
Assert
(instance != null);
728
Debug.
Assert
(obj != null);
752
Debug.
Assert
(descriptor != null);
801
Debug.
Assert
(DO != null);
System\Windows\Markup\Primitives\FrameworkElementFactoryMarkupObject.cs (1)
30
Debug.
Assert
(factory != null);
System\Windows\Markup\Primitives\MarkupWriter.cs (4)
259
Debug.
Assert
( (object)key != null);
443
Debug.
Assert
(item != null && _writer != null);
833
Debug.
Assert
(property.PropertyDescriptor != null);
1037
Debug.
Assert
(property.Value != null);
System\Windows\Markup\XamlFigureLengthSerializer.cs (1)
251
Debug.
Assert
( unit == FigureUnitType.Pixel
System\Windows\Markup\XamlGridLengthSerializer.cs (1)
253
Debug.
Assert
( unit == GridUnitType.Pixel
System\Windows\Markup\XamlReader.cs (1)
1114
Debug.
Assert
(parent == null || root == parent);
System\Windows\Markup\XamlTypeMapper.cs (6)
875
Debug.
Assert
(propertyOwnerType != null);
904
Debug.
Assert
(attachedPropertyInfo.IsPublic ||
2138
Debug.
Assert
( propertyMember is DependencyProperty);
2319
Debug.
Assert
(memberName != null);
2322
Debug.
Assert
(memberInfo != null);
2337
Debug.
Assert
(targetType != null);
System\Windows\Markup\XmlnsDictionary.cs (1)
713
Debug.
Assert
(prefix != null);
System\Windows\Media\Animation\BeginStoryboard.cs (1)
189
Debug.
Assert
( frameworkTemplate != null );
System\Windows\Media\Animation\ControllableStoryboardAction.cs (1)
74
Debug.
Assert
( frameworkTemplate != null );
System\Windows\Media\Animation\Generated\ThicknessAnimation.cs (1)
217
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
327
Debug.
Assert
(animationClock.CurrentState != ClockState.Stopped);
System\Windows\Media\Animation\Generated\ThicknessKeyFrameCollection.cs (1)
483
Debug.
Assert
(_keyFrames[index] != null);
System\Windows\Media\Animation\Storyboard.cs (1)
266
Debug.
Assert
( nameScope == null );
System\Windows\Navigation\Journal.cs (7)
260
Debug.
Assert
(ValidateIndexes());
270
Debug.
Assert
(ValidateIndexes());
283
Debug.
Assert
(journalEntry.ContentId != 0);
333
Debug.
Assert
(ValidateIndexes());
428
Debug.
Assert
(ValidateIndexes());
476
Debug.
Assert
(je.GetType().IsSerializable);
581
Debug.
Assert
(ValidateIndexes());
System\Windows\Navigation\JournalEntry.cs (2)
296
Debug.
Assert
(_jeGroupState.JournalDataStreams == null);
313
Debug.
Assert
(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);
System\Windows\Navigation\NavigationService.cs (29)
95
Debug.
Assert
(_navigateQueueItem == null || _navigateQueueItem.IsPosted == false);
260
Debug.
Assert
(IsConsistent(navInfo));
292
Debug.
Assert
(navMode != NavigationMode.Refresh); // because of !IsSameUri() above
313
Debug.
Assert
(_navStatus == NavigationStatus.Navigating);
461
Debug.
Assert
(!(_bp is Visual));
600
Debug.
Assert
(_parentNavigationService == newParent);
879
Debug.
Assert
(_navigateQueueItem == null && _navStatus == NavigationStatus.Navigated);
903
Debug.
Assert
(finishingChildPageFunction == null ||
922
Debug.
Assert
(finishingChildPageFunction._Return == null);
956
Debug.
Assert
(pfReturnInfo == null);
962
Debug.
Assert
(pf.ParentPageFunctionId != Guid.Empty);
1001
Debug.
Assert
(IsConsistent(navInfo));
1026
Debug.
Assert
(!JournalScope.Journal.HasUncommittedNavigation);
1030
Debug.
Assert
(_navigateQueueItem == null);
1193
Debug.
Assert
(!JournalScope.Journal.HasUncommittedNavigation);
1210
Debug.
Assert
(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);
1213
Debug.
Assert
(_contentId != 0);
1217
Debug.
Assert
(_journalEntryGroupState == null ||
2115
Debug.
Assert
(navigateInfo.IsConsistent);
2262
Debug.
Assert
(_navStatus == NavigationStatus.Navigated);
2603
Debug.
Assert
(sender == _bp);
3086
Debug.
Assert
(IsConsistent(navigateInfo));
3118
Debug.
Assert
(destinationJournalEntry == null
3197
Debug.
Assert
(_contentId != 0 &&
3703
Debug.
Assert
(ps._Resume); // should've been set by JournalEntryPFxx.ResumePageFunction()
3807
Debug.
Assert
(parentPF._Return == null);
3909
Debug.
Assert
(parentEntryIndex < journal.CurrentIndex);
4414
Debug.
Assert
(_postedOp == null);
4505
Debug.
Assert
(child != null);
System\Windows\Navigation\NavigationWindow.cs (2)
228
Debug.
Assert
(_navigationService == null && _JNS == null);
320
Debug.
Assert
(_JNS != null);
System\Windows\Navigation\PageFunction.cs (2)
271
Debug.
Assert
((returnEventArgs == null) || (ra != null));
275
Debug.
Assert
(eh != null);
System\Windows\PropertyPath.cs (1)
435
Debug.
Assert
(aryIPI.Length > 0);
System\Windows\ResourceDictionary.cs (9)
197
Debug.
Assert
(classicResourceUri != null);
211
Debug.
Assert
(genericResourceUri != null);
1095
Debug.
Assert
(deferrableContent.Stream != null);
1096
Debug.
Assert
(deferrableContent.SchemaContext != null);
1097
Debug.
Assert
(deferrableContent.ObjectWriterFactory != null);
1098
Debug.
Assert
(deferrableContent.ServiceProvider != null);
1099
Debug.
Assert
(deferrableContent.RootObject != null);
1276
Debug.
Assert
(staticResources != null && staticResources.Count > 0);
1314
Debug.
Assert
(obj is DeferredResourceReference);
System\Windows\ResourceReferenceExpression.cs (1)
546
Debug.
Assert
(!_resource.IsFrozen);
System\Windows\Shapes\Shape.cs (5)
632
Debug.
Assert
(mode != Stretch.None);
654
Debug.
Assert
(mode == Stretch.UniformToFill);
686
Debug.
Assert
(geometry != null);
726
Debug.
Assert
(geometry != null);
737
Debug.
Assert
(_renderedGeometry != null);
System\Windows\Shell\JumpList.cs (12)
461
Debug.
Assert
(_initializing == false);
692
Debug.
Assert
(removedList != null);
693
Debug.
Assert
(shellObject != null);
767
Debug.
Assert
(false);
773
Debug.
Assert
(shellObjects != null);
810
Debug.
Assert
(jumpItems.Count != 0);
811
Debug.
Assert
(cdl != null);
866
Debug.
Assert
(jumpItems.Count != linksOnlyList.Count);
872
Debug.
Assert
(HRESULT.DESTS_E_NO_MATCHING_ASSOC_HANDLER != hr);
888
Debug.
Assert
(jumpTask != null);
1001
Debug.
Assert
(jumpPath != null);
1071
Debug.
Assert
(false);
System\Windows\Shell\ThumbButtonInfo.cs (1)
281
Debug.
Assert
(command != null);
System\Windows\StyleHelper.cs (54)
67
Debug.
Assert
(fe != null || fce != null);
106
Debug.
Assert
(fe != null || fce != null);
172
Debug.
Assert
((fe != null && fce == null)|| (fe == null && fce != null));
360
Debug.
Assert
(frameworkTemplate != null );
380
Debug.
Assert
( !frameworkTemplate.HasXamlNodeContent );
384
Debug.
Assert
(frameworkTemplate != null);
425
Debug.
Assert
( frameworkTemplate != null );
779
Debug.
Assert
(childIndex >= 0);
1287
Debug.
Assert
( childIndex != 0 ); // This should go to the other AddDelegateToFireTrigger overload
1345
Debug.
Assert
((fe != null && fce == null) || (fe == null && fce != null));
1377
Debug.
Assert
((fe != null && fce == null) || (fe == null && fce != null));
1378
Debug.
Assert
((fe != null && fe == container) || (fce != null && fce == container));
1379
Debug.
Assert
(newStyle != null || newFrameworkTemplate != null );
1441
Debug.
Assert
((fe != null && fce == null) || (fe == null && fce != null));
1442
Debug.
Assert
((fe != null && fe == container) || (fce != null && fce == container));
1443
Debug.
Assert
(oldStyle != null || oldFrameworkTemplate != null );
1677
Debug.
Assert
(oldStyle != null || oldFrameworkTemplate != null );
1695
Debug.
Assert
(dataField == ThemeStyleDataField);
1777
Debug.
Assert
(frameworkTemplate != null );
2051
Debug.
Assert
(frameworkTemplate != null );
2189
Debug.
Assert
(feContainer != null || fceContainer != null);
2224
Debug.
Assert
(oldFrameworkTemplate != null );
2273
Debug.
Assert
( oldFrameworkTemplate != null );
2487
Debug.
Assert
( feTemplatedParent != null );
2511
Debug.
Assert
(ownerStyle != null || frameworkTemplate != null );
2523
Debug.
Assert
( frameworkTemplate != null );
2892
Debug.
Assert
(dataField == ThemeStyleDataField);
3034
Debug.
Assert
(frameworkTemplate != null );
3048
Debug.
Assert
(frameworkTemplate != null );
3159
Debug.
Assert
(fe != null || fce != null);
3241
Debug.
Assert
(fe != null || fce != null);
3313
Debug.
Assert
(feContainer != null);
3322
Debug.
Assert
(feContainer != null);
3362
Debug.
Assert
(feContainer != null);
3385
Debug.
Assert
(feContainer != null);
3413
Debug.
Assert
(feContainer != null);
3457
Debug.
Assert
(fe != null || fce != null);
3458
Debug.
Assert
(container == fe || container == fce);
3498
Debug.
Assert
(fe != null || fce != null);
3499
Debug.
Assert
(container == fe || container == fce);
3908
Debug.
Assert
(sourceType == ValueLookupType.Simple ||
3938
Debug.
Assert
(sourceType == ValueLookupType.Trigger ||
3992
Debug.
Assert
(sourceType == ValueLookupType.Simple ||
4202
Debug.
Assert
(child.FE != null || child.FCE != null);
4311
Debug.
Assert
(ownerStyle != null || frameworkTemplate != null );
4382
Debug.
Assert
(ownerStyle != null || frameworkTemplate != null );
4553
Debug.
Assert
( ft != null );
5315
Debug.
Assert
(frameworkTemplate != null );
5322
Debug.
Assert
(frameworkTemplate != null);
5346
Debug.
Assert
(frameworkTemplate != null);
5391
Debug.
Assert
(frameworkTemplate != null );
5396
Debug.
Assert
(frameworkTemplate != null);
5449
Debug.
Assert
(
5559
Debug.
Assert
(routedEvent != null);
System\Windows\SystemResources.cs (8)
1109
Debug.
Assert
(_hwndNotify != null);
1110
Debug.
Assert
(_hwndNotifyHook != null);
1111
Debug.
Assert
(callerName.Equals(nameof(EnsureResourceChangeListener), StringComparison.InvariantCulture));
1139
Debug.
Assert
(!_hwndNotify.ContainsKey(hwndDpiInfo));
1140
Debug.
Assert
(hwndDpiInfo.DpiAwarenessContextValue == dpiContextValue);
1177
Debug.
Assert
(dpiContextValue == DpiAwarenessContextValue.Unaware || dpiContextValue == DpiAwarenessContextValue.SystemAware);
1564
Debug.
Assert
(hwndDpiInfo != null);
1822
Debug.
Assert
(_inflatedList != null);
System\Windows\SystemThemeKey.cs (1)
32
Debug.
Assert
(id > SystemResourceKeyID.InternalSystemThemeStylesStart &&
System\Windows\TemplateContent.cs (11)
43
Debug.
Assert
(_xamlType == null);
236
Debug.
Assert
(TemplateLoadData.Reader != null);
322
Debug.
Assert
(childIndex == lastIndex);
615
Debug.
Assert
(sharedValue != null);
755
Debug.
Assert
(xamlReader.NodeType == Xaml.XamlNodeType.StartObject);
756
Debug.
Assert
(xamlReader.Type.UnderlyingType == typeof(StaticResourceExtension));
778
Debug.
Assert
(resource != null);
801
Debug.
Assert
(xamlReader.NodeType == System.Xaml.XamlNodeType.StartMember);
896
Debug.
Assert
(xamlReader.NodeType == System.Xaml.XamlNodeType.StartObject);
1155
Debug.
Assert
(xamlReader.NodeType == System.Xaml.XamlNodeType.EndMember);
1234
Debug.
Assert
(templateChildName != null);
System\Windows\TemplateNameScope.cs (2)
166
Debug.
Assert
(_affectedChildren.Count == childIndex);
216
Debug.
Assert
(fo.IsFE);
System\Windows\TriggerActionCollection.cs (1)
282
Debug.
Assert
(Owner == null);
System\Windows\TriggerCollection.cs (1)
107
Debug.
Assert
(Owner == null);
System\Windows\Window.cs (16)
670
Debug.
Assert
(false);
2235
Debug.
Assert
( _swh != null );
2244
Debug.
Assert
( _swh != null );
3793
Debug.
Assert
(hMonitor != IntPtr.Zero);
6389
Debug.
Assert
(0 != (int)_overlaySize.Width);
6390
Debug.
Assert
(0 != (int)_overlaySize.Height);
6433
Debug.
Assert
(null != _taskbarList);
6459
Debug.
Assert
(false);
6478
Debug.
Assert
(null != _taskbarList);
6492
Debug.
Assert
(0 <= taskbarInfo.ProgressValue && taskbarInfo.ProgressValue <= 1);
6500
Debug.
Assert
(null != _taskbarList);
6525
Debug.
Assert
(null != _taskbarList);
6596
Debug.
Assert
(null != _taskbarList);
6624
Debug.
Assert
(null != _taskbarList);
7070
Debug.
Assert
( _swh != null );
7281
Debug.
Assert
( sourceWindow != null );
PresentationFramework.Aero (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
30
Debug.
Assert
(_platformCulture != null);
PresentationFramework.Aero2 (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
30
Debug.
Assert
(_platformCulture != null);
PresentationFramework.AeroLite (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
30
Debug.
Assert
(_platformCulture != null);
PresentationFramework.Classic (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
30
Debug.
Assert
(_platformCulture != null);
PresentationFramework.Luna (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
30
Debug.
Assert
(_platformCulture != null);
PresentationFramework.Royale (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\PlatformCulture.cs (1)
30
Debug.
Assert
(_platformCulture != null);
ReachFramework (42)
AlphaFlattener\BrushProxy.cs (18)
1198
Debug.
Assert
(tileBrush.ViewportUnits == BrushMappingMode.Absolute);
1230
Debug.
Assert
(tileBrush.ViewportUnits == BrushMappingMode.Absolute);
1390
Debug.
Assert
(!_bounds.IsEmpty);
1398
Debug.
Assert
(_brushList != null && _bounds.IsEmpty);
1736
Debug.
Assert
(brush.ViewboxUnits == BrushMappingMode.Absolute);
1737
Debug.
Assert
(brush.ViewportUnits == BrushMappingMode.Absolute);
1992
Debug.
Assert
(g.GradientStops != null);
2047
Debug.
Assert
(g.GradientStops.Count > 0);
3787
Debug.
Assert
(false); // Optimization is needed before reaching here
3793
Debug.
Assert
(false); // Optimization is needed before reaching here
3798
Debug.
Assert
(steps > 0);
3838
Debug.
Assert
((i >= 0) && (i < steps));
3852
Debug.
Assert
(false);
3949
Debug.
Assert
(di >= 0);
4051
Debug.
Assert
(_left <= left);
4052
Debug.
Assert
(_right >= right);
4278
Debug.
Assert
(_left <= left);
4279
Debug.
Assert
(_right >= right);
AlphaFlattener\DrawingContext.cs (1)
479
Debug.
Assert
(one != null);
AlphaFlattener\ImageProxy.cs (2)
63
Debug.
Assert
(image != null);
135
Debug.
Assert
(
AlphaFlattener\MetroDevice.cs (2)
452
Debug.
Assert
(ticket != null);
496
Debug.
Assert
(ticketXMLString == null);
AlphaFlattener\Optimizer.cs (1)
77
Debug.
Assert
(GetPrimitiveIntersectAction() == PrimitiveIntersectAction.ClipToCluster);
AlphaFlattener\Primitive.cs (1)
751
Debug.
Assert
(brush.ViewportUnits == BrushMappingMode.Absolute);
AlphaFlattener\SegmentTree.cs (1)
57
Debug.
Assert
(count >= 2);
AlphaFlattener\Utility.cs (4)
1401
Debug.
Assert
(
1748
Debug.
Assert
(brush.ViewboxUnits == BrushMappingMode.Absolute);
1749
Debug.
Assert
(brush.ViewportUnits == BrushMappingMode.Absolute);
2385
Debug.
Assert
(!rect.IsEmpty);
MS\Internal\Printing\MostFrequentlyUsedCache.cs (1)
39
Debug.
Assert
(this._dictionary.Count <= this._maxEntries);
PrintConfig\PTProvider.cs (1)
605
Debug.
Assert
(resultLength >= 0);
Serialization\DrawingContextFlattener.cs (7)
148
Debug.
Assert
(_fullTransform.Count == _fullClip.Count);
370
Debug.
Assert
(visual != null);
484
Debug.
Assert
(rHalfChord2 >= rFuzz2); // Otherewise we have no guarantee that the radius is not 0,
581
Debug.
Assert
(cPieces > 0);
651
Debug.
Assert
(rDot >= -rRadSquared * .1); // angle < 90 degrees
652
Debug.
Assert
(rDot <= rRadSquared * 1.1); // as dot product of 2 radius vectors
897
Debug.
Assert
(context != null);
Serialization\VisualSerializer.cs (1)
2014
Debug.
Assert
(Utility.IsScaleTranslate(bitmapToDrawingTransform));
Serialization\VisualTreeFlattener.cs (2)
370
Debug.
Assert
(treeWalkProgress != null);
385
Debug.
Assert
(treeWalkProgress != null);
System.Collections (74)
src\libraries\Common\src\System\Collections\Generic\BitHelper.cs (2)
24
Debug.
Assert
(bitPosition >= 0);
38
Debug.
Assert
(bitPosition >= 0);
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
103
Debug.
Assert
(divisor <= int.MaxValue);
109
Debug.
Assert
(highbits == value % divisor);
System\Collections\BitArray.cs (12)
97
Debug.
Assert
(byteSpan.Length >= 0 && byteSpan.Length < 4);
227
Debug.
Assert
(bits.m_array.Length <= arrayLength);
801
Debug.
Assert
(span.Length > 0);
802
Debug.
Assert
(m_array.Length > quotient);
997
Debug.
Assert
(GetInt32ArrayLengthFromBitLength(m_length) > 0);
998
Debug.
Assert
(intCount == GetInt32ArrayLengthFromBitLength(m_length) - 1);
1027
Debug.
Assert
(GetInt32ArrayLengthFromBitLength(m_length) > 0);
1028
Debug.
Assert
(intCount == GetInt32ArrayLengthFromBitLength(m_length) - 1);
1071
Debug.
Assert
(n >= 0);
1077
Debug.
Assert
(n >= 0);
1085
Debug.
Assert
(n >= 0);
1178
Debug.
Assert
(index >= _bitArray.m_length);
System\Collections\Generic\PriorityQueue.cs (10)
62
Debug.
Assert
(Log2Arity > 0 && Math.Pow(2, Log2Arity) == Arity);
612
Debug.
Assert
(_nodes.Length < minCapacity);
707
Debug.
Assert
(_comparer is null);
708
Debug.
Assert
(0 <= nodeIndex && nodeIndex < _size);
739
Debug.
Assert
(_comparer is not null);
740
Debug.
Assert
(0 <= nodeIndex && nodeIndex < _size);
773
Debug.
Assert
(_comparer is null);
774
Debug.
Assert
(0 <= nodeIndex && nodeIndex < _size);
821
Debug.
Assert
(_comparer is not null);
822
Debug.
Assert
(0 <= nodeIndex && nodeIndex < _size);
System\Collections\Generic\SortedList.cs (1)
158
Debug.
Assert
(count == this.keys.Length);
System\Collections\Generic\SortedSet.cs (34)
96
Debug.
Assert
(sortedSet.root != null);
355
Debug.
Assert
(parent != null);
424
Debug.
Assert
(parent.IsBlack);
448
Debug.
Assert
(Node.IsNonNullBlack(sibling));
609
Debug.
Assert
(parent != null);
610
Debug.
Assert
(grandParent != null);
659
Debug.
Assert
(match != null);
664
Debug.
Assert
(match.Right == null);
669
Debug.
Assert
(parentOfSuccessor != null);
670
Debug.
Assert
(successor.Left == null);
671
Debug.
Assert
((successor.Right == null && successor.IsRed) || (successor.Right!.IsRed && successor.IsBlack));
801
Debug.
Assert
(set1 != null);
1139
Debug.
Assert
(other != null);
1140
Debug.
Assert
(HasEqualComparer(other));
1145
Debug.
Assert
(result);
1151
Debug.
Assert
(other != null);
1152
Debug.
Assert
(count >= 0 && count <= other.Length);
1168
Debug.
Assert
(result);
1631
Debug.
Assert
(count == GetCount());
1665
Debug.
Assert
(IsNonNullRed(sibling.Left) || IsNonNullRed(sibling.Right));
1667
Debug.
Assert
(HasChildren(current, sibling));
1681
Debug.
Assert
(node != null);
1682
Debug.
Assert
(node == Left ^ node == Right);
1691
Debug.
Assert
(Left != null);
1692
Debug.
Assert
(Right != null);
1709
Debug.
Assert
(removeRed.IsRed);
1714
Debug.
Assert
(removeRed.IsRed);
1718
Debug.
Assert
(Right!.Left!.IsRed);
1721
Debug.
Assert
(Left!.Right!.IsRed);
1786
Debug.
Assert
(IsRed);
1787
Debug.
Assert
(Left!.Is2Node);
1788
Debug.
Assert
(Right!.Is2Node);
1804
Debug.
Assert
(HasChild(child));
1824
Debug.
Assert
(child1 != child2);
System\Collections\Generic\SortedSet.TreeSubSet.cs (8)
62
Debug.
Assert
(this.versionUpToDate() && root == _underlying.FindRange(_min, _max));
72
Debug.
Assert
(versionUpToDate() && root == _underlying.FindRange(_min, _max));
87
Debug.
Assert
(versionUpToDate() && root == _underlying.FindRange(_min, _max));
285
Debug.
Assert
(this.versionUpToDate() && root == _underlying.FindRange(_min, _max));
302
Debug.
Assert
(this.versionUpToDate() && root == _underlying.FindRange(_min, _max));
315
Debug.
Assert
(_underlying != null);
335
Debug.
Assert
(_underlying != null);
359
Debug.
Assert
(versionUpToDate() && root == _underlying.FindRange(_min, _max));
System\Collections\Generic\Stack.cs (5)
111
Debug.
Assert
(array != _array);
287
Debug.
Assert
(_size == _array.Length);
315
Debug.
Assert
(_array.Length < capacity);
348
Debug.
Assert
(_size == 0);
409
Debug.
Assert
(_index == -1 || _index == -2);
System.Collections.Concurrent (72)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
103
Debug.
Assert
(divisor <= int.MaxValue);
109
Debug.
Assert
(highbits == value % divisor);
System\Collections\Concurrent\BlockingCollection.cs (9)
212
Debug.
Assert
(boundedCapacity > 0 || boundedCapacity == NON_BOUNDED);
226
Debug.
Assert
(boundedCapacity > 0);
492
Debug.
Assert
((_currentAdders & ~COMPLETE_ADDING_ON_MASK) > 0);
711
Debug.
Assert
(_boundedCapacity != NON_BOUNDED);
998
Debug.
Assert
((index == WaitHandle.WaitTimeout) || (index >= 0 && index < handles.Count));
1033
Debug.
Assert
(result);
1050
Debug.
Assert
(collections != null);
1097
Debug.
Assert
(originalWaitMillisecondsTimeout != Timeout.Infinite);
1396
Debug.
Assert
((index == WaitHandle.WaitTimeout) || (index >= 0 && index < handles.Count));
System\Collections\Concurrent\ConcurrentBag.cs (20)
149
Debug.
Assert
(Monitor.IsEntered(GlobalQueuesLock));
304
Debug.
Assert
(copied == count);
321
Debug.
Assert
(Monitor.IsEntered(GlobalQueuesLock));
392
Debug.
Assert
(copied == count);
521
Debug.
Assert
(count >= 0);
605
Debug.
Assert
(_locals != null);
617
Debug.
Assert
(!Monitor.IsEntered(GlobalQueuesLock));
644
Debug.
Assert
(Monitor.IsEntered(GlobalQueuesLock) == lockTaken);
724
Debug.
Assert
(Environment.CurrentManagedThreadId == _ownerThreadId);
750
Debug.
Assert
(_headIndex - _tailIndex <= 0);
844
Debug.
Assert
(Environment.CurrentManagedThreadId == _ownerThreadId);
861
Debug.
Assert
(Environment.CurrentManagedThreadId == _ownerThreadId);
936
Debug.
Assert
(Environment.CurrentManagedThreadId == _ownerThreadId);
1027
Debug.
Assert
(Monitor.IsEntered(this));
1028
Debug.
Assert
(_frozen);
1029
Debug.
Assert
(array != null);
1030
Debug.
Assert
(arrayIndex >= 0 && arrayIndex <= array.Length);
1039
Debug.
Assert
(arrayIndex <= array.Length - count);
1060
Debug.
Assert
(Monitor.IsEntered(this));
1095
Debug.
Assert
(array != null);
System\Collections\Concurrent\ConcurrentDictionary.cs (20)
258
Debug.
Assert
(comparer is not null);
280
Debug.
Assert
(comparer is not null);
424
Debug.
Assert
((prev is null && curr == bucket) || prev!._next == curr);
497
Debug.
Assert
(comparer is not null);
531
Debug.
Assert
(comparer is not null);
593
Debug.
Assert
(nullableHashcode is null || nullableHashcode == hashcode);
621
Debug.
Assert
((prev is null && node == bucket) || prev!._next == node);
869
Debug.
Assert
(buckets is not null);
906
Debug.
Assert
(nullableHashcode is null || nullableHashcode == hashcode);
941
Debug.
Assert
((prev is null && node == bucket) || prev!._next == node);
2049
Debug.
Assert
(locksAcquired == _tables._locks.Length);
2062
Debug.
Assert
(locksAcquired == 0);
2063
Debug.
Assert
(!Monitor.IsEntered(locks[0]));
2079
Debug.
Assert
(Monitor.IsEntered(locks[0]));
2080
Debug.
Assert
(locksAcquired == 1);
2088
Debug.
Assert
(locksAcquired == locks.Length);
2095
Debug.
Assert
(locksAcquired >= 0);
2130
Debug.
Assert
(i == count);
2166
Debug.
Assert
(i == count);
2256
Debug.
Assert
(typeof(TKey).IsValueType || comparer is not null);
System\Collections\Concurrent\PartitionerStatic.cs (21)
418
Debug.
Assert
(_currentChunkSize == null);
423
Debug.
Assert
(_currentChunkSize != null);
437
Debug.
Assert
(_localOffset.Value == _currentChunkSize.Value - 1 || _currentChunkSize.Value == 0);
458
Debug.
Assert
(requestedChunkSize > 0 && requestedChunkSize <= _maxChunkSize);
462
Debug.
Assert
(_currentChunkSize.Value <= requestedChunkSize && _currentChunkSize.Value > 0);
743
Debug.
Assert
(requestedChunkSize > 0);
782
Debug.
Assert
(_sharedIndex != null); //already been allocated in MoveNext() before calling GrabNextChunk
913
Debug.
Assert
(requestedChunkSize > 0);
950
Debug.
Assert
(_localList != null);
951
Debug.
Assert
(_localOffset!.Value >= 0 && _localOffset.Value < _currentChunkSize.Value);
1084
Debug.
Assert
(requestedChunkSize > 0);
1088
Debug.
Assert
(_sharedIndex != null);
1130
Debug.
Assert
(_sharedIndex != null);
1221
Debug.
Assert
(_localOffset!.Value >= 0 && _localOffset.Value < _currentChunkSize.Value);
1305
Debug.
Assert
(_localOffset!.Value >= 0 && _localOffset.Value < _currentChunkSize.Value);
1488
Debug.
Assert
(list != null);
1514
Debug.
Assert
(startIndex >= 0 && endIndex <= list.Count - 1);
1528
Debug.
Assert
(_offset >= _startIndex && _offset <= _endIndex);
1546
Debug.
Assert
(array != null);
1571
Debug.
Assert
(startIndex >= 0 && endIndex <= array.Length - 1);
1585
Debug.
Assert
(_offset >= _startIndex && _offset <= _endIndex);
System.Collections.Immutable (162)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
103
Debug.
Assert
(divisor <= int.MaxValue);
109
Debug.
Assert
(highbits == value % divisor);
System\Collections\Frozen\FrozenDictionary.cs (5)
107
Debug.
Assert
(newDictionary is not null);
108
Debug.
Assert
(newDictionary.Comparer.Equals(comparer));
171
Debug.
Assert
(minLength >= 0 && maxLength >= minLength);
339
Debug.
Assert
(keys.Length == values.Length);
576
Debug.
Assert
(keys.Length == values.Length);
System\Collections\Frozen\FrozenHashTable.cs (8)
30
Debug.
Assert
(hashCodes.Length != 0);
31
Debug.
Assert
(buckets.Length != 0);
112
Debug.
Assert
(count == hashtableHashcodes.Length);
148
Debug.
Assert
(hashCodes.Length != 0);
149
Debug.
Assert
(!hashCodesAreUnique || new HashSet<int>(hashCodes.ToArray()).Count == hashCodes.Length);
173
Debug.
Assert
(uniqueCodesCount != 0);
209
Debug.
Assert
(maxPrimeIndexExclusive != 0);
303
Debug.
Assert
(count > 0);
System\Collections\Frozen\FrozenSet.cs (3)
55
Debug.
Assert
(newSet is not null);
56
Debug.
Assert
(newSet.Comparer.Equals(comparer));
119
Debug.
Assert
(minLength >= 0 && maxLength >= minLength);
System\Collections\Frozen\Int32\Int32FrozenDictionary.cs (2)
23
Debug.
Assert
(ReferenceEquals(source.Comparer, EqualityComparer<int>.Default));
24
Debug.
Assert
(source.Count != 0);
System\Collections\Frozen\Int32\Int32FrozenSet.cs (2)
21
Debug.
Assert
(source.Count != 0);
22
Debug.
Assert
(ReferenceEquals(source.Comparer, EqualityComparer<int>.Default));
System\Collections\Frozen\ItemsFrozenSet.cs (1)
19
Debug.
Assert
(source.Count != 0);
System\Collections\Frozen\KeysAndValuesFrozenDictionary.cs (1)
20
Debug.
Assert
(source.Count != 0);
System\Collections\Frozen\SmallFrozenDictionary.cs (1)
26
Debug.
Assert
(source.Count != 0);
System\Collections\Frozen\SmallValueTypeComparableFrozenDictionary.cs (5)
27
Debug.
Assert
(default(TKey) is IComparable<TKey>);
28
Debug.
Assert
(default(TKey) is not null);
29
Debug.
Assert
(typeof(TKey).IsValueType);
31
Debug.
Assert
(source.Count != 0);
32
Debug.
Assert
(ReferenceEquals(source.Comparer, EqualityComparer<TKey>.Default));
System\Collections\Frozen\SmallValueTypeComparableFrozenSet.cs (5)
25
Debug.
Assert
(default(T) is IComparable<T>);
26
Debug.
Assert
(default(T) is not null);
27
Debug.
Assert
(typeof(T).IsValueType);
29
Debug.
Assert
(source.Count != 0);
30
Debug.
Assert
(ReferenceEquals(source.Comparer, EqualityComparer<T>.Default));
System\Collections\Frozen\SmallValueTypeDefaultComparerFrozenDictionary.cs (4)
20
Debug.
Assert
(default(TKey) is not null);
21
Debug.
Assert
(typeof(TKey).IsValueType);
23
Debug.
Assert
(source.Count != 0);
24
Debug.
Assert
(ReferenceEquals(source.Comparer, EqualityComparer<TKey>.Default));
System\Collections\Frozen\SmallValueTypeDefaultComparerFrozenSet.cs (4)
18
Debug.
Assert
(default(T) is not null);
19
Debug.
Assert
(typeof(T).IsValueType);
21
Debug.
Assert
(source.Count != 0);
22
Debug.
Assert
(ReferenceEquals(source.Comparer, EqualityComparer<T>.Default));
System\Collections\Frozen\String\Hashing.cs (1)
80
Debug.
Assert
(KeyAnalyzer.IsAllAscii(s));
System\Collections\Frozen\String\KeyAnalyzer.cs (2)
34
Debug.
Assert
(!uniqueStrings.IsEmpty);
246
Debug.
Assert
(IsAllAscii(s));
System\Collections\Frozen\String\LengthBuckets.cs (2)
19
Debug.
Assert
(comparer == EqualityComparer<string>.Default || comparer == StringComparer.Ordinal || comparer == StringComparer.OrdinalIgnoreCase);
20
Debug.
Assert
(minLength >= 0 && maxLength >= minLength);
System\Collections\Frozen\String\LengthBucketsFrozenDictionary.cs (2)
23
Debug.
Assert
(comparer == EqualityComparer<string>.Default || comparer == StringComparer.Ordinal || comparer == StringComparer.OrdinalIgnoreCase);
35
Debug.
Assert
(keys.Length != 0 && keys.Length == values.Length);
System\Collections\Frozen\String\LengthBucketsFrozenSet.cs (2)
21
Debug.
Assert
(comparer == EqualityComparer<string>.Default || comparer == StringComparer.Ordinal || comparer == StringComparer.OrdinalIgnoreCase);
32
Debug.
Assert
(items.Length != 0);
System\Collections\Frozen\String\OrdinalStringFrozenDictionary.cs (2)
30
Debug.
Assert
(keys.Length != 0 && keys.Length == values.Length);
31
Debug.
Assert
(comparer == EqualityComparer<string>.Default || comparer == StringComparer.Ordinal || comparer == StringComparer.OrdinalIgnoreCase);
System\Collections\Frozen\ValueTypeDefaultComparerFrozenDictionary.cs (2)
18
Debug.
Assert
(typeof(TKey).IsValueType);
19
Debug.
Assert
(ReferenceEquals(source.Comparer, EqualityComparer<TKey>.Default));
System\Collections\Frozen\ValueTypeDefaultComparerFrozenSet.cs (2)
15
Debug.
Assert
(typeof(T).IsValueType);
16
Debug.
Assert
(ReferenceEquals(source.Comparer, EqualityComparer<T>.Default));
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
1085
Debug.
Assert
(lastIndexRemoved < indexToRemove);
System\Collections\Immutable\ImmutableArray_1.cs (4)
1496
Debug.
Assert
(indexToRemove > lastIndexRemoved); // We require that the input be a sorted set.
1510
Debug.
Assert
(array != null);
1511
Debug.
Assert
(!IsEmpty);
1512
Debug.
Assert
(!items.IsEmpty);
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (3)
101
Debug.
Assert
(sequence != null);
102
Debug.
Assert
(array != null);
103
Debug.
Assert
(arrayIndex >= 0 && arrayIndex <= array.Length);
System\Collections\Immutable\ImmutableHashSet_1.cs (2)
440
Debug.
Assert
(result != null);
638
Debug.
Assert
(result == OperationResult.SizeChanged);
System\Collections\Immutable\ImmutableList_1.Enumerator.cs (2)
201
Debug.
Assert
(_stack != null);
275
Debug.
Assert
(_stack != null);
System\Collections\Immutable\ImmutableList_1.Node.cs (31)
71
Debug.
Assert
(this.IsEmpty);
86
Debug.
Assert
(!frozen || (left._frozen && right._frozen));
95
Debug.
Assert
(!this.IsEmpty);
108
Debug.
Assert
(!(_left == null ^ _right == null));
173
Debug.
Assert
(_left != null && _right != null);
203
Debug.
Assert
(_left != null && _right != null);
421
Debug.
Assert
(_left != null && _right != null);
508
Debug.
Assert
(result != null);
521
Debug.
Assert
(!this.IsEmpty);
1299
Debug.
Assert
(!this.IsEmpty);
1300
Debug.
Assert
(!_right!.IsEmpty);
1311
Debug.
Assert
(!this.IsEmpty);
1312
Debug.
Assert
(!_left!.IsEmpty);
1323
Debug.
Assert
(!this.IsEmpty);
1324
Debug.
Assert
(!_right!.IsEmpty);
1325
Debug.
Assert
(!_right!._left!.IsEmpty);
1341
Debug.
Assert
(!this.IsEmpty);
1342
Debug.
Assert
(!_left!.IsEmpty);
1343
Debug.
Assert
(!_left._right!.IsEmpty);
1363
Debug.
Assert
(!this.IsEmpty);
1404
Debug.
Assert
(!this.IsEmpty);
1405
Debug.
Assert
(this.IsLeftHeavy);
1416
Debug.
Assert
(!this.IsEmpty);
1417
Debug.
Assert
(this.IsRightHeavy);
1433
Debug.
Assert
(tree._left != null && tree._right != null);
1439
Debug.
Assert
(tree._left != null);
1445
Debug.
Assert
(tree._right != null);
1466
Debug.
Assert
(!this.IsEmpty);
1491
Debug.
Assert
(!this.IsEmpty);
1515
Debug.
Assert
(!this.IsEmpty);
1555
Debug.
Assert
(!this.IsEmpty);
System\Collections\Immutable\ImmutableQueue_1.cs (7)
52
Debug.
Assert
(forwards != null);
53
Debug.
Assert
(backwards != null);
64
Debug.
Assert
(s_EmptyField.IsEmpty);
78
Debug.
Assert
(!_forwards.IsEmpty || _backwards.IsEmpty);
90
Debug.
Assert
(s_EmptyField.IsEmpty);
100
Debug.
Assert
(s_EmptyField.IsEmpty);
116
Debug.
Assert
(_backwardsReversed != null);
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
841
Debug.
Assert
(this.IsEmpty);
System\Collections\Immutable\ImmutableSortedDictionary_2.Enumerator.cs (1)
210
Debug.
Assert
(_stack != null);
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (13)
65
Debug.
Assert
(this.IsEmpty);
82
Debug.
Assert
(!frozen || (left._frozen && right._frozen));
91
Debug.
Assert
(!this.IsEmpty);
492
Debug.
Assert
(!tree.IsEmpty);
511
Debug.
Assert
(!tree.IsEmpty);
530
Debug.
Assert
(!tree.IsEmpty);
549
Debug.
Assert
(!tree.IsEmpty);
568
Debug.
Assert
(!tree.IsEmpty);
583
Debug.
Assert
(!tree.IsEmpty);
593
Debug.
Assert
(!tree.IsEmpty);
605
Debug.
Assert
(!tree.IsEmpty);
730
Debug.
Assert
(_right != null && _left != null);
797
Debug.
Assert
(_left != null && _right != null);
System\Collections\Immutable\ImmutableSortedSet_1.cs (4)
247
Debug.
Assert
(newSet != null);
371
Debug.
Assert
(result != null);
1156
Debug.
Assert
(list.Count > 0);
1214
Debug.
Assert
(list.Count > 0);
System\Collections\Immutable\ImmutableSortedSet_1.Node.cs (18)
70
Debug.
Assert
(this.IsEmpty);
85
Debug.
Assert
(!frozen || (left._frozen && right._frozen));
239
Debug.
Assert
(_left != null && _right != null);
269
Debug.
Assert
(_left != null && _right != null);
428
Debug.
Assert
(_left != null && _right != null);
508
Debug.
Assert
(_left != null && _right != null);
563
Debug.
Assert
(_left != null && _right != null);
616
Debug.
Assert
(!tree.IsEmpty);
635
Debug.
Assert
(!tree.IsEmpty);
654
Debug.
Assert
(!tree.IsEmpty);
673
Debug.
Assert
(!tree.IsEmpty);
692
Debug.
Assert
(!tree.IsEmpty);
707
Debug.
Assert
(!tree.IsEmpty);
717
Debug.
Assert
(!tree.IsEmpty);
729
Debug.
Assert
(!tree.IsEmpty);
756
Debug.
Assert
(start >= 0);
757
Debug.
Assert
(length >= 0);
780
Debug.
Assert
(_left != null && _right != null);
System\Collections\Immutable\ImmutableStack_1.cs (6)
54
Debug.
Assert
(tail != null);
67
Debug.
Assert
(s_EmptyField.IsEmpty);
77
Debug.
Assert
(s_EmptyField.IsEmpty);
166
Debug.
Assert
(_tail != null);
240
Debug.
Assert
(r != null);
241
Debug.
Assert
(r.IsEmpty == IsEmpty);
System\Collections\Immutable\SortedInt32KeyNode.cs (11)
83
Debug.
Assert
(!frozen || (left._frozen && right._frozen));
283
Debug.
Assert
(!tree.IsEmpty);
302
Debug.
Assert
(!tree.IsEmpty);
321
Debug.
Assert
(!tree.IsEmpty);
340
Debug.
Assert
(!tree.IsEmpty);
359
Debug.
Assert
(!tree.IsEmpty);
374
Debug.
Assert
(!tree.IsEmpty);
384
Debug.
Assert
(!tree.IsEmpty);
396
Debug.
Assert
(!tree.IsEmpty);
489
Debug.
Assert
(_right != null && _left != null);
556
Debug.
Assert
(_right != null && _left != null);
System.Collections.Specialized (14)
System\Collections\Specialized\HybridDictionary.cs (3)
101
Debug.
Assert
(hashtable != null);
121
Debug.
Assert
(list != null);
242
Debug.
Assert
(hashtable != null);
System\Collections\Specialized\ListDictionary.cs (1)
256
Debug.
Assert
(last != null);
System\Collections\Specialized\NameValueCollection.cs (2)
118
Debug.
Assert
(list != null);
123
Debug.
Assert
(list != null);
System\Collections\Specialized\OrderedDictionary.cs (8)
59
Debug.
Assert
(dictionary != null);
465
Debug.
Assert
(_arrayEnumerator.Current != null);
485
Debug.
Assert
(_arrayEnumerator.Current != null);
497
Debug.
Assert
(_arrayEnumerator.Current != null);
509
Debug.
Assert
(_arrayEnumerator.Current != null);
563
Debug.
Assert
(o != null);
584
Debug.
Assert
(_objectsTable is not null);
590
Debug.
Assert
(o != null);
System.ComponentModel.Annotations (9)
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (1)
119
Debug.
Assert
(value != null);
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (3)
106
Debug.
Assert
(_defaultErrorMessage is null && _errorMessageResourceName is null && _errorMessage is null && _errorMessageResourceType is null);
264
Debug.
Assert
(_errorMessageResourceType != null);
265
Debug.
Assert
(!string.IsNullOrEmpty(_errorMessageResourceName));
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (2)
120
Debug.
Assert
(type != null);
271
Debug.
Assert
(propertyType != null);
System\ComponentModel\DataAnnotations\Validator.cs (3)
338
Debug.
Assert
(validationContext != null);
408
Debug.
Assert
(instance != null);
613
Debug.
Assert
(validationContext != null);
System.ComponentModel.Composition (53)
Microsoft\Internal\Collections\CollectionServices.cs (1)
147
Debug.
Assert
(value != null);
Microsoft\Internal\GenerationServices.cs (11)
71
Debug.
Assert
(ilGenerator != null);
171
Debug.
Assert
(ilGenerator != null);
190
Debug.
Assert
(ilGenerator != null);
207
Debug.
Assert
(ilGenerator != null);
218
Debug.
Assert
(ilGenerator != null);
280
Debug.
Assert
(ilGenerator != null);
294
Debug.
Assert
(ilGenerator != null);
301
Debug.
Assert
(ilGenerator != null);
308
Debug.
Assert
(ilGenerator != null);
315
Debug.
Assert
(ilGenerator != null);
322
Debug.
Assert
(ilGenerator != null);
Microsoft\Internal\ReflectionServices.cs (5)
23
Debug.
Assert
(member.DeclaringType != null);
34
Debug.
Assert
(field.DeclaringType != null);
40
Debug.
Assert
(method.DeclaringType != null);
134
Debug.
Assert
(baseType != null);
158
Debug.
Assert
(baseType != null);
System\ComponentModel\Composition\AttributedModelServices.cs (3)
144
Debug.
Assert
(part != null);
186
Debug.
Assert
(part != null);
218
Debug.
Assert
(part != null);
System\ComponentModel\Composition\Hosting\AggregateCatalog.cs (1)
170
Debug.
Assert
(_catalogs != null);
System\ComponentModel\Composition\Hosting\AggregateExportProvider.cs (2)
130
Debug.
Assert
(_readOnlyProviders != null);
181
Debug.
Assert
(exports != null);
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (1)
470
Debug.
Assert
(_assembly != null);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (2)
116
Debug.
Assert
(_catalog != null);
727
Debug.
Assert
(_importEngine != null);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.ScopeFactoryExport.cs (1)
55
Debug.
Assert
(childContainer.CatalogExportProvider != null);
System\ComponentModel\Composition\Hosting\ComposablePartCatalogChangeEventArgs.cs (2)
63
Debug.
Assert
(_addedDefinitions != null);
80
Debug.
Assert
(_removedDefinitions != null);
System\ComponentModel\Composition\Hosting\CompositionBatch.cs (2)
77
Debug.
Assert
(_readOnlyPartsToAdd != null);
94
Debug.
Assert
(_readOnlyPartsToRemove != null);
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (1)
287
Debug.
Assert
(_providers != null);
System\ComponentModel\Composition\Hosting\CompositionScopeDefinition.cs (2)
151
Debug.
Assert
(_catalog != null);
183
Debug.
Assert
(_catalog != null);
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (3)
396
Debug.
Assert
(_fullPath != null);
411
Debug.
Assert
(_loadedFiles != null);
424
Debug.
Assert
(_path != null);
System\ComponentModel\Composition\Hosting\ExportProvider.cs (1)
105
Debug.
Assert
(exports != null);
System\ComponentModel\Composition\Hosting\ExportsChangeEventArgs.cs (2)
66
Debug.
Assert
(_addedExports != null);
83
Debug.
Assert
(_removedExports != null);
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependenciesTraversal.cs (1)
66
Debug.
Assert
(_exportersIndex != null);
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependentsTraversal.cs (1)
70
Debug.
Assert
(_importersIndex != null);
System\ComponentModel\Composition\Hosting\ImportSourceImportDefinitionHelpers.cs (1)
58
Debug.
Assert
(reply != null);
System\ComponentModel\Composition\MetadataViewProvider.cs (1)
47
Debug.
Assert
(implementationAttribute != null);
System\ComponentModel\Composition\Primitives\ComposablePartCatalog.cs (1)
116
Debug.
Assert
(exports != null || _EmptyExportsList != null);
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (1)
215
Debug.
Assert
(_requiredMetadata != null);
System\ComponentModel\Composition\Primitives\Export.cs (1)
173
Debug.
Assert
(Definition.Metadata != null);
System\ComponentModel\Composition\Primitives\ExportDefinition.cs (1)
119
Debug.
Assert
(_metadata != null);
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (2)
133
Debug.
Assert
(_contractName != null);
163
Debug.
Assert
(_metadata != null);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (2)
353
Debug.
Assert
(member != null);
478
Debug.
Assert
(import != null);
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (1)
85
Debug.
Assert
(reflectionParameterImportDefinition.ImportingLazyParameter != null);
System.ComponentModel.TypeConverter (23)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (2)
14
Debug.
Assert
(culture != null);
105
Debug.
Assert
(culture != null);
System\ComponentModel\BindingList.cs (1)
519
Debug.
Assert
(_itemTypeProperties != null);
System\ComponentModel\CultureInfoConverter.cs (4)
184
Debug.
Assert
(invariantIndex >= 0 && invariantIndex < installedCultures.Length);
195
Debug.
Assert
(array[0] == null);
232
Debug.
Assert
(cultureConverter != null);
551
Debug.
Assert
(result.Count == Count);
System\ComponentModel\Design\DesigntimeLicenseContextSerializer.cs (1)
96
Debug.
Assert
(_readFirstByte);
System\ComponentModel\Design\PropertyTabAttribute.cs (1)
102
Debug.
Assert
(_tabClassNames != null);
System\ComponentModel\Design\Serialization\MemberRelationshipService.cs (2)
49
Debug.
Assert
(source.Member != null);
62
Debug.
Assert
(source.Member != null);
System\ComponentModel\ExtenderProvidedPropertyAttribute.cs (4)
69
Debug.
Assert
(other.Provider == null);
70
Debug.
Assert
(other.ReceiverType == null);
71
Debug.
Assert
(Provider == null);
72
Debug.
Assert
(ReceiverType == null);
System\ComponentModel\Int128Converter.cs (2)
25
Debug.
Assert
(radix == 16);
26
Debug.
Assert
(value is not null);
System\ComponentModel\InterlockedBitVector32.cs (1)
43
Debug.
Assert
(previous != unchecked((int)0x80000000));
System\ComponentModel\ReflectTypeDescriptionProvider.cs (3)
935
Debug.
Assert
(td != null);
943
Debug.
Assert
(td != null);
1611
Debug.
Assert
(callingType != typeof(Uri) && callingType != typeof(CultureInfo));
System\ComponentModel\UInt128Converter.cs (2)
25
Debug.
Assert
(radix == 16);
26
Debug.
Assert
(value is not null);
System.Composition.Hosting (1)
System\Composition\Hosting\CompositionHost.cs (1)
27
Debug.
Assert
(rootLifetimeContext != null);
System.Composition.Runtime (2)
System\Composition\Runtime\Util\Formatters.cs (2)
24
Debug.
Assert
(closedGenericType != null);
25
Debug.
Assert
(closedGenericType.IsConstructedGenericType);
System.Console (43)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
13
Debug.
Assert
(errorInfo.Error != Error.SUCCESS);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
69
Debug.
Assert
(passwd.Name != null);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
101
Debug.
Assert
(passwd.HomeDirectory != null);
System\Console.cs (3)
198
Debug.
Assert
(!Monitor.IsEntered(s_syncObject));
603
Debug.
Assert
(s_sigQuitRegistration is null);
999
Debug.
Assert
(ctx.Signal == PosixSignal.SIGINT || ctx.Signal == PosixSignal.SIGQUIT);
System\ConsolePal.Unix.cs (11)
256
Debug.
Assert
(left >= 0);
446
Debug.
Assert
(!Console.IsInputRedirected);
489
Debug.
Assert
(!string.IsNullOrEmpty(TerminalFormatStrings.CursorPositionReport));
526
Debug.
Assert
(readBytesPos > 0 && readBytesPos <= readBytes.Length);
527
Debug.
Assert
(escPos == 0 && bracketPos > escPos && semiPos > bracketPos && rPos > semiPos);
528
Debug.
Assert
(readBytes[escPos] == Esc);
529
Debug.
Assert
(readBytes[bracketPos] == '[');
530
Debug.
Assert
(readBytes[semiPos] == ';');
531
Debug.
Assert
(readBytes[rPos] == 'R');
953
Debug.
Assert
(result <= buffer.Length);
961
Debug.
Assert
(handle is not null);
System\IO\ConsoleStream.cs (1)
18
Debug.
Assert
(access == FileAccess.Read || access == FileAccess.Write);
System\IO\KeyParser.cs (3)
21
Debug.
Assert
(length > 0);
370
Debug.
Assert
(single != 'b' && single != '\t' && single != '\n' && single != '\r');
383
Debug.
Assert
(single == default || char.IsBetween(single, (char)28, (char)31));
System\IO\StdInReader.cs (7)
37
Debug.
Assert
(!Console.IsInputRedirected); // stdin is a terminal.
75
Debug.
Assert
(_endIndex > 0);
91
Debug.
Assert
(result >= 0 && result <= bufferSize); // may be 0 if hits EOL
130
Debug.
Assert
(!buffer.IsEmpty);
151
Debug.
Assert
(_tmpKeys.Count == 0);
152
Debug.
Assert
(consumeKeys || _availableKeys.Count == 0);
340
Debug.
Assert
(_availableKeys.Count == 0);
System\IO\SyncTextReader.cs (1)
20
Debug.
Assert
(reader != null);
System\IO\SyncTextReader.Unix.cs (1)
18
Debug.
Assert
(inner != null);
System\TermInfo.cs (5)
188
Debug.
Assert
(char.IsAsciiDigit(format[pos]));
199
Debug.
Assert
(char.IsAsciiDigit(format[pos]));
207
Debug.
Assert
(format[pos + 2] == '\'');
298
Debug.
Assert
(format[pos] == 'e' || format[pos] == ';');
361
Debug.
Assert
(arg is string || arg is int);
System\TermInfo.Database.cs (3)
110
Debug.
Assert
(index >= 0);
135
Debug.
Assert
(name != null);
147
Debug.
Assert
(index >= 0);
System.Data.Common (370)
System\Data\Common\DataStorage.cs (1)
377
Debug.
Assert
(storageType != StorageType.Empty);
System\Data\Common\DbConnectionStringBuilder.cs (4)
147
Debug.
Assert
(keyword != null);
444
Debug.
Assert
(reflected != null);
473
Debug.
Assert
(keyword != null);
558
Debug.
Assert
(property != null);
System\Data\Common\DbDataAdapter.cs (1)
1366
Debug.
Assert
(rowUpdatedEvent.Rows != null);
System\Data\Common\DbDataReaderExtensions.cs (1)
80
Debug.
Assert
(row != null);
System\Data\Common\DbDataSource.cs (2)
103
Debug.
Assert
(wrappedCommand.Connection is not null);
362
Debug.
Assert
(wrappedBatch.Connection is not null);
System\Data\Common\FieldNameLookup.cs (1)
31
Debug.
Assert
(null != fieldNames[i]);
System\Data\ConstraintCollection.cs (3)
32
Debug.
Assert
(table != null);
667
Debug.
Assert
(name != null);
795
Debug.
Assert
(constr._parentTableName != null);
System\Data\DataColumn.cs (4)
405
Debug.
Assert
(!string.IsNullOrEmpty(_encodedColumnName));
455
Debug.
Assert
(value != null);
1095
Debug.
Assert
(table != null || !Unique);
1821
Debug.
Assert
(_table != null);
System\Data\DataColumnCollection.cs (1)
821
Debug.
Assert
(name != null);
System\Data\DataRelation.cs (1)
716
Debug.
Assert
(destination != null);
System\Data\DataRelationCollection.cs (2)
399
Debug.
Assert
(name != null);
628
Debug.
Assert
(relation != null);
System\Data\DataRowComparer.cs (5)
96
Debug.
Assert
(!ReferenceEquals(a, b));
97
Debug.
Assert
(a != null);
98
Debug.
Assert
(b != null);
99
Debug.
Assert
(a.Length == b.Length);
186
Debug.
Assert
(row.Table != null);
System\Data\DataSet.cs (4)
318
Debug.
Assert
(info != null);
2952
Debug.
Assert
(dataSet != null);
2970
Debug.
Assert
(dataSet != null);
3022
Debug.
Assert
(table != null);
System\Data\DataTable.cs (19)
519
Debug.
Assert
(DataSet != null);
549
Debug.
Assert
(fk != null);
620
Debug.
Assert
(con.Equals("F"));
863
Debug.
Assert
(bitStates != null);
864
Debug.
Assert
(bitStates.Length > bitIndex);
894
Debug.
Assert
(Rows.Count > rowIndex);
895
Debug.
Assert
(rowErrors != null);
896
Debug.
Assert
(colErrors != null);
925
Debug.
Assert
(Rows.Count > rowIndex);
926
Debug.
Assert
(rowErrors != null);
927
Debug.
Assert
(colErrors != null);
940
Debug.
Assert
(columnsInError.Length == columnErrors.Length);
2138
Debug.
Assert
(ndx != null);
3368
Debug.
Assert
(key.HasValue);
5031
Debug.
Assert
(result.Max >= result.Min);
6550
Debug.
Assert
(DataSet != null);
6772
Debug.
Assert
(table != null);
6823
Debug.
Assert
(ds != null);
7015
Debug.
Assert
(column._table != null);
System\Data\DataTableCollection.cs (1)
737
Debug.
Assert
(name != null);
System\Data\EnumerableRowCollection.cs (1)
280
Debug.
Assert
(pred != null);
System\Data\EnumerableRowCollectionExtensions.cs (1)
153
Debug.
Assert
(source != null);
System\Data\Filter\BinaryNode.cs (1)
144
Debug.
Assert
(IsConstant());
System\Data\ForeignKeyConstraint.cs (4)
260
Debug.
Assert
(row.Table.DataSet != null);
360
Debug.
Assert
(row.Table.DataSet != null);
405
Debug.
Assert
(Table?.DataSet != null && row.Table.DataSet != null);
498
Debug.
Assert
(Table?.DataSet != null);
System\Data\LinqDataView.cs (1)
111
Debug.
Assert
(base.Sort != null);
System\Data\Merger.cs (4)
45
Debug.
Assert
(_dataSet != null);
234
Debug.
Assert
(_dataSet != null);
469
Debug.
Assert
(_dataSet != null);
521
Debug.
Assert
(_dataSet != null);
System\Data\ProviderBase\SchemaMapping.cs (8)
310
Debug.
Assert
(_readerDataValues != null);
566
Debug.
Assert
(_dataTable != null);
567
Debug.
Assert
(_fieldNames != null);
568
Debug.
Assert
(_tableMapping != null);
762
Debug.
Assert
(_dataTable != null);
763
Debug.
Assert
(_schemaTable != null);
764
Debug.
Assert
(_fieldNames != null);
765
Debug.
Assert
(_tableMapping != null);
System\Data\Select.cs (12)
60
Debug.
Assert
(_candidateColumns != null);
183
Debug.
Assert
(_candidateColumns != null);
237
Debug.
Assert
(_candidateColumns != null);
316
Debug.
Assert
(_candidateColumns != null);
475
Debug.
Assert
(_candidateColumns != null);
515
Debug.
Assert
(_candidateColumns != null);
718
Debug.
Assert
(_index != null && _candidateColumns != null);
754
Debug.
Assert
(_index != null);
773
Debug.
Assert
(_index != null);
791
Debug.
Assert
(_index != null);
810
Debug.
Assert
(_index != null);
839
Debug.
Assert
(_index != null);
System\Data\Selection.cs (1)
113
Debug.
Assert
(indexFields != null);
System\Data\SortExpressionBuilder.cs (6)
52
Debug.
Assert
(keySelector != null);
53
Debug.
Assert
(compare != null);
64
Debug.
Assert
(_currentSelector != null);
65
Debug.
Assert
(_currentComparer != null);
97
Debug.
Assert
(a != null && b != null && a.Count == Count);
119
Debug.
Assert
(_selectors.Count == _comparers.Count);
System\Data\SQLTypes\SQLBinary.cs (3)
42
Debug.
Assert
(!copy);
374
Debug.
Assert
(length >= 0);
379
Debug.
Assert
(rgbValue.Length >= length);
System\Data\SQLTypes\SQLBoolean.cs (1)
131
Debug.
Assert
(x.m_value == x_Null);
System\Data\SQLTypes\SQLBytes.cs (5)
460
Debug.
Assert
(_state >= SqlBytesCharsState.Null && _state <= SqlBytesCharsState.Stream);
467
Debug.
Assert
((_lCurLen >= 0 && _lCurLen <= x_lMaxLen) || FStream());
468
Debug.
Assert
(FStream() || (_rgbBuf != null && _lCurLen <= _rgbBuf.Length));
469
Debug.
Assert
(!FStream() || (_lCurLen == x_lNull));
478
Debug.
Assert
(FStream());
System\Data\SQLTypes\SQLChars.cs (6)
425
Debug.
Assert
(_state >= SqlBytesCharsState.Null && _state <= SqlBytesCharsState.Stream);
432
Debug.
Assert
((_lCurLen >= 0 && _lCurLen <= x_lMaxLen) || FStream());
433
Debug.
Assert
(FStream() || (_rgchBuf != null && _lCurLen <= _rgchBuf.Length));
434
Debug.
Assert
(!FStream() || (_lCurLen == x_lNull));
436
Debug.
Assert
(_rgchWorkBuf == null || _rgchWorkBuf.Length == 1);
450
Debug.
Assert
(FStream());
System\Data\SQLTypes\SQLDateTime.cs (2)
121
Debug.
Assert
(timeticks == s_maxTime + 1);
242
Debug.
Assert
(time == s_maxTime + 1);
System\Data\SQLTypes\SQLDecimal.cs (22)
786
Debug.
Assert
(rglData.Length >= 4);
834
Debug.
Assert
(!IsNull);
840
Debug.
Assert
(!IsNull);
1252
Debug.
Assert
(ResInteger <= MaxPrecision);
1256
Debug.
Assert
(ResScale <= MaxScale);
1265
Debug.
Assert
(ResPrec - ResInteger >= 0);
1315
Debug.
Assert
(dwlAccum < s_ulInt32Base);
1515
Debug.
Assert
(dwlAccum < s_ulInt32Base * 2);
1518
Debug.
Assert
(dwlAccum < s_ulInt32Base); // can never final accum > 1 more UI4
1534
Debug.
Assert
(s_NUMERIC_MAX_PRECISION == ResPrec);
2096
Debug.
Assert
(Prec == 9 || Prec == 18 || Prec == 27);
2168
Debug.
Assert
(dwlAccum < s_ulInt32Base);
2237
Debug.
Assert
(dwlAccum < dwlDivisor);
2239
Debug.
Assert
((dwlAccum / dwlDivisor) < s_ulInt32Base);
2266
Debug.
Assert
(dwlAccum < s_ulInt32Base);
2504
Debug.
Assert
(iulX > s_uiZero);
2537
Debug.
Assert
(rgulU.Length == s_cNumeMax);
2605
Debug.
Assert
(rgulU.Length == s_cNumeMax);
2606
Debug.
Assert
(rgulD.Length == s_cNumeMax);
3018
Debug.
Assert
(uiDigit < 10);
3025
Debug.
Assert
(rguiData.Length == 4);
3034
Debug.
Assert
(_bPrec >= 1);
System\Data\SQLTypes\SQLGuid.cs (4)
118
Debug.
Assert
(!x.IsNull);
119
Debug.
Assert
(!y.IsNull);
124
Debug.
Assert
(xWrote);
128
Debug.
Assert
(yWrote);
System\Data\SQLTypes\SQLInt64.cs (2)
164
Debug.
Assert
(lHigh2 == 0);
171
Debug.
Assert
(lHigh1 == 0);
System\Data\SQLTypes\SQLMoney.cs (1)
83
Debug.
Assert
(snum.Scale == s_iMoneyScale);
System\Data\SQLTypes\SQLString.cs (4)
263
Debug.
Assert
(!IsNull);
728
Debug.
Assert
(cbX % 2 == 0);
729
Debug.
Assert
(cbY % 2 == 0);
775
Debug.
Assert
(!x.IsNull && !y.IsNull);
System\Data\TypeLimiter.cs (4)
25
Debug.
Assert
(scope != null);
200
Debug.
Assert
(allowedTypes != null);
223
Debug.
Assert
(type != null);
265
Debug.
Assert
(type != null);
System\Data\xmlsaver.cs (11)
1016
Debug.
Assert
(ds == null || dt == null);
1017
Debug.
Assert
(_dsElement != null);
1236
Debug.
Assert
(_prefixes != null);
1417
Debug.
Assert
(_prefixes != null);
1418
Debug.
Assert
(_dc != null);
1719
Debug.
Assert
(_prefixes != null);
1720
Debug.
Assert
(_dc != null);
1721
Debug.
Assert
(_dsElement != null);
2789
Debug.
Assert
(_ds != null || _dt != null);
2832
Debug.
Assert
(_ds != null || _dt != null);
2924
Debug.
Assert
(_xmlw != null);
System\Xml\DataPointer.cs (22)
52
Debug.
Assert
(rowElem != null);
53
Debug.
Assert
(rowElem.Row != null);
71
Debug.
Assert
(rowElem.Row != null);
85
Debug.
Assert
(_node == _doc || _node.OwnerDocument == _doc);
96
Debug.
Assert
(node == _doc || node.OwnerDocument == _doc);
107
Debug.
Assert
(node == _doc || node.OwnerDocument == _doc);
414
Debug.
Assert
(name != null);
472
Debug.
Assert
(name != null);
704
Debug.
Assert
(_column == null);
709
Debug.
Assert
(_column == null);
714
Debug.
Assert
(_column == null);
731
Debug.
Assert
(_column == null);
736
Debug.
Assert
(_column == null);
741
Debug.
Assert
(_column == null);
755
Debug.
Assert
(_column == null);
779
Debug.
Assert
(_column == null);
800
Debug.
Assert
(_column == null);
821
Debug.
Assert
(_column == null);
842
Debug.
Assert
(rowElem != null);
845
Debug.
Assert
(row != null);
852
Debug.
Assert
(!Convert.IsDBNull(row[_column, rowVersion]));
855
Debug.
Assert
((_column.ColumnMapping == MappingType.SimpleContent) ? _fOnValue : true);
System\Xml\DataSetMappper.cs (10)
32
Debug.
Assert
(_dataSet == null);
89
Debug.
Assert
(elem != null);
103
Debug.
Assert
(rowElem.Row != null);
117
Debug.
Assert
(a.Prefix != null && a.Prefix.Length == 0);
118
Debug.
Assert
(a.NamespaceURI == (object)strReservedXmlns);
122
Debug.
Assert
(a.NamespaceURI == (object)strReservedXmlns);
126
Debug.
Assert
(a.NamespaceURI == (object)strReservedXmlns);
151
Debug.
Assert
(rowElem != null);
153
Debug.
Assert
((node is XmlBoundElement) ? ((XmlBoundElement)node).Row == null : true);
241
Debug.
Assert
(rowElem.Row != null);
System\Xml\RegionIterator.cs (17)
25
Debug.
Assert
(rowElement != null && rowElement.Row != null);
39
Debug.
Assert
(oldState != ElementState.None);
48
Debug.
Assert
(CurrentNode != null);
50
Debug.
Assert
((oldState == ElementState.Defoliated) ? (_rowElement.ElementState == ElementState.Defoliated) : true);
72
Debug.
Assert
(oldState != ElementState.None);
80
Debug.
Assert
((oldState == ElementState.Defoliated) ? (_rowElement.ElementState == ElementState.Defoliated) : true);
83
Debug.
Assert
(CurrentNode != null);
98
Debug.
Assert
((oldState == ElementState.Defoliated) ? (_rowElement.ElementState == ElementState.Defoliated) : true);
105
Debug.
Assert
(nextNode.NextSibling != null);
109
Debug.
Assert
((oldState == ElementState.Defoliated) ? (_rowElement.ElementState == ElementState.Defoliated) : true);
113
Debug.
Assert
(CurrentNode != null);
122
Debug.
Assert
(CurrentNode != null);
123
Debug.
Assert
(CurrentNode.NodeType == XmlNodeType.Element);
138
Debug.
Assert
(oldState != ElementState.None);
145
Debug.
Assert
((oldState == ElementState.Defoliated) ? (_rowElement.ElementState == ElementState.Defoliated) : true);
151
Debug.
Assert
(!XmlDataDocument.IsTextLikeNode(n));
155
Debug.
Assert
((oldState == ElementState.Defoliated) ? (_rowElement.ElementState == ElementState.Defoliated) : true);
System\Xml\TreeIterator.cs (2)
18
Debug.
Assert
(nodeTop != null);
72
Debug.
Assert
(nextNode.NextSibling != null);
System\Xml\XmlBoundElement.cs (4)
251
Debug.
Assert
(element is XmlBoundElement);
296
Debug.
Assert
(dp.NodeType == XmlNodeType.Element);
337
Debug.
Assert
(dp.NodeType == XmlNodeType.Element);
412
Debug.
Assert
(((IXmlDataVirtualNode)dp).IsOnColumn(null));
System\Xml\XmlDataDocument.cs (129)
55
Debug.
Assert
(_pointers.ContainsValue(pointer) == false);
65
Debug.
Assert
(temp != null);
102
Debug.
Assert
(_dataSet == null);
103
Debug.
Assert
(ds != null);
196
Debug.
Assert
(_ignoreXmlEvents);
212
Debug.
Assert
(DocumentElement == null || !fLoadFromDataSet);
246
Debug.
Assert
(_fDataRowCreatedSpecial == false);
247
Debug.
Assert
(_fBoundToDataSet == false && _fBoundToDocument == false);
255
Debug.
Assert
(_fDataRowCreatedSpecial);
275
Debug.
Assert
(_dataSet != null);
356
Debug.
Assert
((_fBoundToDataSet == false) && (_fBoundToDocument == false));
358
Debug.
Assert
(_fBoundToDataSet ? _fBoundToDocument : (!_fBoundToDocument));
372
Debug.
Assert
(_fDataRowCreatedSpecial == false);
386
Debug.
Assert
(be != null);
414
Debug.
Assert
(rowElem.Row != null);
447
Debug.
Assert
(_mapper.GetColumnSchemaForNode(rowElem, node) != null);
456
Debug.
Assert
((node is XmlBoundElement) && (((XmlBoundElement)node).Row != null));
505
Debug.
Assert
(_ignoreXmlEvents);
507
Debug.
Assert
(GetRowFromElement(DocumentElement) != null);
515
Debug.
Assert
(docElem.LastChild == docElem.FirstChild);
534
Debug.
Assert
(!_mapper.IsMapped());
535
Debug.
Assert
(!_fBoundToDocument);
536
Debug.
Assert
(!_fBoundToDataSet);
548
Debug.
Assert
(_fDataRowCreatedSpecial == false);
549
Debug.
Assert
(_mapper.IsMapped());
550
Debug.
Assert
(_fBoundToDataSet && _fBoundToDocument);
554
Debug.
Assert
(fAssociateDataRowOld == _fAssociateDataRow);
580
Debug.
Assert
(fIsChildConnected == IsConnected(childElem));
581
Debug.
Assert
(IsRowLive(r) ? IsConnected(childElem) : !IsConnected(childElem));
592
Debug.
Assert
(newState == ElementState.WeakFoliation || newState == ElementState.StrongFoliation);
605
Debug.
Assert
(rowElemState == ElementState.StrongFoliation || rowElemState == ElementState.WeakFoliation);
625
Debug.
Assert
(node.Row != null);
675
Debug.
Assert
(node.Row != null);
676
Debug.
Assert
(node.Row.RowState != DataRowState.Deleted);
728
Debug.
Assert
(col.ColumnMapping == MappingType.SimpleContent);
847
Debug.
Assert
(c == row.Table.XmlText);
851
Debug.
Assert
(cTextCols == 0 || cTextCols == 1);
853
Debug.
Assert
(row.Table.XmlText == null);
901
Debug.
Assert
(be != null);
917
Debug.
Assert
(pointer != null);
978
Debug.
Assert
(DataSet.EnforceConstraints == false);
990
Debug.
Assert
(newNode != null);
1009
Debug.
Assert
(_ignoreDataSetEvents);
1010
Debug.
Assert
(_ignoreXmlEvents);
1011
Debug.
Assert
(IsFoliationEnabled == false);
1054
Debug.
Assert
(clone.FirstChild == null);
1199
Debug.
Assert
(reader is XmlTextReader);
1226
Debug.
Assert
(DocumentElement != null);
1264
Debug.
Assert
(r.Element == null);
1300
Debug.
Assert
(node != null);
1310
Debug.
Assert
(r == null);
1318
Debug.
Assert
(be.Row != null);
1338
Debug.
Assert
(row.RowState == DataRowState.Detached);
1350
Debug.
Assert
(row.RowState == DataRowState.Detached);
1362
Debug.
Assert
(row.Element == null);
1364
Debug.
Assert
(row.RowState == DataRowState.Detached);
1372
Debug.
Assert
(row.Element == null);
1385
Debug.
Assert
(tb != null);
1396
Debug.
Assert
(_ignoreXmlEvents);
1399
Debug.
Assert
(rowElement != null);
1405
Debug.
Assert
(rowElement != null);
1452
Debug.
Assert
((pointer != null) && !((IXmlDataVirtualNode)pointer).IsOnColumn(col));
1535
Debug.
Assert
(e != null);
1595
Debug.
Assert
(relation.ChildTable == row.Table);
1605
Debug.
Assert
(args.Row.RowState != DataRowState.Deleted);
1623
Debug.
Assert
(be != null);
1641
Debug.
Assert
(row != null);
1642
Debug.
Assert
(rowElement != null);
1671
Debug.
Assert
(_ignoreXmlEvents);
1716
Debug.
Assert
(pointer != null);
1746
Debug.
Assert
(child.Element == childElement && childElement.Row == child);
1748
Debug.
Assert
(_ignoreXmlEvents);
1778
Debug.
Assert
(colInParent != null);
1792
Debug.
Assert
(fChildElementConnected == IsConnected(childElement));
1793
Debug.
Assert
(IsRowLive(child) ? IsConnected(childElement) : !IsConnected(childElement));
1817
Debug.
Assert
(DataSet.EnforceConstraints == false);
1854
Debug.
Assert
(DataSet.EnforceConstraints == false);
1867
Debug.
Assert
(oldParent == null);
1909
Debug.
Assert
(DataSet.EnforceConstraints == false);
1918
Debug.
Assert
(args.NewParent == null);
1984
Debug.
Assert
(!IsRowLive(row));
1993
Debug.
Assert
(!IsRowLive(be.Row));
2026
Debug.
Assert
(rowElement != null);
2238
Debug.
Assert
(!(args.Action == CollectionChangeAction.Add || args.Action == CollectionChangeAction.Remove) || rel!.Nested == false);
2287
Debug.
Assert
(child.ParentNode != prevSibling.ParentNode);
2289
Debug.
Assert
(prevSibling.ParentNode != null);
2290
Debug.
Assert
(IsFoliationEnabled == false);
2291
Debug.
Assert
(IgnoreXmlEvents);
2293
Debug.
Assert
(prevSibling != DocumentElement);
2297
Debug.
Assert
(child.ParentNode == null);
2305
Debug.
Assert
(parent != null);
2306
Debug.
Assert
(parent.NodeType != XmlNodeType.Attribute); // We need to get the grand-parent region
2307
Debug.
Assert
(parent != DocumentElement); // We cannot promote children of the DocumentElement
2317
Debug.
Assert
(iter.CurrentNode is XmlBoundElement && ((XmlBoundElement)(iter.CurrentNode)).Row != null);
2327
Debug.
Assert
(parent != null);
2411
Debug.
Assert
(col.ColumnMapping != MappingType.Hidden);
2422
Debug.
Assert
(xmlText != null);
2423
Debug.
Assert
(row.Table.DataSet!.EnforceConstraints == false);
2429
Debug.
Assert
(oVal != null && !(oVal is DBNull));
2454
Debug.
Assert
(row != null);
2492
Debug.
Assert
(rowElement != null);
2493
Debug.
Assert
(rowElement.Row != null);
2494
Debug.
Assert
(DataSet.EnforceConstraints == false);
2497
Debug.
Assert
(row != null);
2541
Debug.
Assert
(c.Table == row.Table);
2737
Debug.
Assert
(rowElemList[0] != null && rowElemList[0] is XmlBoundElement);
2741
Debug.
Assert
(subRowElem != null);
2757
Debug.
Assert
(!IsRowLive(be.Row!));
2767
Debug.
Assert
(rowElemList[0] != null && rowElemList[0] is XmlBoundElement);
2790
Debug.
Assert
(rowElem.Row != null);
2801
Debug.
Assert
(row.Table.DataSet!.EnforceConstraints == false);
2825
Debug.
Assert
(row.Table.DataSet!.EnforceConstraints == false);
2846
Debug.
Assert
(IsRowLive(rowElem.Row));
2853
Debug.
Assert
(rowElem.Row != null);
2864
Debug.
Assert
(row.Table.DataSet!.EnforceConstraints == false);
2898
Debug.
Assert
(!IsRowLive(rowElem.Row));
2909
Debug.
Assert
(row != null);
2926
Debug.
Assert
(row != null);
2928
Debug.
Assert
(row.RowState == DataRowState.Detached || row.RowState == DataRowState.Deleted);
2938
Debug.
Assert
(childRowElem.Row != null);
2955
Debug.
Assert
(parentRowElem.Row != null);
3010
Debug.
Assert
(node.OwnerDocument == this || node == this);
3028
Debug.
Assert
(be.IsFoliated);
3050
Debug.
Assert
(IsRowLive(rowElement.Row));
3055
Debug.
Assert
(rowElement!.Row != null);
3056
Debug.
Assert
(IsRowLive(rowElement.Row));
3073
Debug.
Assert
(!IsRowLive(rowElement.Row));
3078
Debug.
Assert
(rowElement!.Row != null);
3079
Debug.
Assert
(!IsRowLive(rowElement.Row));
System\Xml\XPathNodePointer.cs (32)
51
Debug.
Assert
(XmlDataDocument.IsTextNode(node.NodeType));
87
Debug.
Assert
(xnt != -1);
107
Debug.
Assert
(owner != null);
436
Debug.
Assert
(rowElem != null);
437
Debug.
Assert
(rowElem.Row != null);
453
Debug.
Assert
(rowElem.Row != null);
477
Debug.
Assert
(node == _doc || node.OwnerDocument == _doc);
486
Debug.
Assert
(node == _doc || node.OwnerDocument == _doc);
606
Debug.
Assert
(_node.Attributes != null);
688
Debug.
Assert
(xntInt != -1);
711
Debug.
Assert
(xntInt != -1);
731
Debug.
Assert
(_column.ColumnMapping != MappingType.Attribute && _column.ColumnMapping != MappingType.Hidden);
1015
Debug.
Assert
(_parentOfNS != null);
1101
Debug.
Assert
(other.NodeType != XPathNodeType.Namespace);
1116
Debug.
Assert
(NodeType != XPathNodeType.Namespace);
1137
Debug.
Assert
(_fOnValue != other._fOnValue);
1145
Debug.
Assert
(Row == other.Row); //in the same row
1160
Debug.
Assert
(curNode1 != null);
1161
Debug.
Assert
(curNode2 != null);
1278
Debug.
Assert
(_column != null);
1460
Debug.
Assert
(curAttr.NamespaceURI == StrReservedXmlns);
1462
Debug.
Assert
(attrs != null);
1561
Debug.
Assert
(_parentOfNS != null);
1566
Debug.
Assert
(_column.Namespace == StrReservedXmlns);
1570
Debug.
Assert
(be != null);
1572
Debug.
Assert
(curRow != null);
1595
Debug.
Assert
(attr != null);
1643
Debug.
Assert
(rowElem != null);
1646
Debug.
Assert
(row != null);
1650
Debug.
Assert
(!Convert.IsDBNull(row[_column, rowVersion]));
1653
Debug.
Assert
((_column.ColumnMapping == MappingType.SimpleContent) ? _fOnValue : true);
1656
Debug.
Assert
(!_fOnValue);
System.Diagnostics.DiagnosticSource (77)
src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (4)
141
Debug.
Assert
(index >= 0);
142
Debug.
Assert
(index < _maxIndex);
152
Debug.
Assert
(index >= 0);
153
Debug.
Assert
(index < _maxIndex);
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\Diagnostics\Activity.cs (9)
375
Debug.
Assert
(activity != null);
1227
Debug.
Assert
(!string.IsNullOrEmpty(Parent.Id));
1233
Debug.
Assert
(ParentId.Length != 0);
1322
Debug.
Assert
(_traceId is null);
1344
Debug.
Assert
(!W3CIdFlagsSet);
1594
Debug.
Assert
(_last != null);
1683
Debug.
Assert
(_last != null);
1908
Debug.
Assert
(outBytes.Length == 16 || outBytes.Length == 8);
1925
Debug.
Assert
(outBytes.Length * 2 == charData.Length);
System\Diagnostics\Activity.GenerateRootId.netcoreapp.cs (2)
16
Debug.
Assert
(s_uniqSuffix.Length < 50); // Ensure stackalloc not too large
20
Debug.
Assert
(formatted);
System\Diagnostics\ActivitySource.cs (2)
345
Debug.
Assert
(activity != null);
357
Debug.
Assert
(activity != null);
System\Diagnostics\DiagLinkedList.cs (3)
28
Debug.
Assert
(e is not null);
56
Debug.
Assert
(_first is not null);
57
Debug.
Assert
(_last is not null);
System\Diagnostics\DiagnosticListener.cs (1)
360
Debug.
Assert
(Monitor.IsEntered(s_allListenersLock)); // We should only be called when we hold this lock
System\Diagnostics\DiagnosticSourceEventSource.cs (20)
410
Debug.
Assert
(str2 != null);
545
Debug.
Assert
(filterAndPayloadSpec != null && startIdx >= 0 && startIdx <= endIdx && endIdx <= filterAndPayloadSpec.Length);
728
Debug.
Assert
(endIdx - startIdx >= 4);
729
Debug.
Assert
(IsActivitySourceEntry(filterAndPayloadSpec, startIdx, endIdx));
862
Debug.
Assert
(eventSource._activityListener == null);
863
Debug.
Assert
(eventSource._activitySourceSpecs != null);
941
Debug.
Assert
(eventSource._activityListener == null);
942
Debug.
Assert
(eventSource._activitySourceSpecs != null);
962
Debug.
Assert
(lastWildcardList != null);
975
Debug.
Assert
(lastSpecificList != null);
986
Debug.
Assert
(firstSpecificList != null || firstWildcardList != null);
990
Debug.
Assert
(lastWildcardList != null && lastSpecificList != null);
1161
Debug.
Assert
(transformSpec != null && startIdx >= 0 && startIdx < endIdx && endIdx <= transformSpec.Length);
1256
Debug.
Assert
(obj != null || IsStatic);
1404
Debug.
Assert
(typeof(TObject).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo()));
1409
Debug.
Assert
(obj is TObject);
1423
Debug.
Assert
(typeof(TStruct) == type);
1428
Debug.
Assert
(obj is TStruct);
1462
Debug.
Assert
(enumerable is not null);
1525
Debug.
Assert
(obj is IEnumerable<ElementType>);
System\Diagnostics\DistributedContextPropagator.cs (1)
76
Debug.
Assert
(s_current is not null);
System\Diagnostics\Metrics\AggregationManager.cs (4)
110
Debug.
Assert
(collectionPeriod.TotalSeconds >= MinCollectionTimeSecs);
148
Debug.
Assert
(_collectThread == null && !_cts.IsCancellationRequested);
149
Debug.
Assert
(CollectionPeriod.TotalSeconds >= MinCollectionTimeSecs);
187
Debug.
Assert
(collectionIntervalSecs >= MinCollectionTimeSecs);
System\Diagnostics\Metrics\AggregatorStore.cs (1)
88
Debug.
Assert
(match);
System\Diagnostics\Metrics\ExponentialHistogramAggregator.cs (1)
128
Debug.
Assert
(count == 0);
System\Diagnostics\Metrics\Instrument.cs (1)
172
Debug.
Assert
(false);
System\Diagnostics\Metrics\Meter.cs (5)
36
Debug.
Assert
(options.Name is not null);
40
Debug.
Assert
(Name is not null);
71
Debug.
Assert
(Name is not null);
471
Debug.
Assert
(instrumentList is not null);
498
Debug.
Assert
(instrumentList is not null);
System\Diagnostics\Metrics\MeterOptions.cs (1)
55
Debug.
Assert
(_name is not null);
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
424
Debug.
Assert
(AggregationManager.MinCollectionTimeSecs <= defaultIntervalSecs);
System\Diagnostics\Metrics\TagList.cs (15)
86
Debug.
Assert
(_tagsCount > 8);
118
Debug.
Assert
(index < _overflowTags.Length);
122
Debug.
Assert
(index <= 7);
147
Debug.
Assert
(index < _overflowTags.Length);
163
Debug.
Assert
(false);
193
Debug.
Assert
(_tagsCount <= 8);
206
Debug.
Assert
(_overflowTags is null);
208
Debug.
Assert
(_overflowTags is not null);
213
Debug.
Assert
(_overflowTags is null);
238
Debug.
Assert
(_tagsCount <= 8);
298
Debug.
Assert
(_overflowTags is not null);
317
Debug.
Assert
(_tagsCount < 8 && index < 7);
329
Debug.
Assert
(false); // we shouldn't come here
358
Debug.
Assert
(_tagsCount <= 8 && index <= 7);
433
Debug.
Assert
(_tagsCount <= 8);
System.Diagnostics.Process (46)
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (1)
44
Debug.
Assert
(_handle != null);
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
34
Debug.
Assert
(lines != null);
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (2)
104
Debug.
Assert
(valueParsed);
119
Debug.
Assert
(!string.IsNullOrEmpty(path));
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ForkAndExecProcess.cs (1)
71
Debug.
Assert
(bytesWritten == byteLength);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
69
Debug.
Assert
(passwd.Name != null);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetSetPriority.cs (1)
40
Debug.
Assert
((nice >= -20) && (nice <= 20));
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (7)
25
Debug.
Assert
(capacity >= 0);
54
Debug.
Assert
(index >= 0 && index < _count);
78
Debug.
Assert
(_count > 0);
87
Debug.
Assert
(_count > 0);
104
Debug.
Assert
(_array != null); // Nonzero _count should imply this
134
Debug.
Assert
(_count < Capacity);
141
Debug.
Assert
(minimum > Capacity);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\Diagnostics\Process.ConfigureTerminalForChildProcesses.Unix.cs (4)
15
Debug.
Assert
(increment != 0);
20
Debug.
Assert
(s_processStartLock.IsReadLockHeld);
21
Debug.
Assert
(configureConsole);
28
Debug.
Assert
(s_processStartLock.IsWriteLockHeld);
System\Diagnostics\Process.Linux.cs (1)
291
Debug.
Assert
(bytesRead < buffer.Length);
System\Diagnostics\Process.Unix.cs (10)
178
Debug.
Assert
(_waitHandle == null);
179
Debug.
Assert
(_registeredWaitHandle == null);
206
Debug.
Assert
(exited || milliseconds != Timeout.Infinite);
272
Debug.
Assert
(pri >= -20 && pri <= 20);
468
Debug.
Assert
(stdinFd >= 0);
475
Debug.
Assert
(stdoutFd >= 0);
481
Debug.
Assert
(stderrFd >= 0);
532
Debug.
Assert
(childPid >= 0);
842
Debug.
Assert
(fd >= 0);
963
Debug.
Assert
(!string.IsNullOrEmpty(startInfo.UserName));
System\Diagnostics\ProcessManager.Linux.cs (1)
158
Debug.
Assert
(pid >= 0);
System\Diagnostics\ProcessWaitState.Unix.cs (11)
168
Debug.
Assert
(foundState);
228
Debug.
Assert
(processId >= 0);
238
Debug.
Assert
(!Monitor.IsEntered(_gate));
253
Debug.
Assert
(Monitor.IsEntered(_gate));
266
Debug.
Assert
(!Monitor.IsEntered(_gate));
299
Debug.
Assert
(_exited);
348
Debug.
Assert
(Monitor.IsEntered(_gate));
397
Debug.
Assert
(!Monitor.IsEntered(_gate));
506
Debug.
Assert
(Monitor.IsEntered(_gate));
507
Debug.
Assert
(!_isChild);
546
Debug.
Assert
(!_exited);
System.Diagnostics.StackTrace (1)
System\Diagnostics\StackTraceSymbols.cs (1)
146
Debug.
Assert
(inMemoryPdbAddress != IntPtr.Zero);
System.Diagnostics.TextWriterTraceListener (3)
System\Diagnostics\XmlWriterTraceListener.cs (3)
399
Debug.
Assert
(charsWritten > 0);
411
Debug.
Assert
(charsWritten == span.Length);
423
Debug.
Assert
(charsWritten > 0);
System.Diagnostics.TraceSource (2)
System\Diagnostics\CorrelationManager.cs (1)
57
Debug.
Assert
(stack != null);
System\Diagnostics\TraceSource.cs (1)
105
Debug.
Assert
(_listeners != null);
System.Drawing.Primitives (8)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (2)
14
Debug.
Assert
(culture != null);
105
Debug.
Assert
(culture != null);
System\Drawing\Color.cs (1)
395
Debug.
Assert
(name != null);
System\Drawing\KnownColorNames.cs (1)
199
Debug.
Assert
(color > 0 && color <= KnownColor.RebeccaPurple);
System\Drawing\KnownColorTable.cs (4)
468
Debug.
Assert
((argb & Color.ARGBAlphaMask) == Color.ARGBAlphaMask);
469
Debug.
Assert
(ColorValueTable.Length == ColorKindTable.Length);
486
Debug.
Assert
(color > 0 && color <= KnownColor.RebeccaPurple);
503
Debug.
Assert
(Color.IsKnownColorSystem(color));
System.Formats.Asn1 (82)
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (3)
17
Debug.
Assert
(arraySegment.Array != null);
18
Debug.
Assert
(arraySegment.Offset == 0);
25
Debug.
Assert
(clearSize <= array.Length);
System\Formats\Asn1\Asn1Tag.cs (3)
232
Debug.
Assert
(bytesConsumed > 0);
338
Debug.
Assert
(segment <= byte.MaxValue);
344
Debug.
Assert
(idx == 0);
System\Formats\Asn1\AsnCharacterStringEncodings.cs (3)
216
Debug.
Assert
(minCharAllowed <= maxCharAllowed);
217
Debug.
Assert
(maxCharAllowed <= 0x7F);
237
Debug.
Assert
(isAllowed[c] == false);
System\Formats\Asn1\AsnDecoder.BitString.cs (4)
367
Debug.
Assert
(unusedBitCount == 0);
492
Debug.
Assert
(length != null);
626
Debug.
Assert
(bytesWritten == contentLength);
663
Debug.
Assert
(contentsLength.HasValue);
System\Formats\Asn1\AsnDecoder.cs (5)
440
Debug.
Assert
(bytesRead > 0);
533
Debug.
Assert
(validity != LengthValidity.Valid);
647
Debug.
Assert
(offset >= 0);
659
Debug.
Assert
(offset >= 0);
695
Debug.
Assert
(ruleSet >= AsnEncodingRules.BER && ruleSet <= AsnEncodingRules.DER);
System\Formats\Asn1\AsnDecoder.GeneralizedTime.cs (4)
192
Debug.
Assert
(!contents.IsEmpty);
194
Debug.
Assert
(state == GetNextState(octet));
267
Debug.
Assert
(!contents.IsEmpty);
269
Debug.
Assert
(state == GetNextState(octet));
System\Formats\Asn1\AsnDecoder.Integer.cs (2)
434
Debug.
Assert
(sizeLimit <= sizeof(long));
473
Debug.
Assert
(sizeLimit <= sizeof(ulong));
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (1)
368
Debug.
Assert
(valueSpan.Length <= sizeof(long));
System\Formats\Asn1\AsnDecoder.OctetString.cs (4)
212
Debug.
Assert
(contentLength.HasValue);
355
Debug.
Assert
(length != null);
472
Debug.
Assert
(bytesWritten == contentLength);
485
Debug.
Assert
(rented == null);
System\Formats\Asn1\AsnDecoder.Oid.cs (8)
85
Debug.
Assert
(source.Length > 0);
161
Debug.
Assert
(idx == nextStop);
162
Debug.
Assert
(writeSpan.Length >= SemanticByteCount);
165
Debug.
Assert
(accumValueBytes[7] == 0);
186
Debug.
Assert
(paddingByteCount >= 0 && paddingByteCount < sizeof(long));
251
Debug.
Assert
(largeValue != null);
256
Debug.
Assert
(firstIdentifier > long.MaxValue);
272
Debug.
Assert
((smallValue == null) != (largeValue == null));
System\Formats\Asn1\AsnDecoder.UtcTime.cs (2)
177
Debug.
Assert
(
193
Debug.
Assert
(contents.IsEmpty);
System\Formats\Asn1\AsnWriter.BitString.cs (3)
111
Debug.
Assert
(contentLength > MaxCERContentSize);
119
Debug.
Assert
(
147
Debug.
Assert
(payload.Length > MaxCERContentSize);
System\Formats\Asn1\AsnWriter.Boolean.cs (2)
31
Debug.
Assert
(!tag.IsConstructed);
35
Debug.
Assert
(_offset < _buffer.Length);
System\Formats\Asn1\AsnWriter.cs (17)
83
Debug.
Assert
(_buffer != null);
171
Debug.
Assert
(bytesWritten == _offset);
320
Debug.
Assert
(length >= -1);
332
Debug.
Assert
(length >= 0);
363
Debug.
Assert
(idx == _offset);
476
Debug.
Assert
(tag.IsConstructed);
494
Debug.
Assert
(tag.IsConstructed);
504
Debug.
Assert
(tagType == UniversalTagNumber.SetOf);
524
Debug.
Assert
(containedLength >= 0);
564
Debug.
Assert
(_offset == expectedEnd);
587
Debug.
Assert
(_offset - lenOffset - 1 == shiftSize);
593
Debug.
Assert
(buffer != null);
594
Debug.
Assert
(end >= start);
631
Debug.
Assert
(pos == end);
646
Debug.
Assert
(pos == len);
741
Debug.
Assert
(writer._nestingStack != null);
750
Debug.
Assert
(_writer == null || _writer._nestingStack != null);
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (3)
93
Debug.
Assert
(fraction[0] == (byte)'0');
94
Debug.
Assert
(fraction[1] == (byte)'.');
110
Debug.
Assert
(!tag.IsConstructed);
System\Formats\Asn1\AsnWriter.Integer.cs (7)
141
Debug.
Assert
(!tag.IsConstructed);
160
Debug.
Assert
(_buffer[_offset] != 0xFF || _buffer[_offset + 1] < 0x80);
193
Debug.
Assert
(!tag.IsConstructed);
212
Debug.
Assert
(_buffer[_offset] != 0 || _buffer[_offset + 1] > 0x7F);
232
Debug.
Assert
(!tag.IsConstructed);
270
Debug.
Assert
(!tag.IsConstructed);
281
Debug.
Assert
(!tag.IsConstructed);
System\Formats\Asn1\AsnWriter.Null.cs (1)
30
Debug.
Assert
(!tag.IsConstructed);
System\Formats\Asn1\AsnWriter.OctetString.cs (2)
106
Debug.
Assert
(payload.Length > MaxCERSegmentSize);
117
Debug.
Assert
(
System\Formats\Asn1\AsnWriter.Oid.cs (2)
138
Debug.
Assert
(!tag.IsConstructed);
193
Debug.
Assert
(dest.Length > 0);
System\Formats\Asn1\AsnWriter.Sequence.cs (2)
59
Debug.
Assert
(tag.IsConstructed);
66
Debug.
Assert
(tag.IsConstructed);
System\Formats\Asn1\AsnWriter.SetOf.cs (2)
68
Debug.
Assert
(tag.IsConstructed);
75
Debug.
Assert
(tag.IsConstructed);
System\Formats\Asn1\AsnWriter.Text.cs (1)
118
Debug.
Assert
(size > AsnReader.MaxCERSegmentSize);
System\Formats\Asn1\AsnWriter.UtcTime.cs (1)
80
Debug.
Assert
(!tag.IsConstructed);
System.Formats.Cbor (31)
System\Formats\Cbor\CborConformanceLevel.cs (1)
234
Debug.
Assert
(!left.IsEmpty && !right.IsEmpty);
System\Formats\Cbor\Reader\CborReader.cs (6)
207
Debug.
Assert
(_nestedDataItems?.Count > 0);
235
Debug.
Assert
(_definiteLength is null || _definiteLength - _itemsRead > 0);
257
Debug.
Assert
(_offset + length <= _data.Length);
266
Debug.
Assert
(position <= _data.Length);
387
Debug.
Assert
(_nestedDataItems != null);
420
Debug.
Assert
(CurrentDepth == checkpoint.Depth);
System\Formats\Cbor\Reader\CborReader.Map.cs (4)
104
Debug.
Assert
(_currentKeyOffset != null && _itemsRead % 2 == 0);
125
Debug.
Assert
(_currentKeyOffset != null && _itemsRead % 2 != 0);
132
Debug.
Assert
(_currentKeyOffset != null);
160
Debug.
Assert
(_currentKeyOffset != null);
System\Formats\Cbor\Reader\CborReader.PeekState.cs (2)
32
Debug.
Assert
(!AllowMultipleRootLevelValues);
74
Debug.
Assert
(AllowMultipleRootLevelValues);
System\Formats\Cbor\Reader\CborReader.SkipValue.cs (1)
43
Debug.
Assert
(0 <= depth && depth <= CurrentDepth);
System\Formats\Cbor\Reader\CborReader.String.cs (3)
344
Debug.
Assert
(target.IsEmpty);
407
Debug.
Assert
(target.IsEmpty);
485
Debug.
Assert
(type == CborMajorType.ByteString || type == CborMajorType.TextString);
System\Formats\Cbor\Writer\CborWriter.Array.cs (1)
72
Debug.
Assert
(majorType == CborMajorType.Array || majorType == CborMajorType.Map);
System\Formats\Cbor\Writer\CborWriter.cs (4)
245
Debug.
Assert
(MaxArrayLength == Array.MaxLength);
303
Debug.
Assert
(_nestedDataItems?.Count > 0); // implied by previous check
390
Debug.
Assert
(_definiteLength == null);
405
Debug.
Assert
(_itemsWritten % 2 == 0);
System\Formats\Cbor\Writer\CborWriter.Map.cs (4)
95
Debug.
Assert
(_currentKeyOffset != null && _currentValueOffset == null);
119
Debug.
Assert
(_currentKeyOffset != null && _currentValueOffset != null);
152
Debug.
Assert
(_keyValuePairEncodingRanges != null);
171
Debug.
Assert
(s.IsEmpty);
System\Formats\Cbor\Writer\CborWriter.String.cs (5)
52
Debug.
Assert
(_currentIndefiniteLengthStringRanges != null);
149
Debug.
Assert
(_currentIndefiniteLengthStringRanges != null);
200
Debug.
Assert
(type == CborMajorType.ByteString || type == CborMajorType.TextString);
201
Debug.
Assert
(_currentIndefiniteLengthStringRanges != null);
224
Debug.
Assert
(s.IsEmpty);
System.Formats.Tar (120)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
13
Debug.
Assert
(errorInfo.Error != Error.SUCCESS);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
69
Debug.
Assert
(passwd.Name != null);
src\libraries\Common\src\System\IO\Archiving.Utils.cs (2)
14
Debug.
Assert
(buffer != null);
15
Debug.
Assert
(min > 0);
src\libraries\Common\src\System\IO\PathInternal.cs (1)
124
Debug.
Assert
(rootLength > 0);
src\libraries\Common\src\System\IO\PathInternal.Unix.cs (1)
31
Debug.
Assert
(DirectorySeparatorChar == AltDirectorySeparatorChar);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\Formats\Tar\PaxTarEntry.cs (3)
57
Debug.
Assert
(_header._mTime != default);
99
Debug.
Assert
(_header._mTime != default);
161
Debug.
Assert
(!useMTime || (useMTime && _header._mTime != default));
System\Formats\Tar\PosixTarEntry.cs (2)
37
Debug.
Assert
(other._header._uName != null);
38
Debug.
Assert
(other._header._gName != null);
System\Formats\Tar\SeekableSubReadStream.cs (2)
57
Debug.
Assert
(count >= 0);
58
Debug.
Assert
(count <= origCount);
System\Formats\Tar\SubReadStream.cs (3)
119
Debug.
Assert
(count >= 0);
120
Debug.
Assert
(count <= origCount);
157
Debug.
Assert
(!_hasReachedEnd);
System\Formats\Tar\TarEntry.cs (11)
28
Debug.
Assert
(header._format == format);
38
Debug.
Assert
(!isGea || entryType is TarEntryType.GlobalExtendedAttributes);
332
Debug.
Assert
(!string.IsNullOrEmpty(destinationDirectoryPath));
333
Debug.
Assert
(Path.IsPathFullyQualified(destinationDirectoryPath));
427
Debug.
Assert
(EntryType is not TarEntryType.RegularFile or TarEntryType.V7RegularFile or TarEntryType.ContiguousFile);
435
Debug.
Assert
(Directory.Exists(Path.GetDirectoryName(filePath)));
436
Debug.
Assert
(!Directory.Exists(filePath));
449
Debug.
Assert
(!string.IsNullOrEmpty(linkTargetPath));
455
Debug.
Assert
(!string.IsNullOrEmpty(linkTargetPath));
520
Debug.
Assert
(!Path.Exists(destinationFileName));
536
Debug.
Assert
(!Path.Exists(destinationFileName));
System\Formats\Tar\TarEntry.Unix.cs (6)
16
Debug.
Assert
(EntryType is TarEntryType.BlockDevice);
23
Debug.
Assert
(EntryType is TarEntryType.CharacterDevice);
30
Debug.
Assert
(EntryType is TarEntryType.Fifo);
37
Debug.
Assert
(EntryType is TarEntryType.HardLink);
38
Debug.
Assert
(!string.IsNullOrEmpty(targetFilePath));
39
Debug.
Assert
(!string.IsNullOrEmpty(hardLinkFilePath));
System\Formats\Tar\TarFile.cs (12)
358
Debug.
Assert
(!string.IsNullOrEmpty(sourceDirectoryName));
359
Debug.
Assert
(!string.IsNullOrEmpty(destinationFileName));
477
Debug.
Assert
(!string.IsNullOrEmpty(sourceFileName));
478
Debug.
Assert
(!string.IsNullOrEmpty(destinationDirectoryFullPath));
523
Debug.
Assert
(!string.IsNullOrEmpty(sourceDirectoryName));
524
Debug.
Assert
(destination != null);
525
Debug.
Assert
(Path.IsPathFullyQualified(sourceDirectoryName));
526
Debug.
Assert
(destination.CanWrite);
532
Debug.
Assert
(source != null);
533
Debug.
Assert
(!string.IsNullOrEmpty(destinationDirectoryPath));
534
Debug.
Assert
(Path.IsPathFullyQualified(destinationDirectoryPath));
535
Debug.
Assert
(source.CanRead);
System\Formats\Tar\TarHeader.cs (2)
115
Debug.
Assert
(_ea == null);
116
Debug.
Assert
(existing != null);
System\Formats\Tar\TarHeader.Read.cs (1)
78
Debug.
Assert
(header._format is TarEntryFormat.Ustar or TarEntryFormat.Pax or TarEntryFormat.Gnu);
System\Formats\Tar\TarHeader.Write.cs (45)
31
Debug.
Assert
(format is > TarEntryFormat.Unknown and <= TarEntryFormat.Gnu);
32
Debug.
Assert
(_dataStream == null || _dataStream.CanSeek);
47
Debug.
Assert
(format is > TarEntryFormat.Unknown and <= TarEntryFormat.Gnu);
48
Debug.
Assert
(_dataStream == null || _dataStream.CanSeek);
64
Debug.
Assert
(destinationStream.CanSeek);
65
Debug.
Assert
(_dataStream != null);
66
Debug.
Assert
(!_dataStream.CanSeek);
113
Debug.
Assert
(destinationStream.CanSeek);
114
Debug.
Assert
(_dataStream != null);
115
Debug.
Assert
(!_dataStream.CanSeek);
203
Debug.
Assert
(_typeFlag is TarEntryType.GlobalExtendedAttributes);
204
Debug.
Assert
(globalExtendedAttributesEntryNumber >= 0);
209
Debug.
Assert
(archiveStream.CanSeek || _dataStream == null || _dataStream.CanSeek);
223
Debug.
Assert
(archiveStream.CanSeek || _dataStream == null || _dataStream.CanSeek);
236
Debug.
Assert
(archiveStream.CanSeek || _dataStream == null || _dataStream.CanSeek);
250
Debug.
Assert
(archiveStream.CanSeek || _dataStream == null || _dataStream.CanSeek);
265
Debug.
Assert
(archiveStream.CanSeek || _dataStream == null || _dataStream.CanSeek);
266
Debug.
Assert
(_typeFlag is not TarEntryType.GlobalExtendedAttributes);
308
Debug.
Assert
(archiveStream.CanSeek || _dataStream == null || _dataStream.CanSeek);
309
Debug.
Assert
(_typeFlag is not TarEntryType.GlobalExtendedAttributes);
352
Debug.
Assert
(archiveStream.CanSeek || _dataStream == null || _dataStream.CanSeek);
358
Debug.
Assert
(longLinkHeader._dataStream != null && longLinkHeader._dataStream.CanSeek); // We generate the long metadata data stream, should always be seekable
367
Debug.
Assert
(longPathHeader._dataStream != null && longPathHeader._dataStream.CanSeek); // We generate the long metadata data stream, should always be seekable
387
Debug.
Assert
(archiveStream.CanSeek || _dataStream == null || _dataStream.CanSeek);
394
Debug.
Assert
(longLinkHeader._dataStream != null && longLinkHeader._dataStream.CanSeek); // We generate the long metadata data stream, should always be seekable
403
Debug.
Assert
(longPathHeader._dataStream != null && longPathHeader._dataStream.CanSeek); // We generate the long metadata data stream, should always be seekable
422
Debug.
Assert
(entryType is TarEntryType.LongPath or TarEntryType.LongLink);
452
Debug.
Assert
(_dataStream == null || (extendedAttributes.Count > 0 && _dataStream.CanSeek)); // We generate the extended attributes data stream, should always be seekable
461
Debug.
Assert
(_dataStream == null || (extendedAttributes.Count > 0 && _dataStream.CanSeek)); // We generate the extended attributes data stream, should always be seekable
468
Debug.
Assert
(isGea && globalExtendedAttributesEntryNumber >= 0 || !isGea && globalExtendedAttributesEntryNumber < 0);
586
Debug.
Assert
(prefix.Length != 1 || !PathInternal.Utf8DirectorySeparators.Contains(prefix[0]));
603
Debug.
Assert
(!string.IsNullOrEmpty(_linkName) ^ (_typeFlag is not TarEntryType.SymbolicLink and not TarEntryType.HardLink));
635
Debug.
Assert
(_typeFlag is not TarEntryType.ExtendedAttributes and not TarEntryType.GlobalExtendedAttributes);
636
Debug.
Assert
(Convert.ToInt64(ExtendedAttributes[PaxEaSize]) > TarHelpers.MaxSizeLength);
675
Debug.
Assert
(_dataStream.CanSeek);
780
Debug.
Assert
(paddingAfterData <= TarHelpers.RecordSize);
796
Debug.
Assert
(paddingAfterData <= TarHelpers.RecordSize);
854
Debug.
Assert
(length == CountDigits(length) + 3 + Encoding.UTF8.GetByteCount(attribute) + Encoding.UTF8.GetByteCount(value));
868
Debug.
Assert
(formatted);
891
Debug.
Assert
(value >= 0);
915
Debug.
Assert
(_typeFlag is TarEntryType.SymbolicLink or TarEntryType.HardLink);
984
Debug.
Assert
(destination.Length > 1);
998
Debug.
Assert
(destination.Length > 1);
1084
Debug.
Assert
(globalExtendedAttributesEntryNumber >= 1);
1100
Debug.
Assert
(GetUtf8TextLength(text) > utf8MaxLength);
System\Formats\Tar\TarHelpers.Unix.cs (2)
60
Debug.
Assert
(pendingModes is not null);
104
Debug.
Assert
(pendingModes is not null);
System\Formats\Tar\TarReader.cs (18)
123
Debug.
Assert
(_archiveStream.CanRead);
188
Debug.
Assert
(_archiveStream.CanRead);
209
Debug.
Assert
(_previouslyReadEntry._header._endOfHeaderAndDataAndBlockAlignment > 0);
251
Debug.
Assert
(_previouslyReadEntry._header._endOfHeaderAndDataAndBlockAlignment > 0);
319
Debug.
Assert
(!_reachedEndMarkers);
361
Debug.
Assert
(!_reachedEndMarkers);
504
Debug.
Assert
(header._linkName != null);
505
Debug.
Assert
(secondHeader._name != null);
512
Debug.
Assert
(header._name != null);
513
Debug.
Assert
(secondHeader._linkName != null);
525
Debug.
Assert
(header._linkName != null);
530
Debug.
Assert
(header._name != null);
580
Debug.
Assert
(header._linkName != null);
581
Debug.
Assert
(secondHeader._name != null);
588
Debug.
Assert
(header._name != null);
589
Debug.
Assert
(secondHeader._linkName != null);
601
Debug.
Assert
(header._linkName != null);
606
Debug.
Assert
(header._name != null);
System\Formats\Tar\TarWriter.Unix.cs (2)
21
Debug.
Assert
(!string.IsNullOrEmpty(fullPath));
99
Debug.
Assert
(entry._header._dataStream == null);
System.IO.Compression (102)
System\IO\Compression\Crc32Helper.ZLib.cs (1)
14
Debug.
Assert
((buffer != null) && (offset >= 0) && (length >= 0) && (offset <= buffer.Length - length));
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (1)
30
Debug.
Assert
(method == ZipArchiveEntry.CompressionMethodValues.Deflate64);
System\IO\Compression\DeflateManaged\InflaterManaged.cs (3)
351
Debug.
Assert
(_literalLengthTree != null);
425
Debug.
Assert
(_distanceTree != null);
570
Debug.
Assert
(_codeLengthTree != null);
System\IO\Compression\DeflateManaged\InputBuffer.cs (10)
131
Debug.
Assert
(_bitsInBuffer % 8 == 0);
163
Debug.
Assert
(output != null);
164
Debug.
Assert
(offset >= 0);
165
Debug.
Assert
(length >= 0);
166
Debug.
Assert
(offset <= output.Length - length);
167
Debug.
Assert
((_bitsInBuffer % 8) == 0);
202
Debug.
Assert
(buffer != null);
203
Debug.
Assert
(offset >= 0);
204
Debug.
Assert
(length >= 0);
205
Debug.
Assert
(offset <= buffer.Length - length);
System\IO\Compression\DeflateZLib\Deflater.cs (5)
33
Debug.
Assert
(windowBits >= minWindowBits && windowBits <= maxWindowBits);
125
Debug.
Assert
(!inputBuffer.IsEmpty);
139
Debug.
Assert
(inputBufferPtr != null);
140
Debug.
Assert
(count > 0);
172
Debug.
Assert
(outputBuffer?.Length > 0);
System\IO\Compression\DeflateZLib\DeflateStream.cs (25)
93
Debug.
Assert
(stream != null);
108
Debug.
Assert
(_buffer == null);
186
Debug.
Assert
(_deflater != null && _buffer != null);
201
Debug.
Assert
(flushSuccessful == (compressedBytes > 0));
232
Debug.
Assert
(_inflater != null);
262
Debug.
Assert
(_inflater != null);
311
Debug.
Assert
(bytesRead == 0);
400
Debug.
Assert
(_inflater != null);
516
Debug.
Assert
(_deflater != null);
533
Debug.
Assert
(_deflater != null && _buffer != null);
552
Debug.
Assert
(_deflater != null && _buffer != null);
563
Debug.
Assert
(flushSuccessful == (compressedBytes > 0));
583
Debug.
Assert
(_deflater != null && _buffer != null);
630
Debug.
Assert
(_deflater != null && _buffer != null);
814
Debug.
Assert
(_deflater != null);
833
Debug.
Assert
(_deflater != null && _buffer != null);
886
Debug.
Assert
(deflateStream != null);
887
Debug.
Assert
(destination != null);
888
Debug.
Assert
(bufferSize > 0);
901
Debug.
Assert
(_deflateStream._inflater != null);
937
Debug.
Assert
(_deflateStream._inflater != null);
969
Debug.
Assert
(buffer != _arrayPoolBuffer);
994
Debug.
Assert
(_deflateStream._inflater is not null);
1017
Debug.
Assert
(buffer != _arrayPoolBuffer);
1031
Debug.
Assert
(_deflateStream._inflater != null);
System\IO\Compression\DeflateZLib\Inflater.cs (10)
36
Debug.
Assert
(windowBits >= MinWindowBits && windowBits <= MaxWindowBits);
57
Debug.
Assert
(bytesRead == 0 || bytesRead == 1);
146
Debug.
Assert
(!NeedsInput());
147
Debug.
Assert
(IsGzipStream());
148
Debug.
Assert
(IsInputBufferHandleAllocated);
186
Debug.
Assert
(inputBuffer != null);
187
Debug.
Assert
(startIndex >= 0 && count >= 0 && count + startIndex <= inputBuffer.Length);
188
Debug.
Assert
(!IsInputBufferHandleAllocated);
196
Debug.
Assert
(!IsInputBufferHandleAllocated);
330
Debug.
Assert
(IsInputBufferHandleAllocated);
System\IO\Compression\ZipArchive.cs (10)
188
Debug.
Assert
(mode == ZipArchiveMode.Update);
310
Debug.
Assert
(_mode == ZipArchiveMode.Update || _mode == ZipArchiveMode.Create);
436
internal void DebugAssertIsStillArchiveStreamOwner(ZipArchiveEntry entry) => Debug.
Assert
(_archiveStreamOwner == entry);
440
Debug.
Assert
(_archiveStreamOwner == entry);
494
Debug.
Assert
(_archiveReader != null);
535
Debug.
Assert
(_archiveReader != null);
539
Debug.
Assert
(eocdProper); // we just found this using the signature finder, so it should be okay
593
Debug.
Assert
(_archiveReader != null);
598
Debug.
Assert
(zip64eocdLocatorProper); // we just found this using the signature finder, so it should be okay
634
Debug.
Assert
(_readEntries);
System\IO\Compression\ZipArchiveEntry.cs (21)
341
Debug.
Assert
(_archive.Mode == ZipArchiveMode.Update);
368
Debug.
Assert
(_archive.ArchiveReader != null);
464
Debug.
Assert
(_storedEntryNameBytes.Length <= ushort.MaxValue);
540
Debug.
Assert
(_fileComment.Length <= ushort.MaxValue);
565
Debug.
Assert
(IsOpenable(false, true, out _));
572
Debug.
Assert
(_archive.ArchiveReader != null);
621
Debug.
Assert
(CompressionMethod == CompressionMethodValues.Deflate
672
Debug.
Assert
(CompressionMethod == CompressionMethodValues.Stored);
767
Debug.
Assert
(_archive.ArchiveReader != null);
849
Debug.
Assert
(_storedEntryNameBytes.Length <= ushort.MaxValue);
862
Debug.
Assert
(_compressedSize == 0);
863
Debug.
Assert
(_uncompressedSize == 0);
864
Debug.
Assert
(_crc32 == 0);
877
Debug.
Assert
(_crc32 == 0);
981
Debug.
Assert
(_compressedBytes != null);
1082
Debug.
Assert
((_generalPurposeBitFlag & BitFlagValues.DataDescriptor) != 0);
1237
Debug.
Assert
(CanWrite);
1257
Debug.
Assert
(CanWrite);
1286
Debug.
Assert
(CanWrite);
1309
Debug.
Assert
(CanWrite);
1317
Debug.
Assert
(CanWrite);
System\IO\Compression\ZipBlocks.cs (1)
609
Debug.
Assert
(archiveComment.Length <= ZipFileCommentMaxLength);
System\IO\Compression\ZipCustomStreams.cs (8)
297
Debug.
Assert
(count >= 0);
298
Debug.
Assert
(count <= origCount);
320
Debug.
Assert
(count >= 0);
321
Debug.
Assert
(count <= origCount);
508
Debug.
Assert
(CanWrite);
528
Debug.
Assert
(CanWrite);
556
Debug.
Assert
(CanWrite);
582
Debug.
Assert
(CanWrite);
System\IO\Compression\ZipHelper.cs (7)
91
Debug.
Assert
(ValidZipDate_YearMin <= dateTime.Year && dateTime.Year <= ValidZipDate_YearMax);
108
Debug.
Assert
(signatureToFind != 0);
109
Debug.
Assert
(maxBytesToRead > 0);
123
Debug.
Assert
(bufferPointer < buffer.Length);
156
Debug.
Assert
(numBytesLeft >= 0);
228
Debug.
Assert
(totalCodePoints > 0);
229
Debug.
Assert
(totalCodePoints <= bytes.Length);
System.IO.Compression.Brotli (13)
System\IO\Compression\BrotliStream.cs (1)
192
Debug.
Assert
(_activeAsyncOperation == 1);
System\IO\Compression\dec\BrotliDecoder.cs (4)
58
Debug.
Assert
(_state != null);
82
Debug.
Assert
(availableInput <= (nuint)source.Length);
83
Debug.
Assert
(availableOutput <= (nuint)destination.Length);
122
Debug.
Assert
(success ? availableOutput <= (nuint)destination.Length : availableOutput == 0);
System\IO\Compression\dec\BrotliStream.Decompress.cs (2)
215
Debug.
Assert
(lastResult == OperationStatus.DestinationTooSmall);
218
Debug.
Assert
(bytesWritten == 0);
System\IO\Compression\enc\BrotliEncoder.cs (6)
75
Debug.
Assert
(_state != null && !_state.IsInvalid && !_state.IsClosed);
93
Debug.
Assert
(_state != null && !_state.IsInvalid && !_state.IsClosed);
150
Debug.
Assert
(_state != null);
171
Debug.
Assert
(availableInput <= (nuint)source.Length);
172
Debug.
Assert
(availableOutput <= (nuint)destination.Length);
225
Debug.
Assert
(success ? availableOutput <= (nuint)destination.Length : availableOutput == 0);
System.IO.Compression.ZipFile (5)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
13
Debug.
Assert
(errorInfo.Error != Error.SUCCESS);
src\libraries\Common\src\System\IO\Archiving.Utils.cs (2)
14
Debug.
Assert
(buffer != null);
15
Debug.
Assert
(min > 0);
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Unix.cs (2)
14
Debug.
Assert
(!OperatingSystem.IsWindows());
19
Debug.
Assert
((uint)entry.ExternalAttributes == DefaultFileExternalAttributes);
System.IO.FileSystem.DriveInfo (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
13
Debug.
Assert
(errorInfo.Error != Error.SUCCESS);
System.IO.FileSystem.Watcher (25)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
13
Debug.
Assert
(errorInfo.Error != Error.SUCCESS);
src\libraries\Common\src\System\IO\PathInternal.cs (1)
124
Debug.
Assert
(rootLength > 0);
src\libraries\Common\src\System\IO\PathInternal.Unix.cs (1)
31
Debug.
Assert
(DirectorySeparatorChar == AltDirectorySeparatorChar);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\IO\FileSystemWatcher.Linux.cs (17)
278
Debug.
Assert
(watcher != null);
279
Debug.
Assert
(inotifyHandle != null && !inotifyHandle.IsInvalid && !inotifyHandle.IsClosed);
280
Debug.
Assert
(directoryPath != null);
286
Debug.
Assert
(_buffer != null && _buffer.Length > (c_INotifyEventSize + NAME_MAX + 1));
478
Debug.
Assert
(_includeSubdirectories);
516
Debug.
Assert
(result >= 0);
533
Debug.
Assert
(result >= 0); // ignore errors; they're non-fatal, but they also shouldn't happen
788
Debug.
Assert
(_buffer != null);
789
Debug.
Assert
(_buffer.Length > 0);
790
Debug.
Assert
(_bufferAvailable >= 0 && _bufferAvailable <= _buffer.Length);
791
Debug.
Assert
(_bufferPos >= 0 && _bufferPos <= _bufferAvailable);
805
Debug.
Assert
(_bufferAvailable <= this._buffer.Length);
813
Debug.
Assert
(_bufferAvailable >= 0);
820
Debug.
Assert
(_bufferAvailable >= c_INotifyEventSize);
832
Debug.
Assert
(_bufferPos + c_INotifyEventSize <= _bufferAvailable);
855
Debug.
Assert
(position > 0);
856
Debug.
Assert
(nameLength >= 0 && (position + nameLength) <= _buffer.Length);
System.IO.Hashing (63)
System\IO\Hashing\Crc32.Vectorized.cs (1)
86
Debug.
Assert
(length >= 16);
System\IO\Hashing\Crc64.Vectorized.cs (1)
119
Debug.
Assert
(length >= 16);
System\IO\Hashing\NonCryptographicHashAlgorithm.cs (1)
324
Debug.
Assert
(destination.Length == HashLengthInBytes);
System\IO\Hashing\XxHash128.cs (6)
252
Debug.
Assert
(length >= 1 && length <= 3);
277
Debug.
Assert
(length >= 4 && length <= 8);
303
Debug.
Assert
(length >= 9 && length <= 16);
329
Debug.
Assert
(length >= 17 && length <= 128);
355
Debug.
Assert
(length >= 129 && length <= 240);
388
Debug.
Assert
(length > 240);
System\IO\Hashing\XxHash3.cs (7)
223
Debug.
Assert
(length >= 1 && length <= 3);
241
Debug.
Assert
(length >= 4 && length <= 8);
258
Debug.
Assert
(length >= 9 && length <= 16);
277
Debug.
Assert
(length >= 17 && length <= 128);
306
Debug.
Assert
(length >= 129 && length <= 240);
324
Debug.
Assert
((length - 16 * 8) / 16 == 7);
355
Debug.
Assert
(length > 240);
System\IO\Hashing\XxHash32.State.cs (1)
39
Debug.
Assert
(source.Length >= StripeSize);
System\IO\Hashing\XxHash64.State.cs (1)
50
Debug.
Assert
(source.Length >= StripeSize);
System\IO\Hashing\XxHashShared.cs (45)
117
Debug.
Assert
(new Span<byte>(secret, SecretLengthBytes).SequenceEqual(DefaultSecret));
120
Debug.
Assert
(InternalBufferLengthBytes % StripeLengthBytes == 0);
123
Debug.
Assert
(ReadLE64(defaultSecretUInt64[0]) == DefaultSecretUInt64_0);
124
Debug.
Assert
(ReadLE64(defaultSecretUInt64[1]) == DefaultSecretUInt64_1);
125
Debug.
Assert
(ReadLE64(defaultSecretUInt64[2]) == DefaultSecretUInt64_2);
126
Debug.
Assert
(ReadLE64(defaultSecretUInt64[3]) == DefaultSecretUInt64_3);
127
Debug.
Assert
(ReadLE64(defaultSecretUInt64[4]) == DefaultSecretUInt64_4);
128
Debug.
Assert
(ReadLE64(defaultSecretUInt64[5]) == DefaultSecretUInt64_5);
129
Debug.
Assert
(ReadLE64(defaultSecretUInt64[6]) == DefaultSecretUInt64_6);
130
Debug.
Assert
(ReadLE64(defaultSecretUInt64[7]) == DefaultSecretUInt64_7);
131
Debug.
Assert
(ReadLE64(defaultSecretUInt64[8]) == DefaultSecretUInt64_8);
132
Debug.
Assert
(ReadLE64(defaultSecretUInt64[9]) == DefaultSecretUInt64_9);
133
Debug.
Assert
(ReadLE64(defaultSecretUInt64[10]) == DefaultSecretUInt64_10);
134
Debug.
Assert
(ReadLE64(defaultSecretUInt64[11]) == DefaultSecretUInt64_11);
135
Debug.
Assert
(ReadLE64(defaultSecretUInt64[12]) == DefaultSecretUInt64_12);
136
Debug.
Assert
(ReadLE64(defaultSecretUInt64[13]) == DefaultSecretUInt64_13);
137
Debug.
Assert
(ReadLE64(defaultSecretUInt64[14]) == DefaultSecretUInt64_14);
138
Debug.
Assert
(ReadLE64(defaultSecretUInt64[15]) == DefaultSecretUInt64_15);
141
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[0]) == DefaultSecret3UInt64_0);
142
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[1]) == DefaultSecret3UInt64_1);
143
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[2]) == DefaultSecret3UInt64_2);
144
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[3]) == DefaultSecret3UInt64_3);
145
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[4]) == DefaultSecret3UInt64_4);
146
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[5]) == DefaultSecret3UInt64_5);
147
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[6]) == DefaultSecret3UInt64_6);
148
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[7]) == DefaultSecret3UInt64_7);
149
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[8]) == DefaultSecret3UInt64_8);
150
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[9]) == DefaultSecret3UInt64_9);
151
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[10]) == DefaultSecret3UInt64_10);
152
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[11]) == DefaultSecret3UInt64_11);
153
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[12]) == DefaultSecret3UInt64_12);
154
Debug.
Assert
(ReadLE64(defaultSecret3UInt64[13]) == DefaultSecret3UInt64_13);
204
Debug.
Assert
(length > 240);
220
Debug.
Assert
(stripes <= stripesPerBlock); // can handle max 1 scramble per invocation
221
Debug.
Assert
(stripesSoFar < stripesPerBlock);
242
Debug.
Assert
(state.BufferedCount <= InternalBufferLengthBytes);
272
Debug.
Assert
(sourceIndex < source.Length);
278
Debug.
Assert
(NumStripesPerBlock >= state.StripesProcessedInCurrentBlock);
282
Debug.
Assert
(stripesToEnd <= stripes);
301
Debug.
Assert
(sourceIndex < source.Length); // at least some bytes left
323
Debug.
Assert
(sourceIndex < source.Length);
324
Debug.
Assert
(remaining.Length <= InternalBufferLengthBytes);
325
Debug.
Assert
(state.BufferedCount == 0);
362
Debug.
Assert
(state.BufferedCount > 0);
778
Debug.
Assert
(shift >= 0 && shift < 64);
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (2)
609
Debug.
Assert
(parentDirectory != null);
628
Debug.
Assert
(parentDirectory != null);
System.IO.MemoryMappedFiles (19)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
13
Debug.
Assert
(errorInfo.Error != Error.SUCCESS);
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (10)
20
Debug.
Assert
(handle != null);
21
Debug.
Assert
(!handle.IsClosed);
22
Debug.
Assert
(!handle.IsInvalid);
30
Debug.
Assert
(handle != null);
31
Debug.
Assert
(!handle.IsClosed);
32
Debug.
Assert
(!handle.IsInvalid);
33
Debug.
Assert
(fileHandle != null);
165
Debug.
Assert
(handle != null);
166
Debug.
Assert
(!handle.IsInvalid);
500
Debug.
Assert
(access == MemoryMappedFileAccess.Write);
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (2)
263
Debug.
Assert
(charsWritten == 32);
266
Debug.
Assert
(Encoding.UTF8.GetByteCount(span) <= MaxNameLength); // the standard uses Utf8
System\IO\MemoryMappedFiles\MemoryMappedView.cs (4)
18
Debug.
Assert
(viewHandle != null);
75
Debug.
Assert
(size >= 0);
76
Debug.
Assert
(offset >= 0);
77
Debug.
Assert
(allocationGranularity > 0);
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (2)
39
Debug.
Assert
(pageSize > 0);
57
Debug.
Assert
(!fd.IsInvalid);
System.IO.Pipelines (30)
System\IO\Pipelines\BufferSegment.cs (5)
27
Debug.
Assert
(value <= AvailableMemory.Length);
83
Debug.
Assert
(_array != null);
109
Debug.
Assert
(segment != null);
110
Debug.
Assert
(Next == null);
118
Debug.
Assert
(segment.NextSegment != null);
System\IO\Pipelines\Pipe.cs (9)
232
Debug.
Assert
(segment.MemoryOwner is null);
233
Debug.
Assert
(sizeHint >= 0);
301
Debug.
Assert
(_writingHead != null);
416
Debug.
Assert
(_writerAwaitable.IsCompleted || _readerAwaitable.IsCompleted);
805
Debug.
Assert
(completionCallbacks != null);
839
Debug.
Assert
(completionData.SynchronizationContext != null || completionData.ExecutionContext != null);
871
Debug.
Assert
(completionData.ExecutionContext != null);
974
Debug.
Assert
(_readTail != null);
1102
Debug.
Assert
(_writingHead != null);
System\IO\Pipelines\PipeAwaitable.cs (3)
106
Debug.
Assert
(_completion == null);
107
Debug.
Assert
(_completionState == null);
108
Debug.
Assert
(_schedulingContext == null);
System\IO\Pipelines\PipeCompletion.cs (3)
71
Debug.
Assert
(IsCompleted);
86
Debug.
Assert
(IsCompleted);
87
Debug.
Assert
(_callbacks == null);
System\IO\Pipelines\PipeReaderStream.cs (1)
18
Debug.
Assert
(pipeReader != null);
System\IO\Pipelines\PipeWriterStream.cs (1)
16
Debug.
Assert
(pipeWriter != null);
System\IO\Pipelines\StreamPipeReader.cs (4)
112
Debug.
Assert
(_bufferedBytes >= 0);
273
Debug.
Assert
(length + reader._readTail.End <= reader._readTail.AvailableMemory.Length);
495
Debug.
Assert
(_readTail == null);
501
Debug.
Assert
(_readTail != null);
System\IO\Pipelines\StreamPipeWriter.cs (4)
132
Debug.
Assert
(_tail != null);
154
Debug.
Assert
(sizeHint >= 0);
304
Debug.
Assert
(_tail != null);
381
Debug.
Assert
(_tail != null);
System.IO.Pipes (12)
Microsoft\Win32\SafeHandles\SafePipeHandle.Unix.cs (2)
52
Debug.
Assert
(!IsInvalid);
110
Debug.
Assert
(socket != null);
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
13
Debug.
Assert
(errorInfo.Error != Error.SUCCESS);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
69
Debug.
Assert
(passwd.Name != null);
System\IO\Pipes\NamedPipeServerStream.Unix.cs (5)
253
Debug.
Assert
(!string.IsNullOrEmpty(path));
254
Debug.
Assert
(maxCount >= 1);
283
Debug.
Assert
(server._currentCount >= 0 && server._currentCount < server._maxCount);
293
Debug.
Assert
(_currentCount >= 1 && _currentCount <= _maxCount);
298
Debug.
Assert
(removed);
System\IO\Pipes\PipeStream.Unix.cs (3)
258
Debug.
Assert
(_handle != null);
282
Debug.
Assert
(_handle != null);
322
Debug.
Assert
(bytesWritten > 0 && bytesWritten <= source.Length);
System.Linq (191)
System\Linq\AppendPrepend.cs (8)
46
Debug.
Assert
(source is not null);
52
Debug.
Assert
(_enumerator is null);
62
Debug.
Assert
(_enumerator is not null);
179
Debug.
Assert
(prepended is not null || appended is not null);
180
Debug.
Assert
(prependCount > 0 || appendCount > 0);
181
Debug.
Assert
(prependCount + appendCount >= 2);
182
Debug.
Assert
((prepended?.GetCount() ?? 0) == prependCount);
183
Debug.
Assert
((appended?.GetCount() ?? 0) == appendCount);
System\Linq\AppendPrepend.SpeedOpt.cs (2)
15
Debug.
Assert
(GetCount(onlyIfCheap: true) == -1);
185
Debug.
Assert
(GetCount(onlyIfCheap: true) == -1);
System\Linq\Cast.cs (1)
62
Debug.
Assert
(_enumerator is not null);
System\Linq\Chunk.cs (1)
111
Debug.
Assert
(local.Length == size);
System\Linq\Concat.cs (10)
61
Debug.
Assert
(first is not null);
62
Debug.
Assert
(second is not null);
80
Debug.
Assert
(index >= 0 && index <= 2);
142
Debug.
Assert
(tail is not null);
143
Debug.
Assert
(head is not null);
144
Debug.
Assert
(headIndex >= 2);
172
Debug.
Assert
(index >= 0);
190
Debug.
Assert
(index == 0 || index == 1);
191
Debug.
Assert
(node._tail is Concat2Iterator<TSource>);
243
Debug.
Assert
(_enumerator is not null);
System\Linq\Concat.SpeedOpt.cs (5)
173
Debug.
Assert
(!_hasOnlyCollections || collection is not null);
183
Debug.
Assert
(node._tail is Concat2Iterator<TSource>);
193
Debug.
Assert
(!_hasOnlyCollections);
225
Debug.
Assert
(_hasOnlyCollections);
228
Debug.
Assert
(count >= 0);
System\Linq\DefaultIfEmpty.cs (2)
37
Debug.
Assert
(source is not null);
63
Debug.
Assert
(_enumerator is not null);
System\Linq\Distinct.cs (3)
104
Debug.
Assert
(source is not null);
130
Debug.
Assert
(_enumerator is not null);
131
Debug.
Assert
(_set is not null);
System\Linq\ElementAt.cs (2)
134
Debug.
Assert
(source is not null);
157
Debug.
Assert
(source is not null);
System\Linq\Grouping.cs (12)
161
Debug.
Assert
(_g is not null);
162
Debug.
Assert
(_lookup is not null);
175
Debug.
Assert
(_g is not null);
217
Debug.
Assert
(_g is not null);
218
Debug.
Assert
(_lookup is not null);
231
Debug.
Assert
(_g is not null);
273
Debug.
Assert
(_g is not null);
274
Debug.
Assert
(_lookup is not null);
287
Debug.
Assert
(_g is not null);
326
Debug.
Assert
(_g is not null);
327
Debug.
Assert
(_lookup is not null);
340
Debug.
Assert
(_g is not null);
System\Linq\Lookup.cs (9)
84
Debug.
Assert
(source is not null);
85
Debug.
Assert
(keySelector is not null);
86
Debug.
Assert
(elementSelector is not null);
99
Debug.
Assert
(source is not null);
100
Debug.
Assert
(keySelector is not null);
147
Debug.
Assert
(g is not null);
166
Debug.
Assert
(g is not null);
188
Debug.
Assert
(g is not null);
279
Debug.
Assert
(g is not null);
System\Linq\Lookup.SpeedOpt.cs (1)
21
Debug.
Assert
(g is not null);
System\Linq\OfType.cs (1)
47
Debug.
Assert
(_enumerator is not null);
System\Linq\OfType.SpeedOpt.cs (1)
155
Debug.
Assert
(o is TResult);
System\Linq\OrderedEnumerable.cs (17)
130
Debug.
Assert
(_buffer is not null);
131
Debug.
Assert
(_map is not null);
132
Debug.
Assert
(_map.Length == _buffer.Length);
175
Debug.
Assert
(TypeIsImplicitlyStable<TElement>());
204
Debug.
Assert
(buffer is not null);
417
Debug.
Assert
(typeof(TKey) == typeof(TElement));
427
Debug.
Assert
(keys is not null);
448
Debug.
Assert
(typeof(TKey).IsValueType);
449
Debug.
Assert
(_comparer == Comparer<TKey>.Default);
450
Debug.
Assert
(_next is null);
451
Debug.
Assert
(!_descending);
454
Debug.
Assert
(keys is not null);
464
Debug.
Assert
(typeof(TKey).IsValueType);
465
Debug.
Assert
(_comparer == Comparer<TKey>.Default);
466
Debug.
Assert
(_next is null);
467
Debug.
Assert
(_descending);
470
Debug.
Assert
(keys is not null);
System\Linq\OrderedEnumerable.SpeedOpt.cs (2)
468
Debug.
Assert
(_buffer is not null);
469
Debug.
Assert
(_map is not null);
System\Linq\PartialArrayEnumerator.cs (1)
19
Debug.
Assert
(array is not null);
System\Linq\Range.cs (2)
41
Debug.
Assert
(count > 0);
55
Debug.
Assert
(_start != _end);
System\Linq\Repeat.cs (1)
37
Debug.
Assert
(count > 0);
System\Linq\Repeat.SpeedOpt.cs (3)
38
Debug.
Assert
(count > 0);
50
Debug.
Assert
(count > 0);
86
Debug.
Assert
(_count > 0);
System\Linq\Reverse.cs (3)
37
Debug.
Assert
(source is not null);
51
Debug.
Assert
(_state == -1 || _state == 0);
73
Debug.
Assert
(_buffer is not null);
System\Linq\SegmentedArrayBuilder.cs (1)
61
Debug.
Assert
(segmentsCount > 0);
System\Linq\Select.cs (11)
101
Debug.
Assert
(source is not null);
102
Debug.
Assert
(selector is not null);
130
Debug.
Assert
(_enumerator is not null);
161
Debug.
Assert
(source is not null);
162
Debug.
Assert
(selector is not null);
163
Debug.
Assert
(source.Length > 0); // Caller should check this beforehand and return a cached result
205
Debug.
Assert
(source is not null);
206
Debug.
Assert
(selector is not null);
255
Debug.
Assert
(source is not null);
256
Debug.
Assert
(selector is not null);
274
Debug.
Assert
(_enumerator is not null);
System\Linq\Select.SpeedOpt.cs (32)
139
Debug.
Assert
(source.Length > 0);
150
Debug.
Assert
(source.Length > 0);
184
Debug.
Assert
(count > 0);
195
Debug.
Assert
(count > 0);
216
Debug.
Assert
(_source.Length > 0); // See assert in constructor
224
Debug.
Assert
(_source.Length > 0); // See assert in constructor
239
Debug.
Assert
(start < end);
240
Debug.
Assert
((uint)(end - start) <= (uint)int.MaxValue);
241
Debug.
Assert
(selector is not null);
260
Debug.
Assert
(_start < _end - index);
309
Debug.
Assert
(count > 0);
321
Debug.
Assert
(count > 0);
345
Debug.
Assert
(_end > _start);
352
Debug.
Assert
(_end > _start);
412
Debug.
Assert
(count > 0);
418
Debug.
Assert
(count > 0);
515
Debug.
Assert
(count > 0);
521
Debug.
Assert
(count > 0);
576
Debug.
Assert
(source is not null);
577
Debug.
Assert
(selector is not null);
594
Debug.
Assert
(_enumerator is not null);
624
Debug.
Assert
(count > 0);
631
Debug.
Assert
(count > 0);
662
Debug.
Assert
(_source.GetCount(onlyIfCheap: true) == -1);
681
Debug.
Assert
(count > 0);
682
Debug.
Assert
(count == _source.GetCount(onlyIfCheap: true));
774
Debug.
Assert
(source is not null);
775
Debug.
Assert
(selector is not null);
776
Debug.
Assert
(minIndexInclusive >= 0);
777
Debug.
Assert
(minIndexInclusive <= maxIndexInclusive);
809
Debug.
Assert
(count > 0);
816
Debug.
Assert
(count > 0);
System\Linq\SelectMany.cs (4)
155
Debug.
Assert
(source is not null);
156
Debug.
Assert
(selector is not null);
195
Debug.
Assert
(_sourceEnumerator is not null);
209
Debug.
Assert
(_subEnumerator is not null);
System\Linq\SingleLinkedNode.cs (4)
30
Debug.
Assert
(linked is not null);
74
Debug.
Assert
(index >= 0 && index < GetCount());
80
Debug.
Assert
(node is not null);
92
Debug.
Assert
(count == GetCount());
System\Linq\SkipTake.SpeedOpt.cs (12)
24
Debug.
Assert
(source is not null);
25
Debug.
Assert
(minIndexInclusive >= 0);
26
Debug.
Assert
(minIndexInclusive <= maxIndexInclusive);
212
Debug.
Assert
(source is not null);
214
Debug.
Assert
(minIndexInclusive >= 0);
215
Debug.
Assert
(maxIndexInclusive >= -1);
220
Debug.
Assert
(maxIndexInclusive == -1 || minIndexInclusive <= maxIndexInclusive);
296
Debug.
Assert
(_enumerator is not null);
306
Debug.
Assert
(_enumerator is not null);
409
Debug.
Assert
(!HasLimit || Limit > 0);
521
Debug.
Assert
(index >= 0);
527
Debug.
Assert
(en is not null);
System\Linq\Sum.cs (3)
83
Debug.
Assert
(span.Length >= Vector<T>.Count * 4);
84
Debug.
Assert
(Vector<T>.Count > 2);
85
Debug.
Assert
(Vector.IsHardwareAccelerated);
System\Linq\Take.cs (8)
51
Debug.
Assert
(startIndex >= 0);
52
Debug.
Assert
(endIndex >= 0);
73
Debug.
Assert
(source is not null);
74
Debug.
Assert
(isStartIndexFromEnd || isEndIndexFromEnd);
75
Debug.
Assert
(isStartIndexFromEnd
135
Debug.
Assert
(queue.Count == Math.Min(count, startIndex));
140
Debug.
Assert
(endIndex - startIndex <= queue.Count);
149
Debug.
Assert
(!isStartIndexFromEnd && isEndIndexFromEnd);
System\Linq\Take.SpeedOpt.cs (4)
13
Debug.
Assert
(source is not null && !IsEmptyArray(source));
14
Debug.
Assert
(count > 0);
24
Debug.
Assert
(source is not null && !IsEmptyArray(source));
25
Debug.
Assert
(startIndex >= 0 && startIndex < endIndex);
System\Linq\Union.cs (8)
137
Debug.
Assert
(_enumerator is not null);
148
Debug.
Assert
(_enumerator is not null);
149
Debug.
Assert
(_set is not null);
220
Debug.
Assert
(first is not null);
221
Debug.
Assert
(second is not null);
230
Debug.
Assert
(index >= 0 && index <= 2);
258
Debug.
Assert
(headIndex >= 2);
259
Debug.
Assert
(sources?.GetCount() == headIndex + 1);
System\Linq\Where.cs (17)
96
Debug.
Assert
(source is not null);
97
Debug.
Assert
(predicate is not null);
124
Debug.
Assert
(_enumerator is not null);
160
Debug.
Assert
(source is not null && source.Length > 0);
161
Debug.
Assert
(predicate is not null);
208
Debug.
Assert
(source is not null);
209
Debug.
Assert
(predicate is not null);
263
Debug.
Assert
(source is not null && source.Length > 0);
264
Debug.
Assert
(predicate is not null);
265
Debug.
Assert
(selector is not null);
312
Debug.
Assert
(source is not null);
313
Debug.
Assert
(predicate is not null);
314
Debug.
Assert
(selector is not null);
367
Debug.
Assert
(source is not null);
368
Debug.
Assert
(predicate is not null);
369
Debug.
Assert
(selector is not null);
398
Debug.
Assert
(_enumerator is not null);
System.Linq.Expressions (450)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (7)
25
Debug.
Assert
(capacity >= 0);
54
Debug.
Assert
(index >= 0 && index < _count);
78
Debug.
Assert
(_count > 0);
87
Debug.
Assert
(_count > 0);
104
Debug.
Assert
(_array != null); // Nonzero _count should imply this
134
Debug.
Assert
(_count < Capacity);
141
Debug.
Assert
(minimum > Capacity);
System\Dynamic\BindingRestrictions.cs (5)
77
Debug.
Assert
(obj != null);
241
Debug.
Assert
(expression != null);
262
Debug.
Assert
(parameter != null);
263
Debug.
Assert
(type != null);
285
Debug.
Assert
(parameter != null);
System\Dynamic\DynamicObject.cs (2)
579
Debug.
Assert
(binder is ConvertBinder && fallbackInvoke == null);
583
Debug.
Assert
(convert.Method == null);
System\Dynamic\ExpandoObject.cs (6)
144
Debug.
Assert
(data[exactMatch] == Uninitialized);
154
Debug.
Assert
(index != ExpandoObject.NoMatch);
242
Debug.
Assert
(index >= 0 && index <= _data.Length);
265
Debug.
Assert
(oldClass != newClass);
930
Debug.
Assert
(originalClass != klass);
982
Debug.
Assert
(index != ExpandoObject.NoMatch);
System\Dynamic\Utils\ContractUtils.cs (6)
41
Debug.
Assert
(!string.IsNullOrEmpty(paramName));
67
Debug.
Assert
(!string.IsNullOrEmpty(paramName));
110
Debug.
Assert
(!string.IsNullOrEmpty(arrayName));
137
Debug.
Assert
(!string.IsNullOrEmpty(offsetName));
138
Debug.
Assert
(!string.IsNullOrEmpty(countName));
139
Debug.
Assert
(array != null);
System\Dynamic\Utils\ExpressionUtils.cs (3)
102
Debug.
Assert
(nodeKind == ExpressionType.Invoke || nodeKind == ExpressionType.Call || nodeKind == ExpressionType.Dynamic || nodeKind == ExpressionType.New);
248
Debug.
Assert
(current != null);
264
Debug.
Assert
(current != null);
System\Dynamic\Utils\ListArgumentProvider.cs (1)
97
Debug.
Assert
(n > 0);
System\Dynamic\Utils\TypeExtensions.cs (2)
24
Debug.
Assert
(types != null);
40
Debug.
Assert
(argTypes != null);
System\Dynamic\Utils\TypeUtils.cs (25)
95
Debug.
Assert
(nullableType.IsNullableType());
290
Debug.
Assert
(source != null && dest != null);
321
Debug.
Assert
(source != null && dest != null);
359
Debug.
Assert
(source != typeof(object) && dest != typeof(object));
441
Debug.
Assert
(source.IsArray);
468
Debug.
Assert
(dest.IsSZArray);
495
Debug.
Assert
(t != null);
501
Debug.
Assert
(t != null);
507
Debug.
Assert
(t != null);
513
Debug.
Assert
(t != null);
519
Debug.
Assert
(source != null && dest != null);
547
Debug.
Assert
(genericParameters != null);
548
Debug.
Assert
(sourceArguments != null);
549
Debug.
Assert
(destArguments != null);
550
Debug.
Assert
(genericParameters.Length == sourceArguments.Length);
551
Debug.
Assert
(genericParameters.Length == destArguments.Length);
558
Debug.
Assert
(sourceArgument != null && destArgument != null);
568
Debug.
Assert
(genericParameter != null);
670
Debug.
Assert
(left.IsValueType);
868
Debug.
Assert
(!definition.IsInterface);
896
Debug.
Assert
(name == "op_False" || name == "op_True");
969
Debug.
Assert
(typeof(Delegate).IsAssignableFrom(delegateType));
1010
Debug.
Assert
(arrayType.IsArray);
1018
Debug.
Assert
(arrayType.IsArray);
1026
Debug.
Assert
(arrayType.IsArray);
System\Linq\Expressions\BinaryExpression.cs (13)
137
Debug.
Assert
(IsOpAssignment(op));
315
Debug.
Assert
(nodeType != ExpressionType.Assign);
318
Debug.
Assert
(method == null && TypeUtils.AreEquivalent(type, right.Type) && nodeType == ExpressionType.Coalesce);
395
Debug.
Assert
(IsLiftedLogical);
401
Debug.
Assert
(opTrueFalse != null);
633
System.Diagnostics.Debug.
Assert
(method != null);
763
Debug.
Assert
(method != null);
1393
Debug.
Assert
(typeof(System.MulticastDelegate).IsAssignableFrom(delegateType) && delegateType != typeof(System.MulticastDelegate));
1400
Debug.
Assert
(pms.Length == conversion.ParameterCount);
1549
Debug.
Assert
(typeof(System.MulticastDelegate).IsAssignableFrom(delegateType) && delegateType != typeof(System.MulticastDelegate));
1552
Debug.
Assert
(pms.Length == conversion.ParameterCount);
1561
Debug.
Assert
(method != null);
2750
Debug.
Assert
(method != null);
System\Linq\Expressions\BlockExpression.cs (31)
210
Debug.
Assert
(expressions != null);
241
Debug.
Assert
(args != null);
242
Debug.
Assert
(args.Length == 2);
243
Debug.
Assert
(variables == null || variables.Count == 0);
263
Debug.
Assert
(expressions != null);
307
Debug.
Assert
(args != null);
308
Debug.
Assert
(args.Length == 3);
309
Debug.
Assert
(variables == null || variables.Count == 0);
330
Debug.
Assert
(expressions != null);
379
Debug.
Assert
(args != null);
380
Debug.
Assert
(args.Length == 4);
381
Debug.
Assert
(variables == null || variables.Count == 0);
414
Debug.
Assert
(expressions != null);
457
Debug.
Assert
(args != null);
458
Debug.
Assert
(args.Length == 5);
459
Debug.
Assert
(variables == null || variables.Count == 0);
471
Debug.
Assert
(expressions.Count != 0);
481
Debug.
Assert
(index >= 0 && index < _expressions.Count);
495
Debug.
Assert
(variables == null || variables.Count == 0);
496
Debug.
Assert
(args != null);
554
Debug.
Assert
(expressions != null);
590
Debug.
Assert
(variables!.Count == Variables.Count);
594
Debug.
Assert
(args.Length == 1);
595
Debug.
Assert
(variables == null || variables.Count == Variables.Count);
629
Debug.
Assert
(variables!.Count == Variables.Count);
633
Debug.
Assert
(args.Length == ExpressionCount);
634
Debug.
Assert
(variables == null || variables.Count == Variables.Count);
654
Debug.
Assert
(variables!.Count == Variables.Count);
658
Debug.
Assert
(args.Length == ExpressionCount);
659
Debug.
Assert
(variables == null || variables.Count == Variables.Count);
770
Debug.
Assert
(n > 0);
System\Linq\Expressions\Compiler\BoundConstants.cs (1)
97
Debug.
Assert
(!ILGen.CanEmitConstant(value, type));
System\Linq\Expressions\Compiler\CompilerScope.cs (3)
187
Debug.
Assert
(locals != null);
288
Debug.
Assert
(_parent == null && parent != this);
402
Debug.
Assert
(ShouldCache(v) && !_locals.ContainsKey(v));
System\Linq\Expressions\Compiler\DelegateHelpers.Generated.cs (2)
136
Debug.
Assert
(types != null && types.Length > 0);
183
Debug.
Assert
(result != null);
System\Linq\Expressions\Compiler\ILGen.cs (45)
21
Debug.
Assert
(methodBase is MethodInfo || methodBase is ConstructorInfo);
38
Debug.
Assert
(index >= 0);
39
Debug.
Assert
(index < ushort.MaxValue);
46
Debug.
Assert
(index >= 0);
47
Debug.
Assert
(index < ushort.MaxValue);
54
Debug.
Assert
(index >= 0);
55
Debug.
Assert
(index < ushort.MaxValue);
65
Debug.
Assert
(type != null);
118
Debug.
Assert
(type != null);
163
Debug.
Assert
(type != null);
215
Debug.
Assert
(type != null);
258
Debug.
Assert
(type != null);
270
Debug.
Assert
(fi != null);
277
Debug.
Assert
(fi != null);
284
Debug.
Assert
(fi != null);
291
Debug.
Assert
(ci != null);
292
Debug.
Assert
(!ci.DeclaringType!.ContainsGenericParameters);
308
Debug.
Assert
(value != null);
484
Debug.
Assert
(value != null);
559
Debug.
Assert
(typeFrom != typeof(void) && typeTo != typeof(void));
603
Debug.
Assert
(!typeTo.IsValueType);
652
Debug.
Assert
(typeFrom != typeTo);
789
Debug.
Assert
(typeFrom.IsNullableType());
790
Debug.
Assert
(typeTo.IsNullableType());
823
Debug.
Assert
(!typeFrom.IsNullableType());
824
Debug.
Assert
(typeTo.IsNullableType());
833
Debug.
Assert
(typeFrom.IsNullableType());
834
Debug.
Assert
(!typeTo.IsNullableType());
844
Debug.
Assert
(typeFrom.IsNullableType());
845
Debug.
Assert
(!typeTo.IsNullableType());
846
Debug.
Assert
(typeTo.IsValueType);
859
Debug.
Assert
(typeFrom.IsNullableType());
870
Debug.
Assert
(isTypeFromNullable || isTypeToNullable);
881
Debug.
Assert
(nullableType.IsNullableType());
884
Debug.
Assert
(nullableType.IsValueType);
890
Debug.
Assert
(nullableType.IsNullableType());
893
Debug.
Assert
(nullableType.IsValueType);
899
Debug.
Assert
(nullableType.IsNullableType());
902
Debug.
Assert
(nullableType.IsValueType);
936
Debug.
Assert
(elementType != null);
937
Debug.
Assert
(count >= 0);
952
Debug.
Assert
(arrayType != null);
953
Debug.
Assert
(arrayType.IsArray);
967
Debug.
Assert
(ci != null);
1069
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Compiler\LabelInfo.cs (1)
382
Debug.
Assert
(CanJumpInto);
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (6)
24
Debug.
Assert
(node != null);
68
Debug.
Assert
(node.NodeType == ExpressionType.ArrayIndex && node.Method == null);
74
Debug.
Assert
(node.Right.Type == typeof(int));
209
Debug.
Assert
(node.NodeType == ExpressionType.Unbox);
210
Debug.
Assert
(type.IsValueType);
219
Debug.
Assert
(TypeUtils.AreReferenceAssignable(type, node.Type));
System\Linq\Expressions\Compiler\LambdaCompiler.Binary.cs (21)
24
Debug.
Assert
(b.NodeType != ExpressionType.AndAlso && b.NodeType != ExpressionType.OrElse && b.NodeType != ExpressionType.Coalesce);
41
Debug.
Assert
(!b.IsLiftedToNull || b.Type == typeof(bool?));
71
Debug.
Assert
(e.Type.IsNullableType());
72
Debug.
Assert
(op == ExpressionType.Equal || op == ExpressionType.NotEqual);
107
Debug.
Assert
(mc.Type == typeof(bool));
108
Debug.
Assert
(b.NodeType == ExpressionType.Equal
118
Debug.
Assert
(TypeUtils.AreReferenceAssignable(p1.Type, b.Left.Type.GetNonNullableType()));
119
Debug.
Assert
(TypeUtils.AreReferenceAssignable(p2.Type, b.Right.Type.GetNonNullableType()));
131
Debug.
Assert
(op != ExpressionType.Coalesce);
134
Debug.
Assert
(rightType == typeof(int));
150
Debug.
Assert
(!leftType.IsNullableType());
151
Debug.
Assert
(!rightType.IsNullableType());
152
Debug.
Assert
(leftType.IsPrimitive || (op == ExpressionType.Equal || op == ExpressionType.NotEqual) && (!leftType.IsValueType || leftType.IsEnum));
237
Debug.
Assert
(rightType == typeof(int));
242
Debug.
Assert
(rightType == typeof(int));
268
Debug.
Assert
(!resultType.IsNullableType());
289
Debug.
Assert
(leftType.IsNullableType() || rightType.IsNullableType());
331
Debug.
Assert
(leftType == rightType);
334
Debug.
Assert
(resultType == typeof(bool?));
339
Debug.
Assert
(resultType == typeof(bool));
422
Debug.
Assert
(leftIsNullable || rightIsNullable);
System\Linq\Expressions\Compiler\LambdaCompiler.ControlFlow.cs (3)
47
Debug.
Assert
(_labelBlock != null && _labelBlock.Kind == kind);
54
Debug.
Assert
(node.Target != null);
72
Debug.
Assert
(label != null);
System\Linq\Expressions\Compiler\LambdaCompiler.cs (3)
231
Debug.
Assert
(local != null);
263
Debug.
Assert
(_method is DynamicMethod);
288
Debug.
Assert
(_method is DynamicMethod);
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (23)
39
Debug.
Assert
(newValue == CompilationFlags.EmitAsTail || newValue == CompilationFlags.EmitAsMiddle || newValue == CompilationFlags.EmitAsNoTail);
49
Debug.
Assert
(newValue == CompilationFlags.EmitExpressionStart || newValue == CompilationFlags.EmitNoExpressionStart);
59
Debug.
Assert
(newValue == CompilationFlags.EmitAsDefaultType || newValue == CompilationFlags.EmitAsVoidType);
85
Debug.
Assert
(node != null);
136
Debug.
Assert
(TypeUtils.AreReferenceAssignable(type, node.Type));
214
Debug.
Assert
(wb.Count > 0);
251
Debug.
Assert
(!node.IsByRef);
376
Debug.
Assert
(obj != null);
516
Debug.
Assert
(args.ArgumentCount + skipParameters == pis.Length);
567
Debug.
Assert
(value != null);
588
Debug.
Assert
(_method is DynamicMethod);
616
Debug.
Assert
(siteType.IsGenericType && siteType.GetGenericTypeDefinition() == typeof(CallSite<>));
681
Debug.
Assert
(!type.IsValueType);
688
Debug.
Assert
(result == AnalyzeTypeIsResult.Unknown);
787
Debug.
Assert
(!node.IsByRef);
819
Debug.
Assert
(member is PropertyInfo);
863
Debug.
Assert
(member is PropertyInfo);
881
Debug.
Assert
(instance.NodeType == ExpressionType.Parameter);
882
Debug.
Assert
(type!.IsValueType);
966
Debug.
Assert
(binding.Member is PropertyInfo);
1104
Debug.
Assert
(member is FieldInfo || member is PropertyInfo);
1114
Debug.
Assert
(TypeUtils.AreEquivalent(resultType.GetNonNullableType(), mc.Type.GetNonNullableType()));
1186
Debug.
Assert
(nodeType == ExpressionType.LessThan
System\Linq\Expressions\Compiler\LambdaCompiler.Generated.cs (1)
24
Debug.
Assert
(node != null);
System\Linq\Expressions\Compiler\LambdaCompiler.Lambda.cs (4)
28
Debug.
Assert
(_method is DynamicMethod);
99
Debug.
Assert
(dynamicMethod != null);
133
Debug.
Assert
(_method is DynamicMethod);
246
Debug.
Assert
(_labelBlock.Parent == null && _labelBlock.Kind == LabelScopeKind.Lambda);
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (17)
18
Debug.
Assert
(node.Test.Type == typeof(bool));
89
Debug.
Assert
(b.Method == null);
97
Debug.
Assert
(!b.Left.Type.IsValueType);
112
Debug.
Assert
(b.Method == null);
126
Debug.
Assert
(b.Conversion.ParameterCount == 1);
128
Debug.
Assert
(p.Type.IsAssignableFrom(b.Left.Type) ||
189
Debug.
Assert
(b.Conversion!.ParameterCount == 1);
226
Debug.
Assert
(!b.Left.Type.IsValueType);
278
Debug.
Assert
(b.Method!.IsStatic);
384
Debug.
Assert
(b.Method!.IsStatic);
458
Debug.
Assert
(node.Type == typeof(bool));
508
Debug.
Assert
(node.NodeType == ExpressionType.Equal || node.NodeType == ExpressionType.NotEqual);
509
Debug.
Assert
(!node.IsLiftedToNull);
530
Debug.
Assert
(!node.Right.Type.IsValueType);
544
Debug.
Assert
(!node.Left.Type.IsValueType);
583
Debug.
Assert
(node.NodeType == ExpressionType.AndAlso || node.NodeType == ExpressionType.OrElse);
584
Debug.
Assert
(!node.IsLiftedToNull);
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (6)
107
Debug.
Assert
(_scope.Node == node);
179
Debug.
Assert
(node.Type == typeof(void));
222
Debug.
Assert
(TypeUtils.AreReferenceAssignable(testValue.Type, test.Type));
295
Debug.
Assert
(key > buckets[buckets.Count - 1].Key);
623
Debug.
Assert
(key == bucket[bucket.Count - 1].Key + 1);
624
Debug.
Assert
(slot == jmpLabels.Length);
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (7)
34
Debug.
Assert
(typeof(LambdaExpression).IsAssignableFrom(quote.Type));
75
Debug.
Assert
(type == node.Operand.Type);
149
Debug.
Assert
(TypeUtils.AreEquivalent(operandType, resultType));
274
Debug.
Assert
(node.Type.IsValueType);
309
Debug.
Assert
(pis != null && pis.Length == 1);
317
Debug.
Assert
(operand.Method == null);
321
Debug.
Assert
(node.Method == null);
System\Linq\Expressions\Compiler\StackSpiller.ChildRewriter.cs (3)
122
Debug.
Assert
(!_done);
379
Debug.
Assert
(_comma!.Capacity == _comma.Count + 1);
450
Debug.
Assert
(first == 0);
System\Linq\Expressions\Compiler\StackSpiller.cs (3)
133
Debug.
Assert
(result.Node != null);
1043
Debug.
Assert
(original != null);
1044
Debug.
Assert
(max < original.Count);
System\Linq\Expressions\Compiler\StackSpiller.Temps.cs (6)
143
Debug.
Assert
(_freeTemps == null || !_freeTemps.Contains(temp));
144
Debug.
Assert
(_usedTemps == null || !_usedTemps.Contains(temp));
160
Debug.
Assert
(_freeTemps == null || !_freeTemps.Contains(temp));
190
Debug.
Assert
(_usedTemps == null || mark <= _usedTemps.Count);
192
Debug.
Assert
(mark == 0 || _usedTemps != null);
211
Debug.
Assert
(_usedTemps == null || _usedTemps.Count == 0);
System\Linq\Expressions\Compiler\VariableBinder.cs (1)
221
Debug.
Assert
(referenceScope != null);
System\Linq\Expressions\DebugViewWriter.cs (8)
99
Debug.
Assert
(string.IsNullOrEmpty(le.Name));
105
Debug.
Assert
(string.IsNullOrEmpty(p.Name));
111
Debug.
Assert
(string.IsNullOrEmpty(target.Name));
120
Debug.
Assert
(node != null);
121
Debug.
Assert
(writer != null);
555
Debug.
Assert
(parent != null);
598
Debug.
Assert
(child.NodeType == parent.NodeType);
611
Debug.
Assert
(binary != null);
System\Linq\Expressions\DynamicExpression.cs (7)
24
Debug.
Assert
(delegateType.GetInvokeMethod().GetReturnType() == typeof(object) || GetType() != typeof(DynamicExpression));
516
Debug.
Assert
(args.Length == ((IArgumentProvider)this).ArgumentCount);
527
Debug.
Assert
(delegateType.GetInvokeMethod().GetReturnType() == returnType);
574
Debug.
Assert
(args.Length == 1);
643
Debug.
Assert
(args.Length == 2);
718
Debug.
Assert
(args.Length == 3);
799
Debug.
Assert
(args.Length == 4);
System\Linq\Expressions\Expression.cs (2)
240
Debug.
Assert
(items != null);
272
Debug.
Assert
(member is FieldInfo);
System\Linq\Expressions\ExpressionStringBuilder.cs (6)
71
Debug.
Assert
(node != null);
79
Debug.
Assert
(node != null);
87
Debug.
Assert
(node != null);
98
Debug.
Assert
(node != null);
109
Debug.
Assert
(node != null);
757
Debug.
Assert
(node.Indexer != null);
System\Linq\Expressions\IndexExpression.cs (4)
30
Debug.
Assert
(instance != null && instance.Type.IsArray);
31
Debug.
Assert
(instance.Type.GetArrayRank() == arguments.Count);
122
Debug.
Assert
(instance != null);
123
Debug.
Assert
(arguments == null || arguments.Length == _arguments.Count);
System\Linq\Expressions\Interpreter\AddInstruction.cs (2)
165
Debug.
Assert
(type.IsArithmetic());
301
Debug.
Assert
(type.IsArithmetic());
System\Linq\Expressions\Interpreter\BranchLabel.cs (4)
46
Debug.
Assert
(_targetIndex != UnknownIndex && _stackDepth != UnknownDepth && _continuationStackDepth != UnknownDepth);
70
Debug.
Assert
(((_targetIndex == UnknownIndex) == (_stackDepth == UnknownDepth)));
71
Debug.
Assert
(((_targetIndex == UnknownIndex) == (_continuationStackDepth == UnknownDepth)));
86
Debug.
Assert
(_targetIndex != UnknownIndex);
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (1)
137
Debug.
Assert
(pi.Length == 2);
System\Linq\Expressions\Interpreter\ControlFlowInstructions.cs (12)
25
Debug.
Assert
(_offset == Unknown && offset != Unknown);
59
Debug.
Assert
(_offset != Unknown);
81
Debug.
Assert
(_offset != Unknown);
104
Debug.
Assert
(_offset != Unknown);
148
Debug.
Assert
(_offset != Unknown);
166
Debug.
Assert
(_labelIndex != UnknownInstrIndex);
172
Debug.
Assert
(_labelIndex != UnknownInstrIndex);
179
Debug.
Assert
(_labelIndex != UnknownInstrIndex);
325
Debug.
Assert
(!(unwrappedException is RethrowException));
415
Debug.
Assert
(tryHandler != null);
567
Debug.
Assert
(!frame.IsJumpHappened());
590
Debug.
Assert
(!frame.IsJumpHappened());
System\Linq\Expressions\Interpreter\DecrementInstruction.cs (1)
157
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\DefaultValueInstruction.cs (2)
17
Debug.
Assert
(type.IsValueType);
18
Debug.
Assert
(!type.IsNullableType());
System\Linq\Expressions\Interpreter\DivInstruction.cs (1)
165
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\EqualInstruction.cs (2)
528
Debug.
Assert
(type.GetNonNullableType().GetTypeCode() == TypeCode.Double);
550
Debug.
Assert
(type.IsNullableOrReferenceType());
System\Linq\Expressions\Interpreter\FieldOperations.cs (2)
27
Debug.
Assert
(field.IsStatic);
88
Debug.
Assert
(field.IsStatic);
System\Linq\Expressions\Interpreter\GreaterThanInstruction.cs (1)
279
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\GreaterThanOrEqualInstruction.cs (1)
279
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\IncrementInstruction.cs (1)
157
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\InstructionList.cs (2)
239
Debug.
Assert
(Count > 0);
770
Debug.
Assert
(_instructions[_instructions.Count - 1] == NullCheckInstruction.Instance);
System\Linq\Expressions\Interpreter\InterpretedFrame.cs (1)
213
Debug.
Assert
(_pendingContinuation >= 0);
System\Linq\Expressions\Interpreter\LabelInfo.cs (1)
329
Debug.
Assert
(CanJumpInto);
System\Linq\Expressions\Interpreter\LessThanInstruction.cs (1)
278
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\LessThanOrEqualInstruction.cs (1)
279
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\LightCompiler.cs (34)
43
Debug.
Assert
(exceptionType != null);
71
Debug.
Assert
((FinallyStartIndex != Instruction.UnknownInstrIndex) == (FinallyEndIndex != Instruction.UnknownInstrIndex));
220
Debug.
Assert
(d1 != null && d2 != null);
329
Debug.
Assert
(_instructions.CurrentStackDepth == (node.ReturnType != typeof(void) ? 1 : 0));
461
Debug.
Assert
(local.IsBoxed);
692
Debug.
Assert
(fi != null);
898
Debug.
Assert
(node.Right.Type == typeof(int));
979
Debug.
Assert
(IsNullComparison(left, right) || left.Type == right.Type || !left.Type.IsValueType && !right.Type.IsValueType);
989
Debug.
Assert
(IsNullComparison(left, right) || left.Type == right.Type || !left.Type.IsValueType && !right.Type.IsValueType);
1000
Debug.
Assert
(left.Type == right.Type && left.Type.IsNumeric());
1017
Debug.
Assert
(left.Type == right.Type && left.Type.IsArithmetic());
1043
Debug.
Assert
(parameters.Length == 1);
1115
Debug.
Assert
(typeFrom != typeof(void) && typeTo != typeof(void));
1366
Debug.
Assert
(expr.Method.IsStatic);
1548
Debug.
Assert
(node.Type == typeof(void));
1644
Debug.
Assert
(!hasValue);
1688
Debug.
Assert
(!hasValue);
1744
Debug.
Assert
(label != null);
1787
Debug.
Assert
(_labelBlock != null && _labelBlock.Kind == kind);
1990
Debug.
Assert
(enterTryInstr != null);
2071
Debug.
Assert
(startOfFinally != null);
2087
Debug.
Assert
(exHandlers != null);
2100
Debug.
Assert
(expr.Finally == null);
2101
Debug.
Assert
(expr.Handlers.Count == 0);
2107
Debug.
Assert
(enterTryInstr == _instructions.GetInstruction(tryStart));
2154
Debug.
Assert
(parameters.Length == arguments.ArgumentCount);
2324
Debug.
Assert
(member.Member is PropertyInfo);
2426
Debug.
Assert
(type.IsValueType);
2451
Debug.
Assert
(!forBinding);
2517
Debug.
Assert
(typeof(NewArrayExpression).GetCustomAttribute<RequiresDynamicCodeAttribute>() is not null);
2534
Debug.
Assert
(node.NodeType == ExpressionType.NewArrayBounds);
2900
Debug.
Assert
(expr.NodeType == ExpressionType.TypeEqual);
2923
Debug.
Assert
(expr.NodeType == ExpressionType.TypeIs);
3009
Debug.
Assert
(_instructions.CurrentStackDepth == startingStackDepth);
System\Linq\Expressions\Interpreter\LightDelegateCreator.cs (2)
18
Debug.
Assert
(interpreter != null);
19
Debug.
Assert
(lambda != null);
System\Linq\Expressions\Interpreter\LocalAccess.cs (1)
273
Debug.
Assert
(defaultValue != null);
System\Linq\Expressions\Interpreter\LocalVariables.cs (1)
115
Debug.
Assert
(!local.IsBoxed && !local.InClosure);
System\Linq\Expressions\Interpreter\ModuloInstruction.cs (1)
165
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\MulInstruction.cs (2)
165
Debug.
Assert
(type.IsArithmetic());
302
Debug.
Assert
(type.IsArithmetic());
System\Linq\Expressions\Interpreter\NegateInstruction.cs (2)
106
Debug.
Assert
(!type.IsEnum);
182
Debug.
Assert
(!type.IsEnum);
System\Linq\Expressions\Interpreter\NotEqualInstruction.cs (2)
510
Debug.
Assert
(type.GetNonNullableType().GetTypeCode() == TypeCode.Double);
532
Debug.
Assert
(type.IsNullableOrReferenceType());
System\Linq\Expressions\Interpreter\SubInstruction.cs (2)
165
Debug.
Assert
(type.IsArithmetic());
301
Debug.
Assert
(type.IsArithmetic());
System\Linq\Expressions\Interpreter\TypeOperations.cs (7)
154
Debug.
Assert
(!mi.ReturnType.IsNullableType());
356
Debug.
Assert
(!t.IsEnum);
386
Debug.
Assert
(t.IsEnum);
393
Debug.
Assert
(
410
Debug.
Assert
(t.IsEnum);
417
Debug.
Assert
(from != null);
456
Debug.
Assert
(_t.GetTypeCode() == TypeCode.Boolean);
System\Linq\Expressions\Interpreter\Utilities.cs (6)
178
Debug.
Assert
(key != null);
201
Debug.
Assert
(key != null);
222
Debug.
Assert
(key != null);
272
Debug.
Assert
(key != null);
284
Debug.
Assert
(key != null);
340
Debug.
Assert
(var != null);
System\Linq\Expressions\InvocationExpression.cs (14)
146
Debug.
Assert
(lambda != null);
147
Debug.
Assert
(arguments == null || arguments.Length == _arguments.Count);
174
Debug.
Assert
(lambda != null);
175
Debug.
Assert
(arguments == null || arguments.Length == 0);
207
Debug.
Assert
(lambda != null);
208
Debug.
Assert
(arguments == null || arguments.Length == 1);
247
Debug.
Assert
(lambda != null);
248
Debug.
Assert
(arguments == null || arguments.Length == 2);
290
Debug.
Assert
(lambda != null);
291
Debug.
Assert
(arguments == null || arguments.Length == 3);
336
Debug.
Assert
(lambda != null);
337
Debug.
Assert
(arguments == null || arguments.Length == 4);
385
Debug.
Assert
(lambda != null);
386
Debug.
Assert
(arguments == null || arguments.Length == 5);
System\Linq\Expressions\LambdaExpression.cs (13)
122
Debug.
Assert
(lambdaExpressionType.IsAssignableTo(typeof(LambdaExpression)));
145
Debug.
Assert
(CanInterpret);
225
Debug.
Assert
(CanInterpret);
377
Debug.
Assert
(body != null);
378
Debug.
Assert
(parameters == null || parameters.Length == 0);
421
Debug.
Assert
(body != null);
422
Debug.
Assert
(parameters == null || parameters.Length == 1);
483
Debug.
Assert
(body != null);
484
Debug.
Assert
(parameters == null || parameters.Length == 2);
551
Debug.
Assert
(body != null);
552
Debug.
Assert
(parameters == null || parameters.Length == 3);
584
Debug.
Assert
(body != null);
585
Debug.
Assert
(parameters == null || parameters.Length == _parameters.Count);
System\Linq\Expressions\MemberExpression.cs (2)
35
Debug.
Assert
(property != null);
41
Debug.
Assert
(field != null);
System\Linq\Expressions\MethodCallExpression.cs (25)
159
Debug.
Assert
(instance != null);
191
Debug.
Assert
(instance == null);
192
Debug.
Assert
(args == null || args.Count == _arguments.Count);
222
Debug.
Assert
(instance != null);
223
Debug.
Assert
(args == null || args.Count == _arguments.Count);
253
Debug.
Assert
(instance == null);
254
Debug.
Assert
(args == null || args.Count == 0);
300
Debug.
Assert
(instance == null);
301
Debug.
Assert
(args == null || args.Count == 1);
366
Debug.
Assert
(instance == null);
367
Debug.
Assert
(args == null || args.Count == 2);
437
Debug.
Assert
(instance == null);
438
Debug.
Assert
(args == null || args.Count == 3);
514
Debug.
Assert
(instance == null);
515
Debug.
Assert
(args == null || args.Count == 4);
597
Debug.
Assert
(instance == null);
598
Debug.
Assert
(args == null || args.Count == 5);
633
Debug.
Assert
(instance != null);
634
Debug.
Assert
(args == null || args.Count == 0);
682
Debug.
Assert
(instance != null);
683
Debug.
Assert
(args == null || args.Count == 1);
747
Debug.
Assert
(instance != null);
748
Debug.
Assert
(args == null || args.Count == 2);
818
Debug.
Assert
(instance != null);
819
Debug.
Assert
(args == null || args.Count == 3);
System\Linq\Expressions\NewArrayExpression.cs (1)
28
Debug.
Assert
(type.IsArray);
System\Linq\Expressions\TryExpression.cs (3)
184
Debug.
Assert
(tryBody != null);
208
Debug.
Assert
(cb.Body != null);
221
Debug.
Assert
(cb.Body != null);
System\Linq\Expressions\UnaryExpression.cs (8)
124
Debug.
Assert
(Operand.NodeType == ExpressionType.Parameter);
145
Debug.
Assert
(NodeType == ExpressionType.PreDecrementAssign || NodeType == ExpressionType.PostDecrementAssign);
262
Debug.
Assert
(i == temps.Length);
268
Debug.
Assert
(i == temps.Length);
271
Debug.
Assert
(i == block.Length);
382
Debug.
Assert
(method != null);
428
Debug.
Assert
(method != null);
1063
Debug.
Assert
(kind == ExpressionType.PreDecrementAssign || kind == ExpressionType.PostDecrementAssign);
System\Runtime\CompilerServices\CallSiteBinder.cs (1)
221
Debug.
Assert
(result != null);
System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs (1)
28
Debug.
Assert
(hoistedLocals != null && locals != null);
System\Runtime\CompilerServices\RuntimeOps.RuntimeVariableList.cs (2)
76
Debug.
Assert
(data != null);
77
Debug.
Assert
(indexes != null);
System.Linq.Parallel (518)
System\Linq\Parallel\Channels\AsynchronousChannel.cs (11)
258
Debug.
Assert
(_producerChunk != null);
289
Debug.
Assert
(chunk != null);
315
Debug.
Assert
(_consumerEvent != null);
327
Debug.
Assert
(_producerEvent != null);
383
Debug.
Assert
(1 <= _producerChunkIndex && _producerChunkIndex <= _chunkSize);
410
Debug.
Assert
(_consumerChunk == null);
488
Debug.
Assert
(_consumerChunk == null);
606
Debug.
Assert
(!IsChunkBufferEmpty);
630
Debug.
Assert
(_producerEvent != null);
664
Debug.
Assert
(_producerEvent != null);
665
Debug.
Assert
(_consumerEvent != null);
System\Linq\Parallel\Channels\SynchronousChannel.cs (4)
67
Debug.
Assert
(_queue != null);
89
Debug.
Assert
(_queue != null);
117
Debug.
Assert
(_queue != null && array != null);
132
Debug.
Assert
(_queue != null);
System\Linq\Parallel\Enumerables\AggregationMinMaxHelpers.cs (2)
25
Debug.
Assert
(source != null);
26
Debug.
Assert
(sign == -1 || sign == 1);
System\Linq\Parallel\Enumerables\EnumerableWrapperWeakToStrong.cs (2)
32
Debug.
Assert
(wrappedEnumerable != null);
60
Debug.
Assert
(wrappedEnumerator != null);
System\Linq\Parallel\Enumerables\OrderedParallelQuery.cs (1)
29
Debug.
Assert
(sortOp is IOrderedEnumerable<TSource>);
System\Linq\Parallel\Enumerables\ParallelEnumerableWrapper.cs (2)
31
Debug.
Assert
(source != null);
89
Debug.
Assert
(_wrappedEnumerable != null);
System\Linq\Parallel\Merging\ArrayMergeHelper.cs (1)
86
Debug.
Assert
(_outputArray != null);
System\Linq\Parallel\Merging\AsynchronousChannelMergeEnumerator.cs (5)
48
Debug.
Assert
(channels != null);
50
foreach (AsynchronousChannel<T> c in channels) Debug.
Assert
(c != null);
226
Debug.
Assert
(!ParallelEnumerable.SinglePartitionMode);
227
Debug.
Assert
(_consumerEvent != null);
271
Debug.
Assert
(currChannelIndex == _channels.Length);
System\Linq\Parallel\Merging\DefaultMergeHelper.cs (7)
48
Debug.
Assert
(partitions != null);
67
Debug.
Assert
(!ParallelEnumerable.SinglePartitionMode);
86
Debug.
Assert
(_asyncChannels == null || _asyncChannels.Length == partitions.PartitionCount);
87
Debug.
Assert
(_syncChannels == null || _syncChannels.Length == partitions.PartitionCount);
103
Debug.
Assert
(!ParallelEnumerable.SinglePartitionMode);
118
Debug.
Assert
(_partitions.PartitionCount == 1);
128
Debug.
Assert
(_ignoreOutput || _channelEnumerator != null);
System\Linq\Parallel\Merging\MergeEnumerator.cs (2)
30
Debug.
Assert
(taskGroupState != null);
68
Debug.
Assert
(_taskGroupState.CancellationState.TopLevelDisposedFlag.Value);
System\Linq\Parallel\Merging\MergeExecutor.cs (8)
53
Debug.
Assert
(partitions != null);
54
Debug.
Assert
(partitions.PartitionCount > 0);
62
Debug.
Assert
(options == ParallelMergeOptions.NotBuffered || options == ParallelMergeOptions.AutoBuffered);
67
Debug.
Assert
(!ParallelEnumerable.SinglePartitionMode);
102
Debug.
Assert
(_mergeHelper != null);
118
Debug.
Assert
(_mergeHelper != null);
128
Debug.
Assert
(_mergeHelper != null);
151
Debug.
Assert
(options == ParallelMergeOptions.NotBuffered || options == ParallelMergeOptions.AutoBuffered);
System\Linq\Parallel\Merging\OrderPreservingMergeHelper.cs (2)
41
Debug.
Assert
(partitions != null);
69
Debug.
Assert
(_results.Value != null);
System\Linq\Parallel\Merging\OrderPreservingPipeliningMergeHelper.cs (7)
122
Debug.
Assert
(partitions != null);
139
Debug.
Assert
(typeof(TKey) == typeof(int));
415
Debug.
Assert
(_mergeHelper._producerDone[producer]);
427
Debug.
Assert
(!ParallelEnumerable.SinglePartitionMode);
452
Debug.
Assert
(gotElement);
471
Debug.
Assert
(_privateBuffer[producer]!.Count == 0);
535
Debug.
Assert
(x.MaxKey >= 0 && y.MaxKey >= 0); // Guarantees no overflow on next line
System\Linq\Parallel\Merging\SynchronousChannelMergeEnumerator.cs (5)
36
Debug.
Assert
(channels != null);
38
foreach (SynchronousChannel<T> c in channels) Debug.
Assert
(c != null);
78
Debug.
Assert
(_channels != null);
90
Debug.
Assert
(current != null);
109
Debug.
Assert
(_channelIndex == _channels.Length);
System\Linq\Parallel\Partitioning\HashRepartitionEnumerator.cs (12)
69
Debug.
Assert
(source != null);
70
Debug.
Assert
(keySelector != null || typeof(THashKey) == typeof(NoKeyMemoizationRequired));
71
Debug.
Assert
(repartitionStream != null);
72
Debug.
Assert
(barrier != null);
73
Debug.
Assert
(valueExchangeMatrix != null);
76
Debug.
Assert
(0 <= partitionIndex && partitionIndex < partitionCount);
88
Debug.
Assert
(partitionCount == 1);
126
Debug.
Assert
(!ParallelEnumerable.SinglePartitionMode);
135
Debug.
Assert
(mutables._currentBufferIndex != ENUMERATION_NOT_STARTED);
158
Debug.
Assert
(mutables._currentBuffer == null || mutables._currentBuffer.Count > 0);
202
Debug.
Assert
(mutables != null);
225
Debug.
Assert
(typeof(THashKey) == typeof(NoKeyMemoizationRequired));
System\Linq\Parallel\Partitioning\HashRepartitionStream.cs (2)
54
Debug.
Assert
(_keyComparer == null || _elementComparer == null);
55
Debug.
Assert
(_elementComparer == null || typeof(THashKey) == typeof(NoKeyMemoizationRequired));
System\Linq\Parallel\Partitioning\OrderedHashRepartitionEnumerator.cs (15)
71
Debug.
Assert
(source != null);
72
Debug.
Assert
(keySelector != null || typeof(THashKey) == typeof(NoKeyMemoizationRequired));
73
Debug.
Assert
(repartitionStream != null);
74
Debug.
Assert
(barrier != null);
75
Debug.
Assert
(valueExchangeMatrix != null);
78
Debug.
Assert
(0 <= partitionIndex && partitionIndex < partitionCount);
124
Debug.
Assert
(!ParallelEnumerable.SinglePartitionMode);
133
Debug.
Assert
(mutables._currentBufferIndex != ENUMERATION_NOT_STARTED);
145
Debug.
Assert
(mutables._currentKeyBuffer != null);
161
Debug.
Assert
(mutables._currentBuffer == null || mutables._currentBuffer.Count > 0);
162
Debug.
Assert
((mutables._currentBuffer == null) == (mutables._currentKeyBuffer == null));
163
Debug.
Assert
(mutables._currentBuffer == null || mutables._currentBuffer.Count == mutables._currentKeyBuffer!.Count);
208
Debug.
Assert
(mutables != null);
232
Debug.
Assert
(typeof(THashKey) == typeof(NoKeyMemoizationRequired));
249
Debug.
Assert
(keyBuffer == null);
System\Linq\Parallel\Partitioning\PartitionedDataSource.cs (21)
74
Debug.
Assert
(source != null);
75
Debug.
Assert
(partitionCount > 0);
81
Debug.
Assert
(source != null);
138
Debug.
Assert
(partitions.Length == partitionCount);
161
Debug.
Assert
(source != null);
162
Debug.
Assert
(partitionCount > 0);
251
Debug.
Assert
(sectionSize > 0);
277
Debug.
Assert
(mutables != null);
278
Debug.
Assert
(mutables._currentPositionInChunk >= mutables._currentChunkSize);
422
Debug.
Assert
(sectionSize > 0);
448
Debug.
Assert
(mutables != null);
449
Debug.
Assert
(mutables._currentPositionInChunk >= mutables._currentChunkSize);
595
Debug.
Assert
(source != null);
596
Debug.
Assert
(sourceSyncLock != null);
597
Debug.
Assert
(currentIndex != null);
614
Debug.
Assert
(mutables._chunkBuffer != null);
624
Debug.
Assert
(_source != null);
625
Debug.
Assert
(chunkBuffer != null);
626
Debug.
Assert
(mutables._currentChunkSize > 0);
627
Debug.
Assert
(0 <= currentChunkIndex && currentChunkIndex < chunkBuffer.Length);
641
Debug.
Assert
(0 <= mutables._nextChunkMaxSize && mutables._nextChunkMaxSize <= chunkBuffer.Length);
System\Linq\Parallel\Partitioning\PartitionedStream.cs (5)
40
Debug.
Assert
(partitionCount > 0);
57
Debug.
Assert
(_partitions != null);
63
Debug.
Assert
(_partitions != null);
64
Debug.
Assert
(value != null);
78
Debug.
Assert
(_partitions != null);
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (7)
105
Debug.
Assert
(_finalReduce != null);
106
Debug.
Assert
(_resultSelector != null);
242
Debug.
Assert
(source != null);
243
Debug.
Assert
(reduceOperator != null);
261
Debug.
Assert
(_reduceOperator != null);
286
Debug.
Assert
(typeof(TInput) == typeof(TIntermediate));
319
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Binary\ConcatQueryOperator.cs (8)
90
Debug.
Assert
(!ExchangeUtilities.IsWorseThan(leftStream.OrdinalIndexState, OrdinalIndexState.Increasing));
109
Debug.
Assert
(!ExchangeUtilities.IsWorseThan(rightStream.OrdinalIndexState, OrdinalIndexState.Increasing));
172
Debug.
Assert
(firstSource != null);
173
Debug.
Assert
(secondSource != null);
189
Debug.
Assert
(_firstSource != null);
190
Debug.
Assert
(_secondSource != null);
257
Debug.
Assert
(leftChildQueryResults.IsIndexible && rightChildQueryResults.IsIndexible);
272
Debug.
Assert
(_leftChildCount >= 0 && _rightChildCount >= 0);
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (12)
56
Debug.
Assert
(leftStream.PartitionCount == rightStream.PartitionCount);
156
Debug.
Assert
(leftSource != null);
157
Debug.
Assert
(rightSource != null);
171
Debug.
Assert
(_leftSource != null);
172
Debug.
Assert
(_rightSource != null);
199
Debug.
Assert
(_outputLoopCount != null);
221
Debug.
Assert
(_leftSource != null && _rightSource != null);
248
Debug.
Assert
(leftSource != null);
249
Debug.
Assert
(rightSource != null);
264
Debug.
Assert
(_leftSource != null);
265
Debug.
Assert
(_rightSource != null);
326
Debug.
Assert
(_leftSource != null && _rightSource != null);
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (6)
75
Debug.
Assert
(rightStream.PartitionCount == leftStream.PartitionCount);
224
Debug.
Assert
(dataSource != null);
250
Debug.
Assert
(baseLookup != null);
314
Debug.
Assert
(dataSource != null);
354
Debug.
Assert
(baseLookup != null);
434
Debug.
Assert
(baseLookup != null);
System\Linq\Parallel\QueryOperators\Binary\HashJoinQueryOperatorEnumerator.cs (11)
69
Debug.
Assert
(leftSource != null);
70
Debug.
Assert
(rightLookupBuilder != null);
71
Debug.
Assert
(resultSelector != null);
72
Debug.
Assert
(outputKeyBuilder != null);
96
Debug.
Assert
(_leftSource != null);
97
Debug.
Assert
(_rightLookupBuilder != null);
133
Debug.
Assert
(mutables._rightHashLookup != null);
164
Debug.
Assert
(mutables._currentRightMatches != null);
165
Debug.
Assert
(0 <= mutables._currentRightMatchesIndex && mutables._currentRightMatchesIndex < mutables._currentRightMatches.Count);
179
Debug.
Assert
(_leftSource != null && _rightLookupBuilder != null);
241
Debug.
Assert
(dataSource != null);
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (12)
58
Debug.
Assert
(leftPartitionedStream.PartitionCount == rightPartitionedStream.PartitionCount);
144
Debug.
Assert
(leftSource != null);
145
Debug.
Assert
(rightSource != null);
159
Debug.
Assert
(_leftSource != null);
160
Debug.
Assert
(_rightSource != null);
188
Debug.
Assert
(_outputLoopCount != null);
210
Debug.
Assert
(_leftSource != null && _rightSource != null);
247
Debug.
Assert
(leftSource != null);
248
Debug.
Assert
(rightSource != null);
263
Debug.
Assert
(_leftSource != null);
264
Debug.
Assert
(_rightSource != null);
325
Debug.
Assert
(_leftSource != null && _rightSource != null);
System\Linq\Parallel\QueryOperators\Binary\JoinQueryOperator.cs (5)
78
Debug.
Assert
(rightStream.PartitionCount == leftStream.PartitionCount);
201
Debug.
Assert
(dataSource != null);
220
Debug.
Assert
(_dataSource != null);
234
Debug.
Assert
(baseLookup != null);
271
Debug.
Assert
(baseLookup != null);
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (10)
60
Debug.
Assert
(leftStream.PartitionCount == rightStream.PartitionCount);
202
Debug.
Assert
(leftSource != null);
203
Debug.
Assert
(rightSource != null);
223
Debug.
Assert
(_hashLookup != null);
263
Debug.
Assert
(_outputLoopCount != null);
315
Debug.
Assert
(leftSource != null);
316
Debug.
Assert
(rightSource != null);
335
Debug.
Assert
(_leftSource != null);
336
Debug.
Assert
(_rightSource != null);
397
Debug.
Assert
(_leftSource != null && _rightSource != null);
System\Linq\Parallel\QueryOperators\Binary\ZipQueryOperator.cs (6)
88
Debug.
Assert
(settings.DegreeOfParallelism != null);
90
Debug.
Assert
(settings.TaskScheduler != null);
97
Debug.
Assert
(merger.MergeExecutor != null);
108
Debug.
Assert
(merger.MergeExecutor != null);
181
Debug.
Assert
(_leftChildResults.IsIndexible);
182
Debug.
Assert
(_rightChildResults.IsIndexible);
System\Linq\Parallel\QueryOperators\BinaryQueryOperator.cs (5)
42
Debug.
Assert
(leftChild != null && rightChild != null);
105
Debug.
Assert
(IsIndexible == (_op.OrdinalIndexState == OrdinalIndexState.Indexable));
106
Debug.
Assert
(_settings.ExecutionMode != null);
110
Debug.
Assert
(_settings.DegreeOfParallelism != null);
119
Debug.
Assert
(_settings.DegreeOfParallelism != null);
System\Linq\Parallel\QueryOperators\Inlined\CountAggregationOperator.cs (2)
89
Debug.
Assert
(source != null);
133
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DecimalAverageAggregationOperator.cs (2)
96
Debug.
Assert
(source != null);
145
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DecimalMinMaxAggregationOperator.cs (2)
114
Debug.
Assert
(source != null);
175
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DecimalSumAggregationOperator.cs (2)
83
Debug.
Assert
(source != null);
126
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DoubleAverageAggregationOperator.cs (2)
97
Debug.
Assert
(source != null);
146
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DoubleMinMaxAggregationOperator.cs (2)
121
Debug.
Assert
(source != null);
183
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\DoubleSumAggregationOperator.cs (2)
83
Debug.
Assert
(source != null);
125
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\FloatAverageAggregationOperator.cs (2)
97
Debug.
Assert
(source != null);
146
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\FloatMinMaxAggregationOperator.cs (2)
119
Debug.
Assert
(source != null);
180
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\FloatSumAggregationOperator.cs (2)
84
Debug.
Assert
(source != null);
127
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\IntAverageAggregationOperator.cs (2)
96
Debug.
Assert
(source != null);
145
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\IntMinMaxAggregationOperator.cs (2)
114
Debug.
Assert
(source != null);
176
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\IntSumAggregationOperator.cs (2)
87
Debug.
Assert
(source != null);
133
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\LongAverageAggregationOperator.cs (2)
96
Debug.
Assert
(source != null);
145
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\LongCountAggregationOperator.cs (2)
87
Debug.
Assert
(source != null);
132
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\LongMinMaxAggregationOperator.cs (2)
115
Debug.
Assert
(source != null);
177
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\LongSumAggregationOperator.cs (2)
86
Debug.
Assert
(source != null);
132
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalAverageAggregationOperator.cs (2)
95
Debug.
Assert
(source != null);
139
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalMinMaxAggregationOperator.cs (2)
113
Debug.
Assert
(source != null);
175
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalSumAggregationOperator.cs (2)
83
Debug.
Assert
(source != null);
126
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleAverageAggregationOperator.cs (2)
95
Debug.
Assert
(source != null);
139
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleMinMaxAggregationOperator.cs (2)
121
Debug.
Assert
(source != null);
185
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleSumAggregationOperator.cs (2)
83
Debug.
Assert
(source != null);
127
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatAverageAggregationOperator.cs (2)
95
Debug.
Assert
(source != null);
140
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatMinMaxAggregationOperator.cs (2)
121
Debug.
Assert
(source != null);
185
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatSumAggregationOperator.cs (2)
83
Debug.
Assert
(source != null);
126
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableIntAverageAggregationOperator.cs (2)
95
Debug.
Assert
(source != null);
140
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableIntMinMaxAggregationOperator.cs (2)
113
Debug.
Assert
(source != null);
174
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableIntSumAggregationOperator.cs (2)
86
Debug.
Assert
(source != null);
131
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableLongAverageAggregationOperator.cs (2)
96
Debug.
Assert
(source != null);
140
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableLongMinMaxAggregationOperator.cs (2)
114
Debug.
Assert
(source != null);
176
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Inlined\NullableLongSumAggregationOperator.cs (2)
87
Debug.
Assert
(source != null);
133
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\PartitionerQueryOperator.cs (3)
130
Debug.
Assert
(_settings.DegreeOfParallelism.HasValue);
233
Debug.
Assert
(_sourceEnumerator != null);
263
Debug.
Assert
(_sourceEnumerator != null);
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (1)
50
Debug.
Assert
(queryOperator != null);
System\Linq\Parallel\QueryOperators\QueryOperator.cs (14)
127
Debug.
Assert
(querySettings.ExecutionMode != null);
138
Debug.
Assert
(mergeOptions != null);
152
Debug.
Assert
(querySettings.TaskScheduler != null);
166
Debug.
Assert
(merger.MergeExecutor != null);
178
Debug.
Assert
(querySettings.TaskScheduler != null);
179
Debug.
Assert
(querySettings.DegreeOfParallelism.HasValue);
180
Debug.
Assert
(querySettings.ExecutionMode.HasValue);
200
Debug.
Assert
(querySettings.ExecutionMode != null);
233
Debug.
Assert
(querySettings.TaskScheduler != null);
238
Debug.
Assert
(merger.MergeExecutor != null);
241
Debug.
Assert
(output != null);
287
Debug.
Assert
(taskScheduler != null);
310
Debug.
Assert
(source != null);
335
Debug.
Assert
(sourceAsOperator != null);
System\Linq\Parallel\QueryOperators\QueryOperatorEnumerator.cs (1)
60
Debug.
Assert
(operatorEnumerator != null);
System\Linq\Parallel\QueryOperators\QuerySettings.cs (12)
40
Debug.
Assert
(_cancellationState != null);
93
Debug.
Assert
(_cancellationState != null);
159
Debug.
Assert
(settings.CancellationState.InternalCancellationTokenSource != null);
160
Debug.
Assert
(settings.CancellationState.MergedCancellationToken.CanBeCanceled);
161
Debug.
Assert
(settings.CancellationState.TopLevelDisposedFlag != null);
185
Debug.
Assert
(settings.TaskScheduler != null);
186
Debug.
Assert
(settings.DegreeOfParallelism.HasValue);
187
Debug.
Assert
(settings.DegreeOfParallelism.Value >= 1 && settings.DegreeOfParallelism <= Scheduling.MAX_SUPPORTED_DOP);
188
Debug.
Assert
(settings.ExecutionMode != null);
189
Debug.
Assert
(settings.MergeOptions != null);
191
Debug.
Assert
(settings.MergeOptions != ParallelMergeOptions.Default);
207
Debug.
Assert
(_cancellationState.MergedCancellationTokenSource != null);
System\Linq\Parallel\QueryOperators\ScanQueryOperator.cs (3)
33
Debug.
Assert
(data != null);
59
Debug.
Assert
(settings.DegreeOfParallelism.HasValue);
131
Debug.
Assert
(_settings.DegreeOfParallelism != null);
System\Linq\Parallel\QueryOperators\Unary\AnyAllSearchOperator.cs (5)
166
Debug.
Assert
(source != null);
167
Debug.
Assert
(predicate != null);
168
Debug.
Assert
(resultFoundFlag != null);
186
Debug.
Assert
(_predicate != null);
234
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\ContainsSearchOperator.cs (5)
144
Debug.
Assert
(source != null);
145
Debug.
Assert
(comparer != null);
146
Debug.
Assert
(resultFoundFlag != null);
164
Debug.
Assert
(_comparer != null);
211
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\DefaultIfEmptyQueryOperator.cs (7)
62
Debug.
Assert
(partitionCount == 1);
125
Debug.
Assert
(source != null);
126
Debug.
Assert
(0 <= partitionIndex && partitionIndex < partitionCount);
127
Debug.
Assert
(partitionCount > 0);
128
Debug.
Assert
(sharedEmptyCount != null);
129
Debug.
Assert
(sharedLatch != null);
146
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (8)
134
Debug.
Assert
(source != null);
146
Debug.
Assert
(_source != null);
147
Debug.
Assert
(_hashLookup != null);
176
Debug.
Assert
(_source != null);
210
Debug.
Assert
(source != null);
226
Debug.
Assert
(_source != null);
227
Debug.
Assert
(_hashLookup != null);
272
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (5)
75
Debug.
Assert
(intKeyStream.OrdinalIndexState == OrdinalIndexState.Indexable);
182
Debug.
Assert
(source != null);
183
Debug.
Assert
(index >= 0);
184
Debug.
Assert
(resultFoundFlag != null);
225
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\FirstQueryOperator.cs (6)
76
Debug.
Assert
(partitionCount == 1);
143
Debug.
Assert
(source != null);
144
Debug.
Assert
(operatorState != null);
145
Debug.
Assert
(sharedBarrier != null);
146
Debug.
Assert
(keyComparer != null);
163
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (5)
47
Debug.
Assert
(_elementAction != null);
65
Debug.
Assert
(enumerator == null);
136
Debug.
Assert
(source != null);
137
Debug.
Assert
(elementAction != null);
173
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (22)
114
Debug.
Assert
(typeof(TSource) == typeof(TElement));
153
Debug.
Assert
(typeof(TSource) == typeof(TElement));
192
Debug.
Assert
(typeof(TElement) == typeof(TSource));
243
Debug.
Assert
(source != null);
258
Debug.
Assert
(_source != null);
271
Debug.
Assert
(mutables._hashLookup != null);
345
Debug.
Assert
(currentValue != null);
374
Debug.
Assert
(elementSelector != null);
407
Debug.
Assert
(currentValue != null);
446
Debug.
Assert
(source != null);
447
Debug.
Assert
(keySelector != null);
464
Debug.
Assert
(_source != null);
465
Debug.
Assert
(_keySelector != null);
478
Debug.
Assert
(mutables._hashLookup != null);
582
Debug.
Assert
(currentValue != null);
616
Debug.
Assert
(elementSelector != null);
657
Debug.
Assert
(currentValue != null);
689
Debug.
Assert
(keyValues.Value != null);
711
Debug.
Assert
(_keyValues.Value != null);
759
Debug.
Assert
(_sortedValues != null);
774
Debug.
Assert
(_values != null);
784
Debug.
Assert
(_values != null);
System\Linq\Parallel\QueryOperators\Unary\IndexedSelectQueryOperator.cs (6)
71
Debug.
Assert
(!ExchangeUtilities.IsWorseThan(indexState, OrdinalIndexState.Correct));
103
Debug.
Assert
(typeof(TKey) == typeof(int));
145
Debug.
Assert
(source != null);
146
Debug.
Assert
(selector != null);
217
Debug.
Assert
(_childQueryResults.IsIndexible);
226
Debug.
Assert
(_childCount >= 0);
System\Linq\Parallel\QueryOperators\Unary\IndexedWhereQueryOperator.cs (4)
97
Debug.
Assert
(typeof(TKey) == typeof(int));
152
Debug.
Assert
(source != null);
153
Debug.
Assert
(predicate != null);
188
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\LastQueryOperator.cs (6)
76
Debug.
Assert
(partitionCount == 1);
139
Debug.
Assert
(source != null);
140
Debug.
Assert
(operatorState != null);
141
Debug.
Assert
(sharedBarrier != null);
142
Debug.
Assert
(keyComparer != null);
159
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\ReverseQueryOperator.cs (7)
118
Debug.
Assert
(source != null);
147
Debug.
Assert
(_bufferIndex != null);
196
Debug.
Assert
(_childQueryResults.IsIndexible);
209
Debug.
Assert
(_count >= 0);
216
Debug.
Assert
(_count >= 0);
217
Debug.
Assert
(index >= 0);
218
Debug.
Assert
(index < _count);
System\Linq\Parallel\QueryOperators\Unary\SelectManyQueryOperator.cs (15)
208
Debug.
Assert
(_indexedRightChildSelector != null);
261
Debug.
Assert
(leftSource != null);
262
Debug.
Assert
(selectManyOperator != null);
294
Debug.
Assert
(_selectManyOperator._indexedRightChildSelector != null);
299
Debug.
Assert
(rightChild != null);
302
Debug.
Assert
(_currentRightSource != null);
320
Debug.
Assert
(_mutables != null);
333
Debug.
Assert
(_currentRightSourceAsOutput != null);
390
Debug.
Assert
(leftSource != null);
391
Debug.
Assert
(selectManyOperator != null);
424
Debug.
Assert
(_selectManyOperator._rightChildSelector != null);
428
Debug.
Assert
(rightChild != null);
431
Debug.
Assert
(_currentRightSource != null);
449
Debug.
Assert
(_mutables != null);
462
Debug.
Assert
(_currentRightSourceAsOutput != null);
System\Linq\Parallel\QueryOperators\Unary\SelectQueryOperator.cs (6)
104
Debug.
Assert
(source != null);
105
Debug.
Assert
(selector != null);
163
Debug.
Assert
(op._selector != null);
165
Debug.
Assert
(_childQueryResults.IsIndexible);
181
Debug.
Assert
(index >= 0);
182
Debug.
Assert
(index < ElementsCount);
System\Linq\Parallel\QueryOperators\Unary\SingleQueryOperator.cs (3)
113
Debug.
Assert
(source != null);
114
Debug.
Assert
(totalElementCount != null);
127
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\SortQueryOperator.cs (3)
180
Debug.
Assert
(source != null);
195
Debug.
Assert
(_source != null);
209
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (13)
112
Debug.
Assert
(partitionCount == 1);
175
Debug.
Assert
(source != null);
176
Debug.
Assert
(sharedIndices != null);
177
Debug.
Assert
(sharedBarrier != null);
178
Debug.
Assert
(keyComparer != null);
195
Debug.
Assert
(_sharedIndices != null);
243
Debug.
Assert
(_buffer != null && _bufferIndex != null);
275
Debug.
Assert
(_buffer != null && _bufferIndex != null);
360
Debug.
Assert
(_childQueryResults.IsIndexible);
374
Debug.
Assert
(_childCount >= 0);
388
Debug.
Assert
(_childCount >= 0);
389
Debug.
Assert
(index >= 0);
390
Debug.
Assert
(index < ElementsCount);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (11)
131
Debug.
Assert
(partitionCount == 1);
137
Debug.
Assert
(_indexedPredicate == null || typeof(TKey) == typeof(int));
176
Debug.
Assert
(_predicate != null);
186
Debug.
Assert
(_predicate != null);
232
Debug.
Assert
(source != null);
233
Debug.
Assert
(predicate != null || indexedPredicate != null);
234
Debug.
Assert
(operatorState != null);
235
Debug.
Assert
(sharedBarrier != null);
236
Debug.
Assert
(keyComparer != null);
303
Debug.
Assert
(_indexedPredicate != null);
342
Debug.
Assert
(_bufferIndex != null);
System\Linq\Parallel\QueryOperators\Unary\WhereQueryOperator.cs (3)
116
Debug.
Assert
(source != null);
117
Debug.
Assert
(predicate != null);
152
Debug.
Assert
(_source != null);
System\Linq\Parallel\QueryOperators\UnaryQueryOperator.cs (2)
110
Debug.
Assert
(IsIndexible == (_op.OrdinalIndexState == OrdinalIndexState.Indexable));
112
Debug.
Assert
(_settings.ExecutionMode != null && _settings.DegreeOfParallelism != null);
System\Linq\Parallel\Scheduling\OrderPreservingPipeliningSpoolingTask.cs (12)
67
Debug.
Assert
(partition != null);
68
Debug.
Assert
(taskGroupState != null);
69
Debug.
Assert
(consumerWaiting != null);
70
Debug.
Assert
(producerWaiting != null && producerWaiting.Length == consumerWaiting.Length);
71
Debug.
Assert
(producerDone != null && producerDone.Length == consumerWaiting.Length);
72
Debug.
Assert
(buffers != null && buffers.Length == consumerWaiting.Length);
73
Debug.
Assert
(partitionIndex >= 0 && partitionIndex < consumerWaiting.Length);
153
Debug.
Assert
(groupState != null);
154
Debug.
Assert
(partitions != null);
155
Debug.
Assert
(producerDone != null && producerDone.Length == partitions.PartitionCount);
156
Debug.
Assert
(buffers != null && buffers.Length == partitions.PartitionCount);
157
Debug.
Assert
(bufferLocks != null);
System\Linq\Parallel\Scheduling\OrderPreservingSpoolingTask.cs (9)
48
Debug.
Assert
(groupState != null);
49
Debug.
Assert
(results != null);
50
Debug.
Assert
(sortHelper != null);
74
Debug.
Assert
(groupState != null);
75
Debug.
Assert
(partitions != null);
76
Debug.
Assert
(results != null);
77
Debug.
Assert
(results.Value == null);
131
Debug.
Assert
(_sortHelper != null);
143
Debug.
Assert
(sortedOutput != null);
System\Linq\Parallel\Scheduling\QueryTask.cs (4)
35
Debug.
Assert
(groupState != null);
46
Debug.
Assert
(o != null);
75
Debug.
Assert
(o != null);
94
Debug.
Assert
(unused == null);
System\Linq\Parallel\Scheduling\QueryTaskGroupState.cs (2)
86
Debug.
Assert
(_rootTask != null);
158
Debug.
Assert
(_cancellationState.TopLevelDisposedFlag.Value);
System\Linq\Parallel\Scheduling\SpoolingTask.cs (8)
36
Debug.
Assert
(partitions.PartitionCount == channels.Length);
37
Debug.
Assert
(groupState != null);
92
Debug.
Assert
(partitions.PartitionCount == channels.Length);
93
Debug.
Assert
(groupState != null);
136
Debug.
Assert
(groupState != null);
207
Debug.
Assert
(source != null);
296
Debug.
Assert
(source != null);
380
Debug.
Assert
(source != null);
System\Linq\Parallel\Scheduling\SpoolingTaskBase.cs (1)
62
Debug.
Assert
(_groupState.CancellationState.InternalCancellationTokenSource != null);
System\Linq\Parallel\Utils\ExchangeUtilities.cs (1)
71
Debug.
Assert
(returnValue.PartitionCount == partitionCount);
System\Linq\Parallel\Utils\FixedMaxHeap.cs (3)
36
Debug.
Assert
(comparer != null);
133
Debug.
Assert
(_count > 0);
144
Debug.
Assert
(_count > 0);
System\Linq\Parallel\Utils\GrowingArray.cs (1)
56
Debug.
Assert
(newSize > _array.Length);
System\Linq\Parallel\Utils\ListChunk.cs (2)
31
Debug.
Assert
(size > 0);
81
Debug.
Assert
(curr._chunkCount == curr._chunk.Length || curr._nextChunk == null);
System\Linq\Parallel\Utils\Lookup.cs (1)
121
Debug.
Assert
(!_dict.ContainsKey(grouping.Key));
System\Linq\Parallel\Utils\Sorting.cs (28)
62
Debug.
Assert
(source != null);
63
Debug.
Assert
(groupState != null);
64
Debug.
Assert
(sharedIndices != null);
65
Debug.
Assert
(sharedkeys != null);
66
Debug.
Assert
(sharedValues != null);
67
Debug.
Assert
(sharedBarriers != null);
68
Debug.
Assert
(sharedIndices.Length <= sharedkeys.Length);
69
Debug.
Assert
(sharedIndices.Length == sharedValues.Length);
86
Debug.
Assert
(_sharedKeys.Length >= _sharedValues.Length);
203
Debug.
Assert
(!ParallelEnumerable.SinglePartitionMode);
267
Debug.
Assert
(keys != null);
268
Debug.
Assert
(values != null);
269
Debug.
Assert
(keys.Count == values.Count);
425
Debug.
Assert
(myKeysArr != null);
435
Debug.
Assert
(myIndices != null);
451
Debug.
Assert
(mergedIndices != null);
458
Debug.
Assert
(rightIndices != null);
465
Debug.
Assert
(mergedIndices != null);
499
Debug.
Assert
(leftValues != null);
500
Debug.
Assert
(leftKeys != null);
512
Debug.
Assert
(myIndices != null);
522
Debug.
Assert
(leftIndices != null);
529
Debug.
Assert
(mergedIndices != null);
542
Debug.
Assert
(mergedIndices != null);
585
Debug.
Assert
(keys.Length >= indices.Length);
586
Debug.
Assert
(left <= right);
587
Debug.
Assert
(0 <= left && left < keys.Length);
588
Debug.
Assert
(0 <= right && right < keys.Length);
System\Linq\Parallel\Utils\WrapperEqualityComparer.cs (2)
29
Debug.
Assert
(_comparer != null);
35
Debug.
Assert
(_comparer != null);
System\Linq\ParallelEnumerable.cs (8)
1524
Debug.
Assert
(source != null);
1525
Debug.
Assert
(reduce != null);
1547
Debug.
Assert
(source != null);
1548
Debug.
Assert
(func != null);
1549
Debug.
Assert
(seedIsSpecified || typeof(TSource) == typeof(TAccumulate));
4888
Debug.
Assert
(input != null);
5150
Debug.
Assert
(groupings is QueryOperator<IGrouping<TKey, TSource>>);
5237
Debug.
Assert
(groupings is QueryOperator<IGrouping<TKey, TElement>>);
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (2)
247
Debug.
Assert
(matchingMethods.Length > 1);
278
Debug.
Assert
(left.Length == right.Length);
System.Memory (53)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (5)
95
Debug.
Assert
(_buffer.Length >= _index);
164
Debug.
Assert
(_buffer.Length > _index);
195
Debug.
Assert
(_buffer.Length > _index);
227
Debug.
Assert
(needed > currentLength);
240
Debug.
Assert
(FreeCapacity > 0 && FreeCapacity >= sizeHint);
System\Buffers\ReadOnlySequence.cs (9)
81
Debug.
Assert
((startSegment != null && endSegment != null) ||
205
Debug.
Assert
(startObject != null);
230
Debug.
Assert
(beginObject != null);
305
Debug.
Assert
(sliceEndIndex >= 0 && startIndex >= 0 && endIndex >= 0);
334
Debug.
Assert
(start <= int.MaxValue - startIndex);
387
Debug.
Assert
(sliceStartIndex >= 0 && startIndex >= 0 && endIndex >= 0);
417
Debug.
Assert
(length <= int.MaxValue - sliceStartIndex);
560
Debug.
Assert
(positionSequenceObject != null);
578
Debug.
Assert
(currentSegment!.RunningIndex + positionIndex >= 0);
System\Buffers\ReadOnlySequence.Helpers.cs (27)
32
Debug.
Assert
(positionObject is ReadOnlySequenceSegment<T>);
58
Debug.
Assert
(positionObject is T[]);
64
Debug.
Assert
(positionObject is string);
70
Debug.
Assert
(type == SequenceType.MemoryManager);
71
Debug.
Assert
(positionObject is MemoryManager<T>);
130
Debug.
Assert
(startIndex < 0 || endIndex < 0);
135
Debug.
Assert
(endIndex < 0);
206
Debug.
Assert
(startIndex < 0 || endIndex < 0);
211
Debug.
Assert
(endIndex < 0);
244
Debug.
Assert
(startObject != null);
260
Debug.
Assert
(startObject == endObject);
280
Debug.
Assert
(startObject != null);
296
Debug.
Assert
(startObject == endObject);
309
Debug.
Assert
(currentSegment != null); // currentSegment parameter is marked as nullable as the parameter is reused/reassigned in the body
310
Debug.
Assert
(offset >= 0);
359
Debug.
Assert
(position.GetObject() != null);
397
Debug.
Assert
(sliceStartIndex >= 0 && startIndex >= 0 && endIndex >= 0);
530
Debug.
Assert
(_endObject != null);
547
Debug.
Assert
(_startObject != null);
564
Debug.
Assert
(_startObject != null);
575
Debug.
Assert
(start <= int.MaxValue);
576
Debug.
Assert
(end <= int.MaxValue);
577
Debug.
Assert
(start <= end);
601
Debug.
Assert
(start <= long.MaxValue);
602
Debug.
Assert
(end <= long.MaxValue);
603
Debug.
Assert
(start <= end);
678
Debug.
Assert
(startIndex < 0);
System\Buffers\SequenceReader.cs (7)
148
Debug.
Assert
(CurrentSpanIndex + offset >= 0);
153
Debug.
Assert
(offset <= int.MaxValue);
335
Debug.
Assert
(count >= 0);
350
Debug.
Assert
(count >= 0);
355
Debug.
Assert
(CurrentSpanIndex < CurrentSpan.Length);
381
Debug.
Assert
(count >= 0);
434
Debug.
Assert
(firstSpan.Length < destination.Length);
System\Buffers\SequenceReader.Search.cs (4)
78
Debug.
Assert
(sequence.Length > 0);
195
Debug.
Assert
(skip >= 0);
439
Debug.
Assert
(sequence.Length > 0);
809
Debug.
Assert
(currentSpan.Length < next.Length);
System\Buffers\SequenceReaderExtensions.Binary.cs (1)
39
Debug.
Assert
(reader.UnreadSpan.Length < sizeof(T));
System.Net.Http (710)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\IO\DelegatingStream.cs (1)
65
Debug.
Assert
(innerStream != null);
src\libraries\Common\src\System\Net\ArrayBuffer.cs (9)
34
Debug.
Assert
(initialSize > 0 || usePool);
46
Debug.
Assert
(buffer.Length > 0);
71
Debug.
Assert
(_usePool);
72
Debug.
Assert
(_bytes is not null);
111
Debug.
Assert
(byteCount <= AvailableLength);
127
Debug.
Assert
(AvailableLength < byteCount);
131
Debug.
Assert
(_usePool && _activeStart == 0 && _availableStart == 0);
143
Debug.
Assert
(byteCount <= AvailableLength);
171
Debug.
Assert
(byteCount <= AvailableLength);
src\libraries\Common\src\System\Net\CredentialCacheKey.cs (4)
20
Debug.
Assert
(uriPrefix != null);
21
Debug.
Assert
(authenticationType != null);
60
Debug.
Assert
(uri != null);
61
Debug.
Assert
(prefixUri != null);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HeaderField.cs (1)
20
Debug.
Assert
(name.Length > 0);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackEncoder.cs (17)
95
Debug.
Assert
(indexLength >= 1);
127
Debug.
Assert
(indexLength >= 1);
159
Debug.
Assert
(indexLength >= 1);
197
Debug.
Assert
(indexLength >= 1);
369
Debug.
Assert
(Ascii.IsValid(value));
376
Debug.
Assert
(integerLength >= 1);
382
Debug.
Assert
(status == OperationStatus.Done);
383
Debug.
Assert
(valueBytesWritten == value.Length);
397
Debug.
Assert
(destination.Length >= value.Length);
406
Debug.
Assert
(status == OperationStatus.Done);
407
Debug.
Assert
(bytesWritten == value.Length);
426
Debug.
Assert
(integerLength >= 1);
470
Debug.
Assert
(integerLength >= 1);
481
Debug.
Assert
(written == encodedStringLength);
528
Debug.
Assert
(separator != null);
529
Debug.
Assert
(Ascii.IsValid(separator));
551
Debug.
Assert
(integerLength >= 1);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\Huffman.cs (2)
680
Debug.
Assert
(dst.Length > 0);
745
Debug.
Assert
(bitsInAcc < 8);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\IntegerDecoder.cs (1)
39
Debug.
Assert
(prefixLength >= 1 && prefixLength <= 8);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\IntegerEncoder.cs (2)
25
Debug.
Assert
(value >= 0);
26
Debug.
Assert
(numBits >= 1 && numBits <= 8);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\Helpers\VariableLengthIntegerHelper.cs (8)
69
Debug.
Assert
((firstByte & LengthMask) == InitialEightByteLengthMask);
118
Debug.
Assert
(result);
119
Debug.
Assert
(bytesRead == length);
149
Debug.
Assert
(longToEncode >= 0);
150
Debug.
Assert
(longToEncode <= EightByteLimit);
193
Debug.
Assert
(res);
199
Debug.
Assert
(value >= 0);
200
Debug.
Assert
(value <= EightByteLimit);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\HeaderField.cs (1)
17
Debug.
Assert
(name.Length > 0);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackEncoder.cs (14)
42
Debug.
Assert
(res);
97
Debug.
Assert
(res);
106
Debug.
Assert
(res);
167
Debug.
Assert
(res);
177
Debug.
Assert
(res);
204
Debug.
Assert
(written == encodedStringLength);
235
Debug.
Assert
(separator != null);
236
Debug.
Assert
(Ascii.IsValid(separator));
303
Debug.
Assert
(buffer.Length >= s.Length);
312
Debug.
Assert
(status == OperationStatus.Done);
313
Debug.
Assert
(bytesWritten == s.Length);
318
Debug.
Assert
(Ascii.IsValid(s));
331
Debug.
Assert
(status == OperationStatus.Done);
332
Debug.
Assert
(valueBytesWritten == s.Length);
src\libraries\Common\src\System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs (18)
35
Debug.
Assert
(length >= 0);
55
Debug.
Assert
(name != null);
89
Debug.
Assert
(key != null);
90
Debug.
Assert
(startIndex >= 0);
91
Debug.
Assert
(length >= 0);
92
Debug.
Assert
(charAt != null);
93
Debug.
Assert
(equals != null);
335
Debug.
Assert
(potentialHeader != null);
345
Debug.
Assert
(known != null);
346
Debug.
Assert
(known.Length > 0);
347
Debug.
Assert
(startIndex >= 0);
348
Debug.
Assert
(length > 0);
349
Debug.
Assert
(equals != null);
353
Debug.
Assert
(known.Length == length);
367
Debug.
Assert
(left != null);
368
Debug.
Assert
(right != IntPtr.Zero);
369
Debug.
Assert
(rightLength > 0);
372
Debug.
Assert
(left.Length == rightLength);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (1)
35
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (31)
38
Debug.
Assert
(initialBufferSize >= 0);
70
Debug.
Assert
(byteCount >= 0);
112
Debug.
Assert
(toReturn is not null);
120
Debug.
Assert
(byteCount >= 0);
130
Debug.
Assert
(byteCount >= 0);
131
Debug.
Assert
(limit >= 0);
147
Debug.
Assert
(byteCount >= 0);
157
Debug.
Assert
(byteCount > AvailableMemory.Length);
169
Debug.
Assert
(_allocatedEnd == 0);
170
Debug.
Assert
(_activeStart == 0);
171
Debug.
Assert
(_availableStart == 0);
183
Debug.
Assert
(_allocatedEnd % BlockSize == 0);
184
Debug.
Assert
(_allocatedEnd <= _blocks.Length * BlockSize);
225
Debug.
Assert
(_allocatedEnd % BlockSize == 0);
227
Debug.
Assert
(allocatedBlockCount == 0 || _blocks[allocatedBlockCount - 1] is not null);
230
Debug.
Assert
(_blocks[allocatedBlockCount] is null);
237
Debug.
Assert
(byteCount <= AvailableMemory.Length);
247
Debug.
Assert
(_activeStart == 0);
248
Debug.
Assert
(_availableStart == 0);
249
Debug.
Assert
(_allocatedEnd == 0);
253
Debug.
Assert
(_activeStart <= _availableStart);
254
Debug.
Assert
(_availableStart <= _allocatedEnd);
255
Debug.
Assert
(_allocatedEnd <= _blocks.Length * BlockSize);
264
Debug.
Assert
(_blocks[i] is null);
269
Debug.
Assert
(_blocks[i] is not null);
274
Debug.
Assert
(_blocks[i] is null);
307
Debug.
Assert
(blocks is not null);
308
Debug.
Assert
(start <= int.MaxValue);
309
Debug.
Assert
(length <= int.MaxValue);
310
Debug.
Assert
(start + length <= blocks.Length * BlockSize);
350
Debug.
Assert
(_blocks is not null);
src\libraries\Common\src\System\Net\Security\SslClientAuthenticationOptionsExtensions.cs (1)
39
Debug.
Assert
(properties.Length == 13);
src\libraries\Common\src\System\Text\SimpleRegex.cs (1)
68
Debug.
Assert
(patternPos <= pattern.Length);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\Net\Http\DiagnosticsHandler.cs (2)
27
Debug.
Assert
(IsGloballyEnabled());
28
Debug.
Assert
(innerHandler is not null && propagator is not null);
System\Net\Http\Headers\AltSvcHeaderParser.cs (2)
27
Debug.
Assert
(startIndex >= 0);
28
Debug.
Assert
(startIndex < value.Length);
System\Net\Http\Headers\AuthenticationHeaderValue.cs (3)
48
Debug.
Assert
(source != null);
118
Debug.
Assert
(startIndex >= 0);
237
Debug.
Assert
(input[parseEndIndex] == ',');
System\Net\Http\Headers\ByteArrayHeaderParser.cs (1)
22
Debug.
Assert
(value is byte[]);
System\Net\Http\Headers\CacheControlHeaderValue.cs (5)
67
Debug.
Assert
(sizeof(Flags) == sizeof(int));
171
Debug.
Assert
(source != null);
351
Debug.
Assert
(startIndex >= 0);
371
Debug.
Assert
(nameValue is not null);
491
Debug.
Assert
(nameValue != null);
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (5)
135
Debug.
Assert
(source != null);
210
Debug.
Assert
(startIndex >= 0);
256
Debug.
Assert
((input != null) && (input.Length > 0) && (startIndex < input.Length));
351
Debug.
Assert
(nameParameter.Value != null);
461
Debug.
Assert
(input != null);
System\Net\Http\Headers\ContentRangeHeaderValue.cs (2)
86
Debug.
Assert
(source != null);
159
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\DateHeaderParser.cs (1)
22
Debug.
Assert
(value is DateTimeOffset);
System\Net\Http\Headers\EntityTagHeaderValue.cs (4)
55
Debug.
Assert
(source != null);
111
Debug.
Assert
(startIndex >= 0);
157
Debug.
Assert
(startIndex == 0);
158
Debug.
Assert
(!isWeak);
System\Net\Http\Headers\GenericHeaderParser.cs (1)
59
Debug.
Assert
(getParsedValueLength != null);
System\Net\Http\Headers\HeaderDescriptor.cs (7)
61
Debug.
Assert
(!string.IsNullOrEmpty(headerName));
83
Debug.
Assert
(headerName.Length > 0);
104
Debug.
Assert
(index >= 0);
108
Debug.
Assert
(qpackStaticTable.Length == 99);
127
Debug.
Assert
(_descriptor is KnownHeader);
128
Debug.
Assert
(HeaderType != HttpHeaderType.Custom);
253
Debug.
Assert
(candidate is null || candidate.Length == contentTypeValue.Length);
System\Net\Http\Headers\HeaderUtilities.cs (7)
32
Debug.
Assert
(parameters != null);
124
Debug.
Assert
(parameters != null);
210
Debug.
Assert
(xItem != null);
246
Debug.
Assert
(input != null);
247
Debug.
Assert
(startIndex <= input.Length); // it's OK if index == value.Length.
277
Debug.
Assert
(store != null);
294
Debug.
Assert
(store != null);
System\Net\Http\Headers\HttpGeneralHeaders.cs (1)
151
Debug.
Assert
(parent != null);
System\Net\Http\Headers\HttpHeaderParser.cs (4)
35
Debug.
Assert
(!string.IsNullOrEmpty(separator));
36
Debug.
Assert
(Ascii.IsValid(separator));
55
Debug.
Assert
((value == null) || ((index >= 0) && (index <= value.Length)));
73
Debug.
Assert
(value != null);
System\Net\Http\Headers\HttpHeaders.cs (46)
68
Debug.
Assert
((allowedHeaderTypes & treatAsCustomHeaderTypes) == 0);
92
Debug.
Assert
(!Contains(descriptor));
124
Debug.
Assert
(!Contains(descriptor));
154
Debug.
Assert
(currentValue is string);
179
Debug.
Assert
(storeValueRef is not null);
184
Debug.
Assert
(value is string);
251
Debug.
Assert
(singleValue is not null ^ multiValue is not null);
263
Debug.
Assert
(multiValue is not null && multiValue.Length > 0);
283
Debug.
Assert
(singleValue is not null ^ multiValue is not null);
327
Debug.
Assert
(Contains(entry.Key));
352
Debug.
Assert
(value != null);
366
Debug.
Assert
(value != null);
395
Debug.
Assert
(value != null);
473
Debug.
Assert
(value != null);
529
Debug.
Assert
(sourceHeaders != null);
569
Debug.
Assert
(sourceValue is string);
621
Debug.
Assert
(source is not InvalidValue);
667
Debug.
Assert
(!Contains(descriptor));
673
Debug.
Assert
((descriptor.HeaderType & _treatAsCustomHeaderTypes) == 0);
707
Debug.
Assert
(value is string);
725
Debug.
Assert
(!info.IsEmpty);
738
Debug.
Assert
(rawValue is not null);
743
Debug.
Assert
(info.ParsedAndInvalidValues is not null);
751
Debug.
Assert
(Monitor.IsEntered(info));
790
Debug.
Assert
(!Contains(descriptor));
800
Debug.
Assert
(info != null);
801
Debug.
Assert
(descriptor.Parser != null);
876
Debug.
Assert
(value != null);
919
Debug.
Assert
(currentStoreValue is T);
923
Debug.
Assert
(value is T);
967
Debug.
Assert
(info != null);
1091
Debug.
Assert
(singleValue is not null ^ multiValue is not null);
1100
Debug.
Assert
(sourceValues is string);
1127
Debug.
Assert
(currentIndex == length);
1138
Debug.
Assert
(sourceValues is string);
1152
Debug.
Assert
(length > 0);
1162
Debug.
Assert
(currentIndex == length);
1170
Debug.
Assert
(info != null);
1171
Debug.
Assert
(Monitor.IsEntered(info));
1196
Debug.
Assert
(item != null);
1206
Debug.
Assert
(value != null);
1223
Debug.
Assert
(value is not null);
1262
Debug.
Assert
(item is not InvalidValue);
1267
Debug.
Assert
(ParsedAndInvalidValues is not InvalidValue);
1452
Debug.
Assert
(dictionary.Count == _count - 1);
1470
Debug.
Assert
(!Contains(entry.Key));
System\Net\Http\Headers\HttpHeadersNonValidated.cs (2)
69
Debug.
Assert
(singleValue is not null ^ multiValue is not null);
146
Debug.
Assert
(singleValue is not null ^ multiValue is not null);
System\Net\Http\Headers\HttpHeaderValueCollection.cs (5)
102
Debug.
Assert
(storeValue is T);
116
Debug.
Assert
(item is T);
153
Debug.
Assert
(item is T);
159
Debug.
Assert
(storeValue is T);
190
Debug.
Assert
(typeof(T) == typeof(string));
System\Net\Http\Headers\HttpRequestHeaders.cs (1)
277
Debug.
Assert
(sourceRequestHeaders != null);
System\Net\Http\Headers\HttpResponseHeaders.cs (1)
149
Debug.
Assert
(sourceResponseHeaders != null);
System\Net\Http\Headers\Int32NumberHeaderParser.cs (1)
26
Debug.
Assert
(value is int);
System\Net\Http\Headers\Int64NumberHeaderParser.cs (1)
26
Debug.
Assert
(value is long);
System\Net\Http\Headers\KnownHeader.cs (5)
14
Debug.
Assert
(!string.IsNullOrEmpty(name));
15
Debug.
Assert
(name[0] == ':' || HttpRuleParser.IsToken(name));
20
Debug.
Assert
(!string.IsNullOrEmpty(name));
21
Debug.
Assert
(name[0] == ':' || HttpRuleParser.IsToken(name));
32
Debug.
Assert
(asciiBytes == name.Length);
System\Net\Http\Headers\MediaTypeHeaderParser.cs (1)
19
Debug.
Assert
(mediaTypeCreator != null);
System\Net\Http\Headers\MediaTypeHeaderValue.cs (4)
86
Debug.
Assert
(source != null);
179
Debug.
Assert
(mediaTypeCreator != null);
180
Debug.
Assert
(startIndex >= 0);
229
Debug.
Assert
((input != null) && (input.Length > 0) && (startIndex < input.Length));
System\Net\Http\Headers\NameValueHeaderValue.cs (10)
54
Debug.
Assert
(source != null);
62
Debug.
Assert
(_name != null);
168
Debug.
Assert
(destination != null);
209
Debug.
Assert
(input != null);
210
Debug.
Assert
(startIndex >= 0);
211
Debug.
Assert
(nameValueCreator != null);
268
Debug.
Assert
(nameValueCollection != null);
269
Debug.
Assert
(startIndex >= 0);
306
Debug.
Assert
((name != null) && (name.Length > 0));
325
Debug.
Assert
(input != null);
System\Net\Http\Headers\NameValueWithParametersHeaderValue.cs (3)
98
Debug.
Assert
(input != null);
99
Debug.
Assert
(startIndex >= 0);
120
Debug.
Assert
(nameValueWithParameters != null);
System\Net\Http\Headers\ObjectCollection.cs (5)
41
Debug.
Assert
(item != null);
53
Debug.
Assert
(_size == 1);
72
Debug.
Assert
(_size > 0);
73
Debug.
Assert
(_size == array.Length);
103
Debug.
Assert
(_size == 0 || _size == 1);
System\Net\Http\Headers\ProductHeaderValue.cs (2)
45
Debug.
Assert
(source != null);
106
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\ProductInfoHeaderValue.cs (4)
38
Debug.
Assert
(source != null);
48
Debug.
Assert
(_comment != null);
76
Debug.
Assert
(_comment != null);
117
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\RangeConditionHeaderValue.cs (2)
38
Debug.
Assert
(source != null);
75
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\RangeHeaderValue.cs (2)
43
Debug.
Assert
(source != null);
133
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\RangeItemHeaderValue.cs (4)
46
Debug.
Assert
(source != null);
82
Debug.
Assert
(rangeCollection != null);
83
Debug.
Assert
(startIndex >= 0);
129
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\RetryConditionHeaderValue.cs (2)
38
Debug.
Assert
(source != null);
79
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\StringWithQualityHeaderValue.cs (2)
42
Debug.
Assert
(source != null);
87
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\TimeSpanHeaderParser.cs (1)
20
Debug.
Assert
(value is TimeSpan);
System\Net\Http\Headers\TransferCodingHeaderParser.cs (1)
25
Debug.
Assert
(transferCodingCreator != null);
System\Net\Http\Headers\TransferCodingHeaderValue.cs (3)
28
Debug.
Assert
(source != null);
63
Debug.
Assert
(transferCodingCreator != null);
64
Debug.
Assert
(startIndex >= 0);
System\Net\Http\Headers\UriHeaderParser.cs (1)
90
Debug.
Assert
(value is Uri);
System\Net\Http\Headers\ViaHeaderValue.cs (3)
71
Debug.
Assert
(source != null);
158
Debug.
Assert
(startIndex >= 0);
176
Debug.
Assert
(protocolVersion != null);
System\Net\Http\Headers\WarningHeaderValue.cs (2)
53
Debug.
Assert
(source != null);
123
Debug.
Assert
(startIndex >= 0);
System\Net\Http\HttpClient.cs (2)
129
Debug.
Assert
(HttpContent.MaxBufferSize <= int.MaxValue);
612
Debug.
Assert
(_timeout.TotalSeconds > 0);
System\Net\Http\HttpContent.cs (16)
80
Debug.
Assert
(encoding != null);
81
Debug.
Assert
(preamble != null);
93
Debug.
Assert
(actualPreamble.Length >= 2);
150
Debug.
Assert
(IsBuffered);
235
Debug.
Assert
(_bufferedContent != null);
638
Debug.
Assert
(contentLength >= 0);
722
Debug.
Assert
(StreamCopyExceptionNeedsWrapping(e));
733
Debug.
Assert
(data != null);
734
Debug.
Assert
(encoding != null);
771
Debug.
Assert
(data != null);
849
Debug.
Assert
(capacity <= maxSize);
950
Debug.
Assert
(_buffer != null);
981
Debug.
Assert
(value > _buffer.Length);
1007
Debug.
Assert
(buffer != null);
1008
Debug.
Assert
(offset >= 0);
1009
Debug.
Assert
(count >= 0);
System\Net\Http\HttpMethod.SocketsHttpHandler.cs (1)
56
Debug.
Assert
(Ascii.IsValid(Method));
System\Net\Http\HttpRequestMessage.cs (1)
184
Debug.
Assert
(value);
System\Net\Http\HttpResponseMessage.cs (1)
118
Debug.
Assert
(headers.ContainsTrailingHeaders);
System\Net\Http\HttpRuleParser.cs (11)
34
Debug.
Assert
(input is not null);
51
Debug.
Assert
(IsToken(input));
58
Debug.
Assert
(input != null);
90
Debug.
Assert
(input != null);
91
Debug.
Assert
((startIndex >= 0) && (startIndex < input.Length));
134
Debug.
Assert
(input != null);
135
Debug.
Assert
(startIndex >= 0);
185
Debug.
Assert
(input != null);
186
Debug.
Assert
((startIndex >= 0) && (startIndex < input.Length));
221
Debug.
Assert
(input != null);
222
Debug.
Assert
((startIndex >= 0) && (startIndex < input.Length));
System\Net\Http\HttpTelemetry.AnyOS.cs (1)
27
Debug.
Assert
(versionMajor is 1 or 2 or 3);
System\Net\Http\HttpTelemetry.cs (4)
46
Debug.
Assert
(request.RequestUri != null && request.RequestUri.IsAbsoluteUri);
189
Debug.
Assert
(count >= 0);
204
Debug.
Assert
(count >= 0);
219
Debug.
Assert
(count >= 0);
System\Net\Http\MessageProcessingHandler.cs (1)
143
Debug.
Assert
(handler != null);
System\Net\Http\Metrics\HttpMetricsEnrichmentContext.cs (2)
88
Debug.
Assert
(context._callbacks.Count == 0);
122
Debug.
Assert
(_tags.Count == 0);
System\Net\Http\Metrics\MetricsHandler.cs (1)
228
Debug.
Assert
(statusCode >= 400 && statusCode <= 599);
System\Net\Http\MultipartContent.cs (4)
158
Debug.
Assert
(stream != null);
202
Debug.
Assert
(stream != null);
236
Debug.
Assert
(task.IsCompleted);
422
Debug.
Assert
(streams != null);
System\Net\Http\NetEventSource.Http.cs (4)
24
Debug.
Assert
(Log.IsEnabled());
35
Debug.
Assert
(Log.IsEnabled());
58
Debug.
Assert
(Log.IsEnabled());
69
Debug.
Assert
(Log.IsEnabled());
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (5)
222
Debug.
Assert
(pool.PreAuthCredentials != null);
228
Debug.
Assert
(pool.PreAuthCredentials.GetCredential(authUri, NegotiateScheme) == null);
229
Debug.
Assert
(pool.PreAuthCredentials.GetCredential(authUri, NtlmScheme) == null);
230
Debug.
Assert
(pool.PreAuthCredentials.GetCredential(authUri, DigestScheme) == null);
355
Debug.
Assert
(request.RequestUri != null);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (4)
108
Debug.
Assert
(request.RequestUri != null);
222
Debug.
Assert
(written == SHA256.HashSizeInBytes);
229
Debug.
Assert
(written == MD5.HashSizeInBytes);
316
Debug.
Assert
(currentIndex < data.Length && !CharIsSpaceOrTab(data[currentIndex]));
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (1)
242
Debug.
Assert
(request.RequestUri != null);
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (15)
71
Debug.
Assert
(_connection.RemainingBuffer.Length == 0);
72
Debug.
Assert
(buffer.Length != 0);
154
Debug.
Assert
(_state == ParsingState.Done);
166
Debug.
Assert
(_connection != null);
187
Debug.
Assert
(_connection.RemainingBuffer.Length == 0);
188
Debug.
Assert
(buffer.Length != 0);
296
Debug.
Assert
(buffer.Length > 0);
305
Debug.
Assert
(bytesRead.Length <= buffer.Length);
315
Debug.
Assert
(_connection != null);
359
Debug.
Assert
(_chunkBytesRemaining > 0);
368
Debug.
Assert
(bytesToConsume > 0 || maxBytesToRead == 0);
470
Debug.
Assert
(_connection != null);
528
Debug.
Assert
(_connection is not null);
532
Debug.
Assert
(fillTask.IsCompleted);
538
Debug.
Assert
(_connection is not null);
System\Net\Http\SocketsHttpHandler\ChunkedEncodingWriteStream.cs (3)
26
Debug.
Assert
(connection._currentRequest != null);
36
Debug.
Assert
(writeTask.IsCompleted);
50
Debug.
Assert
(connection._currentRequest != null);
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (1)
48
Debug.
Assert
(localRequest != null);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (40)
84
Debug.
Assert
(host is not null || (kind == HttpConnectionKind.Proxy && proxyUri is not null));
97
Debug.
Assert
(host != null);
98
Debug.
Assert
(port != 0);
99
Debug.
Assert
(sslHostName == null);
100
Debug.
Assert
(proxyUri == null);
106
Debug.
Assert
(host != null);
107
Debug.
Assert
(port != 0);
108
Debug.
Assert
(sslHostName != null);
109
Debug.
Assert
(proxyUri == null);
113
Debug.
Assert
(host == null);
114
Debug.
Assert
(port == 0);
115
Debug.
Assert
(sslHostName == null);
116
Debug.
Assert
(proxyUri != null);
123
Debug.
Assert
(host != null);
124
Debug.
Assert
(port != 0);
125
Debug.
Assert
(sslHostName == null);
126
Debug.
Assert
(proxyUri != null);
133
Debug.
Assert
(host != null);
134
Debug.
Assert
(port != 0);
135
Debug.
Assert
(sslHostName != null);
136
Debug.
Assert
(proxyUri != null);
142
Debug.
Assert
(host != null);
143
Debug.
Assert
(port != 0);
144
Debug.
Assert
(sslHostName == null);
145
Debug.
Assert
(proxyUri != null);
158
Debug.
Assert
(host != null);
159
Debug.
Assert
(port != 0);
160
Debug.
Assert
(proxyUri != null);
193
Debug.
Assert
(Encoding.ASCII.GetString(_hostHeaderLineBytes) == $"Host: {hostHeader}\r\n");
260
Debug.
Assert
(sslHostName != null);
308
Debug.
Assert
(!Monitor.IsEntered(_http11Connections));
419
Debug.
Assert
(async);
458
Debug.
Assert
(connection is not null || !_http2Enabled);
507
Debug.
Assert
(retryCount >= 0 && retryCount <= MaxConnectionFailureRetries);
557
Debug.
Assert
(http11ConnectionWaiter is null || http2ConnectionWaiter?.ConnectionCancellationTokenSource is null);
611
Debug.
Assert
(stream != null);
790
Debug.
Assert
(_proxyUri != null);
800
Debug.
Assert
(!(e is HttpRequestException));
822
Debug.
Assert
(desiredVersion == 2 || desiredVersion == 3);
835
Debug.
Assert
(!HasSyncObjLock);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (11)
120
Debug.
Assert
(success == waiter is not null);
158
Debug.
Assert
(connection is not null);
186
Debug.
Assert
(HasSyncObjLock);
255
Debug.
Assert
(connectionException is not null);
282
Debug.
Assert
(_associatedHttp11ConnectionCount > 0);
283
Debug.
Assert
(_pendingHttp11ConnectionCount > 0);
310
Debug.
Assert
(_pendingHttp11ConnectionCount > 0);
382
Debug.
Assert
(_associatedHttp11ConnectionCount > 0);
383
Debug.
Assert
(!disposing || Array.IndexOf(_http11Connections.ToArray(), connection) < 0);
401
Debug.
Assert
(pool.HasSyncObjLock);
402
Debug.
Assert
(connections.Count <= pool._associatedHttp11ConnectionCount);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (16)
66
Debug.
Assert
(_kind == HttpConnectionKind.Https || _kind == HttpConnectionKind.SslProxyTunnel || _kind == HttpConnectionKind.Http || _kind == HttpConnectionKind.SocksTunnel || _kind == HttpConnectionKind.SslSocksTunnel);
140
Debug.
Assert
(HasSyncObjLock);
242
Debug.
Assert
(connectionException is not null);
280
Debug.
Assert
(_associatedHttp2ConnectionCount > 0);
281
Debug.
Assert
(_pendingHttp2Connection);
298
Debug.
Assert
(_pendingHttp2Connection);
299
Debug.
Assert
(_associatedHttp2ConnectionCount > 0);
368
Debug.
Assert
(!HasSyncObjLock);
375
Debug.
Assert
(_availableHttp2Connections is null || !_availableHttp2Connections.Contains(connection));
376
Debug.
Assert
(_associatedHttp2ConnectionCount > (_availableHttp2Connections?.Count ?? 0));
400
Debug.
Assert
(_pendingHttp2Connection);
437
Debug.
Assert
(!added);
456
Debug.
Assert
(_disposed);
519
Debug.
Assert
(_availableHttp2Connections is null || !_availableHttp2Connections.Contains(connection));
520
Debug.
Assert
(_associatedHttp2ConnectionCount > 0);
545
Debug.
Assert
(_associatedHttp2ConnectionCount >= _availableHttp2Connections.Count);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (7)
108
Debug.
Assert
(_kind == HttpConnectionKind.Https);
109
Debug.
Assert
(_http3Enabled);
233
Debug.
Assert
(_authorityExpireTimer != null || _disposed);
359
Debug.
Assert
(badAuthority != null);
409
Debug.
Assert
(_authorityExpireTimer != null);
413
Debug.
Assert
(_altSvcBlocklistTimerCancellation != null);
457
Debug.
Assert
(_authorityExpireTimer != null || _disposed);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionWaiter.cs (2)
29
Debug.
Assert
(typeof(T) == typeof(HttpConnection) || typeof(T) == typeof(Http2Connection));
52
Debug.
Assert
(connection is not null);
System\Net\Http\SocketsHttpHandler\ConnectionPool\RequestQueue.cs (2)
50
Debug.
Assert
(_size > 0);
166
Debug.
Assert
(_attemptedConnectionsOffset >= 0);
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (11)
31
Debug.
Assert
(_contentBytesRemaining > 0);
44
Debug.
Assert
((ulong)bytesRead <= _contentBytesRemaining);
67
Debug.
Assert
(_contentBytesRemaining > 0);
106
Debug.
Assert
((ulong)bytesRead <= _contentBytesRemaining);
146
Debug.
Assert
(_connection != null);
174
Debug.
Assert
(maxBytesToRead > 0);
175
Debug.
Assert
(_contentBytesRemaining > 0);
176
Debug.
Assert
(_connection != null);
185
Debug.
Assert
(bytesToConsume > 0);
197
Debug.
Assert
(_connection != null);
198
Debug.
Assert
(_contentBytesRemaining > 0);
System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs (2)
32
Debug.
Assert
(connection._currentRequest != null);
46
Debug.
Assert
(connection._currentRequest != null);
System\Net\Http\SocketsHttpHandler\CookieHelper.cs (1)
19
Debug.
Assert
(response.RequestMessage != null && response.RequestMessage.RequestUri != null);
System\Net\Http\SocketsHttpHandler\CreditManager.cs (4)
22
Debug.
Assert
(owner != null);
23
Debug.
Assert
(!string.IsNullOrWhiteSpace(name));
105
Debug.
Assert
(waiter != null);
111
Debug.
Assert
(_waitersTail == waiter);
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (9)
28
Debug.
Assert
(decompressionMethods != DecompressionMethods.None);
29
Debug.
Assert
(innerHandler != null);
71
Debug.
Assert
(response.Content != null);
157
Debug.
Assert
(task.IsCompleted);
333
Debug.
Assert
(_firstByteStatus == FirstByteStatus.None);
349
Debug.
Assert
(_firstByteStatus == FirstByteStatus.None);
379
Debug.
Assert
(_firstByteStatus == FirstByteStatus.Consumed);
397
Debug.
Assert
(_firstByteStatus == FirstByteStatus.Consumed);
403
Debug.
Assert
(_firstByteStatus != FirstByteStatus.None);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (49)
259
Debug.
Assert
(Monitor.IsEntered(SyncObject));
260
Debug.
Assert
(!_pool.HasSyncObjLock);
280
Debug.
Assert
(!_pool.HasSyncObjLock);
308
Debug.
Assert
(!_pool.HasSyncObjLock);
314
Debug.
Assert
(_availableStreamsWaiter is null || _streamsInUse >= _maxConcurrentStreams);
318
Debug.
Assert
(_streamsInUse >= _httpStreams.Count);
341
Debug.
Assert
(!_pool.HasSyncObjLock);
367
Debug.
Assert
(Monitor.IsEntered(SyncObject));
371
Debug.
Assert
(_shutdown != result);
496
Debug.
Assert
(InitialSettingsReceived.Task.IsCompleted);
535
Debug.
Assert
(bytesRead >= 0);
636
Debug.
Assert
(frameHeader.Type == FrameType.Headers);
739
Debug.
Assert
(frameHeader.Type == FrameType.AltSvc);
740
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
768
Debug.
Assert
(frameHeader.Type == FrameType.Data);
797
Debug.
Assert
(frameHeader.Type == FrameType.Settings);
833
Debug.
Assert
((settings.Length % 6) == 0);
923
Debug.
Assert
(_availableStreamsWaiter is null || _streamsInUse >= _maxConcurrentStreams);
936
Debug.
Assert
(newSize >= 0);
953
Debug.
Assert
(frameHeader.Type == FrameType.Priority);
967
Debug.
Assert
(frameHeader.Type == FrameType.Ping);
982
Debug.
Assert
(sizeof(long) == FrameHeader.PingLength);
1001
Debug.
Assert
(frameHeader.Type == FrameType.WindowUpdate);
1011
Debug.
Assert
(amount >= 0);
1038
Debug.
Assert
(frameHeader.Type == FrameType.RstStream);
1071
Debug.
Assert
(lastStreamId >= 0);
1085
Debug.
Assert
(streamId == kvp.Value.StreamId);
1103
Debug.
Assert
(frameHeader.Type == FrameType.GoAway);
1186
Debug.
Assert
(_shutdown && _streamsInUse == 0);
1291
Debug.
Assert
(sizeof(long) == FrameHeader.PingLength);
1315
Debug.
Assert
(!_pool.HasSyncObjLock);
1500
Debug.
Assert
(request.RequestUri != null);
1627
Debug.
Assert
(headerBytes.Length > 0);
1673
Debug.
Assert
(span.Length == 0);
1753
Debug.
Assert
(amount > 0);
1769
Debug.
Assert
(amount > 0);
1770
Debug.
Assert
(_pendingWindowUpdate < ConnectionWindowThreshold);
1800
Debug.
Assert
(_pool.HasSyncObjLock);
1831
Debug.
Assert
(streamId == kvp.Value.StreamId);
1848
Debug.
Assert
(_shutdown);
1849
Debug.
Assert
(_streamsInUse == 0);
1910
Debug.
Assert
(streamId >= 0);
1926
Debug.
Assert
(buffer.Length >= Size);
1938
Debug.
Assert
(destination.Length >= Size);
1939
Debug.
Assert
(type <= FrameType.Last);
1940
Debug.
Assert
((flags & FrameFlags.ValidBits) == flags);
1941
Debug.
Assert
((uint)payloadLength <= MaxPayloadLength);
1993
Debug.
Assert
(async);
1994
Debug.
Assert
(!_pool.HasSyncObjLock);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (66)
170
Debug.
Assert
(_response != null);
182
Debug.
Assert
(_requestCompletionState == StreamCompletionState.Completed);
187
Debug.
Assert
(_requestBodyCancellationSource != null);
245
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
255
Debug.
Assert
(_responseCompletionState == StreamCompletionState.Completed);
257
Debug.
Assert
(!ConnectProtocolEstablished);
265
Debug.
Assert
(!sendReset);
269
Debug.
Assert
(!ConnectProtocolEstablished);
287
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
322
Debug.
Assert
(!ConnectProtocolEstablished);
335
Debug.
Assert
(_request?.Content != null);
364
Debug.
Assert
(Monitor.IsEntered(SyncObject));
365
Debug.
Assert
(_requestCompletionState != StreamCompletionState.InProgress);
366
Debug.
Assert
(_responseCompletionState != StreamCompletionState.InProgress);
383
Debug.
Assert
(Monitor.IsEntered(SyncObject));
384
Debug.
Assert
(_requestCompletionState != StreamCompletionState.InProgress);
385
Debug.
Assert
(_responseCompletionState != StreamCompletionState.InProgress);
410
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
416
Debug.
Assert
(requestBodyCancellationSource != null);
453
Debug.
Assert
(Monitor.IsEntered(SyncObject));
555
Debug.
Assert
(index >= FirstHPackRequestPseudoHeaderId && index <= LastHPackNormalHeaderId);
578
Debug.
Assert
(index >= FirstHPackRequestPseudoHeaderId && index <= LastHPackNormalHeaderId);
619
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
641
Debug.
Assert
(_response != null);
683
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
710
Debug.
Assert
(_trailers != null);
716
Debug.
Assert
(_response != null && _response.Content != null);
722
Debug.
Assert
(_response != null);
731
Debug.
Assert
(name.Length > 0);
763
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
786
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
850
Debug.
Assert
(_requestCompletionState != StreamCompletionState.Failed);
869
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
924
Debug.
Assert
(_requestCompletionState != StreamCompletionState.Failed);
949
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
988
Debug.
Assert
(requestBodyCancellationSource != null);
1001
Debug.
Assert
(_requestBodyAbandoned);
1002
Debug.
Assert
(!cancel);
1013
Debug.
Assert
(Monitor.IsEntered(SyncObject));
1034
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
1040
Debug.
Assert
(!_hasWaiter);
1067
Debug.
Assert
(!wait);
1070
Debug.
Assert
(_response is not null);
1079
Debug.
Assert
(_response != null && _response.Content != null);
1108
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
1127
Debug.
Assert
(_responseProtocolState == ResponseProtocolState.ExpectingData || _responseProtocolState == ResponseProtocolState.ExpectingTrailingHeaders);
1129
Debug.
Assert
(!_hasWaiter);
1143
Debug.
Assert
(bytesRead == 0);
1146
Debug.
Assert
(!wait);
1167
Debug.
Assert
(bytesRead == 0);
1170
Debug.
Assert
(!wait);
1197
Debug.
Assert
(bytesRead == 0);
1200
Debug.
Assert
(!wait);
1233
Debug.
Assert
(bytesRead == 0);
1236
Debug.
Assert
(!wait);
1268
Debug.
Assert
(_requestBodyCancellationSource != null);
1311
Debug.
Assert
(_creditWaiter != null);
1324
Debug.
Assert
(sendSize > 0);
1376
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
1421
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
1435
Debug.
Assert
(!_waitSource.RunContinuationsAsynchronously);
1441
Debug.
Assert
(_waitSource.RunContinuationsAsynchronously);
1459
Debug.
Assert
(!Monitor.IsEntered(thisRef.SyncObject));
1517
Debug.
Assert
(contentLength >= -1);
1551
Debug.
Assert
(http2Stream != null);
1552
Debug.
Assert
(http2Stream._response != null);
System\Net\Http\SocketsHttpHandler\Http2StreamWindowManager.cs (5)
48
Debug.
Assert
(_lastWindowUpdate != default); // Make sure Start() has been invoked, otherwise we should not be receiving DATA.
49
Debug.
Assert
(bytesConsumed > 0);
50
Debug.
Assert
(_deliveredBytes < StreamWindowThreshold);
120
Debug.
Assert
(_streamWindowSize <= MaxStreamWindowSize);
244
Debug.
Assert
(payload < 0);
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (7)
64
Debug.
Assert
(Monitor.IsEntered(SyncObj));
119
Debug.
Assert
(Monitor.IsEntered(SyncObj));
120
Debug.
Assert
(ShuttingDown);
398
Debug.
Assert
(ex.ApplicationErrorCode.HasValue);
415
Debug.
Assert
(payloadLength <= VariableLengthIntegerHelper.OneByteLimit);
459
Debug.
Assert
(ex.ApplicationErrorCode.HasValue);
594
Debug.
Assert
(ex.ApplicationErrorCode.HasValue);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (16)
208
Debug.
Assert
(_response != null && _response.Content != null);
248
Debug.
Assert
(ex.ApplicationErrorCode.HasValue);
272
Debug.
Assert
(ex.ApplicationErrorCode.HasValue);
294
Debug.
Assert
(_requestBodyCancellationSource.IsCancellationRequested);
334
Debug.
Assert
(_response == null);
351
Debug.
Assert
(_response != null);
564
Debug.
Assert
(_sendBuffer.ActiveLength == 0);
588
Debug.
Assert
(request.RequestUri != null);
648
Debug.
Assert
(actualHeadersLengthEncodedSize == headersLengthEncodedSize);
898
Debug.
Assert
(name.Length > 0);
1094
Debug.
Assert
(_response == null);
1167
Debug.
Assert
(_response == null);
1246
Debug.
Assert
(e.ApplicationErrorCode.HasValue);
1251
Debug.
Assert
(e.ApplicationErrorCode.HasValue);
1402
Debug.
Assert
(_response != null);
1415
Debug.
Assert
(_response != null);
System\Net\Http\SocketsHttpHandler\HttpAuthority.cs (1)
21
Debug.
Assert
(host != null);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (56)
80
Debug.
Assert
(pool != null);
81
Debug.
Assert
(stream != null);
158
Debug.
Assert
(_readAheadTaskStatus == ReadAheadTask_NotStarted);
206
Debug.
Assert
(_readAheadTask == default);
217
Debug.
Assert
(_readAheadTask == default);
218
Debug.
Assert
(_readBuffer.ActiveLength == 0);
269
Debug.
Assert
(bytesToConsume <= _readBuffer.ActiveLength);
275
Debug.
Assert
(request.RequestUri is not null);
296
Debug.
Assert
(request.RequestUri.Scheme == Uri.UriSchemeHttp);
305
Debug.
Assert
(request.Version.Major >= 0 && request.Version.Minor >= 0); // guaranteed by Version class
315
Debug.
Assert
(Kind != HttpConnectionKind.Proxy);
320
Debug.
Assert
(Kind == HttpConnectionKind.Proxy);
375
Debug.
Assert
(success);
383
Debug.
Assert
(_currentRequest is not null);
455
Debug.
Assert
(Ascii.IsValid(s));
460
Debug.
Assert
(status == OperationStatus.Done);
461
Debug.
Assert
(bytesWritten == s.Length);
480
Debug.
Assert
(status == OperationStatus.Done);
481
Debug.
Assert
(bytesWritten == s.Length);
500
Debug.
Assert
(_readAheadTaskStatus != ReadAheadTask_Started);
563
Debug.
Assert
(_readBuffer.ActiveLength == 0);
572
Debug.
Assert
(_readAheadTask != default);
573
Debug.
Assert
(_readAheadTaskStatus == ReadAheadTask_CompletionReserved);
818
Debug.
Assert
(_readAheadTaskStatus == ReadAheadTask_CompletionReserved);
906
Debug.
Assert
(request.Content is not null);
932
Debug.
Assert
(stream.BytesWritten == 0);
1105
Debug.
Assert
(_allowedReadLineBytes >= 0);
1282
Debug.
Assert
(added);
1336
Debug.
Assert
(source.Length <= _writeBuffer.AvailableLength);
1494
Debug.
Assert
(formatted);
1500
Debug.
Assert
(_writeBuffer.Capacity >= 8);
1586
Debug.
Assert
(!ReadAheadTaskHasStarted);
1587
Debug.
Assert
(_readBuffer.AvailableLength == _readBuffer.Capacity);
1588
Debug.
Assert
(_readBuffer.AvailableLength >= InitialReadBufferSize);
1602
Debug.
Assert
(_readAheadTask == default);
1642
Debug.
Assert
(_readBuffer.ActiveStartOffset == 0);
1643
Debug.
Assert
(_readBuffer.ActiveLength > searchOffset);
1656
Debug.
Assert
(searchOffset == readLength - 1 && _readBuffer.ActiveReadOnlySpan[searchOffset] == '\n');
1673
Debug.
Assert
(buffer.Length > 0);
1775
Debug.
Assert
(_readBuffer.AvailableLength == _readBuffer.Capacity);
1808
Debug.
Assert
(_readBuffer.AvailableLength == _readBuffer.Capacity);
1821
Debug.
Assert
(count <= _readBuffer.ActiveLength);
1841
Debug.
Assert
(destination != null);
1860
Debug.
Assert
(remaining > 0);
1877
Debug.
Assert
(destination != null);
1878
Debug.
Assert
(length > 0);
1946
Debug.
Assert
(origReadBuffer.Length > 0);
1967
Debug.
Assert
(_currentRequest == null);
1968
Debug.
Assert
(!_inUse);
1975
Debug.
Assert
(_inUse);
1993
Debug.
Assert
(_inUse);
2031
Debug.
Assert
(_inUse);
2038
Debug.
Assert
(response.Content != null);
2042
Debug.
Assert
(responseStream != null || stream is EmptyReadStream);
2046
Debug.
Assert
(response.RequestMessage == _currentRequest);
2055
Debug.
Assert
(_currentRequest == null);
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (4)
40
Debug.
Assert
(this is HttpConnection or Http2Connection or Http3Connection);
41
Debug.
Assert
(pool.Settings._metrics is not null);
122
Debug.
Assert
(cache is not null);
207
Debug.
Assert
(task.IsFaulted);
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (5)
259
Debug.
Assert
(uri != null);
263
Debug.
Assert
(uri == proxyUri);
286
Debug.
Assert
(HttpUtilities.IsSupportedProxyScheme(proxyUri.Scheme));
385
Debug.
Assert
(request.RequestUri != null);
475
Debug.
Assert
(_cleaningTimer != null);
System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs (3)
18
Debug.
Assert
(stream != null);
19
Debug.
Assert
(stream.CanRead);
20
Debug.
Assert
(!_consumedStream);
System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs (1)
75
Debug.
Assert
(connection != null);
System\Net\Http\SocketsHttpHandler\HttpContentWriteStream.cs (1)
18
Debug.
Assert
(connection != null);
System\Net\Http\SocketsHttpHandler\Metrics\SocketsHttpHandlerMetrics.cs (1)
28
Debug.
Assert
(versionMajor is 1 or 2 or 3);
System\Net\Http\SocketsHttpHandler\MultiProxy.cs (8)
51
Debug.
Assert
(failedProxyCache != null);
80
Debug.
Assert
(failedProxyCache != null);
98
Debug.
Assert
(_failedProxyCache != null);
115
Debug.
Assert
(_failedProxyCache != null);
141
Debug.
Assert
(uri != null);
171
Debug.
Assert
(_proxyConfig != null);
177
Debug.
Assert
(_currentIndex <= _proxyConfig.Length);
258
Debug.
Assert
(charactersConsumed > 0);
System\Net\Http\SocketsHttpHandler\PreAuthCredentialCache.cs (6)
18
Debug.
Assert
(uriPrefix != null);
19
Debug.
Assert
(authType != null);
31
Debug.
Assert
(uriPrefix != null);
32
Debug.
Assert
(authType != null);
46
Debug.
Assert
(uriPrefix != null);
47
Debug.
Assert
(authType != null);
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (4)
19
Debug.
Assert
(initialInnerHandler != null);
20
Debug.
Assert
(redirectInnerHandler != null);
21
Debug.
Assert
(maxAutomaticRedirections > 0);
34
Debug.
Assert
(request.RequestUri != null);
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
538
Debug.
Assert
(_decompressionHandlerFactory is not null);
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (6)
162
Debug.
Assert
(bytesWritten == 4);
167
Debug.
Assert
(hostIP.AddressFamily == AddressFamily.InterNetworkV6);
170
Debug.
Assert
(bytesWritten == 16);
270
Debug.
Assert
(isVersion4a);
279
Debug.
Assert
(bytesWritten == 4);
328
Debug.
Assert
(Encoding.UTF8.GetByteCount(chars) > 255);
System\Net\Http\StreamContent.cs (2)
50
Debug.
Assert
(stream != null);
67
Debug.
Assert
(stream != null);
System\Net\Http\StreamToStreamCopy.cs (6)
25
Debug.
Assert
(source != null);
26
Debug.
Assert
(destination != null);
27
Debug.
Assert
(bufferSize >= 0);
52
Debug.
Assert
(source != null);
53
Debug.
Assert
(destination != null);
54
Debug.
Assert
(bufferSize >= 0);
System.Net.Http.Json (5)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
121
Debug.
Assert
(client.MaxResponseContentBufferSize is > 0 and <= int.MaxValue);
System\Net\Http\Json\JsonContent.cs (2)
27
Debug.
Assert
(jsonTypeInfo is not null);
28
Debug.
Assert
(inputValue is null || jsonTypeInfo.Type.IsAssignableFrom(inputValue.GetType()));
System\Net\Http\Json\JsonHelpers.cs (2)
19
Debug.
Assert
(type is not null);
53
Debug.
Assert
(encoding != null);
System.Net.HttpListener (16)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
402
Debug.
Assert
(state is LazyAsyncResult);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (1)
35
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\WebHeaderEncoding.cs (1)
23
Debug.
Assert
(bytes != null && (uint)byteIndex <= (uint)bytes.Length && (uint)(byteIndex + byteCount) <= (uint)bytes.Length);
System\Net\HttpListener.cs (1)
210
Debug.
Assert
(operationStatus == OperationStatus.Done);
System\Net\HttpListenerRequestUriBuilder.cs (3)
176
Debug.
Assert
(_rawPath != null);
229
Debug.
Assert
(_requestUriString != null);
288
Debug.
Assert
(_rawOctets != null);
System\Net\Managed\ChunkStream.cs (1)
137
Debug.
Assert
(offset == 0);
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
152
Debug.
Assert
(_rawUrl != null);
System\Net\Managed\HttpRequestStream.Managed.cs (2)
122
Debug.
Assert
(nread <= _remainingBody);
208
Debug.
Assert
(nread <= _remainingBody);
System\Net\ServiceNameStore.cs (2)
137
Debug.
Assert
(!string.IsNullOrEmpty(uriPrefix));
166
Debug.
Assert
(!string.IsNullOrEmpty(uriPrefix));
System.Net.Mail (19)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
402
Debug.
Assert
(state is LazyAsyncResult);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (1)
35
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\Net\Mail\MailAddress.cs (1)
76
Debug.
Assert
(parseSuccess);
System\Net\Mail\MailAddressParser.cs (1)
69
Debug.
Assert
(!string.IsNullOrEmpty(data));
System\Net\Mail\MailBnfHelper.cs (2)
362
Debug.
Assert
(index >= 0);
363
Debug.
Assert
(index < data.Length);
System\Net\Mail\MailPriority.cs (1)
492
System.Diagnostics.Debug.
Assert
(_headersEncoding != null);
System\Net\Mail\MailWriter.cs (1)
55
Diagnostics.Debug.
Assert
(_contentStream == sender);
System\Net\Mail\SmtpReplyReaderFactory.cs (2)
309
System.Diagnostics.Debug.
Assert
(_readState == ReadState.Status0);
394
System.Diagnostics.Debug.
Assert
(_parent._readState == ReadState.Status0);
System\Net\Mime\SmtpDateTime.cs (1)
268
Debug.
Assert
(dateValue.Kind == DateTimeKind.Unspecified);
System.Net.NameResolution (11)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (4)
28
Debug.
Assert
(ipv4 > 0);
29
Debug.
Assert
(ipv6 > 0);
30
Debug.
Assert
(uds > 0);
31
Debug.
Assert
(max >= ipv4 && max >= ipv6 && max >= uds);
System\Net\Dns.cs (2)
435
Debug.
Assert
(name != null);
670
Debug.
Assert
(!Monitor.IsEntered(s_tasks));
System\Net\NameResolutionPal.Unix.cs (1)
166
Debug.
Assert
(bytesWritten == rawAddressLength);
System\Net\NameResolutionTelemetry.cs (2)
86
Debug.
Assert
(startingTimestamp.HasValue);
119
Debug.
Assert
(hostNameOrAddress is not null);
System.Net.NetworkInformation (11)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\IO\RowConfigReader.cs (1)
66
Debug.
Assert
(_buffer != null);
System\Net\NetworkInformation\NetEventSource.NetworkInformation.cs (1)
24
Debug.
Assert
(IsEnabled());
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (4)
24
Debug.
Assert
(Monitor.IsEntered(s_gate));
29
Debug.
Assert
(Monitor.IsEntered(s_gate));
152
Debug.
Assert
(Monitor.IsEntered(s_gate));
177
Debug.
Assert
(Monitor.IsEntered(s_gate));
System\Net\NetworkInformation\StringParsingHelpers.Connections.cs (1)
360
Debug.
Assert
(hexAddress.Length == 32);
System\Net\NetworkInformation\UnicastIPAddressInformation.cs (3)
72
Debug.
Assert
((0 <= prefixLength) && (prefixLength <= 126));
73
Debug.
Assert
((family == AddressFamily.InterNetwork) || (family == AddressFamily.InterNetworkV6));
80
Debug.
Assert
(prefixLength <= (addressBytes.Length * 8));
System.Net.Ping (5)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (1)
46
Debug.
Assert
(written == IPAddressParserStatics.IPv6AddressBytes);
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (4)
28
Debug.
Assert
(ipv4 > 0);
29
Debug.
Assert
(ipv6 > 0);
30
Debug.
Assert
(uds > 0);
31
Debug.
Assert
(max >= ipv4 && max >= ipv6 && max >= uds);
System.Net.Primitives (46)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Net\CredentialCacheKey.cs (4)
20
Debug.
Assert
(uriPrefix != null);
21
Debug.
Assert
(authenticationType != null);
60
Debug.
Assert
(uri != null);
61
Debug.
Assert
(prefixUri != null);
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (1)
46
Debug.
Assert
(written == IPAddressParserStatics.IPv6AddressBytes);
src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (1)
114
Debug.
Assert
(start < end);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\SocketAddress.cs (4)
107
Debug.
Assert
(bytesWritten == IPAddressParserStatics.IPv6AddressBytes);
117
Debug.
Assert
(ipAddress.AddressFamily == AddressFamily.InterNetwork);
178
Debug.
Assert
(formatted);
193
Debug.
Assert
(formatted);
src\libraries\Common\src\System\Net\SocketAddressExtensions.cs (1)
14
Debug.
Assert
(socketAddress.Family == AddressFamily.InterNetwork || socketAddress.Family == AddressFamily.InterNetworkV6);
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (4)
28
Debug.
Assert
(ipv4 > 0);
29
Debug.
Assert
(ipv6 > 0);
30
Debug.
Assert
(uds > 0);
31
Debug.
Assert
(max >= ipv4 && max >= ipv6 && max >= uds);
System\Net\Cookie.cs (1)
80
Debug.
Assert
(MaxSupportedVersion.ToString(NumberFormatInfo.InvariantInfo).Equals(MaxSupportedVersionString, StringComparison.Ordinal));
System\Net\CookieContainer.cs (4)
361
Debug.
Assert
(m_maxCookies != 0);
362
Debug.
Assert
(m_maxCookiesPerDomain != 0);
405
Debug.
Assert
(cc != null);
1080
Debug.
Assert
(value != null);
System\Net\CredentialCache.cs (7)
177
Debug.
Assert
(cache != null);
200
Debug.
Assert
(cache != null);
250
Debug.
Assert
(table != null);
275
Debug.
Assert
(cache._cacheForHosts != null);
356
Debug.
Assert
(!string.IsNullOrEmpty(host));
357
Debug.
Assert
(port >= 0);
358
Debug.
Assert
(authenticationType != null);
System\Net\IPAddress.cs (11)
77
Debug.
Assert
(IsIPv4);
82
Debug.
Assert
(IsIPv4);
93
Debug.
Assert
(IsIPv6);
98
Debug.
Assert
(IsIPv6);
145
Debug.
Assert
(numbers.Length == NumberOfLabels);
153
Debug.
Assert
(numbers != null);
154
Debug.
Assert
(numbers.Length == NumberOfLabels);
305
Debug.
Assert
(numbers != null && numbers.Length == NumberOfLabels);
345
Debug.
Assert
(_numbers != null && _numbers.Length == NumberOfLabels);
466
Debug.
Assert
(tmpDestination.Length >= IPAddressParser.MaxIPv4StringLength);
642
Debug.
Assert
(comparand != null);
System\Net\IPAddressParser.cs (1)
70
Debug.
Assert
(numbersLength >= IPAddressParserStatics.IPv6AddressShorts);
System\Net\IPNetwork.cs (4)
114
Debug.
Assert
(bytesWritten == IPAddressParserStatics.IPv6AddressBytes);
116
Debug.
Assert
(bytesWritten == IPAddressParserStatics.IPv6AddressBytes);
193
Debug.
Assert
(prefixLength >= 0); // Parsing with NumberStyles.None should ensure that prefixLength is always non-negative.
222
Debug.
Assert
(bytesWritten == IPAddressParserStatics.IPv6AddressBytes);
System.Net.Quic (88)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (2)
41
Debug.
Assert
(currentHandle.IsInvalid);
51
Debug.
Assert
(handle != null);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
46
Debug.
Assert
(addedRef);
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Net\ArrayBuffer.cs (9)
34
Debug.
Assert
(initialSize > 0 || usePool);
46
Debug.
Assert
(buffer.Length > 0);
71
Debug.
Assert
(_usePool);
72
Debug.
Assert
(_bytes is not null);
111
Debug.
Assert
(byteCount <= AvailableLength);
127
Debug.
Assert
(AvailableLength < byteCount);
131
Debug.
Assert
(_usePool && _activeStart == 0 && _availableStart == 0);
143
Debug.
Assert
(byteCount <= AvailableLength);
171
Debug.
Assert
(byteCount <= AvailableLength);
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (1)
46
Debug.
Assert
(written == IPAddressParserStatics.IPv6AddressBytes);
src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (1)
114
Debug.
Assert
(start < end);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (31)
38
Debug.
Assert
(initialBufferSize >= 0);
70
Debug.
Assert
(byteCount >= 0);
112
Debug.
Assert
(toReturn is not null);
120
Debug.
Assert
(byteCount >= 0);
130
Debug.
Assert
(byteCount >= 0);
131
Debug.
Assert
(limit >= 0);
147
Debug.
Assert
(byteCount >= 0);
157
Debug.
Assert
(byteCount > AvailableMemory.Length);
169
Debug.
Assert
(_allocatedEnd == 0);
170
Debug.
Assert
(_activeStart == 0);
171
Debug.
Assert
(_availableStart == 0);
183
Debug.
Assert
(_allocatedEnd % BlockSize == 0);
184
Debug.
Assert
(_allocatedEnd <= _blocks.Length * BlockSize);
225
Debug.
Assert
(_allocatedEnd % BlockSize == 0);
227
Debug.
Assert
(allocatedBlockCount == 0 || _blocks[allocatedBlockCount - 1] is not null);
230
Debug.
Assert
(_blocks[allocatedBlockCount] is null);
237
Debug.
Assert
(byteCount <= AvailableMemory.Length);
247
Debug.
Assert
(_activeStart == 0);
248
Debug.
Assert
(_availableStart == 0);
249
Debug.
Assert
(_allocatedEnd == 0);
253
Debug.
Assert
(_activeStart <= _availableStart);
254
Debug.
Assert
(_availableStart <= _allocatedEnd);
255
Debug.
Assert
(_allocatedEnd <= _blocks.Length * BlockSize);
264
Debug.
Assert
(_blocks[i] is null);
269
Debug.
Assert
(_blocks[i] is not null);
274
Debug.
Assert
(_blocks[i] is null);
307
Debug.
Assert
(blocks is not null);
308
Debug.
Assert
(start <= int.MaxValue);
309
Debug.
Assert
(length <= int.MaxValue);
310
Debug.
Assert
(start + length <= blocks.Length * BlockSize);
350
Debug.
Assert
(_blocks is not null);
src\libraries\Common\src\System\Net\Security\SslKeyLogger.cs (3)
46
Debug.
Assert
(s_fileStream != null);
71
Debug.
Assert
(s_fileStream != null);
72
Debug.
Assert
(!clientRandom.IsEmpty);
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (4)
28
Debug.
Assert
(ipv4 > 0);
29
Debug.
Assert
(ipv6 > 0);
30
Debug.
Assert
(uds > 0);
31
Debug.
Assert
(max >= ipv4 && max >= ipv6 && max >= uds);
src\libraries\Common\src\System\Net\StreamBuffer.cs (17)
39
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
51
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
63
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
80
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
95
Debug.
Assert
(buffer.Length > 0);
97
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
145
Debug.
Assert
(bytesWritten == buffer.Length);
168
Debug.
Assert
(bytesWritten == buffer.Length);
179
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
195
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
229
Debug.
Assert
(bytesRead == 0);
232
Debug.
Assert
(!wait);
245
Debug.
Assert
(bytesRead == 0);
248
Debug.
Assert
(!wait);
258
Debug.
Assert
(!Monitor.IsEntered(SyncObject));
303
Debug.
Assert
(_hasWaiter == 0);
323
Debug.
Assert
(cancellationToken.IsCancellationRequested);
System\Net\Quic\Internal\MsQuicApi.cs (2)
211
Debug.
Assert
(IsQuicSupported);
223
Debug.
Assert
(MsQuicOpenVersion != null);
System\Net\Quic\Internal\MsQuicBuffers.cs (3)
52
Debug.
Assert
(index < _count);
53
Debug.
Assert
(_buffers[index].Buffer is null);
54
Debug.
Assert
(_buffers[index].Length == 0);
System\Net\Quic\Internal\MsQuicConfiguration.Cache.cs (3)
180
Debug.
Assert
(handle.IsClosed);
226
Debug.
Assert
(removed);
228
Debug.
Assert
(handle.IsClosed);
System\Net\Quic\Internal\MsQuicSafeHandle.cs (1)
107
Debug.
Assert
(_disposable is null);
System\Net\Quic\Internal\ResettableValueTaskSource.cs (1)
101
Debug.
Assert
(!_keepAlive.IsAllocated);
System\Net\Quic\Internal\ValueTaskSource.cs (1)
84
Debug.
Assert
(!_keepAlive.IsAllocated);
System\Net\Quic\QuicConnection.cs (2)
311
Debug.
Assert
(host is not null);
719
Debug.
Assert
(_connectedTcs.IsCompleted);
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (1)
131
Debug.
Assert
(certificate == null);
System\Net\Quic\QuicListener.cs (1)
259
Debug.
Assert
(task.IsFaulted);
System\Net\Quic\QuicStream.cs (1)
735
Debug.
Assert
(_startedTcs.IsCompleted);
System.Net.Requests (15)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
402
Debug.
Assert
(state is LazyAsyncResult);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (1)
35
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
System\Net\HttpWebRequest.cs (6)
1025
Debug.
Assert
(_sendRequestCts != null);
1679
Debug.
Assert
(settings != null);
1681
Debug.
Assert
(fi != null);
1688
Debug.
Assert
(handler.UseCookies); // Default of handler.UseCookies is true.
1702
Debug.
Assert
(handler.UseProxy); // Default of handler.UseProxy is true.
1703
Debug.
Assert
(handler.Proxy == null); // Default of handler.Proxy is null.
System\Net\RequestBufferingStream.cs (1)
109
Debug.
Assert
(success); // Buffer should always be visible since default MemoryStream constructor was used.
System\Net\RequestStreamContent.cs (1)
20
Debug.
Assert
(stream is not null);
System\Net\ServicePoint\ServicePoint.cs (1)
21
Debug.
Assert
(address != null);
System\Net\TaskExtensions.cs (1)
35
Debug.
Assert
(tcs.Task.IsCanceled);
System\Net\WebException.cs (1)
82
Debug.
Assert
(exception != null);
System.Net.Security (119)
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (1)
74
Debug.
Assert
(sizeof(GssBuffer) == 16);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (14)
70
Debug.
Assert
((sslAuthenticationOptions.EnabledSslProtocols & FakeAlpnSslProtocol) == 0);
142
Debug.
Assert
(cipherList.IsEmpty || cipherList[^1] == 0);
145
Debug.
Assert
(cipherSuites == null || (cipherSuites.Length >= 1 && cipherSuites[cipherSuites.Length - 1] == 0));
177
Debug.
Assert
(result == 1);
232
Debug.
Assert
(sslAuthenticationOptions.CertificateContext.CertificateHandle != null);
233
Debug.
Assert
(sslAuthenticationOptions.CertificateContext.KeyHandle != null);
286
Debug.
Assert
(sslAuthenticationOptions.CertificateContext != null);
340
Debug.
Assert
(Interop.Ssl.SslGetData(sslHandle) == IntPtr.Zero);
708
Debug.
Assert
(ssl != IntPtr.Zero);
709
Debug.
Assert
(session != IntPtr.Zero);
733
Debug.
Assert
(ctx != IntPtr.Zero && session != IntPtr.Zero);
750
Debug.
Assert
(name != IntPtr.Zero);
763
Debug.
Assert
(count >= 0);
764
Debug.
Assert
(buffer.Length >= count);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (1)
258
Debug.
Assert
(stapledResponse.Length > 0);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (10)
108
Debug.
Assert
(_gch.IsAllocated);
120
Debug.
Assert
(_sslSessions == null);
124
Debug.
Assert
(_gch.IsAllocated);
131
Debug.
Assert
(_sslSessions != null && session != IntPtr.Zero);
139
Debug.
Assert
(targetName != null);
157
Debug.
Assert
(added);
181
Debug.
Assert
(_sslSessions != null);
184
Debug.
Assert
(targetName != null);
210
Debug.
Assert
(_sslSessions != null);
219
Debug.
Assert
(Interop.Ssl.SslGetData(sslHandle) == IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (2)
41
Debug.
Assert
(currentHandle.IsInvalid);
51
Debug.
Assert
(handle != null);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
46
Debug.
Assert
(addedRef);
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Net\ArrayBuffer.cs (9)
34
Debug.
Assert
(initialSize > 0 || usePool);
46
Debug.
Assert
(buffer.Length > 0);
71
Debug.
Assert
(_usePool);
72
Debug.
Assert
(_bytes is not null);
111
Debug.
Assert
(byteCount <= AvailableLength);
127
Debug.
Assert
(AvailableLength < byteCount);
131
Debug.
Assert
(_usePool && _activeStart == 0 && _availableStart == 0);
143
Debug.
Assert
(byteCount <= AvailableLength);
171
Debug.
Assert
(byteCount <= AvailableLength);
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
31
Debug.
Assert
(task.IsCompletedSuccessfully);
src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (1)
114
Debug.
Assert
(start < end);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\Security\MD4.cs (1)
65
Debug.
Assert
(destination.Length == 128 >> 3);
src\libraries\Common\src\System\Net\Security\RC4.cs (2)
78
Debug.
Assert
(input.Length == output.Length);
79
Debug.
Assert
(state != null);
src\libraries\Common\src\System\Net\Security\SslKeyLogger.cs (3)
46
Debug.
Assert
(s_fileStream != null);
71
Debug.
Assert
(s_fileStream != null);
72
Debug.
Assert
(!clientRandom.IsEmpty);
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (3)
17
Debug.
Assert
(arraySegment.Array != null);
18
Debug.
Assert
(arraySegment.Offset == 0);
25
Debug.
Assert
(clearSize <= array.Length);
src\libraries\Common\src\System\Text\UrlBase64Encoding.cs (2)
26
Debug.
Assert
(charsWritten == base64Len);
65
Debug.
Assert
(source[0] == '=');
System\Net\CertificateValidationPal.Unix.cs (1)
148
Debug.
Assert
(storeLocation == StoreLocation.CurrentUser);
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (18)
233
Debug.
Assert
(clientOptions.Package == NegotiationInfoClass.NTLM);
271
Debug.
Assert
(incomingBlob.IsEmpty);
287
Debug.
Assert
(!incomingBlob.IsEmpty);
297
Debug.
Assert
(HeaderLength == NtlmHeader.Length);
298
Debug.
Assert
(asBytes.Length == sizeof(NegotiateMessage));
384
Debug.
Assert
(written == HMACMD5.HashSizeInBytes);
400
Debug.
Assert
(serverChallenge.Length == ChallengeLength);
401
Debug.
Assert
(clientChallenge.Length == ChallengeLength);
402
Debug.
Assert
(ntlm2hash.Length == DigestLength);
448
Debug.
Assert
(written == MD5.HashSizeInBytes);
524
Debug.
Assert
(bytesWritten == spnSize);
650
Debug.
Assert
(payloadOffset == sizeof(AuthenticateMessage) + ChallengeResponseLength + sizeof(NtChallengeResponse) + targetInfoBuffer.Length);
661
Debug.
Assert
(flags.HasFlag(Flags.NegotiateSign) && flags.HasFlag(Flags.NegotiateKeyExchange));
666
Debug.
Assert
(sessionKeyWritten == HMACMD5.HashSizeInBytes);
678
Debug.
Assert
(_negotiateMessage != null);
697
Debug.
Assert
(payloadOffset == responseBytes.Length);
753
Debug.
Assert
(_clientSeal is not null);
754
Debug.
Assert
(_clientSigningKey is not null);
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (1)
83
Debug.
Assert
(clientOptions.Package == NegotiationInfoClass.Negotiate);
System\Net\NegotiateAuthenticationPal.Unix.cs (7)
134
Debug.
Assert
(_securityContext is not null);
332
Debug.
Assert
(_securityContext is not null);
363
Debug.
Assert
(_securityContext is not null);
391
Debug.
Assert
(_securityContext is not null);
422
Debug.
Assert
(_securityContext is not null);
448
Debug.
Assert
(_securityContext is not null);
591
Debug.
Assert
(appDataOffset < channelBinding.Size);
System\Net\Security\NegotiateAuthentication.cs (1)
406
Debug.
Assert
(_extendedProtectionPolicy != null);
System\Net\Security\NegotiateStream.cs (7)
341
Debug.
Assert
(_context is not null);
506
Debug.
Assert
(_context is not null);
507
Debug.
Assert
(_writeBuffer is not null);
724
Debug.
Assert
(_context != null);
753
Debug.
Assert
(_context != null);
862
Debug.
Assert
(_framer != null);
888
Debug.
Assert
(_context != null);
System\Net\Security\NetSecurityTelemetry.cs (3)
141
Debug.
Assert
(sizeof(SslProtocols) == 4);
242
Debug.
Assert
(count >= 0);
245
Debug.
Assert
(count >= 0);
System\Net\Security\Pal.Managed\SafeChannelBindingHandle.cs (2)
24
Debug.
Assert
(certHashBytes.Length <= CertHashMaxSize);
33
Debug.
Assert
(kind == ChannelBindingKind.Endpoint || kind == ChannelBindingKind.Unique);
System\Net\Security\SslApplicationProtocol.cs (1)
29
Debug.
Assert
(protocol != null);
System\Net\Security\SslStream.cs (1)
767
Debug.
Assert
(bytesRead == 0 || bytesRead == 1);
System\Net\Security\SslStream.IO.cs (4)
278
Debug.
Assert
(token.Payload != null);
828
Debug.
Assert
(_buffer.EncryptedLength == 0);
833
Debug.
Assert
(_buffer.DecryptedLength == 0);
973
Debug.
Assert
(_buffer.DecryptedLength > 0);
System\Net\Security\SslStream.Protocol.cs (4)
742
Debug.
Assert
(_sslAuthenticationOptions.CertificateContext != null);
963
Debug.
Assert
(_securityContext != null);
1362
Debug.
Assert
(Payload == null);
1399
Debug.
Assert
(Payload != null || Size == 0);
System\Net\Security\SslStreamCertificateContext.Linux.cs (8)
245
Debug.
Assert
(_rootCertificate != null);
248
Debug.
Assert
(_ocspUrls is not null);
249
Debug.
Assert
(_ocspUrls.Count > 0);
250
Debug.
Assert
(caCert is not null);
254
Debug.
Assert
(subject != 0);
255
Debug.
Assert
(issuer != 0);
363
Debug.
Assert
(baseUri.Length > 0);
364
Debug.
Assert
(encodedRequest.Count > 0);
System\Net\Security\SslStreamPal.Unix.cs (1)
188
Debug.
Assert
(sslAuthenticationOptions.IsClient);
System\Net\Security\TlsFrameHelper.cs (1)
237
Debug.
Assert
(gotHeader);
System\Net\SslStreamContext.cs (1)
16
Debug.
Assert
(sslStream != null);
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (4)
45
Debug.
Assert
(list != null);
46
Debug.
Assert
(additionalCapacity >= 0);
109
Debug.
Assert
(serviceNames != null);
122
Debug.
Assert
(serviceNames != null);
System.Net.Sockets (96)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (1)
46
Debug.
Assert
(written == IPAddressParserStatics.IPv6AddressBytes);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
80
Debug.
Assert
(IsEnabled());
105
Debug.
Assert
(IsEnabled());
src\libraries\Common\src\System\Net\SocketAddressExtensions.cs (1)
14
Debug.
Assert
(socketAddress.Family == AddressFamily.InterNetwork || socketAddress.Family == AddressFamily.InterNetworkV6);
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (4)
28
Debug.
Assert
(ipv4 > 0);
29
Debug.
Assert
(ipv6 > 0);
30
Debug.
Assert
(uds > 0);
31
Debug.
Assert
(max >= ipv4 && max >= ipv6 && max >= uds);
System\Net\Sockets\SafeSocketHandle.cs (1)
174
Debug.
Assert
(!IsClosed);
System\Net\Sockets\Socket.cs (10)
89
Debug.
Assert
(_handle.IsInvalid);
95
Debug.
Assert
(!_handle.IsInvalid);
139
Debug.
Assert
(SocketPal.MaximumAddressSize <= 512);
151
Debug.
Assert
(bufferLength <= buffer.Length);
1036
Debug.
Assert
(acceptedSocketHandle.IsInvalid);
1047
Debug.
Assert
(!acceptedSocketHandle.IsInvalid);
3606
Debug.
Assert
(fd != null && !fd.IsInvalid);
3664
Debug.
Assert
(_nonBlockingConnectInProgress == false);
3883
Debug.
Assert
(t.IsCanceled || t.IsFaulted);
3890
Debug.
Assert
(t.Exception != null);
System\Net\Sockets\Socket.Tasks.cs (14)
65
Debug.
Assert
(saea.BufferList is null);
66
Debug.
Assert
(saea.AcceptSocket is null);
113
Debug.
Assert
(cancellationToken.CanBeCanceled);
206
Debug.
Assert
(endPoint.Port == port);
218
Debug.
Assert
(lastException != null);
323
Debug.
Assert
(saea.BufferList == null);
413
Debug.
Assert
(saea.BufferList == null);
453
Debug.
Assert
(saea.BufferList == null);
514
Debug.
Assert
(saea.BufferList == null);
569
Debug.
Assert
(saea.BufferList == null);
587
Debug.
Assert
(saea.BufferList == null);
677
Debug.
Assert
(saea.BufferList == null);
707
Debug.
Assert
(saea.BufferList == null);
805
Debug.
Assert
(index == packetsCount);
System\Net\Sockets\Socket.Unix.cs (2)
58
Debug.
Assert
(!_handle.LastConnectFailed);
99
Debug.
Assert
(rv == 0 || blocking); // ignore failures
System\Net\Sockets\SocketAsyncContext.Unix.cs (24)
246
Debug.
Assert
(_state == (int)State.Canceled);
285
Debug.
Assert
(Event == null);
471
Debug.
Assert
(SocketAddress.Length == 0);
695
Debug.
Assert
(lockObject != null);
699
Debug.
Assert
(!Monitor.IsEntered(_lockObject));
711
Debug.
Assert
(Monitor.IsEntered(_lockObject));
777
Debug.
Assert
(_queueLock == null);
796
Debug.
Assert
(sizeof(QueueState) == sizeof(int));
852
Debug.
Assert
(!_isNextOperationSynchronous);
875
Debug.
Assert
(_tail == null);
902
Debug.
Assert
(error != Interop.Error.SUCCESS);
944
Debug.
Assert
(_isNextOperationSynchronous == (op.Event != null));
963
Debug.
Assert
(_tail == null);
983
Debug.
Assert
(!skipAsyncEvents);
1019
Debug.
Assert
(_tail == null);
1047
Debug.
Assert
(_tail == null);
1079
Debug.
Assert
(_tail == null);
1107
Debug.
Assert
(result != OperationResult.Pending);
1114
Debug.
Assert
(op.Event != null);
1123
Debug.
Assert
(_tail == null);
1197
Debug.
Assert
(_state != QueueState.Stopped);
1203
Debug.
Assert
(_state != QueueState.Stopped);
1265
Debug.
Assert
(_isHandleNonBlocking);
2184
Debug.
Assert
((events & Interop.Sys.SocketEvents.Error) == 0);
System\Net\Sockets\SocketAsyncEventArgs.cs (4)
120
Debug.
Assert
(success);
651
Debug.
Assert
(endPoint.AddressFamily == AddressFamily.Unspecified ||
736
Debug.
Assert
(existing.Port == port);
1003
Debug.
Assert
(socketError != SocketError.IOPending);
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (4)
38
Debug.
Assert
(socketAddress.Length > 0);
183
Debug.
Assert
(socketAddress.Length == socketAddressSize);
240
Debug.
Assert
(_sendPacketsElements != null);
327
Debug.
Assert
(NetEventSource.Log.IsEnabled());
System\Net\Sockets\SocketPal.Unix.cs (20)
104
Debug.
Assert
(!handle.IsSocket);
119
Debug.
Assert
(socket.IsSocket);
143
Debug.
Assert
(socket.IsSocket);
155
Debug.
Assert
(socketAddress.Length != 0 || sockAddr == null);
184
Debug.
Assert
(!handle.IsSocket);
213
Debug.
Assert
(socket.IsSocket);
240
Debug.
Assert
(socket.IsSocket);
284
Debug.
Assert
(socket.IsSocket);
374
Debug.
Assert
(socket.IsSocket);
472
Debug.
Assert
(socket.IsSocket);
488
Debug.
Assert
(socketAddress.Length != 0 || rawSocketAddress == null);
530
Debug.
Assert
(socket.IsSocket);
751
Debug.
Assert
(flags == SocketFlags.None);
810
Debug.
Assert
(flags == SocketFlags.None);
811
Debug.
Assert
(buffers == null);
949
Debug.
Assert
(flags == SocketFlags.None);
950
Debug.
Assert
(buffers == null);
1630
Debug.
Assert
((uint)optionLength <= optionValue.Length);
1831
Debug.
Assert
(refsAdded == 0);
1930
Debug.
Assert
(elements.Length == fileHandles.Length);
System\Net\Sockets\SocketsTelemetry.cs (5)
94
Debug.
Assert
(newCount >= 0);
98
Debug.
Assert
(exceptionMessage is null);
132
Debug.
Assert
(exceptionMessage is null);
146
Debug.
Assert
(count >= 0);
153
Debug.
Assert
(count >= 0);
System\Net\Sockets\TCPClient.cs (1)
338
Debug.
Assert
(_clientSocket == null);
System\Net\Sockets\TCPListener.cs (1)
281
Debug.
Assert
(OperatingSystem.IsWindows());
System\Net\Sockets\UnixDomainSocketEndPoint.cs (2)
57
Debug.
Assert
(bufferLength - (isAbstract ? 0 : 1) == bytesEncoded);
69
Debug.
Assert
(AddressFamily.Unix == SocketAddressPal.GetAddressFamily(socketAddress));
System.Net.WebClient (19)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\IO\ChunkedMemoryStream.cs (3)
29
Debug.
Assert
(chunk._next == null || chunk._freeOffset == chunk._buffer.Length);
97
Debug.
Assert
(_headChunk == null);
102
Debug.
Assert
(_headChunk != null);
src\libraries\Common\src\System\IO\DelegatingStream.cs (1)
65
Debug.
Assert
(innerStream != null);
src\libraries\Common\src\System\Threading\Tasks\BeginEndAwaitableAdapter.cs (3)
13
Debug.
Assert
(asyncResult != null);
14
Debug.
Assert
(asyncResult.IsCompleted);
15
Debug.
Assert
(asyncResult.AsyncState is BeginEndAwaitableAdapter);
src\libraries\Common\src\System\Threading\Tasks\RendezvousAwaitable.cs (8)
45
Debug.
Assert
(c == null || c == s_completionSentinel);
55
Debug.
Assert
(_continuation != null);
96
Debug.
Assert
(exception != null);
109
Debug.
Assert
(c != s_completionSentinel);
125
Debug.
Assert
(continuation != null);
130
Debug.
Assert
(c == s_completionSentinel);
145
Debug.
Assert
(_resultSet ^ (_error != null));
149
Debug.
Assert
(!_resultSet && _error == null);
System\Net\WebClient.cs (3)
516
Debug.
Assert
(conversionStatus == OperationStatus.Done);
872
Debug.
Assert
(asyncOp != null);
1009
Debug.
Assert
(asyncOp != null);
System.Net.WebHeaderCollection (1)
System\Net\HeaderInfoTable.cs (1)
142
Debug.
Assert
(headers.Count == Items);
System.Net.WebProxy (1)
System\Net\WebProxy.cs (1)
182
Debug.
Assert
(formatted);
System.Net.WebSockets (31)
System\Net\WebSockets\AsyncMutex.cs (9)
106
Debug.
Assert
(_waitersTail.Next != null && _waitersTail.Prev != null);
129
Debug.
Assert
(w.Prev != null);
144
Debug.
Assert
(m._waitersTail == w);
191
Debug.
Assert
(_lockedSemaphoreFull);
200
Debug.
Assert
(w.Next != null && w.Prev != null);
201
Debug.
Assert
(w.Next != w || w.Prev == w);
202
Debug.
Assert
(w.Prev != w || w.Next == w);
211
Debug.
Assert
(w.Next != null && w.Prev != null);
212
Debug.
Assert
(w.Next != w && w.Prev != w);
System\Net\WebSockets\Compression\WebSocketDeflater.cs (8)
60
Debug.
Assert
(consumed == payload.Length);
95
Debug.
Assert
(written == output.Length);
124
Debug.
Assert
(_stream is not null);
155
Debug.
Assert
(_stream is not null);
156
Debug.
Assert
(_stream.AvailIn == 0);
157
Debug.
Assert
(output.Length > 0);
171
Debug.
Assert
(errorCode is ErrorCode.Ok or ErrorCode.BufError);
185
Debug.
Assert
(errorCode == ErrorCode.Ok);
System\Net\WebSockets\Compression\WebSocketInflater.cs (5)
74
Debug.
Assert
(_available > 0);
98
Debug.
Assert
(_available == 0);
166
Debug.
Assert
(_stream is not null && _stream.AvailIn == 0);
167
Debug.
Assert
(_available == 0);
230
Debug.
Assert
(destination.Length > 0);
System\Net\WebSockets\ManagedWebSocket.cs (6)
379
Debug.
Assert
(_sentCloseFrame);
547
Debug.
Assert
(_sendBuffer != null);
821
Debug.
Assert
(_inflater is not null);
831
Debug.
Assert
(receiveBufferBytesToCopy > 0);
1450
Debug.
Assert
(_sendBuffer == null); // would only fail if had some catastrophic error previously that prevented cleaning up
1489
Debug.
Assert
(maskIndex < sizeof(int));
System\Net\WebSockets\ValueWebSocketReceiveResult.cs (3)
26
Debug.
Assert
(count == Count);
27
Debug.
Assert
(messageType == MessageType);
28
Debug.
Assert
(endOfMessage == EndOfMessage);
System.Net.WebSockets.Client (13)
System\Net\WebSockets\ClientWebSocket.cs (4)
49
Debug.
Assert
((InternalState)_state == InternalState.Disposed);
140
Debug.
Assert
(_state == (int)InternalState.Disposed);
177
Debug.
Assert
(_innerWebSocket != null);
178
Debug.
Assert
(_innerWebSocket.WebSocket != null);
System\Net\WebSockets\WebSocketHandle.Managed.cs (9)
152
Debug.
Assert
(subprotocolEnumerableValues is string[]);
194
Debug.
Assert
(connectedStream.CanWrite);
195
Debug.
Assert
(connectedStream.CanRead);
300
Debug.
Assert
(handler.SslOptions.ClientCertificates == null);
439
Debug.
Assert
(builder.Length <= ClientWebSocketDeflateConstants.MaxExtensionLength);
448
Debug.
Assert
(response.Version == HttpVersion.Version11 || response.Version == HttpVersion.Version20);
457
Debug.
Assert
(secValue != null);
493
Debug.
Assert
(success);
502
Debug.
Assert
(bytesWritten == 20 /* SHA1 hash length */);
System.Numerics.Tensors (315)
System\NIndex.cs (1)
170
Debug.
Assert
(formatted);
System\NRange.cs (2)
74
Debug.
Assert
(formatted);
85
Debug.
Assert
(formatted);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (54)
162
Debug.
Assert
(((nuint)xPtr % (uint)sizeof(Vector128<T>)) == 0);
331
Debug.
Assert
(((nuint)xPtr % (uint)sizeof(Vector256<T>)) == 0);
500
Debug.
Assert
(((nuint)xPtr % (uint)sizeof(Vector512<T>)) == 0);
648
Debug.
Assert
(sizeof(T) == 8);
656
Debug.
Assert
(sizeof(T) == 1);
694
Debug.
Assert
(Vector256.IsHardwareAccelerated);
708
Debug.
Assert
(Vector256.IsHardwareAccelerated);
733
Debug.
Assert
(Vector128.IsHardwareAccelerated);
747
Debug.
Assert
(Vector128.IsHardwareAccelerated);
827
Debug.
Assert
(sizeof(T) == 2);
849
Debug.
Assert
(Vector256.IsHardwareAccelerated);
863
Debug.
Assert
(Vector256.IsHardwareAccelerated);
880
Debug.
Assert
(Vector128.IsHardwareAccelerated);
894
Debug.
Assert
(Vector128.IsHardwareAccelerated);
942
Debug.
Assert
(sizeof(T) == 4);
955
Debug.
Assert
(Vector256.IsHardwareAccelerated);
968
Debug.
Assert
(Vector256.IsHardwareAccelerated);
980
Debug.
Assert
(Vector128.IsHardwareAccelerated);
993
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1031
Debug.
Assert
(sizeof(T) == 8);
1040
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1053
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1063
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1076
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1249
Debug.
Assert
(((nuint)xPtr % (uint)sizeof(Vector128<T>)) == 0);
1440
Debug.
Assert
(((nuint)xPtr % (uint)sizeof(Vector256<T>)) == 0);
1631
Debug.
Assert
(((nuint)xPtr % (uint)sizeof(Vector512<T>)) == 0);
1796
Debug.
Assert
(sizeof(T) == 8);
1804
Debug.
Assert
(sizeof(T) == 1);
1842
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1858
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1884
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1900
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1981
Debug.
Assert
(sizeof(T) == 2);
2003
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2019
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2037
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2053
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2102
Debug.
Assert
(sizeof(T) == 4);
2115
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2130
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2143
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2158
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2199
Debug.
Assert
(sizeof(T) == 8);
2208
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2223
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2234
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2249
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2302
Debug.
Assert
(Unsafe.SizeOf<T>() == 8);
2338
Debug.
Assert
(Unsafe.SizeOf<T>() == 8);
2374
Debug.
Assert
(Unsafe.SizeOf<T>() == 8);
2410
Debug.
Assert
(Unsafe.SizeOf<T>() == 8);
2446
Debug.
Assert
(Unsafe.SizeOf<T>() == 8);
2482
Debug.
Assert
(Unsafe.SizeOf<T>() == 8);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBinaryOperator.cs (49)
200
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector128<T>)) == 0);
442
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector256<T>)) == 0);
684
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector512<T>)) == 0);
899
Debug.
Assert
(sizeof(T) == 8);
907
Debug.
Assert
(sizeof(T) == 1);
944
Debug.
Assert
(Vector256.IsHardwareAccelerated);
960
Debug.
Assert
(Vector256.IsHardwareAccelerated);
986
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1002
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1095
Debug.
Assert
(sizeof(T) == 2);
1116
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1132
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1150
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1166
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1219
Debug.
Assert
(sizeof(T) == 4);
1231
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1246
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1259
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1274
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1313
Debug.
Assert
(sizeof(T) == 8);
1321
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1336
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1347
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1362
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1531
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector128<T>)) == 0);
1769
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector256<T>)) == 0);
2007
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector512<T>)) == 0);
2219
Debug.
Assert
(sizeof(T) == 8);
2227
Debug.
Assert
(sizeof(T) == 1);
2264
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2282
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2308
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2326
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2419
Debug.
Assert
(sizeof(T) == 2);
2440
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2458
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2476
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2494
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2547
Debug.
Assert
(sizeof(T) == 4);
2559
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2576
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2589
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2606
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2645
Debug.
Assert
(sizeof(T) == 8);
2653
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2670
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2681
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2698
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2763
Debug.
Assert
(Unsafe.SizeOf<T>() == 8);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IIndexOfOperator.cs (1)
77
Debug.
Assert
(sizeof(T) == 1);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IStatefulUnaryOperator.cs (24)
160
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector128<T>)) == 0);
371
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector256<T>)) == 0);
582
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector512<T>)) == 0);
771
Debug.
Assert
(sizeof(T) == 8);
779
Debug.
Assert
(sizeof(T) == 1);
816
Debug.
Assert
(Vector256.IsHardwareAccelerated);
830
Debug.
Assert
(Vector256.IsHardwareAccelerated);
855
Debug.
Assert
(Vector128.IsHardwareAccelerated);
869
Debug.
Assert
(Vector128.IsHardwareAccelerated);
947
Debug.
Assert
(sizeof(T) == 2);
968
Debug.
Assert
(Vector256.IsHardwareAccelerated);
982
Debug.
Assert
(Vector256.IsHardwareAccelerated);
999
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1013
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1059
Debug.
Assert
(sizeof(T) == 4);
1071
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1084
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1096
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1109
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1145
Debug.
Assert
(sizeof(T) == 8);
1153
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1166
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1176
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1189
Debug.
Assert
(Vector128.IsHardwareAccelerated);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.ITernaryOperator.cs (72)
182
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector128<T>)) == 0);
455
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector256<T>)) == 0);
728
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector512<T>)) == 0);
969
Debug.
Assert
(sizeof(T) == 8);
977
Debug.
Assert
(sizeof(T) == 1);
1014
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1032
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1059
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1077
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1185
Debug.
Assert
(sizeof(T) == 2);
1206
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1224
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1243
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1261
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1321
Debug.
Assert
(sizeof(T) == 4);
1333
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1350
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1364
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1381
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1423
Debug.
Assert
(sizeof(T) == 8);
1431
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1448
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1460
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1477
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1656
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector128<T>)) == 0);
1925
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector256<T>)) == 0);
2194
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector512<T>)) == 0);
2432
Debug.
Assert
(sizeof(T) == 8);
2440
Debug.
Assert
(sizeof(T) == 1);
2477
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2497
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2524
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2544
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2652
Debug.
Assert
(sizeof(T) == 2);
2673
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2693
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2712
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2732
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2792
Debug.
Assert
(sizeof(T) == 4);
2804
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2823
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2837
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2856
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2898
Debug.
Assert
(sizeof(T) == 8);
2906
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2925
Debug.
Assert
(Vector256.IsHardwareAccelerated);
2937
Debug.
Assert
(Vector128.IsHardwareAccelerated);
2956
Debug.
Assert
(Vector128.IsHardwareAccelerated);
3135
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector128<T>)) == 0);
3404
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector256<T>)) == 0);
3673
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector512<T>)) == 0);
3911
Debug.
Assert
(sizeof(T) == 8);
3919
Debug.
Assert
(sizeof(T) == 1);
3956
Debug.
Assert
(Vector256.IsHardwareAccelerated);
3976
Debug.
Assert
(Vector256.IsHardwareAccelerated);
4003
Debug.
Assert
(Vector128.IsHardwareAccelerated);
4023
Debug.
Assert
(Vector128.IsHardwareAccelerated);
4131
Debug.
Assert
(sizeof(T) == 2);
4152
Debug.
Assert
(Vector256.IsHardwareAccelerated);
4172
Debug.
Assert
(Vector256.IsHardwareAccelerated);
4191
Debug.
Assert
(Vector128.IsHardwareAccelerated);
4211
Debug.
Assert
(Vector128.IsHardwareAccelerated);
4271
Debug.
Assert
(sizeof(T) == 4);
4283
Debug.
Assert
(Vector256.IsHardwareAccelerated);
4302
Debug.
Assert
(Vector256.IsHardwareAccelerated);
4316
Debug.
Assert
(Vector128.IsHardwareAccelerated);
4335
Debug.
Assert
(Vector128.IsHardwareAccelerated);
4377
Debug.
Assert
(sizeof(T) == 8);
4385
Debug.
Assert
(Vector256.IsHardwareAccelerated);
4404
Debug.
Assert
(Vector256.IsHardwareAccelerated);
4416
Debug.
Assert
(Vector128.IsHardwareAccelerated);
4435
Debug.
Assert
(Vector128.IsHardwareAccelerated);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOneToTwoOperator.cs (7)
35
Debug.
Assert
(sizeof(TInput) * 2 == sizeof(TOutput));
48
Debug.
Assert
(Vector512<TInput>.IsSupported);
49
Debug.
Assert
(Vector512<TOutput>.IsSupported);
81
Debug.
Assert
(Vector256<TInput>.IsSupported);
82
Debug.
Assert
(Vector256<TOutput>.IsSupported);
114
Debug.
Assert
(Vector128<TInput>.IsSupported);
115
Debug.
Assert
(Vector128<TOutput>.IsSupported);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryOperator.cs (24)
200
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector128<TInput>)) == 0);
411
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector256<TInput>)) == 0);
622
Debug.
Assert
(((nuint)dPtr % (uint)sizeof(Vector512<TInput>)) == 0);
811
Debug.
Assert
(sizeof(TInput) == 8);
819
Debug.
Assert
(sizeof(TInput) == 1);
856
Debug.
Assert
(Vector256.IsHardwareAccelerated);
870
Debug.
Assert
(Vector256.IsHardwareAccelerated);
895
Debug.
Assert
(Vector128.IsHardwareAccelerated);
909
Debug.
Assert
(Vector128.IsHardwareAccelerated);
987
Debug.
Assert
(sizeof(TInput) == 2);
1008
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1022
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1039
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1053
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1099
Debug.
Assert
(sizeof(TInput) == 4);
1111
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1124
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1136
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1149
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1185
Debug.
Assert
(sizeof(TInput) == 8);
1193
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1206
Debug.
Assert
(Vector256.IsHardwareAccelerated);
1216
Debug.
Assert
(Vector128.IsHardwareAccelerated);
1229
Debug.
Assert
(Vector128.IsHardwareAccelerated);
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IUnaryTwoToOneOperator.cs (7)
35
Debug.
Assert
(sizeof(TInput) == sizeof(TOutput) * 2);
48
Debug.
Assert
(Vector512<TInput>.IsSupported);
49
Debug.
Assert
(Vector512<TOutput>.IsSupported);
81
Debug.
Assert
(Vector256<TInput>.IsSupported);
82
Debug.
Assert
(Vector256<TOutput>.IsSupported);
114
Debug.
Assert
(Vector128<TInput>.IsSupported);
115
Debug.
Assert
(Vector128<TOutput>.IsSupported);
System\Numerics\Tensors\netcore\TensorPrimitives.Cbrt.cs (3)
41
Debug.
Assert
(typeof(T) == typeof(double));
54
Debug.
Assert
(typeof(T) == typeof(double));
67
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs (3)
39
Debug.
Assert
(typeof(T) == typeof(double));
52
Debug.
Assert
(typeof(T) == typeof(double));
65
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (3)
75
Debug.
Assert
(typeof(T) == typeof(double));
88
Debug.
Assert
(typeof(T) == typeof(double));
101
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (3)
85
Debug.
Assert
(typeof(T) == typeof(double));
106
Debug.
Assert
(typeof(T) == typeof(double));
127
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (3)
52
Debug.
Assert
(typeof(T) == typeof(double));
74
Debug.
Assert
(typeof(T) == typeof(double));
96
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (3)
51
Debug.
Assert
(typeof(T) == typeof(float));
76
Debug.
Assert
(typeof(T) == typeof(float));
101
Debug.
Assert
(typeof(T) == typeof(float));
System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs (3)
39
Debug.
Assert
(typeof(T) == typeof(double));
52
Debug.
Assert
(typeof(T) == typeof(double));
65
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (3)
110
Debug.
Assert
(typeof(T) == typeof(float));
163
Debug.
Assert
(typeof(T) == typeof(float));
188
Debug.
Assert
(typeof(T) == typeof(float));
System\Numerics\Tensors\netcore\TensorPrimitives.IndexOfMax.cs (3)
152
Debug.
Assert
(sizeof(T) is 1 or 2 or 4 or 8);
243
Debug.
Assert
(sizeof(T) is 1 or 2 or 4 or 8);
334
Debug.
Assert
(sizeof(T) is 1 or 2 or 4 or 8);
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (2)
48
Debug.
Assert
(AdvSimd.IsSupported);
53
Debug.
Assert
(sizeof(T) == 4);
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (3)
93
Debug.
Assert
(typeof(T) == typeof(float));
118
Debug.
Assert
(typeof(T) == typeof(float));
143
Debug.
Assert
(typeof(T) == typeof(float));
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (3)
53
Debug.
Assert
(typeof(T) == typeof(float));
78
Debug.
Assert
(typeof(T) == typeof(float));
103
Debug.
Assert
(typeof(T) == typeof(float));
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (3)
133
Debug.
Assert
(typeof(T) == typeof(float));
167
Debug.
Assert
(typeof(T) == typeof(float));
191
Debug.
Assert
(typeof(T) == typeof(float));
System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs (3)
88
Debug.
Assert
(sizeof(T) == 4);
136
Debug.
Assert
(sizeof(T) == 4);
184
Debug.
Assert
(sizeof(T) == 4);
System\Numerics\Tensors\netcore\TensorPrimitives.Pow.cs (3)
74
Debug.
Assert
(typeof(T) == typeof(double));
87
Debug.
Assert
(typeof(T) == typeof(double));
100
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.RootN.cs (3)
43
Debug.
Assert
(typeof(T) == typeof(double));
56
Debug.
Assert
(typeof(T) == typeof(double));
69
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (5)
113
Debug.
Assert
(typeof(T) == typeof(double));
224
Debug.
Assert
(typeof(T) == typeof(double));
237
Debug.
Assert
(typeof(T) == typeof(double));
250
Debug.
Assert
(typeof(T) == typeof(double));
265
Debug.
Assert
(typeof(T) == typeof(float) || typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (3)
65
Debug.
Assert
(typeof(T) == typeof(double));
78
Debug.
Assert
(typeof(T) == typeof(double));
91
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (3)
69
Debug.
Assert
(typeof(T) == typeof(double));
94
Debug.
Assert
(typeof(T) == typeof(double));
119
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (3)
52
Debug.
Assert
(typeof(T) == typeof(double));
74
Debug.
Assert
(typeof(T) == typeof(double));
96
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs (3)
69
Debug.
Assert
(typeof(T) == typeof(double));
82
Debug.
Assert
(typeof(T) == typeof(double));
95
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorPrimitives.TrailingZeroCount.cs (1)
46
Debug.
Assert
(PopCountOperator<T>.Vectorizable);
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (3)
46
Debug.
Assert
(typeof(T) == typeof(double));
69
Debug.
Assert
(typeof(T) == typeof(double));
91
Debug.
Assert
(typeof(T) == typeof(double));
System\Numerics\Tensors\netcore\TensorSpanHelpers.cs (4)
66
Debug.
Assert
(strides.Length == indexes.Length);
88
Debug.
Assert
(strides.Length == indexes.Length);
110
Debug.
Assert
(strides.Length == indexes.Length);
126
Debug.
Assert
(strides.Length == lengths.Length);
System\Numerics\Tensors\TensorPrimitives.Helpers.cs (2)
38
Debug.
Assert
(sizeof(TFrom) == sizeof(TTo));
50
Debug.
Assert
(sizeof(TFrom) == sizeof(TTo));
System.ObjectModel (3)
System\Collections\ObjectModel\KeyedCollection.cs (1)
51
Debug.
Assert
(base.Items is List<TItem>);
System\Collections\ObjectModel\ObservableCollection.cs (1)
307
Debug.
Assert
(collection != null);
System\Collections\Specialized\NotifyCollectionChangedEventArgs.cs (1)
282
Debug.
Assert
(list != null);
System.Private.CoreLib (2692)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (1)
673
Debug.
Assert
(false);
src\libraries\Common\src\Interop\Interop.ICU.cs (2)
17
Debug.
Assert
(icuuc != IntPtr.Zero);
18
Debug.
Assert
(icuin != IntPtr.Zero);
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (2)
104
Debug.
Assert
(valueParsed);
119
Debug.
Assert
(!string.IsNullOrEmpty(path));
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
13
Debug.
Assert
(errorInfo.Error != Error.SUCCESS);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
69
Debug.
Assert
(passwd.Name != null);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetUnixVersion.cs (1)
39
Debug.
Assert
(Array.IndexOf<byte>(version, 0) != -1);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReadDir.cs (1)
38
Debug.
Assert
(buffer.Length >= Encoding.UTF8.GetMaxCharCount(NameBufferSize - 1 - 1));
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (7)
25
Debug.
Assert
(capacity >= 0);
54
Debug.
Assert
(index >= 0 && index < _count);
78
Debug.
Assert
(_count > 0);
87
Debug.
Assert
(_count > 0);
104
Debug.
Assert
(_array != null); // Nonzero _count should imply this
134
Debug.
Assert
(_count < Capacity);
141
Debug.
Assert
(minimum > Capacity);
src\libraries\Common\src\System\Collections\Generic\BitHelper.cs (2)
24
Debug.
Assert
(bitPosition >= 0);
38
Debug.
Assert
(bitPosition >= 0);
src\libraries\Common\src\System\HexConverter.cs (7)
98
Debug.
Assert
(Ssse3.IsSupported || AdvSimd.Arm64.IsSupported);
114
Debug.
Assert
(bytes.Length >= Vector128<int>.Count);
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
247
Debug.
Assert
(Ssse3.IsSupported || AdvSimd.Arm64.IsSupported);
248
Debug.
Assert
(chars.Length <= bytes.Length * 2);
249
Debug.
Assert
(chars.Length % 2 == 0);
250
Debug.
Assert
(chars.Length >= Vector128<ushort>.Count * 2);
src\libraries\Common\src\System\IO\PathInternal.cs (1)
124
Debug.
Assert
(rootLength > 0);
src\libraries\Common\src\System\IO\PathInternal.Unix.cs (1)
31
Debug.
Assert
(DirectorySeparatorChar == AltDirectorySeparatorChar);
src\libraries\Common\src\System\IO\Win32Marshal.cs (1)
29
Debug.
Assert
(errorCode != Interop.Errors.ERROR_SUCCESS);
src\libraries\Common\src\System\Number.Formatting.Common.cs (11)
144
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
281
Debug.
Assert
(format is 'G' or 'g');
293
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
716
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
750
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
865
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
886
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
913
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
935
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
959
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
1013
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
src\libraries\Common\src\System\Number.NumberBuffer.cs (3)
38
Debug.
Assert
(digits != null);
46
Debug.
Assert
(!digits.IsEmpty);
67
Debug.
Assert
((Kind == NumberBufferKind.Integer) || (Kind == NumberBufferKind.Decimal) || (Kind == NumberBufferKind.FloatingPoint));
src\libraries\Common\src\System\Number.Parsing.Common.cs (11)
16
Debug.
Assert
(str != null);
17
Debug.
Assert
(strEnd != null);
18
Debug.
Assert
(str <= strEnd);
19
Debug.
Assert
((styles & (NumberStyles.AllowHexSpecifier | NumberStyles.AllowBinarySpecifier)) == 0);
28
Debug.
Assert
(number.DigitsCount == 0);
29
Debug.
Assert
(number.Scale == 0);
30
Debug.
Assert
(!number.IsNegative);
31
Debug.
Assert
(!number.HasNonZeroTail);
228
Debug.
Assert
(numberOfTrailingZeros >= 0);
283
Debug.
Assert
(info != null);
339
Debug.
Assert
((p != null) && (pEnd != null) && (p <= pEnd));
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (1)
16
Debug.
Assert
(name.Length != 0);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (1)
136
Debug.
Assert
(task is not null);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.ThreadPoolValueTaskSource.cs (3)
82
Debug.
Assert
(_operation >= Operation.Read && _operation <= Operation.WriteGather);
105
Debug.
Assert
(_readScatterBuffers != null);
109
Debug.
Assert
(_writeGatherBuffers != null);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (9)
74
Debug.
Assert
(value == false); // We should only use the setter to disable random access.
95
Debug.
Assert
(path != null);
140
Debug.
Assert
(_path is not null);
180
Debug.
Assert
(fileLength >= 0);
347
Debug.
Assert
(Interop.Sys.LSeek(this, 0, Interop.Sys.SeekWhence.SEEK_CUR) >= 0);
452
Debug.
Assert
(mode == FileMode.Create || mode == FileMode.CreateNew);
467
Debug.
Assert
(lockOperation == Interop.Sys.LockOperations.LOCK_EX || lockOperation == Interop.Sys.LockOperations.LOCK_SH);
515
Debug.
Assert
(!IsClosed);
516
Debug.
Assert
(!IsInvalid);
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
175
Debug.
Assert
(_innerExceptions[i] != null);
src\libraries\System.Private.CoreLib\src\System\AppContext.AnyOS.cs (1)
72
Debug.
Assert
(s_dataStore is not null);
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
414
Debug.
Assert
(mi != null);
src\libraries\System.Private.CoreLib\src\System\Array.cs (10)
71
Debug.
Assert
(array != null);
614
Debug.
Assert
(low <= hi);
2336
Debug.
Assert
(hi >= lo);
2337
Debug.
Assert
(depthLimit >= 0);
2344
Debug.
Assert
(partitionSize >= 2);
2379
Debug.
Assert
(hi - lo >= IntrosortSizeThreshold);
2553
Debug.
Assert
(hi >= lo);
2554
Debug.
Assert
(depthLimit >= 0);
2561
Debug.
Assert
(partitionSize >= 2);
2596
Debug.
Assert
(hi - lo >= IntrosortSizeThreshold);
src\libraries\System.Private.CoreLib\src\System\Array.Enumerators.cs (1)
115
Debug.
Assert
(array == null || endIndex == array.Length);
src\libraries\System.Private.CoreLib\src\System\ArraySegment.cs (6)
203
Debug.
Assert
(index < 0 ||
244
Debug.
Assert
(index < 0 ||
290
Debug.
Assert
(arraySegment.Array != null);
291
Debug.
Assert
(arraySegment.Offset >= 0);
292
Debug.
Assert
(arraySegment.Count >= 0);
293
Debug.
Assert
(arraySegment.Offset + arraySegment.Count <= arraySegment.Array.Length);
src\libraries\System.Private.CoreLib\src\System\Attribute.cs (2)
116
Debug.
Assert
(thisValueArray.Rank == 1 && thatValueArray.Rank == 1);
130
Debug.
Assert
(!(thisValue is Attribute));
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (1)
195
Debug.
Assert
(byteCount > BulkMoveWithWriteBarrierChunk);
src\libraries\System.Private.CoreLib\src\System\Buffers\StandardFormat.cs (1)
160
Debug.
Assert
(destination.Length == FormatStringLength);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Decoder.cs (3)
128
Debug.
Assert
(destLength < (int.MaxValue / 4 * 3));
848
Debug.
Assert
((Ssse3.IsSupported || AdvSimd.Arm64.IsSupported) && BitConverter.IsLittleEndian);
998
Debug.
Assert
((Ssse3.IsSupported || AdvSimd.Arm64.IsSupported) && BitConverter.IsLittleEndian);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\FormattingHelpers.CountDigits.cs (2)
25
Debug.
Assert
(log2ToPow10.Length == 64);
55
Debug.
Assert
((index + 1) <= powersOf10.Length);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\FormattingHelpers.CountDigits.Int128.cs (2)
36
Debug.
Assert
(value.Upper == 0);
46
Debug.
Assert
(digits == 21);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Formatter\Utf8Formatter.Date.cs (1)
108
Debug.
Assert
(bytesWritten == DateTimeFormat.FormatRLength);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Date.cs (1)
83
Debug.
Assert
(kind == DateTimeKind.Unspecified);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Date.Helpers.cs (2)
113
Debug.
Assert
(year <= 9999); // All of our callers to date parse the year from fixed 4-digit fields so this value is trusted.
146
Debug.
Assert
(fraction >= 0 && fraction <= Utf8Constants.MaxDateTimeFraction); // All of our callers to date parse the fraction from fixed 7-digit fields so this value is trusted.
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Date.O.cs (1)
227
Debug.
Assert
(offsetChar == Utf8Constants.Plus || offsetChar == Utf8Constants.Minus);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Number.cs (5)
18
Debug.
Assert
(number.DigitsCount == 0);
19
Debug.
Assert
(number.Scale == 0);
20
Debug.
Assert
(!number.IsNegative);
21
Debug.
Assert
(!number.HasNonZeroTail);
112
Debug.
Assert
(dstIndex == 0);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpan.cs (2)
121
Debug.
Assert
(digitCount == 1);
145
Debug.
Assert
(fraction <= Utf8Constants.MaxDateTimeFraction); // This value comes from TryParseTimeSpanFraction() which already rejects any fraction string longer than 7 digits.
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.TimeSpanSplitter.cs (4)
98
Debug.
Assert
(result == ComponentParseResult.Colon || result == ComponentParseResult.Period);
118
Debug.
Assert
(result == ComponentParseResult.Colon || result == ComponentParseResult.Period);
138
Debug.
Assert
(result == ComponentParseResult.Colon || result == ComponentParseResult.Period);
158
Debug.
Assert
(result == ComponentParseResult.Colon || result == ComponentParseResult.Period);
src\libraries\System.Private.CoreLib\src\System\Buffers\Utilities.cs (1)
27
Debug.
Assert
(maxSize >= 0);
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
362
Debug.
Assert
(IsLatin1(c));
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (19)
240
Debug.
Assert
(count == i);
369
Debug.
Assert
(head._preservedForObservation);
370
Debug.
Assert
(head._frozenForEnqueues);
371
Debug.
Assert
(tail._preservedForObservation);
372
Debug.
Assert
(tail._frozenForEnqueues);
403
Debug.
Assert
(s._preservedForObservation);
404
Debug.
Assert
(s._frozenForEnqueues);
469
Debug.
Assert
(count == i - index);
499
Debug.
Assert
(head != null);
500
Debug.
Assert
(tail != null);
501
Debug.
Assert
(tail._nextSegment == null);
509
Debug.
Assert
(s._frozenForEnqueues); // any non-tail should already be marked
524
Debug.
Assert
(segment._preservedForObservation);
544
Debug.
Assert
(head._preservedForObservation);
545
Debug.
Assert
(head._frozenForEnqueues);
546
Debug.
Assert
(tail._preservedForObservation);
547
Debug.
Assert
(tail._frozenForEnqueues);
719
Debug.
Assert
(head._frozenForEnqueues);
782
Debug.
Assert
(next == s._nextSegment);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (41)
101
Debug.
Assert
(i != j);
114
Debug.
Assert
(i != j);
123
Debug.
Assert
(comparer != null);
136
Debug.
Assert
(!keys.IsEmpty);
137
Debug.
Assert
(depthLimit >= 0);
138
Debug.
Assert
(comparer != null);
181
Debug.
Assert
(keys.Length >= Array.IntrosortSizeThreshold);
182
Debug.
Assert
(comparer != null);
219
Debug.
Assert
(comparer != null);
220
Debug.
Assert
(!keys.IsEmpty);
237
Debug.
Assert
(comparer != null);
401
Debug.
Assert
(!Unsafe.AreSame(ref i, ref j));
413
Debug.
Assert
(!keys.IsEmpty);
414
Debug.
Assert
(depthLimit >= 0);
460
Debug.
Assert
(keys.Length >= Array.IntrosortSizeThreshold);
510
Debug.
Assert
(!keys.IsEmpty);
636
Debug.
Assert
(comparer != null);
637
Debug.
Assert
(0 <= i && i < keys.Length && i < values.Length);
638
Debug.
Assert
(0 <= j && j < keys.Length && j < values.Length);
639
Debug.
Assert
(i != j);
656
Debug.
Assert
(i != j);
669
Debug.
Assert
(comparer != null);
670
Debug.
Assert
(keys.Length == values.Length);
680
Debug.
Assert
(!keys.IsEmpty);
681
Debug.
Assert
(values.Length == keys.Length);
682
Debug.
Assert
(depthLimit >= 0);
683
Debug.
Assert
(comparer != null);
726
Debug.
Assert
(keys.Length >= Array.IntrosortSizeThreshold);
727
Debug.
Assert
(comparer != null);
764
Debug.
Assert
(comparer != null);
765
Debug.
Assert
(!keys.IsEmpty);
782
Debug.
Assert
(comparer != null);
809
Debug.
Assert
(comparer != null);
879
Debug.
Assert
(i != j);
897
Debug.
Assert
(i != j);
910
Debug.
Assert
(!keys.IsEmpty);
911
Debug.
Assert
(values.Length == keys.Length);
912
Debug.
Assert
(depthLimit >= 0);
955
Debug.
Assert
(keys.Length >= Array.IntrosortSizeThreshold);
1000
Debug.
Assert
(!keys.IsEmpty);
1114
Debug.
Assert
(typeof(TKey) == typeof(double) || typeof(TKey) == typeof(float));
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (20)
129
Debug.
Assert
(source._entries is not null);
130
Debug.
Assert
(_entries is not null);
131
Debug.
Assert
(_entries.Length >= source.Count);
132
Debug.
Assert
(_count == 0);
244
Debug.
Assert
(modified);
251
Debug.
Assert
(modified); // If there was an existing key and the Add failed, an exception will already have been thrown.
444
Debug.
Assert
(comparer is not null);
519
Debug.
Assert
(_buckets != null);
525
Debug.
Assert
(comparer is not null || typeof(TKey).IsValueType);
567
Debug.
Assert
(comparer is not null);
660
Debug.
Assert
(dictionary._buckets != null);
666
Debug.
Assert
(comparer is not null || typeof(TKey).IsValueType);
699
Debug.
Assert
(comparer is not null);
826
Debug.
Assert
(!forceNewHashCodes || !typeof(TKey).IsValueType);
828
Debug.
Assert
(newSize >= _entries.Length);
837
Debug.
Assert
(_comparer is NonRandomizedStringEqualityComparer);
884
Debug.
Assert
(typeof(TKey).IsValueType || comparer is not null);
957
Debug.
Assert
(typeof(TKey).IsValueType || comparer is not null);
1178
Debug.
Assert
(oldEntries is not null);
1185
Debug.
Assert
(_entries is not null);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (9)
184
Debug.
Assert
(Count == source.Count);
252
Debug.
Assert
(comparer is not null);
300
Debug.
Assert
(typeof(T).IsValueType || comparer is not null);
966
Debug.
Assert
(!forceNewHashCodes || !typeof(T).IsValueType);
968
Debug.
Assert
(newSize >= _entries.Length);
977
Debug.
Assert
(_comparer is NonRandomizedStringEqualityComparer);
1094
Debug.
Assert
(_buckets != null);
1133
Debug.
Assert
(comparer is not null);
1194
Debug.
Assert
(location >= 0);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (3)
216
Debug.
Assert
(_size == _items.Length);
466
Debug.
Assert
(insertionCount > 0);
490
Debug.
Assert
(_items.Length < capacity);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\NonRandomizedStringEqualityComparer.cs (1)
30
Debug.
Assert
(underlyingComparer != null);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (4)
312
Debug.
Assert
(capacity >= _size);
349
Debug.
Assert
(_size == 0);
397
Debug.
Assert
(_array.Length < capacity);
495
Debug.
Assert
(_index == -1 || _index == -2);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (5)
28
Debug.
Assert
(value >= 0);
29
Debug.
Assert
(value <= _span.Length);
38
Debug.
Assert
(index < _pos);
106
Debug.
Assert
(length >= 0);
134
Debug.
Assert
(_pos == _span.Length);
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
103
Debug.
Assert
(divisor <= int.MaxValue);
109
Debug.
Assert
(highbits == value % divisor);
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (6)
536
Debug.
Assert
(array != null);
537
Debug.
Assert
(array.Rank == 1);
555
Debug.
Assert
(array != null);
556
Debug.
Assert
(array.Rank == 1);
607
Debug.
Assert
(array != null);
608
Debug.
Assert
(array.Rank == 1);
src\libraries\System.Private.CoreLib\src\System\ComAwareWeakReference.cs (5)
64
Debug.
Assert
(pComWeakRef != IntPtr.Zero);
80
Debug.
Assert
(weakHandle != 0);
152
Debug.
Assert
((taggedHandle & ComAwareBit) != 0);
158
Debug.
Assert
((taggedHandle & ComAwareBit) != 0);
175
Debug.
Assert
((taggedHandle & ComAwareBit) == 0);
src\libraries\System.Private.CoreLib\src\System\Convert.Base64.cs (1)
153
Debug.
Assert
((consumed % 4) == 0);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (15)
2422
Debug.
Assert
(converted == charLengthRequired);
2461
Debug.
Assert
(converted == charLengthRequired);
2477
Debug.
Assert
(bytes.Length >= Base64VectorizationLengthThreshold);
2478
Debug.
Assert
(chars.Length >= charLengthRequired);
2479
Debug.
Assert
(charLengthRequired % 4 == 0);
2483
Debug.
Assert
(status == OperationStatus.Done && charLengthRequired == bytesWritten);
2543
Debug.
Assert
(Unsafe.AreSame(ref srcBeginning, ref src));
2688
Debug.
Assert
(chars.Length != 0); // If TryDecodeFromUtf16() consumed the entire buffer, it could not have returned false.
2717
Debug.
Assert
(chars.Length != 0 && !chars[0].IsSpace());
2765
Debug.
Assert
(tempBuffer.Length != 0); // We only bound-check after writing a character to the tempBuffer.
2828
Debug.
Assert
(0 <= inputLength);
2843
Debug.
Assert
(0 <= resultLength);
2873
Debug.
Assert
(0 <= inputLength);
2896
Debug.
Assert
(0 <= usefulInputLength);
2900
Debug.
Assert
(0 <= padding);
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (5)
38
Debug.
Assert
((uint)dayNumber <= MaxDayNumber);
692
Debug.
Assert
(result != ParseFailureKind.None);
699
Debug.
Assert
(result == ParseFailureKind.Format_DateTimeOnlyContainsNoneDateParts);
758
Debug.
Assert
(charsWritten == destination.Length);
765
Debug.
Assert
(charsWritten == destination.Length);
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
673
Debug.
Assert
(newTicks <= MaxTicks);
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (1)
344
Debug.
Assert
(new DateTimeOffset(utcNow) == result); // ensure lack of verification does not break anything
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
382
Debug.
Assert
((exponent >= 67) && (exponent <= 95));
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (19)
324
Debug.
Assert
(den > bufNum.High64);
408
Debug.
Assert
(bufDen.U2 > bufNum.U3);
512
Debug.
Assert
(hiRes < Buf24.Length);
640
Debug.
Assert
(cur + 1 < Buf24.Length);
710
Debug.
Assert
(bufQuo.U2 == 0);
978
Debug.
Assert
(cur < Buf24.Length);
990
Debug.
Assert
(hiProd + 1 < Buf24.Length);
1026
Debug.
Assert
(cur < Buf24.Length);
1028
Debug.
Assert
(hiProd < Buf24.Length);
1053
Debug.
Assert
(cur < Buf24.Length);
1552
Debug.
Assert
(dbl < 1E7);
1557
Debug.
Assert
(dbl >= 1E6);
1716
Debug.
Assert
(dbl < 1E15);
1721
Debug.
Assert
(dbl >= 1E14);
1761
Debug.
Assert
(power <= 14);
2228
Debug.
Assert
(d2.High == 0);
2229
Debug.
Assert
(scale == 0);
2286
Debug.
Assert
(high + 1 < Buf28.Length);
2448
Debug.
Assert
(mode == MidpointRounding.ToPositiveInfinity);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\ContractFailedEventArgs.cs (1)
19
Debug.
Assert
(originalException == null || failureKind == ContractFailureKind.PostconditionOnException);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (3)
371
Debug.
Assert
(mb != null);
411
Debug.
Assert
(method != null);
412
Debug.
Assert
(method.DeclaringType != null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Stopwatch.cs (2)
122
Debug.
Assert
(IsHighResolution);
158
Debug.
Assert
(IsHighResolution);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ActivityTracker.cs (4)
61
Debug.
Assert
((options & EventActivityOptions.Disable) == 0);
181
Debug.
Assert
(orphan.m_stopped != 0);
505
Debug.
Assert
(value < 16);
506
Debug.
Assert
(ptr < endPtr);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (9)
50
Debug.
Assert
(e.Command == EventCommand.Enable || e.Command == EventCommand.Disable);
56
Debug.
Assert
(e.Arguments != null);
78
Debug.
Assert
(e.Command == EventCommand.Disable);
95
Debug.
Assert
((s_counterGroupEnabledList == null && !_eventSource.IsEnabled())
113
Debug.
Assert
(Monitor.IsEntered(s_counterGroupLock));
132
Debug.
Assert
(s_counterGroups != null);
153
Debug.
Assert
(pollingIntervalInSeconds > 0);
154
Debug.
Assert
(Monitor.IsEntered(s_counterGroupLock));
189
Debug.
Assert
(Monitor.IsEntered(s_counterGroupLock));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\DiagnosticCounter.cs (6)
44
Debug.
Assert
(_group is null);
45
Debug.
Assert
(Name != null);
46
Debug.
Assert
(EventSource != null);
119
Debug.
Assert
(Monitor.IsEntered(this));
129
Debug.
Assert
(_metadata.Count > 0);
131
Debug.
Assert
(gotOne);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventCounter.cs (2)
82
Debug.
Assert
(Monitor.IsEntered(this));
176
Debug.
Assert
(Monitor.IsEntered(this));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (8)
68
Debug.
Assert
(Monitor.IsEntered(m_dispatchControlLock));
125
Debug.
Assert
(Volatile.Read(ref m_sessionID) == 0);
134
Debug.
Assert
(Monitor.IsEntered(m_dispatchControlLock));
135
Debug.
Assert
(sessionID != 0);
144
Debug.
Assert
(Monitor.IsEntered(m_dispatchControlLock));
152
Debug.
Assert
(sessionID != 0);
160
Debug.
Assert
(sessionID != 0);
218
Debug.
Assert
((syncTimeUtc.Ticks != 0) && (syncTimeQPC != 0) && (timeQPCFrequency != 0));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (2)
75
Debug.
Assert
(!_gcHandle.IsAllocated);
125
Debug.
Assert
(userDataCount >= 0);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (10)
177
Debug.
Assert
(offset == v1MetadataLength);
207
Debug.
Assert
(totalMetadataLength == offset);
225
Debug.
Assert
(bufferLength >= (offset + srcLength));
235
Debug.
Assert
(bufferLength >= (offset + sizeof(T)));
311
Debug.
Assert
(property != null);
312
Debug.
Assert
(pMetadataBlob != null);
385
Debug.
Assert
(pMetadataBlob != null);
405
Debug.
Assert
(typeInfo != null);
406
Debug.
Assert
(pMetadataBlob != null);
612
Debug.
Assert
(property != null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (3)
170
Debug.
Assert
(!Monitor.IsEntered(EventListener.EventListenersLock));
698
Debug.
Assert
((EventOpcode)eventDescriptor.Opcode == EventOpcode.Send ||
1376
Debug.
Assert
(filterData != null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (62)
408
Debug.
Assert
(EventListener.s_EventSources != null);
715
Debug.
Assert
(m_eventData != null);
716
Debug.
Assert
(m_eventPipeProvider != null);
743
Debug.
Assert
(eventHandle != IntPtr.Zero);
1308
Debug.
Assert
(m_eventData != null); // You must have initialized this if you enabled the source.
1473
Debug.
Assert
(!Monitor.IsEntered(EventListener.EventListenersLock));
1645
Debug.
Assert
(!m_eventSourceEnabled); // We can't be enabled until we are completely initted.
1716
Debug.
Assert
(data->Size == 4);
1728
Debug.
Assert
(dataType.IsEnum);
1748
Debug.
Assert
(*(int*)dataPointer == (data + 1)->Size);
1763
Debug.
Assert
(!dataType.IsEnum);
1766
Debug.
Assert
(size == 1);
1771
Debug.
Assert
(size == 1);
1776
Debug.
Assert
(size == 2);
1781
Debug.
Assert
(size == 2);
1786
Debug.
Assert
(size == 2);
1823
Debug.
Assert
(size == 16);
1828
Debug.
Assert
(size == 16);
1904
Debug.
Assert
(m_eventData != null); // You must have initialized this if you enabled the source.
2012
Debug.
Assert
(m_eventData != null);
2031
Debug.
Assert
(m_eventData != null);
2060
Debug.
Assert
(m_eventData != null);
2090
Debug.
Assert
(data->Size == 4);
2111
Debug.
Assert
(dispatcher.m_EventEnabled != null);
2289
Debug.
Assert
(m_eventData != null);
2585
Debug.
Assert
(m_completelyInited);
2599
Debug.
Assert
(m_eventData != null);
2657
Debug.
Assert
(commandArgs.perEventSourceSessionId >= -1 && commandArgs.perEventSourceSessionId <= SessionMask.MAX);
2675
Debug.
Assert
(m_eventData != null);
2691
Debug.
Assert
(dispatcher.m_EventEnabled != null);
2751
Debug.
Assert
(m_eventData != null);
2768
Debug.
Assert
(dispatcher.m_EventEnabled != null);
2783
Debug.
Assert
(m_eventData != null);
2799
Debug.
Assert
(Monitor.IsEntered(EventListener.EventListenersLock));
2803
Debug.
Assert
(m_rawManifest == null);
2805
Debug.
Assert
(m_eventData != null);
2846
Debug.
Assert
(!SelfDescribingEvents);
2950
Debug.
Assert
(attributeType == typeof(EventAttribute) || attributeType == typeof(EventSourceAttribute));
2965
Debug.
Assert
(data.ConstructorArguments.Count <= 1);
3254
Debug.
Assert
(0 <= startEventId); // Since we reserve id 0, we know that id-1 is <= 0
3293
Debug.
Assert
(eventData != null);
3327
Debug.
Assert
(eventData != null);
3551
Debug.
Assert
(eventAttribute.Task != EventTask.None || eventAttribute.Opcode != EventOpcode.Info);
3798
Debug.
Assert
(((m_config & EventSourceSettings.EtwManifestEventFormat) != 0) !=
4163
Debug.
Assert
(s_EventSources != null);
4222
Debug.
Assert
(EventSource.IsSupported);
4226
Debug.
Assert
(s_EventSources != null);
4238
Debug.
Assert
(!Monitor.IsEntered(EventListenersLock));
4285
Debug.
Assert
(Monitor.IsEntered(EventListenersLock));
4287
Debug.
Assert
(s_EventSources != null);
4361
Debug.
Assert
(s_EventSources != null);
4433
Debug.
Assert
(s_EventSources != null);
5022
Debug.
Assert
(perEventSourceSessionId < MAX);
5040
Debug.
Assert
(perEventSourceSessionId < MAX);
5045
Debug.
Assert
(perEventSourceSessionId < MAX);
5272
Debug.
Assert
(channel >= EventChannel.Admin && channel <= EventChannel.Debug);
5314
Debug.
Assert
(numParams == 0);
5315
Debug.
Assert
(this.eventName == null);
5393
Debug.
Assert
(eventName != null);
5512
Debug.
Assert
(channelInfo.Name != null);
5545
Debug.
Assert
(localEnumType.IsEnum);
5773
Debug.
Assert
(info!.Attribs != null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\NativeRuntimeEventSource.Threading.NativeSinks.cs (5)
91
Debug.
Assert
(IsEnabled(EventLevel.Informational, Keywords.ContentionKeyword));
112
Debug.
Assert
(IsEnabled(EventLevel.Informational, Keywords.ContentionKeyword));
131
Debug.
Assert
(IsEnabled(EventLevel.Informational, Keywords.ContentionKeyword));
361
Debug.
Assert
(IsEnabled(EventLevel.Verbose, Keywords.WaitHandleKeyword));
375
Debug.
Assert
(IsEnabled(EventLevel.Verbose, Keywords.WaitHandleKeyword));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSource.cs (1)
64
Debug.
Assert
(s_RuntimeEventSource == null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (6)
98
Debug.
Assert
(buffer != null);
133
Debug.
Assert
(buffer != null);
172
Debug.
Assert
(buffer != null);
213
Debug.
Assert
(value != null && buffer != null);
238
Debug.
Assert
(buffer != null);
271
Debug.
Assert
(buffer != null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
19
Debug.
Assert
(payloadNames.Length == payloadValues.Length);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\FieldMetadata.cs (1)
214
Debug.
Assert
(custom != null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleEventTypes.cs (1)
33
Debug.
Assert
(instance != null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (1)
319
Debug.
Assert
(typeArgs.Length == 1);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (1)
41
Debug.
Assert
(Monitor.IsEntered(this));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (4)
420
Debug.
Assert
(eventHandle != IntPtr.Zero);
530
Debug.
Assert
(eventHandle != IntPtr.Zero);
598
Debug.
Assert
(eventHandle != IntPtr.Zero);
790
Debug.
Assert
(ProviderMetadata.SequenceEqual(m_providerMetadata));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\XplatEventLogger.cs (1)
151
Debug.
Assert
(byteArray != null);
src\libraries\System.Private.CoreLib\src\System\Double.cs (7)
295
Debug.
Assert
(IsNaN(value));
1602
Debug.
Assert
(ax >= ay);
1690
Debug.
Assert
(n == 0);
1729
Debug.
Assert
(IsPositiveInfinity(x));
1734
Debug.
Assert
(IsNegativeInfinity(x));
1774
Debug.
Assert
(IsPositiveInfinity(x));
1779
Debug.
Assert
(IsNegativeInfinity(x));
src\libraries\System.Private.CoreLib\src\System\Enum.cs (21)
260
Debug.
Assert
(enumType.IsActualEnum);
343
Debug.
Assert
(enumType.IsActualEnum);
373
Debug.
Assert
(enumType.IsActualEnum);
586
Debug.
Assert
(success && result is not null);
606
Debug.
Assert
(success && result is not null);
648
Debug.
Assert
(success);
665
Debug.
Assert
(success);
1547
Debug.
Assert
(success);
1548
Debug.
Assert
(charsWritten == Unsafe.SizeOf<TStorage>() * 2);
1807
Debug.
Assert
(typeof(TEnum).IsEnum);
1808
Debug.
Assert
(value is not null);
1935
Debug.
Assert
(names.Length == values.Length);
1966
Debug.
Assert
(!isDestinationTooSmall);
1970
Debug.
Assert
(names.Length == values.Length);
2300
Debug.
Assert
(
2315
if (typeof(TUnderlying) == typeof(sbyte)) Debug.
Assert
(typeof(TStorage) == typeof(byte));
2316
else if (typeof(TUnderlying) == typeof(short)) Debug.
Assert
(typeof(TStorage) == typeof(ushort));
2317
else if (typeof(TUnderlying) == typeof(int)) Debug.
Assert
(typeof(TStorage) == typeof(uint));
2318
else if (typeof(TUnderlying) == typeof(long)) Debug.
Assert
(typeof(TStorage) == typeof(ulong));
2319
else if (typeof(TUnderlying) == typeof(nint)) Debug.
Assert
(typeof(TStorage) == typeof(nuint));
2320
else Debug.
Assert
(typeof(TUnderlying) == typeof(TStorage));
src\libraries\System.Private.CoreLib\src\System\Enum.EnumInfo.cs (1)
40
Debug.
Assert
(sizeof(TStorage) == sizeof(TResult));
src\libraries\System.Private.CoreLib\src\System\Environment.cs (4)
148
Debug.
Assert
(processId != 0);
174
Debug.
Assert
(processPath != null);
197
Debug.
Assert
(osVersion != null);
226
Debug.
Assert
(target != EnvironmentVariableTarget.Process);
src\libraries\System.Private.CoreLib\src\System\Environment.GetFolderPathCore.Unix.cs (2)
24
Debug.
Assert
(path != null);
42
Debug.
Assert
(option == SpecialFolderOption.Create);
src\libraries\System.Private.CoreLib\src\System\Environment.Variables.Windows.cs (1)
130
Debug.
Assert
(success != Interop.BOOL.FALSE);
src\libraries\System.Private.CoreLib\src\System\Exception.cs (1)
175
Debug.
Assert
(resultSpan.Length == 0);
src\libraries\System.Private.CoreLib\src\System\Gen2GcCallback.cs (2)
70
Debug.
Assert
(_callback1 != null);
92
Debug.
Assert
(_callback0 != null);
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.cs (1)
104
Debug.
Assert
(!GlobalizationMode.Invariant);
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Icu.cs (9)
37
Debug.
Assert
(!GlobalizationMode.UseNls);
61
Debug.
Assert
(this.saMonthNames != null);
64
Debug.
Assert
(calendarId == CalendarId.HEBREW && saMonthNames.Length == 13);
88
Debug.
Assert
(!GlobalizationMode.Invariant);
89
Debug.
Assert
(!GlobalizationMode.UseNls);
114
Debug.
Assert
(!GlobalizationMode.UseNls);
122
Debug.
Assert
(!GlobalizationMode.Invariant);
222
Debug.
Assert
(index + 3 < modifiedPattern.Length);
387
Debug.
Assert
(calendarId == CalendarId.HEBREW && callbackContext.Results.Count == 14);
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Nls.cs (3)
17
Debug.
Assert
(!GlobalizationMode.Invariant);
18
Debug.
Assert
(GlobalizationMode.UseNls);
74
Debug.
Assert
(context->strings != null);
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Unix.cs (1)
31
Debug.
Assert
(!GlobalizationMode.UseNls);
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendricalCalculationsHelper.cs (7)
147
Debug.
Assert
(gregorianYear < 1620 || 2020 <= gregorianYear);
156
Debug.
Assert
(1988 <= gregorianYear && gregorianYear <= 2019);
162
Debug.
Assert
(1900 <= gregorianYear && gregorianYear <= 1987);
169
Debug.
Assert
(1800 <= gregorianYear && gregorianYear <= 1899);
176
Debug.
Assert
(1700 <= gregorianYear && gregorianYear <= 1799);
183
Debug.
Assert
(1620 <= gregorianYear && gregorianYear <= 1699);
389
Debug.
Assert
(day != upperBoundNewYearDay);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (2)
395
Debug.
Assert
(offset2 > (string2 == null ? 0 : string2.Length) - length2);
1058
Debug.
Assert
(matchLengthPtr != null);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (41)
39
Debug.
Assert
(!GlobalizationMode.UseNls);
40
Debug.
Assert
(interopCultureName != null);
52
Debug.
Assert
(!GlobalizationMode.Invariant);
53
Debug.
Assert
(!GlobalizationMode.UseNls);
54
Debug.
Assert
((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
68
Debug.
Assert
(!GlobalizationMode.Invariant);
69
Debug.
Assert
(!GlobalizationMode.UseNls);
70
Debug.
Assert
(target.Length != 0);
106
Debug.
Assert
(!GlobalizationMode.Invariant);
109
Debug.
Assert
(_isAsciiEqualityOrdinal && CanUseAsciiOrdinalForOptions(options));
222
Debug.
Assert
(!GlobalizationMode.Invariant);
225
Debug.
Assert
(_isAsciiEqualityOrdinal && CanUseAsciiOrdinalForOptions(options));
328
Debug.
Assert
(!GlobalizationMode.Invariant);
329
Debug.
Assert
(!GlobalizationMode.UseNls);
332
Debug.
Assert
((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
357
Debug.
Assert
(!GlobalizationMode.Invariant);
360
Debug.
Assert
(_isAsciiEqualityOrdinal && CanUseAsciiOrdinalForOptions(options));
439
Debug.
Assert
(!GlobalizationMode.Invariant);
442
Debug.
Assert
(_isAsciiEqualityOrdinal && CanUseAsciiOrdinalForOptions(options));
512
Debug.
Assert
(!GlobalizationMode.Invariant);
513
Debug.
Assert
(!GlobalizationMode.UseNls);
516
Debug.
Assert
((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
541
Debug.
Assert
(!GlobalizationMode.Invariant);
544
Debug.
Assert
(_isAsciiEqualityOrdinal && CanUseAsciiOrdinalForOptions(options));
624
Debug.
Assert
(!GlobalizationMode.Invariant);
627
Debug.
Assert
(_isAsciiEqualityOrdinal && CanUseAsciiOrdinalForOptions(options));
698
Debug.
Assert
(!GlobalizationMode.Invariant);
699
Debug.
Assert
(!GlobalizationMode.UseNls);
758
Debug.
Assert
(!GlobalizationMode.Invariant);
759
Debug.
Assert
(!GlobalizationMode.UseNls);
760
Debug.
Assert
((options & ValidCompareMaskOffFlags) == 0);
809
Debug.
Assert
(!GlobalizationMode.Invariant);
810
Debug.
Assert
(!GlobalizationMode.UseNls);
811
Debug.
Assert
((options & ValidCompareMaskOffFlags) == 0);
841
Debug.
Assert
(!GlobalizationMode.Invariant);
842
Debug.
Assert
(!GlobalizationMode.UseNls);
866
Debug.
Assert
(!GlobalizationMode.Invariant);
867
Debug.
Assert
(!GlobalizationMode.UseNls);
868
Debug.
Assert
((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
972
Debug.
Assert
(!GlobalizationMode.Invariant);
973
Debug.
Assert
(!GlobalizationMode.UseNls);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Invariant.cs (6)
46
Debug.
Assert
(sortKey.Length >= source.Length * sizeof(char));
58
Debug.
Assert
(sortKey.Length >= source.Length * sizeof(char));
85
Debug.
Assert
(GlobalizationMode.Invariant);
86
Debug.
Assert
((options & ValidCompareMaskOffFlags) == 0);
111
Debug.
Assert
(GlobalizationMode.Invariant);
112
Debug.
Assert
((options & ValidCompareMaskOffFlags) == 0);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (55)
14
Debug.
Assert
(GlobalizationMode.UseNls);
50
Debug.
Assert
(!GlobalizationMode.Invariant);
57
Debug.
Assert
(pSource != null);
58
Debug.
Assert
(pValue != null);
68
Debug.
Assert
(ret >= -1 && ret <= source.Length);
71
Debug.
Assert
(ret >= 0 || Marshal.GetLastPInvokeError() == Interop.Errors.ERROR_SUCCESS);
79
Debug.
Assert
(!GlobalizationMode.Invariant);
80
Debug.
Assert
(GlobalizationMode.UseNls);
82
Debug.
Assert
(source.Length != 0);
83
Debug.
Assert
(value.Length != 0);
91
Debug.
Assert
(!GlobalizationMode.Invariant);
92
Debug.
Assert
(GlobalizationMode.UseNls);
94
Debug.
Assert
(source != null);
95
Debug.
Assert
(value != null);
108
Debug.
Assert
(!GlobalizationMode.Invariant);
109
Debug.
Assert
(GlobalizationMode.UseNls);
110
Debug.
Assert
((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
186
Debug.
Assert
(!GlobalizationMode.Invariant);
187
Debug.
Assert
(GlobalizationMode.UseNls);
189
Debug.
Assert
(count1 > 0);
190
Debug.
Assert
(count2 > 0);
195
Debug.
Assert
(char1 != null);
196
Debug.
Assert
(char2 != null);
210
Debug.
Assert
(!GlobalizationMode.Invariant);
211
Debug.
Assert
(GlobalizationMode.UseNls);
212
Debug.
Assert
((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
234
Debug.
Assert
(*pString1 >= 0); // assert that we can always dereference this
235
Debug.
Assert
(*pString2 >= 0); // assert that we can always dereference this
264
Debug.
Assert
(!GlobalizationMode.Invariant);
286
Debug.
Assert
(pSource != null && pValue != null);
300
Debug.
Assert
(result >= -1 && result <= lpStringSource.Length);
303
Debug.
Assert
(result >= 0 || Marshal.GetLastPInvokeError() == Interop.Errors.ERROR_SUCCESS);
311
Debug.
Assert
(!GlobalizationMode.Invariant);
312
Debug.
Assert
(GlobalizationMode.UseNls);
314
Debug.
Assert
(target.Length != 0);
322
Debug.
Assert
(!GlobalizationMode.Invariant);
323
Debug.
Assert
(GlobalizationMode.UseNls);
326
Debug.
Assert
((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
343
Debug.
Assert
(!GlobalizationMode.Invariant);
344
Debug.
Assert
(GlobalizationMode.UseNls);
347
Debug.
Assert
((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
373
Debug.
Assert
(!GlobalizationMode.Invariant);
374
Debug.
Assert
(GlobalizationMode.UseNls);
425
Debug.
Assert
(!GlobalizationMode.Invariant);
426
Debug.
Assert
((options & ValidCompareMaskOffFlags) == 0);
467
Debug.
Assert
(pSource != null);
468
Debug.
Assert
(pSortKey != null);
519
Debug.
Assert
(actualSortKeyLength <= destination.Length);
525
Debug.
Assert
(!GlobalizationMode.Invariant);
526
Debug.
Assert
((options & ValidCompareMaskOffFlags) == 0);
545
Debug.
Assert
(pSource != null);
568
Debug.
Assert
(!GlobalizationMode.Invariant);
569
Debug.
Assert
(GlobalizationMode.UseNls);
618
Debug.
Assert
(!GlobalizationMode.Invariant);
619
Debug.
Assert
(GlobalizationMode.UseNls);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (4)
2042
Debug.
Assert
(str != null);
2043
Debug.
Assert
(start >= 0);
2044
Debug.
Assert
(end >= 0);
2270
Debug.
Assert
(_sRealName != null);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Icu.cs (23)
34
Debug.
Assert
(name is not null);
35
Debug.
Assert
(name.Length <= ICU_ULOC_FULLNAME_CAPACITY);
104
Debug.
Assert
(_sRealName != null);
105
Debug.
Assert
(!GlobalizationMode.Invariant);
142
Debug.
Assert
(_sWindowsName != null);
203
Debug.
Assert
(!GlobalizationMode.Invariant);
204
Debug.
Assert
(!GlobalizationMode.UseNls);
219
Debug.
Assert
(!GlobalizationMode.UseNls);
243
Debug.
Assert
(!GlobalizationMode.UseNls);
268
Debug.
Assert
(!GlobalizationMode.UseNls);
291
Debug.
Assert
(!GlobalizationMode.UseNls);
325
Debug.
Assert
(!GlobalizationMode.UseNls);
340
Debug.
Assert
(icuFormatString.Length < ICU_ULOC_FULLNAME_CAPACITY);
394
Debug.
Assert
(!GlobalizationMode.Invariant);
395
Debug.
Assert
(!GlobalizationMode.UseNls);
403
Debug.
Assert
(!GlobalizationMode.UseNls);
413
Debug.
Assert
(!GlobalizationMode.UseNls);
420
Debug.
Assert
(!GlobalizationMode.UseNls);
421
Debug.
Assert
(cultureName != null);
454
Debug.
Assert
(!GlobalizationMode.UseNls);
460
Debug.
Assert
(!GlobalizationMode.Invariant);
461
Debug.
Assert
(!GlobalizationMode.UseNls);
535
Debug.
Assert
(!GlobalizationMode.UseNls);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Nls.cs (19)
44
Debug.
Assert
(!GlobalizationMode.Invariant);
51
Debug.
Assert
(ShouldUseUserOverrideNlsData);
60
Debug.
Assert
(ShouldUseUserOverrideNlsData);
68
Debug.
Assert
(IsWin32Installed);
85
Debug.
Assert
(ShouldUseUserOverrideNlsData);
92
Debug.
Assert
(GlobalizationMode.UseNls);
98
Debug.
Assert
(ShouldUseUserOverrideNlsData);
105
Debug.
Assert
(ShouldUseUserOverrideNlsData);
118
Debug.
Assert
(!GlobalizationMode.Invariant);
119
Debug.
Assert
(GlobalizationMode.UseNls);
120
Debug.
Assert
(regionName != null);
142
Debug.
Assert
(GlobalizationMode.UseNls);
162
Debug.
Assert
(GlobalizationMode.UseNls);
449
Debug.
Assert
(!GlobalizationMode.Invariant);
456
Debug.
Assert
(GlobalizationMode.UseNls);
462
Debug.
Assert
(!GlobalizationMode.Invariant);
463
Debug.
Assert
(GlobalizationMode.UseNls);
513
Debug.
Assert
(GlobalizationMode.UseNls);
521
Debug.
Assert
(GlobalizationMode.UseNls);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Unix.cs (1)
17
Debug.
Assert
(!GlobalizationMode.Invariant);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (3)
181
Debug.
Assert
(cultureData != null);
189
Debug.
Assert
(name != null);
798
Debug.
Assert
(!GlobalizationMode.Invariant);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.Unix.cs (1)
18
Debug.
Assert
(localeName != null);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (19)
167
Debug.
Assert
(minimumLength <= 16);
755
Debug.
Assert
(typeof(TChar) == typeof(byte));
770
Debug.
Assert
(typeof(TChar) == typeof(byte));
782
Debug.
Assert
(charCount != 0);
841
Debug.
Assert
(tokenLen >= 3);
934
Debug.
Assert
(charsWritten == FormatSLength);
941
Debug.
Assert
(charsWritten == FormatInvariantGMinLength);
960
Debug.
Assert
(charsWritten == FormatInvariantGMaxLength);
979
Debug.
Assert
(charsWritten is >= FormatOMinLength and <= FormatOMaxLength);
986
Debug.
Assert
(charsWritten == str.Length);
993
Debug.
Assert
(charsWritten == str.Length);
1000
Debug.
Assert
(charsWritten == str.Length);
1034
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1405
Debug.
Assert
((uint)dayOfWeek < 7);
1407
Debug.
Assert
(dayAbbrev.Length == 3);
1410
Debug.
Assert
(monthAbbrev.Length == 3);
1615
Debug.
Assert
(dayAbbrev.Length == 3);
1618
Debug.
Assert
(monthAbbrev.Length == 3);
1718
Debug.
Assert
(dtfi != null);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (11)
243
Debug.
Assert
(cultureData != null);
244
Debug.
Assert
(cal != null);
254
Debug.
Assert
(cultureData != null);
359
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
608
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
811
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
993
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1038
Debug.
Assert
(values.Length >= length);
1263
Debug.
Assert
(patterns1 != null);
1264
Debug.
Assert
(patterns2 != null);
1732
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (1)
3182
Debug.
Assert
(maxDigitLen <= DateTimeFormat.MaxSecondsFractionDigits);
src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewNumber.cs (2)
213
Debug.
Assert
(typeof(TChar) == typeof(byte));
399
Debug.
Assert
(s_numberPassingState.Length == HebrewTokenCount * ((int)HS.S9_DQ + 1));
src\libraries\System.Private.CoreLib\src\System\Globalization\IcuLocaleData.cs (3)
3779
Debug.
Assert
(CulturesCount == (ThreeLetterWindowsLanguageName.Length / 3));
3815
Debug.
Assert
(ch <= 'z');
3821
Debug.
Assert
(CulturesCount * 2 == LocalesNamesIndexes.Length);
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (1)
157
Debug.
Assert
(inputLength > 0);
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (9)
12
Debug.
Assert
(!GlobalizationMode.Invariant);
13
Debug.
Assert
(!GlobalizationMode.UseNls);
14
Debug.
Assert
(unicodeString != null && unicodeString.Length >= count);
56
Debug.
Assert
(!GlobalizationMode.Invariant);
57
Debug.
Assert
(!GlobalizationMode.UseNls);
58
Debug.
Assert
(asciiString != null && asciiString.Length >= count);
81
Debug.
Assert
(!GlobalizationMode.Invariant);
82
Debug.
Assert
(!GlobalizationMode.UseNls);
83
Debug.
Assert
(asciiString != null && asciiString.Length >= count);
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Nls.cs (14)
14
Debug.
Assert
(!GlobalizationMode.Invariant);
15
Debug.
Assert
(GlobalizationMode.UseNls);
16
Debug.
Assert
(unicodeString != null && unicodeString.Length >= count);
46
Debug.
Assert
(!GlobalizationMode.Invariant);
47
Debug.
Assert
(GlobalizationMode.UseNls);
48
Debug.
Assert
(unicodeString != null && unicodeString.Length >= count);
55
Debug.
Assert
(length == outputLength);
61
Debug.
Assert
(!GlobalizationMode.Invariant);
62
Debug.
Assert
(GlobalizationMode.UseNls);
63
Debug.
Assert
(asciiString != null && asciiString.Length >= count);
93
Debug.
Assert
(!GlobalizationMode.Invariant);
94
Debug.
Assert
(GlobalizationMode.UseNls);
95
Debug.
Assert
(asciiString != null && asciiString.Length >= count);
102
Debug.
Assert
(length == outputLength);
src\libraries\System.Private.CoreLib\src\System\Globalization\InvariantModeCasing.cs (13)
113
Debug.
Assert
(GlobalizationMode.Invariant);
114
Debug.
Assert
(source.Length <= destination.Length);
139
Debug.
Assert
(GlobalizationMode.Invariant);
140
Debug.
Assert
(source.Length <= destination.Length);
183
Debug.
Assert
(GlobalizationMode.Invariant);
199
Debug.
Assert
(codePointLengthA == codePointLengthB);
211
Debug.
Assert
(codePointLengthA == codePointLengthB);
226
Debug.
Assert
(value.Length > 0);
227
Debug.
Assert
(value.Length <= source.Length);
228
Debug.
Assert
(GlobalizationMode.Invariant);
288
Debug.
Assert
(value.Length > 0);
289
Debug.
Assert
(value.Length <= source.Length);
290
Debug.
Assert
(GlobalizationMode.Invariant);
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.Icu.cs (3)
20
Debug.
Assert
(!GlobalizationMode.UseNls);
114
Debug.
Assert
(abbrevEnglishEraNames == s_abbreviatedEnglishEraNames || eras.Count <= abbrevEnglishEraNames.Length);
141
Debug.
Assert
(!GlobalizationMode.Invariant);
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (6)
15
Debug.
Assert
(!GlobalizationMode.Invariant);
16
Debug.
Assert
(!GlobalizationMode.UseNls);
43
Debug.
Assert
(!GlobalizationMode.Invariant);
44
Debug.
Assert
(!GlobalizationMode.UseNls);
86
Debug.
Assert
(realLen > StackallocThreshold);
115
Debug.
Assert
(strInput != null);
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Nls.cs (7)
15
Debug.
Assert
(!GlobalizationMode.Invariant);
16
Debug.
Assert
(GlobalizationMode.UseNls);
17
Debug.
Assert
(strInput != null);
58
Debug.
Assert
(!GlobalizationMode.Invariant);
59
Debug.
Assert
(GlobalizationMode.UseNls);
60
Debug.
Assert
(strInput != null);
108
Debug.
Assert
(realLength > StackallocThreshold);
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (14)
270
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
362
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
384
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
430
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
515
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
538
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
574
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
595
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
632
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
655
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
691
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
712
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
733
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
755
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (5)
84
Debug.
Assert
(length >= TVector.Count);
248
Debug.
Assert
(length == 1);
272
Debug.
Assert
(length == 0);
465
Debug.
Assert
(offset + ch1ch2Distance + Vector256<ushort>.Count <= source.Length);
531
Debug.
Assert
(offset + ch1ch2Distance + Vector128<ushort>.Count <= source.Length);
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (10)
107
Debug.
Assert
(lengthA >= Vector128<byte>.Count);
108
Debug.
Assert
(lengthB >= Vector128<byte>.Count);
109
Debug.
Assert
(Vector128.IsHardwareAccelerated);
275
Debug.
Assert
(length == 1);
302
Debug.
Assert
(length == 0);
417
Debug.
Assert
(sourceLength >= Vector128<byte>.Count);
418
Debug.
Assert
(prefixLength >= Vector128<byte>.Count);
419
Debug.
Assert
(Vector128.IsHardwareAccelerated);
585
Debug.
Assert
(length == 1);
616
Debug.
Assert
(length == 0);
src\libraries\System.Private.CoreLib\src\System\Globalization\OrdinalCasing.Icu.cs (15)
158
Debug.
Assert
(!GlobalizationMode.Invariant);
159
Debug.
Assert
(!GlobalizationMode.UseNls);
188
Debug.
Assert
(!GlobalizationMode.Invariant);
189
Debug.
Assert
(!GlobalizationMode.UseNls);
260
Debug.
Assert
(lowSurrogateA != '\0');
261
Debug.
Assert
(lowSurrogateB != '\0');
290
Debug.
Assert
(value.Length > 0);
291
Debug.
Assert
(value.Length <= source.Length);
293
Debug.
Assert
(!GlobalizationMode.Invariant);
294
Debug.
Assert
(!GlobalizationMode.UseNls);
354
Debug.
Assert
(value.Length > 0);
355
Debug.
Assert
(value.Length <= source.Length);
357
Debug.
Assert
(!GlobalizationMode.Invariant);
358
Debug.
Assert
(!GlobalizationMode.UseNls);
431
Debug.
Assert
(pageNumber >= 0 && pageNumber < 256);
src\libraries\System.Private.CoreLib\src\System\Globalization\PersianCalendar.cs (13)
126
Debug.
Assert
(ordinalDay <= 366);
138
Debug.
Assert
(1 <= month && month <= 12);
155
Debug.
Assert
(y >= 1);
170
Debug.
Assert
(ordinalDay >= 1);
171
Debug.
Assert
(m >= 1 && m <= 12);
178
Debug.
Assert
(1 <= d);
179
Debug.
Assert
(d <= 31);
205
Debug.
Assert
(year >= 1);
211
Debug.
Assert
(ordinalDay >= 1);
212
Debug.
Assert
(month >= 1 && month <= 12);
215
Debug.
Assert
(1 <= day);
216
Debug.
Assert
(day <= 31);
282
Debug.
Assert
(daysInMonth == 30);
src\libraries\System.Private.CoreLib\src\System\Globalization\SurrogateCasing.cs (8)
15
Debug.
Assert
(char.IsHighSurrogate(h));
16
Debug.
Assert
(char.IsLowSurrogate(l));
20
Debug.
Assert
(char.IsHighSurrogate(hr));
21
Debug.
Assert
(char.IsLowSurrogate(lr));
27
Debug.
Assert
(char.IsHighSurrogate(h));
28
Debug.
Assert
(char.IsLowSurrogate(l));
32
Debug.
Assert
(char.IsHighSurrogate(hr));
33
Debug.
Assert
(char.IsLowSurrogate(lr));
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (10)
186
Debug.
Assert
(!GlobalizationMode.Invariant);
214
Debug.
Assert
(destination.Length >= source.Length);
221
Debug.
Assert
(destination.Length >= source.Length);
228
Debug.
Assert
(!GlobalizationMode.Invariant);
229
Debug.
Assert
(typeof(TConversion) == typeof(ToUpperConversion) || typeof(TConversion) == typeof(ToLowerConversion));
247
Debug.
Assert
(operationStatus == OperationStatus.Done);
261
Debug.
Assert
(typeof(TConversion) == typeof(ToUpperConversion) || typeof(TConversion) == typeof(ToLowerConversion));
264
Debug.
Assert
(!GlobalizationMode.Invariant);
265
Debug.
Assert
(source != null);
476
Debug.
Assert
(_isAsciiCasingSameAsInvariant == Tristate.True || _isAsciiCasingSameAsInvariant == Tristate.False);
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Icu.cs (3)
14
Debug.
Assert
(localeName != null);
21
Debug.
Assert
(!GlobalizationMode.Invariant);
25
Debug.
Assert
(!GlobalizationMode.UseNls);
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Nls.cs (7)
12
Debug.
Assert
(!GlobalizationMode.Invariant);
16
Debug.
Assert
(GlobalizationMode.UseNls);
17
Debug.
Assert
(pSource != null);
18
Debug.
Assert
(pResult != null);
19
Debug.
Assert
(pSourceLen >= 0);
20
Debug.
Assert
(pResultLen >= 0);
21
Debug.
Assert
(pSourceLen <= pResultLen);
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (15)
53
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
111
Debug.
Assert
(format == StandardFormat.C || format == StandardFormat.G || format == StandardFormat.g);
127
Debug.
Assert
(ticks == long.MinValue /* -9223372036854775808 */);
144
Debug.
Assert
(fraction < 10_000_000);
167
Debug.
Assert
(format == StandardFormat.g);
182
Debug.
Assert
(seconds < 60);
190
Debug.
Assert
(minutes < 60);
194
Debug.
Assert
(totalHoursRemaining <= uint.MaxValue);
201
Debug.
Assert
(hours < 24);
216
Debug.
Assert
(dayDigits <= 8);
251
Debug.
Assert
(hourDigits == 1 || hourDigits == 2);
289
Debug.
Assert
(p - dest == requiredOutputLength);
299
Debug.
Assert
(dtfi != null);
522
Debug.
Assert
(field >= 0 && field <= 5);
597
Debug.
Assert
(field == 5);
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanParse.cs (15)
109
Debug.
Assert
(_ttt == TTT.Num);
110
Debug.
Assert
(_num > -1);
146
Debug.
Assert
(_zeroes > 0); // Already validated that in the condition _zeroes == 0 && _num > MaxFraction
155
Debug.
Assert
(totalDigitsCount - MaxFractionDigits <= MaxFractionDigits);
159
Debug.
Assert
(_num < MaxFraction);
187
Debug.
Assert
(pos > -1);
407
Debug.
Assert
(dtfi != null);
540
Debug.
Assert
(argumentName != null);
591
Debug.
Assert
(powersOfTen.Length == MaxFractionDigits + 1);
719
Debug.
Assert
(tokenizer.EOL);
774
Debug.
Assert
(raw._numCount == 5);
844
Debug.
Assert
(raw._numCount == 4);
970
Debug.
Assert
(raw._numCount == 3);
1096
Debug.
Assert
(raw._numCount == 2);
1165
Debug.
Assert
(raw._numCount == 1);
src\libraries\System.Private.CoreLib\src\System\Guid.cs (4)
741
Debug.
Assert
(lookup.Length == 256);
1366
Debug.
Assert
(p == guidChars + charsWritten - ((byte)flags != 0 ? 1 : 0));
1411
Debug.
Assert
(p == guidChars + charsWritten - 1);
1422
Debug.
Assert
((Ssse3.IsSupported || AdvSimd.Arm64.IsSupported) && BitConverter.IsLittleEndian);
src\libraries\System.Private.CoreLib\src\System\Half.cs (2)
465
Debug.
Assert
(IsNaN(other));
1570
Debug.
Assert
(IsSubnormal(x));
src\libraries\System.Private.CoreLib\src\System\HashCode.cs (4)
340
Debug.
Assert
(Unsafe.ByteOffset(ref pos, ref end) >= sizeof(int));
345
Debug.
Assert
(Unsafe.ByteOffset(ref pos, ref end) >= sizeof(int));
350
Debug.
Assert
(Unsafe.ByteOffset(ref pos, ref end) >= sizeof(int));
362
Debug.
Assert
(Unsafe.ByteOffset(ref pos, ref blockEnd) >= (sizeof(int) * 4));
src\libraries\System.Private.CoreLib\src\System\Index.cs (1)
160
Debug.
Assert
(formatted);
src\libraries\System.Private.CoreLib\src\System\Int128.cs (5)
526
Debug.
Assert
(value >= -TwoPow127);
527
Debug.
Assert
(double.IsFinite(value));
528
Debug.
Assert
(value < TwoPow127);
765
Debug.
Assert
((sign == 0) || (sign == -1));
847
Debug.
Assert
((sign == 0) || (sign == -1));
src\libraries\System.Private.CoreLib\src\System\Int16.cs (2)
309
Debug.
Assert
((sign == 0) || (sign == -1));
384
Debug.
Assert
((sign == 0) || (sign == -1));
src\libraries\System.Private.CoreLib\src\System\Int32.cs (2)
323
Debug.
Assert
((sign == 0) || (sign == -1));
405
Debug.
Assert
((sign == 0) || (sign == -1));
src\libraries\System.Private.CoreLib\src\System\Int64.cs (2)
320
Debug.
Assert
((sign == 0) || (sign == -1));
402
Debug.
Assert
((sign == 0) || (sign == -1));
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (2)
331
Debug.
Assert
((sign == 0) || (sign == -1));
413
Debug.
Assert
((sign == 0) || (sign == -1));
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (4)
180
Debug.
Assert
(charsRead > 0);
317
Debug.
Assert
(!_disposed);
359
Debug.
Assert
(_stream is MemoryStream);
463
Debug.
Assert
(_stream is MemoryStream);
src\libraries\System.Private.CoreLib\src\System\IO\BufferedStream.cs (68)
92
Debug.
Assert
(_stream != null);
100
Debug.
Assert
(_stream != null);
108
Debug.
Assert
(_stream != null);
116
Debug.
Assert
(_buffer != null);
117
Debug.
Assert
(_bufferSize > 0);
132
Debug.
Assert
(_bufferSize > 0);
270
Debug.
Assert
(_writePos == 0 && _readPos == 0 && _readLen == 0);
292
Debug.
Assert
(_writePos == 0 && (!_stream.CanSeek || (_readPos == 0 && _readLen == 0)));
315
Debug.
Assert
(_stream != null);
323
Debug.
Assert
(_writePos == 0 && _readPos == 0 && _readLen == 0);
344
Debug.
Assert
(_writePos == 0 && (!_stream.CanSeek || (_readPos == 0 && _readLen == 0)));
353
Debug.
Assert
(_writePos == 0 && _readPos == _readLen);
367
Debug.
Assert
(_stream != null);
382
Debug.
Assert
(_stream != null);
393
Debug.
Assert
(_readPos < _readLen);
406
Debug.
Assert
(_stream != null);
419
Debug.
Assert
(_stream != null);
433
Debug.
Assert
(readbytes >= 0);
449
Debug.
Assert
(readbytes >= 0);
477
Debug.
Assert
(_stream != null);
532
Debug.
Assert
(_stream != null);
675
Debug.
Assert
(_stream != null);
676
Debug.
Assert
(_stream.CanRead);
677
Debug.
Assert
(_bufferSize > 0);
678
Debug.
Assert
(_asyncActiveSemaphore != null);
679
Debug.
Assert
(semaphoreLockTask != null);
699
Debug.
Assert
(_readLen == _readPos);
742
Debug.
Assert
(_readPos == _readLen);
751
Debug.
Assert
(_stream != null);
798
Debug.
Assert
(_stream != null);
863
Debug.
Assert
(_writePos < _bufferSize);
880
Debug.
Assert
(count == 0);
884
Debug.
Assert
(count >= 0);
885
Debug.
Assert
(_writePos == _bufferSize);
886
Debug.
Assert
(_buffer != null);
893
Debug.
Assert
(count == 0);
894
Debug.
Assert
(_writePos < _bufferSize);
901
Debug.
Assert
(_buffer != null);
902
Debug.
Assert
(totalUserbytes >= _bufferSize);
927
Debug.
Assert
(_stream != null);
952
Debug.
Assert
(bytesWritten == buffer.Length);
957
Debug.
Assert
(_writePos == _bufferSize);
958
Debug.
Assert
(_buffer != null);
966
Debug.
Assert
(bytesWritten == buffer.Length);
968
Debug.
Assert
(_writePos < _bufferSize);
975
Debug.
Assert
(_buffer != null);
976
Debug.
Assert
(totalUserbytes >= _bufferSize);
1028
Debug.
Assert
(_writePos < _bufferSize);
1035
Debug.
Assert
(bytesWritten == buffer.Length);
1058
Debug.
Assert
(_stream != null);
1059
Debug.
Assert
(_stream.CanWrite);
1060
Debug.
Assert
(_bufferSize > 0);
1061
Debug.
Assert
(_asyncActiveSemaphore != null);
1062
Debug.
Assert
(semaphoreLockTask != null);
1090
Debug.
Assert
(buffer.Length == 0);
1094
Debug.
Assert
(buffer.Length >= 0);
1095
Debug.
Assert
(_writePos == _bufferSize);
1096
Debug.
Assert
(_buffer != null);
1102
Debug.
Assert
(bytesWritten == buffer.Length);
1104
Debug.
Assert
(_writePos < _bufferSize);
1112
Debug.
Assert
(_buffer != null);
1113
Debug.
Assert
(totalUserBytes >= _bufferSize);
1175
Debug.
Assert
(_writePos < _bufferSize);
1182
Debug.
Assert
(_stream != null);
1203
Debug.
Assert
(oldPos == _stream.Position + (_readPos - _readLen));
1237
Debug.
Assert
(_stream != null);
1248
Debug.
Assert
(_stream != null);
1283
Debug.
Assert
(_stream != null);
src\libraries\System.Private.CoreLib\src\System\IO\Directory.Unix.cs (1)
55
Debug.
Assert
(path[^1] == 0);
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (1)
190
Debug.
Assert
(path != null);
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (10)
819
Debug.
Assert
(writer != null);
820
Debug.
Assert
(contents != null);
928
Debug.
Assert
(!string.IsNullOrEmpty(path));
929
Debug.
Assert
(encoding != null);
1047
Debug.
Assert
(bytesRead < rentedArray.Length);
1093
Debug.
Assert
(!string.IsNullOrEmpty(path));
1094
Debug.
Assert
(encoding != null);
1143
Debug.
Assert
(writer != null);
1144
Debug.
Assert
(contents != null);
1251
Debug.
Assert
(bytesRead < buffer.Length);
src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (6)
42
Debug.
Assert
(_state != Uninitialized); // Use this after EnsureCachesInitialized has been called.
53
Debug.
Assert
(_state != Uninitialized); // Use this after EnsureCachesInitialized has been called.
136
Debug.
Assert
(_state != Uninitialized); // Use this after EnsureCachesInitialized has been called.
195
Debug.
Assert
(handle is not null || path.Length > 0);
500
Debug.
Assert
(handle is not null || path.Length > 0);
522
Debug.
Assert
(errorInfo.RawErrno > 0); // Expect a positive integer
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (7)
251
Debug.
Assert
(directoryName != null);
287
Debug.
Assert
(fullPath.Length > 0);
288
Debug.
Assert
(PathInternal.IsDirectorySeparator(fullPath[0]));
335
Debug.
Assert
(!PathInternal.IsDirectorySeparator(fullPath[i]));
402
Debug.
Assert
(!isCaseSensitiveRename || !PathInternal.IsCaseSensitive);
474
Debug.
Assert
(recursive);
715
Debug.
Assert
(sb.Length > 0);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (1)
555
Debug.
Assert
(MemStreamMaxLength == int.MaxValue); // Check parameter validation logic in this method if this fails.
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (3)
782
Debug.
Assert
(fourth.Length == destination.Length);
799
Debug.
Assert
(bytes != null);
871
Debug.
Assert
(comparisonType == StringComparison.Ordinal || comparisonType == StringComparison.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (3)
56
Debug.
Assert
(!string.IsNullOrEmpty(path));
57
Debug.
Assert
(!path.Contains('\0'));
126
Debug.
Assert
(path[^1] == 0);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
101
Debug.
Assert
(passwd.HomeDirectory != null);
src\libraries\System.Private.CoreLib\src\System\IO\ReadLinesIterator.cs (4)
36
Debug.
Assert
(path != null);
37
Debug.
Assert
(path.Length > 0);
38
Debug.
Assert
(encoding != null);
39
Debug.
Assert
(reader != null);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (14)
254
Debug.
Assert
(_readPos == _readLen);
352
Debug.
Assert
(!_strategy.CanSeek);
393
Debug.
Assert
(_asyncActiveSemaphore != null);
394
Debug.
Assert
(_strategy.CanSeek);
575
Debug.
Assert
(_writePos <= _bufferSize);
660
Debug.
Assert
(!_strategy.CanSeek);
676
Debug.
Assert
(_asyncActiveSemaphore != null);
677
Debug.
Assert
(_strategy.CanSeek);
780
Debug.
Assert
(_writePos == 0 && (!_strategy.CanSeek || (_readPos == 0 && _readLen == 0)));
804
Debug.
Assert
(_writePos == 0 && _readPos == 0 && _readLen == 0);
819
Debug.
Assert
(_writePos == 0 && (!_strategy.CanSeek || (_readPos == 0 && _readLen == 0)));
824
Debug.
Assert
(_writePos == 0 && _readPos == _readLen);
917
Debug.
Assert
(oldPos == _strategy.Position + (_readPos - _readLen));
987
Debug.
Assert
(_readPos < _readLen);
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (11)
428
Debug.
Assert
(minimumBytes <= buffer.Length);
558
Debug.
Assert
(readWriteTask != null);
559
Debug.
Assert
(asyncWaiter != null);
581
Debug.
Assert
(readWriteTask != null);
618
Debug.
Assert
(writeTask.Status == TaskStatus.RanToCompletion);
667
Debug.
Assert
(function != null);
668
Debug.
Assert
(stream != null);
693
Debug.
Assert
(completedTask is ReadWriteTask);
696
Debug.
Assert
(callback != null);
712
Debug.
Assert
(callback != null);
896
Debug.
Assert
(minimumBytes <= buffer.Length);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (6)
99
Debug.
Assert
(this is NullStreamReader);
550
Debug.
Assert
(_checkPreamble);
698
Debug.
Assert
(charsRead == 0);
1136
Debug.
Assert
(n == 0);
1164
Debug.
Assert
(n == 0);
1212
Debug.
Assert
(n == 0);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (2)
165
Debug.
Assert
(GetType() == typeof(NullStreamWriter));
254
Debug.
Assert
(GetType() == typeof(StreamWriter));
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.CreateBroadcasting.cs (1)
49
Debug.
Assert
(writers is { Length: > 0 });
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (1)
465
Debug.
Assert
(intsWritten == 4);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (2)
435
Debug.
Assert
(ex is not OperationCanceledException);
712
Debug.
Assert
(!(ex is OperationCanceledException));
src\libraries\System.Private.CoreLib\src\System\Marvin.OrdinalIgnoreCase.cs (4)
41
Debug.
Assert
(ucount < 2);
77
Debug.
Assert
(ucount <= int.MaxValue); // this should fit into a signed int
83
Debug.
Assert
(count > 0);
89
Debug.
Assert
(charsWritten == count); // invariant case conversion should involve simple folding; preserve code unit count
src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
861
Debug.
Assert
(double.IsSubnormal(x));
src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
212
Debug.
Assert
(float.IsSubnormal(x));
src\libraries\System.Private.CoreLib\src\System\Memory.cs (7)
126
Debug.
Assert
(manager != null);
150
Debug.
Assert
(manager != null);
166
Debug.
Assert
((obj == null)
305
Debug.
Assert
(tmpObject is T[]);
318
Debug.
Assert
(tmpObject is MemoryManager<T>);
409
Debug.
Assert
(tmpObject is T[]);
428
Debug.
Assert
(tmpObject is MemoryManager<T>);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (9)
1640
Debug.
Assert
(lowInclusive is null || highInclusive is null);
3621
Debug.
Assert
(span.Length == other.Length);
3897
Debug.
Assert
(startInclusive <= endExclusive);
4222
Debug.
Assert
(index > 2);
4502
Debug.
Assert
(alignment > value.Length);
4586
Debug.
Assert
(_hasCustomFormatter);
4587
Debug.
Assert
(_provider != null);
4605
Debug.
Assert
(startingPos >= 0 && startingPos <= _pos);
4606
Debug.
Assert
(alignment != 0);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.cs (6)
64
Debug.
Assert
(comparisonType == StringComparison.OrdinalIgnoreCase);
116
Debug.
Assert
(comparisonType == StringComparison.OrdinalIgnoreCase);
147
Debug.
Assert
(comparisonType == StringComparison.OrdinalIgnoreCase);
182
Debug.
Assert
(comparisonType == StringComparison.OrdinalIgnoreCase);
316
Debug.
Assert
(comparisonType == StringComparison.OrdinalIgnoreCase);
354
Debug.
Assert
(comparisonType == StringComparison.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.Utf8.cs (1)
58
Debug.
Assert
(comparisonType == StringComparison.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Trim.cs (3)
167
Debug.
Assert
((uint)start <= span.Length);
499
Debug.
Assert
((uint)start <= span.Length);
862
Debug.
Assert
((uint)start <= span.Length);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Trim.Utf8.cs (1)
20
Debug.
Assert
(!Rune.IsWhiteSpace(Rune.ReplacementChar));
src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (8)
332
Debug.
Assert
(offset < end && end <= originalBytes.Length);
340
Debug.
Assert
(i >= pos);
661
Debug.
Assert
(_numBytes > 0);
702
Debug.
Assert
(_numChars > 0);
717
Debug.
Assert
(s_lookupTable[ToUInt64Key("quot")] == '\x0022');
718
Debug.
Assert
(s_lookupTable[ToUInt64Key("alpha")] == '\x03b1');
719
Debug.
Assert
(s_lookupTable[ToUInt64Key("diams")] == '\x2666');
1017
Debug.
Assert
(entity.Length <= 8);
src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (26)
369
Debug.
Assert
(carry == 1);
370
Debug.
Assert
(resultIndex == resultLength);
371
Debug.
Assert
(unchecked((uint)(resultLength)) < MaxBlockCount);
390
Debug.
Assert
(unchecked((uint)(lhs._length)) <= MaxBlockCount);
391
Debug.
Assert
(unchecked((uint)(rhs._length)) <= MaxBlockCount);
405
Debug.
Assert
(rhsLength == 0);
451
Debug.
Assert
(!rhs.IsZero());
587
Debug.
Assert
(carry == t + 1);
593
Debug.
Assert
(carry == 1);
756
Debug.
Assert
(unchecked((uint)(resultLength)) < MaxBlockCount);
805
Debug.
Assert
(unchecked((uint)(maxResultLength)) <= MaxBlockCount);
863
Debug.
Assert
(unchecked((uint)result._length) <= MaxBlockCount);
912
Debug.
Assert
((Pow10BigNumTableIndices[^1] + MaxBlockCount + 2) == Pow10BigNumTable.Length);
954
Debug.
Assert
(lhsLength >= 0);
955
Debug.
Assert
(rhsLength >= 0);
956
Debug.
Assert
(lhsLength >= rhsLength);
976
Debug.
Assert
(q <= 0xFFFFFFFF);
1009
Debug.
Assert
(lhsLength >= 0);
1010
Debug.
Assert
(rhsLength >= 0);
1011
Debug.
Assert
(lhsLength >= rhsLength);
1012
Debug.
Assert
(q <= uint.MaxValue);
1064
Debug.
Assert
(unchecked((uint)(length)) < MaxBlockCount);
1082
Debug.
Assert
(index < _length);
1137
Debug.
Assert
(unchecked((uint)(length)) < MaxBlockCount);
1226
Debug.
Assert
(unchecked((uint)(length)) < MaxBlockCount);
1255
Debug.
Assert
(unchecked((uint)(length)) < MaxBlockCount);
src\libraries\System.Private.CoreLib\src\System\Number.DiyFp.cs (9)
73
Debug.
Assert
(double.IsFinite(value));
74
Debug.
Assert
(value > 0.0);
80
Debug.
Assert
(float.IsFinite(value));
81
Debug.
Assert
(value > 0.0f);
87
Debug.
Assert
(Half.IsFinite(value));
88
Debug.
Assert
((float)value > 0.0f);
135
Debug.
Assert
(f != 0);
145
Debug.
Assert
(e == other.e);
146
Debug.
Assert
(f >= other.f);
src\libraries\System.Private.CoreLib\src\System\Number.Dragon4.cs (23)
17
Debug.
Assert
(v > 0);
18
Debug.
Assert
(double.IsFinite(v));
32
Debug.
Assert
(mantissa != 0);
47
Debug.
Assert
((double)v > 0.0);
48
Debug.
Assert
(Half.IsFinite(v));
62
Debug.
Assert
(mantissa != 0);
77
Debug.
Assert
(v > 0);
78
Debug.
Assert
(float.IsFinite(v));
92
Debug.
Assert
(mantissa != 0);
119
Debug.
Assert
(buffer.Length > 0);
126
Debug.
Assert
(mantissa != 0);
308
Debug.
Assert
(cutoffNumber > 0);
314
Debug.
Assert
(cutoffNumber >= 0);
332
Debug.
Assert
(scale.GetLength() > 0);
341
Debug.
Assert
(hiBlock != 0);
343
Debug.
Assert
((hiBlockLog2 < 3) || (hiBlockLog2 > 27));
363
Debug.
Assert
(isSignificantDigits);
364
Debug.
Assert
(digitExponent >= cutoffExponent);
373
Debug.
Assert
(outputDigit < 10);
416
Debug.
Assert
((cutoffNumber > 0) || ((cutoffNumber == 0) && !isSignificantDigits));
426
Debug.
Assert
(outputDigit < 10);
454
Debug.
Assert
((0 < outputDigit) && (outputDigit < 10));
537
Debug.
Assert
(outputLen <= buffer.Length);
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (91)
343
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
410
Debug.
Assert
(s is null || typeof(TChar) == typeof(char));
601
Debug.
Assert
(((precision != -1) && (precision < DoublePrecision)) || (BitConverter.DoubleToInt64Bits(value) == BitConverter.DoubleToInt64Bits(NumberToFloat<double>(ref number))));
607
Debug.
Assert
((fmt == 'G') || (fmt == 'g') || (fmt == 'R') || (fmt == 'r'));
621
Debug.
Assert
(precision == DoublePrecisionCustomFormat);
640
Debug.
Assert
(s is null || typeof(TChar) == typeof(char));
656
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
712
Debug.
Assert
(((precision != -1) && (precision < SinglePrecision)) || (BitConverter.SingleToInt32Bits(value) == BitConverter.SingleToInt32Bits(NumberToFloat<float>(ref number))));
718
Debug.
Assert
((fmt == 'G') || (fmt == 'g') || (fmt == 'R') || (fmt == 'r'));
732
Debug.
Assert
(precision == SinglePrecisionCustomFormat);
753
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
807
Debug.
Assert
(((precision != -1) && (precision < HalfPrecision)) || (BitConverter.HalfToInt16Bits(value) == BitConverter.HalfToInt16Bits(NumberToFloat<Half>(ref number))));
813
Debug.
Assert
((fmt == 'G') || (fmt == 'g') || (fmt == 'R') || (fmt == 'r'));
827
Debug.
Assert
(precision == HalfPrecisionCustomFormat);
835
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
840
Debug.
Assert
(s is null || typeof(TChar) == typeof(char));
851
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
852
Debug.
Assert
(source != null);
1054
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1170
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1286
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1403
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1521
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1616
Debug.
Assert
(value < 0);
1628
Debug.
Assert
(p == buffer + sNegative.Length);
1634
Debug.
Assert
(p == buffer);
1641
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1642
Debug.
Assert
(value < 0);
1660
Debug.
Assert
(p == buffer + sNegative.Length);
1666
Debug.
Assert
(p == buffer);
1683
Debug.
Assert
(p == buffer);
1690
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1708
Debug.
Assert
(p == buffer);
1716
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1739
Debug.
Assert
(p == buffer);
1746
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1764
Debug.
Assert
(p == buffer);
1772
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1809
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1810
Debug.
Assert
(value <= 99);
1825
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1826
Debug.
Assert
(value <= 9999);
1854
Debug.
Assert
(value < 10);
1855
Debug.
Assert
(cur == ptr);
1862
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1891
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1925
Debug.
Assert
(value < SmallNumberCacheLength);
1942
Debug.
Assert
(p == buffer);
1958
Debug.
Assert
(p == buffer);
1965
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1974
Debug.
Assert
(p == buffer);
1985
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
1998
Debug.
Assert
(p == buffer);
2049
Debug.
Assert
(value < 0);
2061
Debug.
Assert
(p == buffer + sNegative.Length);
2067
Debug.
Assert
(p == buffer);
2074
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2075
Debug.
Assert
(value < 0);
2093
Debug.
Assert
(p == buffer + sNegative.Length);
2099
Debug.
Assert
(p == buffer);
2116
Debug.
Assert
(p == buffer);
2123
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2141
Debug.
Assert
(p == buffer);
2151
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2188
Debug.
Assert
(p == buffer);
2195
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2213
Debug.
Assert
(p == buffer);
2223
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2284
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2323
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2368
Debug.
Assert
(p == buffer);
2386
Debug.
Assert
(p == buffer);
2393
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2403
Debug.
Assert
(p == buffer);
2425
Debug.
Assert
(p == buffer);
2489
Debug.
Assert
(p == buffer + sNegative.Length);
2495
Debug.
Assert
(p == buffer);
2502
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2523
Debug.
Assert
(p == buffer + sNegative.Length);
2529
Debug.
Assert
(p == buffer);
2548
Debug.
Assert
(p == buffer);
2555
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2575
Debug.
Assert
(p == buffer);
2611
Debug.
Assert
(p == buffer);
2618
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2638
Debug.
Assert
(p == buffer);
2694
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2706
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
2730
Debug.
Assert
(p == buffer);
2748
Debug.
Assert
(p == buffer);
2766
Debug.
Assert
(p == buffer);
src\libraries\System.Private.CoreLib\src\System\Number.Grisu3.cs (45)
328
Debug.
Assert
(v > 0);
329
Debug.
Assert
(double.IsFinite(v));
348
Debug.
Assert
((requestedDigits == -1) || (length == requestedDigits));
362
Debug.
Assert
((double)v > 0);
363
Debug.
Assert
(Half.IsFinite(v));
382
Debug.
Assert
((requestedDigits == -1) || (length == requestedDigits));
396
Debug.
Assert
(v > 0);
397
Debug.
Assert
(float.IsFinite(v));
416
Debug.
Assert
((requestedDigits == -1) || (length == requestedDigits));
431
Debug.
Assert
(requestedDigits > 0);
438
Debug.
Assert
(MinimalTargetExponent <= (w.e + tenMk.e + DiyFp.SignificandSize));
439
Debug.
Assert
(MaximalTargetExponent >= (w.e + tenMk.e + DiyFp.SignificandSize));
483
Debug.
Assert
(boundaryPlus.e == w.e);
490
Debug.
Assert
(MinimalTargetExponent <= (w.e + tenMk.e + DiyFp.SignificandSize));
491
Debug.
Assert
(MaximalTargetExponent >= (w.e + tenMk.e + DiyFp.SignificandSize));
504
Debug.
Assert
(scaledW.e == (boundaryPlus.e + tenMk.e + DiyFp.SignificandSize));
539
Debug.
Assert
(number < (1U << (numberBits + 1)));
543
Debug.
Assert
((uint)(exponentGuess) < SmallPowersOfTen.Length);
582
Debug.
Assert
(MinimalTargetExponent <= w.e);
583
Debug.
Assert
(w.e <= MaximalTargetExponent);
584
Debug.
Assert
(MinimalTargetExponent >= -60);
585
Debug.
Assert
(MaximalTargetExponent <= -32);
611
Debug.
Assert
(buffer[0] == '\0');
629
Debug.
Assert
(digit <= 9);
665
Debug.
Assert
(one.e >= MinimalTargetExponent);
666
Debug.
Assert
(fractionals < one.f);
667
Debug.
Assert
((ulong.MaxValue / 10) >= one.f);
676
Debug.
Assert
(digit <= 9);
751
Debug.
Assert
(low.e == w.e);
752
Debug.
Assert
(w.e == high.e);
754
Debug.
Assert
((low.f + 1) <= (high.f - 1));
756
Debug.
Assert
(MinimalTargetExponent <= w.e);
757
Debug.
Assert
(w.e <= MaximalTargetExponent);
808
Debug.
Assert
(digit <= 9);
847
Debug.
Assert
(one.e >= MinimalTargetExponent);
848
Debug.
Assert
(fractionals < one.f);
849
Debug.
Assert
((ulong.MaxValue / 10) >= one.f);
860
Debug.
Assert
(digit <= 9);
887
Debug.
Assert
(CachedPowersSignificand.Length == CachedPowersBinaryExponent.Length);
888
Debug.
Assert
(CachedPowersSignificand.Length == CachedPowersDecimalExponent.Length);
893
Debug.
Assert
((uint)(index) < CachedPowersSignificand.Length);
895
Debug.
Assert
(minExponent <= CachedPowersBinaryExponent[index]);
896
Debug.
Assert
(CachedPowersBinaryExponent[index] <= maxExponent);
916
Debug.
Assert
(rest < tenKappa);
1062
Debug.
Assert
(rest <= unsafeInterval);
src\libraries\System.Private.CoreLib\src\System\Number.NumberToFloatingPointBits.cs (11)
829
Debug.
Assert
((TFloat.DenormalMantissaMask & (1UL << TFloat.DenormalMantissaBits)) == 0);
831
Debug.
Assert
((shiftedExponent & TFloat.DenormalMantissaMask) == 0);
832
Debug.
Assert
((mantissa & ~TFloat.DenormalMantissaMask) == 0);
833
Debug.
Assert
((shiftedExponent & ~(((1UL << TFloat.ExponentBits) - 1) << TFloat.DenormalMantissaBits)) == 0); // exponent fits in its place
895
Debug.
Assert
((1 <= count) && (count <= 9));
919
Debug.
Assert
((1 <= count) && (count <= 19));
975
Debug.
Assert
(TFloat.DenormalMantissaBits <= FloatingPointMaxDenormalMantissaBits);
977
Debug.
Assert
(number.DigitsPtr[0] != '0');
979
Debug.
Assert
(number.Scale <= FloatingPointMaxExponent);
980
Debug.
Assert
(number.Scale >= FloatingPointMinExponent);
982
Debug.
Assert
(number.DigitsCount != 0);
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (5)
118
Debug.
Assert
(p != null);
809
Debug.
Assert
((c == 0) || !hasZeroTail);
892
Debug.
Assert
(typeof(TChar) == typeof(byte));
910
Debug.
Assert
(typeof(TChar) == typeof(byte));
928
Debug.
Assert
(typeof(TChar) == typeof(byte));
src\libraries\System.Private.CoreLib\src\System\Numerics\Quaternion.Extensions.cs (2)
50
Debug.
Assert
((index >= 0) && (index < Quaternion.Count));
58
Debug.
Assert
((index >= 0) && (index < Quaternion.Count));
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (8)
298
Debug.
Assert
(Vector<double>.Count == Vector256<double>.Count);
303
Debug.
Assert
(Vector<double>.Count == Vector128<double>.Count);
318
Debug.
Assert
(Vector<double>.Count == Vector256<double>.Count);
323
Debug.
Assert
(Vector<double>.Count == Vector128<double>.Count);
423
Debug.
Assert
(Vector<float>.Count == Vector256<float>.Count);
428
Debug.
Assert
(Vector<float>.Count == Vector128<float>.Count);
2188
Debug.
Assert
((index >= 0) && (index < Vector<T>.Count));
2196
Debug.
Assert
((index >= 0) && (index < Vector<T>.Count));
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.Extensions.cs (2)
50
Debug.
Assert
((index >= 0) && (index < Vector2.Count));
58
Debug.
Assert
((index >= 0) && (index < Vector2.Count));
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.Extensions.cs (2)
50
Debug.
Assert
((index >= 0) && (index < Vector3.Count));
58
Debug.
Assert
((index >= 0) && (index < Vector3.Count));
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.Extensions.cs (2)
50
Debug.
Assert
((index >= 0) && (index < Vector4.Count));
58
Debug.
Assert
((index >= 0) && (index < Vector4.Count));
src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (2)
242
Debug.
Assert
(radix == 2 || radix == 8 || radix == 10 || radix == 16);
301
Debug.
Assert
(radix == 2 || radix == 8 || radix == 10 || radix == 16);
src\libraries\System.Private.CoreLib\src\System\Progress.cs (1)
35
Debug.
Assert
(_synchronizationContext != null);
src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
50
Debug.
Assert
(isThreadSafeRandom);
src\libraries\System.Private.CoreLib\src\System\Random.Net5CompatImpl.cs (4)
74
Debug.
Assert
(minValue == maxValue || minValue + 1 == maxValue);
191
Debug.
Assert
(minValue == maxValue || minValue + 1 == maxValue);
260
Debug.
Assert
(_seedArray is null);
325
Debug.
Assert
(_seedArray is not null);
src\libraries\System.Private.CoreLib\src\System\Random.Xoshiro256StarStarImpl.cs (5)
93
Debug.
Assert
(maxValue >= 0);
100
Debug.
Assert
(minValue <= maxValue);
122
Debug.
Assert
(maxValue >= 0);
129
Debug.
Assert
(minValue <= maxValue);
162
Debug.
Assert
(buffer.Length < sizeof(ulong));
src\libraries\System.Private.CoreLib\src\System\Range.cs (2)
79
Debug.
Assert
(formatted);
90
Debug.
Assert
(formatted);
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (5)
101
Debug.
Assert
((obj == null)
227
Debug.
Assert
(tmpObject is T[]);
240
Debug.
Assert
(tmpObject is MemoryManager<T>);
324
Debug.
Assert
(tmpObject is T[]);
343
Debug.
Assert
(tmpObject is MemoryManager<T>);
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (1)
128
Debug.
Assert
(length >= 0);
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (3)
245
Debug.
Assert
(_argCount <= MaxStackAllocArgCount);
403
Debug.
Assert
(copyOfParameters[i] != null);
404
Debug.
Assert
(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (6)
37
Debug.
Assert
(_instNesting != 0);
53
Debug.
Assert
(_instNesting != 0);
69
Debug.
Assert
(_instNesting != 0);
81
Debug.
Assert
(name != null);
93
Debug.
Assert
(rank > 0);
134
Debug.
Assert
(_instNesting == 0);
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (11)
21
Debug.
Assert
(_fieldInfo.m_declaringType != null);
125
Debug.
Assert
(obj != null);
134
Debug.
Assert
(obj != null);
141
Debug.
Assert
(obj != null);
216
Debug.
Assert
(obj != null);
224
Debug.
Assert
(obj != null);
232
Debug.
Assert
(obj != null);
240
Debug.
Assert
(obj != null);
248
Debug.
Assert
(obj != null);
345
Debug.
Assert
(!IsStatic());
379
Debug.
Assert
(IsStatic());
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (5)
21
Debug.
Assert
(!method.ContainsGenericParameters);
88
Debug.
Assert
(!method.ContainsGenericParameters);
145
Debug.
Assert
(!method.ContainsGenericParameters);
203
Debug.
Assert
(parameterType.IsValueType);
254
Debug.
Assert
(method is DynamicMethod);
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (3)
107
Debug.
Assert
(dstObject != null);
108
Debug.
Assert
(dstObject.GetType() == dstType);
121
Debug.
Assert
(srcObject is not Pointer);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (8)
48
Debug.
Assert
(_argCount == 0);
72
Debug.
Assert
(_argCount == 1);
118
Debug.
Assert
(_argCount <= MaxStackAllocArgCount);
155
Debug.
Assert
(_argCount <= MaxStackAllocArgCount);
193
Debug.
Assert
(_argCount > MaxStackAllocArgCount);
295
Debug.
Assert
(_argCount == 1);
338
Debug.
Assert
(copyOfParameters[i] != null);
339
Debug.
Assert
(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (4)
292
Debug.
Assert
(_method is RuntimeConstructorInfo);
298
Debug.
Assert
(_argCount <= MaxStackAllocArgCount);
456
Debug.
Assert
(copyOfParameters[i] != null);
457
Debug.
Assert
(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (1)
90
Debug.
Assert
(!method.IsStatic);
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedFunctionPointerType.cs (1)
21
Debug.
Assert
(unmodifiedType.IsFunctionPointer);
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedGenericType.cs (1)
16
Debug.
Assert
(unmodifiedType.IsGenericType);
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedHasElementType.cs (1)
19
Debug.
Assert
(unmodifiedType.HasElementType);
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (2)
497
Debug.
Assert
(genericParameter.IsGenericParameter);
531
Debug.
Assert
(genericParameter.IsGenericParameter && !genericParameter.IsGenericMethodParameter);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureArrayType.cs (2)
13
Debug.
Assert
(rank > 0);
14
Debug.
Assert
(rank == 1 || isMultiDim);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureGenericParameterType.cs (1)
12
Debug.
Assert
(position >= 0);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureHasElementType.cs (1)
12
Debug.
Assert
(elementType != null);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (7)
112
Debug.
Assert
(_mediator.NeutralResourcesCulture != null);
208
Debug.
Assert
(_mediator.MainAssembly != null);
362
Debug.
Assert
(_mediator.MainAssembly != null);
424
Debug.
Assert
(_mediator.MainAssembly != null);
432
Debug.
Assert
(_mediator.NeutralResourcesCulture != null);
467
Debug.
Assert
(_mediator.BaseName != null);
478
Debug.
Assert
(_mediator.MainAssembly != null);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (5)
252
Debug.
Assert
(MainAssembly != null);
289
Debug.
Assert
(_resourceSets != null);
410
Debug.
Assert
(MainAssembly != null);
415
Debug.
Assert
(localResourceSets != null);
431
Debug.
Assert
(_resourceSets != null);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (10)
340
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
541
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
561
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
623
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
643
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
781
Debug.
Assert
(!Monitor.IsEntered(this)); // only called during init
804
Debug.
Assert
(!Monitor.IsEntered(this)); // only called during init
993
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
1033
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
1117
Debug.
Assert
(!Monitor.IsEntered(_reader));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (2)
191
Debug.
Assert
(_table != null);
192
Debug.
Assert
(Reader != null);
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (1)
288
Debug.
Assert
(!Monitor.IsEntered(reader));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (1)
91
Debug.
Assert
(stateMachine != null);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilder.cs (1)
86
Debug.
Assert
(m_task == null);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (5)
290
Debug.
Assert
(s is AsyncStateMachineBox<TStateMachine>);
354
Debug.
Assert
(!IsCompleted);
365
Debug.
Assert
(StateMachine != null);
395
Debug.
Assert
(IsCompleted);
442
Debug.
Assert
(m_task == null);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (4)
38
Debug.
Assert
(BitOperations.PopCount((uint)initialCacheSize) == 1 && initialCacheSize > 1);
39
Debug.
Assert
(BitOperations.PopCount((uint)maxCacheSize) == 1 && maxCacheSize >= initialCacheSize);
217
Debug.
Assert
(size > 1);
219
Debug.
Assert
((size & (size - 1)) == 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (18)
395
Debug.
Assert
(Monitor.IsEntered(_lock));
396
Debug.
Assert
(key != null); // key already validated as non-null and not already in table.
462
Debug.
Assert
(parent != null);
463
Debug.
Assert
(BitOperations.IsPow2(InitialCapacity));
482
Debug.
Assert
(parent != null);
483
Debug.
Assert
(buckets != null);
484
Debug.
Assert
(entries != null);
485
Debug.
Assert
(buckets.Length == entries.Length);
486
Debug.
Assert
(BitOperations.IsPow2(buckets.Length));
501
Debug.
Assert
(key != null); // key already validated as non-null and not already in table.
502
Debug.
Assert
(HasCapacity);
525
Debug.
Assert
(key != null); // Key already validated as non-null
539
Debug.
Assert
(key != null); // Key already validated as non-null.
616
Debug.
Assert
(entryIndex >= 0 && entryIndex < _firstFreeEntry);
631
Debug.
Assert
(entryIndex != -1);
647
Debug.
Assert
(!HasCapacity);
688
Debug.
Assert
(newSize >= _buckets.Length);
689
Debug.
Assert
(BitOperations.IsPow2(newSize));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConfiguredValueTaskAwaitable.cs (6)
55
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
77
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
97
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
160
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
182
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
202
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (6)
504
Debug.
Assert
(provider is not null);
522
Debug.
Assert
(_hasCustomFormatter);
523
Debug.
Assert
(_provider != null);
539
Debug.
Assert
(startingPos >= 0 && startingPos <= _pos);
540
Debug.
Assert
(alignment != 0);
608
Debug.
Assert
(additionalChars > _chars.Length - _pos);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (4)
75
Debug.
Assert
(BitOperations.PopCount((uint)initialCacheSize) == 1 && initialCacheSize > 1);
76
Debug.
Assert
(BitOperations.PopCount((uint)maxCacheSize) == 1 && maxCacheSize >= initialCacheSize);
200
Debug.
Assert
(size > 1);
202
Debug.
Assert
((size & (size - 1)) == 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs (3)
195
Debug.
Assert
(stateMachineBox != null);
395
Debug.
Assert
((options & ~(ConfigureAwaitOptions.ContinueOnCapturedContext | ConfigureAwaitOptions.SuppressThrowing | ConfigureAwaitOptions.ForceYielding)) == 0);
477
Debug.
Assert
((options & ~(ConfigureAwaitOptions.ContinueOnCapturedContext | ConfigureAwaitOptions.ForceYielding)) == 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\Unsafe.cs (2)
922
Debug.
Assert
(nuint.IsPow2(alignment));
934
Debug.
Assert
(nuint.IsPow2(alignment));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ValueTaskAwaiter.cs (6)
50
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
70
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
89
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
132
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
152
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
171
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\YieldAwaitable.cs (1)
117
Debug.
Assert
(box != null);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (1)
138
Debug.
Assert
(target is Array);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\BStrStringMarshaller.cs (1)
96
Debug.
Assert
(lengthInBytes == Marshal.SysStringByteLen((IntPtr)ptrToFirstChar));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (3)
29
Debug.
Assert
(variantSize == (4 * IntPtr.Size));
33
Debug.
Assert
(IntPtr.Size == 8);
34
Debug.
Assert
(variantSize == (3 * IntPtr.Size));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (4)
300
Debug.
Assert
(obj is MemoryManager<T>);
361
Debug.
Assert
(length >= 0);
450
Debug.
Assert
(offset >= 0);
451
Debug.
Assert
(count >= 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\PosixSignalRegistration.Unix.cs (1)
96
Debug.
Assert
(tokens.Length != 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\RuntimeInformation.Unix.cs (1)
29
Debug.
Assert
(osArch >= 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (4)
121
Debug.
Assert
(_fullyInitialized);
127
Debug.
Assert
(_fullyInitialized);
160
Debug.
Assert
(_fullyInitialized);
198
Debug.
Assert
(_fullyInitialized || disposeOrFinalizeOperation);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (4)
270
Debug.
Assert
(Vector<T>.Count >= Vector128<T>.Count);
316
Debug.
Assert
(Vector<T>.Count >= Vector128<T>.Count);
3219
Debug.
Assert
((index >= 0) && (index < Vector128<T>.Count));
3227
Debug.
Assert
((index >= 0) && (index < Vector128<T>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (4)
235
Debug.
Assert
(Vector256<T>.Count >= Vector<T>.Count);
252
Debug.
Assert
(Vector256<T>.Count >= Vector<T>.Count);
3149
Debug.
Assert
((index >= 0) && (index < Vector256<T>.Count));
3157
Debug.
Assert
((index >= 0) && (index < Vector256<T>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (4)
235
Debug.
Assert
(Vector512<T>.Count >= Vector<T>.Count);
252
Debug.
Assert
(Vector512<T>.Count >= Vector<T>.Count);
3161
Debug.
Assert
((index >= 0) && (index < Vector512<T>.Count));
3169
Debug.
Assert
((index >= 0) && (index < Vector512<T>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (2)
3083
Debug.
Assert
((index >= 0) && (index < Vector64<T>.Count));
3091
Debug.
Assert
((index >= 0) && (index < Vector64<T>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (8)
879
Debug.
Assert
(typeof(TVectorSingle) == typeof(Vector64<float>));
884
Debug.
Assert
(typeof(TVectorSingle) == typeof(Vector128<float>));
889
Debug.
Assert
(typeof(TVectorSingle) == typeof(Vector256<float>));
894
Debug.
Assert
(typeof(TVectorSingle) == typeof(Vector512<float>));
914
Debug.
Assert
(typeof(TVectorDouble) == typeof(Vector64<double>));
919
Debug.
Assert
(typeof(TVectorDouble) == typeof(Vector128<double>));
924
Debug.
Assert
(typeof(TVectorDouble) == typeof(Vector256<double>));
929
Debug.
Assert
(typeof(TVectorDouble) == typeof(Vector512<double>));
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (3)
121
Debug.
Assert
(IsCollectible);
123
Debug.
Assert
(_state != InternalState.Unloading);
766
Debug.
Assert
(assemblyName.CultureName?.Length > 0);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (1)
46
Debug.
Assert
(!string.IsNullOrWhiteSpace(switchSuffix));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\FrameworkName.cs (4)
26
Debug.
Assert
(_identifier != null);
35
Debug.
Assert
(_version != null);
44
Debug.
Assert
(_profile != null);
57
Debug.
Assert
(_fullName != null);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (16)
442
Debug.
Assert
(IsSetField);
457
Debug.
Assert
(flds != null);
545
Debug.
Assert
(!IsSetField);
552
Debug.
Assert
(isSetProperty);
554
Debug.
Assert
(!IsGetField);
573
Debug.
Assert
(semiFinalist != null);
591
Debug.
Assert
(results.Count > 1);
596
Debug.
Assert
(finalists == null || finalist != null);
637
Debug.
Assert
(results.Count > 1);
779
Debug.
Assert
(!IsGenericParameter);
823
Debug.
Assert
(!IsGenericParameter);
847
Debug.
Assert
(value != null);
889
Debug.
Assert
(type.IsValueType);
890
Debug.
Assert
(!type.IsByRefLike);
895
Debug.
Assert
(type.IsEquivalentTo(value.GetType()));
914
Debug.
Assert
(!sigElementType.IsGenericParameter);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (2)
312
Debug.
Assert
((sign == 0) || (sign == -1));
365
Debug.
Assert
((sign == 0) || (sign == -1));
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any1CharPackedIgnoreCaseSearchValues.cs (1)
20
Debug.
Assert
((value | 0x20) == value);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any1SearchValues.cs (2)
21
Debug.
Assert
(Unsafe.SizeOf<T>() == Unsafe.SizeOf<TImpl>());
22
Debug.
Assert
(values.Length == 1);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any2CharPackedIgnoreCaseSearchValues.cs (2)
23
Debug.
Assert
((value0 | 0x20) == value0 && char.IsAscii(value0));
24
Debug.
Assert
((value1 | 0x20) == value1 && char.IsAscii(value1));
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any2SearchValues.cs (2)
21
Debug.
Assert
(Unsafe.SizeOf<T>() == Unsafe.SizeOf<TImpl>());
22
Debug.
Assert
(values.Length == 2);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any3SearchValues.cs (2)
21
Debug.
Assert
(Unsafe.SizeOf<T>() == Unsafe.SizeOf<TImpl>());
22
Debug.
Assert
(values.Length == 3);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any4SearchValues.cs (2)
21
Debug.
Assert
(Unsafe.SizeOf<T>() == Unsafe.SizeOf<TImpl>());
22
Debug.
Assert
(values.Length == 4);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any5SearchValues.cs (2)
21
Debug.
Assert
(Unsafe.SizeOf<T>() == Unsafe.SizeOf<TImpl>());
22
Debug.
Assert
(values.Length == 5);
src\libraries\System.Private.CoreLib\src\System\SearchValues\BitmapCharSearchValues.cs (1)
17
Debug.
Assert
(maxInclusive <= char.MaxValue);
src\libraries\System.Private.CoreLib\src\System\SearchValues\BitVector256.cs (2)
28
Debug.
Assert
(c < 256);
49
Debug.
Assert
(b < 256);
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (3)
70
Debug.
Assert
(typeof(T) == typeof(byte) || typeof(T) == typeof(char));
139
Debug.
Assert
(searchSpaceLength >= Vector128<short>.Count);
166
Debug.
Assert
(searchSpaceLength >= Vector128<short>.Count);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (17)
405
Debug.
Assert
(Avx512Vbmi.VL.IsSupported);
406
Debug.
Assert
(searchSpaceLength >= 16);
449
Debug.
Assert
(searchSpaceLength is > 32 and <= 64);
466
Debug.
Assert
(searchSpaceLength is >= 16 and <= 32);
489
Debug.
Assert
(Sse41.IsSupported || AdvSimd.Arm64.IsSupported);
490
Debug.
Assert
(searchSpaceLength >= 16);
580
Debug.
Assert
(Avx512Vbmi.VL.IsSupported);
581
Debug.
Assert
(searchSpaceLength >= 16);
597
Debug.
Assert
(Unsafe.ByteOffset(ref searchSpace, ref cur) >= 64 * sizeof(char));
625
Debug.
Assert
(searchSpaceLength is > 32 and <= 64);
626
Debug.
Assert
(Unsafe.ByteOffset(ref searchSpace, ref cur) >= 32 * sizeof(char));
643
Debug.
Assert
(searchSpaceLength is >= 16 and <= 32);
644
Debug.
Assert
(Unsafe.ByteOffset(ref searchSpace, ref cur) >= 16 * sizeof(char));
667
Debug.
Assert
(Sse41.IsSupported || AdvSimd.Arm64.IsSupported);
668
Debug.
Assert
(searchSpaceLength >= 16);
686
Debug.
Assert
(Unsafe.ByteOffset(ref searchSpace, ref cur) >= 32 * sizeof(char));
728
Debug.
Assert
(Unsafe.ByteOffset(ref searchSpace, ref cur) >= 16 * sizeof(char));
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMapState.cs (17)
59
Debug.
Assert
((IntPtr)valuesPtr != IntPtr.Zero);
67
Debug.
Assert
(_hashEntries is not null);
78
Debug.
Assert
(_hashEntries is not null);
79
Debug.
Assert
((IntPtr)_slowContainsValuesPtr == IntPtr.Zero);
88
Debug.
Assert
(offset < (ulong)hashEntries.Length);
96
Debug.
Assert
(_hashEntries is null);
97
Debug.
Assert
((IntPtr)_slowContainsValuesPtr != IntPtr.Zero);
108
Debug.
Assert
(_hashEntries is null);
109
Debug.
Assert
((IntPtr)_slowContainsValuesPtr != IntPtr.Zero);
133
Debug.
Assert
(maxInclusive <= char.MaxValue);
169
Debug.
Assert
(modulus < MaxModulus);
213
Debug.
Assert
(divisor > 0);
214
Debug.
Assert
(divisor <= MaxModulus);
223
Debug.
Assert
(multiplier == GetFastModMultiplier(divisor));
227
Debug.
Assert
(result == (value % divisor));
241
Debug.
Assert
(state._hashEntries is not null);
281
Debug.
Assert
(state._hashEntries is not null);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticWithAsciiCharSearchValues.cs (3)
23
Debug.
Assert
(values.ContainsAnyInRange((char)0, (char)127));
53
Debug.
Assert
(_asciiState.Lookup.Contains(0) != _inverseAsciiState.Lookup.Contains(0));
150
Debug.
Assert
(_asciiState.Lookup.Contains(0) != _inverseAsciiState.Lookup.Contains(0));
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.cs (1)
46
Debug.
Assert
(values.Length is 2 or 3 or 4 or 5);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\AsciiStringSearchValuesTeddyBase.cs (11)
121
Debug.
Assert
(!TBucketized.Value);
122
Debug.
Assert
(n is 2 or 3);
137
Debug.
Assert
(TBucketized.Value);
138
Debug.
Assert
(n is 2 or 3);
252
Debug.
Assert
(span.Length >= CharsPerIterationAvx2 + MatchStartOffsetN2);
304
Debug.
Assert
(span.Length >= CharsPerIterationAvx512 + MatchStartOffsetN2);
429
Debug.
Assert
(span.Length >= CharsPerIterationAvx2 + MatchStartOffsetN3);
484
Debug.
Assert
(span.Length >= CharsPerIterationAvx512 + MatchStartOffsetN3);
561
Debug.
Assert
(bucket is not null);
606
Debug.
Assert
(bucket is not null);
651
Debug.
Assert
(bucket is not null);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (22)
79
Debug.
Assert
(typeof(TCaseSensitivity) != typeof(StringSearchValuesHelper.CaseInsensitiveUnicode));
87
Debug.
Assert
(nodeIndex == 0);
122
Debug.
Assert
((uint)i < (uint)span.Length);
127
Debug.
Assert
((uint)nodeIndex < (uint)_nodes.Length);
135
Debug.
Assert
((uint)nodeIndex < (uint)_nodes.Length);
140
Debug.
Assert
(result == -1 || result >= i + 1 - matchLength);
168
Debug.
Assert
(nodeIndex == -1);
169
Debug.
Assert
(result >= 0);
231
Debug.
Assert
((uint)i < (uint)span.Length);
258
Debug.
Assert
(lowSurrogateUpper != LowSurrogateNotSet);
269
Debug.
Assert
(c == destination[0]);
270
Debug.
Assert
(lowSurrogateUpper == LowSurrogateNotSet || lowSurrogateUpper == destination[1]);
276
Debug.
Assert
((uint)nodeIndex < (uint)_nodes.Length);
284
Debug.
Assert
((uint)nodeIndex < (uint)_nodes.Length);
289
Debug.
Assert
(result == -1 || result >= i + 1 - matchLength);
317
Debug.
Assert
(nodeIndex == -1);
318
Debug.
Assert
(result >= 0);
331
Debug.
Assert
(char.IsHighSurrogate(h));
332
Debug.
Assert
(char.IsLowSurrogate(l));
338
Debug.
Assert
(written == 2);
343
Debug.
Assert
(char.IsHighSurrogate(hr));
344
Debug.
Assert
(char.IsLowSurrogate(lr));
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickBuilder.cs (2)
25
Debug.
Assert
(!string.IsNullOrEmpty(values[0]));
31
Debug.
Assert
(values[i - 1].Length <= values[i].Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (3)
40
Debug.
Assert
(children is int[] || children is Dictionary<char, int>);
96
Debug.
Assert
(ReferenceEquals(_children, EmptyChildrenSentinel));
139
Debug.
Assert
(children.Count > 0);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\CharacterFrequencyHelper.cs (5)
34
Debug.
Assert
(value.Length > 1);
35
Debug.
Assert
(!ignoreCase || char.IsAscii(value[0]));
43
Debug.
Assert
(!ignoreCase);
74
Debug.
Assert
(ch2Offset != 0);
75
Debug.
Assert
(ch2Offset != ch3Offset);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (5)
42
Debug.
Assert
(values.Length <= MaxValues);
50
Debug.
Assert
(minimumLength > 1);
111
Debug.
Assert
(typeof(TCaseSensitivity) != typeof(CaseInsensitiveUnicode));
128
Debug.
Assert
(_buckets is not null);
175
Debug.
Assert
(charsWritten == upperCase.Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\StringSearchValuesHelper.cs (10)
20
Debug.
Assert
(searchSpaceLength >= 0);
28
Debug.
Assert
(offset >= 0);
31
Debug.
Assert
(currentByteOffset >= 0);
32
Debug.
Assert
((currentByteOffset & 1) == 0);
36
Debug.
Assert
(offset <= availableLength);
58
Debug.
Assert
(lengthRemaining > 0);
136
Debug.
Assert
(candidate.Length > 1);
158
Debug.
Assert
(candidate.Length is 2 or 3);
190
Debug.
Assert
(candidate.Length > 1);
191
Debug.
Assert
(candidate.ToUpperInvariant() == candidate);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyBucketizer.cs (7)
17
Debug.
Assert
(values.Length <= 8);
29
Debug.
Assert
(char.IsAscii(c));
50
Debug.
Assert
(valueBuckets.Length <= 8);
62
Debug.
Assert
(char.IsAscii(c));
86
Debug.
Assert
(values.Length <= RabinKarp.MaxValues);
104
Debug.
Assert
(char.IsAscii(value[j]));
136
Debug.
Assert
(count == strings.Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (5)
37
Debug.
Assert
(value.Length > 1);
38
Debug.
Assert
((value.Length >= 8) == TValueLength.AtLeast8CharsOrUnknown);
42
Debug.
Assert
(ch3Offset == 0 || ch3Offset > ch2Offset);
324
Debug.
Assert
(bitPos % 2 == 0);
356
Debug.
Assert
(bitPos % 2 == 0);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (12)
64
Debug.
Assert
(i == normalizedValues.Length);
91
Debug.
Assert
(charsWritten == upperCase.Length);
109
Debug.
Assert
(newCount <= values.Length - unreachableValues.Count);
110
Debug.
Assert
(newCount > 0);
252
Debug.
Assert
(!(asciiStartLettersOnly && asciiStartUnaffectedByCaseConversion));
292
Debug.
Assert
(typeof(TStartCaseSensitivity) != typeof(CaseInsensitiveUnicode));
293
Debug.
Assert
(values.Length > 1);
294
Debug.
Assert
(n is 2 or 3);
317
Debug.
Assert
(n is 2 or 3);
318
Debug.
Assert
(values.Length < maxValues);
329
Debug.
Assert
(char.IsAscii(c));
373
Debug.
Assert
(newValuesCount == newValues.Length);
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (8)
59
Debug.
Assert
(_buffer != null);
82
Debug.
Assert
(_buffer != null);
102
Debug.
Assert
(_buffer != null);
132
Debug.
Assert
(_buffer != null);
183
Debug.
Assert
(_buffer != null);
230
Debug.
Assert
(_buffer != null);
262
Debug.
Assert
(_buffer != null);
427
Debug.
Assert
(byteLength >= 0);
src\libraries\System.Private.CoreLib\src\System\Single.cs (7)
294
Debug.
Assert
(IsNaN(value));
1539
Debug.
Assert
(IsNaN(x) || IsNaN(y));
1572
Debug.
Assert
(n == 0);
1611
Debug.
Assert
(IsPositiveInfinity(x));
1616
Debug.
Assert
(IsNegativeInfinity(x));
1656
Debug.
Assert
(IsPositiveInfinity(x));
1661
Debug.
Assert
(IsNegativeInfinity(x));
src\libraries\System.Private.CoreLib\src\System\Span.cs (1)
133
Debug.
Assert
(length >= 0);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (24)
18
Debug.
Assert
(searchSpaceLength >= 0);
19
Debug.
Assert
(valueLength >= 0);
83
Debug.
Assert
(offset >= 0);
85
Debug.
Assert
(offset + ch1ch2Distance + Vector512<byte>.Count <= searchSpaceLength);
144
Debug.
Assert
(offset >= 0);
146
Debug.
Assert
(offset + ch1ch2Distance + Vector256<byte>.Count <= searchSpaceLength);
205
Debug.
Assert
(offset >= 0);
207
Debug.
Assert
(offset + ch1ch2Distance + Vector128<byte>.Count <= searchSpaceLength);
254
Debug.
Assert
(searchSpaceLength >= 0);
255
Debug.
Assert
(valueLength >= 0);
276
Debug.
Assert
(0 <= offset && offset <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
828
Debug.
Assert
(lengthToExamine < length);
858
Debug.
Assert
(lengthToExamine < length);
888
Debug.
Assert
(lengthToExamine < length);
918
Debug.
Assert
(length <= (nuint)sizeof(nuint) * 2);
929
Debug.
Assert
(length >= (nuint)sizeof(nuint));
934
Debug.
Assert
(lengthToExamine < length);
965
Debug.
Assert
(firstLength >= 0);
966
Debug.
Assert
(secondLength >= 0);
1014
Debug.
Assert
(result != 0);
1055
Debug.
Assert
(result != 0);
1092
Debug.
Assert
(result != 0);
1202
Debug.
Assert
(length >= (uint)Vector128<byte>.Count);
1301
Debug.
Assert
(length > 1);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.ByteMemOps.cs (14)
59
Debug.
Assert
(len > 16 && len <= 64);
100
Debug.
Assert
(len > 16 && len <= 64);
118
Debug.
Assert
(len >= 8 && len <= 16);
134
Debug.
Assert
(len >= 4 && len < 8);
141
Debug.
Assert
(len < 4);
175
Debug.
Assert
(len > 64 && len <= MemmoveNativeThreshold);
231
Debug.
Assert
(len > 0);
242
Debug.
Assert
(len > 0);
266
Debug.
Assert
(len > 16 && len <= 64);
307
Debug.
Assert
(len > 16 && len <= 64);
325
Debug.
Assert
(len >= 8 && len <= 16);
341
Debug.
Assert
(len >= 4 && len < 8);
348
Debug.
Assert
(len < 4);
377
Debug.
Assert
(len > 64 && len <= ZeroMemoryNativeThreshold);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (20)
16
Debug.
Assert
(searchSpaceLength >= 0);
17
Debug.
Assert
(valueLength >= 0);
89
Debug.
Assert
(offset + ch1ch2Distance + Vector512<ushort>.Count <= searchSpaceLength);
156
Debug.
Assert
(offset + ch1ch2Distance + Vector256<ushort>.Count <= searchSpaceLength);
218
Debug.
Assert
(offset + ch1ch2Distance + Vector128<ushort>.Count <= searchSpaceLength);
266
Debug.
Assert
(searchSpaceLength >= 0);
267
Debug.
Assert
(valueLength >= 0);
288
Debug.
Assert
(0 <= offset && offset <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
467
Debug.
Assert
(firstLength >= 0);
468
Debug.
Assert
(secondLength >= 0);
585
Debug.
Assert
(length - offset >= Vector128<ushort>.Count);
646
Debug.
Assert
(lengthToExamine >= Vector512<ushort>.Count);
675
Debug.
Assert
(lengthToExamine >= Vector256<ushort>.Count);
698
Debug.
Assert
(lengthToExamine >= Vector128<ushort>.Count);
729
Debug.
Assert
(length - offset >= Vector128<ushort>.Count);
763
Debug.
Assert
(lengthToExamine >= Vector256<ushort>.Count);
786
Debug.
Assert
(lengthToExamine >= Vector128<ushort>.Count);
817
Debug.
Assert
(length - offset >= Vector128<ushort>.Count);
824
Debug.
Assert
(lengthToExamine >= Vector128<ushort>.Count);
889
Debug.
Assert
(length > 1);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (8)
35
Debug.
Assert
(pointerSizeLength <= 7);
68
Debug.
Assert
(pointerSizeLength >= 4);
77
Debug.
Assert
(pointerSizeLength >= 2);
84
Debug.
Assert
(pointerSizeLength >= 1);
92
Debug.
Assert
(length > 1);
197
Debug.
Assert
(length > 1);
303
Debug.
Assert
(length > 1);
335
Debug.
Assert
(length > 1);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (24)
26
Debug.
Assert
(PackedIndexOfIsSupported);
27
Debug.
Assert
(RuntimeHelpers.IsBitwiseEquatable<T>());
28
Debug.
Assert
(sizeof(T) == sizeof(ushort));
67
Debug.
Assert
((value | 0x20) == value);
76
Debug.
Assert
((value | 0x20) == value);
85
Debug.
Assert
((value0 | 0x20) == value0);
86
Debug.
Assert
((value1 | 0x20) == value1);
95
Debug.
Assert
((value0 | 0x20) == value0);
96
Debug.
Assert
((value1 | 0x20) == value1);
114
Debug.
Assert
(CanUsePackedIndexOf(value));
318
Debug.
Assert
(CanUsePackedIndexOf(value));
521
Debug.
Assert
(CanUsePackedIndexOf(value0));
522
Debug.
Assert
(CanUsePackedIndexOf(value1));
734
Debug.
Assert
(CanUsePackedIndexOf(value0));
735
Debug.
Assert
(CanUsePackedIndexOf(value1));
736
Debug.
Assert
(CanUsePackedIndexOf(value2));
952
Debug.
Assert
(CanUsePackedIndexOf(lowInclusive));
953
Debug.
Assert
(CanUsePackedIndexOf((short)(lowInclusive + rangeInclusive)));
954
Debug.
Assert
(rangeInclusive >= 0);
1147
Debug.
Assert
(Avx512BW.IsSupported);
1159
Debug.
Assert
(Avx2.IsSupported);
1171
Debug.
Assert
(Sse2.IsSupported);
1305
Debug.
Assert
(Avx2.IsSupported);
1317
Debug.
Assert
(Avx512F.IsSupported);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (28)
193
Debug.
Assert
(searchSpaceLength >= 0);
194
Debug.
Assert
(valueLength >= 0);
206
Debug.
Assert
(0 <= index && index <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
229
Debug.
Assert
(length >= 0);
235
Debug.
Assert
(value is not null);
301
Debug.
Assert
(length >= 0);
306
Debug.
Assert
(value is not null);
390
Debug.
Assert
(length >= 0);
396
Debug.
Assert
(value0 is not null && value1 is not null);
496
Debug.
Assert
(length >= 0);
502
Debug.
Assert
(value0 is not null && value1 is not null && value2 is not null);
601
Debug.
Assert
(searchSpaceLength >= 0);
602
Debug.
Assert
(valueLength >= 0);
672
Debug.
Assert
(searchSpaceLength >= 0);
673
Debug.
Assert
(valueLength >= 0);
691
Debug.
Assert
(0 <= index && index <= searchSpaceLength); // Ensures no deceptive underflows in the computation of "remainingSearchSpaceLength".
712
Debug.
Assert
(length >= 0);
716
Debug.
Assert
(value is not null);
795
Debug.
Assert
(length >= 0);
800
Debug.
Assert
(value0 is not null && value1 is not null);
900
Debug.
Assert
(length >= 0);
905
Debug.
Assert
(value0 is not null && value1 is not null && value2 is not null);
1005
Debug.
Assert
(searchSpaceLength >= 0);
1006
Debug.
Assert
(valueLength >= 0);
1197
Debug.
Assert
(length >= 0);
1289
Debug.
Assert
(firstLength >= 0);
1290
Debug.
Assert
(secondLength >= 0);
3064
Debug.
Assert
(oldValue is not null);
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (5)
146
Debug.
Assert
(Path.IsPathFullyQualified(startupHook.Path));
151
Debug.
Assert
(startupHook.AssemblyName != null);
167
Debug.
Assert
(assembly != null);
197
Debug.
Assert
(initializeMethod == null);
209
Debug.
Assert
(initializeMethod != null &&
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (15)
24
Debug.
Assert
(strA != null);
25
Debug.
Assert
(strB != null);
26
Debug.
Assert
(strA.Length == strB.Length);
37
Debug.
Assert
(strA != null);
38
Debug.
Assert
(strB != null);
39
Debug.
Assert
(indexA >= 0 && indexB >= 0);
40
Debug.
Assert
(countA >= 0 && countB >= 0);
41
Debug.
Assert
(indexA + countA <= strA.Length && indexB + countB <= strB.Length);
70
Debug.
Assert
(strA.Length == strB.Length);
77
Debug.
Assert
(strA != null);
78
Debug.
Assert
(strB != null);
419
Debug.
Assert
(comparisonType == StringComparison.OrdinalIgnoreCase); // CheckStringComparison validated these earlier
909
Debug.
Assert
(charsWritten == length);
1041
Debug.
Assert
((uint)comparisonType <= (uint)StringComparison.OrdinalIgnoreCase);
1061
Debug.
Assert
(comparisonType == StringComparison.Ordinal || comparisonType == StringComparison.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\String.cs (4)
228
Debug.
Assert
(numBytes >= 0);
229
Debug.
Assert
(pb <= (pb + numBytes));
531
Debug.
Assert
(bytes != null);
532
Debug.
Assert
(byteLength >= 0);
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (16)
43
Debug.
Assert
(dest != null);
44
Debug.
Assert
(src != null);
45
Debug.
Assert
(src.Length <= dest.Length - destPos);
123
Debug.
Assert
(s != null);
669
Debug.
Assert
(index > 2);
1221
Debug.
Assert
(compareInfo != null);
1411
Debug.
Assert
(indices.Length > 0);
1442
Debug.
Assert
(this.Length - thisIdx == dstSpan.Length - dstIdx);
1816
Debug.
Assert
(count >= 0);
1860
Debug.
Assert
(count >= 2);
1897
Debug.
Assert
(count >= 2);
1950
Debug.
Assert
(arrIndex < maxItems);
2039
Debug.
Assert
(sourceSpan.Length >= Vector128<ushort>.Count);
2258
Debug.
Assert
(startIndex == 0);
2500
Debug.
Assert
(trimChars != null);
2501
Debug.
Assert
(trimCharsLength > 0);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (7)
185
Debug.
Assert
(numElementsActuallyConverted <= numElementsToConvert);
199
Debug.
Assert
(numElementsActuallyConverted <= (nuint)buffer.Length);
211
Debug.
Assert
(typeof(TFrom) == typeof(byte) || typeof(TFrom) == typeof(ushort));
212
Debug.
Assert
(typeof(TTo) == typeof(byte) || typeof(TTo) == typeof(ushort));
213
Debug.
Assert
(typeof(TCasing) == typeof(ToUpperConversion) || typeof(TCasing) == typeof(ToLowerConversion));
346
Debug.
Assert
(Vector128.IsHardwareAccelerated);
405
Debug.
Assert
(Vector128.IsHardwareAccelerated);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.cs (3)
50
Debug.
Assert
(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
146
Debug.
Assert
((int)i > 3 * Vector256<T>.Count);
198
Debug.
Assert
((int)i > 3 * Vector128<T>.Count);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (6)
46
Debug.
Assert
(
70
Debug.
Assert
(Vector512<TLeft>.Count == Vector512<TRight>.Count
100
Debug.
Assert
(Vector256<TLeft>.Count == Vector256<TRight>.Count
200
Debug.
Assert
(
550
Debug.
Assert
(Vector256<byte>.Count == Vector256<ushort>.Count * 2);
575
Debug.
Assert
(Vector512<byte>.Count == Vector512<ushort>.Count * 2);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Transcoding.cs (2)
40
Debug.
Assert
(numElementsActuallyConverted <= numElementsToConvert);
75
Debug.
Assert
(numElementsActuallyConverted <= numElementsToConvert);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (23)
48
Debug.
Assert
(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
74
Debug.
Assert
((mask != 0) ? index < 16 : index >= 16);
337
Debug.
Assert
(sseMask != uint.MaxValue);
338
Debug.
Assert
(Sse2.IsSupported);
345
Debug.
Assert
(advSimdIndex != uint.MaxValue);
346
Debug.
Assert
(AdvSimd.IsSupported);
611
Debug.
Assert
(bufferLength < SizeOfVector128);
739
Debug.
Assert
(bufferLength <= nuint.MaxValue / sizeof(char));
967
Debug.
Assert
(bufferLength <= nuint.MaxValue / sizeof(char));
1162
Debug.
Assert
(bufferLength < SizeOfVector128InChars);
1246
Debug.
Assert
(AllCharsInUInt64AreAscii(value));
1300
Debug.
Assert
(AllCharsInUInt32AreAscii(value));
1364
Debug.
Assert
(currentOffset <= elementCount);
1586
Debug.
Assert
(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
1597
Debug.
Assert
(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
1621
Debug.
Assert
(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
1641
Debug.
Assert
(typeof(T) == typeof(byte) || typeof(T) == typeof(ushort));
1691
Debug.
Assert
(elementCount >= 2 * SizeOfVector128);
1809
Debug.
Assert
(elementCount >= 2 * Vector256.Size);
1926
Debug.
Assert
(elementCount >= 2 * Vector512.Size);
2055
Debug.
Assert
(currentOffset <= elementCount);
2225
Debug.
Assert
(typeof(TVectorByte) == typeof(Vector128<byte>));
2239
Debug.
Assert
(AllBytesInUInt32AreAscii(value));
src\libraries\System.Private.CoreLib\src\System\Text\CompositeFormat.cs (8)
35
Debug.
Assert
(format is not null);
39
Debug.
Assert
(segments is not null);
60
Debug.
Assert
(literalLength >= 0);
61
Debug.
Assert
(formattedCount >= 0);
62
Debug.
Assert
(formattedCount == 0 || argsRequired > 0);
184
Debug.
Assert
(format[pos - 1] == '{');
185
Debug.
Assert
(ch != '{');
316
Debug.
Assert
(format[pos] == '}');
src\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (5)
76
Debug.
Assert
(_encoding is not null);
127
Debug.
Assert
(_encoding is not null);
183
Debug.
Assert
(_encoding is not null);
237
Debug.
Assert
(_encoding is not null);
295
Debug.
Assert
(_encoding is not null);
src\libraries\System.Private.CoreLib\src\System\Text\EncoderFallback.cs (2)
197
Debug.
Assert
(encoding != null);
247
Debug.
Assert
(encoding != null);
src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (7)
72
Debug.
Assert
(_encoding is not null);
114
Debug.
Assert
(_encoding is not null);
170
Debug.
Assert
(_encoding is not null);
214
Debug.
Assert
(_encoding is not null);
285
Debug.
Assert
(_encoding is not null);
308
Debug.
Assert
(_fallbackBuffer is not null);
359
Debug.
Assert
(_encoding is not null);
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (2)
631
Debug.
Assert
(byteCount == bytesReceived);
657
Debug.
Assert
(byteCount == bytesReceived);
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (3)
688
Debug.
Assert
(encoder is null);
1272
Debug.
Assert
(fallbackBuffer.Remaining == 0);
1285
Debug.
Assert
(decoder is null);
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (6)
57
Debug.
Assert
(EncodingNameIndices.Length == CodePagesByName.Length + 1);
58
Debug.
Assert
(EncodingNameIndices[^1] == EncodingNames.Length);
68
Debug.
Assert
(index < EncodingNameIndices.Length - 1);
91
Debug.
Assert
(left < EncodingNameIndices.Length - 1);
131
Debug.
Assert
(arrayEncodingInfoIdx == arrayEncodingInfo.Length);
137
Debug.
Assert
(encodingInfoList != null);
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (11)
40
Debug.
Assert
(bufferLength <= nuint.MaxValue / sizeof(char));
204
Debug.
Assert
(bufferLength <= nuint.MaxValue / sizeof(char));
451
Debug.
Assert
(bufferLength < SizeOfVector128InChars);
630
Debug.
Assert
(currentOffset <= elementCount);
779
Debug.
Assert
(Sse2.IsSupported);
780
Debug.
Assert
(BitConverter.IsLittleEndian);
781
Debug.
Assert
(elementCount >= 2 * SizeOfVector128);
971
Debug.
Assert
(Sse2.IsSupported);
972
Debug.
Assert
(BitConverter.IsLittleEndian);
997
Debug.
Assert
(0 < currentOffset && currentOffset <= SizeOfVector128 / sizeof(char));
1071
Debug.
Assert
(!Sse2.IsSupported);
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.Helpers.cs (2)
51
Debug.
Assert
(AllCharsInUInt64AreLatin1(value));
95
Debug.
Assert
(AllCharsInUInt32AreLatin1(value));
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (7)
180
Debug.
Assert
(codeUnitCount > 0 && codeUnitCount <= MaxUtf16CharsPerRune);
197
Debug.
Assert
(codeUnitCount > 0 && codeUnitCount <= MaxUtf8BytesPerRune);
451
Debug.
Assert
(UnicodeUtility.IsInRangeInclusive(tempValue, 0x0080, 0x07FF));
502
Debug.
Assert
(UnicodeUtility.IsInRangeInclusive(tempValue, 0x0800, 0xFFFF));
531
Debug.
Assert
(1 <= bytesConsumed && bytesConsumed <= 4); // Valid subsequences are always length [1..4]
537
Debug.
Assert
(0 <= index && index <= 3); // Incomplete subsequences are always length 0..3
544
Debug.
Assert
(1 <= index && index <= 3); // Invalid subsequences are always length 1..3
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (34)
245
Debug.
Assert
(currentBlock.m_MaxCapacity == maxCapacity);
246
Debug.
Assert
(currentBlock.m_ChunkChars != null);
248
Debug.
Assert
(currentBlock.m_ChunkLength <= currentBlock.m_ChunkChars.Length);
249
Debug.
Assert
(currentBlock.m_ChunkLength >= 0);
250
Debug.
Assert
(currentBlock.m_ChunkOffset >= 0);
255
Debug.
Assert
(currentBlock.m_ChunkOffset == 0);
259
Debug.
Assert
(currentBlock.m_ChunkOffset == prevBlock.m_ChunkOffset + prevBlock.m_ChunkLength);
559
Debug.
Assert
(next.m_ChunkPrevious != null);
585
Debug.
Assert
(stringBuilder != null);
638
Debug.
Assert
(stringBuilder != null);
904
Debug.
Assert
(chunk != null);
956
Debug.
Assert
(insertingChars + this.Length < int.MaxValue);
1236
Debug.
Assert
(values != null);
1238
Debug.
Assert
(separatorLength >= 0);
1589
Debug.
Assert
(format[pos - 1] == '{');
1590
Debug.
Assert
(ch != '{');
1693
Debug.
Assert
(format[pos] == '}');
1921
Debug.
Assert
(index > 2);
2010
Debug.
Assert
(thisChunk != null && sbChunk != null);
2047
Debug.
Assert
(offset == Length);
2242
Debug.
Assert
(chunk.m_ChunkPrevious != null);
2505
Debug.
Assert
(0 <= index && index <= Length);
2510
Debug.
Assert
(result.m_ChunkPrevious != null);
2514
Debug.
Assert
(result != null);
2548
Debug.
Assert
(minBlockCharCount > 0);
2638
Debug.
Assert
(count > 0);
2639
Debug.
Assert
(index >= 0);
2650
Debug.
Assert
(chunk.m_ChunkPrevious != null);
2707
Debug.
Assert
(size > 0);
2708
Debug.
Assert
(maxCapacity > 0);
2733
Debug.
Assert
(startIndex >= 0 && startIndex < Length);
2761
Debug.
Assert
(chunk.m_ChunkPrevious != null);
3134
Debug.
Assert
(_hasCustomFormatter);
3135
Debug.
Assert
(_provider != null);
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.Debug.cs (2)
24
Debug.
Assert
(head.m_ChunkPrevious != null);
35
Debug.
Assert
(current.m_ChunkPrevious != null);
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (4)
55
Debug.
Assert
(innerStream != null);
56
Debug.
Assert
(innerEncoding != null);
57
Debug.
Assert
(thisEncoding != null);
150
Debug.
Assert
(pendingData.Count != 0);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.cs (10)
42
Debug.
Assert
(AllCharsInUInt32AreAscii(value));
72
Debug.
Assert
(AllCharsInUInt32AreAscii(value));
101
Debug.
Assert
(AllCharsInUInt64AreAscii(value));
130
Debug.
Assert
(AllCharsInUInt64AreAscii(value));
158
Debug.
Assert
(AllCharsInUInt32AreAscii(value));
183
Debug.
Assert
(AllCharsInUInt32AreAscii(value));
209
Debug.
Assert
(AllCharsInUInt32AreAscii(valueA));
210
Debug.
Assert
(AllCharsInUInt32AreAscii(valueB));
266
Debug.
Assert
(AllCharsInUInt64AreAscii(valueA));
267
Debug.
Assert
(AllCharsInUInt64AreAscii(valueB));
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (3)
33
Debug.
Assert
(0 <= numAsciiCharsConsumedJustNow && numAsciiCharsConsumedJustNow <= inputLength);
75
Debug.
Assert
(pHighestAddressWhereCanReadOneVector >= pInputBuffer);
271
Debug.
Assert
(pHighestAddressWhereCanReadOneVector >= pInputBuffer);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (8)
654
Debug.
Assert
(_hasCustomFormatter);
655
Debug.
Assert
(_provider is not null);
675
Debug.
Assert
(value is ISpanFormattable);
685
Debug.
Assert
(value is ISpanFormattable);
722
Debug.
Assert
(typeof(T).IsEnum);
732
Debug.
Assert
(value is ISpanFormattable);
766
Debug.
Assert
(startingPos >= 0 && startingPos <= _pos);
767
Debug.
Assert
(alignment != 0);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.cs (8)
62
Debug.
Assert
(AllBytesInUInt32AreAscii(value));
92
Debug.
Assert
(AllBytesInUInt32AreAscii(value));
121
Debug.
Assert
(AllBytesInUInt64AreAscii(value));
150
Debug.
Assert
(AllBytesInUInt64AreAscii(value));
179
Debug.
Assert
(AllBytesInUInt32AreAscii(valueA));
180
Debug.
Assert
(AllBytesInUInt32AreAscii(valueB));
242
Debug.
Assert
(AllBytesInUInt64AreAscii(valueA));
243
Debug.
Assert
(AllBytesInUInt64AreAscii(valueB));
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Helpers.cs (9)
20
Debug.
Assert
(UInt32BeginsWithUtf8ThreeByteMask(value));
45
Debug.
Assert
(UInt32BeginsWithUtf8TwoByteMask(value) && !UInt32BeginsWithOverlongUtf8TwoByteSequence(value));
108
Debug.
Assert
(IsWellFormedUtf16SurrogatePair(value));
186
Debug.
Assert
(IsFirstCharTwoUtf8Bytes(value) && IsSecondCharTwoUtf8Bytes(value));
214
Debug.
Assert
(IsFirstCharTwoUtf8Bytes(value));
456
Debug.
Assert
(UInt32BeginsWithUtf8TwoByteMask(value));
575
Debug.
Assert
(UInt32EndsWithUtf8TwoByteMask(value));
639
Debug.
Assert
(BitConverter.IsLittleEndian);
658
Debug.
Assert
(BitConverter.IsLittleEndian);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Transcoding.cs (8)
62
Debug.
Assert
(pInputBuffer <= pFinalPosWhereCanReadDWordFromInputBuffer);
132
Debug.
Assert
(!Ascii.AllBytesInUInt32AreAscii(secondDWord));
150
Debug.
Assert
(!Ascii.AllBytesInUInt32AreAscii(thisDWord)); // this should have been handled earlier
222
Debug.
Assert
(outputCharsRemaining == 1);
896
Debug.
Assert
(pInputBuffer <= pFinalPosWhereCanReadDWordFromInputBuffer);
1053
Debug.
Assert
(!Utf16Utility.AllCharsInUInt64AreAscii(possibleNonAsciiQWord)); // this condition should've been checked earlier
1120
Debug.
Assert
(!Utf16Utility.AllCharsInUInt32AreAscii(thisDWord)); // this should have been handled earlier
1397
Debug.
Assert
(inputLength < CharsPerDWord);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (5)
177
Debug.
Assert
((AdvSimd.Arm64.IsSupported && BitConverter.IsLittleEndian) || Sse2.IsSupported);
185
Debug.
Assert
(trailingZeroCount < 16);
221
Debug.
Assert
(!Ascii.AllBytesInUInt32AreAscii(thisDWord)); // this should have been handled earlier
647
Debug.
Assert
(inputLength < 4);
657
Debug.
Assert
(inputBufferRemainingBytes < 4);
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (1)
849
Debug.
Assert
(baseDecoder is not null);
src\libraries\System.Private.CoreLib\src\System\Text\UTF7Encoding.cs (1)
62
Debug.
Assert
(_base64Bytes.Length == 64);
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.Sealed.cs (6)
57
Debug.
Assert
(s != null);
58
Debug.
Assert
(s.Length <= MaxSmallInputElementCount);
68
Debug.
Assert
(0 <= bytesWritten && bytesWritten <= s.Length * MaxUtf8BytesPerChar);
135
Debug.
Assert
(bytes != null);
136
Debug.
Assert
(bytes.Length <= MaxSmallInputElementCount);
146
Debug.
Assert
(0 <= charsWritten && charsWritten <= sourceLength); // should never have more output chars than input bytes
src\libraries\System.Private.CoreLib\src\System\Text\ValueStringBuilder.AppendFormat.cs (3)
85
Debug.
Assert
(format[pos - 1] == '{');
86
Debug.
Assert
(ch != '{');
189
Debug.
Assert
(format[pos] == '}');
src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (6)
51
Debug.
Assert
(_valueChangedHandler is not null);
104
Debug.
Assert
(asyncLocalValueMap is not null);
105
Debug.
Assert
(asyncLocalValueMap == Empty || asyncLocalValueMap.GetType() != typeof(EmptyAsyncLocalValueMap));
392
Debug.
Assert
(keyValues.Length is >= 5 and <= MaxMultiElements);
522
Debug.
Assert
(index == MultiElementAsyncLocalValueMap.MaxMultiElements);
535
Debug.
Assert
(map.Count == count - 1);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (11)
323
Debug.
Assert
(IsCancellationRequested);
586
Debug.
Assert
(callback is Action<object?> || callback is Action<object?, CancellationToken>);
770
Debug.
Assert
(node.Registrations.Source == this);
771
Debug.
Assert
(node.Prev == null);
987
Debug.
Assert
(d is Action<object?> || d is Action<object?, CancellationToken>);
1033
Debug.
Assert
(_lock == 1);
1084
Debug.
Assert
(node.Prev == null);
1089
Debug.
Assert
(node.Prev != null);
1183
Debug.
Assert
(_lock == 1);
1212
Debug.
Assert
(Callback != null);
1220
Debug.
Assert
(node.Callback != null);
src\libraries\System.Private.CoreLib\src\System\Threading\DeferredDisposableLifetime.cs (1)
81
Debug.
Assert
(oldCount != 0 && oldCount != -1);
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (17)
84
Debug.
Assert
(isFlowSuppressed != m_isFlowSuppressed);
250
Debug.
Assert
(threadPoolThread == Thread.CurrentThread);
314
Debug.
Assert
(currentThread == Thread.CurrentThread);
315
Debug.
Assert
(contextToRestore != currentContext);
350
Debug.
Assert
(!Thread.IsThreadStartSupported || Thread.CurrentThread.IsThreadPoolThread); // there are no dedicated threadpool threads on runtimes where we can't start threads
357
Debug.
Assert
(previousExecutionCtx != nextExecutionCtx);
364
Debug.
Assert
(previousChangeNotifications != null || nextChangeNotifications != null);
372
Debug.
Assert
(previousExecutionCtx!.m_localValues != null);
373
Debug.
Assert
(nextExecutionCtx!.m_localValues != null);
407
Debug.
Assert
(previousExecutionCtx!.m_localValues != null);
421
Debug.
Assert
(nextExecutionCtx!.m_localValues != null);
456
Debug.
Assert
(!current.IsDefault);
470
Debug.
Assert
(!current.IsDefault);
493
Debug.
Assert
(!current.IsDefault);
513
Debug.
Assert
(newChangeNotifications != null);
514
Debug.
Assert
(Array.IndexOf(newChangeNotifications, local) >= 0);
556
Debug.
Assert
(currentThread == Thread.CurrentThread);
src\libraries\System.Private.CoreLib\src\System\Threading\IOCompletionCallbackHelper.cs (2)
34
Debug.
Assert
(pNativeOverlapped != null);
52
Debug.
Assert
(callback is IOCompletionCallbackHelper);
src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (3)
70
Debug.
Assert
(target != null);
121
Debug.
Assert
(target != null);
277
Debug.
Assert
(target != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (55)
77
Debug.
Assert
(currentThreadId.IsInitialized);
84
Debug.
Assert
(currentThreadId.IsInitialized);
85
Debug.
Assert
(currentThreadId.Id == _owningThreadId);
234
Debug.
Assert
(timeoutMs >= -1);
239
Debug.
Assert
(!new ThreadId(_owningThreadId).IsInitialized);
240
Debug.
Assert
(_recursionCount == 0);
273
Debug.
Assert
(currentThreadId.IsInitialized);
274
Debug.
Assert
(currentThreadId.Id == ThreadId.Current_NoInitialize.Id);
287
Debug.
Assert
(new ThreadId(_owningThreadId).IsInitialized);
288
Debug.
Assert
(_owningThreadId == ThreadId.Current_NoInitialize.Id);
289
Debug.
Assert
(new State(this).IsLocked);
312
Debug.
Assert
(timeoutMs >= -1);
319
Debug.
Assert
(_owningThreadId != currentThreadId.Id);
327
Debug.
Assert
(new State(this).IsLocked);
372
Debug.
Assert
(IsAdaptiveSpinEnabled(minSpinCountForAdaptiveSpin));
429
Debug.
Assert
(tryLockResult == TryLockResult.Wait);
451
Debug.
Assert
(tryLockResult == TryLockResult.Wait);
458
Debug.
Assert
(tryLockResult != TryLockResult.Spin);
464
Debug.
Assert
(tryLockResult == TryLockResult.Locked);
467
Debug.
Assert
(!new ThreadId(_owningThreadId).IsInitialized);
468
Debug.
Assert
(_recursionCount == 0);
559
Debug.
Assert
(!new ThreadId(_owningThreadId).IsInitialized);
560
Debug.
Assert
(_recursionCount == 0);
636
Debug.
Assert
(_waitEvent != null);
638
Debug.
Assert
(signaled);
651
Debug.
Assert
(!isHeld || new State(this).IsLocked);
663
Debug.
Assert
(_waitEvent != null);
729
Debug.
Assert
(!IsLocked);
737
Debug.
Assert
(!ShouldNotPreemptWaiters);
738
Debug.
Assert
(HasAnyWaiters);
745
Debug.
Assert
(ShouldNotPreemptWaiters);
753
Debug.
Assert
(HasAnyWaiters || !ShouldNotPreemptWaiters);
773
Debug.
Assert
(HasAnySpinners);
781
Debug.
Assert
(HasAnyWaiters);
782
Debug.
Assert
(NeedToSignalWaiter);
789
Debug.
Assert
(IsWaiterSignaledToWake);
801
Debug.
Assert
(lockObj._state == 0);
824
Debug.
Assert
(HasAnyWaiters);
832
Debug.
Assert
(HasAnyWaiters);
881
Debug.
Assert
(IsLockedMask == 1);
884
Debug.
Assert
(!state.IsLocked);
920
Debug.
Assert
(spinCount >= 0);
942
Debug.
Assert
(!newState.ShouldNotPreemptWaiters);
976
Debug.
Assert
(state.HasAnySpinners);
1004
Debug.
Assert
(new State(state._state + SpinnerCountIncrement).HasAnySpinners);
1008
Debug.
Assert
(state.HasAnyWaiters || !state.ShouldNotPreemptWaiters);
1068
Debug.
Assert
(state.HasAnyWaiters || waiterStartTimeWasReset);
1092
Debug.
Assert
(state.HasAnyWaiters);
1093
Debug.
Assert
(state.IsWaiterSignaledToWake);
1124
Debug.
Assert
(!state.ShouldNotPreemptWaiters || waiterStartTimeWasRecorded);
1148
Debug.
Assert
(new State(state._state + IsWaiterSignaledToWakeMask).IsWaiterSignaledToWake);
1153
Debug.
Assert
(state.HasAnyWaiters);
1183
Debug.
Assert
(!state.ShouldNotPreemptWaiters || waiterStartTimeWasRecorded);
1207
Debug.
Assert
(state.HasAnyWaiters);
1237
Debug.
Assert
(state.HasAnyWaiters);
src\libraries\System.Private.CoreLib\src\System\Threading\Lock.NonNativeAot.cs (4)
53
Debug.
Assert
(!IsInitialized);
54
Debug.
Assert
(t_threadId == 0);
65
Debug.
Assert
(id != 0);
76
Debug.
Assert
(IsInitialized);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (19)
26
Debug.
Assert
(initialSignalCount >= 0);
27
Debug.
Assert
(initialSignalCount <= maximumSignalCount);
28
Debug.
Assert
(maximumSignalCount > 0);
29
Debug.
Assert
(spinCount >= 0);
42
Debug.
Assert
(timeoutMs >= -1);
57
Debug.
Assert
(counts.SignalCount <= _maximumSignalCount);
153
Debug.
Assert
(timeoutMs > 0 || timeoutMs == -1);
173
Debug.
Assert
(counts.WaiterCount != 0);
211
Debug.
Assert
(releaseCount > 0);
212
Debug.
Assert
(releaseCount <= _maximumSignalCount);
248
Debug.
Assert
(releaseCount <= _maximumSignalCount - counts.SignalCount);
287
Debug.
Assert
(value <= uint.MaxValue - SignalCount);
295
Debug.
Assert
(SignalCount != 0);
307
Debug.
Assert
(WaiterCount < ushort.MaxValue);
313
Debug.
Assert
(WaiterCount != 0);
320
Debug.
Assert
(countsAfterUpdate.WaiterCount != ushort.MaxValue); // underflow check
331
Debug.
Assert
(SpinnerCount < byte.MaxValue);
337
Debug.
Assert
(SpinnerCount != 0);
359
Debug.
Assert
(CountOfWaitersSignaledToWake != 0);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLock.cs (9)
62
Debug.
Assert
(!isLocked || (_state & LockedMask) != 0);
72
Debug.
Assert
(_ownerThread == Thread.CurrentThread);
74
Debug.
Assert
((_state & LockedMask) != 0);
82
Debug.
Assert
(_ownerThread != Thread.CurrentThread);
90
Debug.
Assert
(_ownerThread == null);
159
Debug.
Assert
((_state & LockedMask) != 0);
187
Debug.
Assert
((uint)state >= WaiterCountIncrement);
192
Debug.
Assert
((_state & LockedMask) != 0);
198
Debug.
Assert
((_state & LockedMask) != 0);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelMonitor.cs (4)
36
Debug.
Assert
(IsLocked);
44
Debug.
Assert
(!IsLocked);
52
Debug.
Assert
(_ownerThread == null);
97
Debug.
Assert
(timeoutMilliseconds >= -1);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelMonitor.Unix.cs (1)
49
Debug.
Assert
(timeoutMilliseconds >= -1);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelSpinWaiter.cs (3)
21
Debug.
Assert
(condition != null);
56
Debug.
Assert
(spinIndex >= 0);
57
Debug.
Assert
(sleep0Threshold >= 0);
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (3)
86
Debug.
Assert
(m_eventObj != null);
280
Debug.
Assert
(m_lock != null); // if waiters>0, then m_lock has already been created.
652
Debug.
Assert
(mre.m_lock != null); // the lock should have been created before this callback is registered for use.
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (3)
181
Debug.
Assert
(GCHandleCountRef(pNativeOverlapped) == handleCount);
229
Debug.
Assert
(target is Overlapped);
232
Debug.
Assert
(overlapped._pNativeOverlapped == pNativeOverlapped);
src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (1)
258
Debug.
Assert
(!Monitor.IsEntered(this));
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.Blocking.cs (5)
44
Debug.
Assert
(_numBlockedThreads > 0);
70
Debug.
Assert
(BlockingConfig.IsCooperativeBlockingEnabled);
71
Debug.
Assert
(Thread.CurrentThread.IsThreadPoolThread);
77
Debug.
Assert
(_numBlockedThreads > 0);
123
Debug.
Assert
(_pendingBlockingAdjustment != PendingBlockingAdjustment.None);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (2)
324
Debug.
Assert
(t_completionCountObject == null);
347
Debug.
Assert
(threadLocalCompletionCountObject != null);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.GateThread.cs (4)
227
Debug.
Assert
(numRuns >= 0);
228
Debug.
Assert
(numRuns <= MaxRuns);
297
Debug.
Assert
(nextDelay <= GateActivitiesPeriodMs);
315
Debug.
Assert
(HasBlockingAdjustmentDelay);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (3)
438
Debug.
Assert
(numSamples >= period); // can't measure a wave that doesn't fit
439
Debug.
Assert
(period >= 2); // can't measure above the Nyquist frequency
440
Debug.
Assert
(numSamples <= samples.Length); // can't measure more samples than we have
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.ThreadCounts.cs (6)
37
Debug.
Assert
(value >= 0);
42
Debug.
Assert
(value >= 0);
55
Debug.
Assert
(value >= 0);
60
Debug.
Assert
(value >= 0);
73
Debug.
Assert
(value > 0);
78
Debug.
Assert
(value > 0);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (10)
220
Debug.
Assert
(registeredWait != null);
250
Debug.
Assert
(signaledHandleIndex != WaitHandle.WaitAbandoned); // the first wait handle is an event
262
Debug.
Assert
(signaledHandle != null);
276
Debug.
Assert
(registeredHandle != null);
295
Debug.
Assert
(_numPendingRemoves >= 0);
296
Debug.
Assert
(_numPendingRemoves <= _pendingRemoves.Length);
297
Debug.
Assert
(_numUserWaits >= 0);
298
Debug.
Assert
(_numUserWaits <= _registeredWaits.Length);
317
Debug.
Assert
(j < numUserWaits);
405
Debug.
Assert
(success);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WorkerTracking.cs (3)
87
Debug.
Assert
(Current == HighWatermark);
88
Debug.
Assert
(Current != short.MaxValue);
95
Debug.
Assert
(Current > 0);
src\libraries\System.Private.CoreLib\src\System\Threading\ProcessorIdCache.cs (1)
36
Debug.
Assert
(s_processorIdRefreshRate <= ProcessorIdCacheCountDownMask);
src\libraries\System.Private.CoreLib\src\System\Threading\ReaderWriterLockSlim.cs (24)
149
Debug.
Assert
(_spinLock.IsHeld);
157
Debug.
Assert
(_spinLock.IsHeld);
553
Debug.
Assert
(_fIsReentrant);
554
Debug.
Assert
(_fUpgradeThreadHoldingRead);
611
Debug.
Assert
((_owners & WRITER_HELD) > 0);
692
Debug.
Assert
((_owners & WRITER_HELD) > 0);
799
Debug.
Assert
(lrwc.readercount == 1);
907
Debug.
Assert
(_spinLock.IsHeld);
908
Debug.
Assert
(waitEvent == null);
931
Debug.
Assert
(enterLockType == EnterLockType.UpgradeToWrite);
954
Debug.
Assert
(_spinLock.IsHeld);
975
Debug.
Assert
(enterLockType == EnterLockType.UpgradeToWrite);
1067
Debug.
Assert
(_spinLock.IsHeld);
1129
Debug.
Assert
(_spinLock.IsHeld);
1138
Debug.
Assert
(_numReadWaiters != 0 || _numUpgradeWaiters != 0);
1469
Debug.
Assert
(
1489
Debug.
Assert
(DeprioritizeEnterAnyReadIncrement == (1 << 16));
1498
Debug.
Assert
(DeprioritizeEnterAnyWriteIncrement == 1);
1505
Debug.
Assert
((reason & EnterSpinLockReason.Wait) != 0 || reason == (reason & EnterSpinLockReason.OperationMask));
1506
Debug.
Assert
(
1515
Debug.
Assert
(
1526
Debug.
Assert
((GetEnterDeprioritizationStateChange(reason) & DeprioritizeEnterAnyWriteIncrement) == 0);
1530
Debug.
Assert
((GetEnterDeprioritizationStateChange(reason) & DeprioritizeEnterAnyWriteIncrement) != 0);
1595
Debug.
Assert
(
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (8)
88
Debug.
Assert
(!IsInfiniteTimeout);
96
Debug.
Assert
(WaitThread != null);
172
Debug.
Assert
(handleValue == handle!.DangerousGetHandle());
194
Debug.
Assert
(_numRequestedCallbacks != 0);
272
Debug.
Assert
(IsBlocking);
273
Debug.
Assert
(_unregisterCalled); // Should only be called when the wait is unregistered by the user.
282
Debug.
Assert
(!IsBlocking);
283
Debug.
Assert
(_unregisterCalled); // Should only be called when the wait is unregistered by the user.
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Unix.cs (1)
35
Debug.
Assert
(_waitHandle != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.Windows.cs (3)
22
Debug.
Assert
(initialCount >= 0);
23
Debug.
Assert
(maximumCount >= 1);
24
Debug.
Assert
(initialCount <= maximumCount);
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
790
Debug.
Assert
(m_countOfWaitersPulsedToWake <= waitCount);
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (3)
365
Debug.
Assert
((newOwner & WAITERS_MASK) >= 0);
397
Debug.
Assert
(!IsThreadOwnerTrackingEnabled); // Make sure the waiters never be negative which will cause the thread tracking bit to be flipped
409
Debug.
Assert
(IsThreadOwnerTrackingEnabled);
src\libraries\System.Private.CoreLib\src\System\Threading\SpinWait.cs (4)
101
Debug.
Assert
(value >= 0);
158
Debug.
Assert
(sleep1Threshold >= -1);
159
Debug.
Assert
(sleep1Threshold < 0 || sleep1Threshold >= YieldThreshold);
263
Debug.
Assert
(result);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
211
Debug.
Assert
(state is ConcurrentExclusiveSchedulerPair);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (3)
410
Debug.
Assert
(success);
487
Debug.
Assert
(m_action != null);
1422
Debug.
Assert
(task != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (9)
1270
Debug.
Assert
(thisRef != null);
1634
Debug.
Assert
(continuationAction != null);
1679
Debug.
Assert
(state is Func<Task[], TResult>);
1686
Debug.
Assert
(continuationAction != null);
1691
Debug.
Assert
(state is Action<Task[]>);
1999
Debug.
Assert
(state is Func<Task, TResult>);
2006
Debug.
Assert
(continuationAction != null);
2010
Debug.
Assert
(state is Action<Task>);
2052
Debug.
Assert
(continuationAction != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (35)
639
Debug.
Assert
(continuation != null);
1991
Debug.
Assert
(userDelegateExecute || m_contingentProperties != null);
2153
Debug.
Assert
(childTask != null);
2198
Debug.
Assert
(props != null);
2220
Debug.
Assert
(exceptionHolder != null);
2382
Debug.
Assert
(obj is Task);
2415
Debug.
Assert
(unhandledException != null);
2485
Debug.
Assert
(continuationAction != null);
2556
Debug.
Assert
(stateMachineBox != null);
2862
Debug.
Assert
(source != null);
2863
Debug.
Assert
(millisecondsDelay != 0);
2917
Debug.
Assert
(completingTask.IsCompleted);
3007
Debug.
Assert
(IsCompleted || millisecondsTimeout != Timeout.Infinite);
3221
Debug.
Assert
(m_contingentProperties is null || m_contingentProperties.m_cancellationToken == default);
3242
Debug.
Assert
(m_contingentProperties!.m_cancellationToken == default);
3435
Debug.
Assert
(continuationObject != null);
3537
Debug.
Assert
(currentContinuation is TaskContinuation);
3574
Debug.
Assert
(currentContinuation is ITaskCompletionAction);
4594
Debug.
Assert
(tc != null);
5312
Debug.
Assert
(firstCompleted.Status == TaskStatus.RanToCompletion);
5314
Debug.
Assert
(signaledTaskIndex >= 0);
5445
Debug.
Assert
(exception != null);
5459
Debug.
Assert
(exception != null);
5752
Debug.
Assert
(millisecondsDelay != 0);
5811
Debug.
Assert
(token.CanBeCanceled);
6072
Debug.
Assert
(failedOrCanceled is List<Task>);
6095
Debug.
Assert
(completed);
6127
Debug.
Assert
(failedOrCanceled is Task);
6145
Debug.
Assert
(IsCompleted);
6391
Debug.
Assert
(task.Status == TaskStatus.RanToCompletion);
6565
Debug.
Assert
(task1 != null && task2 != null);
6601
Debug.
Assert
(task1 != null && task2 != null);
6602
Debug.
Assert
(task1.IsCompleted || task2.IsCompleted);
6860
Debug.
Assert
(_waitForNextCompletedTask.GetStatus(_waitForNextCompletedTask.Version) == ValueTaskSourceStatus.Pending);
6981
Debug.
Assert
(outerTask != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskAsyncEnumerableExtensions.ToBlockingEnumerable.cs (2)
45
Debug.
Assert
(moveNextTask.IsCompleted);
63
Debug.
Assert
(disposeTask.IsCompleted);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (19)
39
Debug.
Assert
(m_action != null);
85
Debug.
Assert
(m_action != null);
131
Debug.
Assert
(m_action != null);
177
Debug.
Assert
(m_action != null);
216
Debug.
Assert
(task != null);
217
Debug.
Assert
(task.m_taskScheduler != null);
291
Debug.
Assert
(completedTask != null);
295
Debug.
Assert
(continuationTask != null);
369
Debug.
Assert
(state is Action);
385
Debug.
Assert
(context != null);
418
Debug.
Assert
(state is SynchronizationContextAwaitTaskContinuation);
466
Debug.
Assert
(scheduler != null);
534
Debug.
Assert
(action != null);
549
Debug.
Assert
(action != null);
550
Debug.
Assert
(scheduler != null);
669
Debug.
Assert
(state is Action);
683
Debug.
Assert
(callback != null);
684
Debug.
Assert
(currentTask == Task.t_currentTask);
826
Debug.
Assert
(m_action != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (3)
1598
Debug.
Assert
(tasksCopy != null);
1668
Debug.
Assert
(tasksCopy != null);
2338
Debug.
Assert
(tasks != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (2)
232
Debug.
Assert
(task != null);
605
Debug.
Assert
(s is Task);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ThreadPoolTaskScheduler.cs (1)
34
Debug.
Assert
(s is Task);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TplEventSource.cs (1)
546
Diagnostics.Debug.
Assert
(stateMachineBox != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (12)
175
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
301
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
324
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
346
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
373
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
394
Debug.
Assert
(obj == null || obj is Task || obj is IValueTaskSource);
575
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
707
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
730
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
752
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
779
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
803
Debug.
Assert
(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (8)
42
Debug.
Assert
(state != null);
280
Debug.
Assert
(startHelper != null);
397
Debug.
Assert
(this == CurrentThread);
398
Debug.
Assert
(IsThreadPoolThread);
424
Debug.
Assert
(this == CurrentThread);
425
Debug.
Assert
(!IsThreadStartSupported || IsThreadPoolThread); // there are no dedicated threadpool threads on runtimes where we can't start threads
426
Debug.
Assert
(_mayNeedResetForThreadPool);
698
Debug.
Assert
(slot.Data != null);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadBlockingInfo.cs (8)
66
Debug.
Assert
(objectPtr != null);
77
Debug.
Assert
(_objectPtr != null);
78
Debug.
Assert
(t_first != null);
79
Debug.
Assert
(t_first->_next == _next);
95
Debug.
Assert
(_objectPtr != null);
114
Debug.
Assert
(_objectKind == ObjectKind.Condition);
134
Debug.
Assert
(_objectPtr != null);
147
Debug.
Assert
(_objectKind == ObjectKind.Condition);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadInt64PersistentCounter.cs (6)
30
Debug.
Assert
(threadLocalCountObject is ThreadLocalNode);
37
Debug.
Assert
(threadLocalCountObject is ThreadLocalNode);
99
Debug.
Assert
(counter != null);
139
Debug.
Assert
(count != 0);
154
Debug.
Assert
(count != 0);
180
Debug.
Assert
(node != null);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (4)
516
Debug.
Assert
(table.Length < minLength);
554
Debug.
Assert
(minSize > 0);
707
Debug.
Assert
(slotArray != null);
746
Debug.
Assert
(linkedSlot._previous != null);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Portable.cs (1)
81
Debug.
Assert
(wrapper._boundHandle != null);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (30)
31
Debug.
Assert
(queue != null);
35
Debug.
Assert
(Array.IndexOf(oldQueues, queue) < 0);
49
Debug.
Assert
(queue != null);
182
Debug.
Assert
(m_headIndex <= m_tailIndex);
200
Debug.
Assert
(unused == null || unused == obj);
431
Debug.
Assert
(s_assignableWorkItemQueueCount > 0);
442
Debug.
Assert
(count >= 0);
473
Debug.
Assert
(s_assignableWorkItemQueueCount > 0);
488
Debug.
Assert
(_assignedWorkItemQueueThreadCounts[queueIndex] >= 0);
511
Debug.
Assert
(s_assignableWorkItemQueueCount > 0);
519
Debug.
Assert
(newCount >= 0);
547
Debug.
Assert
(ThreadPoolWorkQueueThreadLocals.threadLocals == null);
596
Debug.
Assert
((callback is IThreadPoolWorkItem) ^ (callback is Task));
620
Debug.
Assert
((workItem is IThreadPoolWorkItem) ^ (workItem is Task));
723
Debug.
Assert
(!tl.isProcessingHighPriorityWorkItems);
985
Debug.
Assert
(ThreadPool.EnableWorkerTracking);
986
Debug.
Assert
(currentThread == Thread.CurrentThread);
1011
Debug.
Assert
(workItem is IThreadPoolWorkItem);
1100
Debug.
Assert
(_isScheduledForProcessing != 0);
1121
Debug.
Assert
(tl != null);
1123
Debug.
Assert
(currentThread == Thread.CurrentThread);
1193
Debug.
Assert
(quwi._callback != null);
1202
Debug.
Assert
(context != null);
1225
Debug.
Assert
(callback != null);
1236
Debug.
Assert
(_callback != null);
1251
Debug.
Assert
(callback != null);
1262
Debug.
Assert
(_callback != null);
1279
Debug.
Assert
(callback != null);
1290
Debug.
Assert
(_callback != null);
1614
Debug.
Assert
(null != workItem);
src\libraries\System.Private.CoreLib\src\System\Threading\TimeoutHelper.cs (1)
33
Debug.
Assert
(originalWaitMillisecondsTimeout != Timeout.Infinite);
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (7)
405
Debug.
Assert
(timer._short);
410
Debug.
Assert
(!timer._short);
431
Debug.
Assert
(ActiveCount >= 0);
582
Debug.
Assert
(toSignal != null);
648
Debug.
Assert
(
699
Debug.
Assert
(toSignal is WaitHandle || toSignal is Task);
737
Debug.
Assert
(state is TimerQueueTimer);
src\libraries\System.Private.CoreLib\src\System\Threading\TimerQueue.Portable.cs (2)
29
Debug.
Assert
(s_scheduledTimers == null);
50
Debug.
Assert
((int)actualDuration >= 0);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (9)
113
Debug.
Assert
(millisecondsTimeout >= -1);
242
Debug.
Assert
(waitHandles.Length > 0);
243
Debug.
Assert
(waitHandles.Length <= MaxWaitHandles);
287
Debug.
Assert
(lastSafeWaitHandle != null);
372
Debug.
Assert
(safeWaitHandles.Length != 0);
373
Debug.
Assert
(safeWaitHandles.Length <= MaxWaitHandles);
374
Debug.
Assert
(millisecondsTimeout >= -1);
385
Debug.
Assert
(safeWaitHandles[i] != null);
395
Debug.
Assert
(safeWaitHandles[i] != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (4)
109
Debug.
Assert
(dataArray![dataIndex] == data);
117
Debug.
Assert
(callback != null);
189
Debug.
Assert
(!data._completed);
219
Debug.
Assert
(state != null);
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.OverlappedData.cs (1)
23
Debug.
Assert
(_boundHandle == null); //not in use
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (1)
720
Debug.
Assert
(array.Length - offset < count);
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (4)
862
Debug.
Assert
(result != ParseFailureKind.None);
869
Debug.
Assert
(result == ParseFailureKind.Format_DateTimeOnlyContainsNoneDateParts);
930
Debug.
Assert
(charsWritten == destination.Length);
937
Debug.
Assert
(charsWritten == destination.Length);
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (2)
314
System.Diagnostics.Debug.
Assert
(minUnits < 0);
315
System.Diagnostics.Debug.
Assert
(maxUnits > 0);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (3)
313
Debug.
Assert
(_adjustmentRules != null);
2044
Debug.
Assert
(zone != null);
2055
Debug.
Assert
(Monitor.IsEntered(cachedData));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.Unix.cs (1)
77
Debug.
Assert
(!GlobalizationMode.Invariant);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (4)
281
Debug.
Assert
(Monitor.IsEntered(cachedData));
297
Debug.
Assert
(Monitor.IsEntered(cachedData));
908
Debug.
Assert
(date[0] == 'J');
939
Debug.
Assert
(i > 0 && i < days.Length);
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (13)
546
Debug.
Assert
(value >= 0);
547
Debug.
Assert
(double.IsFinite(value));
548
Debug.
Assert
(value < TwoPow128);
738
Debug.
Assert
(destination.Length >= Size);
1117
Debug.
Assert
(left.Length >= right.Length);
1137
Debug.
Assert
(q <= 0xFFFFFFFF);
1191
Debug.
Assert
(left.Length >= 1);
1192
Debug.
Assert
(right.Length >= 1);
1193
Debug.
Assert
(left.Length >= right.Length);
1257
Debug.
Assert
(carry == (t + 1));
1263
Debug.
Assert
(carry == 1);
1287
Debug.
Assert
(left.Length >= right.Length);
1288
Debug.
Assert
(q <= 0xFFFFFFFF);
src\libraries\System.Private.CoreLib\src\System\Version.cs (3)
85
Debug.
Assert
(version != null);
175
Debug.
Assert
(success);
205
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
src\libraries\System.Private.CoreLib\src\System\WeakReference.cs (1)
223
Debug.
Assert
(this.GetType() != typeof(WeakReference));
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (2)
24
Debug.
Assert
(genericArgs.Length > 0);
183
Debug.
Assert
(rankOrModifier >= 2);
src\System\Array.CoreCLR.cs (11)
101
Debug.
Assert
(sourceArray.Rank == destinationArray.Rank);
156
Debug.
Assert
(!destTH.IsTypeDesc && destTH.AsMethodTable()->IsValueType);
157
Debug.
Assert
(!RuntimeHelpers.GetMethodTable(sourceArray)->GetArrayElementTypeHandle().AsMethodTable()->IsValueType);
198
Debug.
Assert
(!srcTH.IsTypeDesc && srcTH.AsMethodTable()->IsValueType);
199
Debug.
Assert
(!RuntimeHelpers.GetMethodTable(destinationArray)->GetArrayElementTypeHandle().AsMethodTable()->IsValueType);
387
Debug.
Assert
(destElType == CorElementType.ELEMENT_TYPE_R8);
426
Debug.
Assert
(totalByteLength % (nuint)sizeof(IntPtr) == 0);
473
Debug.
Assert
(Rank == 1);
489
Debug.
Assert
(indices.Length == Rank);
503
Debug.
Assert
((nuint)flattenedIndex < (nuint)LongLength);
528
Debug.
Assert
((nuint)flattenedIndex < NativeLength);
src\System\Attribute.CoreCLR.cs (13)
18
Debug.
Assert
(element != null);
19
Debug.
Assert
(type != null);
20
Debug.
Assert
(type.IsSubclassOf(typeof(Attribute)) || type == typeof(Attribute));
88
Debug.
Assert
(property != null);
122
Debug.
Assert
(element != null);
123
Debug.
Assert
(type != null);
124
Debug.
Assert
(type.IsSubclassOf(typeof(Attribute)) || type == typeof(Attribute));
162
Debug.
Assert
(ev != null);
180
Debug.
Assert
(element != null);
211
Debug.
Assert
(param != null);
239
Debug.
Assert
(param != null);
328
Debug.
Assert
(param != null);
329
Debug.
Assert
(type != null);
src\System\Collections\Generic\ComparerHelpers.cs (2)
30
Debug.
Assert
(type != null && type is RuntimeType);
64
Debug.
Assert
(type != null && type is RuntimeType);
src\System\Enum.CoreCLR.cs (5)
23
Debug.
Assert
(rt.IsActualEnum);
72
Debug.
Assert
(s_underlyingTypes[(int)CorElementType.ELEMENT_TYPE_U] == typeof(nuint));
77
Debug.
Assert
(underlyingType != null);
106
Debug.
Assert
(values!.GetType() == typeof(TStorage[]));
107
Debug.
Assert
(!getNames || names!.GetType() == typeof(string[]));
src\System\GC.CoreCLR.cs (7)
498
Debug.
Assert
(status == StartNoGCRegionStatus.Succeeded);
689
Debug.
Assert
(false);
702
Debug.
Assert
(pWorkItem->scheduled);
829
Debug.
Assert
(name != null);
830
Debug.
Assert
(configurationContext != null);
833
Debug.
Assert
(context.Configurations != null);
946
Debug.
Assert
(status == RefreshMemoryStatus.Succeeded);
src\System\MulticastDelegate.CoreCLR.cs (4)
125
Debug.
Assert
(d != null);
126
Debug.
Assert
(_invocationList is object[]);
135
Debug.
Assert
(invocationList[i] is Delegate);
297
Debug.
Assert
(_invocationList is object[]);
src\System\Object.CoreCLR.cs (1)
25
Debug.
Assert
(clone != this);
src\System\Reflection\Associates.cs (2)
48
Debug.
Assert
(declaredType != null);
49
Debug.
Assert
(reflectedType != null);
src\System\Reflection\Emit\DynamicILGenerator.cs (1)
753
Debug.
Assert
(m_exceptions != null);
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (2)
105
Debug.
Assert
(_methodHandle != null);
106
Debug.
Assert
(_parameterTypes != null);
src\System\Reflection\Emit\RuntimeAssemblyBuilder.cs (1)
94
Debug.
Assert
(name is not null);
src\System\Reflection\Emit\RuntimeILGenerator.cs (11)
30
Debug.
Assert
(incoming != null);
87
Debug.
Assert
(methodBuilder != null);
88
Debug.
Assert
(methodBuilder is MethodBuilder || methodBuilder is DynamicMethod);
158
Debug.
Assert
(m_depthAdjustment >= 0);
159
Debug.
Assert
(m_curDepth >= 0);
317
Debug.
Assert
(depth >= -1);
318
Debug.
Assert
(targetDepth >= -1);
332
Debug.
Assert
(m_depthAdjustment >= 0);
362
Debug.
Assert
(m_RelocFixupList == null);
1099
Debug.
Assert
(depth >= -1);
1449
Debug.
Assert
(exc != null);
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (7)
867
Debug.
Assert
(tryStartOffset >= 0);
868
Debug.
Assert
(tryEndOffset >= 0);
869
Debug.
Assert
(filterOffset >= 0);
870
Debug.
Assert
(handlerStartOffset >= 0);
871
Debug.
Assert
(handlerEndOffset >= 0);
872
Debug.
Assert
(IsValidKind((ExceptionHandlingClauseOptions)kind));
873
Debug.
Assert
(kind != (int)ExceptionHandlingClauseOptions.Clause || (exceptionTypeToken & 0x00FFFFFF) != 0);
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (7)
129
Debug.
Assert
(method != null);
139
Debug.
Assert
(method != null);
152
Debug.
Assert
(runtimeField != null);
416
Debug.
Assert
(methodBase is RuntimeMethodInfo || methodBase is RuntimeConstructorInfo);
420
Debug.
Assert
(masmi != null);
460
Debug.
Assert
(method is RuntimeMethodInfo || method is RuntimeConstructorInfo);
1073
Debug.
Assert
(methodInfo != null);
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (4)
47
Debug.
Assert
(m_con != null);
360
Debug.
Assert
(declMeth != null);
374
Debug.
Assert
(declType != null);
1474
Debug.
Assert
(m_isHiddenGlobalType || typeInfo != null);
src\System\Reflection\Emit\SignatureHelper.cs (6)
273
Debug.
Assert
(clsArgument != null);
293
Debug.
Assert
(!MetadataToken.IsNullToken(token));
315
Debug.
Assert
(!MetadataToken.IsNullToken(token));
736
Debug.
Assert
(clsArgument != null);
756
Debug.
Assert
(!MetadataToken.IsNullToken(token));
779
Debug.
Assert
(!MetadataToken.IsNullToken(token));
src\System\Reflection\MdImport.cs (3)
194
Debug.
Assert
(0 <= index && index < Length);
284
Debug.
Assert
(marshalTypeName is not null);
363
Debug.
Assert
(stringMetadataEncoding != null);
src\System\Reflection\RuntimeAssembly.cs (1)
743
Debug.
Assert
((type != null) != (exception != null)); // Exactly one of these must be non-null.
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (2)
39
Debug.
Assert
((flags & InvocationFlags.Initialized) == InvocationFlags.Initialized);
206
Debug.
Assert
((InvocationFlags & InvocationFlags.RunClassConstructor) != 0);
src\System\Reflection\RuntimeCustomAttributeData.cs (64)
20
Debug.
Assert
(target is not null);
30
Debug.
Assert
(target is not null);
40
Debug.
Assert
(target is not null);
50
Debug.
Assert
(target is not null);
57
Debug.
Assert
(target is not null);
64
Debug.
Assert
(target is not null);
71
Debug.
Assert
(target is not null);
81
Debug.
Assert
(target is not null);
90
Debug.
Assert
(target is not null);
100
Debug.
Assert
(pseudoAttributes.Count != 0);
405
Debug.
Assert
(allCtors.Length == 1);
406
Debug.
Assert
(allCtors[0].GetParametersAsSpan().Length == 0);
476
Debug.
Assert
(p.MemberInfo is not null);
547
Debug.
Assert
(type is not null);
672
Debug.
Assert
(customAttributeCtorParameters is not null);
673
Debug.
Assert
(customAttributeNamedParameters is not null);
785
Debug.
Assert
(namedArgType.EncodedEnumType == argType.EncodedEnumType);
936
Debug.
Assert
(size <= (_blob.Length - _curr));
1086
Debug.
Assert
(parameterType is not null);
1124
Debug.
Assert
(type is not null);
1153
Debug.
Assert
(method is not null);
1154
Debug.
Assert
(caType is not null);
1180
Debug.
Assert
(ctor is not null);
1181
Debug.
Assert
(caType is not null);
1190
Debug.
Assert
(property is not null);
1191
Debug.
Assert
(caType is not null);
1200
Debug.
Assert
(e is not null);
1201
Debug.
Assert
(caType is not null);
1210
Debug.
Assert
(field is not null);
1211
Debug.
Assert
(caType is not null);
1221
Debug.
Assert
(parameter is not null);
1222
Debug.
Assert
(caType is not null);
1232
Debug.
Assert
(assembly is not null);
1233
Debug.
Assert
(caType is not null);
1241
Debug.
Assert
(module is not null);
1242
Debug.
Assert
(caType is not null);
1251
Debug.
Assert
(type is not null);
1252
Debug.
Assert
(caType is not null);
1296
Debug.
Assert
(method is not null);
1297
Debug.
Assert
(caType is not null);
1338
Debug.
Assert
(ctor != null);
1339
Debug.
Assert
(caType != null);
1348
Debug.
Assert
(property is not null);
1349
Debug.
Assert
(caType is not null);
1358
Debug.
Assert
(e is not null);
1359
Debug.
Assert
(caType is not null);
1368
Debug.
Assert
(field is not null);
1369
Debug.
Assert
(caType is not null);
1380
Debug.
Assert
(parameter is not null);
1381
Debug.
Assert
(caType is not null);
1392
Debug.
Assert
(assembly is not null);
1393
Debug.
Assert
(caType is not null);
1403
Debug.
Assert
(module is not null);
1404
Debug.
Assert
(caType is not null);
1437
Debug.
Assert
(attributeCtorToken == 0);
1456
Debug.
Assert
(attributeFilterType is null);
2002
Debug.
Assert
(type is not null);
2003
Debug.
Assert
(caType is not null);
2046
Debug.
Assert
(method is not null);
2047
Debug.
Assert
(caType is not null);
2086
Debug.
Assert
(parameter is not null);
2087
Debug.
Assert
(caType is not null);
2142
Debug.
Assert
(field is not null);
2143
Debug.
Assert
(caType is not null);
src\System\Reflection\RuntimeEventInfo.cs (3)
30
Debug.
Assert
(declaredType != null);
31
Debug.
Assert
(reflectedTypeCache != null);
32
Debug.
Assert
(!reflectedTypeCache.IsGlobal);
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (3)
38
Debug.
Assert
((flags & InvocationFlags.Initialized) == InvocationFlags.Initialized);
59
Debug.
Assert
(!handle.IsNullHandle());
60
Debug.
Assert
(methodAttributes == RuntimeMethodHandle.GetAttributes(handle));
src\System\Reflection\RuntimeParameterInfo.cs (15)
16
Debug.
Assert
(method is RuntimeMethodInfo || method is RuntimeConstructorInfo);
23
Debug.
Assert
(method is RuntimeMethodInfo || method is RuntimeConstructorInfo);
35
Debug.
Assert
(ReferenceEquals(methodHandle, member));
130
Debug.
Assert
(result != null);
164
Debug.
Assert
(m_originalMember != null);
183
Debug.
Assert
(member != null);
184
Debug.
Assert
(MdToken.IsNullToken(tkParamDef) == scope.Equals((MetadataImport)default));
185
Debug.
Assert
(MdToken.IsNullToken(tkParamDef) || MdToken.IsTokenOfType(tkParamDef, MetadataTokenType.ParamDef));
221
Debug.
Assert
(m_signature != null);
229
Debug.
Assert
(parameterType != null);
335
Debug.
Assert
(!m_noMetadata);
376
Debug.
Assert
(attr.Constructor.DeclaringType == typeof(DecimalConstantAttribute));
378
Debug.
Assert
(args.Count == 5);
397
Debug.
Assert
(attr.Constructor.DeclaringType == typeof(DateTimeConstantAttribute));
398
Debug.
Assert
(attr.ConstructorArguments.Count == 1);
src\System\Reflection\RuntimePropertyInfo.cs (6)
34
Debug.
Assert
(declaredType != null);
35
Debug.
Assert
(reflectedTypeCache != null);
36
Debug.
Assert
(!reflectedTypeCache.IsGlobal);
106
Debug.
Assert
(Name.Equals(target.Name));
107
Debug.
Assert
(this != target);
108
Debug.
Assert
(this.ReflectedType == target.ReflectedType);
src\System\Reflection\TypeNameResolver.CoreCLR.cs (1)
122
Debug.
Assert
(type != null);
src\System\Runtime\CompilerServices\CastHelpers.cs (5)
171
Debug.
Assert
(!((MethodTable*)toTypeHnd)->HasTypeEquivalence);
224
Debug.
Assert
(result != CastResult.CannotCast);
396
Debug.
Assert
(index >= 0);
413
Debug.
Assert
(index >= 0);
455
Debug.
Assert
(obj != null);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (7)
283
Debug.
Assert
(ObjectHasComponentSize(array));
291
Debug.
Assert
(GetMultiDimensionalArrayRank(array) > 0);
660
Debug.
Assert
(HasComponentSize);
672
Debug.
Assert
(HasComponentSize);
711
Debug.
Assert
(HasComponentSize);
736
Debug.
Assert
(HasCheckedCanCompareBitsOrUseFastGetHashCode);
782
Debug.
Assert
(!IsTypeDesc);
src\System\RuntimeHandles.cs (2)
276
Debug.
Assert
(rt != null);
884
Debug.
Assert
(method != null);
src\System\RuntimeType.ActivatorCache.cs (2)
35
Debug.
Assert
(rt != null);
95
Debug.
Assert
(_ctorIsPublic); // implicit parameterless ctor is always considered public
src\System\RuntimeType.CoreCLR.cs (55)
76
Debug.
Assert
(index < Count);
175
Debug.
Assert
(retVal || RequiresStringComparison());
568
Debug.
Assert
(false);
583
Debug.
Assert
(cachedMembers![freeSlotIndex] == null);
600
Debug.
Assert
(declaringType != null);
615
Debug.
Assert
(!methodHandle.IsNullHandle());
620
Debug.
Assert
(
671
Debug.
Assert
(!methodHandle.IsNullHandle());
677
Debug.
Assert
(
709
Debug.
Assert
(
726
Debug.
Assert
((methodAttributes & (MethodAttributes.Virtual | MethodAttributes.Abstract)) == 0);
775
Debug.
Assert
(!methodHandle.IsNullHandle());
781
Debug.
Assert
(
880
Debug.
Assert
(declaringType != null);
881
Debug.
Assert
(ReflectedType != null);
896
Debug.
Assert
(!runtimeFieldHandle.IsNullHandle());
926
Debug.
Assert
(declaringType != null);
927
Debug.
Assert
(ReflectedType != null);
943
Debug.
Assert
(MdToken.IsTokenOfType(tkField, MetadataTokenType.FieldDef));
944
Debug.
Assert
(!MdToken.IsNullToken(tkField));
1033
Debug.
Assert
(interfaceType.IsInterface);
1140
Debug.
Assert
(ReflectedType != null);
1188
Debug.
Assert
(!MdToken.IsNullToken(tkEvent));
1189
Debug.
Assert
(MdToken.IsTokenOfType(tkEvent, MetadataTokenType.Event));
1231
Debug.
Assert
(ReflectedType != null);
1237
Debug.
Assert
(declaringType != null);
1300
Debug.
Assert
((declaringType.IsInterface && isInterface && csPropertyInfos == null) ||
1307
Debug.
Assert
(!MdToken.IsNullToken(tkProperty));
1308
Debug.
Assert
(MdToken.IsTokenOfType(tkProperty, MetadataTokenType.Property));
1349
Debug.
Assert
(associateMethod.IsVirtual);
1424
Debug.
Assert
(listType == MemberListType.All);
1519
Debug.
Assert
(m_runtimeType.IsFunctionPointer);
1524
Debug.
Assert
(value.Length > 0);
1600
Debug.
Assert
(enclosingType != typeof(void));
1646
Debug.
Assert
(m_runtimeType.IsGenericType);
1806
Debug.
Assert
(!methodHandle.IsNullHandle());
2045
Debug.
Assert
(fullname.Equals(ns + "." + name));
2133
Debug.
Assert
(name != null);
2154
Debug.
Assert
(memberInfo != null);
2155
Debug.
Assert
(name is null || (bindingFlags & BindingFlags.IgnoreCase) == 0 || (name.ToLowerInvariant().Equals(name)));
2228
Debug.
Assert
(type is not null);
2229
Debug.
Assert
(type is RuntimeType);
2261
Debug.
Assert
(methodBase != null);
2309
Debug.
Assert
((callConv & CallingConventions.VarArgs) != 0);
2428
Debug.
Assert
(cache == null || cache is RuntimeTypeCache);
2445
Debug.
Assert
(cache is RuntimeTypeCache);
2474
Debug.
Assert
(cache != null);
2710
Debug.
Assert
(i == members.Length);
2730
Debug.
Assert
(interfaceType.IsInterface); // VerifyInterfaceIsImplemented enforces this invariant
2731
Debug.
Assert
(!IsInterface); // VerifyInterfaceIsImplemented enforces this invariant
2752
Debug.
Assert
(ifaceMethodBase is RuntimeMethodInfo);
2769
Debug.
Assert
(rtTypeMethodBase is null || rtTypeMethodBase is RuntimeMethodInfo);
3112
Debug.
Assert
(i == compressMembers.Length);
3728
Debug.
Assert
(parameters.Length > 0);
3856
Debug.
Assert
((invokeMethod.CallingConvention & CallingConventions.VarArgs) ==
src\System\RuntimeType.CreateUninitializedCache.CoreCLR.cs (2)
27
Debug.
Assert
(rt != null);
60
Debug.
Assert
(rt != null);
src\System\StubHelpers.cs (3)
1548
Debug.
Assert
(success);
1567
Debug.
Assert
(success);
1586
Debug.
Assert
(success);
src\System\Text\StringBuilder.CoreCLR.cs (1)
15
Debug.
Assert
(requiredCapacity <= m_MaxCapacity);
src\System\Threading\LowLevelLifoSemaphore.Unix.cs (7)
20
Debug.
Assert
(maximumSignalCount > 0);
26
Debug.
Assert
(_semaphore != null);
27
Debug.
Assert
(timeoutMs >= -1);
30
Debug.
Assert
(waitResult == WaitHandle.WaitSuccess || waitResult == WaitHandle.WaitTimeout);
39
Debug.
Assert
(_semaphore != null);
40
Debug.
Assert
(count > 0);
47
Debug.
Assert
(_semaphore != null);
src\System\Threading\Monitor.CoreCLR.cs (1)
48
Debug.
Assert
(lockTaken);
src\System\Threading\Thread.CoreCLR.cs (3)
101
Debug.
Assert
(startHelper != null);
366
Debug.
Assert
(this == CurrentThread);
367
Debug.
Assert
(IsThreadPoolThread);
src\System\Threading\ThreadPool.CoreCLR.cs (2)
47
Debug.
Assert
(nextConfigVariableIndex > configVariableIndex);
50
Debug.
Assert
(appContextConfigNameUnsafe != null);
src\System\TypedReference.CoreCLR.cs (1)
36
Debug.
Assert
(pMethodTable is not null);
src\System\ValueType.cs (2)
138
Debug.
Assert
(fieldSize != 0);
143
Debug.
Assert
(fieldMT != null);
System.Private.CoreLib.Generators (5)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (5)
28
Debug.
Assert
(value >= 0);
29
Debug.
Assert
(value <= _span.Length);
38
Debug.
Assert
(index < _pos);
106
Debug.
Assert
(length >= 0);
134
Debug.
Assert
(_pos == _span.Length);
System.Private.DataContractSerialization (328)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
System\Runtime\Serialization\ClassDataContract.cs (6)
189
Debug.
Assert
(UnderlyingType != Globals.TypeOfSchemaDefinedType);
219
Debug.
Assert
(UnderlyingType != Globals.TypeOfSchemaDefinedType);
385
Debug.
Assert
(context != null);
957
Debug.
Assert
(Members != null);
1105
Debug.
Assert
(method.DeclaringType != null);
1122
Debug.
Assert
(method.DeclaringType != null);
System\Runtime\Serialization\CodeGenerator.cs (6)
25
Debug.
Assert
(s_getTypeFromHandle != null);
39
Debug.
Assert
(s_objectEquals != null);
53
Debug.
Assert
(s_arraySetValue != null);
67
Debug.
Assert
(s_objectToString != null);
81
Debug.
Assert
(s_stringFormat != null);
91
Debug.
Assert
(typeof(Delegate).IsAssignableFrom(delegateType));
System\Runtime\Serialization\CollectionDataContract.cs (8)
617
Debug.
Assert
(KeyName != null);
618
Debug.
Assert
(ValueName != null);
1159
Debug.
Assert
(knownInterfaceType != null);
1169
Debug.
Assert
(getEnumeratorMethod != null);
1230
Debug.
Assert
(addMethodTypeArray != null);
1235
Debug.
Assert
(getEnumeratorMethod != null);
1558
Debug.
Assert
(context != null);
1569
Debug.
Assert
(context != null);
System\Runtime\Serialization\DataContract.cs (3)
1025
Debug.
Assert
(value != null);
1035
Debug.
Assert
(value != null);
2424
Debug.
Assert
(_paramGenericInfos != null);
System\Runtime\Serialization\EnumDataContract.cs (1)
112
Debug.
Assert
(retVal != null); // Enums can only have certain base types. We shouldn't come up empty here.
System\Runtime\Serialization\ExtensionDataReader.cs (5)
537
Debug.
Assert
(_element != null);
556
Debug.
Assert
(_element != null);
575
Debug.
Assert
(_element != null);
610
Debug.
Assert
(dataNode.OwnerDocument != null); // OwnerDocument is always set on initialized dataNodes
659
Debug.
Assert
(dataNode.Value != null);
System\Runtime\Serialization\Json\JsonClassDataContract.cs (1)
108
Debug.
Assert
(context != null);
System\Runtime\Serialization\Json\JsonCollectionDataContract.cs (2)
131
Debug.
Assert
(context != null);
153
Debug.
Assert
(context != null);
System\Runtime\Serialization\Json\JsonDataContract.cs (2)
133
Debug.
Assert
(context != null);
142
Debug.
Assert
(context != null);
System\Runtime\Serialization\Json\JsonEncodingStreamWrapper.cs (6)
185
Debug.
Assert
(_bytes != null);
186
Debug.
Assert
(_chars != null);
261
Debug.
Assert
(_bytes != null);
262
Debug.
Assert
(_chars != null);
356
Debug.
Assert
(_bytes != null);
420
Debug.
Assert
(_bytes != null);
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (33)
96
Debug.
Assert
(s_boxPointer != null);
109
Debug.
Assert
(s_collectionItemNameProperty != null);
129
Debug.
Assert
(s_ienumeratorGetCurrentMethod != null);
142
Debug.
Assert
(s_getItemContractMethod != null);
155
Debug.
Assert
(s_getJsonDataContractMethod != null);
168
Debug.
Assert
(s_getJsonMemberIndexMethod != null);
181
Debug.
Assert
(s_getRevisedItemContractMethod != null);
194
Debug.
Assert
(s_getUninitializedObjectMethod != null);
207
Debug.
Assert
(s_isStartElementMethod0 != null);
219
Debug.
Assert
(s_isStartElementMethod2 != null);
231
Debug.
Assert
(s_localNameProperty != null);
243
Debug.
Assert
(s_namespaceProperty != null);
255
Debug.
Assert
(s_ienumeratorMoveNextMethod != null);
267
Debug.
Assert
(s_moveToContentMethod != null);
279
Debug.
Assert
(s_nodeTypeProperty != null);
291
Debug.
Assert
(s_onDeserializationMethod != null);
305
Debug.
Assert
(s_readJsonValueMethod != null);
317
Debug.
Assert
(s_serializationExceptionCtor != null);
330
Debug.
Assert
(s_throwDuplicateMemberExceptionMethod != null);
342
Debug.
Assert
(s_throwMissingRequiredMembersMethod != null);
354
Debug.
Assert
(s_typeHandleProperty != null);
366
Debug.
Assert
(s_unboxPointer != null);
378
Debug.
Assert
(s_useSimpleDictionaryFormatReadProperty != null);
390
Debug.
Assert
(s_useSimpleDictionaryFormatWriteProperty != null);
402
Debug.
Assert
(s_writeAttributeStringMethod != null);
414
Debug.
Assert
(s_writeEndElementMethod != null);
427
Debug.
Assert
(s_writeJsonISerializableMethod != null);
439
Debug.
Assert
(s_writeJsonNameWithMappingMethod != null);
452
Debug.
Assert
(s_writeJsonValueMethod != null);
464
Debug.
Assert
(s_writeStartElementMethod != null);
477
Debug.
Assert
(s_writeStartElementStringMethod != null);
490
Debug.
Assert
(s_parseEnumMethod != null);
503
Debug.
Assert
(s_getJsonMemberNameMethod != null);
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (3)
685
Debug.
Assert
(growingCollection != null);
1010
Debug.
Assert
(collectionContract.AddMethod != null);
1020
Debug.
Assert
(collectionContract.AddMethod != null);
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (3)
339
Debug.
Assert
(collectionContract.GetEnumeratorMethod != null);
426
Debug.
Assert
(keyValueTypes != null);
437
Debug.
Assert
(keyValueTypes != null);
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (7)
25
Debug.
Assert
(classDataContract != null);
34
Debug.
Assert
(_classContract != null);
65
Debug.
Assert
(jsonContext != null);
120
Debug.
Assert
(jsonContext != null);
121
Debug.
Assert
(collectionContract.Kind == CollectionKind.Dictionary || collectionContract.Kind == CollectionKind.GenericDictionary);
133
Debug.
Assert
(jsonContext != null);
240
Debug.
Assert
(dictionary != null);
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (1)
204
Debug.
Assert
(memberNames != null);
System\Runtime\Serialization\Json\XmlJsonReader.cs (1)
418
Debug.
Assert
(_charactersToSkipOnNextRead != null);
System\Runtime\Serialization\ReflectionClassWriter.cs (1)
53
Debug.
Assert
(memberValue != null);
System\Runtime\Serialization\ReflectionReader.cs (4)
37
Debug.
Assert
(context != null);
49
Debug.
Assert
(memberNames != null);
229
Debug.
Assert
(dataMember != null);
241
Debug.
Assert
(memberInfo != null);
System\Runtime\Serialization\ReflectionXmlFormatReader.cs (3)
25
Debug.
Assert
(classDataContract != null);
63
Debug.
Assert
(memberNamespaces != null);
126
Debug.
Assert
(collectionContract.Kind == CollectionKind.Dictionary || collectionContract.Kind == CollectionKind.GenericDictionary);
System\Runtime\Serialization\SchemaExporter.cs (1)
309
Debug.
Assert
(genericArgumentCounts != null);
System\Runtime\Serialization\SchemaImporter.cs (6)
484
Debug.
Assert
(dataContract != null); // Throws above if false
664
Debug.
Assert
(dataContract.BaseClassContract != null); // ImportBaseContract will always set this... or throw.
836
Debug.
Assert
(dataContract.BaseClassContract != null); // ImportBaseContract will always set this... or throw.
997
Debug.
Assert
(dataContract.Members != null); // This method is only called from ImportClass() after that method has initialized the Members collection.
998
Debug.
Assert
(memberName != null); // At this point, elements without a name should have been handled.
1060
Debug.
Assert
(element.Name != null);
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (74)
23
Debug.
Assert
(s_writeStartElementMethod2 != null);
37
Debug.
Assert
(s_writeStartElementMethod3 != null);
51
Debug.
Assert
(s_writeEndElementMethod != null);
65
Debug.
Assert
(s_writeNamespaceDeclMethod != null);
85
Debug.
Assert
(s_dictionaryEnumeratorCtor != null);
99
Debug.
Assert
(s_ienumeratorMoveNextMethod != null);
113
Debug.
Assert
(s_ienumeratorGetCurrentMethod != null);
128
Debug.
Assert
(s_getItemContractMethod != null);
142
Debug.
Assert
(s_isStartElementMethod2 != null);
156
Debug.
Assert
(s_isStartElementMethod0 != null);
171
Debug.
Assert
(s_getUninitializedObjectMethod != null);
185
Debug.
Assert
(s_onDeserializationMethod != null);
202
Debug.
Assert
(s_nodeTypeProperty != null);
224
Debug.
Assert
(s_hashtableCtor != null);
238
Debug.
Assert
(s_getStreamingContextMethod != null);
252
Debug.
Assert
(s_getCollectionMemberMethod != null);
266
Debug.
Assert
(s_storeCollectionMemberInfoMethod != null);
280
Debug.
Assert
(s_resetCollectionMemberInfoMethod != null);
294
Debug.
Assert
(s_storeIsGetOnlyCollectionMethod != null);
308
Debug.
Assert
(s_resetIsGetOnlyCollection != null);
322
Debug.
Assert
(s_throwNullValueReturnedForGetOnlyCollectionExceptionMethod != null);
336
Debug.
Assert
(s_throwArrayExceededSizeExceptionMethod != null);
350
Debug.
Assert
(s_incrementItemCountMethod != null);
365
Debug.
Assert
(s_internalDeserializeMethod != null);
379
Debug.
Assert
(s_moveToNextElementMethod != null);
394
Debug.
Assert
(s_getMemberIndexMethod != null);
409
Debug.
Assert
(s_getMemberIndexWithRequiredMembersMethod != null);
423
Debug.
Assert
(s_throwRequiredMemberMissingExceptionMethod != null);
437
Debug.
Assert
(s_skipUnknownElementMethod != null);
452
Debug.
Assert
(s_readIfNullOrRefMethod != null);
466
Debug.
Assert
(s_readAttributesMethod != null);
480
Debug.
Assert
(s_resetAttributesMethod != null);
494
Debug.
Assert
(s_getObjectIdMethod != null);
508
Debug.
Assert
(s_getArraySizeMethod != null);
522
Debug.
Assert
(s_addNewObjectMethod != null);
536
Debug.
Assert
(s_addNewObjectWithIdMethod != null);
550
Debug.
Assert
(s_replaceDeserializedObjectMethod != null);
565
Debug.
Assert
(s_getExistingObjectMethod != null);
579
Debug.
Assert
(s_getRealObjectMethod != null);
593
Debug.
Assert
(s_ensureArraySizeMethod != null);
607
Debug.
Assert
(s_trimArraySizeMethod != null);
621
Debug.
Assert
(s_checkEndOfArrayMethod != null);
635
Debug.
Assert
(s_getArrayLengthMethod != null);
650
Debug.
Assert
(s_readSerializationInfoMethod != null);
664
Debug.
Assert
(s_createUnexpectedStateExceptionMethod != null);
679
Debug.
Assert
(s_internalSerializeReferenceMethod != null);
694
Debug.
Assert
(s_internalSerializeMethod != null);
709
Debug.
Assert
(s_writeNullMethod != null);
723
Debug.
Assert
(s_incrementArrayCountMethod != null);
737
Debug.
Assert
(s_incrementCollectionCountMethod != null);
751
Debug.
Assert
(s_incrementCollectionCountGenericMethod != null);
765
Debug.
Assert
(s_getDefaultValueMethod != null);
787
Debug.
Assert
(s_getNullableValueMethod != null);
801
Debug.
Assert
(s_throwRequiredMemberMustBeEmittedMethod != null);
815
Debug.
Assert
(s_getHasValueMethod != null);
830
Debug.
Assert
(s_writeISerializableMethod != null);
852
Debug.
Assert
(s_writeXmlValueMethod != null);
867
Debug.
Assert
(s_readXmlValueMethod != null);
881
Debug.
Assert
(s_namespaceProperty != null);
895
Debug.
Assert
(s_contractNamespacesField != null);
909
Debug.
Assert
(s_memberNamesField != null);
927
Debug.
Assert
(s_childElementNamespacesProperty != null);
941
Debug.
Assert
(s_collectionItemNameProperty != null);
956
Debug.
Assert
(s_childElementNamespaceProperty != null);
970
Debug.
Assert
(s_getDateTimeOffsetMethod != null);
984
Debug.
Assert
(s_getDateTimeOffsetAdapterMethod != null);
998
Debug.
Assert
(s_getMemoryStreamMethod != null);
1012
Debug.
Assert
(s_getMemoryStreamAdapterMethod != null);
1026
Debug.
Assert
(s_getTypeHandleMethod != null);
1040
Debug.
Assert
(s_getTypeMethod != null);
1054
Debug.
Assert
(s_throwInvalidDataContractExceptionMethod != null);
1068
Debug.
Assert
(s_serializeReadOnlyTypesProperty != null);
1082
Debug.
Assert
(s_classSerializationExceptionMessageProperty != null);
1096
Debug.
Assert
(s_collectionSerializationExceptionMessageProperty != null);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (12)
292
Debug.
Assert
(_objectLocal != null);
293
Debug.
Assert
(_objectType != null);
309
Debug.
Assert
(_objectLocal != null);
310
Debug.
Assert
(_objectType != null);
331
Debug.
Assert
(_objectLocal != null);
417
Debug.
Assert
(_objectLocal != null);
418
Debug.
Assert
(_objectType != null);
490
Debug.
Assert
(_objectLocal != null);
491
Debug.
Assert
(_objectType != null);
715
Debug.
Assert
(growingCollection != null);
841
Debug.
Assert
(_objectLocal != null);
915
Debug.
Assert
(collectionContract.AddMethod != null);
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (1)
418
Debug.
Assert
(collectionContract.GetEnumeratorMethod != null);
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (10)
153
Debug.
Assert
(attributes != null);
296
Debug.
Assert
(attributes != null);
327
Debug.
Assert
(attributes != null);
339
Debug.
Assert
(attributes != null);
592
Debug.
Assert
(attributes != null);
713
Debug.
Assert
(attributes != null);
767
Debug.
Assert
(attributes != null);
809
Debug.
Assert
(attributes != null);
866
Debug.
Assert
(attributes != null);
1099
Debug.
Assert
(attributes != null);
System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (2)
63
Debug.
Assert
(_serializationSurrogateProvider != null);
123
Debug.
Assert
(attributes != null);
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (2)
146
Debug.
Assert
(rootTypeDataContract != null);
602
Debug.
Assert
(DataContractResolver != null);
System\Text\Base64Encoding.cs (5)
73
Debug.
Assert
(pch + 4 <= pchMax);
133
Debug.
Assert
(pch + 4 <= pchMax);
206
Debug.
Assert
(pch + 4 <= pchMax);
331
Debug.
Assert
(pb - pbMax == 3);
416
Debug.
Assert
(pb - pbMax == 3);
System\Xml\EncodingStreamWrapper.cs (5)
596
Debug.
Assert
(_bytes != null);
597
Debug.
Assert
(_chars != null);
633
Debug.
Assert
(_bytes != null);
695
Debug.
Assert
(_bytes != null);
696
Debug.
Assert
(_chars != null);
System\Xml\PrefixHandle.cs (4)
37
Debug.
Assert
(type != PrefixHandleType.Buffer);
121
Debug.
Assert
(type != PrefixHandleType.Buffer);
127
Debug.
Assert
(index >= 0 && index < 26);
133
Debug.
Assert
(type != PrefixHandleType.Buffer);
System\Xml\StringHandle.cs (7)
103
Debug.
Assert
(_type == StringHandleType.UTF8);
160
Debug.
Assert
(type == StringHandleType.EscapedUTF8);
197
Debug.
Assert
(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString);
208
Debug.
Assert
(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString);
219
Debug.
Assert
(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString);
230
Debug.
Assert
(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString);
243
Debug.
Assert
(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString);
System\Xml\ValueHandle.cs (19)
511
Debug.
Assert
(bytes != null);
542
Debug.
Assert
(str[i] < 128);
844
Debug.
Assert
(_type == ValueHandleType.UTF8);
852
Debug.
Assert
(_type == ValueHandleType.Unicode);
858
Debug.
Assert
(_type == ValueHandleType.EscapedUTF8);
876
Debug.
Assert
(_type == ValueHandleType.Char);
882
Debug.
Assert
(_type == ValueHandleType.Int8);
888
Debug.
Assert
(_type == ValueHandleType.Int16);
894
Debug.
Assert
(_type == ValueHandleType.Int32);
900
Debug.
Assert
(_type == ValueHandleType.Int64 || _type == ValueHandleType.TimeSpan || _type == ValueHandleType.DateTime);
906
Debug.
Assert
(_type == ValueHandleType.UInt64);
912
Debug.
Assert
(_type == ValueHandleType.Single);
918
Debug.
Assert
(_type == ValueHandleType.Double);
924
Debug.
Assert
(_type == ValueHandleType.Decimal);
930
Debug.
Assert
(_type == ValueHandleType.UniqueId);
936
Debug.
Assert
(_type == ValueHandleType.Guid);
942
Debug.
Assert
(_type == ValueHandleType.Base64);
948
Debug.
Assert
(_type == ValueHandleType.Dictionary);
954
Debug.
Assert
(_type == ValueHandleType.QName);
System\Xml\XmlBaseReader.cs (23)
661
Debug.
Assert
(qnameType == QNameType.Xmlns);
749
Debug.
Assert
(qnameType == QNameType.Xmlns);
892
Debug.
Assert
(qnameType == QNameType.Xmlns);
1068
Debug.
Assert
(qnameType == QNameType.Xmlns);
1109
Debug.
Assert
(qnameType == QNameType.Xmlns);
1423
Debug.
Assert
(_trailBytes != null);
1930
Debug.
Assert
(qnameType == QNameType.Xmlns);
2104
public StringHandle LocalName { get { Debug.
Assert
(_qnameType != QNameType.Xmlns); return _localName; } }
2105
public PrefixHandle Prefix { get { Debug.
Assert
(_qnameType != QNameType.Xmlns); return _prefix; } }
2110
public ValueHandle Value { get { Debug.
Assert
(_qnameType != QNameType.Xmlns); return _value; } }
2206
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2219
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2232
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2245
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2258
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2271
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2284
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2297
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2311
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2325
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2340
Debug.
Assert
(_qnameType == QNameType.Xmlns);
2681
Debug.
Assert
(qnameType == QNameType.Xmlns);
3067
Debug.
Assert
(s != null);
System\Xml\XmlBaseWriter.cs (3)
1745
Debug.
Assert
(_trailBytes != null);
1761
Debug.
Assert
(_trailBytes != null);
2373
Debug.
Assert
(nsCount >= 1 && _namespaces![0].Prefix!.Length == 0 && _namespaces[0].Uri!.Length == 0);
System\Xml\XmlBinaryReader.cs (1)
415
Debug.
Assert
(_arrayState == ArrayState.Element);
System\Xml\XmlBinaryWriter.cs (12)
87
Debug.
Assert
(nodeType == XmlBinaryNodeType.Chars8Text || nodeType == XmlBinaryNodeType.Bytes8Text || nodeType == XmlBinaryNodeType.UnicodeChars8Text);
228
Debug.
Assert
(nodeType >= XmlBinaryNodeType.MinText && nodeType <= XmlBinaryNodeType.MaxText && ((byte)nodeType & 1) == 0);
357
Debug.
Assert
(t.Dictionary == _dictionary);
406
Debug.
Assert
(length < 128);
630
Debug.
Assert
(charCount > 0);
666
Debug.
Assert
(length <= byte.MaxValue);
779
Debug.
Assert
(intsWritten == 4);
826
Debug.
Assert
(!_inList);
837
Debug.
Assert
(_inList);
962
Debug.
Assert
(intsWritten == 4);
1066
Debug.
Assert
(result);
1136
Debug.
Assert
(result);
System\Xml\XmlBufferReader.cs (19)
193
Debug.
Assert
(_offsetMax < _windowOffsetMax);
214
Debug.
Assert
(_offset <= int.MaxValue - count);
225
Debug.
Assert
(newOffsetMax <= _windowOffsetMax);
235
Debug.
Assert
(needed > 0);
248
Debug.
Assert
(_offset + count <= _offsetMax);
254
Debug.
Assert
(_stream != null);
295
Debug.
Assert
(value >= _offsetMin && value <= _offsetMax);
302
Debug.
Assert
(count >= 0);
706
Debug.
Assert
(buffer[offset + 0] == '&');
707
Debug.
Assert
(buffer[offset + 1] == '#');
708
Debug.
Assert
(buffer[offset + length - 1] == ';');
725
Debug.
Assert
(buffer[offset + 0] == '&');
726
Debug.
Assert
(buffer[offset + 1] == '#');
727
Debug.
Assert
(buffer[offset + 2] == 'x');
728
Debug.
Assert
(buffer[offset + length - 1] == ';');
736
Debug.
Assert
(digit >= 0 && digit < 16);
749
Debug.
Assert
(buffer[offset] == '&');
750
Debug.
Assert
(buffer[offset + length - 1] == ';');
1025
Debug.
Assert
(nodeType != XmlBinaryNodeType.StartListText);
System\Xml\XmlCanonicalWriter.cs (3)
279
Debug.
Assert
(_xmlnsBuffer != null);
623
Debug.
Assert
(_xmlnsBuffer != null);
783
Debug.
Assert
(attribute.nsOffset == 0 && attribute.nsLength == 0);
System\Xml\XmlConverter.cs (6)
706
Debug.
Assert
(value >= int.MinValue && value <= int.MaxValue);
788
Debug.
Assert
(s[i] < 128);
1004
Debug.
Assert
(value >= 0 && value < 100);
1021
Debug.
Assert
(value >= 0 && value < 10000);
1029
Debug.
Assert
(value >= 0 && value < 10000000);
1142
Debug.
Assert
(count == chars.Length);
System\Xml\XmlDictionaryAsyncCheckWriter.cs (1)
22
Debug.
Assert
(writer is IXmlTextWriterInitializer);
System\Xml\XmlSigningNodeWriter.cs (5)
85
Debug.
Assert
(prefix != null);
99
Debug.
Assert
(prefix != null);
112
Debug.
Assert
(prefix != null);
119
Debug.
Assert
(prefix != null);
133
Debug.
Assert
(prefix != null);
System\Xml\XmlStreamNodeWriter.cs (9)
69
Debug.
Assert
(count >= 0 && count <= bufferLength);
81
Debug.
Assert
(offset + count <= bufferLength);
93
Debug.
Assert
(count >= 0 && count <= bufferLength);
105
Debug.
Assert
(offset + count <= bufferLength);
116
Debug.
Assert
(_offset + count <= bufferLength);
155
Debug.
Assert
(ch < 0x80);
161
Debug.
Assert
(ch < 0x80);
202
Debug.
Assert
(ch1 < 0x80 && ch2 < 0x80);
208
Debug.
Assert
(ch1 < 0x80 && ch2 < 0x80);
System\Xml\XmlUTF8TextReader.cs (1)
1088
Debug.
Assert
(BufferReader.GetByte() == '&');
System.Private.Uri (81)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (7)
25
Debug.
Assert
(capacity >= 0);
54
Debug.
Assert
(index >= 0 && index < _count);
78
Debug.
Assert
(_count > 0);
87
Debug.
Assert
(_count > 0);
104
Debug.
Assert
(_array != null); // Nonzero _count should imply this
134
Debug.
Assert
(_count < Capacity);
141
Debug.
Assert
(minimum > Capacity);
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (1)
114
Debug.
Assert
(start < end);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\DomainNameHelper.cs (3)
75
Debug.
Assert
(index == -1 || char.IsAsciiLetterUpper(str[start + index]));
212
Debug.
Assert
(ReferenceEquals(hostname, UriHelper.StripBidiControlCharacters(hostname, hostname)));
269
Debug.
Assert
(charsWritten == label.Length);
System\IPv6AddressHelper.cs (5)
38
Debug.
Assert
(success);
43
Debug.
Assert
(success);
48
Debug.
Assert
(success);
53
Debug.
Assert
(success);
82
Debug.
Assert
(success);
System\IriHelper.cs (2)
32
Debug.
Assert
(char.IsHighSurrogate(highSurr));
134
Debug.
Assert
(charactersRead > 0);
System\PercentEncodingHelper.cs (14)
18
Debug.
Assert
(length >= 3);
19
Debug.
Assert
(input[0] == '%');
20
Debug.
Assert
(UriHelper.DecodeHexChars(input[1], input[2]) != Uri.c_DummyChar);
21
Debug.
Assert
(UriHelper.DecodeHexChars(input[1], input[2]) >= 128);
61
Debug.
Assert
(value >= 128);
80
Debug.
Assert
(totalCharsConsumed % 3 == 0);
81
Debug.
Assert
(bytesLeftInBuffer == 2 || bytesLeftInBuffer == 3 || bytesLeftInBuffer == 4);
82
Debug.
Assert
((fourByteBuffer & (BitConverter.IsLittleEndian ? 0x00000080 : 0x80000000)) != 0);
83
Debug.
Assert
((fourByteBuffer & (BitConverter.IsLittleEndian ? 0x00008000 : 0x00800000)) != 0);
84
Debug.
Assert
(bytesLeftInBuffer < 3 || (fourByteBuffer & (BitConverter.IsLittleEndian ? 0x00800000 : 0x00008000)) != 0);
85
Debug.
Assert
(bytesLeftInBuffer < 4 || (fourByteBuffer & (BitConverter.IsLittleEndian ? 0x80000000 : 0x00000080)) != 0);
116
Debug.
Assert
(bytesLeftInBuffer < 4);
121
Debug.
Assert
(bytesLeftInBuffer == 2 || bytesLeftInBuffer == 3);
164
Debug.
Assert
(bytesLeftInBuffer == 0 || bytesLeftInBuffer == 1);
System\Uri.cs (23)
147
Debug.
Assert
((_flags & Flags.Debug_LeftConstructor) == 0);
201
Debug.
Assert
(_syntax != null);
206
Debug.
Assert
(sizeof(Flags) == sizeof(ulong));
326
Debug.
Assert
(_info != null && (_flags & Flags.MinimalUriInfoSet) != 0);
713
Debug.
Assert
(IsAbsoluteUri);
964
Debug.
Assert
(_info != null);
965
Debug.
Assert
(_info.Host != null);
1901
Debug.
Assert
((flags & Flags.Debug_LeftConstructor) == 0);
1926
Debug.
Assert
((err is ParsingError.None) == (syntax is not null));
1944
Debug.
Assert
(_syntax != null && !_syntax.IsSimple);
1945
Debug.
Assert
((_flags & Flags.CustomParser_ParseMinimalAlreadyCalled) != 0);
1971
Debug.
Assert
(_syntax != null);
1982
Debug.
Assert
(ReferenceEquals(_string, OriginalString));
2393
Debug.
Assert
(sizeof(Flags) == sizeof(ulong));
2658
Debug.
Assert
(_info != null && (_flags & Flags.MinimalUriInfoSet) != 0);
2697
Debug.
Assert
(_info != null && (_flags & Flags.MinimalUriInfoSet) != 0);
2895
Debug.
Assert
(success);
3361
Debug.
Assert
(_syntax.InFact(UriSyntaxFlags.MayHaveFragment));
3613
Debug.
Assert
(err == ParsingError.None);
3614
Debug.
Assert
((flags & Flags.Debug_LeftConstructor) == 0);
3712
Debug.
Assert
(error == ParsingError.None);
3782
Debug.
Assert
((_flags & Flags.Debug_LeftConstructor) == 0 || (!_syntax.IsSimple && Monitor.IsEntered(_info)));
3792
Debug.
Assert
((_flags & Flags.HasUserInfo) == 0 && (_flags & Flags.HostTypeMask) == 0);
System\UriBuilder.cs (3)
247
Debug.
Assert
(_uri is not null);
280
Debug.
Assert
(_uri is not null);
363
Debug.
Assert
(success);
System\UriExt.cs (5)
30
Debug.
Assert
(_originalUnicodeString is null && _info is null && _syntax is null && _flags == Flags.Zero);
577
Debug.
Assert
(backingString is null || backingString.Length == charsToUnescape.Length);
648
Debug.
Assert
(newLength <= charsToUnescape.Length);
663
Debug.
Assert
(vsb.RawChars.Overlaps(destination));
764
Debug.
Assert
(syntax != null);
System\UriHelper.cs (10)
19
Debug.
Assert
(charsWritten == buffer.Length);
157
Debug.
Assert
(newLength > charsToEscape.Length);
172
Debug.
Assert
(vsb.RawChars.Overlaps(destination));
194
Debug.
Assert
(backingString is null || backingString.Length == charsToEscape.Length);
256
Debug.
Assert
(stringToEscape.EnumerateRunes() is { } e && e.MoveNext() && e.Current == r);
257
Debug.
Assert
(charsConsumed is 1 or 2);
299
Debug.
Assert
(charsToCopy > 0);
502
Debug.
Assert
(charactersRead > 0);
598
Debug.
Assert
(backingString is null || strToClean.Length == backingString.Length);
633
Debug.
Assert
(buffer.Length == destIndex);
System\UriScheme.cs (1)
77
Debug.
Assert
(sizeof(Uri.Flags) == sizeof(ulong));
System\UriSyntax.cs (1)
271
Debug.
Assert
(sizeof(Uri.Flags) == sizeof(ulong));
System.Private.Xml (2409)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\Xml\Base64Decoder.cs (5)
86
Debug.
Assert
(buffer != null);
87
Debug.
Assert
(count >= 0);
88
Debug.
Assert
(index >= 0);
89
Debug.
Assert
(buffer.Length - index >= count);
90
Debug.
Assert
((buffer as byte[]) != null);
System\Xml\BinaryXml\SqlUtils.cs (5)
85
Debug.
Assert
(rgulU.Length == s_cNumeMax);
136
Debug.
Assert
(uiDigit < 10);
323
Debug.
Assert
(val >= 0 && val < 100);
329
Debug.
Assert
(val > -10000 && val < 10000);
341
Debug.
Assert
(val >= 0 && val < 1000);
System\Xml\BinaryXml\XmlBinaryReader.cs (33)
356
Debug.
Assert
(len >= 2 && (data[0] == 0xdf && data[1] == 0xff));
457
Debug.
Assert
(_textXmlReader != null);
496
Debug.
Assert
(_textXmlReader != null);
525
Debug.
Assert
(_textXmlReader != null);
585
Debug.
Assert
(_textXmlReader != null);
607
Debug.
Assert
(_textXmlReader != null);
638
Debug.
Assert
(_textXmlReader != null);
651
Debug.
Assert
(_textXmlReader != null);
670
Debug.
Assert
(_textXmlReader != null);
686
Debug.
Assert
(_textXmlReader != null);
701
Debug.
Assert
(_textXmlReader != null);
723
Debug.
Assert
(_textXmlReader != null);
742
Debug.
Assert
(_textXmlReader != null);
758
Debug.
Assert
(_textXmlReader != null);
785
Debug.
Assert
(_textXmlReader != null);
817
Debug.
Assert
(_textXmlReader != null);
866
Debug.
Assert
(_textXmlReader != null);
904
Debug.
Assert
(_textXmlReader != null);
911
Debug.
Assert
(decl != null);
943
Debug.
Assert
(_textXmlReader != null);
1810
Debug.
Assert
(_textXmlReader != null);
1850
Debug.
Assert
(_textXmlReader != null);
2025
Debug.
Assert
((_attributes[i].contentPos >= 0) && (_attributes[i].contentPos <= (end)));
2032
Debug.
Assert
(_attrCount == 0);
2049
Debug.
Assert
((_pos + require) >= _end);
2089
Debug.
Assert
(0 != (b & 0x80));
2322
Debug.
Assert
(pos >= 0 && cch >= 0);
2950
Debug.
Assert
(_mark < 0);
3075
Debug.
Assert
(_pos >= 3);
3080
Debug.
Assert
(_pos >= 1);
3086
Debug.
Assert
(_pos >= 2);
3182
Debug.
Assert
(_prevNameInfo != null);
3234
Debug.
Assert
(_textXmlReader != null);
System\Xml\BinHexDecoder.cs (5)
90
Debug.
Assert
(buffer != null);
91
Debug.
Assert
(count >= 0);
92
Debug.
Assert
(index >= 0);
93
Debug.
Assert
(buffer.Length - index >= count);
94
Debug.
Assert
((buffer as byte[]) != null);
System\Xml\Cache\XPathDocumentBuilder.cs (24)
153
Debug.
Assert
(prefix != null && localName != null && ns != null && localName.Length != 0 && baseUri != null);
214
Debug.
Assert
(_pageParent != null && _pageParent[_idxParent].NodeType == XPathNodeType.Element);
288
Debug.
Assert
(namespaceName != null);
289
Debug.
Assert
(prefix != null && !prefix.Equals("xmlns"));
290
Debug.
Assert
(_idxParent == 0 || (_pageParent != null && _pageParent[_idxParent].NodeType == XPathNodeType.Element));
291
Debug.
Assert
(_idxSibling == 0 || (_pageSibling != null && _pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute));
308
Debug.
Assert
(_pageSibling != null);
309
Debug.
Assert
(_pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute);
322
Debug.
Assert
(id != null);
482
Debug.
Assert
(_pageParent != null && _pageParent[_idxParent].NodeType == XPathNodeType.Element);
494
Debug.
Assert
(_idxSibling == 0 || (_pageSibling != null && _pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute));
495
Debug.
Assert
(!prefix.Equals("xmlns") && !namespaceName.Equals(XmlReservedNs.NsXmlNs));
496
Debug.
Assert
(_idxParent == 0 || _idxNmsp != 0);
497
Debug.
Assert
(_idxParent == 0 || (_pageParent != null && _pageParent[_idxParent].NodeType == XPathNodeType.Element));
530
Debug.
Assert
(pageOrig != null);
569
Debug.
Assert
(_pageParent != null);
632
Debug.
Assert
(pageElem == null || pageElem[idxElem].NodeType == XPathNodeType.Element);
662
Debug.
Assert
(xptyp != XPathNodeType.Namespace);
734
Debug.
Assert
(xptyp != XPathNodeType.Root && xptyp != XPathNodeType.Namespace);
744
Debug.
Assert
(_pageParent != null);
751
Debug.
Assert
(_idxParent + 1 == idxNew || idxNew == 1);
755
Debug.
Assert
(_pageSibling != null);
903
Debug.
Assert
((int)XPathNodeType.Text < (int)XPathNodeType.SignificantWhitespace);
904
Debug.
Assert
((int)XPathNodeType.SignificantWhitespace < (int)XPathNodeType.Whitespace);
System\Xml\Cache\XPathDocumentNavigator.cs (16)
36
Debug.
Assert
(pageCurrent != null && idxCurrent != 0);
37
Debug.
Assert
((pageParent == null) == (idxParent == 0));
97
Debug.
Assert
(_pageCurrent[_idxCurrent].NodeType == XPathNodeType.Text);
100
Debug.
Assert
(value != null);
120
Debug.
Assert
(page[idx].NodeType == XPathNodeType.Element || page[idx].IsText);
122
Debug.
Assert
(value != null);
373
Debug.
Assert
(page != null);
434
Debug.
Assert
(_pageCurrent != null);
454
Debug.
Assert
(_pageParent != null);
494
Debug.
Assert
(page != null);
496
Debug.
Assert
(page[idx].NodeType == XPathNodeType.Element);
584
Debug.
Assert
(_pageCurrent != null);
663
Debug.
Assert
(_pageCurrent != null);
695
Debug.
Assert
(page[idx].HasCollapsedText);
697
Debug.
Assert
(_pageCurrent != null);
704
Debug.
Assert
(page[idx].IsText);
System\Xml\Cache\XPathNode.cs (4)
173
Debug.
Assert
(pageNode != null);
361
Debug.
Assert
(info != null && idxParent <= ushort.MaxValue);
400
Debug.
Assert
(NodeType == XPathNodeType.Element);
411
Debug.
Assert
(NodeType == XPathNodeType.Element);
System\Xml\Cache\XPathNodeHelper.cs (13)
26
Debug.
Assert
(pageElem[idxElem].NodeType == XPathNodeType.Element);
75
Debug.
Assert
(pageNode[idxNode].NodeType == XPathNodeType.Attribute);
119
Debug.
Assert
(idx != 0);
120
Debug.
Assert
(page != null);
180
Debug.
Assert
(idxNode <= ushort.MaxValue);
181
Debug.
Assert
(pageNode[0].PageInfo!.PageNumber <= short.MaxValue);
200
Debug.
Assert
(idx != 0);
312
Debug.
Assert
(typ != XPathNodeType.Attribute && typ != XPathNodeType.Namespace);
332
Debug.
Assert
(pageNode[idxNode].NodeType != XPathNodeType.Attribute);
348
Debug.
Assert
(pagePrec != null);
369
Debug.
Assert
(idxAnc != 0 && pageAnc != null);
454
Debug.
Assert
(page != null);
669
Debug.
Assert
(pageNode != null);
System\Xml\Cache\XPathNodeInfoAtom.cs (6)
123
Debug.
Assert
(localName != null && namespaceUri != null && prefix != null && doc != null);
291
Debug.
Assert
(other != null);
292
Debug.
Assert
((object?)_doc == (object?)other._doc);
293
Debug.
Assert
(_pageInfo == null);
326
Debug.
Assert
(_localName != null);
333
Debug.
Assert
(_prefix != null);
System\Xml\Core\CharEntityEncoderFallback.cs (3)
35
Debug.
Assert
(_textContentMarks != null);
128
Debug.
Assert
(_charEntityIndex < _charEntity.Length);
141
Debug.
Assert
(_charEntityIndex <= _charEntity.Length);
System\Xml\Core\HtmlEncodedRawTextWriter.cs (21)
50
Debug.
Assert
(name != null && name.Length > 0);
97
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
103
Debug.
Assert
(prefix.Length == 0);
143
Debug.
Assert
(prefix.Length == 0);
168
Debug.
Assert
(prefix.Length == 0);
288
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
292
Debug.
Assert
(prefix.Length == 0);
356
Debug.
Assert
(!string.IsNullOrEmpty(target) && text != null);
378
Debug.
Assert
(text != null);
413
Debug.
Assert
(buffer != null);
414
Debug.
Assert
(index >= 0);
415
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
440
Debug.
Assert
((int)ElementProperties.URI_PARENT == (int)AttributeProperties.URI);
441
Debug.
Assert
((int)ElementProperties.BOOL_PARENT == (int)AttributeProperties.BOOLEAN);
442
Debug.
Assert
((int)ElementProperties.NAME_PARENT == (int)AttributeProperties.NAME);
564
Debug.
Assert
(pSrc <= pSrcEnd);
652
Debug.
Assert
(pSrc <= pSrcEnd);
702
Debug.
Assert
(_uriEscapingBuffer?.Length > 0);
816
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
824
Debug.
Assert
(prefix.Length == 0);
880
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
System\Xml\Core\HtmlUtf8RawTextWriter.cs (21)
45
Debug.
Assert
(name != null && name.Length > 0);
90
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
96
Debug.
Assert
(prefix.Length == 0);
134
Debug.
Assert
(prefix.Length == 0);
157
Debug.
Assert
(prefix.Length == 0);
275
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
279
Debug.
Assert
(prefix.Length == 0);
339
Debug.
Assert
(!string.IsNullOrEmpty(target) && text != null);
359
Debug.
Assert
(text != null);
392
Debug.
Assert
(buffer != null);
393
Debug.
Assert
(index >= 0);
394
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
417
Debug.
Assert
((int)ElementProperties.URI_PARENT == (int)AttributeProperties.URI);
418
Debug.
Assert
((int)ElementProperties.BOOL_PARENT == (int)AttributeProperties.BOOLEAN);
419
Debug.
Assert
((int)ElementProperties.NAME_PARENT == (int)AttributeProperties.NAME);
541
Debug.
Assert
(pSrc <= pSrcEnd);
629
Debug.
Assert
(pSrc <= pSrcEnd);
679
Debug.
Assert
(_uriEscapingBuffer?.Length > 0);
788
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
794
Debug.
Assert
(prefix.Length == 0);
850
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
System\Xml\Core\IncrementalReadDecoders.cs (17)
63
Debug.
Assert
(_buffer != null);
64
Debug.
Assert
(chars != null);
65
Debug.
Assert
(len >= 0);
66
Debug.
Assert
(startPos >= 0);
67
Debug.
Assert
(chars.Length - startPos >= len);
69
Debug.
Assert
(len > 0);
85
Debug.
Assert
(_buffer != null);
86
Debug.
Assert
(str != null);
87
Debug.
Assert
(len >= 0);
88
Debug.
Assert
(startPos >= 0);
89
Debug.
Assert
(str.Length - startPos >= len);
91
Debug.
Assert
(len > 0);
111
Debug.
Assert
(buffer != null);
112
Debug.
Assert
(count >= 0);
113
Debug.
Assert
(index >= 0);
114
Debug.
Assert
(buffer.Length - index >= count);
116
Debug.
Assert
((buffer as char[]) != null);
System\Xml\Core\QueryOutputWriter.cs (2)
138
Debug.
Assert
(!_outputDocType);
351
Debug.
Assert
(!_inCDataSection);
System\Xml\Core\QueryOutputWriterV1.cs (6)
128
Debug.
Assert
(!_outputDocType);
161
Debug.
Assert
(_qnameCData != null);
162
Debug.
Assert
(_bitsCData != null);
178
Debug.
Assert
(_bitsCData != null);
191
Debug.
Assert
(_bitsCData != null);
319
Debug.
Assert
(!_inCDataSection);
System\Xml\Core\ReadContentAsBinaryHelper.cs (7)
97
Debug.
Assert
(_state == State.InReadContent);
140
Debug.
Assert
(_state == State.InReadContent);
183
Debug.
Assert
(_state == State.InReadElementContent);
226
Debug.
Assert
(_state == State.InReadElementContent);
276
Debug.
Assert
(_reader.NodeType == XmlNodeType.Element);
330
Debug.
Assert
(_decoder != null);
355
Debug.
Assert
(_valueOffset == _valueChunkLength);
System\Xml\Core\ReadContentAsBinaryHelperAsync.cs (7)
48
Debug.
Assert
(_state == State.InReadContent);
92
Debug.
Assert
(_state == State.InReadContent);
136
Debug.
Assert
(_state == State.InReadElementContent);
180
Debug.
Assert
(_state == State.InReadElementContent);
224
Debug.
Assert
(_reader.NodeType == XmlNodeType.Element);
252
Debug.
Assert
(_decoder != null);
277
Debug.
Assert
(_valueOffset == _valueChunkLength);
System\Xml\Core\XmlAsyncCheckReader.cs (3)
36
Debug.
Assert
(!(reader is IXmlSchemaInfo));
41
Debug.
Assert
(!(reader is IXmlSchemaInfo));
44
Debug.
Assert
(!(reader is IXmlSchemaInfo));
System\Xml\Core\XmlAutoDetectWriter.cs (6)
33
Debug.
Assert
(writerSettings.OutputMethod == XmlOutputMethod.AutoDetect);
106
Debug.
Assert
(_wrapped != null);
309
Debug.
Assert
(_wrapped != null);
315
Debug.
Assert
(_wrapped != null);
321
Debug.
Assert
(_wrapped != null);
399
Debug.
Assert
(_wrapped == null);
System\Xml\Core\XmlCharCheckingReader.cs (2)
51
Debug.
Assert
(checkCharacters || ignoreWhitespace || ignoreComments || ignorePis || (int)dtdProcessing != -1);
643
Debug.
Assert
(readerAsNSResolver != null);
System\Xml\Core\XmlCharCheckingWriter.cs (1)
33
Debug.
Assert
(checkValues || replaceNewLines);
System\Xml\Core\XmlEncodedRawTextWriter.cs (45)
114
Debug.
Assert
(writer != null && settings != null);
136
Debug.
Assert
(stream != null && settings != null);
253
Debug.
Assert
(name != null && name.Length > 0);
294
Debug.
Assert
(localName != null && localName.Length > 0);
295
Debug.
Assert
(prefix != null);
326
Debug.
Assert
(localName != null && localName.Length > 0);
327
Debug.
Assert
(prefix != null);
358
Debug.
Assert
(localName != null && localName.Length > 0);
359
Debug.
Assert
(prefix != null);
378
Debug.
Assert
(localName != null && localName.Length > 0);
379
Debug.
Assert
(prefix != null);
412
Debug.
Assert
(prefix != null && namespaceName != null);
429
Debug.
Assert
(prefix != null);
468
Debug.
Assert
(text != null);
475
Debug.
Assert
(_bufPos >= 4);
505
Debug.
Assert
(text != null);
524
Debug.
Assert
(name != null && name.Length > 0);
525
Debug.
Assert
(text != null);
546
Debug.
Assert
(name != null && name.Length > 0);
593
Debug.
Assert
(ws != null);
615
Debug.
Assert
(text != null);
652
Debug.
Assert
(buffer != null);
653
Debug.
Assert
(index >= 0);
654
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
676
Debug.
Assert
(buffer != null);
677
Debug.
Assert
(index >= 0);
678
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
694
Debug.
Assert
(data != null);
791
Debug.
Assert
(_stream != null || _writer != null);
811
Debug.
Assert
(_textContentMarks![0] == 1);
875
Debug.
Assert
(_bufPos == 1);
912
Debug.
Assert
(pSrc <= pSrcEnd);
1035
Debug.
Assert
(pSrc <= pSrcEnd);
1136
Debug.
Assert
(s != null);
1166
Debug.
Assert
(pSrc <= pSrcEnd);
1231
Debug.
Assert
(pSrc <= pSrcEnd);
1351
Debug.
Assert
(pSrc <= pSrcEnd);
1502
Debug.
Assert
(pSrc <= pSrcEnd);
1610
Debug.
Assert
(XmlCharType.IsSurrogate(*pSrc));
1636
Debug.
Assert
(!XmlCharType.IsWhiteSpace((char)ch));
1637
Debug.
Assert
(!XmlCharType.IsAttributeValueChar((char)ch));
1686
Debug.
Assert
(_inTextContent != value);
1687
Debug.
Assert
(_inTextContent || ((_lastMarkPos & 1) == 0));
1698
Debug.
Assert
(_lastMarkPos + 1 == _textContentMarks!.Length);
1963
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
System\Xml\Core\XmlEncodedRawTextWriterAsync.cs (42)
135
Debug.
Assert
(name != null && name.Length > 0);
177
Debug.
Assert
(localName != null && localName.Length > 0);
178
Debug.
Assert
(prefix != null);
205
Debug.
Assert
(localName != null && localName.Length > 0);
206
Debug.
Assert
(prefix != null);
240
Debug.
Assert
(localName != null && localName.Length > 0);
241
Debug.
Assert
(prefix != null);
262
Debug.
Assert
(localName != null && localName.Length > 0);
263
Debug.
Assert
(prefix != null);
307
Debug.
Assert
(prefix != null && namespaceName != null);
317
Debug.
Assert
(prefix != null);
362
Debug.
Assert
(text != null);
369
Debug.
Assert
(_bufPos >= 4);
400
Debug.
Assert
(text != null);
420
Debug.
Assert
(name != null && name.Length > 0);
421
Debug.
Assert
(text != null);
443
Debug.
Assert
(name != null && name.Length > 0);
492
Debug.
Assert
(ws != null);
511
Debug.
Assert
(text != null);
548
Debug.
Assert
(buffer != null);
549
Debug.
Assert
(index >= 0);
550
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
570
Debug.
Assert
(buffer != null);
571
Debug.
Assert
(index >= 0);
572
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
586
Debug.
Assert
(data != null);
623
Debug.
Assert
(_stream != null || _writer != null);
643
Debug.
Assert
(_textContentMarks![0] == 1);
707
Debug.
Assert
(_bufPos == 1);
747
Debug.
Assert
(pSrc <= pSrcEnd);
952
Debug.
Assert
(pSrc <= pSrcEnd);
1192
Debug.
Assert
(pSrc <= pSrcEnd);
1259
Debug.
Assert
(text1 != null);
1260
Debug.
Assert
(text2 != null || (text3 == null && text4 == null));
1261
Debug.
Assert
(text3 != null || (text4 == null));
1317
Debug.
Assert
(text1 != null);
1318
Debug.
Assert
(text2 != null || (text3 == null && text4 == null));
1319
Debug.
Assert
(text3 != null || (text4 == null));
1368
Debug.
Assert
(pSrc <= pSrcEnd);
1570
Debug.
Assert
(pSrc <= pSrcEnd);
1760
Debug.
Assert
(pSrc <= pSrcEnd);
1922
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
System\Xml\Core\XmlEventCache.cs (2)
125
Debug.
Assert
(idxPage + 1 == _pages.Count);
279
Debug.
Assert
(idxPage + 1 == _pages.Count);
System\Xml\Core\XmlRawWriter.cs (1)
309
Debug.
Assert
(_base64Encoder != null);
System\Xml\Core\XmlRawWriterAsync.cs (1)
223
Debug.
Assert
(_base64Encoder != null);
System\Xml\Core\XmlReader.cs (58)
964
Debug.
Assert
(parentDepth == 0);
988
Debug.
Assert
(NodeType == XmlNodeType.EndElement || NodeType == XmlNodeType.None || ReadState == ReadState.Error);
1005
Debug.
Assert
(parentDepth == 0);
1030
Debug.
Assert
(NodeType == XmlNodeType.EndElement);
1306
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.None)));
1307
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Element)));
1308
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Attribute)));
1309
Debug.
Assert
(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Text)));
1310
Debug.
Assert
(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.CDATA)));
1311
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EntityReference)));
1312
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Entity)));
1313
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.ProcessingInstruction)));
1314
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Comment)));
1315
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Document)));
1316
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.DocumentType)));
1317
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.DocumentFragment)));
1318
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Notation)));
1319
Debug.
Assert
(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Whitespace)));
1320
Debug.
Assert
(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.SignificantWhitespace)));
1321
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EndElement)));
1322
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EndEntity)));
1323
Debug.
Assert
(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.XmlDeclaration)));
1333
Debug.
Assert
(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.None)));
1334
Debug.
Assert
(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Element)));
1335
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Attribute)));
1336
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Text)));
1337
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.CDATA)));
1338
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.EntityReference)));
1339
Debug.
Assert
(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Entity)));
1340
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.ProcessingInstruction)));
1341
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Comment)));
1342
Debug.
Assert
(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Document)));
1343
Debug.
Assert
(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.DocumentType)));
1344
Debug.
Assert
(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.DocumentFragment)));
1345
Debug.
Assert
(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Notation)));
1346
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Whitespace)));
1347
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.SignificantWhitespace)));
1348
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.EndElement)));
1349
Debug.
Assert
(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.EndEntity)));
1350
Debug.
Assert
(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.XmlDeclaration)));
1360
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.None)));
1361
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.Element)));
1362
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.Attribute)));
1363
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.Text)));
1364
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.CDATA)));
1365
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.EntityReference)));
1366
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.Entity)));
1367
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.ProcessingInstruction)));
1368
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.Comment)));
1369
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.Document)));
1370
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.DocumentType)));
1371
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.DocumentFragment)));
1372
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.Notation)));
1373
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.Whitespace)));
1374
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.SignificantWhitespace)));
1375
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.EndElement)));
1376
Debug.
Assert
(0 == (HasValueBitmap & (1 << (int)XmlNodeType.EndEntity)));
1377
Debug.
Assert
(0 != (HasValueBitmap & (1 << (int)XmlNodeType.XmlDeclaration)));
System\Xml\Core\XmlReaderSettings.cs (1)
473
Debug.
Assert
(_addValidationFunc != null);
System\Xml\Core\XmlSubtreeReader.cs (41)
432
Debug.
Assert
(reader.NodeType == XmlNodeType.Element);
457
Debug.
Assert
(_curNode.type == XmlNodeType.Attribute);
479
Debug.
Assert
(reader.Depth >= _initialDepth);
489
Debug.
Assert
(reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement);
550
Debug.
Assert
(reader.Depth >= _initialDepth);
587
Debug.
Assert
(reader.Depth >= _initialDepth);
601
Debug.
Assert
(reader.NodeType == XmlNodeType.EndElement ||
616
Debug.
Assert
(reader.Depth >= _initialDepth);
868
Debug.
Assert
(_binDecoder != null);
875
Debug.
Assert
(AttributeCount > 0);
1006
Debug.
Assert
(_binDecoder != null);
1013
Debug.
Assert
(AttributeCount > 0);
1338
Debug.
Assert
(_state == State.ClearNsAttributes || _state == State.Interactive || _state == State.PopNamespaceScope);
1366
Debug.
Assert
(index >= 0 && index <= _nsAttrCount);
1399
Debug.
Assert
(_state == State.Interactive);
1406
Debug.
Assert
(_state == State.ReadElementContentAsBase64 || _state == State.ReadElementContentAsBinHex);
1440
Debug.
Assert
(_state == State.ReadContentAsBase64 || _state == State.ReadContentAsBinHex);
1470
Debug.
Assert
(0 == (AttributeActiveStates & (1 << (int)State.Initial)));
1471
Debug.
Assert
(0 != (AttributeActiveStates & (1 << (int)State.Interactive)));
1472
Debug.
Assert
(0 == (AttributeActiveStates & (1 << (int)State.Error)));
1473
Debug.
Assert
(0 == (AttributeActiveStates & (1 << (int)State.EndOfFile)));
1474
Debug.
Assert
(0 == (AttributeActiveStates & (1 << (int)State.Closed)));
1475
Debug.
Assert
(0 != (AttributeActiveStates & (1 << (int)State.PopNamespaceScope)));
1476
Debug.
Assert
(0 != (AttributeActiveStates & (1 << (int)State.ClearNsAttributes)));
1477
Debug.
Assert
(0 == (AttributeActiveStates & (1 << (int)State.ReadElementContentAsBase64)));
1478
Debug.
Assert
(0 == (AttributeActiveStates & (1 << (int)State.ReadElementContentAsBinHex)));
1479
Debug.
Assert
(0 == (AttributeActiveStates & (1 << (int)State.ReadContentAsBase64)));
1480
Debug.
Assert
(0 == (AttributeActiveStates & (1 << (int)State.ReadContentAsBinHex)));
1491
Debug.
Assert
(0 == (NamespaceActiveStates & (1 << (int)State.Initial)));
1492
Debug.
Assert
(0 != (NamespaceActiveStates & (1 << (int)State.Interactive)));
1493
Debug.
Assert
(0 == (NamespaceActiveStates & (1 << (int)State.Error)));
1494
Debug.
Assert
(0 == (NamespaceActiveStates & (1 << (int)State.EndOfFile)));
1495
Debug.
Assert
(0 == (NamespaceActiveStates & (1 << (int)State.Closed)));
1496
Debug.
Assert
(0 != (NamespaceActiveStates & (1 << (int)State.PopNamespaceScope)));
1497
Debug.
Assert
(0 != (NamespaceActiveStates & (1 << (int)State.ClearNsAttributes)));
1498
Debug.
Assert
(0 != (NamespaceActiveStates & (1 << (int)State.ReadElementContentAsBase64)));
1499
Debug.
Assert
(0 != (NamespaceActiveStates & (1 << (int)State.ReadElementContentAsBinHex)));
1500
Debug.
Assert
(0 != (NamespaceActiveStates & (1 << (int)State.ReadContentAsBase64)));
1501
Debug.
Assert
(0 != (NamespaceActiveStates & (1 << (int)State.ReadContentAsBinHex)));
1509
Debug.
Assert
(_tmpNode.localName == string.Empty && _tmpNode.prefix == string.Empty && _tmpNode.name == string.Empty && _tmpNode.namespaceUri == string.Empty);
1560
Debug.
Assert
(_state == State.Interactive ||
System\Xml\Core\XmlSubtreeReaderAsync.cs (12)
42
Debug.
Assert
(reader.Depth >= _initialDepth);
52
Debug.
Assert
(reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement);
113
Debug.
Assert
(reader.Depth >= _initialDepth);
127
Debug.
Assert
(reader.NodeType == XmlNodeType.EndElement ||
142
Debug.
Assert
(reader.Depth >= _initialDepth);
274
Debug.
Assert
(_binDecoder != null);
281
Debug.
Assert
(AttributeCount > 0);
412
Debug.
Assert
(_binDecoder != null);
419
Debug.
Assert
(AttributeCount > 0);
583
Debug.
Assert
(_state == State.Interactive);
590
Debug.
Assert
(_state == State.ReadElementContentAsBase64 || _state == State.ReadElementContentAsBinHex);
624
Debug.
Assert
(_state == State.ReadContentAsBase64 || _state == State.ReadContentAsBinHex);
System\Xml\Core\XmlTextEncoder.cs (11)
74
Debug.
Assert
(_attrValue != null);
88
Debug.
Assert
(_attrValue != null);
120
Debug.
Assert
(_attrValue != null);
208
Debug.
Assert
((ch < 0x20 && !XmlCharType.IsWhiteSpace(ch)) || (ch > 0xFFFD));
228
Debug.
Assert
(_attrValue != null);
247
Debug.
Assert
(_attrValue != null);
364
Debug.
Assert
((ch < 0x20 && !XmlCharType.IsWhiteSpace(ch)) || (ch > 0xFFFD));
387
Debug.
Assert
(_attrValue != null);
446
Debug.
Assert
(_attrValue != null);
465
Debug.
Assert
(_attrValue != null);
478
Debug.
Assert
(_attrValue != null);
System\Xml\Core\XmlTextReaderImpl.cs (252)
317
Debug.
Assert
(nt != null);
330
Debug.
Assert
(_index == 0);
371
Debug.
Assert
(_nameTableFromSettings == false);
393
Debug.
Assert
(_index == 0);
601
Debug.
Assert
(baseUri == null);
629
Debug.
Assert
(_laterInitParam != null);
630
Debug.
Assert
(_laterInitParam.inputUriResolver != null);
631
Debug.
Assert
(_laterInitParam.inputbaseUri != null);
632
Debug.
Assert
(_reportedBaseUri != null);
699
Debug.
Assert
(baseUri == null);
730
Debug.
Assert
(_laterInitParam != null);
731
Debug.
Assert
(_laterInitParam.inputStream != null);
732
Debug.
Assert
(_reportedBaseUri != null);
789
Debug.
Assert
(_laterInitParam != null);
790
Debug.
Assert
(_laterInitParam.inputTextReader != null);
791
Debug.
Assert
(_reportedBaseUri != null);
812
Debug.
Assert
(xmlFragment != null);
1195
Debug.
Assert
(_laterInitParam != null);
1234
Debug.
Assert
(_nextParsingFunction == ParsingFunction.DocumentContent);
1237
Debug.
Assert
(!_ps.appendMode);
1265
Debug.
Assert
(_parsingFunction == ParsingFunction.ElementContent ||
1270
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
1394
Debug.
Assert
(_curNode.type == XmlNodeType.EndElement);
1395
Debug.
Assert
(_parsingFunction != ParsingFunction.Eof);
1415
Debug.
Assert
(_namespaceManager != null);
1498
Debug.
Assert
(_parsingMode == ParsingMode.Full);
1559
Debug.
Assert
(value is XmlTextReader);
1578
Debug.
Assert
(_outerReader is XmlTextReaderImpl);
1867
Debug.
Assert
(_ps.chars != null);
1891
Debug.
Assert
(_ps.chars != null);
1944
Debug.
Assert
(_namespaceManager != null);
1952
Debug.
Assert
(_namespaceManager != null);
1988
Debug.
Assert
(_namespaceManager != null);
2137
Debug.
Assert
(_namespaceManager != null);
2166
Debug.
Assert
(_stringBuilder.Length == 0);
2207
Debug.
Assert
(_outerReader is XmlTextReader);
2243
Debug.
Assert
(_outerReader is XmlTextReader);
2277
Debug.
Assert
(_outerReader is XmlTextReader);
2404
Debug.
Assert
(value >= 0 && value <= _ps.charsUsed);
2490
Debug.
Assert
(_parsingMode == ParsingMode.Full);
2578
Debug.
Assert
(_parsingStatesStackTop == -1);
2579
Debug.
Assert
((systemId != null && systemId.Length > 0) || (publicId != null && publicId.Length > 0));
2586
Debug.
Assert
(_xmlResolver != null);
2598
Debug.
Assert
(_ps.appendMode);
2614
Debug.
Assert
(_parsingStatesStackTop == -1);
2615
Debug.
Assert
(internalDtd != null);
2788
Debug.
Assert
(InAttributeValueIterator);
2825
Debug.
Assert
(baseUriStr != null);
2831
Debug.
Assert
(baseUri != null);
2842
Debug.
Assert
(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.textReader == null);
2843
Debug.
Assert
(baseUriStr != null);
2844
Debug.
Assert
(baseUri == null || (baseUri.ToString().Equals(baseUriStr)));
2917
Debug.
Assert
(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.stream == null);
2918
Debug.
Assert
(baseUriStr != null);
2946
Debug.
Assert
(_ps.stream == null && _ps.textReader == null);
2947
Debug.
Assert
(_ps.charPos == 0 && _ps.charsUsed == 0);
2948
Debug.
Assert
(baseUriStr != null);
2949
Debug.
Assert
(str != null);
3004
Debug.
Assert
(_parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl);
3008
Debug.
Assert
(_parsingFunction == ParsingFunction.SwitchToInteractiveXmlDecl);
3009
Debug.
Assert
(_nextParsingFunction == ParsingFunction.DocumentContent);
3034
Debug.
Assert
(context != null && context.HasDtdInfo);
3056
Debug.
Assert
(_url != null && _url.Length > 0);
3081
Debug.
Assert
(_ps.stream != null);
3089
Debug.
Assert
(_ps.bytes != null);
3090
Debug.
Assert
(_ps.bytePos == 0);
3176
Debug.
Assert
(_ps.charPos == 0);
3194
Debug.
Assert
(_ps.encoding != null);
3195
Debug.
Assert
(_ps.bytes != null);
3206
Debug.
Assert
(_ps.encoding != null);
3209
Debug.
Assert
(_ps.stream != null);
3221
Debug.
Assert
(_ps.encoding != null);
3270
Debug.
Assert
(newEncoding != null);
3271
Debug.
Assert
(newEncoding.EncodingName != "UTF-8");
3285
Debug.
Assert
(_ps.stream != null && _ps.decoder != null && _ps.bytes != null);
3314
Debug.
Assert
(_ps.encoding != null);
3315
Debug.
Assert
(_ps.chars != null);
3341
Debug.
Assert
(_ps.chars != null);
3364
Debug.
Assert
(_ps.bytes != null);
3423
Debug.
Assert
(_ps.bytes != null);
3438
Debug.
Assert
(_ps.bytes != null);
3477
Debug.
Assert
(_ps.charsUsed < _ps.chars.Length);
3488
Debug.
Assert
(_ps.stream != null && _ps.decoder != null && _ps.bytes != null);
3489
Debug.
Assert
(_ps.chars != null);
3490
Debug.
Assert
(maxCharsCount <= _ps.chars.Length - _ps.charsUsed - 1);
3514
Debug.
Assert
(maxCharsCount >= charsCount);
3529
Debug.
Assert
(_ps.decoder != null);
3530
Debug.
Assert
(_ps.bytes != null);
3531
Debug.
Assert
(_ps.chars != null);
3579
Debug.
Assert
(_ps.chars != null);
3609
Debug.
Assert
(_stringBuilder.Length == 0 || isTextDecl);
3653
Debug.
Assert
(_ps.encoding != null);
3730
Debug.
Assert
(attr != null);
3762
Debug.
Assert
(attr != null);
3788
Debug.
Assert
(attr != null);
3804
Debug.
Assert
(attr != null);
3819
Debug.
Assert
(!isTextDecl);
3825
Debug.
Assert
(attr != null);
3871
Debug.
Assert
(_ps.encoding != null);
3895
Debug.
Assert
(_ps.chars != null);
4077
Debug.
Assert
(pos == _ps.charsUsed && !_ps.isEof);
4097
Debug.
Assert
(_index == 0);
4120
Debug.
Assert
(_ps.chars != null);
4294
Debug.
Assert
(_ps.chars != null);
4360
Debug.
Assert
(_namespaceManager != null);
4452
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
4453
Debug.
Assert
(_dtdInfo != null);
4545
Debug.
Assert
(_ps.chars != null);
4634
Debug.
Assert
(_index > 0);
4639
Debug.
Assert
(_curNode == startTagNode);
4656
Debug.
Assert
(_ps.chars != null);
4666
Debug.
Assert
(startTag.type == XmlNodeType.EntityReference);
4675
Debug.
Assert
(_ps.chars != null);
4679
Debug.
Assert
(_attrCount == 0);
4728
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
4736
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
4840
Debug.
Assert
(attrNameLineNo == _ps.LineNo);
4962
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
5096
Debug.
Assert
(_ps.chars != null);
5103
Debug.
Assert
(_stringBuilder.Length == 0);
5258
Debug.
Assert
(_ps.entity != null);
5315
Debug.
Assert
(_ps.isEof);
5373
Debug.
Assert
(attr.nextAttrValueChunk == null);
5402
Debug.
Assert
(_stringBuilder.Length == 0);
5418
Debug.
Assert
(endPos - startPos > 0);
5419
Debug.
Assert
(_ps.chars != null);
5442
Debug.
Assert
(_stringBuilder.Length > 0);
5463
Debug.
Assert
(endPos - startPos > 0);
5464
Debug.
Assert
(_ps.chars != null);
5539
Debug.
Assert
(_ps.chars != null);
5729
Debug.
Assert
(_ps.isEof);
5771
Debug.
Assert
(_stringBuilder.Length == 0);
5772
Debug.
Assert
(_parsingFunction == ParsingFunction.PartialTextValue ||
5786
Debug.
Assert
(_stringBuilder.Length > 0);
5840
Debug.
Assert
(_parsingFunction == ParsingFunction.PartialTextValue || _parsingFunction == ParsingFunction.InReadValueChunk ||
5850
Debug.
Assert
(_parsingFunction == ParsingFunction.InReadValueChunk);
5855
Debug.
Assert
((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
5867
Debug.
Assert
(_parsingFunction == ParsingFunction.InReadContentAsBinary || _parsingFunction == ParsingFunction.InReadElementContentAsBinary);
5872
Debug.
Assert
((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
5900
Debug.
Assert
(_stringBuilder.Length == 0);
5904
Debug.
Assert
(_ps.chars != null);
5942
Debug.
Assert
(_ps.chars != null);
5943
Debug.
Assert
(_ps.chars[_ps.charPos] == '&');
5952
Debug.
Assert
(_ps.chars != null);
5953
Debug.
Assert
(_ps.chars[_ps.charPos] == '&');
5968
Debug.
Assert
(entityType == EntityType.CharacterDec || entityType == EntityType.CharacterHex);
6046
Debug.
Assert
(entity != null);
6163
Debug.
Assert
(_lastEntity != null);
6169
Debug.
Assert
(_curNode.depth == _index);
6182
Debug.
Assert
(_curNode.type == XmlNodeType.EntityReference);
6183
Debug.
Assert
(_lastEntity != null);
6184
Debug.
Assert
(Ref.Equal(_lastEntity.Name, _curNode.localName));
6203
Debug.
Assert
(_stringBuilder.Length == 0);
6207
Debug.
Assert
(_ps.chars != null);
6230
Debug.
Assert
(_ps.charPos < _ps.charsUsed);
6274
Debug.
Assert
(_stringBuilder.Length == 0);
6308
Debug.
Assert
(_ps.chars != null);
6330
Debug.
Assert
(!_ps.eolNormalized);
6477
Debug.
Assert
(_stringBuilder.Length == 0);
6480
Debug.
Assert
(_ps.chars != null);
6513
Debug.
Assert
(_ps.chars != null);
6537
Debug.
Assert
(!_ps.eolNormalized);
6686
Debug.
Assert
(_ps.chars != null);
6719
Debug.
Assert
(_dtdProcessing == DtdProcessing.Ignore);
6751
Debug.
Assert
(_ps.chars != null);
6848
Debug.
Assert
(_ps.chars != null);
6867
Debug.
Assert
(_ps.chars != null);
7048
Debug.
Assert
(_ps.isEof);
7064
Debug.
Assert
(_ps.chars != null);
7149
Debug.
Assert
(_ps.isEof);
7158
Debug.
Assert
(_ps.chars != null);
7159
Debug.
Assert
(_ps.chars[startPos] == '&');
7192
Debug.
Assert
(_ps.chars != null);
7193
Debug.
Assert
(_ps.chars[_ps.charPos] == '&');
7213
Debug.
Assert
(_ps.chars != null);
7214
Debug.
Assert
(_ps.chars[startPos] == '&' && _ps.chars[startPos + 1] == '#');
7269
Debug.
Assert
(badDigitExceptionString != null);
7321
Debug.
Assert
(pos > 0);
7355
Debug.
Assert
(_ps.chars != null);
7356
Debug.
Assert
(_ps.chars[_ps.charPos] == '&');
7376
Debug.
Assert
(startPos < _ps.charsUsed);
7377
Debug.
Assert
(_ps.chars != null);
7378
Debug.
Assert
(_ps.chars[startPos] == '&');
7379
Debug.
Assert
(_ps.chars[startPos + 1] != '#');
7487
Debug.
Assert
(pos > 0);
7512
Debug.
Assert
(_ps.chars != null);
7575
Debug.
Assert
(_ps.chars != null);
7608
Debug.
Assert
(_ps.chars != null);
7623
Debug.
Assert
(nodeIndex < _nodes.Length);
7624
Debug.
Assert
(_nodes[_nodes.Length - 1] == null);
7637
Debug.
Assert
(nodeIndex < _nodes.Length);
7644
Debug.
Assert
(nodeIndex < _nodes.Length);
7661
Debug.
Assert
(_ps.chars != null);
7714
Debug.
Assert
(attr.type == XmlNodeType.Attribute);
7730
Debug.
Assert
(_namespaceManager != null);
7749
Debug.
Assert
(_ps.isEof);
7762
Debug.
Assert
(_namespaceManager != null);
7800
Debug.
Assert
(_namespaceManager != null);
7813
Debug.
Assert
(_xmlContext.defaultNamespace == uri);
7850
Debug.
Assert
(_curNode.xmlContextPushed);
7892
Debug.
Assert
(_xmlResolver != null);
7950
Debug.
Assert
(_xmlResolver != null);
7987
Debug.
Assert
(entity.IsExternal);
7991
Debug.
Assert
(_xmlResolver != null);
8002
Debug.
Assert
(_ps.appendMode);
8033
Debug.
Assert
(!entity.IsExternal);
8099
Debug.
Assert
(_parsingStatesStackTop == -1);
8115
Debug.
Assert
(_parsingStatesStackTop >= 0);
8116
Debug.
Assert
(_parsingStatesStack != null);
8163
Debug.
Assert
(_incReadDecoder != null);
8173
Debug.
Assert
(_incReadDecoder != null);
8174
Debug.
Assert
(_ps.chars != null);
8223
Debug.
Assert
(_ps.chars.AsSpan(_ps.charPos - 2).StartsWith("?>"));
8231
Debug.
Assert
(_ps.chars.AsSpan(_ps.charPos - 3).StartsWith("-->"));
8239
Debug.
Assert
(_ps.chars.AsSpan(_ps.charPos - 3).StartsWith("]]>"));
8264
Debug.
Assert
(_incReadState == IncrementalReadState.Text ||
8373
Debug.
Assert
(_ps.charPos - pos == 0);
8374
Debug.
Assert
(_ps.charPos - startPos == 0);
8413
Debug.
Assert
(_ps.charPos - pos == 0);
8414
Debug.
Assert
(_ps.charPos - startPos == 0);
8534
Debug.
Assert
(_fragmentType == XmlNodeType.Attribute);
8551
Debug.
Assert
(_parsingFunction == ParsingFunction.InReadAttributeValue);
8564
Debug.
Assert
(_ps.chars != null);
8579
Debug.
Assert
(_stringBuilder.Length == 0);
8783
Debug.
Assert
(_ps.chars != null);
8796
Debug.
Assert
(_ps.charPos < _ps.charsUsed);
8861
Debug.
Assert
(_ps.chars != null);
8874
Debug.
Assert
(_dtdInfo == null && _fragmentParserContext != null && _fragmentParserContext.HasDtdInfo);
8890
Debug.
Assert
(_parsingFunction != ParsingFunction.InReadContentAsBinary);
8917
Debug.
Assert
(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
8918
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
9001
Debug.
Assert
(context != null);
9022
Debug.
Assert
(nt != null);
9039
Debug.
Assert
(_nameTableFromSettings == false);
9064
Debug.
Assert
(_dtdInfo == null);
9224
Debug.
Assert
(attr != null);
9245
Debug.
Assert
(_namespaceManager != null);
9248
Debug.
Assert
(prefix != null);
9266
Debug.
Assert
(attr != null);
9298
Debug.
Assert
(_nodes[_index].type == XmlNodeType.Element);
9316
Debug.
Assert
(_nodes[_index].type == XmlNodeType.Element);
9317
Debug.
Assert
(_namespaceManager != null);
9351
Debug.
Assert
(_incReadDecoder != null);
9385
Debug.
Assert
(_ps.chars != null);
9464
Debug.
Assert
(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
9520
Debug.
Assert
(characters >= 0);
9562
Debug.
Assert
(startPos >= 0);
9563
Debug.
Assert
(endPos < chars.Length);
9564
Debug.
Assert
(startPos <= endPos);
9571
Debug.
Assert
(startPos >= 0);
9572
Debug.
Assert
(endPos < str.Length);
9573
Debug.
Assert
(startPos <= endPos);
System\Xml\Core\XmlTextReaderImplAsync.cs (72)
94
Debug.
Assert
(_reportedBaseUri != null);
125
Debug.
Assert
(_reportedBaseUri != null);
178
Debug.
Assert
(!_ps.appendMode);
198
Debug.
Assert
(_parsingFunction == ParsingFunction.ElementContent ||
203
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
356
Debug.
Assert
(_curNode.type == XmlNodeType.EndElement);
357
Debug.
Assert
(_parsingFunction != ParsingFunction.Eof);
762
Debug.
Assert
(_parsingMode == ParsingMode.Full);
828
Debug.
Assert
(_parsingStatesStackTop == -1);
829
Debug.
Assert
((systemId != null && systemId.Length > 0) || (publicId != null && publicId.Length > 0));
846
Debug.
Assert
(_ps.appendMode);
862
Debug.
Assert
(baseUri != null);
868
Debug.
Assert
(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.textReader == null);
869
Debug.
Assert
(baseUriStr != null);
870
Debug.
Assert
(baseUri == null || (baseUri.ToString().Equals(baseUriStr)));
944
Debug.
Assert
(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.stream == null);
945
Debug.
Assert
(baseUriStr != null);
977
Debug.
Assert
(context != null && context.HasDtdInfo);
1003
Debug.
Assert
(_ps.stream != null);
1161
Debug.
Assert
(_ps.charsUsed < _ps.chars.Length);
1193
Debug.
Assert
(_stringBuilder.Length == 0 || isTextDecl);
1399
Debug.
Assert
(!isTextDecl);
1597
Debug.
Assert
(pos == _ps.charsUsed && !_ps.isEof);
1712
Debug.
Assert
(_index == 0);
2252
Debug.
Assert
(_index > 0);
2257
Debug.
Assert
(_curNode == startTagNode);
2299
Debug.
Assert
(startTag.type == XmlNodeType.EntityReference);
2311
Debug.
Assert
(_attrCount == 0);
2361
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
2369
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
2483
Debug.
Assert
(attrNameLineNo == _ps.LineNo);
2613
Debug.
Assert
(_stringBuilder.Length == 0);
2830
Debug.
Assert
(_ps.isEof);
2899
Debug.
Assert
(_stringBuilder.Length == 0);
2929
Debug.
Assert
(endPos - startPos > 0);
2967
Debug.
Assert
(_stringBuilder.Length == 0);
2988
Debug.
Assert
(endPos - startPos > 0);
3018
Debug.
Assert
(_stringBuilder.Length > 0);
3039
Debug.
Assert
(endPos - startPos > 0);
3475
Debug.
Assert
(_ps.isEof);
3529
Debug.
Assert
(_stringBuilder.Length == 0);
3530
Debug.
Assert
(_parsingFunction == ParsingFunction.PartialTextValue ||
3555
Debug.
Assert
(_stringBuilder.Length > 0);
3609
Debug.
Assert
(_parsingFunction == ParsingFunction.PartialTextValue || _parsingFunction == ParsingFunction.InReadValueChunk ||
3625
Debug.
Assert
(_parsingFunction == ParsingFunction.InReadValueChunk);
3630
Debug.
Assert
((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
3644
Debug.
Assert
(_parsingFunction == ParsingFunction.InReadContentAsBinary || _parsingFunction == ParsingFunction.InReadElementContentAsBinary);
3649
Debug.
Assert
((_index > 0) ? _nextParsingFunction == ParsingFunction.ElementContent : _nextParsingFunction == ParsingFunction.DocumentContent);
3677
Debug.
Assert
(_stringBuilder.Length == 0);
3718
Debug.
Assert
(_ps.chars[_ps.charPos] == '&');
3729
Debug.
Assert
(_ps.chars[_ps.charPos] == '&');
3749
Debug.
Assert
(entityType == EntityType.CharacterDec || entityType == EntityType.CharacterHex);
3908
Debug.
Assert
(_stringBuilder.Length == 0);
3934
Debug.
Assert
(_ps.charPos < _ps.charsUsed);
3988
Debug.
Assert
(_stringBuilder.Length == 0);
4053
Debug.
Assert
(!_ps.eolNormalized);
4202
Debug.
Assert
(_stringBuilder.Length == 0);
4279
Debug.
Assert
(!_ps.eolNormalized);
4460
Debug.
Assert
(_dtdProcessing == DtdProcessing.Ignore);
4791
Debug.
Assert
(_ps.isEof);
4891
Debug.
Assert
(_ps.isEof);
4920
Debug.
Assert
(_ps.chars[_ps.charPos] == '&');
4954
Debug.
Assert
(_ps.chars[_ps.charPos] == '&');
5161
Debug.
Assert
(_xmlResolver != null);
5197
Debug.
Assert
(entity.IsExternal);
5211
Debug.
Assert
(_ps.appendMode);
5255
Debug.
Assert
(_dtdInfo == null && _fragmentParserContext != null && _fragmentParserContext.HasDtdInfo);
5270
Debug.
Assert
(_parsingFunction != ParsingFunction.InReadContentAsBinary);
5296
Debug.
Assert
(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
5297
Debug.
Assert
(_curNode.type == XmlNodeType.Element);
5359
Debug.
Assert
(_incReadDecoder != null);
5473
Debug.
Assert
(_parsingFunction != ParsingFunction.InReadElementContentAsBinary);
System\Xml\Core\XmlTextReaderImplHelpers.cs (22)
284
Debug.
Assert
(internalDtd != null);
417
Debug.
Assert
(type == XmlNodeType.Element);
430
Debug.
Assert
(type == XmlNodeType.Attribute);
451
Debug.
Assert
(_chars != null);
462
Debug.
Assert
(_chars != null);
467
Debug.
Assert
(_value != null);
511
Debug.
Assert
(value != null);
537
Debug.
Assert
(localName != null);
538
Debug.
Assert
(localName.Length > 0);
567
Debug.
Assert
(_valueStartPos != -1);
568
Debug.
Assert
(_chars != null);
578
Debug.
Assert
(_valueStartPos != -1);
579
Debug.
Assert
(_chars != null);
599
Debug.
Assert
(_valueStartPos != -1);
600
Debug.
Assert
(_chars != null);
625
Debug.
Assert
(_valueStartPos != -1);
626
Debug.
Assert
(_chars != null);
643
Debug.
Assert
(_chars != null);
648
Debug.
Assert
(_value != null);
668
Debug.
Assert
(nameWPrefix == null);
725
Debug.
Assert
(x == null || x is NodeData || x is IDtdDefaultAttributeInfo);
726
Debug.
Assert
(y == null || y is NodeData || y is IDtdDefaultAttributeInfo);
System\Xml\Core\XmlTextWriter.cs (7)
1549
Debug.
Assert
(_useNsHashtable);
1550
Debug.
Assert
(_nsHashtable != null);
1565
Debug.
Assert
(_useNsHashtable);
1566
Debug.
Assert
(_nsHashtable != null);
1570
Debug.
Assert
(_nsHashtable.ContainsKey(_nsStack[i].prefix));
1607
Debug.
Assert
(_nsHashtable != null);
1632
Debug.
Assert
(_nsHashtable != null);
System\Xml\Core\XmlUtf8RawTextWriter.cs (40)
99
Debug.
Assert
(stream != null && settings != null);
199
Debug.
Assert
(name != null && name.Length > 0);
238
Debug.
Assert
(localName != null && localName.Length > 0);
239
Debug.
Assert
(prefix != null);
268
Debug.
Assert
(localName != null && localName.Length > 0);
269
Debug.
Assert
(prefix != null);
298
Debug.
Assert
(localName != null && localName.Length > 0);
299
Debug.
Assert
(prefix != null);
316
Debug.
Assert
(localName != null && localName.Length > 0);
317
Debug.
Assert
(prefix != null);
347
Debug.
Assert
(prefix != null && namespaceName != null);
364
Debug.
Assert
(prefix != null);
398
Debug.
Assert
(text != null);
403
Debug.
Assert
(_bufPos >= 4);
433
Debug.
Assert
(text != null);
450
Debug.
Assert
(name != null && name.Length > 0);
451
Debug.
Assert
(text != null);
470
Debug.
Assert
(name != null && name.Length > 0);
513
Debug.
Assert
(ws != null);
533
Debug.
Assert
(text != null);
567
Debug.
Assert
(buffer != null);
568
Debug.
Assert
(index >= 0);
569
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
589
Debug.
Assert
(buffer != null);
590
Debug.
Assert
(index >= 0);
591
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
605
Debug.
Assert
(data != null);
672
Debug.
Assert
(_stream != null);
731
Debug.
Assert
(pSrc <= pSrcEnd);
853
Debug.
Assert
(pSrc <= pSrcEnd);
953
Debug.
Assert
(s != null);
983
Debug.
Assert
(pSrc <= pSrcEnd);
1047
Debug.
Assert
(pSrc <= pSrcEnd);
1166
Debug.
Assert
(pSrc <= pSrcEnd);
1316
Debug.
Assert
(pSrc <= pSrcEnd);
1430
Debug.
Assert
(XmlCharType.IsSurrogate(*pSrc));
1463
Debug.
Assert
(!XmlCharType.IsWhiteSpace((char)ch));
1464
Debug.
Assert
(!XmlCharType.IsAttributeValueChar((char)ch));
1519
Debug.
Assert
(ch >= 0x80 && !XmlCharType.IsSurrogate(ch));
1820
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
System\Xml\Core\XmlUtf8RawTextWriterAsync.cs (40)
113
Debug.
Assert
(name != null && name.Length > 0);
153
Debug.
Assert
(localName != null && localName.Length > 0);
154
Debug.
Assert
(prefix != null);
179
Debug.
Assert
(localName != null && localName.Length > 0);
180
Debug.
Assert
(prefix != null);
212
Debug.
Assert
(localName != null && localName.Length > 0);
213
Debug.
Assert
(prefix != null);
232
Debug.
Assert
(localName != null && localName.Length > 0);
233
Debug.
Assert
(prefix != null);
273
Debug.
Assert
(prefix != null && namespaceName != null);
283
Debug.
Assert
(prefix != null);
322
Debug.
Assert
(text != null);
327
Debug.
Assert
(_bufPos >= 4);
358
Debug.
Assert
(text != null);
376
Debug.
Assert
(name != null && name.Length > 0);
377
Debug.
Assert
(text != null);
397
Debug.
Assert
(name != null && name.Length > 0);
442
Debug.
Assert
(ws != null);
459
Debug.
Assert
(text != null);
492
Debug.
Assert
(buffer != null);
493
Debug.
Assert
(index >= 0);
494
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
512
Debug.
Assert
(buffer != null);
513
Debug.
Assert
(index >= 0);
514
Debug.
Assert
(count >= 0 && index + count <= buffer.Length);
526
Debug.
Assert
(data != null);
558
Debug.
Assert
(_stream != null);
618
Debug.
Assert
(pSrc <= pSrcEnd);
822
Debug.
Assert
(pSrc <= pSrcEnd);
1061
Debug.
Assert
(pSrc <= pSrcEnd);
1127
Debug.
Assert
(text1 != null);
1128
Debug.
Assert
(text2 != null || (text3 == null && text4 == null));
1129
Debug.
Assert
(text3 != null || (text4 == null));
1185
Debug.
Assert
(text1 != null);
1186
Debug.
Assert
(text2 != null || (text3 == null && text4 == null));
1187
Debug.
Assert
(text3 != null || (text4 == null));
1236
Debug.
Assert
(pSrc <= pSrcEnd);
1437
Debug.
Assert
(pSrc <= pSrcEnd);
1626
Debug.
Assert
(pSrc <= pSrcEnd);
1787
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
System\Xml\Core\XmlValidatingReaderImpl.cs (4)
746
Debug.
Assert
(value is XmlValidatingReader);
1013
Debug.
Assert
(_parserContext != null);
1014
Debug.
Assert
(_coreReaderImpl.DtdInfo == null);
1052
Debug.
Assert
(_coreReader.NodeType == XmlNodeType.EntityReference);
System\Xml\Core\XmlValidatingReaderImplAsync.cs (3)
175
Debug.
Assert
(_parserContext != null);
176
Debug.
Assert
(_coreReaderImpl.DtdInfo == null);
193
Debug.
Assert
(_coreReader.NodeType == XmlNodeType.EntityReference);
System\Xml\Core\XmlWellFormedWriter.cs (21)
240
Debug.
Assert
(writer != null);
241
Debug.
Assert
(settings != null);
242
Debug.
Assert
(MaxNamespacesWalkCount <= 3);
456
Debug.
Assert
(prefix.Length == 0);
484
Debug.
Assert
(_attrHashTable != null);
743
Debug.
Assert
(_attrValueCache != null);
785
Debug.
Assert
(_curDeclPrefix != null);
1262
Debug.
Assert
(i >= 0);
1273
Debug.
Assert
(i >= 0);
1581
Debug.
Assert
(_stateTable == s_stateTableAuto);
1625
Debug.
Assert
(prefix == "xmlns");
1779
Debug.
Assert
(_nsHashtable != null);
1795
Debug.
Assert
(_nsHashtable != null);
1817
Debug.
Assert
(_useNsHashtable);
1818
Debug.
Assert
(_nsHashtable != null);
1819
Debug.
Assert
(indexFrom <= indexTo);
1822
Debug.
Assert
(_nsHashtable.ContainsKey(_nsStack[i].prefix));
2031
Debug.
Assert
(ncname != null && ncname.Length > 0);
2123
Debug.
Assert
(_attrHashTable.Count == 0);
2148
Debug.
Assert
(_attrHashTable != null);
2166
Debug.
Assert
(prev >= 0 && _attrStack[prev].localName == localName);
System\Xml\Core\XmlWellFormedWriterAsync.cs (3)
229
Debug.
Assert
(prefix.Length == 0);
645
Debug.
Assert
(_attrValueCache != null);
690
Debug.
Assert
(_curDeclPrefix != null);
System\Xml\Core\XmlWellFormedWriterHelpers.cs (3)
96
Debug.
Assert
(kind == NamespaceKind.NeedToWrite);
505
Debug.
Assert
(_singleStringValue != null);
506
Debug.
Assert
(_lastItem == -1);
System\Xml\Core\XmlWellFormedWriterHelpersAsync.cs (1)
31
Debug.
Assert
(kind == NamespaceKind.NeedToWrite);
System\Xml\Core\XmlWrappingReader.cs (1)
25
Debug.
Assert
(baseReader != null);
System\Xml\Core\XmlWrappingWriter.cs (1)
23
Debug.
Assert
(baseWriter != null);
System\Xml\Core\XmlWriterSettings.cs (1)
367
Debug.
Assert
(Encoding.UTF8.WebName == "utf-8");
System\Xml\Core\XsdCachingReader.cs (8)
483
Debug.
Assert
(_coreReader.NodeType == XmlNodeType.EndElement || (_coreReader.NodeType == XmlNodeType.Element && _coreReader.IsEmptyElement));
488
Debug.
Assert
(endElementNode.NodeType == XmlNodeType.EndElement);
496
Debug.
Assert
(_coreReader.NodeType == XmlNodeType.EndElement || (_coreReader.NodeType == XmlNodeType.Element && _coreReader.IsEmptyElement));
561
Debug.
Assert
(_cacheState == CachingReaderState.Replay);
591
Debug.
Assert
(_cacheState == CachingReaderState.Replay);
653
Debug.
Assert
(attIndex < _attributeEvents.Length);
671
Debug.
Assert
(_contentIndex <= _contentEvents.Length);
692
Debug.
Assert
(_coreReader.NodeType == XmlNodeType.Element);
System\Xml\Core\XsdCachingReaderAsync.cs (1)
127
Debug.
Assert
(_cacheState == CachingReaderState.Replay);
System\Xml\Core\XsdValidatingReader.cs (48)
219
Debug.
Assert
(_cachedNode != null);
243
Debug.
Assert
(_cachedNode != null);
264
Debug.
Assert
(_cachedNode != null);
279
Debug.
Assert
(_cachedNode != null);
294
Debug.
Assert
(_cachedNode != null);
323
Debug.
Assert
(_cachedNode != null);
338
Debug.
Assert
(_cachedNode != null);
425
Debug.
Assert
(_xmlSchemaInfo.SchemaType!.Datatype != null);
434
Debug.
Assert
(AttributeSchemaInfo.SchemaType!.Datatype != null);
1177
Debug.
Assert
(attNode != null);
1208
Debug.
Assert
(_readBinaryHelper != null);
1235
Debug.
Assert
(_attributePSVI != null);
1263
Debug.
Assert
(_readBinaryHelper != null);
1304
Debug.
Assert
(_readBinaryHelper != null);
1342
Debug.
Assert
(_readBinaryHelper != null);
1356
Debug.
Assert
(moveTo);
1384
Debug.
Assert
(_readBinaryHelper != null);
1456
Debug.
Assert
(_readBinaryHelper != null);
1570
Debug.
Assert
(_readBinaryHelper != null);
1579
Debug.
Assert
(_cachedNode != null);
1617
Debug.
Assert
(_readBinaryHelper != null);
1644
Debug.
Assert
(_readBinaryHelper != null);
1671
Debug.
Assert
(_readBinaryHelper != null);
1698
Debug.
Assert
(_readBinaryHelper != null);
1927
Debug.
Assert
(_nsManager != null);
1940
Debug.
Assert
(_nsManager != null);
1953
Debug.
Assert
(_nsManager != null);
1990
Debug.
Assert
(_attributePSVI != null);
2072
Debug.
Assert
(_nsManager != null);
2111
Debug.
Assert
(_nsManager != null);
2137
Debug.
Assert
(_atomicValue != null);
2140
Debug.
Assert
(_cachingReader != null);
2148
Debug.
Assert
(_nsManager != null);
2236
Debug.
Assert
(_coreReaderNameTable.Get(localName) != null);
2237
Debug.
Assert
(_coreReaderNameTable.Get(ns) != null);
2281
Debug.
Assert
(_coreReaderNameTable.Get(attrLocalName) != null);
2282
Debug.
Assert
(_coreReaderNameTable.Get(ns) != null);
2304
Debug.
Assert
(attIndex < _attributePSVINodes.Length);
2330
Debug.
Assert
(_inlineSchemaParser != null);
2440
Debug.
Assert
(this.NodeType == XmlNodeType.Element);
2552
Debug.
Assert
(_nsManager != null);
2587
Debug.
Assert
(_coreReader.NodeType == XmlNodeType.EndElement);
2626
Debug.
Assert
(_cachingReader != null);
2646
Debug.
Assert
(_cachingReader != null);
2709
Debug.
Assert
(_cachingReader != null);
2723
Debug.
Assert
(xmlType != null && xmlType.Datatype != null);
2727
Debug.
Assert
(listType != null);
2740
Debug.
Assert
(NodeType != XmlNodeType.Attribute);
System\Xml\Core\XsdValidatingReaderAsync.cs (19)
24
Debug.
Assert
(_cachedNode != null);
321
Debug.
Assert
(_readBinaryHelper != null);
400
Debug.
Assert
(_readBinaryHelper != null);
427
Debug.
Assert
(_readBinaryHelper != null);
454
Debug.
Assert
(_readBinaryHelper != null);
481
Debug.
Assert
(_readBinaryHelper != null);
571
Debug.
Assert
(_nsManager != null);
609
Debug.
Assert
(_nsManager != null);
635
Debug.
Assert
(_atomicValue != null);
638
Debug.
Assert
(_cachingReader != null);
646
Debug.
Assert
(_nsManager != null);
653
Debug.
Assert
(_inlineSchemaParser != null);
716
Debug.
Assert
(_originalAtomicValueString != null);
735
Debug.
Assert
(value != null);
737
Debug.
Assert
(_originalAtomicValueString != null);
776
Debug.
Assert
(this.NodeType == XmlNodeType.Element);
790
Debug.
Assert
(_originalAtomicValueString != null);
816
Debug.
Assert
(_originalAtomicValueString != null);
890
Debug.
Assert
(_nsManager != null);
System\Xml\Dom\DocumentSchemaValidator.cs (15)
67
Debug.
Assert
(schemas != null && schemas.Count > 0);
89
Debug.
Assert
(nodeToValidate.SchemaInfo != null);
115
Debug.
Assert
(schemaElement.ElementSchemaType == schemaInfo.SchemaType);
324
Debug.
Assert
(elementNode != null);
338
Debug.
Assert
(_nameTable.Get(attr.NamespaceURI) != null);
339
Debug.
Assert
(_nameTable.Get(attr.LocalName) != null);
435
Debug.
Assert
(_attributeSchemaInfo != null);
447
Debug.
Assert
(simpleValue != null);
485
Debug.
Assert
(elementToValidate.ParentNode!.NodeType != XmlNodeType.Document); //Handle if it is the documentElement separately
608
Debug.
Assert
(_nodeSequenceToValidate![0] == elementToValidate.ParentNode);
673
Debug.
Assert
(elementNode != null);
687
Debug.
Assert
(_nameTable.Get(attr.NamespaceURI) != null);
688
Debug.
Assert
(_nameTable.Get(attr.LocalName) != null);
757
Debug.
Assert
(child == childToStopAt);
791
Debug.
Assert
(ex != null);
System\Xml\Dom\DocumentXmlWriter.cs (3)
433
Debug.
Assert
(elem != null);
438
Debug.
Assert
(attr != null);
449
Debug.
Assert
(attr != null);
System\Xml\Dom\DocumentXPathNavigator.cs (34)
179
Debug.
Assert
(_source.Value != null);
220
Debug.
Assert
(value != null);
527
Debug.
Assert
(attributes != null);
547
Debug.
Assert
(attributes != null && attributes.parent != null);
578
Debug.
Assert
(_namespaceParent != null);
640
Debug.
Assert
(attributes != null);
641
Debug.
Assert
(0 <= index && index < attributes.Count);
661
Debug.
Assert
(attributes != null && attributes.parent != null);
724
Debug.
Assert
(parent != null);
760
Debug.
Assert
(parent != null);
788
Debug.
Assert
(sibling != null);
1271
Debug.
Assert
(ownerDocument != null);
1307
Debug.
Assert
(node1 != null);
1308
Debug.
Assert
(node2 != null);
1311
Debug.
Assert
(OwnerNode(node1) == OwnerNode(node2));
1317
Debug.
Assert
(element != null);
1393
Debug.
Assert
(node1 != node2);
1412
Debug.
Assert
(node2 != null);
1427
Debug.
Assert
(node1 != null);
1436
Debug.
Assert
(node1 != node2);
1456
Debug.
Assert
(this.NodeType != XPathNodeType.Attribute && this.NodeType != XPathNodeType.Namespace && this.NodeType != XPathNodeType.All);
2257
Debug.
Assert
(((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute);
2270
Debug.
Assert
(node != null);
2311
Debug.
Assert
(((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute);
2312
Debug.
Assert
(Ref.Equal(nav.NameTable.Get(nsAtom), nsAtom));
2326
Debug.
Assert
(node != null);
2327
Debug.
Assert
(node.NodeType == XmlNodeType.Element);
2369
Debug.
Assert
(((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute);
2370
Debug.
Assert
(Ref.Equal(nav.NameTable.Get(localNameAtom), localNameAtom));
2371
Debug.
Assert
(Ref.Equal(nav.NameTable.Get(nsAtom), nsAtom));
2372
Debug.
Assert
(localNameAtom.Length > 0); // Use DocumentXPathNodeIterator_ElemChildren_NoLocalName class for special magic value of localNameAtom
2391
Debug.
Assert
(node != null);
2392
Debug.
Assert
(node.NodeType == XmlNodeType.Element);
2402
Debug.
Assert
(localNameAtom.Length > 0); // Use DocumentXPathNodeIterator_ElemChildren_AndSelf_NoLocalName if localName == String.Empty
System\Xml\Dom\DomNameTable.cs (1)
26
Debug.
Assert
((_entries.Length & _mask) == 0); // entries.Length must be a power of two
System\Xml\Dom\XmlAttribute.cs (3)
21
Debug.
Assert
(name != null);
22
Debug.
Assert
(doc != null);
54
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlAttributeCollection.cs (10)
194
Debug.
Assert
(offset != -1); // the if statement above guarantees that the ref node is in the collection
223
Debug.
Assert
(offset != -1); // the if statement above guarantees that the ref node is in the collection
303
Debug.
Assert
(retNode is XmlAttribute);
319
Debug.
Assert
(retNode is XmlAttribute);
386
Debug.
Assert
(parentElem != null);
388
Debug.
Assert
(doc != null);
403
Debug.
Assert
(parentElem != null);
405
Debug.
Assert
(doc != null);
418
Debug.
Assert
(-1 == FindNodeOffset(node));
421
Debug.
Assert
(retNode is XmlAttribute);
System\Xml\Dom\XmlCDataSection.cs (1)
72
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlCharacterData.cs (1)
201
Debug.
Assert
(XmlDocument.IsTextNode(n.NodeType) || (n.ParentNode != null && n.ParentNode.NodeType == XmlNodeType.EntityReference));
System\Xml\Dom\XmlComment.cs (1)
37
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlDeclaration.cs (1)
160
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlDocument.cs (12)
217
Debug.
Assert
((prefix == null) ? (n.Prefix.Length == 0) : (prefix == n.Prefix));
218
Debug.
Assert
(n.LocalName == localName);
219
Debug.
Assert
((namespaceURI == null) ? (n.NamespaceURI.Length == 0) : (n.NamespaceURI == namespaceURI));
226
Debug.
Assert
(n == null || ((prefix == null) ? (n.Prefix.Length == 0) : (prefix == n.Prefix)));
227
Debug.
Assert
(n == null || n.LocalName == localName);
228
Debug.
Assert
(n == null || ((namespaceURI == null) ? (n.NamespaceURI.Length == 0) : (n.NamespaceURI == namespaceURI)));
235
Debug.
Assert
((prefix == null) ? (xmlName.Prefix.Length == 0) : (prefix == xmlName.Prefix));
236
Debug.
Assert
(xmlName.LocalName == localName);
237
Debug.
Assert
((namespaceURI == null) ? (xmlName.NamespaceURI.Length == 0) : (xmlName.NamespaceURI == namespaceURI));
977
Debug.
Assert
(((XmlAttribute)node).Specified);
1042
Debug.
Assert
(toNode.NodeType != XmlNodeType.EntityReference);
1772
Debug.
Assert
(doc == this);
System\Xml\Dom\XmlDocumentFragment.cs (3)
109
Debug.
Assert
(OwnerDocument != null);
155
Debug.
Assert
(newChild != null); //should be checked that newChild is not null before this function call
171
Debug.
Assert
(newChild != null); //should be checked that newChild is not null before this function call
System\Xml\Dom\XmlDocumentType.cs (2)
30
Debug.
Assert
(doc != null);
61
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlElement.cs (5)
23
Debug.
Assert
(name != null);
54
Debug.
Assert
(OwnerDocument != null);
481
Debug.
Assert
(n != null);
495
Debug.
Assert
(n != null);
503
Debug.
Assert
(n != null);
System\Xml\Dom\XmlElementList.cs (11)
29
Debug.
Assert
(parent != null);
30
Debug.
Assert
(parent.NodeType == XmlNodeType.Element || parent.NodeType == XmlNodeType.Document);
32
Debug.
Assert
(parent.Document != null);
72
Debug.
Assert
(parent.Document != null);
74
Debug.
Assert
(nt != null);
83
Debug.
Assert
(parent.Document != null);
85
Debug.
Assert
(nt != null);
108
Debug.
Assert
(curNode != null);
135
Debug.
Assert
(curNode != null);
183
Debug.
Assert
(n != null);
197
Debug.
Assert
(n != null);
System\Xml\Dom\XmlEntityReference.cs (1)
84
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlLoader.cs (17)
57
Debug.
Assert
(_reader != null);
58
Debug.
Assert
(parentDoc != null);
148
Debug.
Assert
(parent.NodeType == XmlNodeType.Element);
170
Debug.
Assert
(parent == null);
225
Debug.
Assert
(node != null);
251
Debug.
Assert
(_reader!.NodeType == XmlNodeType.Attribute);
292
Debug.
Assert
(node != null);
301
Debug.
Assert
(_reader!.IsDefault);
350
Debug.
Assert
(node != null);
358
Debug.
Assert
(_reader!.NodeType == XmlNodeType.EntityReference);
381
Debug.
Assert
(_reader!.NodeType == XmlNodeType.XmlDeclaration);
419
Debug.
Assert
(_reader!.NodeType == XmlNodeType.DocumentType);
494
Debug.
Assert
(parent!.NodeType == XmlNodeType.Element);
549
Debug.
Assert
(node != null);
749
Debug.
Assert
(parentNode.NodeType != XmlNodeType.Document);
751
Debug.
Assert
(_doc != null);
944
Debug.
Assert
(tr.EntityHandling == EntityHandling.ExpandCharEntities);
System\Xml\Dom\XmlName.cs (2)
89
Debug.
Assert
(_prefix != null);
109
Debug.
Assert
(Ref.Equal(_name, ownerDoc.NameTable.Get(_name)));
System\Xml\Dom\XmlNode.cs (9)
44
Debug.
Assert
(doc != null);
56
Debug.
Assert
(nodeIterator.Current != null);
128
Debug.
Assert
(parentNode != null);
187
Debug.
Assert
(parentNode != null);
791
Debug.
Assert
(firstNode.NodeType == XmlNodeType.Text
1433
Debug.
Assert
(prevNode.IsText);
1434
Debug.
Assert
(nextNode.IsText);
1441
Debug.
Assert
(prevNode.IsText);
1442
Debug.
Assert
(nextNode.IsText);
System\Xml\Dom\XmlNodeReader.cs (11)
110
Debug.
Assert
(nt == XmlNodeType.XmlDeclaration || nt == XmlNodeType.DocumentType);
131
Debug.
Assert
(_curNode.NodeType == XmlNodeType.XmlDeclaration || _curNode.NodeType == XmlNodeType.DocumentType);
136
Debug.
Assert
(_nAttrInd >= 0 && _nAttrInd < AttributeCount);
214
Debug.
Assert
(_curNode.NodeType == XmlNodeType.XmlDeclaration || _curNode.NodeType == XmlNodeType.DocumentType);
215
Debug.
Assert
(_nAttrInd >= 0 && _nAttrInd < AttributeCount);
235
Debug.
Assert
(nt == XmlNodeType.XmlDeclaration || nt == XmlNodeType.DocumentType);
236
Debug.
Assert
(_nAttrInd >= 0 && _nAttrInd < AttributeCount);
608
Debug.
Assert
(IsOnDeclOrDocType);
1053
Debug.
Assert
(_curNode.NodeType == XmlNodeType.XmlDeclaration || _curNode.NodeType == XmlNodeType.DocumentType);
1082
Debug.
Assert
(_curNode != null);
1627
Debug.
Assert
(_curDepth == 0);
System\Xml\Dom\XmlProcessingInstruction.cs (1)
82
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlSignificantWhiteSpace.cs (1)
72
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlText.cs (1)
76
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XmlWhitespace.cs (1)
88
Debug.
Assert
(OwnerDocument != null);
System\Xml\Dom\XPathNodeList.cs (1)
49
Debug.
Assert
(_nodeIterator.Current != null);
System\Xml\Resolvers\XmlPreloadedResolver.cs (2)
214
Debug.
Assert
(s_rss091_Dtd.Length == 1);
352
Debug.
Assert
(uri != null);
System\Xml\Schema\BaseProcessor.cs (2)
25
Debug.
Assert
(nameTable != null);
146
Debug.
Assert
(item is XmlSchemaElement);
System\Xml\Schema\BaseValidator.cs (6)
49
Debug.
Assert
(schemaCollection == null || schemaCollection.NameTable == reader.NameTable);
171
Debug.
Assert
(context != null);
191
Debug.
Assert
(names.Count > 0);
209
Debug.
Assert
(context != null);
232
Debug.
Assert
(textString != null);
239
Debug.
Assert
(textValue != null);
System\Xml\Schema\BitSet.cs (1)
73
Debug.
Assert
(startFrom >= -1 && startFrom <= _count);
System\Xml\Schema\Chameleonkey.cs (1)
66
Debug.
Assert
((chameleonLocation.OriginalString.Length == 0 && originalSchema != null)
System\Xml\Schema\CompiledidEntityConstraint.cs (1)
61
Debug.
Assert
(fields.Count > 0);
System\Xml\Schema\ConstraintStruct.cs (5)
211
Debug.
Assert
(_dstruct != null);
219
Debug.
Assert
(_dstruct != null);
363
Debug.
Assert
(arr1 != null);
378
Debug.
Assert
(arr2 != null);
398
Debug.
Assert
(dim > 0);
System\Xml\Schema\ContentValidator.cs (17)
86
Debug.
Assert
(_particles.Count == _last + 1);
123
Debug.
Assert
(_particles.Count == _last + 1);
138
Debug.
Assert
(name != null);
910
Debug.
Assert
(parent is SequenceNode);
911
Debug.
Assert
(this == parent.RightChild);
1234
Debug.
Assert
(ContentType == XmlSchemaContentType.ElementOnly || ContentType == XmlSchemaContentType.Mixed);
1243
Debug.
Assert
(!IsOpen);
1328
Debug.
Assert
(lrNode != null);
1346
Debug.
Assert
(lrNode1 != null);
1394
Debug.
Assert
(lrNode != null);
1463
Debug.
Assert
(state == stateTable[statePosSet]); // just make sure that statePosSet is for correct state
1852
Debug.
Assert
(_minMaxNodesCount != 0);
1951
Debug.
Assert
(_minMaxNodesCount > 0);
1973
Debug.
Assert
(lrNode != null);
2046
Debug.
Assert
(runningPositions[i].curpos != null);
2089
Debug.
Assert
(runningPositions[i].curpos != null);
2149
Debug.
Assert
(_elements.Count > 0);
System\Xml\Schema\DataTypeImplementation.cs (13)
172
Debug.
Assert
(qname != null && dataType != null);
188
Debug.
Assert
(derivedType != null && baseType != null);
363
Debug.
Assert
(currentType != null);
538
Debug.
Assert
(typedValue != null);
559
Debug.
Assert
(typedValue != null);
953
Debug.
Assert
(arr1 != null && arr2 != null);
964
Debug.
Assert
(atomicValues2 != null);
1030
Debug.
Assert
(valuesToCheck != null);
1111
Debug.
Assert
(unionTypedValue != null);
1128
Debug.
Assert
(_itemType.ListValueType.GetElementType() == _itemType.ValueType);
1259
Debug.
Assert
(typedValue != null);
1315
Debug.
Assert
(memberType != null);
2627
Debug.
Assert
(uri != null);
System\Xml\Schema\DtdParser.cs (34)
208
Debug.
Assert
((int)Token.CDATA == (int)XmlTokenizedType.CDATA && (int)XmlTokenizedType.CDATA == 0);
209
Debug.
Assert
((int)Token.ID == (int)XmlTokenizedType.ID && (int)XmlTokenizedType.ID == 1);
210
Debug.
Assert
((int)Token.IDREF == (int)XmlTokenizedType.IDREF && (int)XmlTokenizedType.IDREF == 2);
211
Debug.
Assert
((int)Token.IDREFS == (int)XmlTokenizedType.IDREFS && (int)XmlTokenizedType.IDREFS == 3);
212
Debug.
Assert
((int)Token.ENTITY == (int)XmlTokenizedType.ENTITY && (int)XmlTokenizedType.ENTITY == 4);
213
Debug.
Assert
((int)Token.ENTITIES == (int)XmlTokenizedType.ENTITIES && (int)XmlTokenizedType.ENTITIES == 5);
214
Debug.
Assert
((int)Token.NMTOKEN == (int)XmlTokenizedType.NMTOKEN && (int)XmlTokenizedType.NMTOKEN == 6);
215
Debug.
Assert
((int)Token.NMTOKENS == (int)XmlTokenizedType.NMTOKENS && (int)XmlTokenizedType.NMTOKENS == 7);
216
Debug.
Assert
((int)Token.NOTATION == (int)XmlTokenizedType.NOTATION && (int)XmlTokenizedType.NOTATION == 8);
235
Debug.
Assert
(readerAdapter != null);
492
Debug.
Assert
(ParsingInternalSubset);
498
Debug.
Assert
(_externalEntitiesDepth == 0);
519
Debug.
Assert
(_readerAdapter.EntityStackLength == 0 ||
589
Debug.
Assert
(_curPos > 0 && _chars[_curPos - 1] == ']');
601
Debug.
Assert
(_readerAdapter.EntityStackLength == 0 ||
625
Debug.
Assert
(_scanningFunction == ScanningFunction.SubsetContent);
1494
Debug.
Assert
(idTokenType == Token.PUBLIC);
2393
Debug.
Assert
(_chars[_curPos] == '"' || _chars[_curPos] == '\'');
2609
Debug.
Assert
(_curPos - _tokenStartPos == 0);
3109
Debug.
Assert
(_chars[_curPos] == 'P');
3128
Debug.
Assert
(_chars[_curPos] == 'S');
3150
Debug.
Assert
(_curPos - _tokenStartPos > 0);
3172
Debug.
Assert
(_curPos - _tokenStartPos > 0);
3195
Debug.
Assert
(_curPos == 0 || _chars[_curPos - 1] == '"' || _chars[_curPos - 1] == '\'');
3228
Debug.
Assert
(_internalSubsetValueSb != null);
3244
Debug.
Assert
(_chars[_curPos] == '&' || _chars[_curPos] == '%');
3252
Debug.
Assert
(_chars[_curPos - 1] == ';');
3317
Debug.
Assert
(!ParsingInternalSubset || _freeFloatingDtd);
3318
Debug.
Assert
(_currentEntityId == 0);
3342
Debug.
Assert
(_chars[_curPos - 1] == ';');
3398
Debug.
Assert
(_validate);
3404
Debug.
Assert
(_validate);
3410
Debug.
Assert
(_validate);
3528
Debug.
Assert
(startPos < _charsUsed);
System\Xml\Schema\DtdParserAsync.cs (15)
136
Debug.
Assert
(ParsingInternalSubset);
142
Debug.
Assert
(_externalEntitiesDepth == 0);
163
Debug.
Assert
(_readerAdapter.EntityStackLength == 0 ||
233
Debug.
Assert
(_curPos > 0 && _chars[_curPos - 1] == ']');
245
Debug.
Assert
(_readerAdapter.EntityStackLength == 0 ||
269
Debug.
Assert
(_scanningFunction == ScanningFunction.SubsetContent);
993
Debug.
Assert
(_internalSubsetValueSb != null);
1021
Debug.
Assert
(_internalSubsetValueSb != null);
1119
Debug.
Assert
(idTokenType == Token.PUBLIC);
1839
Debug.
Assert
(_chars[_curPos] == '"' || _chars[_curPos] == '\'');
2055
Debug.
Assert
(_curPos - _tokenStartPos == 0);
2522
Debug.
Assert
(_chars[_curPos] == 'P');
2541
Debug.
Assert
(_chars[_curPos] == 'S');
2574
Debug.
Assert
(_chars[_curPos] == '&' || _chars[_curPos] == '%');
2582
Debug.
Assert
(_chars[_curPos - 1] == ';');
System\Xml\Schema\DtdValidator.cs (2)
46
Debug.
Assert
(reader != null);
149
Debug.
Assert
(reader.NodeType == XmlNodeType.Element);
System\Xml\Schema\FacetChecker.cs (5)
1017
Debug.
Assert
(restriction != null);
1500
Debug.
Assert
(restriction != null);
1629
Debug.
Assert
(values != null);
1675
Debug.
Assert
(list != null);
1683
Debug.
Assert
(enumValue != null);
System\Xml\Schema\Inference\Infer.cs (6)
278
Debug.
Assert
(compiledAttributes != null); //AttributeUses is never null
1003
Debug.
Assert
(elem.ElementDecl == null);
1202
Debug.
Assert
(_xtr!.NodeType == XmlNodeType.Attribute);
1242
Debug.
Assert
(ct != null);
1253
Debug.
Assert
(ct != null); //either the user-defined type itself is a complex type or we switched from a simple type to a complex type
1257
Debug.
Assert
(sce != null);
System\Xml\Schema\NamespaceList.cs (5)
29
Debug.
Assert
(targetNamespace != null);
69
Debug.
Assert
(_set != null);
179
Debug.
Assert
(super._type == ListType.Set);
197
Debug.
Assert
(o1 != o2);
315
Debug.
Assert
(o1 != o2); //clause 1
System\Xml\Schema\Parser.cs (7)
89
Debug.
Assert
(_schemaType == SchemaType.XDR);
241
Debug.
Assert
(_parentNode != null);
324
Debug.
Assert
(currentNode != null);
325
Debug.
Assert
(_parentNode != null);
333
Debug.
Assert
(_reader!.NodeType == XmlNodeType.Element);
418
Debug.
Assert
(_reader!.NodeType == XmlNodeType.Attribute);
444
Debug.
Assert
(_reader!.NodeType == XmlNodeType.EntityReference);
System\Xml\Schema\ParserAsync.cs (1)
50
Debug.
Assert
(_schemaType == SchemaType.XDR);
System\Xml\Schema\Preprocessor.cs (3)
304
Debug.
Assert
(import != null);
823
Debug.
Assert
(_currentSchema != null);
977
Debug.
Assert
((currentSchemaObject as XmlSchema) == null); // The current object should not be schema
System\Xml\Schema\SchemaCollectionCompiler.cs (7)
54
Debug.
Assert
(!members.Contains(element));
514
Debug.
Assert
(group.CanonicalParticle != null);
1030
Debug.
Assert
(baseType.ElementDecl.ContentValidator != null);
1859
Debug.
Assert
(attribute.Use != XmlSchemaUse.Prohibited);
2252
Debug.
Assert
(xe.ElementSchemaType != null);
2486
Debug.
Assert
(particle == XmlSchemaParticle.Empty);
2531
Debug.
Assert
(!p.IsEmpty);
System\Xml\Schema\SchemaSetCompiler.cs (10)
128
Debug.
Assert
(_schemaForSchema != null);
499
Debug.
Assert
(examplar != null); //Headelement presence is checked while building subst groups
596
Debug.
Assert
(group.CanonicalParticle != null);
2224
Debug.
Assert
(attribute.Use != XmlSchemaUse.Prohibited);
2711
Debug.
Assert
(xe.ElementSchemaType != null);
2730
Debug.
Assert
(decl != null);
2912
Debug.
Assert
(!((XmlSchemaParticle)particles[i]).IsEmpty);
3086
Debug.
Assert
(baseFixedValue != null);
3093
Debug.
Assert
(derivedFixedValue != null);
3109
Debug.
Assert
(simpleFixedValue != null);
System\Xml\Schema\XdrBuilder.cs (1)
623
Debug.
Assert
(_GroupDef != null);
System\Xml\Schema\XmlAtomicValue.cs (1)
169
Debug.
Assert
(qname != null); //string representation is handled in a different overload
System\Xml\Schema\XmlSchema.cs (2)
226
Debug.
Assert
(_isPreprocessed);
523
Debug.
Assert
(extList != null && schema != null);
System\Xml\Schema\XmlSchemaObjectTable.cs (8)
32
Debug.
Assert
(oldValue != null);
34
Debug.
Assert
(matchedIndex >= 0);
36
Debug.
Assert
(_entries[matchedIndex].qname == name);
51
Debug.
Assert
(oldValue != null);
53
Debug.
Assert
(_entries[matchedIndex].qname == name);
71
Debug.
Assert
(matchedIndex >= 0);
72
Debug.
Assert
(_entries[matchedIndex].qname == name);
94
Debug.
Assert
(_table.Count == _entries.Count);
System\Xml\Schema\XmlSchemaSet.cs (2)
869
Debug.
Assert
(ns != null);
880
Debug.
Assert
(schema.BaseUri!.Equals(schemaUri));
System\Xml\Schema\XmlSchemaSimpleType.cs (1)
15
Debug.
Assert
(SchemaContentType == XmlSchemaContentType.TextOnly);
System\Xml\Schema\XmlSchemaValidator.cs (32)
333
Debug.
Assert
(_validatedNamespaces != null);
586
Debug.
Assert
(_currentState == ValidatorState.TopLevelAttribute); //Re-set state back to start on error with partial validation type
596
Debug.
Assert
(currentElementDecl != null);
598
Debug.
Assert
(ct != null);
615
Debug.
Assert
(attributeDef != null);
636
Debug.
Assert
(simpleValue != null);
782
Debug.
Assert
(names.Count > 0);
910
Debug.
Assert
(_context.Validity != XmlSchemaValidity.Valid);
1047
Debug.
Assert
(attSchemaInfo != null);
1270
Debug.
Assert
(typedValue != null);
1417
Debug.
Assert
(currentElementDecl.Datatype != null);
1479
Debug.
Assert
(simpleValue != null);
1493
Debug.
Assert
(decl != null && decl.SchemaType != null);
1535
Debug.
Assert
(_validationStack.Length > 1);
1616
Debug.
Assert
(_partialValidationType is XmlSchemaAttribute);
1654
Debug.
Assert
(elementDecl.DefaultValueTyped != null);
1806
Debug.
Assert
(elementDecl.ContentValidator!.ContentType == XmlSchemaContentType.Mixed && elementDecl.DefaultValueTyped != null);
1819
Debug.
Assert
(decl != null);
1830
Debug.
Assert
(_xmlResolver != null);
1922
Debug.
Assert
(dtype != null);
1938
Debug.
Assert
(typedValue != null);
1961
Debug.
Assert
(dtype != null);
1970
Debug.
Assert
(typedValue != null);
2086
Debug.
Assert
(currentElementDecl != null);
2300
Debug.
Assert
(datatype != null);
2507
Debug.
Assert
(contentValidator is DfaContentValidator || contentValidator is NfaContentValidator || contentValidator is RangeContentValidator || contentValidator is AllElementsContentValidator);
2531
Debug.
Assert
(names.Count > 0);
2564
Debug.
Assert
(schemaSet != null);
2583
Debug.
Assert
(names.Count > 0);
2622
Debug.
Assert
(builder.Length != 0);
2633
Debug.
Assert
(nextParticle != null);
2733
Debug.
Assert
(nsList.Length > 0);
System\Xml\Schema\XmlValueConverter.cs (2)
282
Debug.
Assert
(_clrTypeDefault!.IsArray);
3146
Debug.
Assert
(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union);
System\Xml\Schema\XsdBuilder.cs (2)
705
Debug.
Assert
(_currentEntry.InitFunc != null);
708
Debug.
Assert
(_xso != null);
System\Xml\Schema\XsdDateTime.cs (1)
501
Debug.
Assert
(success);
System\Xml\Schema\XsdDuration.cs (3)
117
Debug.
Assert
(durationType == DurationType.Duration || durationType == DurationType.DayTimeDuration);
347
Debug.
Assert
(success);
426
Debug.
Assert
(successCopy);
System\Xml\Schema\XsdValidator.cs (1)
494
Debug.
Assert
(attnDef.SchemaType != null);
System\Xml\Serialization\CodeGenerator.cs (33)
46
System.Diagnostics.Debug.
Assert
(typeBuilder != null);
60
Debug.
Assert
(iType.IsInterface);
131
System.Diagnostics.Debug.
Assert
(_argList != null && _argList.ContainsKey(name));
137
System.Diagnostics.Debug.
Assert
(_currentScope != null && _currentScope.ContainsKey(name));
212
Debug.
Assert
(_currentScope!.parent != null);
221
Debug.
Assert
(_freeLocals != null);
243
Debug.
Assert
(!_currentScope!.ContainsKey(name));
259
Debug.
Assert
(local.LocalType == type);
281
Debug.
Assert
(forState != null);
308
Debug.
Assert
(ICollection_get_Count.IsVirtual && !ICollection_get_Count.DeclaringType!.IsValueType);
402
Debug.
Assert
(methodInfo != null);
411
Debug.
Assert
(ctor != null);
417
Debug.
Assert
(constructorInfo != null);
551
System.Diagnostics.Debug.
Assert
(memberInfo is PropertyInfo);
558
System.Diagnostics.Debug.
Assert
(getMethod != null);
584
System.Diagnostics.Debug.
Assert
(memberInfo is PropertyInfo);
591
System.Diagnostics.Debug.
Assert
(getMethod != null);
619
System.Diagnostics.Debug.
Assert
(memberInfo is PropertyInfo);
625
System.Diagnostics.Debug.
Assert
(setMethod != null);
929
Debug.
Assert
(_currentScope!.ContainsKey(name));
941
Debug.
Assert
(local.LocalType == type);
952
Debug.
Assert
(_currentScope!.ContainsKey(name));
954
Debug.
Assert
(local.LocalType == type);
1038
Debug.
Assert
(!opCode.Equals(OpCodes.Nop));
1245
Debug.
Assert
(ifState != null);
1278
Debug.
Assert
(_initElseIfStack == -1);
1288
Debug.
Assert
(_initIfStack == -1);
1308
Debug.
Assert
(_initIfStack == -1 && _initElseIfStack == -1);
1329
Debug.
Assert
(_initIfStack == -1 && _initElseIfStack == -1);
1613
Debug.
Assert
(this.MethodBuilder.ReturnType == returnType);
1614
Debug.
Assert
(this.MethodBuilder.Attributes == attributes);
1615
Debug.
Assert
(this.ParameterTypes.Length == parameterTypes.Length);
1618
Debug.
Assert
(this.ParameterTypes[i] == parameterTypes[i]);
System\Xml\Serialization\CodeIdentifier.cs (1)
175
Debug.
Assert
(ident != null);
System\Xml\Serialization\Compiler.cs (1)
75
Debug.
Assert
(originalAssemblyInfo != null);
System\Xml\Serialization\Mappings.cs (4)
754
Debug.
Assert
(a1 != null);
755
Debug.
Assert
(a2 != null);
867
Debug.
Assert
(m1 != null);
868
Debug.
Assert
(m2 != null);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (3)
172
Debug.
Assert
(a != null);
296
Debug.
Assert
(o is byte[]);
813
Debug.
Assert
(ai is byte[]);
System\Xml\Serialization\SourceInfo.cs (4)
119
Debug.
Assert
(get_Item != null);
196
Debug.
Assert
(match.Groups["arg"].Value == Arg);
197
Debug.
Assert
(match.Groups["cast"].Value == CodeIdentifier.GetCSharpName(Type!));
224
System.Diagnostics.Debug.
Assert
(targetType == nullableType || targetType.IsAssignableFrom(nullableType.GetGenericArguments()[0]));
System\Xml\Serialization\Types.cs (2)
1094
Debug.
Assert
(propertyInfo != null);
1095
Debug.
Assert
(typeDesc != null);
System\Xml\Serialization\XmlSerializationILGen.cs (5)
48
System.Diagnostics.Debug.
Assert
(access == "public");
63
get { System.Diagnostics.Debug.
Assert
(_moduleBuilder != null); return _moduleBuilder; }
64
set { System.Diagnostics.Debug.
Assert
(_moduleBuilder == null && value != null); _moduleBuilder = value; }
102
System.Diagnostics.Debug.
Assert
(_methodBuilders.ContainsKey(methodName));
592
System.Diagnostics.Debug.
Assert
(memberInfos.ContainsKey(source.Substring(3)));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (20)
254
Debug.
Assert
(_idNameFields.ContainsKey(id));
314
Debug.
Assert
(node == "null" || node == "(object)p");
688
System.Diagnostics.Debug.
Assert
(source == "Reader.ReadElementString()" || source == "Reader.ReadString()"
798
System.Diagnostics.Debug.
Assert
(source == "Reader.Value" || source == "Reader.ReadElementString()" || source == "vals[i]");
916
System.Diagnostics.Debug.
Assert
(source == "false");
1062
Debug.
Assert
(get_TableName != null);
1760
System.Diagnostics.Debug.
Assert
(source == "Reader");
2030
System.Diagnostics.Debug.
Assert
(elseCall == "UnknownNode");
2333
Debug.
Assert
(anyText != null);
2659
Debug.
Assert
(!soapRefs);
2739
Debug.
Assert
(match.Groups["locA1"].Value == match.Groups["locA2"].Value);
2740
Debug.
Assert
(match.Groups["locA1"].Value == match.Groups["locA3"].Value);
2741
Debug.
Assert
(match.Groups["locI1"].Value == match.Groups["locI2"].Value);
2785
System.Diagnostics.Debug.
Assert
(CodeGenerator.GetVariableType(ilg.GetVariable(match.Groups["a"].Value)).IsArray);
2811
Debug.
Assert
(elementType != null && variable is LocalBuilder);
2821
Debug.
Assert
(memberInfos.ContainsKey(source.Substring(3)));
2849
Debug.
Assert
(!localA.LocalType.IsGenericType || (localA.LocalType.GetGenericArguments().Length == 1 && localA.LocalType.GetGenericArguments()[0].IsAssignableFrom(elementType)));
2855
Debug.
Assert
(Add != null);
2868
System.Diagnostics.Debug.
Assert
(varType.IsArray);
2896
Debug.
Assert
(memberInfos.ContainsKey(source.Substring(3)));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (11)
1058
System.Diagnostics.Debug.
Assert
(xmlnsSource.StartsWith("o.@", StringComparison.Ordinal));
1380
System.Diagnostics.Debug.
Assert
(parent == "o" || parent == "p");
2212
Debug.
Assert
(!local.LocalType.IsValueType);
2398
Debug.
Assert
(type.IsValueType);
2533
Debug.
Assert
(initValue.MemberInfo != null);
2534
Debug.
Assert
(initValue.MemberInfo.Name == initValue.Arg.Substring(3));
2580
Debug.
Assert
(typeName == arrayTypeDesc.CSharpName || typeName == $"{arrayTypeDesc.CSharpName}[]");
2589
Debug.
Assert
(type != null);
2590
Debug.
Assert
(ilg != null);
2597
Debug.
Assert
(arrayType != null);
2598
Debug.
Assert
(ilg != null);
System\Xml\ValidateNames.cs (7)
38
Debug.
Assert
(s != null && offset <= s.Length);
69
Debug.
Assert
(s != null && offset <= s.Length);
107
Debug.
Assert
(s != null && offset <= s.Length);
157
Debug.
Assert
(s != null && offset <= s.Length);
376
Debug.
Assert
(offsetBadChar < s.Length);
396
Debug.
Assert
(offsetBadChar < s.Length);
453
Debug.
Assert
(prefix != null && localName != null && ns != null);
System\Xml\XmlCharType.cs (7)
23
Debug.
Assert
(PublicIdChars.Contains(c) == IsPubidChar(c));
24
Debug.
Assert
(AsciiCharDataChars.Contains(c) == IsCharData(c));
25
Debug.
Assert
(WhiteSpaceChars.Contains(c) == IsWhiteSpace(c));
168
Debug.
Assert
(str != null);
169
Debug.
Assert
(startPos <= str.Length);
170
Debug.
Assert
(startPos + len <= str.Length);
181
Debug.
Assert
(start <= end);
System\Xml\XmlEncoding.cs (1)
408
Debug.
Assert
(i == 1);
System\Xml\XmlException.cs (3)
227
Debug.
Assert
(invCharIndex < data.Length);
228
Debug.
Assert
(invCharIndex < length);
229
Debug.
Assert
(length <= data.Length);
System\Xml\XmlNamespacemanager.cs (18)
102
Debug.
Assert
(_nsdecls != null);
108
Debug.
Assert
(_hashTable != null);
113
Debug.
Assert
(decl >= 2);
126
Debug.
Assert
(_nameTable != null);
127
Debug.
Assert
(_nsdecls != null);
170
Debug.
Assert
(_hashTable != null);
177
Debug.
Assert
(_hashTable == null);
193
Debug.
Assert
(_nsdecls != null);
208
Debug.
Assert
(_nsdecls != null);
226
Debug.
Assert
(_nsdecls != null);
242
Debug.
Assert
(i >= 2);
253
Debug.
Assert
(prefix != null);
274
Debug.
Assert
(_nsdecls != null);
281
Debug.
Assert
(_nsdecls != null);
285
Debug.
Assert
(_hashTable != null);
322
Debug.
Assert
(_nsdecls != null);
341
Debug.
Assert
(_nsdecls != null);
367
Debug.
Assert
(_nsdecls != null);
System\Xml\XPath\Internal\AbsoluteQuery.cs (1)
16
Debug.
Assert
(context.Current != null);
System\Xml\XPath\Internal\AttributeQuery.cs (2)
42
Debug.
Assert
(currentNode != null);
48
Debug.
Assert
(!currentNode.NamespaceURI.Equals(XmlReservedNs.NsXmlNs));
System\Xml\XPath\Internal\Axis.cs (2)
39
Debug.
Assert
(prefix != null);
40
Debug.
Assert
(name != null);
System\Xml\XPath\Internal\BaseAxisQuery.cs (4)
34
Debug.
Assert
(qyInput != null);
64
Debug.
Assert
(context != null);
89
Debug.
Assert
(_nsUri != null);
120
Debug.
Assert
(this is AttributeQuery || this is ChildrenQuery);
System\Xml\XPath\Internal\BooleanExpr.cs (2)
19
Debug.
Assert
(op == Operator.Op.AND || op == Operator.Op.OR);
20
Debug.
Assert
(opnd1 != null && opnd2 != null);
System\Xml\XPath\Internal\BooleanFunctions.cs (1)
79
Debug.
Assert
(nodeIterator.Current != null);
System\Xml\XPath\Internal\CacheAxisQuery.cs (2)
40
Debug.
Assert
(0 <= count && count <= outputBuffer.Count);
52
Debug.
Assert
(0 <= count && count <= outputBuffer.Count);
System\Xml\XPath\Internal\CacheOutputQuery.cs (2)
51
Debug.
Assert
(0 <= count && count <= outputBuffer.Count);
63
Debug.
Assert
(0 <= count && count <= outputBuffer.Count);
System\Xml\XPath\Internal\CompiledXPathExpr.cs (1)
124
Debug.
Assert
(prefix != null);
System\Xml\XPath\Internal\DescendantoverDescendantQuery.cs (3)
63
Debug.
Assert
(currentNode != null);
75
Debug.
Assert
(currentNode != null);
86
Debug.
Assert
(currentNode != null);
System\Xml\XPath\Internal\ForwardPositionQuery.cs (1)
13
Debug.
Assert
(input != null);
System\Xml\XPath\Internal\FunctionQuery.cs (3)
77
Debug.
Assert
(nodeIterator.Current != null);
83
Debug.
Assert
(_function != null);
87
Debug.
Assert
(retVal != null);
System\Xml\XPath\Internal\IdQuery.cs (1)
18
Debug.
Assert
(context.Current != null);
System\Xml\XPath\Internal\IteratorFilter.cs (1)
36
Debug.
Assert
(_innerIterator.Current != null);
System\Xml\XPath\Internal\LogicalExpr.cs (4)
19
Debug.
Assert
(
70
Debug.
Assert
(cmp != null);
97
Debug.
Assert
(op == Operator.Op.EQ || op == Operator.Op.NE);
130
Debug.
Assert
(
System\Xml\XPath\Internal\MergeFilterQuery.cs (1)
62
Debug.
Assert
(current != null);
System\Xml\XPath\Internal\NamespaceQuery.cs (1)
58
Debug.
Assert
(e.NodeType == XPathNodeType.Namespace);
System\Xml\XPath\Internal\NumberFunctions.cs (5)
58
Debug.
Assert
(nodeIterator!.Current != null);
86
Debug.
Assert
(_arg != null);
98
Debug.
Assert
(_arg != null);
104
Debug.
Assert
(_arg != null);
110
Debug.
Assert
(_arg != null);
System\Xml\XPath\Internal\NumericExpr.cs (3)
19
Debug.
Assert
(
24
Debug.
Assert
(opnd1 != null && opnd2 != null);
59
Debug.
Assert
(op == Operator.Op.PLUS || op == Operator.Op.MINUS || op == Operator.Op.MOD || op == Operator.Op.DIV || op == Operator.Op.MUL);
System\Xml\XPath\Internal\Operator.cs (1)
49
Debug.
Assert
(Op.EQ <= op && op <= Op.GE);
System\Xml\XPath\Internal\Query.cs (1)
147
Debug.
Assert
(0 <= l && l < r);
System\Xml\XPath\Internal\QueryBuilder.cs (2)
420
Debug.
Assert
(root.Prefix != null);
421
Debug.
Assert
(root.Name != null);
System\Xml\XPath\Internal\SortQuery.cs (6)
82
Debug.
Assert
(0 <= count && count <= _results.Count);
94
Debug.
Assert
(0 <= count && count <= _results.Count);
159
Debug.
Assert
(_expressions.Length == _comparers.Length);
160
Debug.
Assert
(0 < _expressions.Length);
161
Debug.
Assert
(0 <= _numSorts && _numSorts <= _expressions.Length);
175
Debug.
Assert
(_numSorts < _expressions.Length);
System\Xml\XPath\Internal\StringFunctions.cs (10)
91
Debug.
Assert
(GetXPathType(argVal) == XPathResultType.Number);
95
Debug.
Assert
(nodeIterator.Current != null);
131
Debug.
Assert
(_argList.Count > 1);
139
Debug.
Assert
(_argList.Count > 1);
147
Debug.
Assert
(_argList.Count > 1);
157
Debug.
Assert
(_argList.Count > 1);
167
Debug.
Assert
(_argList.Count > 0);
212
Debug.
Assert
(nodeIterator!.Current != null);
225
Debug.
Assert
(nodeIterator!.Current != null);
257
Debug.
Assert
(_argList.Count > 2);
System\Xml\XPath\Internal\VariableQuery.cs (2)
48
Debug.
Assert
(_variable != null);
52
Debug.
Assert
(retVal != null);
System\Xml\XPath\Internal\XPathArrayIterator.cs (3)
35
Debug.
Assert
(nodeIterator.Current != null);
54
Debug.
Assert
(index <= list.Count);
69
Debug.
Assert
(index <= list.Count);
System\Xml\XPath\Internal\XPathMultyIterator.cs (3)
26
Debug.
Assert
(iterator != null);
69
Debug.
Assert
(firstNotEmpty <= item && item < arr.Length);
74
Debug.
Assert
(it.Current != null && itNext.Current != null);
System\Xml\XPath\Internal\XPathParser.cs (4)
415
Debug.
Assert
(nodeType != XPathNodeType.Root);
464
Debug.
Assert
(IsPrimaryExpr);
655
Debug.
Assert
(_scanner.CanBeFunction);
867
Debug.
Assert
(_scanner.Kind == XPathScanner.LexKind.Axe);
System\Xml\XPath\Internal\XPathScanner.cs (19)
43
Debug.
Assert
(0 <= _xpathExprIndex && _xpathExprIndex <= _xpathExpr.Length);
64
Debug.
Assert
(_kind == LexKind.Name || _kind == LexKind.Axe);
65
Debug.
Assert
(_name != null);
74
Debug.
Assert
(_kind == LexKind.Name);
75
Debug.
Assert
(_prefix != null);
84
Debug.
Assert
(_kind == LexKind.String);
85
Debug.
Assert
(_stringValue != null);
94
Debug.
Assert
(_kind == LexKind.Number);
95
Debug.
Assert
(!double.IsNaN(_numberValue));
106
Debug.
Assert
(_kind == LexKind.Name);
122
Debug.
Assert
(XmlCharType.IsWhiteSpace(CurrentChar));
277
Debug.
Assert
(CurrentChar == '.' || char.IsAsciiDigit(CurrentChar));
297
Debug.
Assert
(char.IsAsciiDigit(CurrentChar));
299
Debug.
Assert
(0 <= start && _xpathExpr[start] == '.');
322
Debug.
Assert
(CurrentChar == endChar);
331
Debug.
Assert
(!span.IsEmpty);
332
Debug.
Assert
(span[0] == CurrentChar);
333
Debug.
Assert
(XmlCharType.IsStartNCNameSingleChar(span[0]));
334
Debug.
Assert
(XmlCharType.IsNCNameSingleChar(span[0]));
System\Xml\XPath\Internal\XPathSingletonIterator.cs (1)
16
Debug.
Assert
(nav != null);
System\Xml\XPath\XPathDocument.cs (4)
210
Debug.
Assert
(reader.LocalName == "xmlns");
215
Debug.
Assert
(reader.Prefix == "xmlns");
385
Debug.
Assert
(pageElem[idxElem].NodeType == XPathNodeType.Element && pageNmsp[idxNmsp].NodeType == XPathNodeType.Namespace);
398
Debug.
Assert
(pageElem[idxElem].NodeType == XPathNodeType.Element);
System\Xml\XPath\XPathNavigator.cs (8)
1091
Debug.
Assert
(args != null);
1191
Debug.
Assert
(context.Current != null);
1821
Debug.
Assert
(!n1.IsSamePosition(n2));
1823
Debug.
Assert
(p1.MoveToParent() && p2.MoveToParent() && p1.IsSamePosition(p2));
2055
Debug.
Assert
(reader.LocalName == "xmlns");
2060
Debug.
Assert
(reader.Prefix == "xmlns");
2116
Debug.
Assert
(reader.LocalName == "xmlns");
2121
Debug.
Assert
(reader.Prefix == "xmlns");
System\Xml\XPath\XPathNavigatorReader.cs (2)
515
Debug.
Assert
(value == null);
641
Debug.
Assert
(XPathNodeType.Namespace == _nav.NodeType);
System\Xml\XPath\XPathNodeIterator.cs (1)
66
Debug.
Assert
(_current.Current != null);
System\Xml\Xsl\IlGen\GenerateHelper.cs (8)
1098
Debug.
Assert
(nameType == GenerateNameType.TagNameAndNamespace);
1134
Debug.
Assert
(_locXOut != null);
1468
Debug.
Assert
(_isDebug && _lastSourceInfo != null);
1469
Debug.
Assert
(sourceInfo != null);
1501
Debug.
Assert
(_module.EmitSymbols);
1613
Debug.
Assert
(opcode.OperandType == OperandType.InlineI || opcode.OperandType == OperandType.InlineVar);
1623
Debug.
Assert
(opcode.OperandType == OperandType.InlineI8);
1734
Debug.
Assert
(opcode.Equals(OpCodes.Brtrue) || opcode.Equals(OpCodes.Brtrue_S) ||
System\Xml\Xsl\IlGen\IteratorDescriptor.cs (3)
334
Debug.
Assert
(_hasNext);
403
Debug.
Assert
(_storage.IsCached);
476
Debug.
Assert
(brctxt != BranchingContext.None);
System\Xml\Xsl\IlGen\OptimizerPatterns.cs (3)
245
Debug.
Assert
(Enum.IsDefined(pattern));
246
Debug.
Assert
((int)pattern < 32);
256
Debug.
Assert
(Enum.IsDefined(pattern));
System\Xml\Xsl\IlGen\StaticDataManager.cs (2)
119
Debug.
Assert
(ndNmspDecl != null);
120
Debug.
Assert
(ndNmspDecl.Left is QilLiteral && ndNmspDecl.Right is QilLiteral);
System\Xml\Xsl\IlGen\XmlILConstructAnalyzer.cs (14)
196
Debug.
Assert
(value);
220
Debug.
Assert
(value);
244
Debug.
Assert
(value);
442
Debug.
Assert
(ndContent != null);
491
case QilNodeType.NamespaceDecl: Debug.
Assert
(ndContent == null); break;
492
case QilNodeType.TextCtor: Debug.
Assert
(ndContent == null); break;
493
case QilNodeType.RawTextCtor: Debug.
Assert
(ndContent == null); break;
497
case QilNodeType.XsltCopyOf: Debug.
Assert
(ndContent == null); break;
715
Debug.
Assert
(!typ.IsSingleton);
751
Debug.
Assert
(!typ.IsSingleton);
801
Debug.
Assert
(ndElem!.NodeType == QilNodeType.ElementCtor);
839
Debug.
Assert
(binaryNode != null);
858
Debug.
Assert
(ndName != null);
1059
Debug.
Assert
(nd.NodeType == QilNodeType.NamespaceDecl);
System\Xml\Xsl\IlGen\XmlILModule.cs (1)
79
Debug.
Assert
(!(useLRE && emitSymbols));
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (1)
5489
Debug.
Assert
(left.NodeType == right.NodeType);
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (43)
93
Debug.
Assert
(iter.NodeType == QilNodeType.Let || iter.NodeType == QilNodeType.Parameter);
223
Debug.
Assert
(iter.NodeType == QilNodeType.Parameter);
758
Debug.
Assert
(_iterCurr.CurrentBranchingContext == BranchingContext.None);
843
Debug.
Assert
(_iterCurr.CurrentBranchingContext == BranchingContext.None);
909
Debug.
Assert
(info.ConstructMethod == XmlILConstructMethod.Iterator);
912
Debug.
Assert
(ndCond.Left.XmlType!.TypeCode == XmlTypeCode.Boolean);
949
Debug.
Assert
(!ndCond.Center.XmlType!.IsSingleton || !ndCond.Right.XmlType!.IsSingleton);
986
Debug.
Assert
(itemStorageType == typeof(bool));
1012
Debug.
Assert
(XmlILConstructInfo.Read(ndChoice).PushToWriterFirst);
1630
Debug.
Assert
(ndParsedTagName.Right.XmlType.IsSingleton);
2110
Debug.
Assert
(ndIter != null);
2123
Debug.
Assert
(ndIter.NodeType == QilNodeType.Let || ndIter.NodeType == QilNodeType.Parameter);
2124
Debug.
Assert
(!patt.MatchesPattern(OptimizerPatternName.IsPositional));
2141
Debug.
Assert
(ndFor.XmlType!.IsSingleton);
2203
Debug.
Assert
(!ndLet.XmlType!.IsSingleton);
2234
Debug.
Assert
(ndIter != null);
2248
Debug.
Assert
(ndIter.NodeType == QilNodeType.For);
2251
Debug.
Assert
(locPos != null);
2265
Debug.
Assert
(ndSort.Variable.NodeType == QilNodeType.For);
2286
Debug.
Assert
(!_iterNested!.Storage.IsCached);
2552
Debug.
Assert
(!XmlILConstructInfo.Read(ndInvoke).PushToWriterFirst || useWriter);
3375
Debug.
Assert
(_iterCurr.CurrentBranchingContext == BranchingContext.None);
3562
Debug.
Assert
(XmlILConstructInfo.Read(ndInvoke).ConstructMethod != XmlILConstructMethod.Writer);
3745
Debug.
Assert
(XmlILConstructInfo.Read(ndCopy).PushToWriterFirst);
3751
Debug.
Assert
(ndCopy.Left.XmlType!.IsNode);
3763
Debug.
Assert
(ndCopy.Left.XmlType.IsNode);
3988
Debug.
Assert
(ndDod.NodeType == QilNodeType.DocOrderDistinct && ndLoop != null);
4124
Debug.
Assert
(ValidateNames.ValidateName(prefix, localName, ns, nodeType, ValidateNames.Flags.AllExceptPrefixMapping));
4201
Debug.
Assert
(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne);
4240
Debug.
Assert
(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne);
4267
Debug.
Assert
(ndSecond.NodeType == QilNodeType.NameOf);
4345
Debug.
Assert
(_iterCurr.CurrentBranchingContext == BranchingContext.None);
4378
Debug.
Assert
(relOp == QilNodeType.Eq || relOp == QilNodeType.Ne);
4398
Debug.
Assert
(_iterCurr.CurrentBranchingContext == BranchingContext.None);
4583
Debug.
Assert
(xmlTypes == XmlNodeKindFlags.PI);
4616
Debug.
Assert
(xmlTypes == XmlNodeKindFlags.Element);
4623
Debug.
Assert
(!isXmlTypeUnion || (xmlTypes & XmlNodeKindFlags.Content) == XmlNodeKindFlags.Content);
4772
Debug.
Assert
(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4786
Debug.
Assert
(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4805
Debug.
Assert
(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4815
Debug.
Assert
(!XmlILConstructInfo.Read(nd).PushToWriterLast);
4825
Debug.
Assert
(nd.XmlType!.IsSingleton && !XmlILConstructInfo.Read(nd).PushToWriterLast);
4839
Debug.
Assert
(!XmlILConstructInfo.Read(nd).PushToWriterLast);
System\Xml\Xsl\QIL\QilPatternFactory.cs (5)
26
Debug.
Assert
(f != null);
595
Debug.
Assert
(args.NodeType == QilNodeType.FormalParameterList);
600
Debug.
Assert
(args.NodeType == QilNodeType.FormalParameterList);
606
Debug.
Assert
(args.NodeType == QilNodeType.ActualParameterList);
607
Debug.
Assert
(func.Arguments.Count == args.Count);
System\Xml\Xsl\QIL\QilValidationVisitor.cs (1)
36
Debug.
Assert
(node != null);
System\Xml\Xsl\QIL\SubstitutionList.cs (1)
51
Debug.
Assert
(_s.Count % 2 == 0);
System\Xml\Xsl\QueryReaderSettings.cs (1)
26
Debug.
Assert
(xmlNameTable != null);
System\Xml\Xsl\Runtime\ContentIterators.cs (2)
116
Debug.
Assert
(nodeType != XPathNodeType.Attribute && nodeType != XPathNodeType.Namespace);
440
Debug.
Assert
(_state == IteratorState.HaveCurrentHaveNext);
System\Xml\Xsl\Runtime\DecimalFormatter.cs (3)
43
Debug.
Assert
(formatPicture != null && decimalFormat != null);
266
Debug.
Assert
(i + 1 < result.Length);
268
Debug.
Assert
(char.IsAsciiDigit(ch) || ch == EscChar);
System\Xml\Xsl\Runtime\DocumentOrderComparer.cs (1)
40
Debug.
Assert
(GetDocumentIndex(navThis) != GetDocumentIndex(navThat!));
System\Xml\Xsl\Runtime\EarlyBoundInfo.cs (1)
22
Debug.
Assert
(namespaceUri != null && ebType != null);
System\Xml\Xsl\Runtime\NumberFormatter.cs (3)
81
Debug.
Assert
(1 <= val && val <= MaxAlphabeticValue);
82
Debug.
Assert
(Math.Pow(totalChars, MaxAlphabeticLength) >= MaxAlphabeticValue);
104
Debug.
Assert
(1 <= val && val <= MaxRomanValue);
System\Xml\Xsl\Runtime\StringConcat.cs (1)
55
Debug.
Assert
(value != null);
System\Xml\Xsl\Runtime\TreeIterators.cs (3)
498
Debug.
Assert
(_state == IteratorState.HaveCurrentHaveNext || _state == IteratorState.HaveCurrentNoNext);
523
Debug.
Assert
(_state == IteratorState.HaveCurrentHaveNext || _state == IteratorState.HaveCurrentNoNext);
834
Debug.
Assert
(_state == IteratorState.HaveCurrentHaveNext || _state == IteratorState.HaveCurrentNoNext);
System\Xml\Xsl\Runtime\WhitespaceRuleLookup.cs (7)
39
Debug.
Assert
(rules != null);
89
Debug.
Assert
(_nameTable != null && _ruleTemp != null);
90
Debug.
Assert
(localName != null && (object?)_nameTable.Get(localName) == (object)localName);
91
Debug.
Assert
(namespaceName != null && (object?)_nameTable.Get(namespaceName) == (object)namespaceName);
173
Debug.
Assert
(obj is InternalWhitespaceRule);
176
Debug.
Assert
(LocalName != null && that!.LocalName != null);
177
Debug.
Assert
(NamespaceName != null && that.NamespaceName != null);
System\Xml\Xsl\Runtime\WhitespaceRuleReader.cs (1)
49
Debug.
Assert
(wsRules != null);
System\Xml\Xsl\Runtime\XmlAttributeCache.cs (6)
87
Debug.
Assert
(!string.IsNullOrEmpty(localName) && prefix != null && ns != null);
96
Debug.
Assert
(_numEntries != 0);
144
Debug.
Assert
(text != null);
145
Debug.
Assert
(_arrAttrs != null && _numEntries != 0);
157
Debug.
Assert
(_arrAttrs != null && _numEntries != 0);
361
Debug.
Assert
(_numEntries == _arrAttrs.Length);
System\Xml\Xsl\Runtime\XmlCollation.cs (1)
104
Debug.
Assert
(((int)value & Mask) == 0);
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (2)
221
Debug.
Assert
(methMatch.ContainsGenericParameters == false);
308
Debug.
Assert
(that != null);
System\Xml\Xsl\Runtime\XmlNavigatorFilter.cs (2)
159
Debug.
Assert
(s_typeFilters[(int)nodeType] != null);
168
Debug.
Assert
(nodeType != XPathNodeType.Attribute && nodeType != XPathNodeType.Namespace);
System\Xml\Xsl\Runtime\XmlNavigatorStack.cs (2)
53
Debug.
Assert
(!IsEmpty);
62
Debug.
Assert
(!IsEmpty);
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (13)
231
Debug.
Assert
(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Attribute, ValidateNames.Flags.All));
538
Debug.
Assert
(prefix != null && ns != null);
542
Debug.
Assert
(prefix.Length == 0 || ns.Length != 0);
699
Debug.
Assert
(prefix != null && ns != null);
1037
Debug.
Assert
(navigator != null);
1205
Debug.
Assert
(navigator.NodeType == XPathNodeType.Element);
1257
Debug.
Assert
(rootType == XPathNodeType.Element || rootType == XPathNodeType.Comment || rootType == XPathNodeType.ProcessingInstruction);
1288
Debug.
Assert
(rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace);
1319
Debug.
Assert
(_nsmgr != null);
1351
Debug.
Assert
(prefix.Length != 0 && ns.Length != 0);
1399
Debug.
Assert
(prefix != null && !string.IsNullOrEmpty(ns));
1505
Debug.
Assert
(ValidateNames.ParseNCName(name.Name, 0) == name.Name.Length);
1554
Debug.
Assert
(_stkNames != null);
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (9)
72
Debug.
Assert
(data != null);
332
Debug.
Assert
(_atomizedNames != null);
341
Debug.
Assert
(_filters != null);
395
Debug.
Assert
(_prefixMappingsList != null);
462
Debug.
Assert
(_types != null);
829
Debug.
Assert
(_collations != null);
890
Debug.
Assert
(context != null);
927
Debug.
Assert
(context != null);
1078
Debug.
Assert
(node.NodeType == XPathNodeType.Namespace);
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (1)
582
Debug.
Assert
(cmp == XmlNodeOrder.Before || cmp == XmlNodeOrder.Unknown);
System\Xml\Xsl\Runtime\XmlQueryStaticData.cs (1)
41
Debug.
Assert
(defaultWriterSettings != null && staticData != null);
System\Xml\Xsl\Runtime\XmlSortKey.cs (6)
70
Debug.
Assert
(_nextKey != null && that._nextKey != null);
74
Debug.
Assert
(_priority != that._priority);
85
Debug.
Assert
(that != null && !(this is XmlEmptySortKey));
125
Debug.
Assert
(obj is XmlSortKey);
342
Debug.
Assert
(_dblVal == double.NegativeInfinity || _dblVal == double.PositiveInfinity);
348
Debug.
Assert
(that._dblVal == double.NegativeInfinity || that._dblVal == double.PositiveInfinity);
System\Xml\Xsl\Runtime\XslNumber.cs (5)
33
Debug.
Assert
(startIdx >= 0 && tokLen > 0);
50
Debug.
Assert
(startIdx >= 0 && tokLen > 0);
128
Debug.
Assert
(groupingSeparator.Length <= 1);
274
Debug.
Assert
(1 <= dblVal && dblVal < double.PositiveInfinity);
319
Debug.
Assert
(groupSeparator.Length == 1);
System\Xml\Xsl\Runtime\XsltFunctions.cs (6)
69
Debug.
Assert
(value.Length < startIndex || double.IsNaN(startIndex));
91
Debug.
Assert
(0 <= startIndex && startIndex <= endIndex && endIndex <= value.Length);
96
Debug.
Assert
(endIndex <= startIndex || double.IsNaN(endIndex));
283
Debug.
Assert
(item is XPathNavigator);
345
Debug.
Assert
(stringValue != null);
531
Debug.
Assert
(lang != null);
System\Xml\Xsl\Runtime\XsltLibrary.cs (7)
384
Debug.
Assert
(op == ComparisonOperator.Eq || op == ComparisonOperator.Ne);
391
Debug.
Assert
(compType == TypeCode.Boolean);
399
Debug.
Assert
(compType == TypeCode.Boolean || compType == TypeCode.Double || compType == TypeCode.String);
439
Debug.
Assert
(op == ComparisonOperator.Eq || op == ComparisonOperator.Ne);
487
Debug.
Assert
(ComparisonOperator.Lt <= op && op <= ComparisonOperator.Ge);
526
Debug.
Assert
(XPathNodeType.SignificantWhitespace == XPathNodeType.Text + 1);
527
Debug.
Assert
(XPathNodeType.Whitespace == XPathNodeType.Text + 2);
System\Xml\Xsl\SourceLineInfo.cs (3)
70
Debug.
Assert
(lineInfo.Start.Line == lineInfo.End.Line);
71
Debug.
Assert
(lineInfo.Start.Pos == 0 && lineInfo.End.Pos == 0);
84
Debug.
Assert
(uriString != null);
System\Xml\Xsl\XmlILCommand.cs (2)
29
Debug.
Assert
(delExec != null && staticData != null);
83
Debug.
Assert
(results != null);
System\Xml\Xsl\XmlIlGenerator.cs (2)
136
Debug.
Assert
(_qil.Root != null);
210
Debug.
Assert
(ndParam.NodeType == QilNodeType.Parameter);
System\Xml\Xsl\XmlQueryCardinality.cs (1)
24
Debug.
Assert
(0x00 <= value && value <= 0x07);
System\Xml\Xsl\XmlQueryType.cs (1)
509
Debug.
Assert
(IsAtomicValue && baseType.IsAtomicValue);
System\Xml\Xsl\XmlQueryTypeFactory.cs (3)
63
Debug.
Assert
(schemaType.DerivedBy == XmlSchemaDerivationMethod.Union);
470
Debug.
Assert
(!isNillable);
513
Debug.
Assert
(!IsAtomicValue || schemaType.Datatype!.Variety == XmlSchemaDatatypeVariety.Atomic);
System\Xml\Xsl\XPath\XPathBuilder.cs (17)
115
Debug.
Assert
(op != XPathOperator.Unknown);
118
Debug.
Assert
((opGroup != XPathOperatorGroup.Negate && right != null) || (opGroup == XPathOperatorGroup.Negate && right == null));
136
Debug.
Assert
(op == XPathOperator.Or || op == XPathOperator.And);
147
Debug.
Assert
(compType == XmlTypeCode.Boolean || compType == XmlTypeCode.Double || compType == XmlTypeCode.String);
169
Debug.
Assert
(val.XmlType!.IsSingleton);
214
Debug.
Assert
(op == XPathOperator.Eq || op == XPathOperator.Ne);
247
Debug.
Assert
(op == XPathOperator.Lt || op == XPathOperator.Le || op == XPathOperator.Gt || op == XPathOperator.Ge);
278
Debug.
Assert
(op == XPathOperator.UnaryMinus);
301
Debug.
Assert
(op == XPathOperator.Union);
853
Debug.
Assert
(current != null);
866
Debug.
Assert
(environment != null);
890
Debug.
Assert
(unknown.NodeType == QilNodeType.Unknown);
933
Debug.
Assert
(_last != null);
938
Debug.
Assert
(unknown != null);
988
Debug.
Assert
(maxArgs == 0 || maxArgs == Infinity || argTypes != null && argTypes.Length == maxArgs);
1024
Debug.
Assert
(numArgs > maxArgs);
1046
Debug.
Assert
(args.Count == 0 || argTypes != null);
System\Xml\Xsl\XPath\XPathParser.cs (4)
26
Debug.
Assert
(_scanner == null && _builder == null);
27
Debug.
Assert
(scanner != null && builder != null);
262
Debug.
Assert
(scanner.Name == "processing-instruction");
509
Debug.
Assert
(IsPrimaryExpr());
System\Xml\Xsl\XPath\XPathQilFactory.cs (2)
133
Debug.
Assert
(op == QilNodeType.Eq || op == QilNodeType.Ne);
149
Debug.
Assert
(op == QilNodeType.Lt || op == QilNodeType.Le || op == QilNodeType.Gt || op == QilNodeType.Ge);
System\Xml\Xsl\XPath\XPathScanner.cs (20)
78
Debug.
Assert
(xpathExpr != null);
93
Debug.
Assert
(0 <= index && index <= _xpathExpr.Length);
100
Debug.
Assert
(-1 <= _curIndex && _curIndex < _xpathExpr.Length);
108
Debug.
Assert
(_curIndex == _xpathExpr.Length);
117
Debug.
Assert
(_kind == LexKind.Name);
118
Debug.
Assert
(_name != null);
127
Debug.
Assert
(_kind == LexKind.Name);
128
Debug.
Assert
(_prefix != null);
152
Debug.
Assert
(_kind == LexKind.String);
153
Debug.
Assert
(_stringValue != null);
167
Debug.
Assert
(_kind == LexKind.Name);
176
Debug.
Assert
(_kind == LexKind.Axis);
177
Debug.
Assert
(_axis != XPathAxis.Unknown);
424
Debug.
Assert
(_prefix != null);
425
Debug.
Assert
(_name != null);
485
Debug.
Assert
(IsAsciiDigit(_curChar) || _curChar == '.');
530
Debug.
Assert
(XmlCharType.IsStartNCNameSingleChar(_curChar));
554
Debug.
Assert
(LexKind.FirstStringable <= t);
571
Debug.
Assert
(LexKind.FirstStringable <= t);
575
Debug.
Assert
("()[].@,*/$}".Contains((char)t));
System\Xml\Xsl\XPathConvert.cs (116)
163
Debug.
Assert
(0 != (u & 0x80000000));
224
Debug.
Assert
(dec.MantissaSize > 0);
235
Debug.
Assert
(dec[ib] > 0 && dec[ib] <= 9);
246
Debug.
Assert
(dec[ib] >= 0 && dec[ib] <= 9);
279
Debug.
Assert
(exponent > 0 && exponent < 512);
296
Debug.
Assert
(digit <= 9);
297
Debug.
Assert
(0 != (_u2 & 0x80000000));
301
Debug.
Assert
(_exp >= 4);
351
Debug.
Assert
(1 == rgu[4]);
378
Debug.
Assert
(this.IsZero);
444
Debug.
Assert
(0 != (_u2 & 0x80000000));
445
Debug.
Assert
(0 != (numOp._u2 & 0x80000000));
459
Debug.
Assert
(uHi < 0xFFFFFFFF);
464
Debug.
Assert
(uHi < 0xFFFFFFFF);
472
Debug.
Assert
(uHi < 0xFFFFFFFF);
480
Debug.
Assert
(uHi < 0xFFFFFFFF);
488
Debug.
Assert
(uHi < 0xFFFFFFFF);
494
Debug.
Assert
(0 != uT);
496
Debug.
Assert
(uHi < 0xFFFFFFFF);
504
Debug.
Assert
(uHi < 0xFFFFFFFF);
512
Debug.
Assert
(uHi < 0xFFFFFFFF);
521
Debug.
Assert
(_error <= 2 || numOp._error <= 2);
545
Debug.
Assert
(0 != (rgu5 & 0x40000000));
568
Debug.
Assert
(0 == rgu3);
569
Debug.
Assert
(0 == rgu4);
570
Debug.
Assert
(0 == rgu5);
596
Debug.
Assert
(0 != (bn._u2 & 0x80000000));
618
Debug.
Assert
(wT >= 12 && wT < 32);
635
Debug.
Assert
(wT > 0 && wT < 32);
673
Debug.
Assert
(_exp <= 32);
683
Debug.
Assert
(_error < 0xFFFFFFFF);
688
Debug.
Assert
(0 == _u2 && 0 == _u1);
699
Debug.
Assert
(_error < 0xFFFFFFFF);
735
Debug.
Assert
(!IsSpecial(dbl));
736
Debug.
Assert
(0 < dbl);
813
Debug.
Assert
(iT >= 0 && iT < 16);
817
Debug.
Assert
(numHH._exp + tenPower._exp > 1);
826
Debug.
Assert
(iT > 0 && iT <= 32);
828
Debug.
Assert
(numHH._exp + tenPower._exp > 1);
837
Debug.
Assert
(iT >= 0 && iT < 16);
841
Debug.
Assert
(numHH._exp + tenPower._exp <= 32);
850
Debug.
Assert
(iT > 0 && iT <= 32);
852
Debug.
Assert
(numHH._exp + tenPower._exp <= 32);
859
Debug.
Assert
(numHH._exp > 0 && numHH._exp < 32);
872
Debug.
Assert
(uLL <= uLH && uLH <= uHL && uHL <= uHH);
900
Debug.
Assert
(uHH >= uScale && uHH / uScale < 10);
904
Debug.
Assert
(uLL <= uHH);
915
Debug.
Assert
(0 != uHH || !numHH.IsZero);
948
Debug.
Assert
(0 <= bLL && bLL < bHH && bHH <= 9);
992
Debug.
Assert
(dblInt == Math.Floor(dblInt) && 1 <= dblInt && dblInt <= 9007199254740991.0d);
1011
Debug.
Assert
(iT >= 0 && iT <= 15);
1012
Debug.
Assert
(dblInt >= C10toN[iT] && dblInt < C10toN[iT + 1]);
1017
Debug.
Assert
(iT >= 0);
1020
Debug.
Assert
(dblInt == Math.Floor(dblInt) && 0 <= dblInt && dblInt < C10toN[iT]);
1035
Debug.
Assert
(exponent == exponentPrec && mantissaSize == mantissaSizePrec);
1083
Debug.
Assert
(!IsSpecial(dbl));
1084
Debug.
Assert
(0 < dbl);
1098
Debug.
Assert
(0 == (dblHi & 0x7FF00000));
1108
Debug.
Assert
(0 != (DblHi(dblT) & 0x7FF00000));
1150
Debug.
Assert
(1 <= dblT && dblT < 2);
1196
Debug.
Assert
(0 == c5Den);
1217
Debug.
Assert
(cu <= 2);
1234
Debug.
Assert
(c2Num > 0 && c2Den > 0);
1241
Debug.
Assert
(0 == (biDen[biDen.Length - 1] & 0xF0000000));
1242
Debug.
Assert
(0 != (biDen[biDen.Length - 1] & 0x08000000));
1714
Debug.
Assert
(0 <= idx && idx < _length);
1722
Debug.
Assert
(_capacity >= InitCapacity);
1723
Debug.
Assert
(_length >= 0 && _length <= _capacity);
1730
Debug.
Assert
(0 == _length || 0 != _digits[_length - 1]);
1759
Debug.
Assert
(cu >= 0);
1779
Debug.
Assert
(2 <= _capacity);
1796
Debug.
Assert
((object)this != (object)biSrc);
1810
Debug.
Assert
(dec.MantissaSize >= 0);
1823
Debug.
Assert
(dec[ib] >= 0 && dec[ib] <= 9);
1833
Debug.
Assert
(1 < uMul);
1843
Debug.
Assert
(0 != uMul);
1867
Debug.
Assert
(c5 >= 0);
1899
Debug.
Assert
(cbit >= 0);
1966
Debug.
Assert
(cu >= 0);
1987
Debug.
Assert
(cbit >= 0);
2023
Debug.
Assert
(obj != null);
2050
Debug.
Assert
(idx >= 0 && idx < _length);
2051
Debug.
Assert
(_digits[idx] != bi._digits[idx]);
2060
Debug.
Assert
((object)this != (object)bi);
2114
Debug.
Assert
((object)this != (object)bi);
2127
Debug.
Assert
(0 == wCarry || 1 == wCarry);
2174
Debug.
Assert
((object)this != (object)bi);
2182
Debug.
Assert
(_length <= cu);
2190
Debug.
Assert
(uQuo >= 0 && uQuo <= 9);
2205
Debug.
Assert
(0 == wCarry || 1 == wCarry);
2217
Debug.
Assert
(1 == wCarry);
2218
Debug.
Assert
(idx == cu);
2241
Debug.
Assert
(CompareTo(bi) < 0);
2342
Debug.
Assert
(value <= MaxDigits);
2351
Debug.
Assert
(0 <= ib && ib < _mantissaSize);
2370
Debug.
Assert
(dbl == (double)this);
2375
Debug.
Assert
(!this.Equals(decAfter));
2380
Debug.
Assert
(!this.Equals(decBefore));
2472
Debug.
Assert
(0 != mantissaSize && 0 != dec[0] && 0 != dec[mantissaSize - 1]);
2485
Debug.
Assert
(dec[ib] >= 0 && dec[ib] <= 9);
2496
Debug.
Assert
(dec[ib] >= 0 && dec[ib] <= 9);
2561
Debug.
Assert
(dbl == dblLo);
2579
Debug.
Assert
(dbl == (double)num);
2581
Debug.
Assert
(dbl == dblLo || double.IsNaN(dblLo));
2600
Debug.
Assert
(double.IsNaN(dblLowPrec) || dblLowPrec == dbl);
2719
Debug.
Assert
(c2Dbl < 32 || 0 != biDec[0]);
2737
Debug.
Assert
(0 == c2Dbl || 0 == c2Dec);
2738
Debug.
Assert
(0 == c5Dbl || 0 == c5Dec);
2874
Debug.
Assert
(double.IsInfinity(dbl));
2880
Debug.
Assert
(0 != dec.MantissaSize);
2921
Debug.
Assert
(dec[ib] >= 0 && dec[ib] <= 9);
2939
Debug.
Assert
(0 != cntDigits);
2940
Debug.
Assert
(sizeFract == cntDigits || sizeFract > cntDigits && pch[-1] == '0');
2950
Debug.
Assert
(sizeFract == cntDigits);
2954
Debug.
Assert
(dec[ib] >= 0 && dec[ib] <= 9);
2960
Debug.
Assert
(0 == sizeInt && 0 == cntDigits);
System\Xml\Xsl\XslException.cs (1)
164
Debug.
Assert
(lineInfo == null || lineInfo.Uri != null);
System\Xml\Xsl\Xslt\Compiler.cs (9)
75
Debug.
Assert
(stylesheet != null);
163
Debug.
Assert
(var.NodeType == XslNodeType.Variable || var.NodeType == XslNodeType.Param);
201
Debug.
Assert
(qname != null);
218
Debug.
Assert
(nameTest != null);
235
Debug.
Assert
(name != null);
279
Debug.
Assert
(value <= ErrorCount);
302
Debug.
Assert
((_savedErrorCount = -1) < 0);
305
Debug.
Assert
((_savedErrorCount = -1) < 0);
452
Debug.
Assert
(characters.Length == 8);
System\Xml\Xsl\Xslt\CompilerScopeManager.cs (6)
201
Debug.
Assert
(varName.LocalName != null && varName.NamespaceUri != null);
209
Debug.
Assert
(prefix != null);
249
Debug.
Assert
(nsUri != null);
257
Debug.
Assert
(recPrefix == null);
301
Debug.
Assert
(localName != null);
415
Debug.
Assert
(_scope._records[_currentRecord].IsNamespace);
System\Xml\Xsl\Xslt\Focus.cs (4)
47
Debug.
Assert
(focusType != SingletonFocusType.Iterator);
109
Debug.
Assert
(_current.Name!.NamespaceUri == XmlReservedNs.NsXslDebug && _current.Name.LocalName == "current");
114
Debug.
Assert
(_position.Name!.NamespaceUri == XmlReservedNs.NsXslDebug && _position.Name.LocalName == "position");
119
Debug.
Assert
(_last.Name!.NamespaceUri == XmlReservedNs.NsXslDebug && _last.Name.LocalName == "last");
System\Xml\Xsl\Xslt\InvokeGenerator.cs (2)
104
Debug.
Assert
(argName != null);
151
Debug.
Assert
(_invokeArgs[prevArg] is QilIterator);
System\Xml\Xsl\Xslt\KeyMatchBuilder.cs (4)
48
Debug.
Assert
(base.numFixupLast == 0);
49
Debug.
Assert
(base.numFixupPosition == 0);
77
Debug.
Assert
(node != null);
78
Debug.
Assert
(fixup != null);
System\Xml\Xsl\Xslt\MatcherBuilder.cs (6)
234
Debug.
Assert
(!double.IsNaN(x!._priority));
235
Debug.
Assert
(!double.IsNaN(y!._priority));
398
Debug.
Assert
(patternList.Count > 0);
423
Debug.
Assert
((int)(QilLiteral)matcher == NoMatch);
450
Debug.
Assert
(pattern.Priority > lastPriority);
522
Debug.
Assert
(priority == branches.Length - 1);
System\Xml\Xsl\Xslt\OutputScopeManager.cs (3)
60
Debug.
Assert
(prefix != null);
61
Debug.
Assert
(uri != null);
142
Debug.
Assert
(prefix != null);
System\Xml\Xsl\Xslt\QilGenerator.cs (36)
136
Debug.
Assert
(compiler != null);
227
Debug.
Assert
(IsDebug && _curLoop.IsFocusSet);
436
Debug.
Assert
(var.XmlType!.IsSubtypeOf(T.NamespaceS));
437
Debug.
Assert
(var.Binding is QilList);
446
Debug.
Assert
(nsList[i].NodeType == QilNodeType.NamespaceDecl);
447
Debug.
Assert
(varList[i].NodeType == QilNodeType.NamespaceDecl);
478
Debug.
Assert
(tmpl != null && tmpl.Function == null);
479
Debug.
Assert
(tmpl.NodeType == XslNodeType.AttributeSet || tmpl.NodeType == XslNodeType.Template);
508
Debug.
Assert
(tmpl.NodeType == XslNodeType.Template);
643
Debug.
Assert
(tmpl != null && tmpl.Function != null && tmpl.Function.Definition.NodeType == QilNodeType.Unknown);
700
Debug.
Assert
(instructions != null);
983
Debug.
Assert
(pos < source.Length);
1019
Debug.
Assert
(i == source.Length || source[i] == '{');
1073
Debug.
Assert
(avt != null);
1125
Debug.
Assert
(_curLoop.IsFocusSet);
1179
Debug.
Assert
(withParam.NodeType == XslNodeType.WithParam);
1215
Debug.
Assert
(node.NodeType == XslNodeType.ApplyImports);
1417
Debug.
Assert
(when.NodeType == XslNodeType.If || when.NodeType == XslNodeType.Otherwise);
1460
Debug.
Assert
(node.NodeType == XslNodeType.Variable);
1470
Debug.
Assert
(node.NodeType == XslNodeType.Variable || node.NodeType == XslNodeType.Param || node.NodeType == XslNodeType.WithParam);
1502
Debug.
Assert
(varValue.SourceLine == null);
1508
Debug.
Assert
(withParam.NodeType == XslNodeType.WithParam);
1718
Debug.
Assert
(result.XmlType == T.StringX);
1726
Debug.
Assert
(sort.NodeType == XslNodeType.Sort);
2119
Debug.
Assert
(num.Level == NumberLevel.Any);
2139
Debug.
Assert
(sheet.TemplateMatches.Count == 0);
2223
Debug.
Assert
(varPar.NodeType == XslNodeType.Variable || varPar.NodeType == XslNodeType.Param);
2259
Debug.
Assert
(varPar.NodeType == XslNodeType.Variable || varPar.NodeType == XslNodeType.Param);
2346
Debug.
Assert
(expr != null);
2375
Debug.
Assert
(pttrn != null);
2401
Debug.
Assert
(pttrn != null);
2515
Debug.
Assert
(
2800
Debug.
Assert
(n.SourceLine == null);
2824
Debug.
Assert
(nsVar.XmlType!.IsSubtypeOf(T.NamespaceS));
2869
Debug.
Assert
(let.NodeType == QilNodeType.Let);
2875
Debug.
Assert
(0 <= varScope && varScope <= _vars.Count);
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (6)
76
Debug.
Assert
(ns != null);
146
Debug.
Assert
(ns != null);
409
Debug.
Assert
(name.XmlType == T.StringX && key.XmlType == T.StringX);
439
Debug.
Assert
(defList != null && defList.Count > 0);
456
Debug.
Assert
(defList != null && defList.Count > 0);
667
Debug.
Assert
(propValue.ValueType == typeof(double));
System\Xml\Xsl\Xslt\QilStrConcatenator.cs (3)
28
Debug.
Assert
(!_inUse);
61
Debug.
Assert
(value.XmlType!.TypeCode == XmlTypeCode.String);
76
Debug.
Assert
(_inUse); // If we want allow multiple calls to ToQil() this logic should be changed
System\Xml\Xsl\Xslt\Stylesheet.cs (2)
86
Debug.
Assert
(var.NodeType == XslNodeType.Variable || var.NodeType == XslNodeType.Param);
104
Debug.
Assert
(template.ImportPrecedence == 0);
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (18)
28
Debug.
Assert
(environment != null);
53
Debug.
Assert
(filter.Variable.XmlType!.IsSubtypeOf(T.NodeNotRtf));
54
Debug.
Assert
(filter.Variable.Binding!.NodeType == QilNodeType.Unknown); // fixupNode
55
Debug.
Assert
(filter.Body.XmlType!.IsSubtypeOf(T.Boolean));
80
Debug.
Assert
(op == XPathOperator.Union);
81
Debug.
Assert
(left != null);
82
Debug.
Assert
(right != null);
122
Debug.
Assert
(
190
Debug.
Assert
(left != null);
191
Debug.
Assert
(right != null);
195
Debug.
Assert
(nop.Child == _fixupNode);
200
Debug.
Assert
(left.NodeType == QilNodeType.Filter);
209
Debug.
Assert
(nop.Child != null);
213
Debug.
Assert
(right.NodeType == QilNodeType.Filter);
215
Debug.
Assert
(lastParent != null);
291
Debug.
Assert
(prefix.Length == 0);
355
Debug.
Assert
(parent.NodeType == QilNodeType.Filter);
430
Debug.
Assert
(current != null);
System\Xml\Xsl\Xslt\XPathPatternParser.cs (7)
27
Debug.
Assert
(_scanner == null && _ptrnBuilder == null);
28
Debug.
Assert
(scanner != null && ptrnBuilder != null);
124
Debug.
Assert
(_scanner!.CanBeFunction);
125
Debug.
Assert
(_scanner.Prefix.Length == 0);
126
Debug.
Assert
(_scanner.Name == "id" || _scanner.Name == "key");
258
Debug.
Assert
(_scanner!.Kind == LexKind.LBracket);
261
Debug.
Assert
(_scanner.Kind == LexKind.RBracket);
System\Xml\Xsl\Xslt\XslAst.cs (5)
68
Debug.
Assert
(nsUri != null || Prefix == null);
119
Debug.
Assert
(node != null);
162
Debug.
Assert
(node != null && node.NodeType == XslNodeType.List);
250
Debug.
Assert
(list != null && list.Count > 0);
265
Debug.
Assert
(name != null);
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (8)
286
Debug.
Assert
(tmpl.Match != null);
408
Debug.
Assert
(target != null);
429
Debug.
Assert
(instr.NodeType == XslNodeType.WithParam);
1014
Debug.
Assert
(op != XPathOperator.Unknown);
1407
Debug.
Assert
(split > 0);
1436
Debug.
Assert
(scoperecord.IsNamespace || scoperecord.ncName == null);
1437
Debug.
Assert
(!Compiler.IsPhantomNamespace(scoperecord.nsUri!));
1478
Debug.
Assert
(parent.Content.Count == split + 1);
System\Xml\Xsl\Xslt\XsltInput.cs (21)
43
Debug.
Assert
(reader != null);
44
Debug.
Assert
(atoms != null);
201
Debug.
Assert
(
244
Debug.
Assert
(_reader.NodeType == XmlNodeType.EntityReference);
246
Debug.
Assert
(local[0] == '#' || local == "lt" || local == "gt" || local == "quot" || local == "apos");
258
Debug.
Assert
(_reader.NodeType == XmlNodeType.Text || _reader.NodeType == XmlNodeType.Whitespace || _reader.NodeType == XmlNodeType.SignificantWhitespace);
261
Debug.
Assert
(_reader.NodeType == XmlNodeType.EndEntity);
332
Debug.
Assert
(_reader.NodeType != XmlNodeType.EntityReference);
441
Debug.
Assert
(_nodeType == XmlNodeType.Text || _nodeType == XmlNodeType.Whitespace || _nodeType == XmlNodeType.SignificantWhitespace);
488
Debug.
Assert
(_reader.NodeType == XmlNodeType.Element);
650
Debug.
Assert
(IsKeyword(_atoms.Version));
714
Debug.
Assert
(NodeType == XmlNodeType.Element);
715
Debug.
Assert
(attributes.Length <= _xsltAttributeNumber.Length);
843
Debug.
Assert
(NodeType == XmlNodeType.Element);
921
Debug.
Assert
(NodeType == XmlNodeType.Element && IsXsltNamespace());
948
Debug.
Assert
(extensions ? IsKeyword(_atoms.ExtensionElementPrefixes) : IsKeyword(_atoms.ExcludeResultPrefixes));
1001
Debug.
Assert
(IsKeyword(_atoms.XPathDefaultNamespace));
1013
Debug.
Assert
(IsKeyword(_atoms.DefaultCollation));
1095
Debug.
Assert
(prefix != null);
1179
Debug.
Assert
(input.NodeType == XmlNodeType.EndElement);
1184
Debug.
Assert
(input.NodeType == XmlNodeType.Element || input.NodeType == XmlNodeType.Attribute);
System\Xml\Xsl\Xslt\XsltLoader.cs (29)
43
Debug.
Assert
(compiler != null);
102
Debug.
Assert
(compiler.Root != null);
298
Debug.
Assert
(_input.NodeType == XmlNodeType.Element);
323
Debug.
Assert
(!_input.IsXsltNamespace());
324
Debug.
Assert
(_curTemplate == null);
355
Debug.
Assert
(_input.IsXsltNamespace() && (_input.IsKeyword(_atoms.Stylesheet) || _input.IsKeyword(_atoms.Transform)));
468
Debug.
Assert
(_input.NodeType == XmlNodeType.Text);
825
Debug.
Assert
(attSet != null);
836
Debug.
Assert
(attSet.CycleCheck == CycleCheck.Processing);
837
Debug.
Assert
(attSet.Content[0].SourceLine != null);
957
Debug.
Assert
(NumCharAttrs == DefaultValues.Length);
993
Debug.
Assert
(name.Equals(format.Name));
1112
Debug.
Assert
(_input.NodeType == XmlNodeType.Text);
1123
Debug.
Assert
(_curTemplate == null);
1124
Debug.
Assert
(_input.CanHaveApplyImports == false);
1141
Debug.
Assert
(_curTemplate == null);
1455
Debug.
Assert
(_input.NodeType == XmlNodeType.Text);
1503
Debug.
Assert
(_input.NodeType == XmlNodeType.Text);
1716
Debug.
Assert
(_input.NodeType == XmlNodeType.Text);
1921
Debug.
Assert
(nodeType != XslNodeType.Unknown);
2034
Debug.
Assert
(_input.NodeType == XmlNodeType.Element);
2480
Debug.
Assert
(_input.NodeType == XmlNodeType.Element);
2523
Debug.
Assert
(content != null && withParam != null);
2524
Debug.
Assert
(withParam.NodeType == XslNodeType.WithParam);
2537
Debug.
Assert
(content != null);
2546
Debug.
Assert
(content != null);
3073
Debug.
Assert
(node != null);
3080
Debug.
Assert
(node != null);
3090
Debug.
Assert
(to != null);
System\Xml\Xsl\Xslt\XsltQilFactory.cs (2)
140
Debug.
Assert
(format != null);
153
Debug.
Assert
(format != null);
System\Xml\Xsl\XsltOld\ActionFrame.cs (7)
100
Debug.
Assert
(_variables != null && index < _variables.Length);
106
Debug.
Assert
(_variables != null && index < _variables.Length);
129
Debug.
Assert
(nodeSet != null);
136
Debug.
Assert
(nodeSet != null);
143
Debug.
Assert
(0 < sortarray.Count);
184
Debug.
Assert
(parent != null);
221
Debug.
Assert
(_action is ContainerAction);
System\Xml\Xsl\XsltOld\ApplyImportsAction.cs (1)
29
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\ApplyTemplatesAction.cs (7)
32
Debug.
Assert
(s_BuiltInRule != null);
45
Debug.
Assert
(mode != null);
65
Debug.
Assert
(_mode == null);
133
Debug.
Assert
(processor != null && frame != null);
169
Debug.
Assert
(frame.State == ProcessNextNode);
170
Debug.
Assert
(frame.NewNodeSet != null);
184
Debug.
Assert
(frame.State == PositionAdvanced);
System\Xml\Xsl\XsltOld\AttributeAction.cs (1)
118
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\AttributeSetAction.cs (1)
34
Debug.
Assert
(this.name == null);
System\Xml\Xsl\XsltOld\Avt.cs (6)
21
Debug.
Assert
(constAvt != null);
27
Debug.
Assert
(eventList != null);
45
Debug.
Assert
(_constAvt != null);
50
Debug.
Assert
(processor != null && frame != null);
65
Debug.
Assert
(compiler != null);
66
Debug.
Assert
(avtText != null);
System\Xml\Xsl\XsltOld\AvtEvent.cs (2)
18
Debug.
Assert
(key != Compiler.InvalidQueryKey);
24
Debug.
Assert
(_key != Compiler.InvalidQueryKey);
System\Xml\Xsl\XsltOld\BeginEvent.cs (2)
26
Debug.
Assert
(input != null);
27
Debug.
Assert
(input.NodeType != XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\BuilderInfo.cs (1)
85
Debug.
Assert
(info.NodeType != XmlNodeType.Text || XmlCharType.IsOnlyWhitespace(info.Value));
System\Xml\Xsl\XsltOld\CallTemplateAction.cs (2)
30
Debug.
Assert
(_name == null);
84
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\CommentAction.cs (1)
26
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\Compiler.cs (33)
100
Debug.
Assert
(_atoms != null);
123
Debug.
Assert
(Document != null);
129
Debug.
Assert
(Document != null);
135
Debug.
Assert
(Document != null);
149
Debug.
Assert
(_rootAction == null);
151
Debug.
Assert
(_currentTemplate == null);
172
Debug.
Assert
(input != null);
173
Debug.
Assert
(xmlResolver != null);
174
Debug.
Assert
(_input == null && _atoms == null);
186
Debug.
Assert
(_input != null && _atoms != null);
216
Debug.
Assert
(_rootAction != null);
217
Debug.
Assert
(this.stylesheet != null);
218
Debug.
Assert
(_queryStore != null);
219
Debug.
Assert
(_input == null && _atoms == null);
321
Debug.
Assert
(_rootAction != null);
326
Debug.
Assert
(_currentTemplate != null);
327
Debug.
Assert
(variable.VarType == VariableType.LocalVariable || variable.VarType == VariableType.LocalParameter || variable.VarType == VariableType.WithParameter);
464
Debug.
Assert
(value != null);
465
Debug.
Assert
((object)value == (object)Input!.Value); // this is always true. Why we passing value to this function.
568
Debug.
Assert
(_xmlResolver != null);
580
Debug.
Assert
(_xmlResolver != null);
605
Debug.
Assert
(newInput != null);
618
Debug.
Assert
(_input != null);
619
Debug.
Assert
(_input.Atoms == _atoms);
654
Debug.
Assert
(this.stylesheet == _stylesheets!.Peek());
666
Debug.
Assert
(this.stylesheet == _stylesheets!.Peek());
676
Debug.
Assert
(this.stylesheet == _stylesheets!.Peek());
682
Debug.
Assert
(_currentTemplate != null);
690
Debug.
Assert
(_currentTemplate != null);
709
Debug.
Assert
(_queryStore != null);
781
Debug.
Assert
(
898
Debug.
Assert
(start <= avt.Length);
922
Debug.
Assert
(avtText != null);
System\Xml\Xsl\XsltOld\ContainerAction.cs (7)
168
Debug.
Assert
(compiler.Input.NodeType == XPathNodeType.Element);
230
Debug.
Assert
(uri != null);
674
Debug.
Assert
(Ref.Equal(input.NamespaceURI, input.Atoms.UriXsl));
758
Debug.
Assert
(action != null);
854
Debug.
Assert
((object)this == (object)compiler.RootAction);
953
Debug.
Assert
(processor != null && frame != null);
981
Debug.
Assert
(actionIndex == 0 || this.containedActions != null);
System\Xml\Xsl\XsltOld\CopyAction.cs (1)
52
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\CopyAttributesAction.cs (13)
22
Debug.
Assert
(s_Action != null);
28
Debug.
Assert
(processor != null && frame != null);
45
Debug.
Assert
(frame.State == BeginEvent);
46
Debug.
Assert
(frame.Node!.NodeType == XPathNodeType.Attribute);
57
Debug.
Assert
(frame.State == TextEvent);
58
Debug.
Assert
(frame.Node!.NodeType == XPathNodeType.Attribute);
69
Debug.
Assert
(frame.State == EndEvent);
70
Debug.
Assert
(frame.Node!.NodeType == XPathNodeType.Attribute);
81
Debug.
Assert
(frame.State == Advance);
82
Debug.
Assert
(frame.Node!.NodeType == XPathNodeType.Attribute);
102
Debug.
Assert
(node.NodeType == XPathNodeType.Attribute);
108
Debug.
Assert
(node.NodeType == XPathNodeType.Attribute);
114
Debug.
Assert
(node.NodeType == XPathNodeType.Attribute);
System\Xml\Xsl\XsltOld\CopyCodeAction.cs (5)
31
Debug.
Assert
(copyEvents != null);
46
Debug.
Assert
(processor != null && frame != null);
47
Debug.
Assert
(_copyEvents != null && _copyEvents.Count > 0);
57
Debug.
Assert
(frame.State == Outputting);
61
Debug.
Assert
(frame.Counter < _copyEvents.Count);
System\Xml\Xsl\XsltOld\CopyNamespacesAction.cs (8)
19
Debug.
Assert
(s_Action != null);
25
Debug.
Assert
(processor != null && frame != null);
42
Debug.
Assert
(frame.State == BeginEvent);
43
Debug.
Assert
(frame.Node!.NodeType == XPathNodeType.Namespace);
54
Debug.
Assert
(frame.State == EndEvent);
55
Debug.
Assert
(frame.Node!.NodeType == XPathNodeType.Namespace);
66
Debug.
Assert
(frame.State == Advance);
67
Debug.
Assert
(frame.Node!.NodeType == XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\CopyNodeSetAction.cs (5)
24
Debug.
Assert
(s_Action != null);
30
Debug.
Assert
(processor != null && frame != null);
47
Debug.
Assert
(frame.State == BeginEvent);
58
Debug.
Assert
(frame.State == Contents);
97
Debug.
Assert
(frame.State == EndEvent);
System\Xml\Xsl\XsltOld\CopyOfAction.cs (4)
44
Debug.
Assert
(processor != null && frame != null);
49
Debug.
Assert
(frame.NodeSet != null);
83
Debug.
Assert
(frame.StoredOutput != null);
89
Debug.
Assert
(frame.State == NodeSetCopied);
System\Xml\Xsl\XsltOld\DocumentScope.cs (4)
28
Debug.
Assert
(prefix != null && prefix.Length > 0);
34
Debug.
Assert
(scope.Uri != null);
44
Debug.
Assert
(prefix != null && prefix.Length > 0);
50
Debug.
Assert
(scope.Uri != null);
System\Xml\Xsl\XsltOld\ElementAction.cs (2)
70
Debug.
Assert
(_empty == false);
103
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\EndEvent.cs (1)
17
Debug.
Assert
(nodeType != XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\ForEachAction.cs (4)
54
Debug.
Assert
(processor != null && frame != null);
71
Debug.
Assert
(processor.SortArray.Count != 0);
78
Debug.
Assert
(frame.State == ProcessNextNode);
79
Debug.
Assert
(frame.NewNodeSet != null);
System\Xml\Xsl\XsltOld\IfAction.cs (3)
65
Debug.
Assert
(processor != null && frame != null);
72
Debug.
Assert
(_testKey != Compiler.InvalidQueryKey);
88
Debug.
Assert
(frame.Container != null);
System\Xml\Xsl\XsltOld\InputScope.cs (1)
92
Debug.
Assert
(variable != null);
System\Xml\Xsl\XsltOld\InputScopeManager.cs (9)
32
Debug.
Assert
(_scopeStack != null);
33
Debug.
Assert
(_scopeStack.Parent != null);
76
Debug.
Assert
(prefix != null);
77
Debug.
Assert
(nspace != null);
96
Debug.
Assert
(!string.IsNullOrEmpty(prefix));
119
Debug.
Assert
(prefix != null);
129
Debug.
Assert
(prefix != null);
140
Debug.
Assert
(nsList != null);
163
Debug.
Assert
(nsList != null);
System\Xml\Xsl\XsltOld\MessageAction.cs (2)
46
Debug.
Assert
(processor != null && frame != null);
58
Debug.
Assert
(recOutput != null);
System\Xml\Xsl\XsltOld\NameSpaceEvent.cs (4)
18
Debug.
Assert
(input != null);
19
Debug.
Assert
(input.NodeType == XPathNodeType.Namespace);
44
Debug.
Assert
(res); // Namespace node as any other attribute can't fail because it doesn't signal record change
46
Debug.
Assert
(res);
System\Xml\Xsl\XsltOld\NavigatorInput.cs (2)
212
Debug.
Assert
(navigator.NameTable != null);
237
Debug.
Assert
(_Navigator != null);
System\Xml\Xsl\XsltOld\NavigatorOutput.cs (2)
28
Debug.
Assert
(record != null);
40
Debug.
Assert
(record.AttributeList[attrib] is BuilderInfo);
System\Xml\Xsl\XsltOld\newinstructionaction.cs (1)
51
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\NumberAction.cs (12)
84
Debug.
Assert
(dblVal >= 1);
256
Debug.
Assert
(
342
Debug.
Assert
(nav.NodeType != XPathNodeType.Attribute && nav.NodeType != XPathNodeType.Namespace);
343
Debug.
Assert
(MatchCountKey(processor, contextNode, nav));
371
Debug.
Assert
(!(value is int));
394
Debug.
Assert
(processor != null && frame != null);
399
Debug.
Assert
(frame != null);
400
Debug.
Assert
(frame.NodeSet != null);
445
Debug.
Assert
(frame.StoredOutput != null);
515
Debug.
Assert
(prefix == null || prefix.isSeparator);
536
Debug.
Assert
(thisSeparator.isSeparator);
541
Debug.
Assert
(!thisFormat.isSeparator);
System\Xml\Xsl\XsltOld\OutKeywords.cs (3)
17
Debug.
Assert
(nameTable != null);
115
Debug.
Assert
(keyword != null);
116
Debug.
Assert
((object)keyword == (object?)_NameTable.Get(keyword));
System\Xml\Xsl\XsltOld\OutputScope.cs (1)
85
Debug.
Assert
(urn != null);
System\Xml\Xsl\XsltOld\OutputScopeManager.cs (14)
30
Debug.
Assert
(_elementScopesStack.Peek() != null); // We adding rootElementScope to garantee this
47
Debug.
Assert
(nameTable != null);
48
Debug.
Assert
(atoms != null);
68
Debug.
Assert
(prefix != null);
69
Debug.
Assert
(nspace != null);
80
Debug.
Assert
(name != null);
81
Debug.
Assert
(nspace != null);
82
Debug.
Assert
(prefix != null);
92
Debug.
Assert
(elementScope != null);
100
Debug.
Assert
(elementScope != null); // We're adding rootElementScope to guarantee this
115
Debug.
Assert
(prefix != null);
135
Debug.
Assert
(_elementScopesStack[i] is OutputScope);
152
Debug.
Assert
(nspace != null);
155
Debug.
Assert
(_elementScopesStack[i] is OutputScope);
System\Xml\Xsl\XsltOld\PrefixQName.cs (1)
36
Debug.
Assert
(qname != null);
System\Xml\Xsl\XsltOld\ProcessingInstructionAction.cs (2)
61
Debug.
Assert
(processor != null && frame != null);
88
Debug.
Assert
(frame.StoredOutput != null);
System\Xml\Xsl\XsltOld\Processor.cs (28)
128
Debug.
Assert
(_execResult == ExecResult.Continue);
280
Debug.
Assert
(!_stringBuilderLocked);
437
Debug.
Assert
(_actionStack != null);
445
Debug.
Assert
(_builder != null);
477
Debug.
Assert
(frame != null);
506
Debug.
Assert
(_templateLookup != null);
513
Debug.
Assert
(key != Compiler.InvalidQueryKey);
519
Debug.
Assert
(key != Compiler.InvalidQueryKey);
534
Debug.
Assert
(key != Compiler.InvalidQueryKey);
603
Debug.
Assert
(nav.NodeType == XPathNodeType.Element);
722
Debug.
Assert
(_builder != null);
732
Debug.
Assert
(_xsm != null);
746
Debug.
Assert
(StateMachine.StateOnly(stateOutlook) == _xsm.State);
747
Debug.
Assert
(ExecutionResult == ExecResult.Continue);
751
Debug.
Assert
(StateMachine.StateOnly(stateOutlook) == _xsm.State);
775
Debug.
Assert
(_xsm != null);
788
Debug.
Assert
(StateMachine.StateOnly(stateOutlook) == _xsm.State);
789
Debug.
Assert
(ExecutionResult == ExecResult.Continue);
793
Debug.
Assert
(StateMachine.StateOnly(stateOutlook) == _xsm.State);
810
Debug.
Assert
(_xsm != null);
824
Debug.
Assert
(StateMachine.StateOnly(stateOutlook) == _xsm.State);
934
Debug.
Assert
(navigator != null);
957
Debug.
Assert
(output != null);
968
Debug.
Assert
(_builder != null);
1017
Debug.
Assert
(saveStackSize == _actionStack.Length);
1030
Debug.
Assert
(1 < _actionStack.Length);
1043
Debug.
Assert
(2 < _actionStack.Length);
1086
Debug.
Assert
(2 <= _debuggerStack!.Length);
System\Xml\Xsl\XsltOld\ReaderOutput.cs (28)
43
Debug.
Assert
(processor != null);
44
Debug.
Assert
(processor.NameTable != null);
190
Debug.
Assert
(ordinal >= 0);
195
Debug.
Assert
(ordinal == -1);
205
Debug.
Assert
(ordinal >= 0);
210
Debug.
Assert
(ordinal == -1);
236
Debug.
Assert
(ordinal >= 0);
242
Debug.
Assert
(ordinal == -1);
252
Debug.
Assert
(ordinal >= 0);
258
Debug.
Assert
(ordinal == -1);
274
Debug.
Assert
(_attributeCount == 0);
308
Debug.
Assert
(_processor != null || _state == ReadState.Closed);
360
Debug.
Assert
(_processor.ExecutionDone);
446
Debug.
Assert
(_builder != null);
450
Debug.
Assert
(NodeType == XmlNodeType.EndElement);
484
Debug.
Assert
(_builder != null);
518
Debug.
Assert
(_nameTable != null);
536
Debug.
Assert
(NodeType != XmlNodeType.EntityReference);
604
Debug.
Assert
(0 <= attrib && attrib < _attributeCount);
605
Debug.
Assert
(0 <= attrib && attrib < _attributeList!.Count);
606
Debug.
Assert
(_attributeList[attrib] is BuilderInfo);
617
Debug.
Assert
(_attributeList![attrib] is BuilderInfo);
629
Debug.
Assert
(_attributeList![index] is BuilderInfo);
649
Debug.
Assert
(_attributeList![index] is BuilderInfo);
676
Debug.
Assert
(_currentInfo != null);
677
Debug.
Assert
(_attributeCount == 0 || _attributeList != null);
678
Debug.
Assert
((_currentIndex == -1) == (_currentInfo == _mainNode));
679
Debug.
Assert
((_currentIndex == -1) || (_currentInfo == _attributeValue || _attributeList![_currentIndex] is BuilderInfo && _attributeList[_currentIndex] == _currentInfo));
System\Xml\Xsl\XsltOld\RecordBuilder.cs (24)
55
Debug.
Assert
(output != null);
110
Debug.
Assert
(_recordState != HaveRecord);
134
Debug.
Assert
(_recordState == NoRecord || (state & StateMachine.BeginRecord) == 0);
186
Debug.
Assert
(_recordState == NoRecord || (state & StateMachine.BeginRecord) == 0);
257
Debug.
Assert
(_attributeCount <= _attributeList.Count);
261
Debug.
Assert
(_attributeList[attrib] != null && _attributeList[attrib] is BuilderInfo);
284
Debug.
Assert
(_attributeCount == 0);
298
Debug.
Assert
(_attributeCount == 0);
312
Debug.
Assert
(_attributeCount == _attributeList.Count);
327
Debug.
Assert
(_attributeList[attrib] != null && _attributeList[attrib] is BuilderInfo);
413
Debug.
Assert
(_recordState == NoRecord || _recordState == SomeRecord);
440
Debug.
Assert
(_recordState == NoRecord || _recordState == SomeRecord);
458
Debug.
Assert
(_recordState == NoRecord || _recordState == SomeRecord);
476
Debug.
Assert
(_mainNode != null);
487
Debug.
Assert
(_mainNode.NodeType == XmlNodeType.Element);
491
Debug.
Assert
(_attributeList[attr] is BuilderInfo);
512
Debug.
Assert
(_mainNode.NodeType == XmlNodeType.Element);
562
Debug.
Assert
(_attributeList[attr] is BuilderInfo);
614
Debug.
Assert
(_mainNode.NodeType == XmlNodeType.Comment);
615
Debug.
Assert
((object?)_currentInfo == (object)_mainNode);
667
Debug.
Assert
(_mainNode.NodeType == XmlNodeType.ProcessingInstruction || _mainNode.NodeType == XmlNodeType.XmlDeclaration);
740
Debug.
Assert
(_namespaceCount == _namespaceList.Count);
750
Debug.
Assert
(_namespaceList[index] != null && _namespaceList[index] is BuilderInfo);
781
Debug.
Assert
(prefix != null && prefix.Length > 0);
System\Xml\Xsl\XsltOld\RootAction.cs (5)
187
Debug.
Assert
(mark == null);
252
Debug.
Assert
(processor != null && frame != null);
269
Debug.
Assert
(frame.State == QueryInitialized);
271
Debug.
Assert
(Processor.IsRoot(frame.Node!));
284
Debug.
Assert
(frame.State == RootProcessed);
System\Xml\Xsl\XsltOld\SequentialOutput.cs (11)
109
Debug.
Assert
(record.MainNode.NodeType == XmlNodeType.Element);
407
Debug.
Assert
(_outputCache[record] is BuilderInfo);
536
Debug.
Assert
(value != null);
542
Debug.
Assert
(value != null);
574
Debug.
Assert
(value != null);
575
Debug.
Assert
(_isHtmlOutput);
630
Debug.
Assert
(value != null);
631
Debug.
Assert
(find.Length == replace.Length);
681
Debug.
Assert
(value != null);
687
Debug.
Assert
(count <= list.Count);
690
Debug.
Assert
(list[attrib] is BuilderInfo);
System\Xml\Xsl\XsltOld\SortAction.cs (2)
174
Debug.
Assert
(processor != null && frame != null);
175
Debug.
Assert
(frame.State == Initialized);
System\Xml\Xsl\XsltOld\StateMachine.cs (4)
100
Debug.
Assert
(newState != Assrt);
107
Debug.
Assert
(newState != Assrt);
119
Debug.
Assert
(newState != Assrt);
126
Debug.
Assert
(newState != Assrt);
System\Xml\Xsl\XsltOld\Stylesheet.cs (18)
150
Debug.
Assert
(attributeSet.Name != null);
172
Debug.
Assert
(_templateNameTable != null);
202
Debug.
Assert
(_templates == null);
206
Debug.
Assert
(manager != null);
220
Debug.
Assert
(enumerator.Value is TemplateManager);
230
Debug.
Assert
(_imports[importIndex] is Stylesheet);
232
Debug.
Assert
(stylesheet != null);
283
Debug.
Assert
(processor != null && navigator != null);
284
Debug.
Assert
(mode != null);
296
Debug.
Assert
(manager.Mode.Equals(mode));
320
Debug.
Assert
(_imports[importIndex] is Stylesheet);
322
Debug.
Assert
(stylesheet != null);
342
Debug.
Assert
(processor != null && navigator != null);
343
Debug.
Assert
(_templates == null && _modeManagers == null || _templates == _modeManagers![XmlQualifiedName.Empty]);
388
Debug.
Assert
(_imports[importIndex] is Stylesheet);
390
Debug.
Assert
(stylesheet != null);
420
Debug.
Assert
(_imports[importIndex] is Stylesheet);
422
Debug.
Assert
(stylesheet != null);
System\Xml\Xsl\XsltOld\TemplateAction.cs (6)
48
Debug.
Assert
(_templateId == 0);
96
Debug.
Assert
(_matchKey == Compiler.InvalidQueryKey);
101
Debug.
Assert
(_name == null);
106
Debug.
Assert
(double.IsNaN(_priority));
115
Debug.
Assert
(_mode == null);
225
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\TemplateLookupAction.cs (7)
25
Debug.
Assert
(processor != null && frame != null);
26
Debug.
Assert
(frame.State == Initialized);
59
Debug.
Assert
(node != null);
98
Debug.
Assert
(processor != null && frame != null);
99
Debug.
Assert
(frame.State == Initialized);
100
Debug.
Assert
(processor.Debugger != null);
108
Debug.
Assert
(this.mode != Compiler.BuiltInMode);
System\Xml\Xsl\XsltOld\TemplateManager.cs (8)
22
Debug.
Assert
(x != null && x is TemplateAction);
23
Debug.
Assert
(y != null && y is TemplateAction);
28
Debug.
Assert
(!double.IsNaN(tx.Priority));
29
Debug.
Assert
(!double.IsNaN(ty.Priority));
33
Debug.
Assert
(tx.TemplateId != ty.TemplateId || tx == ty);
58
Debug.
Assert
(template != null);
59
Debug.
Assert
(
82
Debug.
Assert
(this.templates != null);
System\Xml\Xsl\XsltOld\TextAction.cs (1)
69
Debug.
Assert
(processor != null && frame != null);
System\Xml\Xsl\XsltOld\TextEvent.cs (2)
19
Debug.
Assert
(text != null);
26
Debug.
Assert
(input.NodeType == XPathNodeType.Text || input.NodeType == XPathNodeType.SignificantWhitespace);
System\Xml\Xsl\XsltOld\UseAttributeSetsAction.cs (2)
26
Debug.
Assert
(Ref.Equal(compiler.Input.LocalName, compiler.Atoms.UseAttributeSets));
29
Debug.
Assert
(_useAttributeSets == null);
System\Xml\Xsl\XsltOld\ValueOfAction.cs (9)
22
Debug.
Assert
(s_BuiltInRule != null);
56
Debug.
Assert
(processor != null && frame != null);
61
Debug.
Assert
(frame != null);
62
Debug.
Assert
(frame.NodeSet != null);
78
Debug.
Assert
(frame.StoredOutput != null);
95
Debug.
Assert
(processor != null && frame != null);
100
Debug.
Assert
(frame != null);
101
Debug.
Assert
(frame.NodeSet != null);
117
Debug.
Assert
(frame.StoredOutput != null);
System\Xml\Xsl\XsltOld\VariableAction.cs (4)
98
Debug.
Assert
(this.name == null && this.nameStr == null);
116
Debug.
Assert
(processor != null && frame != null && frame.State != ValueCalculated);
169
Debug.
Assert
(recOutput is NavigatorOutput);
174
Debug.
Assert
(value != null);
System\Xml\Xsl\XsltOld\WithParamAction.cs (2)
34
Debug.
Assert
(processor != null && frame != null);
61
Debug.
Assert
(recOutput is NavigatorOutput);
System\Xml\Xsl\XsltOld\WriterOutput.cs (2)
91
Debug.
Assert
(list.Count >= count);
94
Debug.
Assert
(list[attrib] is BuilderInfo);
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (7)
255
Debug.
Assert
(thisUri != null && baseUri != null);
656
Debug.
Assert
(it != null);
920
Debug.
Assert
(resultCollection.Count != 0);
921
Debug.
Assert
(newList.Count != 0);
925
Debug.
Assert
(resultCollection[0] is XPathNavigator);
962
Debug.
Assert
(extension != null);
963
Debug.
Assert
(method != null);
System\Xml\Xsl\XsltOld\XsltOutput.cs (1)
147
Debug.
Assert
(_encoding != null);
System\Xml\Xslt\XslTransform.cs (6)
112
Debug.
Assert
(_QueryStore != null);
113
Debug.
Assert
(_RootAction != null);
245
Debug.
Assert
(stylesheet != null);
251
Debug.
Assert
(compiler.CompiledStylesheet != null);
252
Debug.
Assert
(compiler.QueryStore != null);
253
Debug.
Assert
(compiler.RootAction != null);
System.Private.Xml.Linq (12)
System\Xml\Linq\XContainer.cs (1)
1247
Debug.
Assert
(content != null);
System\Xml\Linq\XElement.cs (1)
1982
Debug.
Assert
(e != null);
System\Xml\Linq\XHelper.cs (1)
13
Debug.
Assert
(type != null);
System\Xml\Linq\XNode.cs (1)
65
Debug.
Assert
(parent.content != null);
System\Xml\Linq\XObject.cs (1)
144
Debug.
Assert
(type != null);
System\Xml\Schema\XNodeValidator.cs (6)
95
Debug.
Assert
(sa.AttributeSchemaType != null);
98
Debug.
Assert
(st.Datatype != null);
102
Debug.
Assert
(st.Content != null);
108
Debug.
Assert
(mt.Datatype != null);
109
Debug.
Assert
(value != null);
313
Debug.
Assert
(si.SchemaElement != null);
System\Xml\XPath\XNodeNavigator.cs (1)
883
Debug.
Assert
(navigator.UnderlyingObject != null);
System.Reflection.Context (72)
System\Reflection\Context\Custom\AttributeUtils.cs (2)
156
Debug.
Assert
(attributeFilterType.IsInstanceOfType(newAttribute));
162
Debug.
Assert
(attributeFilterType.IsAssignableFrom(attributeType));
System\Reflection\Context\Custom\CustomType.cs (2)
265
Debug.
Assert
(types == null || types.Length == 0);
277
Debug.
Assert
(getPropertySetter && types != null && types.Length == 1);
System\Reflection\Context\CustomReflectionContext.Projector.cs (16)
27
Debug.
Assert
(ReflectionContext.SourceContext != null);
40
Debug.
Assert
(ReflectionContext.SourceContext != null);
55
Debug.
Assert
(NeedsProjection(value));
66
Debug.
Assert
(NeedsProjection(value));
77
Debug.
Assert
(NeedsProjection(value));
88
Debug.
Assert
(NeedsProjection(value));
99
Debug.
Assert
(NeedsProjection(value));
110
Debug.
Assert
(NeedsProjection(value));
121
Debug.
Assert
(NeedsProjection(value));
149
Debug.
Assert
(NeedsProjection(value));
160
Debug.
Assert
(NeedsProjection(value));
171
Debug.
Assert
(NeedsProjection(value));
182
Debug.
Assert
(NeedsProjection(value));
193
Debug.
Assert
(NeedsProjection(value));
204
Debug.
Assert
(NeedsProjection(value));
215
Debug.
Assert
(NeedsProjection(value));
System\Reflection\Context\Delegation\DelegatingAssembly.cs (1)
20
Debug.
Assert
(null != assembly);
System\Reflection\Context\Delegation\DelegatingConstructorInfo.cs (1)
14
Debug.
Assert
(null != constructor);
System\Reflection\Context\Delegation\DelegatingCustomAttributeData.cs (1)
13
Debug.
Assert
(null != attribute);
System\Reflection\Context\Delegation\DelegatingEventInfo.cs (1)
13
Debug.
Assert
(null != @event);
System\Reflection\Context\Delegation\DelegatingExceptionHandlingClause.cs (1)
14
Debug.
Assert
(clause != null);
System\Reflection\Context\Delegation\DelegatingFieldInfo.cs (1)
14
Debug.
Assert
(null != field);
System\Reflection\Context\Delegation\DelegatingLocalVariableInfo.cs (1)
12
Debug.
Assert
(variable != null);
System\Reflection\Context\Delegation\DelegatingManifestResourceInfo.cs (1)
13
Debug.
Assert
(null != resource);
System\Reflection\Context\Delegation\DelegatingMethodBody.cs (1)
15
Debug.
Assert
(null != body);
System\Reflection\Context\Delegation\DelegatingMethodInfo.cs (1)
16
Debug.
Assert
(null != method);
System\Reflection\Context\Delegation\DelegatingModule.cs (1)
14
Debug.
Assert
(null != module);
System\Reflection\Context\Delegation\DelegatingParameterInfo.cs (1)
13
Debug.
Assert
(null != parameter);
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (1)
14
Debug.
Assert
(null != property);
System\Reflection\Context\Delegation\DelegatingType.cs (2)
18
Debug.
Assert
(null != type);
398
Debug.
Assert
(bindingAttr == (BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public));
System\Reflection\Context\Projection\ProjectingAssembly.cs (1)
18
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingConstructorInfo.cs (1)
16
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingCustomAttributeData.cs (1)
18
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingEventInfo.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingExceptionHandlingClause.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingFieldInfo.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingLocalVariableInfo.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingManifestResourceInfo.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingMethodBody.cs (1)
18
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingMethodInfo.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingModule.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingParameterInfo.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingPropertyInfo.cs (1)
17
Debug.
Assert
(null != projector);
System\Reflection\Context\Projection\ProjectingType.cs (2)
19
Debug.
Assert
(null != projector);
255
Debug.
Assert
(i == members.Length);
System\Reflection\Context\Projection\Projector.cs (5)
37
Debug.
Assert
(!(value is IProjectable) || ((IProjectable)value).Projector != this);
107
Debug.
Assert
(value != null);
125
Debug.
Assert
(null != project);
126
Debug.
Assert
(values != null && values.Count > 0);
134
Debug.
Assert
(NeedsProjection(value));
System\Reflection\Context\Virtual\InheritedMethodInfo.cs (4)
18
Debug.
Assert
(reflectedType != null);
19
Debug.
Assert
(reflectedType.IsSubclassOf(baseMethod.DeclaringType!));
20
Debug.
Assert
(baseMethod is VirtualMethodBase);
23
Debug.
Assert
(baseMethod.ReflectedType!.Equals(baseMethod.DeclaringType));
System\Reflection\Context\Virtual\InheritedPropertyInfo.cs (4)
18
Debug.
Assert
(reflectedType != null);
19
Debug.
Assert
(reflectedType.IsSubclassOf(baseProperty.DeclaringType!));
20
Debug.
Assert
(baseProperty is VirtualPropertyBase);
23
Debug.
Assert
(baseProperty.ReflectedType!.Equals(baseProperty.DeclaringType));
System\Reflection\Context\Virtual\VirtualParameter.cs (1)
22
Debug.
Assert
(position >= -1);
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (3)
29
Debug.
Assert
(context != null);
88
Debug.
Assert
(getMethod != null || setMethod != null);
219
Debug.
Assert
(null != method);
System\Reflection\Context\Virtual\VirtualPropertyBase.FuncPropertyAccessorBase.cs (1)
14
Debug.
Assert
(null != declaringProperty);
System\Reflection\Context\Virtual\VirtualPropertyInfo.cs (2)
47
Debug.
Assert
(_getter == null || _getter.IsPublic);
54
Debug.
Assert
(_setter == null || _setter.IsPublic);
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertyGetter.cs (1)
21
Debug.
Assert
(null != getter);
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertySetter.cs (1)
22
Debug.
Assert
(null != setter);
System.Reflection.DispatchProxy (11)
System\Reflection\DispatchProxyGenerator.cs (11)
68
Debug.
Assert
(baseType != null);
69
Debug.
Assert
(interfaceType != null);
72
Debug.
Assert
(alc != null);
296
Debug.
Assert
(baseCtor != null);
405
Debug.
Assert
(ei.EventHandlerType != null);
607
Debug.
Assert
(!target.IsByRef);
613
Debug.
Assert
(!isAddress);
624
Debug.
Assert
(!opCode.Equals(OpCodes.Nop));
629
Debug.
Assert
(source.IsAssignableFrom(target));
646
Debug.
Assert
(source.IsAssignableFrom(target) || target.IsInterface || source.IsInterface);
706
Debug.
Assert
(_paramTypes[i].IsByRef);
System.Reflection.Emit (27)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (6)
37
Debug.
Assert
(_instNesting != 0);
53
Debug.
Assert
(_instNesting != 0);
69
Debug.
Assert
(_instNesting != 0);
81
Debug.
Assert
(name != null);
93
Debug.
Assert
(rank > 0);
134
Debug.
Assert
(_instNesting == 0);
System\Reflection\Emit\FieldBuilderImpl.cs (1)
127
Debug.
Assert
(binaryAttribute.Length >= 6);
System\Reflection\Emit\ILGeneratorImpl.cs (2)
455
Debug.
Assert
(labelStartDepth >= -1);
456
Debug.
Assert
(targetDepth >= -1);
System\Reflection\Emit\ModuleBuilderImpl.cs (8)
154
Debug.
Assert
(typeBuilder._handle.Equals(typeHandle));
364
Debug.
Assert
(method._handle == handle);
494
Debug.
Assert
(previousNonHiddenStartColumn < 0);
572
Debug.
Assert
(deltaLines != 0 || deltaColumns != 0 || sequencePoint.IsHidden);
582
Debug.
Assert
(deltaLines > 0);
635
Debug.
Assert
(field._handle == handle);
995
Debug.
Assert
(tb.IsCreated());
1002
Debug.
Assert
(eb._typeBuilder.IsCreated());
System\Reflection\Emit\PseudoCustomAttributesData.cs (10)
151
Debug.
Assert
(_marshalArrayElementCount >= 0);
181
Debug.
Assert
(_marshalArrayElementType >= 0);
241
Debug.
Assert
(parameterIndex == null || parameterIndex >= 0 && parameterIndex <= MaxMarshalInteger);
249
Debug.
Assert
(elementCount == null || elementCount >= 0 && elementCount <= MaxMarshalInteger);
250
Debug.
Assert
(parameterIndex == null || parameterIndex >= 0);
260
Debug.
Assert
(elementCount == null || elementCount >= 0 && elementCount <= MaxMarshalInteger);
261
Debug.
Assert
(elementType == null || elementType >= 0 && (int)elementType <= MaxMarshalInteger);
270
Debug.
Assert
(elementType == null || elementType >= 0 && (int)elementType <= MaxMarshalInteger);
279
Debug.
Assert
(elementCount >= 0 && elementCount <= MaxMarshalInteger);
287
Debug.
Assert
(type >= 0 && (int)type <= MaxMarshalInteger);
System.Reflection.Metadata (368)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (1)
16
Debug.
Assert
(name.Length != 0);
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
66
Debug.
Assert
(input.Length > 0);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\Reflection\Internal\MemoryBlocks\ByteArrayMemoryProvider.cs (2)
19
Debug.
Assert
(!array.IsDefault);
25
Debug.
Assert
(disposing);
System\Reflection\Internal\MemoryBlocks\ExternalMemoryBlockProvider.cs (1)
44
Debug.
Assert
(disposing);
System\Reflection\Internal\MemoryBlocks\StreamMemoryBlockProvider.cs (2)
40
Debug.
Assert
(stream.CanSeek && stream.CanRead);
51
Debug.
Assert
(disposing);
System\Reflection\Internal\Utilities\BitArithmetic.cs (3)
49
Debug.
Assert
(CountBits(alignment) == 1);
62
Debug.
Assert
(position >= 0 && alignment > 0);
63
Debug.
Assert
(CountBits(alignment) == 1);
System\Reflection\Internal\Utilities\BlobUtilities.cs (6)
16
Debug.
Assert
(buffer.Length > 0);
82
Debug.
Assert
(written);
119
Debug.
Assert
(byteCount >= charCount);
131
Debug.
Assert
(*charPtr <= 0x7f);
185
Debug.
Assert
(ptr == bufferPtr + start + byteCount);
186
Debug.
Assert
(charPtr == strEnd);
System\Reflection\Internal\Utilities\EncodingHelper.netcoreapp.cs (2)
19
Debug.
Assert
(utf8Decoder != null);
36
Debug.
Assert
(utf8Decoder != null);
System\Reflection\Internal\Utilities\ImmutableMemoryStream.cs (1)
17
Debug.
Assert
(!array.IsDefault);
System\Reflection\Internal\Utilities\MemoryBlock.cs (9)
21
Debug.
Assert
(length >= 0 && (buffer != null || length == 0));
297
Debug.
Assert
(terminator <= 0x7F);
316
Debug.
Assert
(terminator <= 0x7f);
338
Debug.
Assert
(asciiChar != 0 && asciiChar <= 0x7f);
377
Debug.
Assert
(result == FastComparisonResult.Inconclusive);
397
Debug.
Assert
(terminator <= 0x7F);
460
Debug.
Assert
(asciiPrefix[i] > 0 && asciiPrefix[i] <= 0x7f);
484
Debug.
Assert
(asciiString[i] > 0 && asciiString[i] <= 0x7f);
848
Debug.
Assert
(i == result.Length);
System\Reflection\Internal\Utilities\PooledStringBuilder.cs (2)
24
Debug.
Assert
(pool != null);
67
Debug.
Assert
(builder.Builder.Length == 0);
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
60
Debug.
Assert
(count > 0);
System\Reflection\Metadata\BlobBuilder.cs (18)
124
Debug.
Assert
(_buffer != null);
125
Debug.
Assert
(Length >= 0 && Length <= _buffer.Length);
126
Debug.
Assert
(_nextOrPrevious != null);
130
Debug.
Assert
(_previousLengthOrFrozenSuffixLengthDelta >= 0);
136
Debug.
Assert
(chunk.IsHead || chunk.Length > 0);
140
Debug.
Assert
(totalLength == Count);
150
Debug.
Assert
(IsHead);
155
Debug.
Assert
(IsHead);
231
Debug.
Assert
(leftStart == 0 || rightStart == 0);
283
Debug.
Assert
(bufferStart >= chunkStart);
288
Debug.
Assert
(bytesToCopy >= 0);
302
Debug.
Assert
(bufferStart == bufferEnd);
597
Debug.
Assert
(byteCount >= 0);
616
Debug.
Assert
(byteCount <= MinChunkSize);
945
Debug.
Assert
(unchecked((ushort)reference) == reference);
1077
Debug.
Assert
(start >= 0);
1078
Debug.
Assert
(length >= 0);
1079
Debug.
Assert
(start + length <= str.Length);
System\Reflection\Metadata\BlobBuilder.Enumerators.cs (1)
22
Debug.
Assert
(builder.IsHead);
System\Reflection\Metadata\BlobReader.cs (3)
40
Debug.
Assert
(block.Length >= 0 && (block.Pointer != null || block.Length == 0));
138
Debug.
Assert
(remainder >= 0 && remainder < alignment);
514
Debug.
Assert
(bytesRead == 4);
System\Reflection\Metadata\BlobWriter.cs (5)
40
Debug.
Assert
(buffer != null);
41
Debug.
Assert
(count >= 0);
42
Debug.
Assert
(count <= buffer.Length - start);
109
Debug.
Assert
(value >= 0);
359
Debug.
Assert
(unchecked((ushort)reference) == reference);
System\Reflection\Metadata\BlobWriterImpl.cs (1)
18
Debug.
Assert
(value <= MaxCompressedIntegerValue);
System\Reflection\Metadata\Ecma335\BlobDictionary.cs (1)
58
Debug.
Assert
(immutableKey.AsSpan().SequenceEqual(key));
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (9)
119
Debug.
Assert
(operandOffset >= 0);
120
Debug.
Assert
(_branches.Count == 0 || operandOffset > _branches[_branches.Count - 1].OperandOffset);
126
Debug.
Assert
(opCode.GetBranchOperandSize() == 1);
129
Debug.
Assert
(opCode == ILOpCode.Switch || opCode.GetBranchOperandSize() == 4);
132
Debug.
Assert
(instructionEndDisplacement > 4 && instructionEndDisplacement % 4 == 0 && opCode == ILOpCode.Switch);
141
Debug.
Assert
(ilOffset >= 0);
295
Debug.
Assert
(
319
Debug.
Assert
(
414
Debug.
Assert
(_lazyExceptionHandlers != null);
System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs (2)
82
Debug.
Assert
(exceptionRegionCount > 0);
99
Debug.
Assert
(dataSize <= 0x00ffffff);
System\Reflection\Metadata\Ecma335\Encoding\LabelHandle.cs (1)
18
Debug.
Assert
(id >= 1);
System\Reflection\Metadata\Ecma335\Encoding\SwitchInstructionEncoder.cs (1)
22
Debug.
Assert
(encoder.ControlFlowBuilder is not null);
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (3)
67
Debug.
Assert
(baseTableRowCounts != null);
271
Debug.
Assert
(sizes[generation] == size);
304
Debug.
Assert
(sizes[generation].AggregateInserts == rowId);
System\Reflection\Metadata\Ecma335\MetadataBuilder.cs (5)
17
Debug.
Assert
(HeapIndex.UserString == 0);
18
Debug.
Assert
((int)HeapIndex.String == 1);
19
Debug.
Assert
((int)HeapIndex.Blob == 2);
20
Debug.
Assert
((int)HeapIndex.Guid == 3);
97
Debug.
Assert
(endOffset - startOffset == sizes.MetadataHeaderSize);
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (2)
1872
Debug.
Assert
(metadataSizes.MetadataTableStreamSize == endPosition - startPosition);
1919
Debug.
Assert
(metadataSizes.CalculateTableStreamHeaderSize() == endPosition - startPosition);
System\Reflection\Metadata\Ecma335\MetadataReaderExtensions.cs (2)
126
Debug.
Assert
(reader != null);
227
Debug.
Assert
(reader != null);
System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs (1)
61
Debug.
Assert
(BlobUtilities.GetUTF8ByteCount(DefaultMetadataVersionString) == DefaultMetadataVersionString.Length);
System\Reflection\Metadata\Ecma335\MetadataSizes.cs (18)
127
Debug.
Assert
(rowCounts.Length == MetadataTokens.TableCount);
128
Debug.
Assert
(externalRowCounts.Length == MetadataTokens.TableCount);
129
Debug.
Assert
(heapSizes.Length == MetadataTokens.HeapCount);
155
Debug.
Assert
((PresentTablesMask & ExternalTablesMask) == 0);
275
Debug.
Assert
(rowCounts[(int)TableIndex.FieldPtr] == 0);
277
Debug.
Assert
(rowCounts[(int)TableIndex.MethodPtr] == 0);
279
Debug.
Assert
(rowCounts[(int)TableIndex.ParamPtr] == 0);
291
Debug.
Assert
(rowCounts[(int)TableIndex.EventPtr] == 0);
294
Debug.
Assert
(rowCounts[(int)TableIndex.PropertyPtr] == 0);
305
Debug.
Assert
(rowCounts[(int)TableIndex.AssemblyProcessor] == 0);
306
Debug.
Assert
(rowCounts[(int)TableIndex.AssemblyOS] == 0);
308
Debug.
Assert
(rowCounts[(int)TableIndex.AssemblyRefProcessor] == 0);
309
Debug.
Assert
(rowCounts[(int)TableIndex.AssemblyRefOS] == 0);
362
Debug.
Assert
(RegularStreamHeaderSizes ==
369
Debug.
Assert
(EncDeltaMarkerStreamHeaderSize == GetMetadataStreamHeaderSize("#JTD"));
370
Debug.
Assert
(StandalonePdbStreamHeaderSize == GetMetadataStreamHeaderSize("#Pdb"));
445
Debug.
Assert
(result % StreamAlignment == 0);
480
Debug.
Assert
(RowCounts[(int)table] == 0 || ExternalRowCounts[(int)table] == 0);
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (3)
63
Debug.
Assert
(BlobUtilities.GetUTF8ByteCount(MetadataVersion) == MetadataVersion.Length);
116
Debug.
Assert
(_serializedMetadata.Sizes.CalculateStandalonePdbStreamSize() == endPosition - startPosition);
150
Debug.
Assert
(idWriter.RemainingBytes == 0);
System\Reflection\Metadata\Ecma335\SignatureDecoder.cs (1)
323
Debug.
Assert
(handle.IsNil); // will fall through to throw in release.
System\Reflection\Metadata\EntityHandle.cs (1)
93
Debug.
Assert
(!IsVirtual);
System\Reflection\Metadata\Handle.cs (9)
38
Debug.
Assert
(value >= 0);
45
Debug.
Assert
(IsHeapHandle && value <= HeapHandleType.OffsetMask ||
54
Debug.
Assert
(!IsHeapHandle);
64
Debug.
Assert
(IsHeapHandle);
92
Debug.
Assert
((_value & TokenTypeIds.RIDMask) == _value);
104
Debug.
Assert
((_value & TokenTypeIds.RIDMask) == _value);
155
Debug.
Assert
(IsEntityOrUserStringHandle);
156
Debug.
Assert
(!IsVirtual);
157
Debug.
Assert
((_value & TokenTypeIds.RIDMask) == _value);
System\Reflection\Metadata\IL\MethodBodyBlock.cs (1)
29
Debug.
Assert
(!exceptionRegions.IsDefault);
System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs (1)
19
Debug.
Assert
(!value.GetType().GetTypeInfo().IsEnum);
System\Reflection\Metadata\Internal\NamespaceCache.cs (14)
21
Debug.
Assert
(reader != null);
36
Debug.
Assert
(!handle.HasFullName); // we should not hit the cache in this case.
44
Debug.
Assert
(_rootNamespace != null);
78
Debug.
Assert
(!handleContainingSegment.IsVirtual);
93
Debug.
Assert
(lastFoundIndex >= 0 || currentSegment == 0);
178
Debug.
Assert
(data.Namespaces!.Count == 0);
208
Debug.
Assert
(realChild.HasFullName);
233
Debug.
Assert
(child != null && parent != null);
234
Debug.
Assert
(!child.Handle.IsNil);
247
Debug.
Assert
(realChild.Handle.HasFullName);
327
Debug.
Assert
(table != null);
359
Debug.
Assert
(table != null);
377
Debug.
Assert
(namespaceHandle.HasFullName);
397
Debug.
Assert
(_namespaceTable != null);
System\Reflection\Metadata\Internal\StringHeap.cs (11)
164
Debug.
Assert
(handle.StringKind != StringKind.Virtual);
172
Debug.
Assert
(handle.StringKind != StringKind.Virtual);
183
Debug.
Assert
(handle.StringKind != StringKind.Virtual);
194
Debug.
Assert
(handle.IsVirtual);
206
Debug.
Assert
(handle.IsVirtual);
249
Debug.
Assert
(value != null);
268
Debug.
Assert
(value != null);
290
Debug.
Assert
(!rawHandle.IsVirtual);
300
Debug.
Assert
(asciiChar != 0 && asciiChar <= 0x7f);
309
Debug.
Assert
(!rawHandle.IsVirtual);
319
Debug.
Assert
(!rawHandle.IsVirtual);
System\Reflection\Metadata\Internal\Tables.cs (11)
44
Debug.
Assert
(NumberOfRows > 0);
50
Debug.
Assert
(NumberOfRows > 0);
56
Debug.
Assert
(NumberOfRows > 0);
62
Debug.
Assert
(NumberOfRows > 0);
68
Debug.
Assert
(NumberOfRows > 0);
1909
Debug.
Assert
(NumberOfRows == 1);
1915
Debug.
Assert
(NumberOfRows == 1);
1925
Debug.
Assert
(NumberOfRows == 1);
1931
Debug.
Assert
(NumberOfRows == 1);
1937
Debug.
Assert
(NumberOfRows == 1);
1943
Debug.
Assert
(NumberOfRows == 1);
System\Reflection\Metadata\MetadataReader.cs (5)
129
Debug.
Assert
(AssemblyTable.NumberOfRows <= 1);
787
Debug.
Assert
(local.Length == external.Length);
1429
Debug.
Assert
(!enclosingClass.IsNil);
1443
Debug.
Assert
(builder == groupedNestedTypes[enclosingClass]);
1466
Debug.
Assert
(_lazyNestedTypesMap != null);
System\Reflection\Metadata\MetadataReader.WinMD.cs (10)
96
Debug.
Assert
(s_projectionInfos != null && projectionIndex >= 0 && projectionIndex < s_projectionInfos.Length);
102
Debug.
Assert
(s_projectionInfos != null && projectionIndex >= 0 && projectionIndex < s_projectionInfos.Length);
108
Debug.
Assert
(s_projectionInfos != null && projectionIndex >= 0 && projectionIndex < s_projectionInfos.Length);
114
Debug.
Assert
(s_projectionInfos != null && projectionIndex >= 0 && projectionIndex < s_projectionInfos.Length);
187
Debug.
Assert
(k == keys.Length && v == keys.Length && k == v);
200
Debug.
Assert
(string.CompareOrdinal(keys[i], keys[i + 1]) < 0);
223
Debug.
Assert
(_metadataKind != MetadataKind.Ecma335);
320
Debug.
Assert
(_metadataKind != MetadataKind.Ecma335);
513
Debug.
Assert
(!namespaceHandle.IsVirtual && !nameHandle.IsVirtual);
667
Debug.
Assert
(_metadataKind != MetadataKind.Ecma335);
System\Reflection\Metadata\MetadataReaderProvider.cs (2)
35
Debug.
Assert
(metadataBlock != null);
41
Debug.
Assert
(blockProvider != null);
System\Reflection\Metadata\MetadataStringComparer.cs (1)
54
Debug.
Assert
(reader != null);
System\Reflection\Metadata\MetadataStringDecoder.cs (1)
70
Debug.
Assert
(Encoding != null);
System\Reflection\Metadata\PortablePdb\CustomDebugInformation.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\PortablePdb\Document.cs (2)
23
Debug.
Assert
(reader != null);
24
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\PortablePdb\DocumentNameBlobHandle.cs (1)
28
Debug.
Assert
(HeapHandleType.IsValidHeapOffset((uint)heapOffset));
System\Reflection\Metadata\PortablePdb\HandleCollections.Debug.cs (8)
20
Debug.
Assert
(reader != null);
119
Debug.
Assert
(reader != null);
218
Debug.
Assert
(reader != null);
426
Debug.
Assert
(reader != null);
532
Debug.
Assert
(reader != null);
638
Debug.
Assert
(reader != null);
737
Debug.
Assert
(reader != null);
746
Debug.
Assert
(reader != null);
System\Reflection\Metadata\PortablePdb\Handles.Debug.cs (7)
18
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
101
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
196
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
279
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
362
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
445
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
528
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
System\Reflection\Metadata\PortablePdb\ImportDefinition.cs (1)
24
Debug.
Assert
(
System\Reflection\Metadata\PortablePdb\ImportScope.cs (2)
23
Debug.
Assert
(reader != null);
24
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\PortablePdb\LocalConstant.cs (2)
23
Debug.
Assert
(reader != null);
24
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\PortablePdb\LocalScope.cs (2)
23
Debug.
Assert
(reader != null);
24
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\PortablePdb\LocalVariable.cs (2)
23
Debug.
Assert
(reader != null);
24
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\PortablePdb\MethodDebugInformation.cs (1)
23
Debug.
Assert
(reader != null);
System\Reflection\Metadata\PortablePdb\SequencePointCollection.cs (1)
101
Debug.
Assert
(_previousNonHiddenStartColumn == 0);
System\Reflection\Metadata\TypeNameParserHelpers.cs (2)
24
Debug.
Assert
(genericArgs.Length > 0);
183
Debug.
Assert
(rankOrModifier >= 2);
System\Reflection\Metadata\TypeSystem\AssemblyDefinition.cs (1)
14
Debug.
Assert
(reader != null);
System\Reflection\Metadata\TypeSystem\AssemblyFile.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\AssemblyReference.cs (3)
20
Debug.
Assert
(reader != null);
21
Debug.
Assert
(treatmentAndRowId != 0);
24
Debug.
Assert
((treatmentAndRowId & ~(TokenTypeIds.VirtualBit | TokenTypeIds.RIDMask)) == 0);
System\Reflection\Metadata\TypeSystem\Constant.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(rowId != 0);
System\Reflection\Metadata\TypeSystem\CustomAttribute.cs (2)
18
Debug.
Assert
(reader != null);
19
Debug.
Assert
(treatmentAndRowId != 0);
System\Reflection\Metadata\TypeSystem\DeclarativeSecurityAttribute.cs (2)
18
Debug.
Assert
(reader != null);
19
Debug.
Assert
(rowId != 0);
System\Reflection\Metadata\TypeSystem\EventDefinition.cs (2)
19
Debug.
Assert
(reader != null);
20
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\ExportedType.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(rowId != 0);
System\Reflection\Metadata\TypeSystem\FieldDefinition.cs (2)
18
Debug.
Assert
(reader != null);
19
Debug.
Assert
(treatmentAndRowId != 0);
System\Reflection\Metadata\TypeSystem\GenericParameter.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\GenericParameterConstraint.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\HandleCollections.TypeSystem.cs (23)
237
Debug.
Assert
(reader != null);
245
Debug.
Assert
(reader != null);
357
Debug.
Assert
(reader != null);
365
Debug.
Assert
(reader != null);
366
Debug.
Assert
(!handle.IsNil);
464
Debug.
Assert
(reader != null);
472
Debug.
Assert
(reader != null);
473
Debug.
Assert
(!containingType.IsNil);
584
Debug.
Assert
(reader != null);
592
Debug.
Assert
(reader != null);
593
Debug.
Assert
(!containingType.IsNil);
704
Debug.
Assert
(reader != null);
712
Debug.
Assert
(reader != null);
713
Debug.
Assert
(!containingType.IsNil);
824
Debug.
Assert
(reader != null);
832
Debug.
Assert
(reader != null);
833
Debug.
Assert
(!containingType.IsNil);
942
Debug.
Assert
(reader != null);
1047
Debug.
Assert
(reader != null);
1048
Debug.
Assert
(!containingMethod.IsNil);
1159
Debug.
Assert
(reader != null);
1160
Debug.
Assert
(!implementingType.IsNil);
1660
Debug.
Assert
(reader != null);
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (43)
18
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
101
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
184
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
267
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
362
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
445
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
528
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
611
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
694
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
777
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
860
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
943
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1026
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1109
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1192
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1275
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1358
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1441
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1524
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1629
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1635
Debug.
Assert
(virtualIndex < VirtualIndex.Count);
1725
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1808
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1891
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
1974
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
2057
Debug.
Assert
(TokenTypeIds.IsValidRowId(rowId));
2149
Debug.
Assert
((offset & 0xFF000000) == 0);
2299
Debug.
Assert
((value & StringHandleType.TypeMask) == StringHandleType.String ||
2314
Debug.
Assert
(virtualIndex < VirtualIndex.Count);
2325
Debug.
Assert
(StringKind == StringKind.Plain);
2331
Debug.
Assert
(StringKind == StringKind.Plain);
2337
Debug.
Assert
(StringKind == StringKind.Plain);
2338
Debug.
Assert
(prefixByteLength >= 0);
2383
Debug.
Assert
(!IsVirtual || StringKind == StringKind.WinRTPrefixed);
2389
Debug.
Assert
(IsVirtual && StringKind != StringKind.WinRTPrefixed);
2395
Debug.
Assert
(IsNil || IsVirtual && StringKind == StringKind.Virtual);
2462
Debug.
Assert
(virtualIndex != 0);
2507
Debug.
Assert
(!IsVirtual);
2518
Debug.
Assert
(HasFullName);
2588
Debug.
Assert
(virtualIndex < VirtualIndex.Count);
2596
Debug.
Assert
(blob.Length >= TemplateParameterOffset_AttributeUsageTarget + 4);
2633
Debug.
Assert
(!IsVirtual);
2639
Debug.
Assert
(IsVirtual);
System\Reflection\Metadata\TypeSystem\InterfaceImplementation.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\ManifestResource.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\MemberReference.cs (2)
18
Debug.
Assert
(reader != null);
19
Debug.
Assert
(treatmentAndRowId != 0);
System\Reflection\Metadata\TypeSystem\MethodDefinition.cs (2)
18
Debug.
Assert
(reader != null);
19
Debug.
Assert
(treatmentAndRowId != 0);
System\Reflection\Metadata\TypeSystem\MethodImplementation.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\MethodSpecification.cs (2)
18
Debug.
Assert
(reader != null);
19
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\ModuleDefinition.cs (1)
14
Debug.
Assert
(reader != null);
System\Reflection\Metadata\TypeSystem\ModuleReference.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\NamespaceDefinition.cs (1)
16
Debug.
Assert
(data != null);
System\Reflection\Metadata\TypeSystem\Parameter.cs (2)
17
Debug.
Assert
(reader != null);
18
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs (2)
19
Debug.
Assert
(reader != null);
20
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\StandaloneSignature.cs (2)
19
Debug.
Assert
(reader != null);
20
Debug.
Assert
(!handle.IsNil);
System\Reflection\Metadata\TypeSystem\TypeDefinition.cs (2)
19
Debug.
Assert
(reader != null);
20
Debug.
Assert
(treatmentAndRowId != 0);
System\Reflection\Metadata\TypeSystem\TypeReference.cs (2)
18
Debug.
Assert
(reader != null);
19
Debug.
Assert
(treatmentAndRowId != 0);
System\Reflection\Metadata\TypeSystem\TypeSpecification.cs (2)
18
Debug.
Assert
(reader != null);
19
Debug.
Assert
(!handle.IsNil);
System\Reflection\PortableExecutable\DebugDirectory\CodeViewDebugDirectoryData.cs (1)
27
Debug.
Assert
(path != null);
System\Reflection\PortableExecutable\DebugDirectory\PdbChecksumDebugDirectoryData.cs (2)
23
Debug.
Assert
(!string.IsNullOrEmpty(algorithmName));
24
Debug.
Assert
(!checksum.IsDefaultOrEmpty);
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (2)
187
Debug.
Assert
(_nativeResourcesOpt != null);
207
Debug.
Assert
(builder.Count == 0);
System\Reflection\PortableExecutable\ManagedTextSection.cs (16)
150
Debug.
Assert
(MetadataSize % 4 == 0);
151
Debug.
Assert
(ResourceDataSize % 4 == 0);
190
Debug.
Assert
(MappedFieldDataSize % MappedFieldDataAlignment == 0);
251
Debug.
Assert
(builder.Count == 0);
252
Debug.
Assert
(metadataBuilder.Count == MetadataSize);
253
Debug.
Assert
(metadataBuilder.Count % 4 == 0);
254
Debug.
Assert
(ilBuilder.Count == ILStreamSize);
255
Debug.
Assert
((mappedFieldDataBuilderOpt?.Count ?? 0) == MappedFieldDataSize);
256
Debug.
Assert
((resourceBuilderOpt?.Count ?? 0) == ResourceDataSize);
257
Debug.
Assert
((resourceBuilderOpt?.Count ?? 0) % 4 == 0);
311
Debug.
Assert
(builder.Count == ComputeSizeOfTextSection());
333
Debug.
Assert
(builder.Count - start == SizeOfImportAddressTable);
370
Debug.
Assert
(builder.Count - start == SizeOfImportTable);
380
Debug.
Assert
(builder.Count - start == SizeOfNameTable);
435
Debug.
Assert
(builder.Count - start == CorHeaderSize);
436
Debug.
Assert
(builder.Count % 4 == 0);
System\Reflection\PortableExecutable\PEBinaryReader.cs (4)
28
Debug.
Assert
(size >= 0 && size <= (stream.Length - stream.Position));
113
Debug.
Assert
(count <= sizeof(long)); // Error message assumes we're trying to read constant small number of bytes.
114
Debug.
Assert
(_reader.BaseStream.Position >= 0 && _maxOffset >= 0);
125
Debug.
Assert
(startPosition >= 0 && _maxOffset >= 0);
System\Reflection\PortableExecutable\PEBuilder.cs (5)
118
Debug.
Assert
(stampWriter.RemainingBytes == 0);
157
Debug.
Assert
(DosHeader.Length == DosHeaderSize);
497
Debug.
Assert
(peImage != null);
498
Debug.
Assert
(signatureProvider != null);
533
Debug.
Assert
(segment.Count > 0);
System\Reflection\PortableExecutable\PEHeader.cs (1)
307
Debug.
Assert
(magic == PEMagic.PE32);
System\Reflection\PortableExecutable\PEMemoryBlock.cs (2)
19
Debug.
Assert
(block != null);
20
Debug.
Assert
(offset >= 0 && offset <= block.Size);
System\Reflection\PortableExecutable\PEReader.cs (5)
301
Debug.
Assert
(_lazyPEHeaders != null);
333
Debug.
Assert
(imageStartPosition >= 0 && imageStartPosition <= stream.Length);
383
Debug.
Assert
(index >= 0 && index < PEHeaders.SectionHeaders.Length);
539
Debug.
Assert
(PEHeaders.PEHeader != null);
763
Debug.
Assert
(errorToReport is BadImageFormatException || errorToReport is IOException);
System.Reflection.MetadataLoadContext (145)
System\CoreRtBridge.cs (1)
21
Debug.
Assert
(t.IsGenericTypeDefinition);
System\Reflection\DefaultBinder.cs (1)
234
Debug.
Assert
(returnType != null);
System\Reflection\MetadataLoadContext.CoreAssembly.cs (1)
17
Debug.
Assert
(_coreAssembly == null);
System\Reflection\MetadataLoadContext.Resolving.cs (3)
27
Debug.
Assert
(refName != null);
48
Debug.
Assert
(refName != null);
59
Debug.
Assert
(refName != null);
System\Reflection\PathAssemblyResolver.cs (1)
57
Debug.
Assert
(assemblyName.Name != null);
System\Reflection\Runtime\BindingFlagSupport\ConstructorPolicies.cs (1)
22
Debug.
Assert
(reflectedType.Equals(type)); // Constructor queries are always performed as if BindingFlags.DeclaredOnly are set so the reflectedType should always be the declaring type.
System\Reflection\Runtime\BindingFlagSupport\NestedTypePolicies.cs (1)
28
Debug.
Assert
(reflectedType.Equals(type)); // NestedType queries are always performed as if BindingFlags.DeclaredOnly are set so the reflectedType should always be the declaring type.
System\Reflection\Runtime\BindingFlagSupport\QueriedMemberList.cs (6)
70
Debug.
Assert
(index >= 0 && index < _totalCount);
78
Debug.
Assert
(index >= 0 && index < _totalCount);
174
Debug.
Assert
((allFlagsThatMustMatch & ~validBits) == 0);
175
Debug.
Assert
(((allFlagsThatMustMatch & BindingFlags.Public) == 0) != ((allFlagsThatMustMatch & BindingFlags.NonPublic) == 0));
176
Debug.
Assert
(((allFlagsThatMustMatch & BindingFlags.Instance) == 0) != ((allFlagsThatMustMatch & BindingFlags.Static) == 0));
177
Debug.
Assert
((allFlagsThatMustMatch & BindingFlags.FlattenHierarchy) == 0 || (allFlagsThatMustMatch & BindingFlags.Static) != 0);
System\Reflection\Runtime\BindingFlagSupport\Shared.cs (2)
25
Debug.
Assert
(methodBase != null);
26
Debug.
Assert
(argumentTypes != null);
System\Reflection\Runtime\General\ListBuilder.cs (1)
28
Debug.
Assert
(index < Count);
System\Reflection\Runtime\SignatureTypeExtensions.cs (3)
35
Debug.
Assert
(pattern.IsSignatureType());
107
Debug.
Assert
(signatureType.IsSignatureType());
113
Debug.
Assert
(signatureType.IsSignatureType());
System\Reflection\TypeLoading\Assemblies\AssemblyFileInfo.cs (1)
16
Debug.
Assert
(name != null);
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.cs (4)
22
Debug.
Assert
(loader != null);
23
Debug.
Assert
(peReader != null);
24
Debug.
Assert
(reader != null);
25
Debug.
Assert
(location != null);
System\Reflection\TypeLoading\Assemblies\RoAssembly.GetForwardedTypes.cs (1)
38
Debug.
Assert
((type != null) != (exception != null)); // Exactly one of these must be non-null.
System\Reflection\TypeLoading\Assemblies\RoAssembly.Modules.cs (1)
110
Debug.
Assert
(afi.RowIndex != 0); // Since we excluded the manifest module from the search.
System\Reflection\TypeLoading\Constructors\RoDefinitionConstructor.cs (2)
21
Debug.
Assert
(declaringType != null);
51
Debug.
Assert
(ReflectedType == other.ReflectedType);
System\Reflection\TypeLoading\Constructors\RoSyntheticConstructor.cs (1)
23
Debug.
Assert
(declaringType != null);
System\Reflection\TypeLoading\Events\Ecma\EcmaEvent.cs (4)
24
Debug.
Assert
(!handle.IsNil);
25
Debug.
Assert
(declaringType != null);
26
Debug.
Assert
(reflectedType != null);
27
Debug.
Assert
(declaringType.Module is EcmaModule);
System\Reflection\TypeLoading\Events\RoEvent.cs (2)
19
Debug.
Assert
(declaringType != null);
20
Debug.
Assert
(reflectedType != null);
System\Reflection\TypeLoading\Fields\Ecma\EcmaField.cs (4)
23
Debug.
Assert
(!handle.IsNil);
24
Debug.
Assert
(declaringType != null);
25
Debug.
Assert
(reflectedType != null);
26
Debug.
Assert
(declaringType.Module is EcmaModule);
System\Reflection\TypeLoading\Fields\RoField.cs (2)
21
Debug.
Assert
(declaringType != null);
22
Debug.
Assert
(reflectedType != null);
System\Reflection\TypeLoading\General\Assignability.cs (4)
184
Debug.
Assert
(!(fromTypeInfo.IsArray || fromTypeInfo.IsByRef || fromTypeInfo.IsPointer || fromTypeInfo.IsGenericParameter));
185
Debug.
Assert
(!(toTypeInfo.IsArray || toTypeInfo.IsByRef || toTypeInfo.IsPointer || toTypeInfo.IsGenericParameter));
335
Debug.
Assert
(fromTypeInfo.IsArray);
336
Debug.
Assert
(toTypeInfo.IsInterface);
System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs (10)
16
Debug.
Assert
(!handle.IsNil);
17
Debug.
Assert
(module != null);
30
Debug.
Assert
(!handle.IsNil);
31
Debug.
Assert
(module != null);
41
Debug.
Assert
(!handle.IsNil);
42
Debug.
Assert
(module != null);
120
Debug.
Assert
(!handle.IsNil);
121
Debug.
Assert
(module != null);
128
Debug.
Assert
(!handle.IsNil);
129
Debug.
Assert
(module != null);
System\Reflection\TypeLoading\General\Ecma\EcmaToStringHelpers.cs (2)
21
Debug.
Assert
(!handle.IsNil);
22
Debug.
Assert
(reader != null);
System\Reflection\TypeLoading\General\Ecma\GuardedPEReader.cs (3)
29
Debug.
Assert
(loader != null);
30
Debug.
Assert
(peReader != null);
31
Debug.
Assert
(reader != null);
System\Reflection\TypeLoading\General\Ecma\MetadataTable.cs (2)
31
Debug.
Assert
(!handle.IsNil);
32
Debug.
Assert
(factory != null);
System\Reflection\TypeLoading\General\Helpers.cs (4)
92
Debug.
Assert
(rank == 1 || multiDim);
209
Debug.
Assert
(fullName != null);
233
Debug.
Assert
(name != null);
316
Debug.
Assert
(assembly is RoAssembly);
System\Reflection\TypeLoading\General\MethodSig.cs (3)
25
Debug.
Assert
(parameterCount >= 0);
33
Debug.
Assert
(position >= -1 && position < Parameters.Length);
39
Debug.
Assert
(position >= -1 && position < Parameters.Length);
System\Reflection\TypeLoading\General\RoAssemblyName.cs (2)
38
Debug.
Assert
(name != null);
54
Debug.
Assert
(other is not null);
System\Reflection\TypeLoading\Methods\RoConstructedGenericMethod.cs (2)
21
Debug.
Assert
(genericMethodDefinition != null);
22
Debug.
Assert
(genericMethodArguments != null);
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (2)
19
Debug.
Assert
(reflectedType != null);
39
Debug.
Assert
(declaringType != null);
System\Reflection\TypeLoading\Methods\RoMethod.cs (1)
20
Debug.
Assert
(reflectedType != null);
System\Reflection\TypeLoading\Methods\RoSyntheticMethod.cs (1)
24
Debug.
Assert
(declaringType != null);
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs (4)
28
Debug.
Assert
(assembly != null);
29
Debug.
Assert
(fullyQualifiedName != null);
30
Debug.
Assert
(peReader != null);
31
Debug.
Assert
(reader != null);
System\Reflection\TypeLoading\Modules\GetTypeCoreCache.cs (6)
155
Debug.
Assert
(newNextFreeEntry <= _nextFreeEntry);
177
Debug.
Assert
(_nextFreeEntry >= 0 && _nextFreeEntry <= _entries.Length);
186
Debug.
Assert
(walk1 >= 0 && walk1 < _nextFreeEntry);
187
Debug.
Assert
(walk2 >= -1 && walk2 < _nextFreeEntry);
190
Debug.
Assert
(storedBucket == bucket);
202
Debug.
Assert
(numEntriesEncountered <= _nextFreeEntry);
System\Reflection\TypeLoading\Modules\RoModule.cs (1)
25
Debug.
Assert
(fullyQualifiedName != null);
System\Reflection\TypeLoading\Modules\RoResourceModule.cs (2)
24
Debug.
Assert
(assembly != null);
25
Debug.
Assert
(fullyQualifiedName != null);
System\Reflection\TypeLoading\Parameters\Ecma\EcmaFatMethodParameter.cs (4)
23
Debug.
Assert
(roMethodBase != null);
24
Debug.
Assert
(parameterType != null);
25
Debug.
Assert
(!handle.IsNil);
28
Debug.
Assert
(roMethodBase.MethodBase.Module is EcmaModule);
System\Reflection\TypeLoading\Parameters\RoFatMethodParameter.cs (2)
18
Debug.
Assert
(roMethodBase != null);
19
Debug.
Assert
(parameterType != null);
System\Reflection\TypeLoading\Parameters\RoMethodParameter.cs (2)
19
Debug.
Assert
(roMethodBase != null);
20
Debug.
Assert
(parameterType != null);
System\Reflection\TypeLoading\Parameters\RoParameter.cs (1)
19
Debug.
Assert
(member != null);
System\Reflection\TypeLoading\Parameters\RoPropertyIndexParameter.cs (2)
20
Debug.
Assert
(member != null);
21
Debug.
Assert
(backingParameter != null);
System\Reflection\TypeLoading\Parameters\RoThinMethodParameter.cs (2)
18
Debug.
Assert
(roMethodBase != null);
19
Debug.
Assert
(parameterType != null);
System\Reflection\TypeLoading\Properties\Ecma\EcmaProperty.cs (4)
23
Debug.
Assert
(!handle.IsNil);
24
Debug.
Assert
(declaringType != null);
25
Debug.
Assert
(reflectedType != null);
26
Debug.
Assert
(declaringType.Module is EcmaModule);
System\Reflection\TypeLoading\Properties\RoProperty.cs (2)
20
Debug.
Assert
(declaringType != null);
21
Debug.
Assert
(reflectedType != null);
System\Reflection\TypeLoading\RuntimeTypeInfo.BindingFlags.cs (9)
16
Debug.
Assert
(types != null);
66
Debug.
Assert
(name != null);
72
Debug.
Assert
(genericParameterCount == GenericParameterCountAny);
73
Debug.
Assert
(binder == null);
74
Debug.
Assert
(callConvention == CallingConventions.Any);
75
Debug.
Assert
(modifiers == null);
110
Debug.
Assert
(name != null);
116
Debug.
Assert
(binder == null);
117
Debug.
Assert
(modifiers == null);
System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs (1)
89
Debug.
Assert
(numCopied == numMatches);
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.cs (2)
21
Debug.
Assert
(module != null);
22
Debug.
Assert
(!handle.IsNil);
System\Reflection\TypeLoading\Types\Ecma\EcmaGenericMethodParameterType.cs (1)
17
Debug.
Assert
(!handle.IsNil);
System\Reflection\TypeLoading\Types\Ecma\EcmaGenericParameterType.cs (1)
20
Debug.
Assert
(!handle.IsNil);
System\Reflection\TypeLoading\Types\RoArrayType.cs (2)
20
Debug.
Assert
(elementType != null);
21
Debug.
Assert
(multiDim || rank == 1);
System\Reflection\TypeLoading\Types\RoArrayType.Key.cs (1)
18
Debug.
Assert
(elementType != null);
System\Reflection\TypeLoading\Types\RoByRefType.cs (1)
17
Debug.
Assert
(elementType != null);
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (2)
23
Debug.
Assert
(genericTypeDefinition != null);
24
Debug.
Assert
(genericTypeArguments != null);
System\Reflection\TypeLoading\Types\RoConstructedGenericType.Key.cs (2)
15
Debug.
Assert
(genericTypeDefinition != null);
16
Debug.
Assert
(genericTypeArguments != null);
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (3)
38
Debug.
Assert
(!IsConstructedGenericType);
39
Debug.
Assert
(!IsGenericParameter);
40
Debug.
Assert
(!HasElementType);
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (1)
32
Debug.
Assert
(module != null);
System\Reflection\TypeLoading\Types\RoHasElementType.cs (1)
21
Debug.
Assert
(elementType != null);
System\Reflection\TypeLoading\Types\RoModifiedFunctionPointerType.cs (1)
23
Debug.
Assert
(functionPointerType.IsFunctionPointer);
System\Reflection\TypeLoading\Types\RoModifiedGenericType.cs (1)
18
Debug.
Assert
(genericType.IsGenericType);
System\Reflection\TypeLoading\Types\RoModifiedHasElementType.cs (1)
18
Debug.
Assert
(unmodifiedType.HasElementType);
System\Reflection\TypeLoading\Types\RoModifiedType.cs (2)
60
Debug.
Assert
(_requiredModifiers == null);
67
Debug.
Assert
(_optionalModifiers == null);
System\Reflection\TypeLoading\Types\RoPointerType.cs (1)
17
Debug.
Assert
(elementType != null);
System\Reflection\TypeLoading\Types\RoWrappedType.cs (1)
16
Debug.
Assert
(unmodifiedType != null);
System.Resources.Extensions (15)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
152
Debug.
Assert
(_resourceList != null);
517
Debug.
Assert
(writer != null);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (10)
340
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
541
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
561
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
623
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
643
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
781
Debug.
Assert
(!Monitor.IsEntered(this)); // only called during init
804
Debug.
Assert
(!Monitor.IsEntered(this)); // only called during init
993
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
1033
Debug.
Assert
(Monitor.IsEntered(this)); // uses _store
1117
Debug.
Assert
(!Monitor.IsEntered(_reader));
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (1)
288
Debug.
Assert
(!Monitor.IsEntered(reader));
System\Resources\Extensions\PreserializedResourceWriter.cs (2)
109
Debug.
Assert
(primitiveValue.GetType() == primitiveType);
230
Debug.
Assert
(record != null);
System.Resources.Writer (3)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
152
Debug.
Assert
(_resourceList != null);
517
Debug.
Assert
(writer != null);
System\Resources\ResourceWriter.core.cs (1)
51
Debug.
Assert
(data != null);
System.Runtime.Caching (5)
System\Runtime\Caching\CacheExpires.cs (2)
594
Debug.
Assert
(cacheEntry == entries[entryIndex]._cacheEntry);
775
Debug.
Assert
(NUMBUCKETS < byte.MaxValue);
System\Runtime\Caching\CacheMemoryMonitor.cs (1)
173
Debug.
Assert
(SAMPLE_COUNT == 2);
System\Runtime\Caching\MemoryCacheKeyEqualityComparer.cs (2)
13
Debug.
Assert
(x != null && x is MemoryCacheKey);
14
Debug.
Assert
(y != null && y is MemoryCacheKey);
System.Runtime.InteropServices (3)
System\Runtime\InteropServices\Marshalling\ComObject.cs (3)
45
Debug.
Assert
(Marshal.IsComObject(_runtimeCallableWrapper));
142
Debug.
Assert
(found);
163
Debug.
Assert
(_runtimeCallableWrapper != null);
System.Runtime.Numerics (223)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Number.Formatting.Common.cs (11)
144
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
281
Debug.
Assert
(format is 'G' or 'g');
293
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
716
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
750
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
865
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
886
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
913
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
935
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
959
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
1013
Debug.
Assert
(sizeof(TChar) == sizeof(char) || sizeof(TChar) == sizeof(byte));
src\libraries\Common\src\System\Number.NumberBuffer.cs (3)
38
Debug.
Assert
(digits != null);
46
Debug.
Assert
(!digits.IsEmpty);
67
Debug.
Assert
((Kind == NumberBufferKind.Integer) || (Kind == NumberBufferKind.Decimal) || (Kind == NumberBufferKind.FloatingPoint));
src\libraries\Common\src\System\Number.Parsing.Common.cs (11)
16
Debug.
Assert
(str != null);
17
Debug.
Assert
(strEnd != null);
18
Debug.
Assert
(str <= strEnd);
19
Debug.
Assert
((styles & (NumberStyles.AllowHexSpecifier | NumberStyles.AllowBinarySpecifier)) == 0);
28
Debug.
Assert
(number.DigitsCount == 0);
29
Debug.
Assert
(number.Scale == 0);
30
Debug.
Assert
(!number.IsNegative);
31
Debug.
Assert
(!number.HasNonZeroTail);
228
Debug.
Assert
(numberOfTrailingZeros >= 0);
283
Debug.
Assert
(info != null);
339
Debug.
Assert
((p != null) && (pEnd != null) && (p <= pEnd));
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\FormattingHelpers.CountDigits.cs (2)
25
Debug.
Assert
(log2ToPow10.Length == 64);
55
Debug.
Assert
((index + 1) <= powersOf10.Length);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (5)
28
Debug.
Assert
(value >= 0);
29
Debug.
Assert
(value <= _span.Length);
38
Debug.
Assert
(index < _pos);
106
Debug.
Assert
(length >= 0);
134
Debug.
Assert
(_pos == _span.Length);
System\Number.BigInteger.cs (21)
273
Debug.
Assert
(leading != 0);
455
Debug.
Assert
(char.IsDigit(digitChar));
468
Debug.
Assert
(0 <= remainingIntDigitCount);
485
Debug.
Assert
(currentBlock == 0);
486
Debug.
Assert
(bufferIndex == -1);
511
Debug.
Assert
(blockSize == lowerLen);
512
Debug.
Assert
(blockSize == multiplier.Length);
513
Debug.
Assert
(multiplier.Length == lowerLen);
568
Debug.
Assert
(buffer.Length == currentBufferSize || buffer[currentBufferSize] == 0);
663
Debug.
Assert
(format == 'x' || format == 'X');
672
Debug.
Assert
(success);
753
Debug.
Assert
(success);
757
Debug.
Assert
(!bytes.IsEmpty);
766
Debug.
Assert
(arrayToReturnToPool is not null);
774
Debug.
Assert
(digits < Array.MaxLength);
813
Debug.
Assert
(sb.Length == charsIncludeDigits);
862
Debug.
Assert
(formatString == null || formatString.Length == formatSpan.Length);
889
Debug.
Assert
(formatString != null);
901
Debug.
Assert
((long)BigInteger.MaxLength * (kcchBase + 1) / kcchBase + 1 < (long)int.MaxValue); // won't overflow
915
Debug.
Assert
(base1E9Buffer[iuDst] < kuBase);
1078
Debug.
Assert
(destination.Length * TParser.DigitsPerBlock == input.Length);
System\Number.Polyfill.cs (11)
84
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
92
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
100
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
108
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
116
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
124
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
132
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
140
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
148
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
156
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
164
Debug.
Assert
(typeof(TChar) == typeof(Utf16Char));
System\Numerics\BigInteger.cs (44)
162
Debug.
Assert
(sign == +1 || sign == -1);
170
Debug.
Assert
(man < (1UL << 53));
171
Debug.
Assert
(exp <= 0 || man >= (1UL << 52));
200
Debug.
Assert
(0 <= cbit && cbit < kcbitUint);
201
Debug.
Assert
(cu >= 1);
221
Debug.
Assert
(bits.Length == 4 && (bits[3] & DecimalScaleFactorMask) == 0);
759
Debug.
Assert
(dividend._bits != null);
786
Debug.
Assert
(divisor._bits != null);
879
Debug.
Assert
(right._bits != null);
887
Debug.
Assert
(left._bits != null);
893
Debug.
Assert
(left._bits != null && right._bits != null);
907
Debug.
Assert
(BigIntegerCalculator.Compare(leftBits, rightBits) >= 0);
1369
Debug.
Assert
(bits.Length > 0);
1370
Debug.
Assert
(bits[bits.Length - 1] != 0);
1380
Debug.
Assert
(highDword <= uint.MaxValue - 1);
1386
Debug.
Assert
(sign == 1);
1467
Debug.
Assert
(msbIndex >= 0 && msbIndex <= 3);
1486
Debug.
Assert
(isBigEndian || (!needExtraByte && curByte == length - 1) || (needExtraByte && curByte == length - 2));
1488
Debug.
Assert
(!isBigEndian || (!needExtraByte && curByte == 0) || (needExtraByte && curByte == 1));
1507
Debug.
Assert
(_bits is null || _sign == 0 ? buffer.Length == 2 : buffer.Length >= _bits.Length + 1);
1646
Debug.
Assert
(!rightBits.IsEmpty);
1658
Debug.
Assert
(!leftBits.IsEmpty);
1670
Debug.
Assert
(!leftBits.IsEmpty && !rightBits.IsEmpty);
1682
Debug.
Assert
(!leftBits.IsEmpty && !rightBits.IsEmpty);
1724
Debug.
Assert
(!rightBits.IsEmpty);
1736
Debug.
Assert
(!leftBits.IsEmpty);
1758
Debug.
Assert
(!leftBits.IsEmpty && !rightBits.IsEmpty);
2699
Debug.
Assert
(!right.IsEmpty);
2711
Debug.
Assert
(!left.IsEmpty);
2733
Debug.
Assert
(!left.IsEmpty && !right.IsEmpty);
2746
Debug.
Assert
(!left.IsEmpty && !right.IsEmpty);
2788
Debug.
Assert
(dividend._bits != null);
2808
Debug.
Assert
(dividend._bits != null && divisor._bits != null);
2853
Debug.
Assert
(dividend._bits != null);
2858
Debug.
Assert
(dividend._bits != null && divisor._bits != null);
3103
Debug.
Assert
(_bits is null ? xd.Length == 1 : xd.Length == _bits.Length);
3122
Debug.
Assert
(_sign == 1 || _sign == -1);
3124
Debug.
Assert
(_bits.Length > 0);
3126
Debug.
Assert
(_bits.Length > 1 || _bits[0] >= kuMaskHighBit);
3128
Debug.
Assert
(_bits[_bits.Length - 1] != 0);
3130
Debug.
Assert
(_bits.Length <= MaxLength);
3135
Debug.
Assert
(_sign > int.MinValue);
3679
Debug.
Assert
(Unsafe.AreSame(ref startAddress, ref Unsafe.Add(ref address, sizeof(uint))));
3780
Debug.
Assert
(Unsafe.AreSame(ref lastAddress, ref Unsafe.Subtract(ref address, sizeof(uint))));
System\Numerics\BigIntegerCalculator.AddSub.cs (15)
21
Debug.
Assert
(left.Length >= 1);
22
Debug.
Assert
(bits.Length == left.Length + 1);
29
Debug.
Assert
(right.Length >= 1);
30
Debug.
Assert
(left.Length >= right.Length);
31
Debug.
Assert
(bits.Length == left.Length + 1);
61
Debug.
Assert
(left.Length >= right.Length);
87
Debug.
Assert
(carry == 0);
92
Debug.
Assert
(left.Length >= 1);
93
Debug.
Assert
(left[0] >= right || left.Length >= 2);
94
Debug.
Assert
(bits.Length == left.Length);
101
Debug.
Assert
(right.Length >= 1);
102
Debug.
Assert
(left.Length >= right.Length);
103
Debug.
Assert
(Compare(left, right) >= 0);
104
Debug.
Assert
(bits.Length == left.Length);
134
Debug.
Assert
(left.Length >= right.Length);
System\Numerics\BigIntegerCalculator.DivRem.cs (28)
13
Debug.
Assert
(left.Length >= 1);
14
Debug.
Assert
(quotient.Length == left.Length);
34
Debug.
Assert
(left.Length >= 1);
35
Debug.
Assert
(quotient.Length == left.Length);
51
Debug.
Assert
(left.Length >= 1);
66
Debug.
Assert
(left.Length >= 1);
67
Debug.
Assert
(right.Length >= 1);
68
Debug.
Assert
(left.Length >= right.Length);
69
Debug.
Assert
(quotient.Length == left.Length - right.Length + 1);
70
Debug.
Assert
(remainder.Length == left.Length);
78
Debug.
Assert
(left.Length >= 1);
79
Debug.
Assert
(right.Length >= 1);
80
Debug.
Assert
(left.Length >= right.Length);
81
Debug.
Assert
(quotient.Length == left.Length - right.Length + 1);
102
Debug.
Assert
(left.Length >= 1);
103
Debug.
Assert
(right.Length >= 1);
104
Debug.
Assert
(left.Length >= right.Length);
105
Debug.
Assert
(remainder.Length >= left.Length);
115
Debug.
Assert
(left.Length >= 1);
116
Debug.
Assert
(right.Length >= 1);
117
Debug.
Assert
(left.Length >= right.Length);
118
Debug.
Assert
(bits.Length == left.Length - right.Length + 1
177
Debug.
Assert
(carry == t + 1);
183
Debug.
Assert
(carry == 1);
198
Debug.
Assert
(left.Length >= right.Length);
217
Debug.
Assert
(left.Length >= right.Length);
218
Debug.
Assert
(q <= 0xFFFFFFFF);
242
Debug.
Assert
(q <= 0xFFFFFFFF);
System\Numerics\BigIntegerCalculator.FastReducer.cs (9)
25
Debug.
Assert
(!modulus.IsEmpty);
26
Debug.
Assert
(r.Length == modulus.Length * 2 + 1);
27
Debug.
Assert
(mu.Length == r.Length - modulus.Length + 1);
28
Debug.
Assert
(q1.Length == modulus.Length * 2 + 2);
29
Debug.
Assert
(q2.Length == modulus.Length * 2 + 2);
46
Debug.
Assert
(value.Length <= _modulus.Length * 2);
70
Debug.
Assert
(!right.IsEmpty);
71
Debug.
Assert
(!bits.IsEmpty);
72
Debug.
Assert
(bits.Length + k >= left.Length + right.Length);
System\Numerics\BigIntegerCalculator.GcdInv.cs (20)
46
Debug.
Assert
(left.Length >= 1);
47
Debug.
Assert
(right != 0);
59
Debug.
Assert
(left.Length >= 2);
60
Debug.
Assert
(right.Length >= 2);
61
Debug.
Assert
(Compare(left, right) >= 0);
62
Debug.
Assert
(result.Length == left.Length);
80
Debug.
Assert
(left.Length >= 2);
81
Debug.
Assert
(right.Length >= 2);
82
Debug.
Assert
(left.Length >= right.Length);
205
Debug.
Assert
(buffer.Length >= 2);
225
Debug.
Assert
(xBuffer.Length >= 3);
226
Debug.
Assert
(yBuffer.Length >= 3);
227
Debug.
Assert
(xBuffer.Length >= yBuffer.Length);
272
Debug.
Assert
(x >= y);
280
Debug.
Assert
(x.Length >= 1);
281
Debug.
Assert
(y.Length >= 1);
282
Debug.
Assert
(x.Length >= y.Length);
283
Debug.
Assert
(a <= 0x7FFFFFFF && b <= 0x7FFFFFFF);
284
Debug.
Assert
(c <= 0x7FFFFFFF && d <= 0x7FFFFFFF);
306
Debug.
Assert
(bits.Length >= maxLength);
System\Numerics\BigIntegerCalculator.PowMod.cs (11)
23
Debug.
Assert
(bits.Length == PowBound(power, value.Length));
50
Debug.
Assert
(value.Length >= valueLength);
51
Debug.
Assert
(temp.Length == result.Length);
52
Debug.
Assert
(value.Length == temp.Length);
72
Debug.
Assert
(leftLength <= left.Length);
95
Debug.
Assert
(valueLength <= value.Length);
96
Debug.
Assert
(temp.Length >= valueLength + valueLength);
211
Debug.
Assert
(!modulus.IsEmpty);
212
Debug.
Assert
(bits.Length == modulus.Length + modulus.Length);
260
Debug.
Assert
(!modulus.IsEmpty);
261
Debug.
Assert
(bits.Length == modulus.Length + modulus.Length);
System\Numerics\BigIntegerCalculator.SquMul.cs (18)
23
Debug.
Assert
(bits.Length == value.Length + value.Length);
133
Debug.
Assert
(bits.Length == left.Length + 1);
161
Debug.
Assert
(left.Length >= right.Length);
162
Debug.
Assert
(bits.Length >= left.Length + right.Length);
163
Debug.
Assert
(bits.Trim(0u).IsEmpty);
164
Debug.
Assert
(MultiplyKaratsubaThreshold >= 2);
214
Debug.
Assert
(leftLow.Length >= leftHigh.Length);
249
Debug.
Assert
(left.Length >= right.Length);
250
Debug.
Assert
(2 * n - left.Length is 0 or 1);
251
Debug.
Assert
(right.Length > n);
252
Debug.
Assert
(bits.Length >= left.Length + right.Length);
272
Debug.
Assert
(leftLow.Length >= leftHigh.Length);
273
Debug.
Assert
(rightLow.Length >= rightHigh.Length);
274
Debug.
Assert
(bitsLow.Length >= bitsHigh.Length);
320
Debug.
Assert
(ActualLength(core) <= left.Length + 1);
333
Debug.
Assert
(right.Length < MultiplyKaratsubaThreshold);
364
Debug.
Assert
(left.Length >= right.Length);
365
Debug.
Assert
(core.Length >= left.Length);
System\Numerics\BigIntegerCalculator.Utils.cs (2)
20
Debug.
Assert
(left.Length <= right.Length || left.Slice(right.Length).ContainsAnyExcept(0u));
21
Debug.
Assert
(left.Length >= right.Length || right.Slice(left.Length).ContainsAnyExcept(0u));
System\Numerics\Complex.cs (4)
338
Debug.
Assert
((x >= 0.0) || double.IsNaN(x));
577
Debug.
Assert
((x >= 0.0) || double.IsNaN(x));
578
Debug.
Assert
((y >= 0.0) || double.IsNaN(y));
2237
Debug.
Assert
(typeof(TChar) == typeof(char) || typeof(TChar) == typeof(byte));
System\Numerics\NumericsHelpers.cs (2)
59
Debug.
Assert
((man & 0xFFF0000000000000) == 0x0010000000000000);
82
Debug.
Assert
(bits != 0);
System.Runtime.Serialization.Formatters (98)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (2)
103
Debug.
Assert
(divisor <= int.MaxValue);
109
Debug.
Assert
(highbits == value % divisor);
System\Runtime\Serialization\Formatters\Binary\BinaryArray.cs (2)
58
Debug.
Assert
(_lengthA != null);
90
Debug.
Assert
(_lowerBoundA != null);
System\Runtime\Serialization\Formatters\Binary\BinaryAssembly.cs (1)
25
Debug.
Assert
(_assemblyString != null);
System\Runtime\Serialization\Formatters\Binary\BinaryFormatterEventSource.cs (2)
47
Debug.
Assert
(type != null);
82
Debug.
Assert
(type != null);
System\Runtime\Serialization\Formatters\Binary\BinaryFormatterWriter.cs (2)
120
Debug.
Assert
(typeNameInfo != null); // Explicitly called with null. Potential bug, but closed as Won't Fix: https://github.com/dotnet/runtime/issues/31402
127
Debug.
Assert
(objectName != null);
System\Runtime\Serialization\Formatters\Binary\BinaryObjectInfo.cs (13)
46
Debug.
Assert
(_serObjectInfoInit != null);
189
Debug.
Assert
(_si != null);
241
Debug.
Assert
(_serObjectInfoInit != null && _objectType != null);
251
Debug.
Assert
(_serObjectInfoInit != null && _objectType != null);
550
Debug.
Assert
(si != null);
559
Debug.
Assert
(memberData != null);
571
Debug.
Assert
(_objectType != null);
579
Debug.
Assert
(_cache._memberNames != null);
607
Debug.
Assert
(_cache != null && _cache._memberInfos != null);
618
Debug.
Assert
(_cache != null && _cache._memberInfos != null);
631
Debug.
Assert
(_cache._memberNames != null);
670
Debug.
Assert
(_cache._memberInfos != null);
714
Debug.
Assert
(_cache._memberNames != null);
System\Runtime\Serialization\Formatters\Binary\BinaryObjectReader.cs (30)
116
Debug.
Assert
(_objectManager != null);
156
Debug.
Assert
(_crossAppDomainArray != null);
285
Debug.
Assert
(_objectManager != null);
307
Debug.
Assert
(_stack != null);
339
Debug.
Assert
(objectPr._objectInfo != null);
351
Debug.
Assert
(fixup != null && parentPr != null);
368
Debug.
Assert
(_stack != null);
371
Debug.
Assert
(pr._value != null);
406
Debug.
Assert
(pr._lengthA != null);
442
Debug.
Assert
(pr._newObj != null);
472
Debug.
Assert
(pr._lengthA != null);
475
Debug.
Assert
(pr._lowerBoundA != null);
500
Debug.
Assert
(pr._rectangularMap != null && pr._lengthA != null && pr._indexMap != null);
535
Debug.
Assert
(_stack != null);
538
Debug.
Assert
(objectPr != null && objectPr._indexMap != null && objectPr._lowerBoundA != null);
548
Debug.
Assert
(objectPr._rectangularMap != null);
568
Debug.
Assert
(_objectManager != null);
588
Debug.
Assert
(objectPr._newObj != null);
606
Debug.
Assert
(objectPr._newObj != null);
637
Debug.
Assert
(objectPr._newObj != null);
666
Debug.
Assert
(objectPr._newObj != null);
675
Debug.
Assert
(pr._value != null);
688
Debug.
Assert
(objectPr._newObj != null);
722
Debug.
Assert
(_stack != null);
734
Debug.
Assert
(objectPr != null && objectPr._objectInfo != null && pr._name != null);
768
Debug.
Assert
(_objectManager != null);
795
Debug.
Assert
(pr._value != null);
848
Debug.
Assert
(_stack != null);
902
Debug.
Assert
(_objectManager != null);
909
Debug.
Assert
(obj != null);
System\Runtime\Serialization\Formatters\Binary\BinaryObjectWithMap.cs (1)
39
Debug.
Assert
(_name != null && _memberNames != null);
System\Runtime\Serialization\Formatters\Binary\BinaryObjectWithMapTyped.cs (1)
46
Debug.
Assert
(_name != null && _memberNames != null && _binaryTypeEnumA != null && _typeInformationA != null && _memberAssemIds != null);
System\Runtime\Serialization\Formatters\Binary\BinaryObjectWriter.cs (18)
121
Debug.
Assert
(_serWriter != null);
146
Debug.
Assert
(memberNames != null && memberTypes != null && memberData != null);
165
Debug.
Assert
(_serObjectInfoInit != null && _formatterConverter != null);
208
Debug.
Assert
(_serWriter != null);
220
Debug.
Assert
(memberNameInfo != null);
358
Debug.
Assert
(_serWriter != null);
380
Debug.
Assert
(memberObjectInfo != null);
424
Debug.
Assert
(_serObjectInfoInit != null && _formatterConverter != null);
469
Debug.
Assert
(_serWriter != null);
633
Debug.
Assert
(_serObjectInfoInit != null && _formatterConverter != null);
647
Debug.
Assert
(_serWriter != null);
738
Debug.
Assert
(realObj != null);
759
Debug.
Assert
(_idGenerator != null);
794
Debug.
Assert
(_objectQueue != null);
816
Debug.
Assert
(_serWriter != null);
851
Debug.
Assert
(_serWriter != null);
873
Debug.
Assert
(_serWriter != null);
999
Debug.
Assert
(_serWriter != null);
System\Runtime\Serialization\Formatters\Binary\BinaryParser.cs (9)
449
Debug.
Assert
(record._name != null && record._memberNames != null);
452
Debug.
Assert
(objectType != null);
552
Debug.
Assert
(record._name != null && record._memberNames != null && record._binaryTypeEnumA != null && record._typeInformationA != null && record._memberAssemIds != null);
813
Debug.
Assert
(record._lengthA != null);
820
Debug.
Assert
(record._lowerBoundA != null);
865
Debug.
Assert
(pr._lengthA != null);
926
Debug.
Assert
(objectOp != null);
954
Debug.
Assert
(objectOp != null);
982
Debug.
Assert
(objectOp != null);
System\Runtime\Serialization\Formatters\Binary\BinaryTypeConverter.cs (1)
59
Debug.
Assert
(assembly != null);
System\Runtime\Serialization\Formatters\Binary\BinaryUtilClasses.cs (2)
410
Debug.
Assert
(_objectInfo!._objectManager != null);
478
Debug.
Assert
(_type != null);
System\Runtime\Serialization\Formatters\Binary\ObjectProgress.cs (1)
110
Debug.
Assert
(_binaryTypeEnumA != null && _typeInformationA != null && _memberNames != null && _memberTypes != null);
System\Runtime\Serialization\FormatterServices.cs (4)
27
Debug.
Assert
(type != null);
205
Debug.
Assert
(fi != null);
344
Debug.
Assert
(rank >= 1);
378
Debug.
Assert
(innerSurrogate != null);
System\Runtime\Serialization\ObjectManager.cs (5)
181
Debug.
Assert
(holder.SerializationInfo != null);
243
Debug.
Assert
(holder.ObjectValue != null);
313
Debug.
Assert
(tempHolder != null);
443
Debug.
Assert
(holderValue != null);
596
Debug.
Assert
(temp != null);
System\Runtime\Serialization\SerializationFieldInfo.cs (2)
17
Debug.
Assert
(field != null);
18
Debug.
Assert
(namePrefix != null);
System\Runtime\Serialization\SurrogateSelector.cs (2)
122
Debug.
Assert
(tempPrev != null);
182
Debug.
Assert
(type != null);
System.Security.Cryptography (448)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
69
Debug.
Assert
(passwd.Name != null);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Dsa.cs (4)
46
Debug.
Assert
(size * 2 < DsaEncodedSignatureSize(dsa));
181
Debug.
Assert
(i >= 0);
194
Debug.
Assert
(value1 >= 0);
195
Debug.
Assert
(value2 >= 0);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Encode.cs (2)
43
Debug.
Assert
(size == size2);
79
Debug.
Assert
(size == size2);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Mac.cs (6)
80
Debug.
Assert
(ret == 0);
92
Debug.
Assert
(ret == 0);
104
Debug.
Assert
(ret == 0);
133
Debug.
Assert
(ret == 0);
145
Debug.
Assert
(ret == 0);
157
Debug.
Assert
(ret == 0);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.MacAlgs.cs (1)
38
Debug.
Assert
(mac.IsInvalid);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (6)
154
Debug.
Assert
(written == size);
205
Debug.
Assert
(written == size);
226
Debug.
Assert
(engineName is not null);
227
Debug.
Assert
(keyName is not null);
249
Debug.
Assert
(engineName is not null);
250
Debug.
Assert
(keyName is not null);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Ecdh.cs (2)
28
Debug.
Assert
(ctx != null);
29
Debug.
Assert
(!ctx.IsInvalid);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Rsa.cs (5)
19
Debug.
Assert
(rsa != IntPtr.Zero);
76
Debug.
Assert
(written == -1);
111
Debug.
Assert
(written == -1);
146
Debug.
Assert
(written == -1);
189
Debug.
Assert
(ret == -1);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Hmac.cs (1)
47
Debug.
Assert
(result == 0);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.RAND.cs (1)
13
Debug.
Assert
(count >= 0);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeDsaHandle.Unix.cs (1)
32
Debug.
Assert
(handle != IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEcKeyHandle.Unix.cs (1)
32
Debug.
Assert
(handle != IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (2)
41
Debug.
Assert
(currentHandle.IsInvalid);
51
Debug.
Assert
(handle != null);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
46
Debug.
Assert
(addedRef);
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
31
Debug.
Assert
(task.IsCompletedSuccessfully);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (2)
27
Debug.
Assert
(MacData.HasValue);
67
Debug.
Assert
(expectedOutputSize <= 64); // SHA512 is the largest digest size we know about
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (3)
17
Debug.
Assert
(arraySegment.Array != null);
18
Debug.
Assert
(arraySegment.Offset == 0);
25
Debug.
Assert
(clearSize <= array.Length);
src\libraries\Common\src\System\Security\Cryptography\DSAOpenSsl.cs (1)
246
Debug.
Assert
(bytesWritten == p1363SignatureSize);
src\libraries\Common\src\System\Security\Cryptography\EccKeyFormatHelper.cs (7)
167
Debug.
Assert
((x == null) == (y == null));
538
Debug.
Assert
(oid.FriendlyName != null);
546
Debug.
Assert
(ecParameters.Curve.IsPrime || ecParameters.Curve.IsCharacteristic2);
588
Debug.
Assert
(ecParameters.Curve.IsCharacteristic2);
614
Debug.
Assert
(k2 < 0);
615
Debug.
Assert
(k1 > 0);
853
Debug.
Assert
(ecParameters.Q.Y != null);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (9)
23
Debug.
Assert
(otherPartyPublicKey != null);
24
Debug.
Assert
(!string.IsNullOrEmpty(hashAlgorithm.Name));
32
Debug.
Assert
(secretAgreement == null);
48
Debug.
Assert
(otherPartyPublicKey != null);
49
Debug.
Assert
(!string.IsNullOrEmpty(hashAlgorithm.Name));
63
Debug.
Assert
(hmacKey != null);
82
Debug.
Assert
(secretAgreement == null);
106
Debug.
Assert
(otherPartyPublicKey != null);
120
Debug.
Assert
(secretAgreement != null);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (3)
79
Debug.
Assert
(secretAgreement is not null);
88
Debug.
Assert
(otherPartyPublicKey != null);
89
Debug.
Assert
(_key is not null); // Callers should validate prior.
src\libraries\Common\src\System\Security\Cryptography\ECDsaOpenSsl.cs (1)
132
Debug.
Assert
(bytesWritten == encodedSize);
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (3)
109
Debug.
Assert
(parameters.Curve.IsNamed);
126
Debug.
Assert
(parameters.Curve.IsPrime);
146
Debug.
Assert
(parameters.Curve.IsCharacteristic2);
src\libraries\Common\src\System\Security\Cryptography\KeyBlobHelpers.cs (1)
71
Debug.
Assert
(!integer.IsEmpty);
src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (2)
82
Debug.
Assert
(oidValue != null);
163
Debug.
Assert
(oid is not null);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (15)
29
Debug.
Assert
(pbeParameters != null);
32
Debug.
Assert
(pbeParameters.IterationCount > 0);
75
Debug.
Assert
(destination.Length >= encryptedData.Length);
148
Debug.
Assert
(digestAlgorithmName.Name != null);
149
Debug.
Assert
(cipher != null);
201
Debug.
Assert
(written == buf.Length);
238
Debug.
Assert
(pbeParameters != null);
305
Debug.
Assert
(hmacOid == Oids.HmacWithSha1 || !isPkcs12);
353
Debug.
Assert
(password.Length > 0 || passwordBytes.IsEmpty);
354
Debug.
Assert
(pbeParameters.HashAlgorithm == HashAlgorithmName.SHA1);
378
Debug.
Assert
(pwdTmpBytes!.Length == passwordBytes.Length);
393
Debug.
Assert
(pwdTmpBytes!.Length == 0);
411
Debug.
Assert
(encryptor.CanTransformMultipleBlocks);
491
Debug.
Assert
(written == buf.Length);
945
Debug.
Assert
(decryptor.CanTransformMultipleBlocks);
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (5)
86
Debug.
Assert
(iterationCount >= 1);
104
Debug.
Assert
(v <= 1024);
239
Debug.
Assert
(into.Length == addend.Length);
253
Debug.
Assert
(bytes.Length > 0);
274
Debug.
Assert
(destination.Length % 2 == 0);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (1)
210
Debug.
Assert
(copyFrom == null || pkcs1PrivateKey.IsEmpty);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (19)
175
Debug.
Assert
(!key.IsInvalid);
194
Debug.
Assert
(padding.OaepHashAlgorithm.Name != null);
261
Debug.
Assert
(padding.OaepHashAlgorithm.Name != null);
272
Debug.
Assert
(written == rsaSize);
390
Debug.
Assert
(read == spki.Length);
401
Debug.
Assert
(read == spki.Length);
444
Debug.
Assert
(read == spki.Length);
548
Debug.
Assert
(!newKey.IsInvalid);
595
Debug.
Assert
(!newKey.IsInvalid);
658
Debug.
Assert
(!newKey.IsInvalid);
747
Debug.
Assert
(signature != null);
770
Debug.
Assert
(alloced == null);
783
Debug.
Assert
(!string.IsNullOrEmpty(hashAlgorithm.Name));
784
Debug.
Assert
(padding != null);
795
Debug.
Assert
(destination.Length == 0);
806
Debug.
Assert
(written == bytesRequired);
850
Debug.
Assert
(read == pkcs8.Length);
903
Debug.
Assert
(padding == RSASignaturePadding.Pkcs1);
907
Debug.
Assert
(padding == RSASignaturePadding.Pss);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (9)
182
Debug.
Assert
(source.Length > 11);
206
Debug.
Assert
(lenIfBad < 0);
234
Debug.
Assert
((selector | (selector - 1)) == -1);
321
Debug.
Assert
(hasher.HashLengthInBytes == hLen);
425
Debug.
Assert
(hasher.HashLengthInBytes == hLen);
484
Debug.
Assert
(em.Length >= emLen);
524
Debug.
Assert
(hasher.HashLengthInBytes == hLen);
606
Debug.
Assert
(bytesWritten == hLen);
619
Debug.
Assert
(bytesWritten == hLen);
src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdfImplementationManaged.cs (1)
81
Debug.
Assert
(current > 0);
src\libraries\Common\src\System\Text\UrlBase64Encoding.cs (2)
26
Debug.
Assert
(charsWritten == base64Len);
65
Debug.
Assert
(source[0] == '=');
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
101
Debug.
Assert
(passwd.HomeDirectory != null);
System\Security\Cryptography\AesCcm.OpenSsl.cs (1)
22
Debug.
Assert
(_keyBox is null);
System\Security\Cryptography\AesGcm.cs (1)
160
Debug.
Assert
(tagSizeInBytes.IsLegalSize(TagByteSizes));
System\Security\Cryptography\AsnFormatter.cs (2)
21
Debug.
Assert
(sArray != null && sArray.Length != 0);
41
Debug.
Assert
(j == hexOrder.Length);
System\Security\Cryptography\AsymmetricAlgorithmHelpers.Der.cs (4)
35
Debug.
Assert
(input.Length % 2 == 0);
36
Debug.
Assert
(input.Length > 1);
68
Debug.
Assert
(destination.Length >= encodedSize);
127
Debug.
Assert
(payloadLength >= 0);
System\Security\Cryptography\AsymmetricSignatureDeformatter.cs (1)
20
Debug.
Assert
(hash.Hash != null);
System\Security\Cryptography\AsymmetricSignatureFormatter.cs (1)
20
Debug.
Assert
(hash.Hash != null);
System\Security\Cryptography\Base64Transforms.cs (11)
53
Debug.
Assert
(status == OperationStatus.Done);
54
Debug.
Assert
(consumed == input.Length);
55
Debug.
Assert
(written == output.Length);
78
Debug.
Assert
(written == output.Length);
79
Debug.
Assert
(status == OperationStatus.Done);
80
Debug.
Assert
(consumed == inputCount);
226
Debug.
Assert
(written == outputSize);
295
Debug.
Assert
(bytesToTransform >= 4);
300
Debug.
Assert
(_inputIndex < _inputBuffer.Length);
308
Debug.
Assert
(consumed == bytesToTransform);
312
Debug.
Assert
(status == OperationStatus.InvalidData);
System\Security\Cryptography\CapiHelper.DSA.Shared.cs (3)
132
Debug.
Assert
(dsaParameters.Y != null);
162
Debug.
Assert
(cspPublicBlob == null);
299
Debug.
Assert
(dsaParameters.Y.Length > 0);
System\Security\Cryptography\CngAlgorithm.cs (3)
57
Debug.
Assert
(_algorithm != null);
74
Debug.
Assert
(_algorithm != null);
80
Debug.
Assert
(_algorithm != null);
System\Security\Cryptography\CngAlgorithmGroup.cs (3)
58
Debug.
Assert
(_algorithmGroup != null);
75
Debug.
Assert
(_algorithmGroup != null);
81
Debug.
Assert
(_algorithmGroup != null);
System\Security\Cryptography\CngKeyBlobFormat.cs (3)
58
Debug.
Assert
(_format != null);
75
Debug.
Assert
(_format != null);
81
Debug.
Assert
(_format != null);
System\Security\Cryptography\CngProvider.cs (3)
55
Debug.
Assert
(_provider != null);
72
Debug.
Assert
(_provider != null);
78
Debug.
Assert
(_provider != null);
System\Security\Cryptography\CryptoConfig.cs (3)
96
Debug.
Assert
(ht.Count <= capacity); // if more entries are added in the future, increase initial capacity.
274
Debug.
Assert
(ht.Count <= capacity); // // if more entries are added in the future, increase initial capacity.
588
Debug.
Assert
(encodedOidNumsIndex == encodedOidNumsLength);
System\Security\Cryptography\CryptographicOperations.cs (17)
119
Debug.
Assert
(hashAlgorithm.Name is not null);
123
Debug.
Assert
(written == hashSizeInBytes);
188
Debug.
Assert
(hashAlgorithm.Name is not null);
197
Debug.
Assert
(bytesWritten == hashSizeInBytes);
230
Debug.
Assert
(hashAlgorithm.Name is not null);
266
Debug.
Assert
(hashAlgorithm.Name is not null);
270
Debug.
Assert
(written == hashSizeInBytes);
316
Debug.
Assert
(hashAlgorithm.Name is not null);
364
Debug.
Assert
(hashAlgorithm.Name is not null);
423
Debug.
Assert
(hashAlgorithm.Name is not null);
427
Debug.
Assert
(written == hashSizeInBytes);
503
Debug.
Assert
(hashAlgorithm.Name is not null);
512
Debug.
Assert
(bytesWritten == hashSizeInBytes);
578
Debug.
Assert
(hashAlgorithm.Name is not null);
616
Debug.
Assert
(hashAlgorithm.Name is not null);
708
Debug.
Assert
(hashAlgorithm.Name is not null);
754
Debug.
Assert
(hashAlgorithm.Name is not null);
System\Security\Cryptography\CryptoStream.cs (9)
265
Debug.
Assert
(_outputBuffer != null);
296
Debug.
Assert
(completedValueTask.IsCompleted);
328
Debug.
Assert
(_outputBufferIndex == 0);
331
Debug.
Assert
(_inputBufferIndex == 0);
543
Debug.
Assert
(_inputBuffer != null);
569
Debug.
Assert
(_inputBuffer != null && _outputBuffer != null);
624
Debug.
Assert
(_outputBuffer != null);
639
Debug.
Assert
(_inputBuffer != null);
654
Debug.
Assert
(segment.Array is not null);
System\Security\Cryptography\DSA.cs (1)
883
Debug.
Assert
(tmp.Length == HashBufferStackSize);
System\Security\Cryptography\DSA.Xml.cs (1)
106
Debug.
Assert
(keyParameters.P != null);
System\Security\Cryptography\DSAWrapper.cs (1)
16
Debug.
Assert
(wrapped != null);
System\Security\Cryptography\ECCurve.cs (1)
242
Debug.
Assert
(CurveType == ECCurveType.Implicit);
System\Security\Cryptography\ECDiffieHellmanWrapper.cs (2)
14
Debug.
Assert
(wrapped != null);
179
Debug.
Assert
(wrapped != null);
System\Security\Cryptography\ECDsa.cs (1)
1203
Debug.
Assert
(tmp.Length == HashBufferStackSize);
System\Security\Cryptography\ECDsaWrapper.cs (1)
16
Debug.
Assert
(wrapped != null);
System\Security\Cryptography\HashProvider.cs (1)
44
Debug.
Assert
(written == HashSizeInBytes);
System\Security\Cryptography\HashProviderDispenser.OpenSsl.cs (3)
41
Debug.
Assert
(macHandle is not null);
48
Debug.
Assert
(evpType != IntPtr.Zero);
55
Debug.
Assert
(ret == 0);
System\Security\Cryptography\HashProviderDispenser.Unix.cs (5)
41
Debug.
Assert
(evpType != IntPtr.Zero);
52
Debug.
Assert
(written == hashSize);
59
Debug.
Assert
(evpType != IntPtr.Zero);
75
Debug.
Assert
(ret == 0);
79
Debug.
Assert
(length == hashSize);
System\Security\Cryptography\HKDF.cs (2)
68
Debug.
Assert
(HashLength(hashAlgorithmName) == hashLength);
129
Debug.
Assert
(HashLength(hashAlgorithmName) == hashLength);
System\Security\Cryptography\HMACCommon.cs (5)
30
Debug.
Assert
(!string.IsNullOrEmpty(hashAlgorithmId));
31
Debug.
Assert
(blockSize > 0 || blockSize == -1);
72
Debug.
Assert
(SHA3_256.IsSupported);
76
Debug.
Assert
(SHA3_384.IsSupported);
80
Debug.
Assert
(SHA3_512.IsSupported);
System\Security\Cryptography\HMACMD5.cs (3)
48
Debug.
Assert
(HashSizeValue == HashSizeInBits);
109
Debug.
Assert
(written == buffer.Length);
159
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\HMACSHA1.cs (3)
47
Debug.
Assert
(HashSizeValue == HashSizeInBits);
113
Debug.
Assert
(written == buffer.Length);
161
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\HMACSHA256.cs (3)
46
Debug.
Assert
(HashSizeValue == HashSizeInBits);
105
Debug.
Assert
(written == buffer.Length);
153
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\HMACSHA3_256.cs (3)
68
Debug.
Assert
(HashSizeValue == _hMacCommon.HashSizeInBits);
141
Debug.
Assert
(written == buffer.Length);
191
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\HMACSHA3_384.cs (3)
68
Debug.
Assert
(HashSizeValue == _hMacCommon.HashSizeInBits);
141
Debug.
Assert
(written == buffer.Length);
191
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\HMACSHA3_512.cs (3)
68
Debug.
Assert
(HashSizeValue == _hMacCommon.HashSizeInBits);
141
Debug.
Assert
(written == buffer.Length);
191
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\HMACSHA384.cs (3)
45
Debug.
Assert
(HashSizeValue == HashSizeInBits);
122
Debug.
Assert
(written == buffer.Length);
170
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\HMACSHA512.cs (2)
119
Debug.
Assert
(written == buffer.Length);
167
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\IncrementalHash.cs (14)
30
Debug.
Assert
(!string.IsNullOrEmpty(name.Name));
31
Debug.
Assert
(hash != null);
40
Debug.
Assert
(!string.IsNullOrEmpty(name.Name));
41
Debug.
Assert
(hmac != null);
104
Debug.
Assert
((_hash != null) ^ (_hmac != null));
129
Debug.
Assert
(written == HashLengthInBytes);
176
Debug.
Assert
(destination.Length >= HashLengthInBytes);
178
Debug.
Assert
((_hash != null) ^ (_hmac != null));
201
Debug.
Assert
(written == HashLengthInBytes);
266
Debug.
Assert
(destination.Length >= HashLengthInBytes);
268
Debug.
Assert
((_hash != null) ^ (_hmac != null));
380
Debug.
Assert
(!HMACSHA3_256.IsSupported);
383
Debug.
Assert
(!HMACSHA3_384.IsSupported);
386
Debug.
Assert
(!HMACSHA3_512.IsSupported);
System\Security\Cryptography\Kmac128.cs (4)
107
Debug.
Assert
(written == outputLength);
125
Debug.
Assert
(written == destination.Length);
148
Debug.
Assert
(written == outputLength);
165
Debug.
Assert
(written == destination.Length);
System\Security\Cryptography\Kmac256.cs (4)
107
Debug.
Assert
(written == outputLength);
125
Debug.
Assert
(written == destination.Length);
148
Debug.
Assert
(written == outputLength);
165
Debug.
Assert
(written == destination.Length);
System\Security\Cryptography\KmacXof128.cs (4)
107
Debug.
Assert
(written == outputLength);
125
Debug.
Assert
(written == destination.Length);
148
Debug.
Assert
(written == outputLength);
165
Debug.
Assert
(written == destination.Length);
System\Security\Cryptography\KmacXof256.cs (4)
107
Debug.
Assert
(written == outputLength);
125
Debug.
Assert
(written == destination.Length);
148
Debug.
Assert
(written == outputLength);
165
Debug.
Assert
(written == destination.Length);
System\Security\Cryptography\LiteHash.OpenSsl.cs (1)
40
Debug.
Assert
(!algorithm.IsInvalid);
System\Security\Cryptography\LiteHash.Unix.cs (13)
40
Debug.
Assert
(algorithm != IntPtr.Zero);
102
Debug.
Assert
(result == 0);
118
Debug.
Assert
(algorithm != IntPtr.Zero);
145
Debug.
Assert
(destination.Length >= _hashSizeInBytes);
150
Debug.
Assert
(length == _hashSizeInBytes);
163
Debug.
Assert
(length == _hashSizeInBytes);
178
Debug.
Assert
(result == 0);
193
Debug.
Assert
(algorithm != IntPtr.Zero);
218
Debug.
Assert
(destination.Length >= _hashSizeInBytes);
222
Debug.
Assert
(length == _hashSizeInBytes);
228
Debug.
Assert
(destination.Length >= _hashSizeInBytes);
232
Debug.
Assert
(length == _hashSizeInBytes);
252
Debug.
Assert
(result == 0);
System\Security\Cryptography\LiteHashProvider.cs (3)
24
Debug.
Assert
(written == hashSizeInBytes);
76
Debug.
Assert
(written == hashSizeInBytes);
179
Debug.
Assert
(written == result.Length);
System\Security\Cryptography\LiteHashProvider.Xof.cs (4)
17
Debug.
Assert
(written == destination.Length);
25
Debug.
Assert
(written == outputLength);
39
Debug.
Assert
(written == destination.Length);
53
Debug.
Assert
(written == outputLength);
System\Security\Cryptography\MD5.cs (2)
71
Debug.
Assert
(written == buffer.Length);
117
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\Oid.cs (2)
140
Debug.
Assert
(value != null);
141
Debug.
Assert
(friendlyName != null);
System\Security\Cryptography\OidCollection.cs (1)
21
Debug.
Assert
(initialCapacity >= 0);
System\Security\Cryptography\OpenSslCipher.cs (4)
37
Debug.
Assert
(input.Length > 0);
38
Debug.
Assert
((input.Length % PaddingSizeInBytes) == 0);
44
Debug.
Assert
((input.Length % PaddingSizeInBytes) == 0);
45
Debug.
Assert
(input.Length <= output.Length);
System\Security\Cryptography\OpenSslCipherLite.cs (1)
32
Debug.
Assert
(algorithm != IntPtr.Zero);
System\Security\Cryptography\PasswordDeriveBytes.cs (1)
201
Debug.
Assert
(_hash != null);
System\Security\Cryptography\Pbkdf2Implementation.OpenSsl.cs (2)
17
Debug.
Assert
(!destination.IsEmpty);
18
Debug.
Assert
(hashAlgorithmName.Name is not null);
System\Security\Cryptography\PemEncoding.cs (5)
171
Debug.
Assert
(destination.Length >= size);
181
Debug.
Assert
(startPosition <= str.Length);
391
Debug.
Assert
(encodedSize == charsWritten);
433
Debug.
Assert
(remainingData.Length < BytesPerLine);
487
Debug.
Assert
(charsWritten == encodedSize);
System\Security\Cryptography\PemKeyHelpers.cs (2)
150
Debug.
Assert
(bytesWritten == base64size);
236
Debug.
Assert
(bytesWritten == base64size);
System\Security\Cryptography\PKCS1MaskGenerationMethod.cs (1)
49
Debug.
Assert
(hasher.Hash != null);
System\Security\Cryptography\RandomNumberGenerator.cs (1)
313
Debug.
Assert
(!destination.IsEmpty);
System\Security\Cryptography\RandomNumberGeneratorImplementation.OpenSsl.cs (1)
12
Debug.
Assert
(count > 0);
System\Security\Cryptography\RC2Implementation.cs (5)
78
Debug.
Assert
(EffectiveKeySize == KeySize);
91
Debug.
Assert
(EffectiveKeySize == KeySize);
115
Debug.
Assert
(EffectiveKeySize == KeySize);
140
Debug.
Assert
(EffectiveKeySize == KeySize);
165
Debug.
Assert
(EffectiveKeySize == KeySize);
System\Security\Cryptography\Rfc2898DeriveBytes.cs (4)
182
Debug.
Assert
(_blockSize > 0);
287
Debug.
Assert
(_blockSize == _buffer.Length);
297
Debug.
Assert
(bytesWritten == _blockSize);
305
Debug.
Assert
(bytesWritten == _blockSize);
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (4)
268
Debug.
Assert
(hashAlgorithm.Name is not null);
269
Debug.
Assert
(iterations > 0);
309
Debug.
Assert
(hashAlgorithm.Name is not null);
310
Debug.
Assert
(iterations > 0);
System\Security\Cryptography\RijndaelImplementation.cs (1)
35
Debug.
Assert
(BlockSizeValue == 128);
System\Security\Cryptography\RijndaelManaged.cs (1)
31
Debug.
Assert
(BlockSizeValue == 128);
System\Security\Cryptography\RSAOpenSsl.cs (1)
48
Debug.
Assert
(!pkey.IsInvalid);
System\Security\Cryptography\RSAWrapper.cs (1)
16
Debug.
Assert
(wrapped != null);
System\Security\Cryptography\SHA1.cs (2)
68
Debug.
Assert
(written == buffer.Length);
112
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\SHA256.cs (2)
67
Debug.
Assert
(written == buffer.Length);
112
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\SHA3_256.cs (2)
93
Debug.
Assert
(written == buffer.Length);
145
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\SHA3_384.cs (2)
93
Debug.
Assert
(written == buffer.Length);
146
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\SHA3_512.cs (2)
93
Debug.
Assert
(written == buffer.Length);
145
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\SHA384.cs (2)
67
Debug.
Assert
(written == buffer.Length);
111
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\SHA512.cs (2)
67
Debug.
Assert
(written == buffer.Length);
111
Debug.
Assert
(bytesWritten == HashSizeInBytes);
System\Security\Cryptography\SP800108HmacCounterKdfImplementationManaged.cs (2)
33
Debug.
Assert
(destination.Length <= 0x1FFFFFFF);
68
Debug.
Assert
(hmacBufferWritten > destination.Length);
System\Security\Cryptography\SymmetricPadding.cs (1)
13
Debug.
Assert
(plaintextLength >= 0);
System\Security\Cryptography\TripleDES.cs (4)
81
Debug.
Assert
(start1 >= 0);
82
Debug.
Assert
(start2 >= 0);
83
Debug.
Assert
((start1 + count) <= rgbKey.Length);
84
Debug.
Assert
((start2 + count) <= rgbKey.Length);
System\Security\Cryptography\UniversalCryptoDecryptor.cs (1)
157
Debug.
Assert
(written == buffer.Length);
System\Security\Cryptography\UniversalCryptoEncryptor.cs (3)
35
Debug.
Assert
(!inputBuffer.Overlaps(outputBuffer));
42
Debug.
Assert
(padWritten == transformWritten);
52
Debug.
Assert
(written == buffer.Length);
System\Security\Cryptography\UniversalCryptoOneShot.cs (4)
108
Debug.
Assert
(input.Length > cipher.BlockSizeInBytes);
121
Debug.
Assert
(paddedBlock.Length % cipher.BlockSizeInBytes == 0);
122
Debug.
Assert
(paddedBlock.Length <= MaxInStackDecryptionBuffer);
223
Debug.
Assert
(padWritten == bytesWritten);
System\Security\Cryptography\UniversalCryptoTransform.cs (1)
86
Debug.
Assert
(numBytesWritten >= 0 && numBytesWritten <= inputCount);
System\Security\Cryptography\X509Certificates\CertCollectionLoader.cs (2)
28
Debug.
Assert
(collection != null);
31
Debug.
Assert
(localCerts != null);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
503
Debug.
Assert
(_generator != null);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (1)
31
Debug.
Assert
(revoked != null);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Load.cs (1)
285
Debug.
Assert
(bytesConsumed == bytesWritten);
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (2)
16
Debug.
Assert
(key != null);
100
Debug.
Assert
(ecParameters.Q.X!.Length == ecParameters.Q.Y!.Length);
System\Security\Cryptography\X509Certificates\FindPal.cs (2)
32
Debug.
Assert
(s_keyUsages.Count == NamedKeyUsageFlagsCount);
164
Debug.
Assert
(findValue != null);
System\Security\Cryptography\X509Certificates\ManagedCertificateFinder.cs (2)
298
Debug.
Assert
(written == SHA1.HashSizeInBytes);
348
Debug.
Assert
(!ReferenceEquals(cert, clone));
System\Security\Cryptography\X509Certificates\OpenSslCachedDirectoryStoreProvider.cs (1)
79
Debug.
Assert
(ret != null);
System\Security\Cryptography\X509Certificates\OpenSslCachedSystemStoreProvider.cs (4)
105
Debug.
Assert
(ret != null);
163
Debug.
Assert
(s_rootStoreDirectories is not null);
164
Debug.
Assert
(s_directoryLastWrite is not null);
361
Debug.
Assert
(set.Count == 0);
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (3)
47
Debug.
Assert
(!X509Store.DisallowedStoreName.Equals(storeName, StringComparison.OrdinalIgnoreCase));
75
Debug.
Assert
(collection != null);
331
Debug.
Assert
(storeName != null);
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (1)
58
Debug.
Assert
(alg != null);
System\Security\Cryptography\X509Certificates\OpenSslPkcsFormatReader.cs (1)
224
Debug.
Assert
(readPals != null); // null if single == true
System\Security\Cryptography\X509Certificates\OpenSslSingleCertLoader.cs (2)
26
Debug.
Assert
(collection != null);
29
Debug.
Assert
(localCert != null);
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (7)
36
Debug.
Assert
(cert.Pal != null);
45
Debug.
Assert
(password != null);
67
Debug.
Assert
(openSslException != null);
99
Debug.
Assert
(pal != null);
109
Debug.
Assert
(bioPosition >= 0);
792
Debug.
Assert
(bytes != null);
835
Debug.
Assert
(exported != null);
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (6)
381
Debug.
Assert
(revocationFlag == X509RevocationFlag.EntireChain);
484
Debug.
Assert
(refErrors.HasRevocationUnknown());
520
Debug.
Assert
(chainSize == 1 || revocationFlag != X509RevocationFlag.EndCertificateOnly);
568
Debug.
Assert
(workingChain.LastError <= start - 1);
832
Debug.
Assert
(baseUri.Length > 0);
833
Debug.
Assert
(resource.Length > 0);
System\Security\Cryptography\X509Certificates\OpenSslX509Encoder.cs (1)
106
Debug.
Assert
(bioPosition >= 0);
System\Security\Cryptography\X509Certificates\Pkcs10CertificationRequestInfo.cs (3)
40
Debug.
Assert
(signatureGenerator != null);
41
Debug.
Assert
(Subject != null);
42
Debug.
Assert
(PublicKey != null);
System\Security\Cryptography\X509Certificates\RSAPkcs1X509SignatureGenerator.cs (1)
15
Debug.
Assert
(key != null);
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (3)
17
Debug.
Assert
(key != null);
18
Debug.
Assert
(padding != null);
19
Debug.
Assert
(padding.Mode == RSASignaturePaddingMode.Pss);
System\Security\Cryptography\X509Certificates\StorePal.OpenSsl.cs (7)
22
Debug.
Assert
(password != null);
32
Debug.
Assert
(singleCert != null);
44
Debug.
Assert
(certPals != null);
49
Debug.
Assert
(openSslException != null);
72
Debug.
Assert
(bioPosition >= 0);
128
Debug.
Assert
(openSslException != null);
154
Debug.
Assert
(storeLocation == StoreLocation.LocalMachine);
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (8)
49
Debug.
Assert
(password != null);
91
Debug.
Assert
(_certs != null);
291
Debug.
Assert
(tmpWriter.GetEncodedLength() == 0);
328
Debug.
Assert
(tmpWriter.GetEncodedLength() == 0);
340
Debug.
Assert
(certContentsIv.Length * 8 == cipher.BlockSize);
389
Debug.
Assert
(encryptedLength <= requestedSize);
406
Debug.
Assert
(tmpWriter.GetEncodedLength() == 0);
514
Debug.
Assert
(tmpWriter.GetEncodedLength() == 0);
System\Security\Cryptography\X509Certificates\UnixPkcs12Reader.cs (4)
82
Debug.
Assert
(certs != null);
259
Debug.
Assert
(_pfxAsn.MacData.HasValue);
803
Debug.
Assert
(safeBag.BagId == Oids.Pkcs12KeyBag);
840
Debug.
Assert
(_rented == null);
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (1)
231
Debug.
Assert
(written == 2);
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (10)
102
Debug.
Assert
(dnSeparators.Length != 0);
276
Debug.
Assert
(tagStart >= 0);
378
Debug.
Assert
(hasTagOid);
379
Debug.
Assert
(valueEnd != -1);
380
Debug.
Assert
(valueStart != -1);
440
Debug.
Assert
(!hadEscapedQuote);
447
Debug.
Assert
(valueStart != -1);
448
Debug.
Assert
(valueEnd != -1);
547
Debug.
Assert
(destination.Length >= chars.Length);
562
Debug.
Assert
(skippedQuote == (c == '"'));
System\Security\Cryptography\X509Certificates\X500NameEncoder.ManagedDecode.cs (1)
151
Debug.
Assert
(tavReader.RuleSet == AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X500RelativeDistinguishedName.cs (1)
65
Debug.
Assert
(offset > 0);
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (1)
179
Debug.
Assert
(_decoded is not null);
System\Security\Cryptography\X509Certificates\X509Certificate.cs (1)
139
Debug.
Assert
(pal != null);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
1297
Debug.
Assert
(rawSAN.GetType() == typeof(X509Extension));
System\Security\Cryptography\X509Certificates\X509Certificate2Enumerator.cs (1)
16
Debug.
Assert
(collection != null);
System\Security\Cryptography\X509Certificates\X509Chain.cs (1)
31
Debug.
Assert
(_pal != null);
System\Security\Cryptography\X509Certificates\X509Store.cs (1)
82
Debug.
Assert
(_storePal != null);
System\Security\Cryptography\X509Certificates\X509SubjectAlternativeNameExtension.cs (1)
72
Debug.
Assert
(value.Length is 4 or 16);
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (2)
174
Debug.
Assert
(written == SHA1.HashSizeInBytes);
211
Debug.
Assert
(written >= TruncateSize);
System\Security\Cryptography\XmlKeyHelper.cs (4)
79
Debug.
Assert
(buf != null);
124
Debug.
Assert
(name.Length > 0);
125
Debug.
Assert
(value.Length > 0);
126
Debug.
Assert
(builder != null);
System.Security.Cryptography.Cose (41)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (2)
353
Debug.
Assert
(!map.ContainsKey(CoseHeaderLabel.Algorithm));
377
Debug.
Assert
(bytesWritten == ComputeEncodedSize(map, algHeaderValueToSlip));
System\Security\Cryptography\Cose\CoseHelpers.cs (8)
118
Debug.
Assert
(keyType == KeyType.RSA);
119
Debug.
Assert
(signer.RSASignaturePadding != null);
131
Debug.
Assert
(hasher.HashLengthInBytes <= 512 / 8); // largest hash we can get (SHA512).
152
Debug.
Assert
(hasher.HashLengthInBytes <= 512 / 8); // largest hash we can get (SHA512).
210
Debug.
Assert
(keyType == KeyType.RSA);
274
Debug.
Assert
(keyType == KeyType.RSA);
285
Debug.
Assert
(algorithm >= KnownCoseAlgorithms.RS512);
290
Debug.
Assert
(algorithm >= KnownCoseAlgorithms.PS512 && algorithm <= KnownCoseAlgorithms.PS256);
System\Security\Cryptography\Cose\CoseMessage.cs (10)
162
Debug.
Assert
(reader.BytesRemaining == 0);
248
Debug.
Assert
(reader.BytesRemaining == 0);
403
Debug.
Assert
(reader.BytesRemaining == 0);
499
Debug.
Assert
(context == SigStructureContext.Signature1);
500
Debug.
Assert
(signProtected.Length == 0);
511
Debug.
Assert
(bytesWritten == ComputeToBeSignedEncodedSize(context, bodyProtected.Length, signProtected.Length, associatedData.Length, content.Length));
530
Debug.
Assert
(context == SigStructureContext.Signature1);
531
Debug.
Assert
(signProtectedLength == 0);
568
Debug.
Assert
(length > 0);
599
Debug.
Assert
(bytesWritten == buffer.Length);
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (5)
219
Debug.
Assert
(expectedSize == bytesWritten);
290
Debug.
Assert
(buffer.Length == bytesWritten);
365
Debug.
Assert
(expectedSize == bytesWritten);
513
Debug.
Assert
(protectedHeadersSize == 1);
628
Debug.
Assert
(bytesWritten == GetEncodedLength());
System\Security\Cryptography\Cose\CoseSign1Message.cs (9)
180
Debug.
Assert
(contentStream == null || (isDetached && contentBytes.Length == 0));
188
Debug.
Assert
(expectedSize == bytesWritten);
240
Debug.
Assert
(buffer.Length == bytesWritten);
303
Debug.
Assert
(expectedSize == bytesWritten);
611
Debug.
Assert
(contentStream == null || contentBytes.Length == 0);
746
Debug.
Assert
(hasher.HashLengthInBytes <= 512 / 8); // largest hash we can get (SHA512).
757
Debug.
Assert
(keyType == KeyType.RSA);
758
Debug.
Assert
(padding != null);
834
Debug.
Assert
(bytesWritten == GetEncodedLength());
System\Security\Cryptography\Cose\CoseSignature.cs (4)
63
Debug.
Assert
(_message != null);
454
Debug.
Assert
(hasher.HashLengthInBytes <= 512 / 8); // largest hash we can get (SHA512).
467
Debug.
Assert
(keyType == KeyType.RSA);
468
Debug.
Assert
(padding != null);
System\Security\Cryptography\Cose\CoseSigner.cs (3)
189
Debug.
Assert
(_keyType == KeyType.RSA);
190
Debug.
Assert
(RSASignaturePadding != null);
203
Debug.
Assert
(RSASignaturePadding == RSASignaturePadding.Pkcs1);
System.Text.Encoding.CodePages (20)
System\Text\BaseCodePageEncoding.cs (4)
107
Debug.
Assert
(bytesRead == codePageDataFileHeader.Length);
145
Debug.
Assert
(bytesRead == codePageIndex.Length);
191
Debug.
Assert
(bytesRead == codePageHeader.Length);
370
Debug.
Assert
(pNativeMemory != null);
System\Text\BaseCodePageEncoding.netcoreapp.cs (1)
18
Debug.
Assert
(bytesRead == codePageIndex.Length);
System\Text\DBCSCodePageEncoding.cs (1)
87
Debug.
Assert
(m_codePageHeader?.Length > 0);
System\Text\DecoderFallbackBufferHelper.cs (3)
25
Debug.
Assert
(_fallbackBuffer != null);
47
Debug.
Assert
(_fallbackBuffer != null);
103
Debug.
Assert
(_fallbackBuffer != null);
System\Text\EncoderFallbackBufferHelper.cs (3)
34
Debug.
Assert
(_fallbackBuffer != null);
56
Debug.
Assert
(_fallbackBuffer != null);
75
Debug.
Assert
(_fallbackBuffer != null);
System\Text\EncodingTable.cs (7)
71
Debug.
Assert
(encodingNameIndices.Length == CodePagesByName.Length + 1);
72
Debug.
Assert
(encodingNameIndices[encodingNameIndices.Length - 1] == EncodingNames.Length);
82
Debug.
Assert
(index < encodingNameIndices.Length - 1);
104
Debug.
Assert
(left < encodingNameIndices.Length - 1);
145
Debug.
Assert
(MappedCodePages.Length + 1 == indices.Length);
146
Debug.
Assert
(indices[indices.Length - 1] == names.Length);
161
Debug.
Assert
(i < indices.Length - 1);
System\Text\SBCSCodePageEncoding.cs (1)
62
Debug.
Assert
(m_codePageHeader?.Length > 0);
System.Text.Encodings.Web (43)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
System\IO\TextWriterExtensions.cs (2)
19
Debug.
Assert
(writer != null);
20
Debug.
Assert
(value != null);
System\Text\Encodings\Web\AllowedBmpCodePointsBitmap.cs (1)
70
Debug.
Assert
(definedCharsBitmapAsLittleEndian.Length == thisAllowedCharactersBitmap.Length * sizeof(uint));
System\Text\Encodings\Web\AsciiByteMap.cs (2)
20
Debug.
Assert
(key < BufferSize);
21
Debug.
Assert
(value != 0);
System\Text\Encodings\Web\OptimizedInboxTextEncoder.AdvSimd64.cs (10)
16
Debug.
Assert
(AdvSimd.Arm64.IsSupported);
17
Debug.
Assert
(BitConverter.IsLittleEndian);
115
Debug.
Assert
(lengthInBytes - i <= 3);
129
Debug.
Assert
(resultScalar != ulong.MaxValue);
136
Debug.
Assert
(resultScalar != ulong.MaxValue);
150
Debug.
Assert
(AdvSimd.Arm64.IsSupported);
151
Debug.
Assert
(BitConverter.IsLittleEndian);
230
Debug.
Assert
(lengthInChars - i <= 3);
244
Debug.
Assert
(resultScalar != ulong.MaxValue);
251
Debug.
Assert
(resultScalar != ulong.MaxValue);
System\Text\Encodings\Web\OptimizedInboxTextEncoder.cs (7)
39
Debug.
Assert
(scalarEscaper != null);
296
Debug.
Assert
(scalarValue == Rune.ReplacementChar); // DecodeFromUtfXX should've set replacement character on failure
368
Debug.
Assert
(0 <= asciiBytesSkippedNInt && asciiBytesSkippedNInt <= (uint)dataOriginalLength);
375
Debug.
Assert
(asciiBytesSkipped == data.Length);
389
Debug.
Assert
(!data.IsEmpty);
429
Debug.
Assert
(0 <= idx && idx <= lengthInChars);
466
Debug.
Assert
(0 <= idx && idx <= lengthInChars);
System\Text\Encodings\Web\OptimizedInboxTextEncoder.Ssse3.cs (8)
15
Debug.
Assert
(Ssse3.IsSupported);
16
Debug.
Assert
(BitConverter.IsLittleEndian);
108
Debug.
Assert
(lengthInBytes - i <= 3);
122
Debug.
Assert
(pmovmskb != 0);
135
Debug.
Assert
(Ssse3.IsSupported);
136
Debug.
Assert
(BitConverter.IsLittleEndian);
210
Debug.
Assert
(lengthInChars - i <= 3);
224
Debug.
Assert
(pmovmskb != 0);
System\Text\Encodings\Web\TextEncoder.cs (5)
345
Debug.
Assert
(scalarValue == Rune.ReplacementChar); // DecodeFromUtf8 should've performed substitution
467
Debug.
Assert
(scalarValue == Rune.ReplacementChar); // should be replacement char
514
Debug.
Assert
(output != null);
578
Debug.
Assert
(!string.IsNullOrEmpty(source));
598
Debug.
Assert
(unicodeScalar < ushort.MaxValue);
System\Text\Unicode\UnicodeHelpers.cs (2)
29
Debug.
Assert
(0x10000 <= scalar && scalar <= UNICODE_LAST_CODEPOINT);
45
Debug.
Assert
(scalar <= UNICODE_LAST_CODEPOINT);
System.Text.Json (1206)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (21)
32
Debug.
Assert
(MaximumBufferSize == Array.MaxLength);
38
Debug.
Assert
(initialCapacity > 0);
48
Debug.
Assert
(_rentedBuffer != null);
49
Debug.
Assert
(_index <= _rentedBuffer.Length);
58
Debug.
Assert
(_rentedBuffer != null);
67
Debug.
Assert
(_rentedBuffer != null);
76
Debug.
Assert
(_rentedBuffer != null);
88
Debug.
Assert
(_rentedBuffer != null);
98
Debug.
Assert
(_rentedBuffer != null);
99
Debug.
Assert
(_index <= _rentedBuffer.Length);
121
Debug.
Assert
(initialCapacity > 0);
122
Debug.
Assert
(_rentedBuffer is null);
132
Debug.
Assert
(_rentedBuffer != null);
133
Debug.
Assert
(count >= 0);
134
Debug.
Assert
(_index <= _rentedBuffer.Length - count);
176
Debug.
Assert
(_rentedBuffer != null);
177
Debug.
Assert
(sizeHint > 0);
208
Debug.
Assert
(oldBuffer.Length >= _index);
209
Debug.
Assert
(_rentedBuffer.Length >= _index);
217
Debug.
Assert
(_rentedBuffer.Length - _index > 0);
218
Debug.
Assert
(_rentedBuffer.Length - _index >= sizeHint);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (1)
18
Debug.
Assert
(char.IsPunctuation(separator));
src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (8)
49
Debug.
Assert
(baseType.IsGenericType);
50
Debug.
Assert
(!baseType.IsInterface);
51
Debug.
Assert
(baseType == baseType.GetGenericTypeDefinition());
86
Debug.
Assert
(interfaceType.IsGenericType);
87
Debug.
Assert
(interfaceType.IsInterface);
88
Debug.
Assert
(interfaceType == interfaceType.GetGenericTypeDefinition());
162
Debug.
Assert
(type.IsImmutableDictionaryType());
183
Debug.
Assert
(type.IsImmutableEnumerableType());
System\Text\Json\BitStack.cs (4)
122
Debug.
Assert
(_array != null);
134
Debug.
Assert
(_array != null);
136
Debug.
Assert
(minSize >= 0 && minSize >= _array.Length);
139
Debug.
Assert
(nextDouble > minSize);
System\Text\Json\Document\JsonDocument.cs (20)
44
Debug.
Assert
(!utf8Json.IsEmpty);
47
Debug.
Assert
(isDisposable ||
51
Debug.
Assert
(extraRentedArrayPoolBytes == null || extraPooledByteBufferWriter == null);
236
Debug.
Assert
(row.TokenType == JsonTokenType.PropertyName);
298
Debug.
Assert
(status != OperationStatus.DestinationTooSmall);
306
Debug.
Assert
(status == OperationStatus.Done);
347
Debug.
Assert
(idx != -1);
383
Debug.
Assert
(segment.IndexOf(JsonConstants.BackSlash) == -1);
652
Debug.
Assert
(segment.IndexOf(JsonConstants.BackSlash) == -1);
687
Debug.
Assert
(segment.IndexOf(JsonConstants.BackSlash) == -1);
722
Debug.
Assert
(segment.IndexOf(JsonConstants.BackSlash) == -1);
851
Debug.
Assert
(row.TokenType == JsonTokenType.String || row.TokenType == JsonTokenType.PropertyName);
882
Debug.
Assert
(row.TokenType == JsonTokenType.PropertyName);
936
Debug.
Assert
(reader.TokenStartIndex <= int.MaxValue);
1020
Debug.
Assert
(tokenStart < int.MaxValue);
1029
Debug.
Assert
(!inArray);
1033
Debug.
Assert
(tokenType >= JsonTokenType.String && tokenType <= JsonTokenType.Null);
1045
Debug.
Assert
(tokenStart < int.MaxValue);
1063
Debug.
Assert
(reader.BytesConsumed == utf8JsonSpan.Length);
1088
Debug.
Assert
(readerOptions.CommentHandling >= 0 && readerOptions.CommentHandling <= JsonCommentHandling.Allow);
System\Text\Json\Document\JsonDocument.DbRow.cs (5)
57
Debug.
Assert
(sizeof(DbRow) == Size);
63
Debug.
Assert
(jsonTokenType > JsonTokenType.None && jsonTokenType <= JsonTokenType.Null);
64
Debug.
Assert
((byte)jsonTokenType < 1 << 4);
65
Debug.
Assert
(location >= 0);
66
Debug.
Assert
(sizeOrLength >= UnknownSize);
System\Text\Json\Document\JsonDocument.MetadataDb.cs (9)
178
Debug.
Assert
(_data != null);
219
Debug.
Assert
(
244
Debug.
Assert
(MaxArrayLength == Array.MaxLength);
269
Debug.
Assert
(index >= 0);
277
Debug.
Assert
(length >= 0);
285
Debug.
Assert
(numberOfRows >= 1 && numberOfRows <= 0x0FFFFFFF);
309
Debug.
Assert
(lookupType == JsonTokenType.StartObject || lookupType == JsonTokenType.StartArray);
353
Debug.
Assert
(endIndex <= Length);
395
Debug.
Assert
(newDbInts[i] >= locationOffset);
System\Text\Json\Document\JsonDocument.Parse.cs (15)
126
Debug.
Assert
(drained.Array != null);
151
Debug.
Assert
(utf8Json != null);
154
Debug.
Assert
(drained.Array != null);
176
Debug.
Assert
(json != null);
215
Debug.
Assert
(drained.Array != null);
235
Debug.
Assert
(drained.Array != null);
275
Debug.
Assert
(expectedByteCount == actualByteCount);
301
Debug.
Assert
(expectedByteCount == actualByteCount);
508
Debug.
Assert
(
559
Debug.
Assert
(payloadLength > 1);
603
Debug.
Assert
(!reader.HasValueSequence);
683
Debug.
Assert
(tokenType == JsonTokenType.Null);
729
Debug.
Assert
(
788
Debug.
Assert
(rented.Length >= utf8Bom.Length);
871
Debug.
Assert
(rented.Length >= JsonConstants.Utf8Bom.Length);
System\Text\Json\Document\JsonDocument.StackRow.cs (2)
23
Debug.
Assert
(sizeOrLength >= 0);
24
Debug.
Assert
(numberOfRows >= -1);
System\Text\Json\Document\JsonDocument.StackRowStack.cs (2)
55
Debug.
Assert
(_rentedBuffer != null);
56
Debug.
Assert
(_topOfStack <= _rentedBuffer!.Length - StackRow.Size);
System\Text\Json\Document\JsonDocument.TryGetProperty.cs (7)
59
Debug.
Assert
(row.TokenType != JsonTokenType.PropertyName);
68
Debug.
Assert
(row.NumberOfRows > 0);
73
Debug.
Assert
(row.TokenType == JsonTokenType.PropertyName);
150
Debug.
Assert
(row.TokenType != JsonTokenType.PropertyName);
159
Debug.
Assert
(row.NumberOfRows > 0);
164
Debug.
Assert
(row.TokenType == JsonTokenType.PropertyName);
175
Debug.
Assert
(idx >= 0);
System\Text\Json\Document\JsonDocumentOptions.cs (1)
32
Debug.
Assert
(value >= 0);
System\Text\Json\Document\JsonElement.ArrayEnumerator.cs (1)
27
Debug.
Assert
(target.TokenType == JsonTokenType.StartArray);
System\Text\Json\Document\JsonElement.cs (2)
26
Debug.
Assert
(idx >= 0);
1429
Debug.
Assert
(_parent != null);
System\Text\Json\Document\JsonElement.ObjectEnumerator.cs (1)
27
Debug.
Assert
(target.TokenType == JsonTokenType.StartObject);
System\Text\Json\JsonEncodedText.cs (2)
34
Debug.
Assert
(utf8Value != null);
94
Debug.
Assert
(expectedByteCount == utf8Bytes.Length);
System\Text\Json\JsonHelpers.cs (3)
21
Debug.
Assert
(reader.TokenType is JsonTokenType.String or JsonTokenType.PropertyName);
72
Debug.
Assert
(tokenType == reader.TokenType);
142
Debug.
Assert
(result);
System\Text\Json\JsonHelpers.Date.cs (7)
146
Debug.
Assert
(source.Length >= 10);
240
Debug.
Assert
(source.Length >= 16);
273
Debug.
Assert
(source.Length >= 19);
332
Debug.
Assert
(sourceIndex <= source.Length);
386
Debug.
Assert
(source.Length == 2);
504
Debug.
Assert
(parseData.Year <= 9999); // All of our callers to date parse the year from fixed 4-digit fields so this value is trusted.
539
Debug.
Assert
(parseData.Fraction >= 0 && parseData.Fraction <= JsonConstants.MaxDateTimeFraction); // All of our callers to date parse the fraction from fixed 7-digit fields so this value is trusted.
System\Text\Json\JsonHelpers.Escaping.cs (4)
33
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
34
Debug.
Assert
(firstEscapeIndexVal >= 0 && firstEscapeIndexVal < utf8Value.Length);
61
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
62
Debug.
Assert
(firstEscapeIndexVal >= 0 && firstEscapeIndexVal < utf8Value.Length);
System\Text\Json\JsonPropertyDictionary.cs (3)
77
Debug.
Assert
(propertyName != null);
273
Debug.
Assert
(existing == null);
399
Debug.
Assert
(success);
System\Text\Json\Nodes\JsonArray.cs (4)
203
Debug.
Assert
(element.ValueKind == JsonValueKind.Array);
246
Debug.
Assert
(index >= 0);
252
Debug.
Assert
(formatted);
304
Debug.
Assert
(jElement.ValueKind == JsonValueKind.Array);
System\Text\Json\Nodes\JsonObject.cs (1)
72
Debug.
Assert
(element.ValueKind == JsonValueKind.Object);
System\Text\Json\Nodes\JsonValue.cs (1)
95
Debug.
Assert
(child == null);
System\Text\Json\Nodes\JsonValueOfT.cs (5)
17
Debug.
Assert
(value != null);
18
Debug.
Assert
(value is not JsonElement or JsonElement { ValueKind: not JsonValueKind.Null });
223
Debug.
Assert
(str != null);
336
Debug.
Assert
(strResult != null);
365
Debug.
Assert
(str != null);
System\Text\Json\Nodes\JsonValueOfTCustomized.cs (1)
18
Debug.
Assert
(jsonTypeInfo.IsConfigured);
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (1)
22
Debug.
Assert
(converter is { IsInternalConverter: true, ConverterStrategy: ConverterStrategy.Value });
System\Text\Json\Reader\JsonReaderHelper.cs (9)
84
Debug.
Assert
(source.Length <= JsonConstants.MaximumEscapedDateTimeOffsetParseLength);
88
Debug.
Assert
(written > 0);
91
Debug.
Assert
(!sourceUnescaped.IsEmpty);
106
Debug.
Assert
(source.Length <= JsonConstants.MaximumEscapedDateTimeOffsetParseLength);
110
Debug.
Assert
(written > 0);
113
Debug.
Assert
(!sourceUnescaped.IsEmpty);
128
Debug.
Assert
(source.Length <= JsonConstants.MaximumEscapedGuidLength);
132
Debug.
Assert
(written > 0);
135
Debug.
Assert
(!utf8Unescaped.IsEmpty);
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (35)
23
Debug.
Assert
(written > 0);
26
Debug.
Assert
(!utf8Unescaped.IsEmpty);
53
Debug.
Assert
(written > 0);
56
Debug.
Assert
(!utf8Unescaped.IsEmpty);
80
Debug.
Assert
(written > 0);
83
Debug.
Assert
(!propertyName.IsEmpty);
96
Debug.
Assert
(utf8Source.Length >= other.Length && utf8Source.Length / JsonConstants.MaxExpansionFactorWhileEscaping <= other.Length);
105
Debug.
Assert
(written > 0);
108
Debug.
Assert
(!utf8Unescaped.IsEmpty);
123
Debug.
Assert
(!utf8Source.IsSingleSegment);
124
Debug.
Assert
(utf8Source.Length >= other.Length && utf8Source.Length / JsonConstants.MaxExpansionFactorWhileEscaping <= other.Length);
143
Debug.
Assert
(written > 0);
146
Debug.
Assert
(!utf8Unescaped.IsEmpty);
152
Debug.
Assert
(escapedArray != null);
196
Debug.
Assert
(bytesConsumed == utf8Unescaped.Length);
402
Debug.
Assert
(destination.Length >= source.Length);
405
Debug.
Assert
(idx >= 0);
408
Debug.
Assert
(result);
413
Debug.
Assert
(idx >= 0 && idx < source.Length);
414
Debug.
Assert
(source[idx] == JsonConstants.BackSlash);
415
Debug.
Assert
(destination.Length >= source.Length);
418
Debug.
Assert
(result);
427
Debug.
Assert
(idx >= 0);
437
Debug.
Assert
(idx >= 0 && idx < source.Length);
438
Debug.
Assert
(source[idx] == JsonConstants.BackSlash);
450
Debug.
Assert
(source[idx] == JsonConstants.BackSlash);
488
Debug.
Assert
(source.Length >= idx + 5);
491
Debug.
Assert
(result);
492
Debug.
Assert
(bytesConsumed == 4);
503
Debug.
Assert
(JsonHelpers.IsInRangeInclusive((uint)scalar, JsonConstants.HighSurrogateStartValue, JsonConstants.HighSurrogateEndValue));
514
Debug.
Assert
(result);
515
Debug.
Assert
(bytesConsumed == 4);
542
Debug.
Assert
(bytesWritten <= 4);
566
Debug.
Assert
(nextUnescapedSegmentLength > 0);
588
Debug.
Assert
(idx == source.Length || source[idx] == JsonConstants.BackSlash);
System\Text\Json\Reader\JsonReaderOptions.cs (1)
32
Debug.
Assert
(value >= 0);
System\Text\Json\Reader\Utf8JsonReader.cs (53)
83
Debug.
Assert
(_totalConsumed == 0);
111
Debug.
Assert
(readerDepth >= 1);
172
Debug.
Assert
(_currentPosition.GetObject() != null);
323
Debug.
Assert
(_isFinalBlock);
330
Debug.
Assert
(result);
341
Debug.
Assert
(result);
397
Debug.
Assert
(0 <= targetDepth && targetDepth <= CurrentDepth);
428
Debug.
Assert
(targetDepth == CurrentDepth);
552
Debug.
Assert
(status != OperationStatus.DestinationTooSmall);
560
Debug.
Assert
(status == OperationStatus.Done);
575
Debug.
Assert
(HasValueSequence);
584
Debug.
Assert
(!localSequence.IsSingleSegment);
611
Debug.
Assert
(!HasValueSequence);
620
Debug.
Assert
(idx != -1);
632
Debug.
Assert
(HasValueSequence);
633
Debug.
Assert
(!ValueSequence.IsSingleSegment);
1047
Debug.
Assert
((_trailingCommaBeforeComment && _readerOptions.CommentHandling == JsonCommentHandling.Allow) || !_trailingCommaBeforeComment);
1048
Debug.
Assert
((_trailingCommaBeforeComment && marker != JsonConstants.Slash) || !_trailingCommaBeforeComment);
1092
Debug.
Assert
(_readerOptions.CommentHandling == JsonCommentHandling.Skip);
1139
Debug.
Assert
(span.Length > 0);
1140
Debug.
Assert
(span[0] == 'n' || span[0] == 't' || span[0] == 'f');
1156
Debug.
Assert
(span.Length > 0 && span[0] == literal[0]);
1177
Debug.
Assert
(indexOfFirstMismatch > 0 && indexOfFirstMismatch < literal.Length);
1201
Debug.
Assert
(firstByte == 'n');
1221
Debug.
Assert
(IsLastSpan);
1232
Debug.
Assert
(
1284
Debug.
Assert
(_buffer.Length >= _consumed + 1);
1285
Debug.
Assert
(_buffer[_consumed] == JsonConstants.Quote);
1329
Debug.
Assert
(idx >= 0 && idx < data.Length);
1330
Debug.
Assert
(data[idx] != JsonConstants.Quote);
1331
Debug.
Assert
(data[idx] == JsonConstants.BackSlash || data[idx] < JsonConstants.Space);
1431
Debug.
Assert
(data.Length > 0);
1442
Debug.
Assert
(signResult == ConsumeNumberResult.OperationIncomplete);
1445
Debug.
Assert
(nextByte >= '0' && nextByte <= '9');
1459
Debug.
Assert
(result == ConsumeNumberResult.OperationIncomplete);
1475
Debug.
Assert
(result == ConsumeNumberResult.OperationIncomplete);
1484
Debug.
Assert
(nextByte == '.' || nextByte == 'E' || nextByte == 'e');
1499
Debug.
Assert
(result == ConsumeNumberResult.OperationIncomplete);
1508
Debug.
Assert
(nextByte == 'E' || nextByte == 'e');
1517
Debug.
Assert
(signResult == ConsumeNumberResult.OperationIncomplete);
1530
Debug.
Assert
(resultExponent == ConsumeNumberResult.OperationIncomplete);
1570
Debug.
Assert
(data[i] == (byte)'0');
1743
Debug.
Assert
(_readerOptions.CommentHandling == JsonCommentHandling.Skip);
1838
Debug.
Assert
(_readerOptions.CommentHandling == JsonCommentHandling.Allow);
1839
Debug.
Assert
(_tokenType == JsonTokenType.Comment);
1850
Debug.
Assert
(_tokenType != JsonTokenType.Comment);
1875
Debug.
Assert
(first != JsonConstants.Slash);
1997
Debug.
Assert
(first != JsonConstants.CloseBrace);
2019
Debug.
Assert
(first != JsonConstants.CloseBracket);
2036
Debug.
Assert
(_tokenType == JsonTokenType.EndArray || _tokenType == JsonTokenType.EndObject);
2039
Debug.
Assert
(first != JsonConstants.CloseBrace);
2056
Debug.
Assert
(first != JsonConstants.CloseBracket);
2344
Debug.
Assert
(localBuffer[idx] == JsonConstants.CarriageReturn);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (54)
94
Debug.
Assert
(!_nextPosition.Equals(_currentPosition));
229
Debug.
Assert
(_isNotPrimitive && IsLastSpan);
303
Debug.
Assert
(!_isMultiSegment || _currentPosition.GetObject() != null);
320
Debug.
Assert
(!_isMultiSegment || _currentPosition.GetObject() != null);
408
Debug.
Assert
((_trailingCommaBeforeComment && _readerOptions.CommentHandling == JsonCommentHandling.Allow) || !_trailingCommaBeforeComment);
409
Debug.
Assert
((_trailingCommaBeforeComment && marker != JsonConstants.Slash) || !_trailingCommaBeforeComment);
459
Debug.
Assert
(_readerOptions.CommentHandling == JsonCommentHandling.Skip);
517
Debug.
Assert
(span.Length > 0);
518
Debug.
Assert
(span[0] == 'n' || span[0] == 't' || span[0] == 'f');
544
Debug.
Assert
(span.Length > 0 && span[0] == literal[0] && literal.Length <= JsonConstants.MaximumLiteralLength);
632
Debug.
Assert
(span.Length > 0);
649
Debug.
Assert
(indexOfFirstMismatch >= 0 && indexOfFirstMismatch < literal.Length);
668
Debug.
Assert
(firstByte == 'n');
687
Debug.
Assert
(IsLastSpan);
698
Debug.
Assert
(
750
Debug.
Assert
(_buffer.Length >= _consumed + 1);
751
Debug.
Assert
(_buffer[_consumed] == JsonConstants.Quote);
959
Debug.
Assert
(idx >= 0 && idx < data.Length);
960
Debug.
Assert
(data[idx] != JsonConstants.Quote);
961
Debug.
Assert
(data[idx] == JsonConstants.BackSlash || data[idx] < JsonConstants.Space);
1124
Debug.
Assert
(data.Length > 0);
1138
Debug.
Assert
(signResult == ConsumeNumberResult.OperationIncomplete);
1141
Debug.
Assert
(nextByte >= '0' && nextByte <= '9');
1156
Debug.
Assert
(result == ConsumeNumberResult.OperationIncomplete);
1172
Debug.
Assert
(result == ConsumeNumberResult.OperationIncomplete);
1181
Debug.
Assert
(nextByte == '.' || nextByte == 'E' || nextByte == 'e');
1198
Debug.
Assert
(result == ConsumeNumberResult.OperationIncomplete);
1207
Debug.
Assert
(nextByte == 'E' || nextByte == 'e');
1218
Debug.
Assert
(signResult == ConsumeNumberResult.OperationIncomplete);
1233
Debug.
Assert
(resultExponent == ConsumeNumberResult.OperationIncomplete);
1256
Debug.
Assert
(i == 0);
1279
Debug.
Assert
(i == 1);
1298
Debug.
Assert
(data[i] == (byte)'0');
1299
Debug.
Assert
(i == 0 || i == 1);
1576
Debug.
Assert
(_readerOptions.CommentHandling == JsonCommentHandling.Skip);
1680
Debug.
Assert
(_readerOptions.CommentHandling == JsonCommentHandling.Allow);
1681
Debug.
Assert
(_tokenType == JsonTokenType.Comment);
1692
Debug.
Assert
(_tokenType != JsonTokenType.Comment);
1717
Debug.
Assert
(first != JsonConstants.Slash);
1848
Debug.
Assert
(first != JsonConstants.CloseBrace);
1872
Debug.
Assert
(first != JsonConstants.CloseBracket);
1889
Debug.
Assert
(_tokenType == JsonTokenType.EndArray || _tokenType == JsonTokenType.EndObject);
1892
Debug.
Assert
(first != JsonConstants.CloseBrace);
1909
Debug.
Assert
(first != JsonConstants.CloseBracket);
2175
Debug.
Assert
(
2325
Debug.
Assert
(dangerousLineSeparatorBytesConsumed >= 0 && dangerousLineSeparatorBytesConsumed <= 2);
2339
Debug.
Assert
(localBuffer[idx] == JsonConstants.CarriageReturn);
2399
Debug.
Assert
(dangerousLineSeparatorBytesConsumed >= 0 && dangerousLineSeparatorBytesConsumed <= 2);
2409
Debug.
Assert
(dangerousLineSeparatorBytesConsumed >= 1 && dangerousLineSeparatorBytesConsumed <= 2 && localBuffer.Length <= 1);
2440
Debug.
Assert
(localBuffer.Length < 2);
2449
Debug.
Assert
(dangerousLineSeparatorBytesConsumed == 1 || dangerousLineSeparatorBytesConsumed == 2);
2503
Debug.
Assert
(localBuffer.Length > 0);
2549
Debug.
Assert
(marker == JsonConstants.CarriageReturn);
2583
Debug.
Assert
(!localBuffer.IsEmpty);
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (12)
46
Debug.
Assert
(span.IndexOf(JsonConstants.BackSlash) == -1);
81
Debug.
Assert
(_tokenType is JsonTokenType.String or JsonTokenType.PropertyName or JsonTokenType.Number);
145
Debug.
Assert
(_tokenType is JsonTokenType.String or JsonTokenType.PropertyName or JsonTokenType.Number);
161
Debug.
Assert
(success);
197
Debug.
Assert
(_tokenType is JsonTokenType.String or JsonTokenType.PropertyName);
198
Debug.
Assert
(ValueIsEscaped);
262
Debug.
Assert
((HasValueSequence ? ValueSequence.ToArray() : ValueSpan).Length == 4);
271
Debug.
Assert
((HasValueSequence ? ValueSequence.ToArray() : ValueSpan).Length == 5);
841
Debug.
Assert
(span.IndexOf(JsonConstants.BackSlash) == -1);
1277
Debug.
Assert
(span.IndexOf(JsonConstants.BackSlash) == -1);
1342
Debug.
Assert
(span.IndexOf(JsonConstants.BackSlash) == -1);
1408
Debug.
Assert
(span.IndexOf(JsonConstants.BackSlash) == -1);
System\Text\Json\Serialization\Converters\CastingConverter.cs (1)
24
Debug.
Assert
(typeof(T).IsInSubtypeRelationshipWith(sourceConverter.Type!));
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (4)
76
Debug.
Assert
(state.Current.AsyncDisposable is IAsyncEnumerator<TElement>);
82
Debug.
Assert
(state.PendingTask is Task<bool> && state.PendingTask.IsCompleted);
95
Debug.
Assert
(moveNextTask.IsCompleted);
129
Debug.
Assert
(state.PendingTask is null);
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (1)
45
Debug.
Assert
(Type.IsInterface);
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (1)
105
Debug.
Assert
(Type.IsInterface);
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
47
Debug.
Assert
(Type.IsInterface);
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (2)
171
Debug.
Assert
(typeof(IEnumerable).IsAssignableFrom(typeToConvert));
192
Debug.
Assert
(numberOfGenericArgs == 3);
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactoryHelpers.cs (2)
72
Debug.
Assert
(type.IsImmutableEnumerableType());
85
Debug.
Assert
(type.IsImmutableDictionaryType());
System\Text\Json\Serialization\Converters\Collection\IEnumerableDefaultConverter.cs (2)
19
Debug.
Assert
(value is not null);
33
Debug.
Assert
(state.Current.CollectionEnumerator is IEnumerator<TElement>);
System\Text\Json\Serialization\Converters\Collection\IListConverter.cs (1)
84
Debug.
Assert
(Type.IsInterface);
System\Text\Json\Serialization\Converters\Collection\IListOfTConverter.cs (1)
45
Debug.
Assert
(Type.IsInterface);
System\Text\Json\Serialization\Converters\Collection\ImmutableDictionaryOfTKeyTValueConverter.cs (1)
32
Debug.
Assert
(creator != null);
System\Text\Json\Serialization\Converters\Collection\ImmutableEnumerableOfTConverter.cs (1)
32
Debug.
Assert
(creator != null);
System\Text\Json\Serialization\Converters\Collection\ISetOfTConverter.cs (1)
42
Debug.
Assert
(Type.IsInterface);
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (8)
41
Debug.
Assert
(state.Current.ReturnValue is TCollection);
53
Debug.
Assert
(state.Current.JsonPropertyInfo != null);
161
Debug.
Assert
(!IsValueType);
179
Debug.
Assert
(state.ReferenceId != null);
180
Debug.
Assert
(options.ReferenceHandlingStrategy == ReferenceHandlingStrategy.Preserve);
181
Debug.
Assert
(state.Current.ReturnValue is TCollection);
259
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
265
Debug.
Assert
(reader.TokenType is JsonTokenType.EndObject);
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (8)
56
Debug.
Assert
(state.Current.ReturnValue is TDictionary);
110
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
136
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
187
Debug.
Assert
(!IsValueType);
206
Debug.
Assert
(state.ReferenceId != null);
207
Debug.
Assert
(options.ReferenceHandlingStrategy == ReferenceHandlingStrategy.Preserve);
208
Debug.
Assert
(state.Current.ReturnValue is TDictionary);
243
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Collection\MemoryConverterFactory.cs (1)
26
Debug.
Assert
(CanConvert(typeToConvert));
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverter.cs (2)
19
Debug.
Assert
(addMethodDelegate != null);
40
Debug.
Assert
(typeInfo.AddMethodDelegate != null);
System\Text\Json\Serialization\Converters\FSharp\FSharpTypeConverterFactory.cs (2)
31
Debug.
Assert
(CanConvert(typeToConvert));
66
Debug.
Assert
(objectFactory.CanConvert(typeToConvert));
System\Text\Json\Serialization\Converters\JsonMetadataServicesConverter.cs (1)
51
Debug.
Assert
(jsonTypeInfo is JsonTypeInfo<T> typeInfo && typeInfo.SerializeHandler != null);
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (1)
31
Debug.
Assert
(false);
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
54
Debug.
Assert
(false);
System\Text\Json\Serialization\Converters\Node\JsonNodeConverterFactory.cs (1)
29
Debug.
Assert
(typeof(JsonNode) == typeToConvert);
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (4)
25
Debug.
Assert
(success); // Node converters are not resumable.
27
Debug.
Assert
(obj is JsonObject);
30
Debug.
Assert
(value == null || value is JsonNode);
56
Debug.
Assert
(false);
System\Text\Json\Serialization\Converters\Object\ObjectConverter.cs (2)
106
Debug.
Assert
(options.UnknownTypeHandling == JsonUnknownTypeHandling.JsonNode);
132
Debug.
Assert
(options.UnknownTypeHandling == JsonUnknownTypeHandling.JsonNode);
System\Text\Json\Serialization\Converters\Object\ObjectConverterFactory.cs (1)
33
Debug.
Assert
(!typeof(IEnumerable).IsAssignableFrom(typeToConvert));
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (13)
50
Debug.
Assert
(obj != null);
91
Debug.
Assert
(!IsValueType);
127
Debug.
Assert
(state.ReferenceId != null);
128
Debug.
Assert
(options.ReferenceHandlingStrategy == ReferenceHandlingStrategy.Preserve);
142
Debug.
Assert
(obj != null);
172
Debug.
Assert
(tokenType == JsonTokenType.PropertyName);
177
Debug.
Assert
(options.AllowOutOfOrderMetadataProperties);
195
Debug.
Assert
(state.Current.JsonPropertyInfo != null);
256
Debug.
Assert
(obj != null);
289
Debug.
Assert
(tokenType == JsonTokenType.PropertyName);
348
Debug.
Assert
(success);
363
Debug.
Assert
(success);
397
Debug.
Assert
(jsonPropertyInfo.EffectiveConverter.ConverterStrategy != ConverterStrategy.Value);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (18)
70
Debug.
Assert
(properties != null);
89
Debug.
Assert
(tempReader.TokenType == JsonTokenType.PropertyName);
99
Debug.
Assert
(jsonPropertyInfo == state.Current.JsonTypeInfo.ExtensionDataProperty);
149
Debug.
Assert
(!IsValueType);
199
Debug.
Assert
(state.ReferenceId != null);
200
Debug.
Assert
(options.ReferenceHandlingStrategy == ReferenceHandlingStrategy.Preserve);
217
Debug.
Assert
(jsonPropertyInfo.Set != null);
229
Debug.
Assert
(jsonPropertyInfo == state.Current.JsonTypeInfo.ExtensionDataProperty);
255
Debug.
Assert
(obj != null);
300
Debug.
Assert
(tokenType == JsonTokenType.PropertyName);
305
Debug.
Assert
(options.AllowOutOfOrderMetadataProperties);
331
Debug.
Assert
(jsonParameterInfo.MatchingProperty != null);
413
Debug.
Assert
(tokenType == JsonTokenType.PropertyName);
418
Debug.
Assert
(options.AllowOutOfOrderMetadataProperties);
456
Debug.
Assert
(jsonPropertyInfo == null);
553
Debug.
Assert
(jsonPropertyInfo.CanDeserialize);
604
Debug.
Assert
(state.Current.CtorArgumentState != null);
619
Debug.
Assert
(state.Current.JsonTypeInfo.Kind == JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Large.cs (4)
19
Debug.
Assert
(jsonParameterInfo.ShouldDeserialize);
36
Debug.
Assert
(frame.CtorArgumentState != null);
37
Debug.
Assert
(frame.JsonTypeInfo.CreateObjectWithArgs != null);
54
Debug.
Assert
(typeInfo.ParameterCache != null);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Small.cs (3)
30
Debug.
Assert
(state.Current.CtorArgumentState!.Arguments != null);
63
Debug.
Assert
(jsonParameterInfo.ShouldDeserialize);
85
Debug.
Assert
(typeInfo.CreateObjectWithArgs != null);
System\Text\Json\Serialization\Converters\Value\BooleanConverter.cs (1)
23
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\ByteConverter.cs (1)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\CharConverter.cs (1)
49
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\DateOnlyConverter.cs (3)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
66
Debug.
Assert
(formattedSuccessfully && charsWritten == FormatLength);
78
Debug.
Assert
(formattedSuccessfully && charsWritten == FormatLength);
System\Text\Json\Serialization\Converters\Value\DateTimeConverter.cs (1)
22
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\DateTimeOffsetConverter.cs (1)
22
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\DecimalConverter.cs (1)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\DoubleConverter.cs (1)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (3)
71
Debug.
Assert
(names.Length == values.Length);
211
Debug.
Assert
(original.Contains(ValueSeparator));
458
Debug.
Assert
(value is T);
System\Text\Json\Serialization\Converters\Value\EnumConverterFactory.cs (1)
23
Debug.
Assert
(CanConvert(type));
System\Text\Json\Serialization\Converters\Value\GuidConverter.cs (1)
22
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\HalfConverter.cs (3)
59
Debug.
Assert
(!Half.IsNaN(result) && !Half.IsInfinity(result));
76
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
214
Debug.
Assert
(formattedSuccessfully);
System\Text\Json\Serialization\Converters\Value\Int128Converter.cs (2)
81
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
152
Debug.
Assert
(formattedSuccessfully);
System\Text\Json\Serialization\Converters\Value\Int16Converter.cs (1)
28
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\Int32Converter.cs (1)
28
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\Int64Converter.cs (1)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\NullableConverterFactory.cs (2)
21
Debug.
Assert
(typeToConvert.IsNullableOfT());
37
Debug.
Assert
(valueTypeToConvert.IsValueType && !valueTypeToConvert.IsNullableOfT());
System\Text\Json\Serialization\Converters\Value\SByteConverter.cs (1)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\SingleConverter.cs (1)
28
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\StringConverter.cs (1)
30
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\TimeOnlyConverter.cs (5)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
33
Debug.
Assert
(reader.TokenType is JsonTokenType.String or JsonTokenType.PropertyName);
73
Debug.
Assert
(TimeOnly.MinValue.ToTimeSpan() <= timespan && timespan <= TimeOnly.MaxValue.ToTimeSpan());
82
Debug.
Assert
(result);
92
Debug.
Assert
(result);
System\Text\Json\Serialization\Converters\Value\TimeSpanConverter.cs (4)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
33
Debug.
Assert
(reader.TokenType is JsonTokenType.String or JsonTokenType.PropertyName);
80
Debug.
Assert
(result);
90
Debug.
Assert
(result);
System\Text\Json\Serialization\Converters\Value\UInt128Converter.cs (2)
80
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
151
Debug.
Assert
(formattedSuccessfully);
System\Text\Json\Serialization\Converters\Value\UInt16Converter.cs (1)
28
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\UInt32Converter.cs (1)
28
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\UInt64Converter.cs (1)
27
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverterFactory.cs (1)
35
Debug.
Assert
(CanConvert(type));
System\Text\Json\Serialization\Converters\Value\UriConverter.cs (1)
28
Debug.
Assert
(reader.TokenType is JsonTokenType.PropertyName);
System\Text\Json\Serialization\Converters\Value\VersionConverter.cs (3)
35
Debug.
Assert
(reader.TokenType is JsonTokenType.PropertyName or JsonTokenType.String);
94
Debug.
Assert
(formattedSuccessfully && charsWritten >= MinimumVersionLength);
120
Debug.
Assert
(formattedSuccessfully && charsWritten >= MinimumVersionLength);
System\Text\Json\Serialization\IgnoreReferenceResolver.cs (2)
16
Debug.
Assert
(_stackForCycleDetection != null);
29
Debug.
Assert
(!_stackForCycleDetection.Contains(wrappedValue));
System\Text\Json\Serialization\JsonConverter.cs (1)
116
Debug.
Assert
(this is not JsonConverterFactory);
System\Text\Json\Serialization\JsonConverter.MetadataHandling.cs (23)
16
Debug.
Assert
(!IsValueType);
17
Debug.
Assert
(CanHaveMetadata);
18
Debug.
Assert
((state.Current.MetadataPropertyNames & MetadataPropertyName.Type) != 0);
19
Debug.
Assert
(state.Current.PolymorphicSerializationState != PolymorphicSerializationState.PolymorphicReEntryStarted);
20
Debug.
Assert
(jsonTypeInfo.PolymorphicTypeResolver?.UsesTypeDiscriminators == true);
27
Debug.
Assert
(!state.IsContinuation);
28
Debug.
Assert
(state.PolymorphicTypeDiscriminator != null);
33
Debug.
Assert
(Type!.IsAssignableFrom(resolvedType.Type));
51
Debug.
Assert
(Type!.IsAssignableFrom(polymorphicConverter.Type));
55
Debug.
Assert
(state.Current.PolymorphicJsonTypeInfo is null);
71
Debug.
Assert
(!IsValueType);
72
Debug.
Assert
(value != null && Type!.IsAssignableFrom(value.GetType()));
73
Debug.
Assert
(CanBePolymorphic || jsonTypeInfo.PolymorphicTypeResolver != null);
74
Debug.
Assert
(state.PolymorphicTypeDiscriminator is null);
81
Debug.
Assert
(!state.IsContinuation);
87
Debug.
Assert
(Type == typeof(object));
94
Debug.
Assert
(jsonTypeInfo.Converter.CanHaveMetadata);
121
Debug.
Assert
(state.IsContinuation);
123
Debug.
Assert
(Type.IsAssignableFrom(polymorphicConverter.Type));
127
Debug.
Assert
(state.IsContinuation);
140
Debug.
Assert
(!IsValueType);
141
Debug.
Assert
(!state.IsContinuation);
142
Debug.
Assert
(value != null);
System\Text\Json\Serialization\JsonConverterFactory.cs (1)
41
Debug.
Assert
(CanConvert(typeToConvert));
System\Text\Json\Serialization\JsonConverterOfT.cs (22)
170
Debug.
Assert
(!state.IsContinuation);
212
Debug.
Assert
(IsInternalConverter);
224
Debug.
Assert
(this is ObjectConverter);
226
Debug.
Assert
(success);
239
Debug.
Assert
(Type == state.Current.JsonTypeInfo.Type);
245
Debug.
Assert
(state.Current.OriginalTokenType == JsonTokenType.None);
248
Debug.
Assert
(state.Current.OriginalDepth == 0);
281
Debug.
Assert
(ReferenceEquals(originalJsonTypeInfo, state.Current.JsonTypeInfo));
348
Debug.
Assert
(!state.IsContinuation);
365
Debug.
Assert
(IsInternalConverter);
382
Debug.
Assert
(jsonTypeInfo.Converter.Type == Type);
419
Debug.
Assert
(Type == state.Current.JsonTypeInfo.Type);
425
Debug.
Assert
(state.Current.OriginalDepth == 0);
444
Debug.
Assert
(ReferenceEquals(originalJsonTypeInfo, state.Current.JsonTypeInfo));
451
Debug.
Assert
(value != null);
465
Debug.
Assert
(Type == typeof(Nodes.JsonObject));
481
Debug.
Assert
(state.Current.OriginalDepth == 0);
505
Debug.
Assert
(isValueConverter == (ConverterStrategy == ConverterStrategy.Value));
553
Debug.
Assert
(reader.TokenType == tokenType);
605
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
647
Debug.
Assert
(!IsInternalConverter && Type == typeof(string));
673
Debug.
Assert
(defaultConverter != this);
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (3)
34
Debug.
Assert
(inputType != null);
54
Debug.
Assert
(context != null);
55
Debug.
Assert
(inputType != null);
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (12)
27
Debug.
Assert
(state.Current.ObjectState == StackFrameObjectState.StartToken);
28
Debug.
Assert
(state.Current.CanContainMetadata);
74
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
161
Debug.
Assert
(state.Current.LatestMetadataPropertyName == MetadataPropertyName.None);
209
Debug.
Assert
(state.Current.PropertyState == StackFramePropertyState.ReadValue);
242
Debug.
Assert
(state.PolymorphicTypeDiscriminator == null);
285
Debug.
Assert
(state.Current.LatestMetadataPropertyName == MetadataPropertyName.None);
508
Debug.
Assert
(metadataValueKind != JsonValueKind.Undefined);
532
Debug.
Assert
(state.Current.MetadataPropertyNames is MetadataPropertyName.None || state.Current.MetadataPropertyNames.HasFlag(MetadataPropertyName.Values));
544
Debug.
Assert
(reader.TokenType == JsonTokenType.PropertyName);
553
Debug.
Assert
(!typeof(T).IsValueType);
554
Debug.
Assert
(state.ReferenceId != null);
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (6)
113
Debug.
Assert
(jsonPropertyInfo != null);
123
Debug.
Assert
(underlyingIDictionaryType.IsGenericType);
124
Debug.
Assert
(genericArgs.Length == 2);
125
Debug.
Assert
(genericArgs[0].UnderlyingSystemType == typeof(string));
126
Debug.
Assert
(
149
Debug.
Assert
(jsonPropertyInfo.Set != null);
System\Text\Json\Serialization\JsonSerializer.Read.Span.cs (4)
152
Debug.
Assert
(jsonTypeInfo.IsConfigured);
163
Debug.
Assert
(reader.BytesConsumed == (actualByteCount ?? utf8Json.Length));
169
Debug.
Assert
(jsonTypeInfo.IsConfigured);
180
Debug.
Assert
(reader.BytesConsumed == (actualByteCount ?? utf8Json.Length));
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (2)
470
Debug.
Assert
(jsonTypeInfo.IsConfigured);
480
Debug.
Assert
(queueTypeInfo.IsConfigured);
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (2)
428
Debug.
Assert
(jsonTypeInfo.IsConfigured);
459
Debug.
Assert
(jsonTypeInfo.IsConfigured);
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (5)
287
Debug.
Assert
(jsonTypeInfo.IsConfigured);
312
Debug.
Assert
(jsonTypeInfo.IsConfigured);
389
Debug.
Assert
(reader.TokenType is JsonTokenType.EndObject or JsonTokenType.EndArray);
417
Debug.
Assert
(payloadLength > 1);
468
Debug.
Assert
(!valueSpan.IsEmpty ^ !valueSequence.IsEmpty);
System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs (2)
140
Debug.
Assert
(jsonTypeInfo.IsConfigured);
157
Debug.
Assert
(jsonTypeInfo.IsConfigured);
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (2)
133
Debug.
Assert
(jsonTypeInfo.IsConfigured);
154
Debug.
Assert
(jsonTypeInfo.IsConfigured);
System\Text\Json\Serialization\JsonSerializer.Write.Element.cs (2)
134
Debug.
Assert
(jsonTypeInfo.IsConfigured);
153
Debug.
Assert
(options != null);
System\Text\Json\Serialization\JsonSerializer.Write.HandleMetadata.cs (8)
22
Debug.
Assert
(jsonConverter.CanHaveMetadata);
23
Debug.
Assert
(!state.IsContinuation);
24
Debug.
Assert
(state.CurrentContainsMetadata);
37
Debug.
Assert
(state.PolymorphicTypeResolver != null);
50
Debug.
Assert
(discriminator is int);
58
Debug.
Assert
(writtenMetadata != MetadataPropertyName.None);
79
Debug.
Assert
(state.NewReferenceId == null);
82
Debug.
Assert
(referenceId != null);
System\Text\Json\Serialization\JsonSerializer.Write.Node.cs (2)
135
Debug.
Assert
(jsonTypeInfo.IsConfigured);
153
Debug.
Assert
(jsonTypeInfo.IsConfigured);
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (2)
157
Debug.
Assert
(jsonTypeInfo.IsConfigured);
174
Debug.
Assert
(jsonTypeInfo.IsConfigured);
System\Text\Json\Serialization\JsonSerializerContext.cs (2)
42
Debug.
Assert
(!options.IsReadOnly);
54
Debug.
Assert
(options != null);
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (8)
27
Debug.
Assert
(IsReadOnly);
167
Debug.
Assert
(rootValue != null);
193
Debug.
Assert
(IsReadOnly);
280
Debug.
Assert
(!entry.HasResult);
305
Debug.
Assert
(!entry.HasResult);
408
Debug.
Assert
(options._typeInfoResolver != null);
442
Debug.
Assert
(weakRef.TryGetTarget(out _) is false);
492
Debug.
Assert
(left != null && right != null);
System\Text\Json\Serialization\JsonSerializerOptions.cs (5)
641
Debug.
Assert
(value >= 0);
790
Debug.
Assert
(IsReadOnly);
791
Debug.
Assert
(TypeInfoResolver != null);
861
Debug.
Assert
(IsReadOnly);
910
Debug.
Assert
(_typeInfoResolver != null);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (5)
84
Debug.
Assert
(converters.Count <= NumberOfSimpleConverters);
115
Debug.
Assert
(converter != null);
135
Debug.
Assert
(memberInfo is FieldInfo or PropertyInfo);
136
Debug.
Assert
(typeToConvert != null);
201
Debug.
Assert
(converter != null);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (11)
92
Debug.
Assert
(!typeInfo.IsReadOnly);
93
Debug.
Assert
(typeInfo.Kind is JsonTypeInfoKind.Object);
136
Debug.
Assert
(memberType is MemberTypes.Field or MemberTypes.Property);
159
Debug.
Assert
(!typeInfo.IsReadOnly);
160
Debug.
Assert
(currentType.IsAssignableFrom(typeInfo.Type));
225
Debug.
Assert
(jsonPropertyInfo.Name != null);
294
Debug.
Assert
(typeInfo.Converter.ConstructorInfo != null);
306
Debug.
Assert
(typeInfo.Converter.ConstructorInfo.DeclaringType != null);
335
Debug.
Assert
(jsonPropertyInfo.AttributeProvider == null);
415
Debug.
Assert
(memberInfo is FieldInfo or PropertyInfo);
435
Debug.
Assert
(fieldInfo.IsPublic || useNonPublicAccessors);
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (8)
99
Debug.
Assert
(fsharpCoreAssembly.GetName().Name == "FSharp.Core");
149
Debug.
Assert
(typeof(TFSharpOption).GetGenericTypeDefinition() == _fsharpOptionType);
158
Debug.
Assert
(typeof(TFSharpOption).GetGenericTypeDefinition() == _fsharpOptionType);
168
Debug.
Assert
(typeof(TFSharpValueOption).GetGenericTypeDefinition() == _fsharpValueOptionType);
177
Debug.
Assert
(typeof(TFSharpOption).GetGenericTypeDefinition() == _fsharpValueOptionType);
186
Debug.
Assert
(typeof(TFSharpList).GetGenericTypeDefinition() == _fsharpListType);
194
Debug.
Assert
(typeof(TFSharpSet).GetGenericTypeDefinition() == _fsharpSetType);
202
Debug.
Assert
(typeof(TFSharpMap).GetGenericTypeDefinition() == _fsharpMapType);
System\Text\Json\Serialization\Metadata\JsonDerivedType.cs (1)
47
Debug.
Assert
(typeDiscriminator is null or int or string);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (7)
86
Debug.
Assert
(typeInfo.Kind != JsonTypeInfoKind.None);
115
Debug.
Assert
(typeInfo.Kind is JsonTypeInfoKind.Object);
116
Debug.
Assert
(!typeInfo.IsReadOnly);
130
Debug.
Assert
(typeInfo.Kind is JsonTypeInfoKind.Object);
131
Debug.
Assert
(!typeInfo.IsConfigured);
132
Debug.
Assert
(typeInfo.Type != JsonTypeInfo.ObjectType);
133
Debug.
Assert
(typeInfo.Converter.ElementType is null);
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (1)
40
Debug.
Assert
(matchingProperty.IsConfigured);
System\Text\Json\Serialization\Metadata\JsonParameterInfoOfT.cs (2)
21
Debug.
Assert
(parameterInfoValues.ParameterType == typeof(T));
22
Debug.
Assert
(matchingPropertyInfo.IsConfigured);
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (25)
29
Debug.
Assert
(_effectiveConverter != null);
142
Debug.
Assert
(!IsConfigured);
296
Debug.
Assert
(declaringTypeInfo is null || declaringType.IsAssignableFrom(declaringTypeInfo.Type));
308
Debug.
Assert
(!info.IsForTypeInfo);
309
Debug.
Assert
(!info.CanSerialize);
310
Debug.
Assert
(!info.CanDeserialize);
331
Debug.
Assert
(ParentTypeInfo != null);
332
Debug.
Assert
(!IsConfigured);
374
Debug.
Assert
(!IgnoreNullTokensOnRead);
388
Debug.
Assert
(Name != null);
406
Debug.
Assert
(Options.DefaultIgnoreCondition == JsonIgnoreCondition.Never);
432
Debug.
Assert
(MemberType is 0 or MemberTypes.Field or MemberTypes.Property);
466
Debug.
Assert
(!ParentTypeInfo.IsConfigured);
562
Debug.
Assert
(_jsonTypeInfo != null);
563
Debug.
Assert
(_jsonTypeInfo.IsConfigurationStarted);
609
Debug.
Assert
(EffectiveConverter.ElementType != null);
674
Debug.
Assert
(MemberType == MemberTypes.Property || MemberType == MemberTypes.Field || MemberType == default);
712
Debug.
Assert
(_name != null);
797
Debug.
Assert
(propValue is Nodes.JsonObject);
812
Debug.
Assert
(dictionaryValueInfo is JsonTypeInfo<TValue>);
823
Debug.
Assert
(this == state.Current.JsonTypeInfo.ExtensionDataProperty);
879
Debug.
Assert
(_jsonTypeInfo?.IsConfigurationStarted == true);
978
Debug.
Assert
(IsConfigured);
979
Debug.
Assert
(IsRequired);
984
Debug.
Assert
(!IsConfigured);
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (14)
38
Debug.
Assert
(getter is null or Func<object, object?> or Func<object, T>);
39
Debug.
Assert
(!IsConfigured);
61
Debug.
Assert
(setter is null or Action<object, object?> or Action<object, T>);
62
Debug.
Assert
(!IsConfigured);
92
Debug.
Assert
(predicate is null or Func<object, object?, bool> or Func<object, T?, bool>);
93
Debug.
Assert
(!IsConfigured);
122
Debug.
Assert
(_typedEffectiveConverter != null);
136
Debug.
Assert
(jsonTypeInfo is JsonTypeInfo<T>);
154
Debug.
Assert
(HasGetter);
177
Debug.
Assert
(value == null);
197
Debug.
Assert
(PropertyTypeCanBeNull);
269
Debug.
Assert
(CanDeserialize || EffectiveObjectCreationHandling == JsonObjectCreationHandling.Populate);
288
Debug.
Assert
(!state.IsContinuation);
351
Debug.
Assert
(!state.IsContinuation);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.Cache.cs (12)
42
Debug.
Assert
(IsConfigured);
81
Debug.
Assert
(jsonPropertyInfo.PropertyType == propertyType);
236
Debug.
Assert
(info != null);
315
Debug.
Assert
(ParameterCache != null);
319
Debug.
Assert
(info != null);
325
Debug.
Assert
(key == GetKey(info.NameAsUtf8Bytes.AsSpan()));
338
Debug.
Assert
(key == GetKey(info.NameAsUtf8Bytes!.AsSpan()));
344
Debug.
Assert
(info == null);
472
Debug.
Assert
(frame.PropertyRefCache != null);
485
Debug.
Assert
(replacementList.Count <= PropertyNameCountCacheThreshold);
508
Debug.
Assert
(frame.CtorArgumentState!.ParameterRefCache != null);
521
Debug.
Assert
(replacementList.Count <= ParameterNameCountCacheThreshold);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (30)
250
Debug.
Assert
(!IsReadOnly);
360
Debug.
Assert
(IsConfigured);
361
Debug.
Assert
(_elementTypeInfo is null or { IsConfigurationStarted: true });
372
Debug.
Assert
(!IsReadOnly);
373
Debug.
Assert
(value is null || value.Type == ElementType);
386
Debug.
Assert
(IsConfigured);
387
Debug.
Assert
(_keyTypeInfo is null or { IsConfigurationStarted: true });
398
Debug.
Assert
(!IsReadOnly);
399
Debug.
Assert
(value is null || value.Type == KeyType);
674
Debug.
Assert
(Options.IsReadOnly);
675
Debug.
Assert
(IsReadOnly);
722
Debug.
Assert
(IsConfigured);
723
Debug.
Assert
(Type != typeof(object));
750
Debug.
Assert
(IsReadOnly);
751
Debug.
Assert
(!IsConfigured);
763
Debug.
Assert
(property.IsConfigured);
787
Debug.
Assert
(IsCompatibleWithCurrentOptions);
950
Debug.
Assert
(jsonTypeInfo.Type == type);
1029
Debug.
Assert
(obj is ParameterLookupKey);
1049
Debug.
Assert
(Kind == JsonTypeInfoKind.Object);
1050
Debug.
Assert
(PropertyCache is null);
1051
Debug.
Assert
(ExtensionDataProperty is null);
1062
Debug.
Assert
(property.ParentTypeInfo == this);
1120
Debug.
Assert
(Kind == JsonTypeInfoKind.Object);
1122
Debug.
Assert
(PropertyCache is not null);
1123
Debug.
Assert
(ParameterCache is null);
1168
Debug.
Assert
(matchingEntry.JsonPropertyInfo != null);
1306
Debug.
Assert
(converter is ObjectConverter);
1317
Debug.
Assert
(converter is JsonConverterFactory);
1364
Debug.
Assert
(!_jsonTypeInfo.IsConfigured);
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (6)
60
Debug.
Assert
(createObject is null or Func<object> or Func<T>);
66
Debug.
Assert
(_createObject == null);
67
Debug.
Assert
(_typedCreateObject == null);
73
Debug.
Assert
(_createObject is null);
74
Debug.
Assert
(_typedCreateObject == null);
93
Debug.
Assert
(createObject is Func<object>);
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.ReadHelper.cs (4)
21
Debug.
Assert
(IsConfigured);
27
Debug.
Assert
(IsConfigured);
55
Debug.
Assert
(IsConfigured);
108
Debug.
Assert
(reader.BytesConsumed <= bufferState.Bytes.Length);
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.WriteHelpers.cs (24)
24
Debug.
Assert
(IsConfigured);
25
Debug.
Assert
(rootValueBoxed is null || rootValueBoxed is T);
33
Debug.
Assert
(SerializeHandler != null);
34
Debug.
Assert
(Converter is JsonMetadataServicesConverter<T>);
47
Debug.
Assert
(typeof(T) == typeof(object));
57
Debug.
Assert
(success);
85
Debug.
Assert
(IsConfigured);
86
Debug.
Assert
(rootValueBoxed is null || rootValueBoxed is T);
92
Debug.
Assert
(SerializeHandler != null);
93
Debug.
Assert
(CanUseSerializeHandler);
94
Debug.
Assert
(Converter is JsonMetadataServicesConverter<T>);
129
Debug.
Assert
(typeof(T) == typeof(object));
158
Debug.
Assert
(!isFinalBlock);
159
Debug.
Assert
(state.PendingTask is not null);
199
Debug.
Assert
(writer.BytesPending == 0);
223
Debug.
Assert
(IsConfigured);
224
Debug.
Assert
(rootValueBoxed is null || rootValueBoxed is T);
230
Debug.
Assert
(SerializeHandler != null);
231
Debug.
Assert
(CanUseSerializeHandler);
232
Debug.
Assert
(Converter is JsonMetadataServicesConverter<T>);
258
Debug.
Assert
(typeof(T) == typeof(object));
283
Debug.
Assert
(state.PendingTask == null);
291
Debug.
Assert
(writer.BytesPending == 0);
328
Debug.
Assert
(CanUseSerializeHandler);
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverWithAddedModifiers.cs (1)
15
Debug.
Assert
(modifiers.Length > 0);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (12)
37
Debug.
Assert
(typeDiscriminator is null or int or string);
103
Debug.
Assert
(BaseType.IsAssignableFrom(runtimeType));
147
Debug.
Assert
(typeDiscriminator is int or string);
148
Debug.
Assert
(UsesTypeDiscriminators);
149
Debug.
Assert
(_discriminatorIdtoType != null);
153
Debug.
Assert
(typeDiscriminator.Equals(result.TypeDiscriminator));
183
Debug.
Assert
(!type.IsAbstract);
184
Debug.
Assert
(BaseType.IsAssignableFrom(type));
185
Debug.
Assert
(UnknownDerivedTypeHandling == JsonUnknownDerivedTypeHandling.FallBackToNearestAncestor);
197
Debug.
Assert
(candidate != null);
238
Debug.
Assert
(typeInfo.IsConfigured);
318
Debug.
Assert
(typeDiscriminator is null or int or string);
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (18)
25
Debug.
Assert
(type != null);
26
Debug.
Assert
(constructorInfo is null || constructorInfo.GetParameters().Length == 0);
49
Debug.
Assert
(type.IsValueType);
82
Debug.
Assert
(type != null);
83
Debug.
Assert
(!type.IsAbstract);
84
Debug.
Assert
(constructor.IsPublic && !constructor.IsStatic);
125
Debug.
Assert
(type != null);
126
Debug.
Assert
(!type.IsAbstract);
127
Debug.
Assert
(!constructor.IsStatic);
143
Debug.
Assert
(index <= JsonConstants.UnboxedParameterCountThreshold);
252
Debug.
Assert
(realMethod != null);
255
Debug.
Assert
(declaringType != null);
282
Debug.
Assert
(!runtimePropertyType.IsValueType);
298
Debug.
Assert
(realMethod != null);
301
Debug.
Assert
(declaringType != null);
319
Debug.
Assert
(!runtimePropertyType.IsValueType);
336
Debug.
Assert
(declaringType != null);
370
Debug.
Assert
(declaringType != null);
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (7)
23
Debug.
Assert
(type != null);
24
Debug.
Assert
(ctorInfo is null || ctorInfo.GetParameters().Length == 0);
45
Debug.
Assert
(!type.IsAbstract);
46
Debug.
Assert
(constructor.DeclaringType == type && constructor.IsPublic && !constructor.IsStatic);
80
Debug.
Assert
(!type.IsAbstract);
81
Debug.
Assert
(constructor.DeclaringType == type && constructor.IsPublic && !constructor.IsStatic);
85
Debug.
Assert
(parameterCount <= JsonConstants.UnboxedParameterCountThreshold);
System\Text\Json\Serialization\PreserveReferenceResolver.cs (3)
33
Debug.
Assert
(_referenceIdToObjectMap != null);
43
Debug.
Assert
(_objectToReferenceIdMap != null);
62
Debug.
Assert
(_referenceIdToObjectMap != null);
System\Text\Json\Serialization\ReadBufferState.cs (2)
107
Debug.
Assert
(bytesConsumed <= _count);
153
Debug.
Assert
(_buffer.Length >= JsonConstants.Utf8Bom.Length);
System\Text\Json\Serialization\ReadStack.cs (14)
29
Debug.
Assert
(_count > 1);
30
Debug.
Assert
(_stack is not null);
166
Debug.
Assert
(_count > 0);
167
Debug.
Assert
(JsonPath() is not null);
198
Debug.
Assert
(_continuationCount == 0);
212
Debug.
Assert
(!IsContinuation);
213
Debug.
Assert
(Current.PolymorphicJsonTypeInfo == null);
214
Debug.
Assert
(Current.PolymorphicSerializationState == PolymorphicSerializationState.None);
232
Debug.
Assert
(Current.PolymorphicJsonTypeInfo != null);
233
Debug.
Assert
(Current.PolymorphicSerializationState == PolymorphicSerializationState.PolymorphicReEntrySuspended);
246
Debug.
Assert
(Current.PolymorphicJsonTypeInfo != null);
247
Debug.
Assert
(Current.PolymorphicSerializationState == PolymorphicSerializationState.PolymorphicReEntryStarted);
375
Debug.
Assert
(!IsContinuation);
385
Debug.
Assert
(Current.JsonTypeInfo.UsesParameterizedConstructor);
System\Text\Json\Serialization\ReadStackFrame.cs (3)
133
Debug.
Assert
(RequiredPropertiesSet != null);
141
Debug.
Assert
(RequiredPropertiesSet == null);
154
Debug.
Assert
(RequiredPropertiesSet != null);
System\Text\Json\Serialization\WriteStack.cs (13)
34
Debug.
Assert
(_count - _indexOffset > 0);
35
Debug.
Assert
(_stack is not null);
148
Debug.
Assert
(!IsContinuation);
149
Debug.
Assert
(CurrentDepth == 0);
160
Debug.
Assert
(options.ReferenceHandler != null);
177
Debug.
Assert
(Current.PolymorphicSerializationState != PolymorphicSerializationState.PolymorphicReEntryStarted);
185
Debug.
Assert
(Current.PolymorphicSerializationState != PolymorphicSerializationState.PolymorphicReEntrySuspended);
233
Debug.
Assert
(_count > 0);
265
Debug.
Assert
(_continuationCount == 0);
280
Debug.
Assert
(CompletedAsyncDisposables?.Count > 0);
311
Debug.
Assert
(Current.AsyncDisposable is null);
317
Debug.
Assert
(_stack[i].AsyncDisposable is null);
365
Debug.
Assert
(!(collectionEnumerator is not null && asyncDisposable is not null));
System\Text\Json\Serialization\WriteStackFrame.cs (4)
120
Debug.
Assert
(PolymorphicSerializationState == PolymorphicSerializationState.None);
142
Debug.
Assert
(PolymorphicSerializationState is PolymorphicSerializationState.None or PolymorphicSerializationState.PolymorphicReEntryStarted);
154
Debug.
Assert
(PolymorphicSerializationState == PolymorphicSerializationState.PolymorphicReEntrySuspended);
155
Debug.
Assert
(PolymorphicTypeInfo is not null);
System\Text\Json\ThrowHelper.cs (8)
129
Debug.
Assert
(value.Length > JsonConstants.MaxUnescapedTokenSize);
143
Debug.
Assert
(value.Length > JsonConstants.MaxCharacterTokenSize);
157
Debug.
Assert
(value.Length > JsonConstants.MaxUnescapedTokenSize);
171
Debug.
Assert
(value.Length > JsonConstants.MaxCharacterTokenSize);
186
Debug.
Assert
(propertyName.Length > JsonConstants.MaxCharacterTokenSize);
195
Debug.
Assert
(currentDepth >= maxDepth);
239
Debug.
Assert
(propertyName.Length > JsonConstants.MaxCharacterTokenSize);
576
Debug.
Assert
(token == JsonConstants.CloseBracket || token == JsonConstants.CloseBrace);
System\Text\Json\ThrowHelper.Serialization.cs (11)
137
Debug.
Assert
(propertyName == null);
141
Debug.
Assert
(propertyName != null);
150
Debug.
Assert
(memberInfo == null);
154
Debug.
Assert
(memberInfo != null);
277
Debug.
Assert
(parent.PropertyCache != null);
370
Debug.
Assert
(!jsonPropertyInfo.IsForTypeInfo);
409
Debug.
Assert
(ex.Path == null);
442
Debug.
Assert
(ex.Path is null); // do not overwrite existing path information
480
Debug.
Assert
(ex.Path is null); // do not overwrite existing path information
543
Debug.
Assert
(!message.Contains(" Path: "));
571
Debug.
Assert
(!message.Contains(" Path: "));
System\Text\Json\Writer\JsonWriterHelper.cs (5)
15
Debug.
Assert
(buffer.Length >= indent);
158
Debug.
Assert
(!utf8FormattedNumber.IsEmpty);
211
Debug.
Assert
(i < utf8FormattedNumber.Length);
291
Debug.
Assert
(status is OperationStatus.Done or OperationStatus.DestinationTooSmall or OperationStatus.InvalidData);
292
Debug.
Assert
(charsRead == source.Length || status is not OperationStatus.Done);
System\Text\Json\Writer\JsonWriterHelper.Date.cs (4)
19
Debug.
Assert
(result);
28
Debug.
Assert
(result);
51
Debug.
Assert
(buffer.Length == maxDateTimeLength ||
102
Debug.
Assert
(buffer[maxDateTimeLength] == 'Z');
System\Text\Json\Writer\JsonWriterHelper.Escaping.cs (16)
77
Debug.
Assert
(textLength > 0);
78
Debug.
Assert
(firstIndexToEscape >= 0 && firstIndexToEscape < textLength);
84
Debug.
Assert
(encoder != null);
88
Debug.
Assert
(result != OperationStatus.DestinationTooSmall);
89
Debug.
Assert
(result != OperationStatus.NeedMoreData);
96
Debug.
Assert
(encoderBytesConsumed == value.Length);
103
Debug.
Assert
(indexOfFirstByteToEscape >= 0 && indexOfFirstByteToEscape < value.Length);
182
Debug.
Assert
(result);
183
Debug.
Assert
(bytesWritten == 4);
195
Debug.
Assert
(encoder != null);
199
Debug.
Assert
(result != OperationStatus.DestinationTooSmall);
200
Debug.
Assert
(result != OperationStatus.NeedMoreData);
207
Debug.
Assert
(encoderBytesConsumed == value.Length);
214
Debug.
Assert
(indexOfFirstByteToEscape >= 0 && indexOfFirstByteToEscape < value.Length);
260
Debug.
Assert
(IsAsciiValue(value));
296
Debug.
Assert
(charsWritten == 4);
System\Text\Json\Writer\Utf8JsonWriter.cs (35)
254
Debug.
Assert
(_output is null && _stream is null && _arrayBufferWriter is null);
306
Debug.
Assert
(_arrayBufferWriter != null);
330
Debug.
Assert
(_output != null);
420
Debug.
Assert
(_arrayBufferWriter != null);
444
Debug.
Assert
(_output != null);
515
Debug.
Assert
(_options.Indented || !_options.SkipValidation);
528
Debug.
Assert
(!_options.SkipValidation);
541
Debug.
Assert
(_tokenType != JsonTokenType.None && _tokenType != JsonTokenType.StartArray);
547
Debug.
Assert
(_tokenType != JsonTokenType.PropertyName);
548
Debug.
Assert
(_tokenType != JsonTokenType.StartObject);
561
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
618
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
682
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
710
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
711
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
837
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
865
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
866
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
942
Debug.
Assert
(_options.Indented || !_options.SkipValidation);
954
Debug.
Assert
(!_options.SkipValidation);
969
Debug.
Assert
(_tokenType != JsonTokenType.None);
975
Debug.
Assert
(token == JsonConstants.CloseBrace);
1005
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
1006
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.None);
1053
Debug.
Assert
(token == JsonConstants.OpenBrace);
1061
Debug.
Assert
(requiredSize > 0);
1071
Debug.
Assert
(BytesPending != 0);
1075
Debug.
Assert
(_arrayBufferWriter != null);
1082
Debug.
Assert
(_memory.Length >= sizeHint);
1086
Debug.
Assert
(_output != null);
1103
Debug.
Assert
(_memory.Length == 0);
1104
Debug.
Assert
(BytesPending == 0);
1110
Debug.
Assert
(_arrayBufferWriter != null);
1112
Debug.
Assert
(_memory.Length >= sizeHint);
1116
Debug.
Assert
(_output != null);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (15)
23
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
109
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
125
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
139
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
140
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
162
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
163
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
213
Debug.
Assert
(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - encodedLength - 6);
248
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - encodedLength - 6);
283
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
287
Debug.
Assert
(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - indent - encodedLength - 7 - _newLineLength);
305
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
333
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
337
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - encodedLength - 7 - _newLineLength);
355
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (15)
27
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
116
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
132
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
146
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
147
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
169
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
170
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
218
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDateTimeOffsetLength - 6);
252
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDateTimeOffsetLength - 6);
287
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
289
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength);
307
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
336
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
338
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength);
355
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (15)
26
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
115
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
131
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
145
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
146
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
168
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
169
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
217
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDateTimeOffsetLength - 6);
251
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDateTimeOffsetLength - 6);
286
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
288
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength);
306
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
335
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
337
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 - _newLineLength);
354
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (20)
26
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
115
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
131
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
145
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
146
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
168
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
169
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
217
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDecimalLength - 4);
242
Debug.
Assert
(result);
248
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDecimalLength - 4);
273
Debug.
Assert
(result);
280
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
282
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDecimalLength - 5 - _newLineLength);
300
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
319
Debug.
Assert
(result);
326
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
328
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDecimalLength - 5 - _newLineLength);
345
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
365
Debug.
Assert
(result);
373
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (20)
26
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
119
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
135
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
149
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
150
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
172
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
173
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
221
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatDoubleLength - 4);
246
Debug.
Assert
(result);
252
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatDoubleLength - 4);
277
Debug.
Assert
(result);
284
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
286
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDoubleLength - 5 - _newLineLength);
304
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
323
Debug.
Assert
(result);
330
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
332
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDoubleLength - 5 - _newLineLength);
349
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
369
Debug.
Assert
(result);
378
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (20)
26
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
119
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
135
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
149
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
150
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
172
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
173
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
221
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatSingleLength - 4);
246
Debug.
Assert
(result);
252
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatSingleLength - 4);
277
Debug.
Assert
(result);
284
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
286
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatSingleLength - 5 - _newLineLength);
304
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
323
Debug.
Assert
(result);
330
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
332
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatSingleLength - 5 - _newLineLength);
349
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
369
Debug.
Assert
(result);
377
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (6)
86
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
102
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
116
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
117
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
139
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
140
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (20)
26
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
115
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
131
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
145
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
146
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
168
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
169
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
217
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatGuidLength - 6);
244
Debug.
Assert
(result);
252
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatGuidLength - 6);
279
Debug.
Assert
(result);
288
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
290
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatGuidLength - 7 - _newLineLength);
308
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
329
Debug.
Assert
(result);
338
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
340
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatGuidLength - 7 - _newLineLength);
357
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
379
Debug.
Assert
(result);
389
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (11)
41
Debug.
Assert
(_tokenType != JsonTokenType.StartObject);
54
Debug.
Assert
(_tokenType != JsonTokenType.StartObject);
63
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - 5);
92
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
94
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - 6 - _newLineLength);
111
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
135
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - 5);
164
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
166
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 6 - _newLineLength);
184
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
209
Debug.
Assert
(status == OperationStatus.Done);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (23)
38
Debug.
Assert
(escapedPropertyNameSection.Length <= JsonConstants.MaxUnescapedTokenSize - 3);
51
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
237
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
253
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
267
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
268
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
290
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
291
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
339
Debug.
Assert
(value.Length <= JsonConstants.MaxUnescapedTokenSize);
340
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - value.Length - 4);
370
Debug.
Assert
(value.Length <= JsonConstants.MaxUnescapedTokenSize);
371
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - value.Length - 4);
403
Debug.
Assert
(value.Length <= JsonConstants.MaxUnescapedTokenSize);
404
Debug.
Assert
(escapedPropertyNameSection.Length < int.MaxValue - value.Length - 1);
430
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
432
Debug.
Assert
(value.Length <= JsonConstants.MaxUnescapedTokenSize);
433
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - value.Length - 5 - _newLineLength);
451
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
476
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
478
Debug.
Assert
(value.Length <= JsonConstants.MaxUnescapedTokenSize);
479
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - value.Length - 5 - _newLineLength);
496
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
524
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (20)
26
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
191
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
207
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
221
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
222
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
244
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
245
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
293
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatInt64Length - 4);
318
Debug.
Assert
(result);
324
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatInt64Length - 4);
349
Debug.
Assert
(result);
356
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
358
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatInt64Length - 5 - _newLineLength);
376
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
395
Debug.
Assert
(result);
402
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
404
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatInt64Length - 5 - _newLineLength);
421
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
441
Debug.
Assert
(result);
453
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (76)
33
Debug.
Assert
(escapedPropertyNameSection.Length <= JsonConstants.MaxUnescapedTokenSize - 3);
45
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
98
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2);
115
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
161
Debug.
Assert
(escapedPropertyName.Length <= JsonConstants.MaxEscapedTokenSize);
162
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue - 4) / JsonConstants.MaxExpansionFactorWhileTranscoding);
190
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
192
Debug.
Assert
(escapedPropertyName.Length <= JsonConstants.MaxEscapedTokenSize);
193
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue - 5 - indent - _newLineLength) / JsonConstants.MaxExpansionFactorWhileTranscoding);
247
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2);
274
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
322
Debug.
Assert
(escapedPropertyName.Length <= JsonConstants.MaxEscapedTokenSize);
323
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - 4);
352
Debug.
Assert
(escapedPropertyNameSection.Length <= JsonConstants.MaxEscapedTokenSize - 3);
353
Debug.
Assert
(escapedPropertyNameSection.Length < int.MaxValue - 4);
378
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
380
Debug.
Assert
(escapedPropertyName.Length <= JsonConstants.MaxEscapedTokenSize);
381
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - 5 - _newLineLength);
398
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
431
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize && utf8Value.Length <= JsonConstants.MaxUnescapedTokenSize);
604
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
610
Debug.
Assert
(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2);
694
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
700
Debug.
Assert
(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2);
784
Debug.
Assert
(utf8Value.Length <= JsonConstants.MaxUnescapedTokenSize);
790
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2);
856
Debug.
Assert
(utf8Value.Length <= JsonConstants.MaxUnescapedTokenSize);
862
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2);
911
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
912
Debug.
Assert
(firstEscapeIndex >= 0 && firstEscapeIndex < utf8Value.Length);
934
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length);
935
Debug.
Assert
(firstEscapeIndex >= 0 && firstEscapeIndex < value.Length);
957
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
958
Debug.
Assert
(firstEscapeIndex >= 0 && firstEscapeIndex < propertyName.Length);
980
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
981
Debug.
Assert
(firstEscapeIndex >= 0 && firstEscapeIndex < utf8PropertyName.Length);
1006
Debug.
Assert
(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2);
1007
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2);
1025
Debug.
Assert
(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2);
1026
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2);
1044
Debug.
Assert
(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2);
1045
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2);
1063
Debug.
Assert
(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2);
1064
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2);
1079
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length);
1080
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
1139
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
1140
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
1199
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
1200
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
1259
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length);
1260
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
1372
Debug.
Assert
(escapedValue.Length <= JsonConstants.MaxUnescapedTokenSize);
1373
Debug.
Assert
(escapedPropertyName.Length < ((int.MaxValue - 6) / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length);
1407
Debug.
Assert
(escapedValue.Length <= JsonConstants.MaxEscapedTokenSize);
1408
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - escapedValue.Length - 6);
1443
Debug.
Assert
(escapedValue.Length <= JsonConstants.MaxEscapedTokenSize);
1444
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 6);
1479
Debug.
Assert
(escapedValue.Length <= JsonConstants.MaxEscapedTokenSize);
1480
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 6);
1516
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
1518
Debug.
Assert
(escapedValue.Length <= JsonConstants.MaxEscapedTokenSize);
1519
Debug.
Assert
(escapedPropertyName.Length < ((int.MaxValue - 7 - indent - _newLineLength) / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length);
1537
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
1566
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
1568
Debug.
Assert
(escapedValue.Length <= JsonConstants.MaxEscapedTokenSize);
1569
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - escapedValue.Length - 7 - _newLineLength);
1586
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
1617
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
1619
Debug.
Assert
(escapedValue.Length <= JsonConstants.MaxEscapedTokenSize);
1620
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent - _newLineLength);
1638
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
1668
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
1670
Debug.
Assert
(escapedValue.Length <= JsonConstants.MaxEscapedTokenSize);
1671
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent - _newLineLength);
1689
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (20)
27
Debug.
Assert
(utf8PropertyName.Length <= JsonConstants.MaxUnescapedTokenSize);
200
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < propertyName.Length);
216
Debug.
Assert
(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length);
230
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length);
231
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length);
253
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length);
254
Debug.
Assert
(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length);
302
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - JsonConstants.MaximumFormatUInt64Length - 4);
327
Debug.
Assert
(result);
333
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - JsonConstants.MaximumFormatUInt64Length - 4);
358
Debug.
Assert
(result);
365
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
367
Debug.
Assert
(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatUInt64Length - 5 - _newLineLength);
385
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
404
Debug.
Assert
(result);
411
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
413
Debug.
Assert
(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatUInt64Length - 5 - _newLineLength);
430
Debug.
Assert
(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName);
450
Debug.
Assert
(result);
462
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (4)
62
Debug.
Assert
(encodingLength <= int.MaxValue - 3);
67
Debug.
Assert
((uint)maxRequired <= int.MaxValue);
91
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
107
Debug.
Assert
((uint)maxRequired <= int.MaxValue - 3);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (8)
76
Debug.
Assert
(value.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - 4);
93
Debug.
Assert
(status != OperationStatus.DestinationTooSmall);
108
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
110
Debug.
Assert
(value.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 4 - _newLineLength);
134
Debug.
Assert
(status != OperationStatus.DestinationTooSmall);
191
Debug.
Assert
(utf8Value.Length < int.MaxValue - 4);
215
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
217
Debug.
Assert
(utf8Value.Length < int.MaxValue - indent - 4 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTime.cs (1)
69
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTimeOffset.cs (1)
70
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Decimal.cs (4)
59
Debug.
Assert
(result);
66
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
93
Debug.
Assert
(result);
101
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Double.cs (4)
63
Debug.
Assert
(result);
70
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
97
Debug.
Assert
(result);
149
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Float.cs (4)
63
Debug.
Assert
(result);
70
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
97
Debug.
Assert
(result);
149
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (2)
70
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
72
Debug.
Assert
(utf8Value.Length < int.MaxValue - indent - 1 - _newLineLength);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Guid.cs (3)
61
Debug.
Assert
(result);
70
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
100
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Helpers.cs (5)
15
Debug.
Assert
(!_options.SkipValidation);
21
Debug.
Assert
(_tokenType != JsonTokenType.None && _tokenType != JsonTokenType.StartArray);
27
Debug.
Assert
(_tokenType != JsonTokenType.PropertyName);
42
Debug.
Assert
(status == OperationStatus.Done);
43
Debug.
Assert
(consumed == bytes.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Literal.cs (3)
66
Debug.
Assert
(utf8Value.Length <= 5);
89
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
90
Debug.
Assert
(utf8Value.Length <= 5);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (2)
171
Debug.
Assert
(utf8JsonLen < int.MaxValue);
244
Debug.
Assert
(len < int.MaxValue);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.SignedNumber.cs (4)
72
Debug.
Assert
(result);
79
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
106
Debug.
Assert
(result);
114
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (13)
21
Debug.
Assert
(utf8Value.Length <= JsonConstants.MaxUnescapedTokenSize);
86
Debug.
Assert
(valueIdx >= -1 && valueIdx < value.Length);
118
Debug.
Assert
(escapedValue.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - 3);
146
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
148
Debug.
Assert
(escapedValue.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 3 - _newLineLength);
185
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length);
186
Debug.
Assert
(firstEscapeIndexVal >= 0 && firstEscapeIndexVal < value.Length);
233
Debug.
Assert
(valueIdx >= -1 && valueIdx < utf8Value.Length);
265
Debug.
Assert
(escapedValue.Length < int.MaxValue - 3);
293
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
295
Debug.
Assert
(escapedValue.Length < int.MaxValue - indent - 3 - _newLineLength);
332
Debug.
Assert
(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length);
333
Debug.
Assert
(firstEscapeIndexVal >= 0 && firstEscapeIndexVal < utf8Value.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.UnsignedNumber.cs (4)
74
Debug.
Assert
(result);
81
Debug.
Assert
(indent <= _indentLength * _options.MaxDepth);
108
Debug.
Assert
(result);
116
Debug.
Assert
(result);
System\Text\Json\Writer\Utf8JsonWriterCache.cs (4)
66
Debug.
Assert
(t_threadLocalState != null);
73
Debug.
Assert
((rentedWriters == 0) == (ReferenceEquals(state.BufferWriter, bufferWriter) && ReferenceEquals(state.Writer, writer)));
78
Debug.
Assert
(t_threadLocalState != null);
84
Debug.
Assert
((rentedWriters == 0) == ReferenceEquals(state.Writer, writer));
System.Text.Json.SourceGeneration (47)
Helpers\RoslynExtensions.cs (5)
24
Debug.
Assert
(type.FullName != null);
152
Debug.
Assert
(baseType.IsGenericTypeDefinition());
206
Debug.
Assert
(member is IFieldSymbol or IPropertySymbol);
212
Debug.
Assert
(member is IFieldSymbol or IPropertySymbol);
213
Debug.
Assert
(otherMember is IFieldSymbol or IPropertySymbol);
JsonSourceGenerator.Emitter.cs (15)
96
Debug.
Assert
(_typeIndex.Count == 0);
97
Debug.
Assert
(_propertyNames.Count == 0);
98
Debug.
Assert
(!_emitGetConverterForNullablePropertyMethod);
153
Debug.
Assert
(contextClasses.Count > 0);
242
Debug.
Assert
(typeMetadata.ConverterType != null);
263
Debug.
Assert
(typeMetadata.NullableUnderlyingType != null);
320
Debug.
Assert
(!(typeGenerationSpec.ClassType == ClassType.Dictionary && collectionKeyType == null));
325
Debug.
Assert
(collectionValueType != null);
362
Debug.
Assert
(keyTypeFQN != null);
366
Debug.
Assert
(keyTypeFQN != null);
408
Debug.
Assert
(typeGenerationSpec.CollectionValueType != null);
461
Debug.
Assert
(typeGenerationSpec.CollectionKeyType != null);
462
Debug.
Assert
(typeGenerationSpec.CollectionValueType != null);
690
Debug.
Assert
(paramCount > 0);
784
Debug.
Assert
(!_propertyNames.TryGetValue(effectiveJsonPropertyName, out string? existingName) || existingName == propertyNameFieldName);
JsonSourceGenerator.Parser.cs (25)
55
Debug.
Assert
(_contextClassLocation != null);
85
Debug.
Assert
(_knownSymbols.JsonSerializerContextType != null);
88
Debug.
Assert
(_typesToGenerate.Count == 0);
89
Debug.
Assert
(_generatedTypes.Count == 0);
90
Debug.
Assert
(_contextClassLocation is null);
93
Debug.
Assert
(contextTypeSymbol != null);
96
Debug.
Assert
(_contextClassLocation is not null);
116
Debug.
Assert
(rootSerializableTypes.Count > 0);
151
Debug.
Assert
(_generatedTypes.Count > 0);
195
Debug.
Assert
(typeSymbol != null);
203
Debug.
Assert
(typeDeclarations?.Count > 0);
234
Debug.
Assert
(_knownSymbols.JsonSerializableAttributeType != null);
235
Debug.
Assert
(_knownSymbols.JsonSourceGenerationOptionsAttributeType != null);
290
Debug.
Assert
(attributeData.ConstructorArguments.Length == 1 & attributeData.ConstructorArguments[0].Type?.Name is nameof(JsonSerializerDefaults));
436
Debug.
Assert
(attributeData.ConstructorArguments.Length == 1);
463
Debug.
Assert
(attributeLocation != null);
540
Debug.
Assert
(_knownSymbols.JsonStringEnumConverterOfTType != null);
702
Debug.
Assert
(attributeData.ConstructorArguments.Length > 0);
733
Debug.
Assert
(!SymbolEqualityComparer.Default.Equals(type, _knownSymbols.MemoryByteType));
741
Debug.
Assert
(!SymbolEqualityComparer.Default.Equals(type, _knownSymbols.ReadOnlyMemoryByteType));
1098
Debug.
Assert
(memberInfo is IFieldSymbol or IPropertySymbol);
1203
Debug.
Assert
(memberInfo is IFieldSymbol or IPropertySymbol);
1416
Debug.
Assert
(constructor != null);
1509
Debug.
Assert
(_knownSymbols.JsonConverterAttributeType.IsAssignableFrom(attributeData.AttributeClass));
1517
Debug.
Assert
(attributeData.ConstructorArguments.Length == 1 && attributeData.ConstructorArguments[0].Value is null or ITypeSymbol);
src\libraries\Common\src\SourceGenerators\SourceWriter.cs (1)
66
Debug.
Assert
(_indentation == 0 && _sb.Length > 0);
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (1)
18
Debug.
Assert
(char.IsPunctuation(separator));
System.Text.RegularExpressions (424)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (5)
28
Debug.
Assert
(value >= 0);
29
Debug.
Assert
(value <= _span.Length);
38
Debug.
Assert
(index < _pos);
106
Debug.
Assert
(length >= 0);
134
Debug.
Assert
(_pos == _span.Length);
System\Text\RegularExpressions\CaptureCollection.cs (1)
58
Debug.
Assert
(_captures != null);
System\Text\RegularExpressions\Match.cs (4)
101
Debug.
Assert
(Text != null);
267
Debug.
Assert
(mode != RegexRunnerMode.ExistenceRequired);
275
Debug.
Assert
(_textbeg == 0);
296
Debug.
Assert
(!_balancing);
System\Text\RegularExpressions\Regex.Cache.cs (6)
76
Debug.
Assert
(value >= 0);
104
Debug.
Assert
(s_cacheList.Count == value);
105
Debug.
Assert
(s_cacheDictionary.Count == value);
199
Debug.
Assert
(s_cacheList.Count == s_cacheDictionary.Count);
262
Debug.
Assert
(s_cacheList.Count <= s_maxCacheSize);
263
Debug.
Assert
(s_cacheList.Count == s_cacheDictionary.Count);
System\Text\RegularExpressions\Regex.cs (6)
463
Debug.
Assert
(mode <= RegexRunnerMode.BoundsRequired);
467
Debug.
Assert
(startat <= input.Length);
529
Debug.
Assert
(inputString is null || inputSpan.SequenceEqual(inputString));
530
Debug.
Assert
((uint)startat <= (uint)inputSpan.Length);
547
Debug.
Assert
(match is not null);
612
Debug.
Assert
(match is not null);
System\Text\RegularExpressions\RegexCaseEquivalences.cs (4)
81
Debug.
Assert
(cultureName[0] is >= 'a' and <= 'z');
82
Debug.
Assert
(cultureName[1] is >= 'a' and <= 'z');
133
Debug.
Assert
((c / CharactersPerRange) < 0xFF);
145
Debug.
Assert
(((c % CharactersPerRange) + firstLevelLookupValue) < 0xFFFF);
System\Text\RegularExpressions\RegexCharClass.cs (14)
337
Debug.
Assert
(whitespaceSet.Contains((char)i) == char.IsWhiteSpace((char)i));
409
Debug.
Assert
(!set.IsEmpty);
701
Debug.
Assert
(c != 0);
869
Debug.
Assert
(count <= evaluated);
913
Debug.
Assert
(set1Negated == set2Negated);
947
Debug.
Assert
(!IsNegated(set1) && !IsNegated(set2));
998
Debug.
Assert
((uint)comparison <= char.MaxValue);
1063
Debug.
Assert
(twoChars.Length >= 2);
1149
Debug.
Assert
(!hasSubtraction);
1278
Debug.
Assert
(ch < 128);
1296
Debug.
Assert
(ch < 128);
1467
Debug.
Assert
(curcat < 0);
1552
Debug.
Assert
(chars[index] < chars[index + 1]);
1617
Debug.
Assert
(i == span.Length);
System\Text\RegularExpressions\RegexCompiler.cs (45)
377
Debug.
Assert
(_pool != null);
378
Debug.
Assert
(_local != null);
379
Debug.
Assert
(!_pool.Contains(_local));
388
Debug.
Assert
(_regexTree != null);
409
Debug.
Assert
(minRequiredLength >= 0);
754
Debug.
Assert
(opts.FindMode is FindNextStartingPositionMode.LeadingString_LeftToRight or
809
Debug.
Assert
(!string.IsNullOrEmpty(prefix));
841
Debug.
Assert
(_regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
915
Debug.
Assert
(primarySet.Chars.Length > 0);
1097
Debug.
Assert
(needLoop);
1113
Debug.
Assert
(setIndex is 0 or 1);
1116
Debug.
Assert
(needLoop);
1172
Debug.
Assert
(_regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
1175
Debug.
Assert
(set.Distance == 0);
1243
Debug.
Assert
(_regexTree.FindOptimizations.LiteralAfterLoop is not null);
1246
Debug.
Assert
(target.LoopNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic);
1247
Debug.
Assert
(target.LoopNode.N == int.MaxValue);
1277
Debug.
Assert
(target.Literal.StringComparison is StringComparison.Ordinal);
1423
Debug.
Assert
(_regexTree != null);
1611
Debug.
Assert
(requiredLength > 0);
1649
Debug.
Assert
(childCount >= 2);
1656
Debug.
Assert
(node.Parent is not null);
1844
Debug.
Assert
(sliceStaticPos == 0);
2124
Debug.
Assert
(needsEndConditional);
2330
Debug.
Assert
(resumeAt is not null);
2492
Debug.
Assert
(startingCapturePos != null);
2966
Debug.
Assert
(!rtl || offset is null);
3072
Debug.
Assert
(node.Kind == RegexNodeKind.NonECMABoundary);
3083
Debug.
Assert
((node.Options & RegexOptions.RightToLeft) == 0 || sliceStaticPos == 0);
3084
Debug.
Assert
(sliceStaticPos >= 0);
3086
Debug.
Assert
(sliceStaticPos >= 0);
3226
Debug.
Assert
(str.Length >= 2);
3230
Debug.
Assert
(emitLengthCheck);
3292
Debug.
Assert
(node.M < node.N);
3505
Debug.
Assert
(node.M < node.N);
3954
Debug.
Assert
(sliceStaticPos == 0);
4034
Debug.
Assert
(entriesPerIteration >= 1);
4373
Debug.
Assert
(node.N > node.M);
4613
Debug.
Assert
(node.M == 0 && node.N == 1);
4864
Debug.
Assert
(sliceStaticPos == 0);
5018
Debug.
Assert
(startingStackpos is not null);
5294
Debug.
Assert
(count >= 1);
5713
Debug.
Assert
(rangeLower.LowInclusive != rangeUpper.LowInclusive);
6204
Debug.
Assert
(values is char[] or string[]);
6205
Debug.
Assert
(comparison is StringComparison.Ordinal || values is string[]);
System\Text\RegularExpressions\RegexFindOptimizations.cs (10)
111
Debug.
Assert
(!RegexCharClass.IsNegated(charClass));
118
Debug.
Assert
(!RegexCharClass.IsNegated(charClass) || chars is null);
165
Debug.
Assert
(fixedDistanceSets is null || fixedDistanceSets.Count != 0);
342
Debug.
Assert
(chars is { Length: 1 });
470
Debug.
Assert
(FindMode == FindNextStartingPositionMode.NoSearch);
651
Debug.
Assert
(FixedDistanceLiteral.Distance <= MinRequiredLength);
666
Debug.
Assert
(FixedDistanceLiteral.Distance <= MinRequiredLength);
760
Debug.
Assert
(LiteralAfterLoop is not null);
763
Debug.
Assert
(loopNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic);
764
Debug.
Assert
(loopNode.N == int.MaxValue);
System\Text\RegularExpressions\RegexInterpreter.cs (4)
326
Debug.
Assert
(runregex is not null);
327
Debug.
Assert
(runtrack is not null);
328
Debug.
Assert
(runstack is not null);
329
Debug.
Assert
(runcrawl is not null);
System\Text\RegularExpressions\RegexNode.cs (60)
89
Debug.
Assert
(Kind is RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or
92
Debug.
Assert
(M > 0);
115
Debug.
Assert
(culture is not null);
332
Debug.
Assert
(rootNode.Kind == RegexNodeKind.Capture);
333
Debug.
Assert
(rootNode.Parent is null);
334
Debug.
Assert
(rootNode.ChildCount() == 1);
560
Debug.
Assert
(Kind is RegexNodeKind.Alternate or RegexNodeKind.Concatenate);
577
Debug.
Assert
(Kind == RegexNodeKind.Group);
582
Debug.
Assert
(u.ChildCount() == 1);
605
Debug.
Assert
(Kind == RegexNodeKind.Atomic);
606
Debug.
Assert
(ChildCount() == 1);
647
Debug.
Assert
(branches is not null && branches.Count != 0);
767
Debug.
Assert
(Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
876
Debug.
Assert
(Kind is RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy);
877
Debug.
Assert
(!string.IsNullOrEmpty(Str));
925
Debug.
Assert
(Kind == RegexNodeKind.Alternate);
1077
Debug.
Assert
(alternation.Kind == RegexNodeKind.Alternate);
1078
Debug.
Assert
(alternation.Children is List<RegexNode> { Count: >= 2 });
1098
Debug.
Assert
(children[startingIndex].Children is List<RegexNode> { Count: >= 2 });
1172
Debug.
Assert
(node.Kind == RegexNodeKind.Alternate);
1173
Debug.
Assert
(node.ChildCount() >= 2);
1215
Debug.
Assert
(alternation.Kind == RegexNodeKind.Alternate);
1216
Debug.
Assert
(alternation.Children is List<RegexNode> { Count: >= 2 });
1247
Debug.
Assert
(startingSpan.Length > 0);
1276
Debug.
Assert
(startingNode.Kind == RegexNodeKind.Multi);
1277
Debug.
Assert
(startingNode.Str!.Length > 0);
1300
Debug.
Assert
(startingSpan.Length > 0);
1323
Debug.
Assert
(startingSpan.Length == 1);
1324
Debug.
Assert
(startingSpan[0] == node.Ch);
1330
Debug.
Assert
(node.Kind == RegexNodeKind.Multi);
1331
Debug.
Assert
(node.Str.AsSpan().StartsWith(startingSpan, StringComparison.Ordinal));
1385
Debug.
Assert
(Kind is RegexNodeKind.One or RegexNodeKind.Multi || (IsOneFamily && M > 0));
1386
Debug.
Assert
((Options & RegexOptions.RightToLeft) == 0);
1445
Debug.
Assert
(lowInclusive < highInclusive);
1481
Debug.
Assert
(@string is not null);
1487
Debug.
Assert
(setChars is not null);
1500
Debug.
Assert
(Kind == RegexNodeKind.Concatenate);
1542
Debug.
Assert
(Kind == RegexNodeKind.Concatenate);
1543
Debug.
Assert
(Children is List<RegexNode>);
1625
Debug.
Assert
(Kind == RegexNodeKind.Concatenate);
1626
Debug.
Assert
(Children is List<RegexNode>);
1733
Debug.
Assert
(matchingCharsInMulti < nextNode.Str.Length);
1827
Debug.
Assert
(Children is List<RegexNode>);
1932
Debug.
Assert
(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
1966
Debug.
Assert
(Kind is RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround);
1967
Debug.
Assert
(ChildCount() == 1);
1994
Debug.
Assert
(Kind == RegexNodeKind.BackreferenceConditional);
1995
Debug.
Assert
(ChildCount() is 1 or 2);
2012
Debug.
Assert
(Kind == RegexNodeKind.ExpressionConditional);
2013
Debug.
Assert
(ChildCount() is 2 or 3);
2066
Debug.
Assert
(subsequent.Kind != RegexNodeKind.Group);
2290
Debug.
Assert
(childCount >= 2);
2323
Debug.
Assert
(ChildCount() == 1);
2407
Debug.
Assert
(childCount >= 2);
2461
Debug.
Assert
(ChildCount() == 1);
2690
Debug.
Assert
(max >= 2);
2735
Debug.
Assert
(Children is List<RegexNode>);
2746
Debug.
Assert
(Children != null);
2747
Debug.
Assert
(index < ChildCount());
2777
Debug.
Assert
(Children is RegexNode);
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (6)
247
Debug.
Assert
(childCount >= 2); // otherwise it would have been optimized out
266
Debug.
Assert
(alternateBranchResults.Count > 0);
773
Debug.
Assert
(sameDistance.HasValue);
813
Debug.
Assert
(!s2Negated);
1129
Debug.
Assert
(node.ChildCount() >= 2);
1175
Debug.
Assert
(
System\Text\RegularExpressions\RegexReplacement.cs (2)
218
Debug.
Assert
(_rules.Length <= 1);
219
Debug.
Assert
(_rules.Length == 0 || (_rules[0] == 0 && _strings.Length == 1));
System\Text\RegularExpressions\RegexTree.cs (9)
47
Debug.
Assert
(captureNumberSparseMapping is null || captureNames is not null);
48
Debug.
Assert
((captureNames is null) == (captureNameToNumberMapping is null));
49
Debug.
Assert
(captureNames is null || captureCount == captureNames.Length);
50
Debug.
Assert
(captureNumberSparseMapping is null || captureCount == captureNumberSparseMapping.Count);
51
Debug.
Assert
(captureNameToNumberMapping is null || captureCount == captureNameToNumberMapping.Count);
54
Debug.
Assert
(captureNameToNumberMapping is not null);
60
Debug.
Assert
(captureNumber is not null);
65
Debug.
Assert
(captureNumber is not null);
68
Debug.
Assert
(captureNumber == i);
System\Text\RegularExpressions\RegexWriter.cs (2)
31
Debug.
Assert
(!Enum.IsDefined(BeforeChild));
32
Debug.
Assert
(!Enum.IsDefined(AfterChild));
System\Text\RegularExpressions\Symbolic\BDD.cs (10)
90
Debug.
Assert
((One is null) == (Zero is null));
112
Debug.
Assert
(!set.IsEmpty);
174
Debug.
Assert
(nodes[nodes.Length - 1] == this);
175
Debug.
Assert
(nodes.Length <= (1 << 24));
224
Debug.
Assert
(v >= 0);
315
Debug.
Assert
(serialized[i] > 0);
353
Debug.
Assert
((bytes.Length - 1) % bytesPerLong == 0);
381
Debug.
Assert
(oneId < i && zeroId < i);
382
Debug.
Assert
(nodes[oneId] is not null);
383
Debug.
Assert
(nodes[zeroId] is not null);
System\Text\RegularExpressions\Symbolic\BDDRangeConverter.cs (1)
101
Debug.
Assert
(!set.IsLeaf);
System\Text\RegularExpressions\Symbolic\BitVector.cs (7)
32
Debug.
Assert
(length > 0);
42
Debug.
Assert
(length > 0);
73
Debug.
Assert
(i >= 0 && i < Length);
81
Debug.
Assert
(i >= 0 && i < Length);
89
Debug.
Assert
(x.Length == y.Length);
106
Debug.
Assert
(x.Length == y.Length);
123
Debug.
Assert
(!bitVectors.IsEmpty);
System\Text\RegularExpressions\Symbolic\CharSetSolver.cs (3)
223
Debug.
Assert
(op is BooleanOperation.Or or BooleanOperation.And or BooleanOperation.Xor);
264
Debug.
Assert
(!set2.IsLeaf);
364
Debug.
Assert
(terminal >= 0);
System\Text\RegularExpressions\Symbolic\DoublyLinkedList.cs (2)
44
Debug.
Assert
(_first is not null);
74
Debug.
Assert
(_last is not null);
System\Text\RegularExpressions\Symbolic\MatchingState.cs (3)
57
Debug.
Assert
(IsNullableFor(nextCharKind));
58
Debug.
Assert
(CharKind.IsValidCharKind(nextCharKind));
101
Debug.
Assert
(CharKind.IsValidCharKind(nextCharKind));
System\Text\RegularExpressions\Symbolic\MintermGenerator.cs (3)
73
Debug.
Assert
(_right is null);
79
Debug.
Assert
(_right is not null);
102
Debug.
Assert
(node._left is not null && node._right is not null);
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (17)
31
Debug.
Assert
(_builder is not null);
47
Debug.
Assert
(childResults is null || childResults.Length != 0);
73
Debug.
Assert
(str is not null);
90
Debug.
Assert
(childResults is not null && childResults.Length == node.ChildCount());
126
Debug.
Assert
(set is not null);
204
Debug.
Assert
(node.ChildCount() > 0);
205
Debug.
Assert
(childResults is not null);
206
Debug.
Assert
(childResults.Length == node.ChildCount());
207
Debug.
Assert
(result.Count == 0);
253
Debug.
Assert
(childResults.Length == 1);
267
Debug.
Assert
(node.Kind == RegexNodeKind.Capture && node.N == -1);
269
Debug.
Assert
(childResults.Length == 1);
285
Debug.
Assert
(rootResult.Count == 1 || root.Kind == RegexNodeKind.Concatenate || root.Kind == RegexNodeKind.Capture);
312
Debug.
Assert
(node.Kind == RegexNodeKind.Set);
315
Debug.
Assert
(set is not null);
378
Debug.
Assert
(!Enum.IsDefined((UnicodeCategory)UnicodeCategoryCount));
516
Debug.
Assert
(result is not null);
System\Text\RegularExpressions\Symbolic\SparseIntMap.cs (4)
41
Debug.
Assert
(entryKey < sparse.Length);
68
Debug.
Assert
(0 <= index && index < _dense.Count);
69
Debug.
Assert
(_dense[index].Key == key);
76
Debug.
Assert
(newLength > _sparse.Length);
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (6)
234
Debug.
Assert
(node._set is not null);
244
Debug.
Assert
(node._left is not null);
324
Debug.
Assert
(node._set is not null);
328
Debug.
Assert
(node._left is not null);
332
Debug.
Assert
(node._left is not null && node._right is not null);
356
Debug.
Assert
(node._left is not null);
System\Text\RegularExpressions\Symbolic\SymbolicRegexInfo.cs (5)
33
Debug.
Assert
(!isAlwaysNullable || canBeNullable);
34
Debug.
Assert
(!startsWithLineAnchor || containsLineAnchor);
35
Debug.
Assert
(!startsWithLineAnchor || startsWithSomeAnchor);
36
Debug.
Assert
(!containsLineAnchor || containsSomeAnchor);
37
Debug.
Assert
(!startsWithSomeAnchor || containsSomeAnchor);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Automata.cs (14)
102
Debug.
Assert
(newSize >= array.Length);
113
Debug.
Assert
(Monitor.IsEntered(this));
127
Debug.
Assert
(Monitor.IsEntered(this));
151
Debug.
Assert
(Monitor.IsEntered(this));
172
Debug.
Assert
(_stateArray is not null);
205
Debug.
Assert
(Monitor.IsEntered(this));
206
Debug.
Assert
(node.Kind != SymbolicRegexNodeKind.Alternate);
238
Debug.
Assert
(nfaStateId < _nfaCoreIdArray.Length);
252
Debug.
Assert
(stateId > 0);
254
Debug.
Assert
(state is not null);
261
Debug.
Assert
(nfaStateId < _nfaCoreIdArray.Length);
262
Debug.
Assert
(_nfaCoreIdArray[nfaStateId] < _stateArray.Length);
271
Debug.
Assert
(offset < _dfaDelta.Length);
300
Debug.
Assert
(nfaOffset < _nfaDelta.Length);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (16)
161
Debug.
Assert
(solverMinterms is not null);
200
Debug.
Assert
(CharKind.General == 0);
266
Debug.
Assert
(Solver.IsEmpty(Solver.And(Solver.Not(_builder._wordLetterForBoundariesSet), minterm)));
313
Debug.
Assert
(_checkTimeout);
328
Debug.
Assert
(perThreadData is not null);
384
Debug.
Assert
(matchEnd >= startat - 1);
623
Debug.
Assert
(i >= matchStartBoundary);
665
Debug.
Assert
(lastStart != -1);
709
Debug.
Assert
(perThreadData.Current is not null && perThreadData.Next is not null);
720
Debug.
Assert
(next.Count == 0);
749
Debug.
Assert
(!flags.IsDeadend());
770
Debug.
Assert
(current.Count > 0);
840
Debug.
Assert
(CaptureStarts.Length == other.CaptureStarts.Length);
841
Debug.
Assert
(CaptureEnds.Length == other.CaptureEnds.Length);
1189
Debug.
Assert
(nextStates.Count == 0 || sourceStates.Count > 0);
1294
Debug.
Assert
(!matcher._pattern._info.ContainsSomeAnchor);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (1)
152
Debug.
Assert
(deltas.Length == matcher._minterms.Length);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Sample.cs (4)
54
Debug.
Assert
(_minterms is not null);
82
Debug.
Assert
(states.NfaStateSet.Count > 0);
138
Debug.
Assert
(success);
176
Debug.
Assert
(!bdd.IsEmpty);
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (133)
80
Debug.
Assert
(kind != SymbolicRegexNodeKind.Singleton || set is not null);
114
Debug.
Assert
(node.CanBeNullable);
128
Debug.
Assert
(node._left is not null && node._right is not null);
141
Debug.
Assert
(node._left is not null);
153
Debug.
Assert
(node._kind is SymbolicRegexNodeKind.BeginningAnchor or
174
Debug.
Assert
(_info.CanBeNullable || !_info.IsNullable);
187
Debug.
Assert
(listKind is SymbolicRegexNodeKind.Concat or SymbolicRegexNodeKind.Alternate);
203
Debug.
Assert
(node._left is not null && node._right is not null);
244
Debug.
Assert
(context < CharKind.ContextLimit);
258
Debug.
Assert
(_left is not null);
263
Debug.
Assert
(_left is not null && _right is not null);
268
Debug.
Assert
(_left is not null && _right is not null);
315
Debug.
Assert
(_left is not null);
323
Debug.
Assert
(_kind == SymbolicRegexNodeKind.EndAnchorZReverse);
339
Debug.
Assert
(_left is not null);
342
Debug.
Assert
(_left._set is not null);
355
Debug.
Assert
(_set is not null);
392
Debug.
Assert
(kind is
409
Debug.
Assert
(lower >= 0 && lower <= upper);
414
Debug.
Assert
(body._left is not null);
430
Debug.
Assert
(node._left is not null && node._right is not null);
460
Debug.
Assert
(right._kind is not SymbolicRegexNodeKind.Effect);
463
Debug.
Assert
(left._left is not null && left._right is not null);
519
Debug.
Assert
(current._left is not null && current._right is not null);
521
Debug.
Assert
(current._left._kind != SymbolicRegexNodeKind.Alternate);
581
Debug.
Assert
(left._kind != SymbolicRegexNodeKind.Alternate);
582
Debug.
Assert
(deduplicated);
651
Debug.
Assert
(left._left is not null && left._right is not null);
659
Debug.
Assert
(right._left is not null && right._right is not null);
667
Debug.
Assert
(left._left is not null && right._left is not null && right._right is not null);
671
Debug.
Assert
(rl._left is not null);
681
Debug.
Assert
(left._left is not null && left._right is not null);
685
Debug.
Assert
(ll._left is not null);
694
Debug.
Assert
(left._left is not null && left._right is not null);
713
Debug.
Assert
(prefix._left is not null && prefix._right is not null);
717
Debug.
Assert
(node._left is not null && node._right is not null);
729
Debug.
Assert
(node._left is not null && node._right is not null);
750
Debug.
Assert
(current._left is not null);
773
Debug.
Assert
(right.Subsumes(builder, left));
789
Debug.
Assert
(left._left is not null && left._right is not null);
790
Debug.
Assert
(right.Subsumes(builder, left._left));
812
Debug.
Assert
(right._left is not null && right._right is not null);
813
Debug.
Assert
(right._left.Subsumes(builder, left));
821
Debug.
Assert
(right._left is not null && right._right is not null);
842
Debug.
Assert
(suffix._left is not null && suffix._right is not null);
844
Debug.
Assert
(suffix.Subsumes(builder, left));
909
Debug.
Assert
(_left is not null);
927
Debug.
Assert
(_left is not null && _right is not null);
946
Debug.
Assert
(_left is not null && _right is not null);
960
Debug.
Assert
(_left is not null);
988
Debug.
Assert
(_left is not null && _right is not null);
995
Debug.
Assert
(_left is not null && _right is not null);
1011
Debug.
Assert
(_lower == lengthSoFar);
1067
Debug.
Assert
(_left is not null);
1102
Debug.
Assert
(_left is not null && _right is not null);
1113
Debug.
Assert
(_left is not null && _right is not null);
1144
Debug.
Assert
(_left is not null && _right is not null);
1159
Debug.
Assert
(loop.Kind == SymbolicRegexNodeKind.Loop && loop._left is not null);
1198
Debug.
Assert
(loop._left.IsNullableFor(context));
1213
Debug.
Assert
(_kind == SymbolicRegexNodeKind.Loop && _left is not null);
1267
Debug.
Assert
(_set is not null);
1285
Debug.
Assert
(_left is not null && _right is not null);
1317
Debug.
Assert
(_left is not null);
1318
Debug.
Assert
(_upper > 0);
1338
Debug.
Assert
(_left is not null && _right is not null);
1379
Debug.
Assert
(_left is not null && _right is not null);
1384
Debug.
Assert
(_left is not null && _right is not null);
1385
Debug.
Assert
(_left._info.ContainsEffect && !_right._info.ContainsEffect);
1389
Debug.
Assert
(_left is not null && _right is not null);
1398
Debug.
Assert
(_left is not null);
1402
Debug.
Assert
(_left is not null);
1451
Debug.
Assert
(_left is not null && _right is not null);
1463
Debug.
Assert
(_left is not null && _right is not null);
1464
Debug.
Assert
(_left._info.ContainsEffect && !_right._info.ContainsEffect);
1478
Debug.
Assert
(_left is not null && _right is not null);
1487
Debug.
Assert
(_left is not null);
1504
Debug.
Assert
(_left is not null);
1542
Debug.
Assert
(_left is not null && _right is not null);
1543
Debug.
Assert
(_left.IsNullableFor(context) && _right.IsNullableFor(context));
1549
Debug.
Assert
(_left is not null);
1553
Debug.
Assert
(_left.IsNullableFor(context));
1559
Debug.
Assert
(_left is not null && _right is not null);
1568
Debug.
Assert
(_right.IsNullableFor(context));
1582
Debug.
Assert
(_left is not null);
1649
Debug.
Assert
(_left is not null && _right is not null);
1658
Debug.
Assert
(_left is not null && _right is not null);
1669
Debug.
Assert
(_set is not null);
1674
Debug.
Assert
(_left is not null);
1733
Debug.
Assert
(_left is not null && _right is not null);
1747
Debug.
Assert
(_lower >= 0);
1753
Debug.
Assert
(_lower >= 0);
1759
Debug.
Assert
(_left is not null);
1854
Debug.
Assert
(_set is not null);
1859
Debug.
Assert
(_left is not null);
1864
Debug.
Assert
(_left is not null && _right is not null);
1874
Debug.
Assert
(conc._left is not null && conc._right is not null);
1882
Debug.
Assert
(_left is not null);
1918
Debug.
Assert
(_left is not null);
1923
Debug.
Assert
(_left is not null && _right is not null);
1928
Debug.
Assert
(rest._left is not null && rest._right is not null);
1939
Debug.
Assert
(_left is not null && _right is not null);
1969
Debug.
Assert
(_left is not null);
1995
Debug.
Assert
(_left is not null && _right is not null);
1999
Debug.
Assert
(_left is not null && _right is not null);
2003
Debug.
Assert
(_left is not null);
2016
Debug.
Assert
(kind != SymbolicRegexNodeKind.Singleton);
2036
Debug.
Assert
(left is not null);
2040
Debug.
Assert
(left is not null && right is not null);
2044
Debug.
Assert
(left is not null && right is not null);
2049
Debug.
Assert
(left is not null);
2121
Debug.
Assert
(_left is not null);
2129
Debug.
Assert
(_left is not null && _right is not null);
2133
Debug.
Assert
(left1 is not null && right1 is not null);
2141
Debug.
Assert
(_left is not null && _right is not null);
2145
Debug.
Assert
(left1 is not null && right1 is not null);
2153
Debug.
Assert
(_left is not null && _right is not null);
2161
Debug.
Assert
(_left is not null);
2181
Debug.
Assert
(IsNullableFor(context));
2195
Debug.
Assert
(_left is not null && _right is not null);
2204
Debug.
Assert
(_right.IsNullableFor(context));
2209
Debug.
Assert
(_left is not null && _right is not null);
2227
Debug.
Assert
(_left is not null);
2229
Debug.
Assert
(_left._kind is not SymbolicRegexNodeKind.DisableBacktrackingSimulation);
2241
Debug.
Assert
(current._left is not null && current._right is not null);
2242
Debug.
Assert
(current._left._kind is not SymbolicRegexNodeKind.Alternate);
2291
Debug.
Assert
(_left is not null && _right is not null);
2296
Debug.
Assert
(_left is not null && _right is null);
2297
Debug.
Assert
(_lower >= 0 && _upper > 0 && _upper >= _lower);
2307
Debug.
Assert
(_lower > 0);
2322
Debug.
Assert
(_left is not null);
2326
Debug.
Assert
(_left is null && _right is null);
2336
Debug.
Assert
(m >= 0 && n >= 0);
2343
Debug.
Assert
(m >= 0 && n >= 0);
System\Text\RegularExpressions\Symbolic\SymbolicRegexRunnerFactory.cs (5)
17
Debug.
Assert
((options & (RegexOptions.RightToLeft | RegexOptions.ECMAScript)) == 0);
27
Debug.
Assert
(threshold > 0);
86
Debug.
Assert
(pos.CaptureEnds != null);
87
Debug.
Assert
(pos.CaptureStarts.Length == pos.CaptureEnds.Length);
92
Debug.
Assert
(pos.CaptureEnds[cap] >= pos.CaptureStarts[cap]);
System\Text\RegularExpressions\Symbolic\UInt64Solver.cs (1)
17
Debug.
Assert
(minterms.Length <= 64);
System\Text\RegularExpressions\Symbolic\UnicodeCategoryConditions.cs (1)
30
Debug.
Assert
(Enum.GetValues<UnicodeCategory>().Length == UnicodeCategoryValueCount);
System\Text\RegularExpressions\Symbolic\UnicodeCategoryRangesGenerator.cs (3)
23
Debug.
Assert
(namespacename != null);
24
Debug.
Assert
(classname != null);
25
Debug.
Assert
(path != null);
System\Text\StructListBuilder.cs (1)
61
Debug.
Assert
(array.Length == _count);
System.Text.RegularExpressions.Generator (155)
RegexGenerator.cs (1)
92
Debug.
Assert
(state is DiagnosticData);
RegexGenerator.Emitter.cs (42)
394
Debug.
Assert
(chars.Length > 3);
703
Debug.
Assert
(minRequiredLength >= 0);
976
Debug.
Assert
(!string.IsNullOrEmpty(substring));
983
Debug.
Assert
(!string.IsNullOrEmpty(substring));
987
Debug.
Assert
(!string.IsNullOrEmpty(regexTree.FindOptimizations.FixedDistanceLiteral.String));
1056
Debug.
Assert
(opts.FindMode is FindNextStartingPositionMode.LeadingStrings_LeftToRight or FindNextStartingPositionMode.LeadingStrings_OrdinalIgnoreCase_LeftToRight);
1102
Debug.
Assert
(regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
1151
Debug.
Assert
(primarySet.Chars.Length > 0);
1249
Debug.
Assert
(setIndex is 0 or 1);
1255
Debug.
Assert
(needLoop);
1290
Debug.
Assert
(regexTree.FindOptimizations.FixedDistanceSets is { Count: > 0 });
1293
Debug.
Assert
(set.Distance == 0);
1324
Debug.
Assert
(regexTree.FindOptimizations.LiteralAfterLoop is not null);
1327
Debug.
Assert
(target.LoopNode.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic);
1328
Debug.
Assert
(target.LoopNode.N == int.MaxValue);
1598
Debug.
Assert
(requiredLength > 0);
1634
Debug.
Assert
(childCount >= 2);
1641
Debug.
Assert
(node.Parent is not null);
1703
Debug.
Assert
(startingLiteralNode.IsSetFamily);
1774
Debug.
Assert
(numChars != 0);
1816
Debug.
Assert
(remainder is null);
2063
Debug.
Assert
(sliceStaticPos == 0);
3093
Debug.
Assert
(!rtl || offset is null);
3094
Debug.
Assert
(!rtl || !clauseOnly);
3162
Debug.
Assert
((node.Options & RegexOptions.RightToLeft) == 0 || sliceStaticPos == 0);
3163
Debug.
Assert
(sliceStaticPos >= 0);
3228
Debug.
Assert
(node.Str is not null);
3234
Debug.
Assert
(str.Length >= 2);
3235
Debug.
Assert
(!clauseOnly || (!emitLengthCheck && !rightToLeft));
3239
Debug.
Assert
(emitLengthCheck);
3296
Debug.
Assert
(node.M < node.N);
3437
Debug.
Assert
(node.M < node.N);
3764
Debug.
Assert
(sliceStaticPos == 0);
3830
Debug.
Assert
(entriesPerIteration >= 1);
4098
Debug.
Assert
(node.N > node.M);
4149
Debug.
Assert
(maxIterations > 1);
4224
Debug.
Assert
(node.M == 0 && node.N == 1);
4399
Debug.
Assert
(sliceStaticPos == 0);
4532
Debug.
Assert
(startingStackpos is not null);
4663
Debug.
Assert
(args.Length is >= 1);
4715
Debug.
Assert
(args.Length is >= 1);
5151
Debug.
Assert
(rangeLower.LowInclusive != rangeUpper.LowInclusive);
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (5)
38
Debug.
Assert
(value >= 0);
39
Debug.
Assert
(value <= _chars.Length);
49
Debug.
Assert
(capacity >= 0);
85
Debug.
Assert
(index < _pos);
297
Debug.
Assert
(additionalCapacityBeyondPos > 0);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (5)
28
Debug.
Assert
(value >= 0);
29
Debug.
Assert
(value <= _span.Length);
38
Debug.
Assert
(index < _pos);
106
Debug.
Assert
(length >= 0);
134
Debug.
Assert
(_pos == _span.Length);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCaseEquivalences.cs (4)
81
Debug.
Assert
(cultureName[0] is >= 'a' and <= 'z');
82
Debug.
Assert
(cultureName[1] is >= 'a' and <= 'z');
133
Debug.
Assert
((c / CharactersPerRange) < 0xFF);
145
Debug.
Assert
(((c % CharactersPerRange) + firstLevelLookupValue) < 0xFFFF);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (14)
337
Debug.
Assert
(whitespaceSet.Contains((char)i) == char.IsWhiteSpace((char)i));
409
Debug.
Assert
(!set.IsEmpty);
701
Debug.
Assert
(c != 0);
869
Debug.
Assert
(count <= evaluated);
913
Debug.
Assert
(set1Negated == set2Negated);
947
Debug.
Assert
(!IsNegated(set1) && !IsNegated(set2));
998
Debug.
Assert
((uint)comparison <= char.MaxValue);
1063
Debug.
Assert
(twoChars.Length >= 2);
1149
Debug.
Assert
(!hasSubtraction);
1278
Debug.
Assert
(ch < 128);
1296
Debug.
Assert
(ch < 128);
1467
Debug.
Assert
(curcat < 0);
1552
Debug.
Assert
(chars[index] < chars[index + 1]);
1617
Debug.
Assert
(i == span.Length);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (4)
111
Debug.
Assert
(!RegexCharClass.IsNegated(charClass));
118
Debug.
Assert
(!RegexCharClass.IsNegated(charClass) || chars is null);
165
Debug.
Assert
(fixedDistanceSets is null || fixedDistanceSets.Count != 0);
342
Debug.
Assert
(chars is { Length: 1 });
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (60)
89
Debug.
Assert
(Kind is RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or
92
Debug.
Assert
(M > 0);
115
Debug.
Assert
(culture is not null);
332
Debug.
Assert
(rootNode.Kind == RegexNodeKind.Capture);
333
Debug.
Assert
(rootNode.Parent is null);
334
Debug.
Assert
(rootNode.ChildCount() == 1);
560
Debug.
Assert
(Kind is RegexNodeKind.Alternate or RegexNodeKind.Concatenate);
577
Debug.
Assert
(Kind == RegexNodeKind.Group);
582
Debug.
Assert
(u.ChildCount() == 1);
605
Debug.
Assert
(Kind == RegexNodeKind.Atomic);
606
Debug.
Assert
(ChildCount() == 1);
647
Debug.
Assert
(branches is not null && branches.Count != 0);
767
Debug.
Assert
(Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
876
Debug.
Assert
(Kind is RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy);
877
Debug.
Assert
(!string.IsNullOrEmpty(Str));
925
Debug.
Assert
(Kind == RegexNodeKind.Alternate);
1077
Debug.
Assert
(alternation.Kind == RegexNodeKind.Alternate);
1078
Debug.
Assert
(alternation.Children is List<RegexNode> { Count: >= 2 });
1098
Debug.
Assert
(children[startingIndex].Children is List<RegexNode> { Count: >= 2 });
1172
Debug.
Assert
(node.Kind == RegexNodeKind.Alternate);
1173
Debug.
Assert
(node.ChildCount() >= 2);
1215
Debug.
Assert
(alternation.Kind == RegexNodeKind.Alternate);
1216
Debug.
Assert
(alternation.Children is List<RegexNode> { Count: >= 2 });
1247
Debug.
Assert
(startingSpan.Length > 0);
1276
Debug.
Assert
(startingNode.Kind == RegexNodeKind.Multi);
1277
Debug.
Assert
(startingNode.Str!.Length > 0);
1300
Debug.
Assert
(startingSpan.Length > 0);
1323
Debug.
Assert
(startingSpan.Length == 1);
1324
Debug.
Assert
(startingSpan[0] == node.Ch);
1330
Debug.
Assert
(node.Kind == RegexNodeKind.Multi);
1331
Debug.
Assert
(node.Str.AsSpan().StartsWith(startingSpan, StringComparison.Ordinal));
1385
Debug.
Assert
(Kind is RegexNodeKind.One or RegexNodeKind.Multi || (IsOneFamily && M > 0));
1386
Debug.
Assert
((Options & RegexOptions.RightToLeft) == 0);
1445
Debug.
Assert
(lowInclusive < highInclusive);
1481
Debug.
Assert
(@string is not null);
1487
Debug.
Assert
(setChars is not null);
1500
Debug.
Assert
(Kind == RegexNodeKind.Concatenate);
1542
Debug.
Assert
(Kind == RegexNodeKind.Concatenate);
1543
Debug.
Assert
(Children is List<RegexNode>);
1625
Debug.
Assert
(Kind == RegexNodeKind.Concatenate);
1626
Debug.
Assert
(Children is List<RegexNode>);
1733
Debug.
Assert
(matchingCharsInMulti < nextNode.Str.Length);
1827
Debug.
Assert
(Children is List<RegexNode>);
1932
Debug.
Assert
(node.Kind is RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
1966
Debug.
Assert
(Kind is RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround);
1967
Debug.
Assert
(ChildCount() == 1);
1994
Debug.
Assert
(Kind == RegexNodeKind.BackreferenceConditional);
1995
Debug.
Assert
(ChildCount() is 1 or 2);
2012
Debug.
Assert
(Kind == RegexNodeKind.ExpressionConditional);
2013
Debug.
Assert
(ChildCount() is 2 or 3);
2066
Debug.
Assert
(subsequent.Kind != RegexNodeKind.Group);
2290
Debug.
Assert
(childCount >= 2);
2323
Debug.
Assert
(ChildCount() == 1);
2407
Debug.
Assert
(childCount >= 2);
2461
Debug.
Assert
(ChildCount() == 1);
2690
Debug.
Assert
(max >= 2);
2735
Debug.
Assert
(Children is List<RegexNode>);
2746
Debug.
Assert
(Children != null);
2747
Debug.
Assert
(index < ChildCount());
2777
Debug.
Assert
(Children is RegexNode);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (6)
247
Debug.
Assert
(childCount >= 2); // otherwise it would have been optimized out
266
Debug.
Assert
(alternateBranchResults.Count > 0);
773
Debug.
Assert
(sameDistance.HasValue);
813
Debug.
Assert
(!s2Negated);
1129
Debug.
Assert
(node.ChildCount() >= 2);
1175
Debug.
Assert
(
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexTree.cs (9)
47
Debug.
Assert
(captureNumberSparseMapping is null || captureNames is not null);
48
Debug.
Assert
((captureNames is null) == (captureNameToNumberMapping is null));
49
Debug.
Assert
(captureNames is null || captureCount == captureNames.Length);
50
Debug.
Assert
(captureNumberSparseMapping is null || captureCount == captureNumberSparseMapping.Count);
51
Debug.
Assert
(captureNameToNumberMapping is null || captureCount == captureNameToNumberMapping.Count);
54
Debug.
Assert
(captureNameToNumberMapping is not null);
60
Debug.
Assert
(captureNumber is not null);
65
Debug.
Assert
(captureNumber is not null);
68
Debug.
Assert
(captureNumber == i);
UpgradeToGeneratedRegexAnalyzer.cs (2)
112
Debug.
Assert
(syntaxNodeForDiagnostic != null);
144
Debug.
Assert
(syntaxNodeForDiagnostic is not null);
UpgradeToGeneratedRegexCodeFixer.cs (2)
151
Debug.
Assert
(typeDeclarationOrCompilationUnit is not null);
284
Debug.
Assert
(parameterName is UpgradeToGeneratedRegexAnalyzer.OptionsArgumentName or UpgradeToGeneratedRegexAnalyzer.PatternArgumentName);
System.Threading (76)
System\Threading\Barrier.cs (2)
511
Debug.
Assert
(result);
735
Debug.
Assert
(phase < CurrentPhaseNumber);
System\Threading\CountdownEvent.cs (2)
176
Debug.
Assert
(_event != null);
219
Debug.
Assert
(_event != null);
System\Threading\ReaderWriterLock.cs (72)
87
Debug.
Assert
(threadLocalLockEntry._readerLevel == 0);
92
Debug.
Assert
((_state & LockStates.ReadersMask) != 0);
105
Debug.
Assert
(threadLocalLockEntry.IsFree);
202
Debug.
Assert
(threadLocalLockEntry.HasLockID(_lockID));
207
Debug.
Assert
((_state & LockStates.ReaderSignaled) != 0);
208
Debug.
Assert
((_state & LockStates.ReadersMask) < LockStates.ReadersMask);
231
Debug.
Assert
(readerEvent != null);
237
Debug.
Assert
((_state & LockStates.ReadersMask) < LockStates.ReadersMask);
248
Debug.
Assert
(threadLocalLockEntry.IsFree);
258
Debug.
Assert
((knownState & LockStates.ReaderSignaled) != 0);
259
Debug.
Assert
((knownState & LockStates.ReadersMask) < LockStates.ReadersMask);
272
Debug.
Assert
((_state & LockStates.Writer) == 0);
273
Debug.
Assert
((_state & LockStates.ReadersMask) != 0);
289
Debug.
Assert
((_state & LockStates.ReadersMask) == 0);
373
Debug.
Assert
((_state & LockStates.WriterSignaled) != 0);
389
Debug.
Assert
(writerEvent != null);
408
Debug.
Assert
((knownState & LockStates.WriterSignaled) != 0);
409
Debug.
Assert
((knownState & LockStates.Writer) == 0);
413
Debug.
Assert
(_writerLevel == 0);
430
Debug.
Assert
((_state & LockStates.Writer) != 0);
431
Debug.
Assert
((_state & LockStates.ReadersMask) == 0);
432
Debug.
Assert
(_writerID == InvalidThreadID);
458
Debug.
Assert
((_state & LockStates.Writer) == 0);
459
Debug.
Assert
((_state & LockStates.ReadersMask) != 0);
460
Debug.
Assert
(threadLocalLockEntry._readerLevel > 0);
494
Debug.
Assert
(currentState != knownState);
519
Debug.
Assert
(currentState != knownState);
531
Debug.
Assert
((knownState & LockStates.Writer) == 0);
532
Debug.
Assert
((knownState & LockStates.ReadersMask) != 0);
542
Debug.
Assert
((_state & LockStates.WriterSignaled) != 0);
543
Debug.
Assert
(writerEvent != null);
549
Debug.
Assert
((_state & LockStates.ReaderSignaled) != 0);
550
Debug.
Assert
(readerEvent != null);
560
Debug.
Assert
(threadLocalLockEntry.IsFree);
570
Debug.
Assert
((_state & LockStates.ReadersMask) == 0);
571
Debug.
Assert
((_state & LockStates.Writer) != 0);
572
Debug.
Assert
(_writerLevel > 0);
614
Debug.
Assert
(currentState != knownState);
628
Debug.
Assert
(currentState != knownState);
639
Debug.
Assert
((knownState & LockStates.ReadersMask) == 0);
640
Debug.
Assert
((knownState & LockStates.Writer) != 0);
647
Debug.
Assert
((_state & LockStates.ReaderSignaled) != 0);
648
Debug.
Assert
(readerEvent != null);
654
Debug.
Assert
((_state & LockStates.WriterSignaled) != 0);
655
Debug.
Assert
(writerEvent != null);
694
Debug.
Assert
((_state & LockStates.ReadersMask) != 0);
695
Debug.
Assert
(threadLocalLockEntry._readerLevel > 0);
707
Debug.
Assert
(threadLocalLockEntry.IsFree);
770
Debug.
Assert
(_writerLevel > 0);
804
Debug.
Assert
(currentState != knownState);
810
Debug.
Assert
((knownState & LockStates.ReadersMask) == 0);
817
Debug.
Assert
((_state & LockStates.ReaderSignaled) != 0);
818
Debug.
Assert
(readerEvent != null);
851
Debug.
Assert
(_writerLevel > 0);
852
Debug.
Assert
(_writerLevel > requestedWriterLevel);
865
Debug.
Assert
((flags & LockCookieFlags.OwnedWriter) != 0 || _writerID != threadID);
897
Debug.
Assert
((_state & LockStates.ReadersMask) != 0);
898
Debug.
Assert
(threadLocalLockEntry._readerLevel > 0);
954
Debug.
Assert
(threadLocalLockEntry.IsFree);
995
Debug.
Assert
(threadLocalLockEntry != null);
1003
Debug.
Assert
(threadID != InvalidThreadID);
1090
Debug.
Assert
((_state & LockStates.CachingEvents) == LockStates.CachingEvents);
1225
Debug.
Assert
(lockID != 0);
1226
Debug.
Assert
(afterEntry != null);
1232
Debug.
Assert
(currentEntry._lockID != lockID || currentEntry.IsFree);
1238
Debug.
Assert
(lockID != 0);
1257
Debug.
Assert
(lockID != 0);
1271
Debug.
Assert
(lockID != 0);
1272
Debug.
Assert
(headEntry == t_lockEntryHead);
1273
Debug.
Assert
(headEntry == null || headEntry._lockID != lockID);
1319
Debug.
Assert
(emptyEntry == headEntry);
1332
Debug.
Assert
(entry._lockID == lockID);
System.Threading.Channels (17)
src\libraries\Common\src\System\Collections\Generic\Deque.cs (6)
52
Debug.
Assert
(!IsEmpty); // caller's responsibility to make sure there are elements remaining
68
Debug.
Assert
(!IsEmpty); // caller's responsibility to make sure there are elements remaining
74
Debug.
Assert
(!IsEmpty); // caller's responsibility to make sure there are elements remaining
85
Debug.
Assert
(!IsEmpty); // caller's responsibility to make sure there are elements remaining
112
Debug.
Assert
(_size == _array.Length);
113
Debug.
Assert
(_head == _tail);
System\Threading\Channels\AsyncOperation.cs (4)
221
Debug.
Assert
(_executionContext == null);
228
Debug.
Assert
(_schedulingContext == null);
291
Debug.
Assert
(ts != null);
317
Debug.
Assert
(_registration == default);
System\Threading\Channels\BoundedChannel.cs (2)
48
Debug.
Assert
(bufferedCapacity > 0);
246
Debug.
Assert
(Monitor.IsEntered(parent.SyncObj));
System\Threading\Channels\ChannelUtilities.cs (3)
59
Debug.
Assert
(error != null);
99
Debug.
Assert
(completed || c.CancellationToken.CanBeCanceled);
112
Debug.
Assert
(error != null);
System\Threading\Channels\SingleConsumerUnboundedChannel.cs (1)
332
Debug.
Assert
(blockedReader != null);
System\Threading\Channels\UnboundedChannel.cs (1)
169
Debug.
Assert
(parent._items.IsThreadSafe || Monitor.IsEntered(parent.SyncObj));
System.Threading.RateLimiting (42)
src\libraries\Common\src\System\Collections\Generic\Deque.cs (6)
52
Debug.
Assert
(!IsEmpty); // caller's responsibility to make sure there are elements remaining
68
Debug.
Assert
(!IsEmpty); // caller's responsibility to make sure there are elements remaining
74
Debug.
Assert
(!IsEmpty); // caller's responsibility to make sure there are elements remaining
85
Debug.
Assert
(!IsEmpty); // caller's responsibility to make sure there are elements remaining
112
Debug.
Assert
(_size == _array.Length);
113
Debug.
Assert
(_head == _tail);
System\Threading\RateLimiting\ConcurrencyLimiter.cs (9)
146
Debug.
Assert
(_options.QueueLimit >= _queueCount);
156
Debug.
Assert
(_queueCount >= 0);
190
Debug.
Assert
(_queueCount <= _options.QueueLimit);
217
Debug.
Assert
(_permitCount >= 0);
245
Debug.
Assert
(_permitCount <= _options.PermitLimit);
283
Debug.
Assert
(_permitCount >= 0);
308
Debug.
Assert
(_queueCount >= 0);
318
Debug.
Assert
(_idleSince is null);
384
Debug.
Assert
(count == 0 ? limiter is null : true);
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (8)
163
Debug.
Assert
(_options.QueueLimit >= _queueCount);
173
Debug.
Assert
(_queueCount >= 0);
207
Debug.
Assert
(_queueCount <= _options.QueueLimit);
243
Debug.
Assert
(_permitCount >= 0);
274
Debug.
Assert
(limiter is not null);
339
Debug.
Assert
(_permitCount >= 0);
362
Debug.
Assert
(_queueCount >= 0);
373
Debug.
Assert
(_idleSince is null);
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (9)
175
Debug.
Assert
(_options.QueueLimit >= _queueCount);
185
Debug.
Assert
(_queueCount >= 0);
219
Debug.
Assert
(_queueCount <= _options.QueueLimit);
247
Debug.
Assert
(_permitCount >= 0);
280
Debug.
Assert
(limiter is not null);
319
Debug.
Assert
(_permitCount <= _options.PermitLimit);
351
Debug.
Assert
(_permitCount >= 0);
375
Debug.
Assert
(_queueCount >= 0);
386
Debug.
Assert
(_idleSince is null);
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (10)
168
Debug.
Assert
(_options.QueueLimit >= _queueCount);
178
Debug.
Assert
(_queueCount >= 0);
212
Debug.
Assert
(_queueCount <= _options.QueueLimit);
223
Debug.
Assert
(_options.TokensPerPeriod > 0);
250
Debug.
Assert
(_tokenCount >= 0);
281
Debug.
Assert
(limiter is not null);
325
Debug.
Assert
(_tokenCount <= _options.TokenLimit);
353
Debug.
Assert
(_tokenCount >= 0);
376
Debug.
Assert
(_queueCount >= 0);
387
Debug.
Assert
(_idleSince is null);
System.Threading.Tasks.Dataflow (7)
Blocks\ActionBlock.cs (5)
136
Debug.
Assert
(_defaultTarget != null);
160
Debug.
Assert
(_defaultTarget != null);
206
Debug.
Assert
(_defaultTarget != null);
232
Debug.
Assert
(_spscTarget != null);
251
Debug.
Assert
(_spscTarget != null);
Blocks\TransformManyBlock.IAsyncEnumerable.cs (1)
43
t.ContinueWith(static t => Debug.
Assert
(t.IsCompletedSuccessfully), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
Internal\SourceCore.cs (1)
371
Debug.
Assert
(items != null);
System.Threading.Tasks.Parallel (26)
System\Threading\Tasks\Parallel.cs (7)
923
Debug.
Assert
(typeof(TInt) == typeof(int) || typeof(TInt) == typeof(long));
1024
Debug.
Assert
(sharedPStateFlags != null);
1029
Debug.
Assert
(sharedPStateFlags != null);
1703
Debug.
Assert
(array != null);
1762
Debug.
Assert
(list != null);
2821
Debug.
Assert
(exObj is Exception);
2833
Debug.
Assert
(first is OperationCanceledException);
System\Threading\Tasks\Parallel.ForEachAsync.cs (11)
80
Debug.
Assert
(fromInclusive != null);
81
Debug.
Assert
(toExclusive != null);
82
Debug.
Assert
(scheduler != null);
83
Debug.
Assert
(body != null);
273
Debug.
Assert
(source != null);
274
Debug.
Assert
(scheduler != null);
275
Debug.
Assert
(body != null);
428
Debug.
Assert
(source != null);
429
Debug.
Assert
(scheduler != null);
430
Debug.
Assert
(body != null);
677
Debug.
Assert
(!Cancellation.IsCancellationRequested);
System\Threading\Tasks\ParallelLoopState.cs (3)
186
Debug.
Assert
(typeof(TInt) == typeof(int) || typeof(TInt) == typeof(long));
239
Debug.
Assert
(typeof(TInt) == typeof(int) || typeof(TInt) == typeof(long));
367
Debug.
Assert
(typeof(TInt) == typeof(long));
System\Threading\Tasks\ParallelRangeManager.cs (5)
178
Debug.
Assert
(typeof(TInt) == typeof(int) || typeof(TInt) == typeof(long));
182
Debug.
Assert
(
241
Debug.
Assert
((uSpan / uRangeSize) < int.MaxValue);
275
Debug.
Assert
(i == nNumRanges - 1);
291
Debug.
Assert
(_indexRanges != null && _indexRanges.Length != 0);
System.Transactions.Local (108)
System\Transactions\CommittableTransaction.cs (6)
64
Debug.
Assert
(_internalTransaction.State != null);
98
Debug.
Assert
(_internalTransaction.State != null);
133
Debug.
Assert
(_internalTransaction.State != null);
173
Debug.
Assert
(_internalTransaction.State != null);
203
Debug.
Assert
(_internalTransaction.State != null);
223
Debug.
Assert
(_internalTransaction.State != null);
System\Transactions\DependentTransaction.cs (2)
20
Debug.
Assert
(_internalTransaction.State != null);
51
Debug.
Assert
(_internalTransaction.State != null);
System\Transactions\DurableEnlistmentState.cs (8)
182
Debug.
Assert
(enlistment.Transaction.State != null);
192
Debug.
Assert
(enlistment.Transaction.State != null);
202
Debug.
Assert
(enlistment.Transaction.State != null);
214
Debug.
Assert
(enlistment.Transaction.State != null);
231
Debug.
Assert
(enlistment.PromotableSinglePhaseNotification != null);
239
Debug.
Assert
(enlistment.Transaction.State != null);
251
Debug.
Assert
(enlistment.Transaction.State != null);
263
Debug.
Assert
(enlistment.Transaction.State != null);
System\Transactions\Enlistment.cs (8)
142
Debug.
Assert
(_twoPhaseState != null);
234
Debug.
Assert
(Transaction._phase0Volatiles._preparedVolatileEnlistments <=
260
Debug.
Assert
(_singlePhaseNotifications != null);
275
Debug.
Assert
(_twoPhaseNotifications != null);
282
Debug.
Assert
(_twoPhaseNotifications != null);
289
Debug.
Assert
(_twoPhaseNotifications != null);
296
Debug.
Assert
(_twoPhaseNotifications != null);
388
Debug.
Assert
(_transaction._phase1Volatiles._preparedVolatileEnlistments <=
System\Transactions\EnlistmentState.cs (7)
118
Debug.
Assert
(enlistment.PromotedEnlistment != null);
132
Debug.
Assert
(enlistment.PromotedEnlistment != null);
146
Debug.
Assert
(enlistment.PromotedEnlistment != null);
160
Debug.
Assert
(enlistment.PromotedEnlistment != null);
174
Debug.
Assert
(enlistment.PromotedEnlistment != null);
188
Debug.
Assert
(enlistment.PromotedEnlistment != null);
202
Debug.
Assert
(enlistment.PromotedEnlistment != null);
System\Transactions\InternalTransaction.cs (3)
300
Debug.
Assert
(tx.PromotedTransaction != null);
304
Debug.
Assert
(tx.State! != null);
355
Debug.
Assert
(_committableTransaction != null);
System\Transactions\Transaction.cs (12)
461
Debug.
Assert
(_internalTransaction.State != null);
502
Debug.
Assert
(_internalTransaction.State != null);
550
Debug.
Assert
(_internalTransaction.State != null);
576
Debug.
Assert
(_internalTransaction.State != null);
600
Debug.
Assert
(_internalTransaction.State != null);
637
Debug.
Assert
(_internalTransaction.State != null);
676
Debug.
Assert
(_internalTransaction.State != null);
797
Debug.
Assert
(_internalTransaction.State != null);
948
Debug.
Assert
(_internalTransaction.State != null);
993
Debug.
Assert
(_internalTransaction.State != null);
1031
Debug.
Assert
(_internalTransaction.State != null);
1048
Debug.
Assert
(_internalTransaction.State != null);
System\Transactions\TransactionInformation.cs (2)
59
Debug.
Assert
(_internalTransaction.State != null);
88
Debug.
Assert
(_internalTransaction.State != null);
System\Transactions\TransactionScope.cs (7)
538
Debug.
Assert
(_threadContextData != null);
559
Debug.
Assert
(rollbackTransaction != null);
792
Debug.
Assert
(rollbackTransaction != null);
818
Debug.
Assert
(_expectedCurrent != null);
938
Debug.
Assert
(ContextKey != null);
985
Debug.
Assert
(_savedCurrentScope.ContextKey != null);
1027
Debug.
Assert
(_threadContextData != null);
System\Transactions\TransactionState.cs (33)
615
Debug.
Assert
(tx._phase0Volatiles._dependentClones >= 0);
618
Debug.
Assert
(tx._phase0Volatiles._preparedVolatileEnlistments <=
636
Debug.
Assert
(tx._phase1Volatiles._dependentClones >= 0);
664
Debug.
Assert
(tx.promotedToken != null);
845
Debug.
Assert
(tx._promoter != null);
1183
Debug.
Assert
(tx._committableTransaction != null);
1879
Debug.
Assert
(tx._phase0Volatiles._preparedVolatileEnlistments <=
1893
Debug.
Assert
(tx._phase0WaveDependentCloneCount >= 0);
1927
Debug.
Assert
(tx._phase1Volatiles._dependentClones >= 0);
1934
Debug.
Assert
(0 <= tx._abortingDependentCloneCount);
1969
Debug.
Assert
(tx.PromotedTransaction != null);
1991
Debug.
Assert
(tx.PromotedTransaction != null);
2065
Debug.
Assert
(tx.PromotedTransaction != null);
2131
Debug.
Assert
(tx.PromotedTransaction != null && tx.PromotedTransaction.RealTransaction != null);
2255
Debug.
Assert
(tx.PromotedTransaction != null);
2271
Debug.
Assert
(tx.PromotedTransaction != null);
2296
Debug.
Assert
(tx.PromotedTransaction != null && tx.PromotedTransaction.RealTransaction != null);
2300
Debug.
Assert
(tx.State != null);
2541
Debug.
Assert
(tx._phase0Volatiles.VolatileDemux._promotedEnlistment != null);
2649
Debug.
Assert
(tx._phase1Volatiles.VolatileDemux._promotedEnlistment != null);
2766
Debug.
Assert
(tx._phase0Volatiles.VolatileDemux._promotedEnlistment != null);
2777
Debug.
Assert
(tx.PromotedTransaction != null);
2808
Debug.
Assert
(tx._phase1Volatiles.VolatileDemux._promotedEnlistment != null);
2894
Debug.
Assert
(tx.PromotedTransaction != null);
3364
Debug.
Assert
(tx._durableEnlistment != null);
3535
Debug.
Assert
(tx._phase0Volatiles._preparedVolatileEnlistments <=
3554
Debug.
Assert
(tx._phase1Volatiles._dependentClones >= 0);
3746
Debug.
Assert
(tx._committableTransaction != null);
3847
Debug.
Assert
(tx._durableEnlistment != null);
4307
Debug.
Assert
(tx.PromotedTransaction != null);
4422
Debug.
Assert
(tx._promoter != null);
4616
Debug.
Assert
(tx._durableEnlistment != null);
4652
Debug.
Assert
(tx._durableEnlistment != null);
System\Transactions\TransactionTable.cs (2)
332
Debug.
Assert
(lastBucketSet != null);
377
Debug.
Assert
(tx._tableBucket != null);
System\Transactions\VolatileEnlistmentMultiplexing.cs (8)
258
Debug.
Assert
(_promotedEnlistment != null && _transaction.State != null);
285
Debug.
Assert
(_promotedEnlistment != null && _transaction.State != null);
295
Debug.
Assert
(_promotedEnlistment != null && _transaction.State != null);
305
Debug.
Assert
(_transaction.State != null);
349
Debug.
Assert
(_promotedEnlistment != null && _transaction.State != null);
377
Debug.
Assert
(_promotedEnlistment != null && _transaction.State != null);
388
Debug.
Assert
(_promotedEnlistment != null && _transaction.State != null);
399
Debug.
Assert
(_transaction.State != null);
System\Transactions\VolatileEnlistmentState.cs (10)
147
Debug.
Assert
(enlistment.EnlistmentNotification != null);
179
Debug.
Assert
(enlistment.Transaction.State != null);
222
Debug.
Assert
(enlistment.SinglePhaseNotification != null);
241
Debug.
Assert
(enlistment.Transaction.State != null);
248
Debug.
Assert
(enlistment.Transaction.State != null);
256
Debug.
Assert
(enlistment.Transaction.State != null);
266
Debug.
Assert
(enlistment.Transaction.State != null);
372
Debug.
Assert
(enlistment.EnlistmentNotification != null);
415
Debug.
Assert
(enlistment.EnlistmentNotification != null);
449
Debug.
Assert
(enlistment.EnlistmentNotification != null);
System.Web.HttpUtility (4)
src\libraries\Common\src\System\HexConverter.cs (1)
165
Debug.
Assert
(chars.Length >= bytes.Length * 2);
System\Web\Util\HttpEncoder.cs (3)
471
Debug.
Assert
(!string.IsNullOrEmpty(str));
472
Debug.
Assert
(e != null);
648
Debug.
Assert
(_byteBuffer != null);
System.Windows.Controls.Ribbon (57)
Microsoft\Windows\Controls\KeyTipAdorner.cs (1)
99
Debug.
Assert
(_keyTipControl == null && keyTipControl.KeyTipAdorner == null);
Microsoft\Windows\Controls\KeyTipService.cs (3)
246
Debug.
Assert
(element != null);
1116
Debug.
Assert
(_currentGlobalScope != null);
1180
Debug.
Assert
(_scopeStack.Count > 0);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryCategoriesPanel.cs (1)
148
Debug.
Assert
(IsScrolling);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryItemsPanel.cs (1)
336
Debug.
Assert
(maxColumnCount >= minColumnCount);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupsPanel.cs (4)
442
Debug.
Assert
(DoubleUtil.GreaterThan(remainingSpace, 0));
480
Debug.
Assert
(index >= 0 && index < starInfoList.Count);
507
Debug.
Assert
(distributionCount > 0 && distributionCount <= starInfoList.Count);
508
Debug.
Assert
(DoubleUtil.GreaterThan(remainingSpace, 0));
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonQuickAccessToolBarPanel.cs (15)
190
Debug.
Assert
(generatedChild != null);
315
Debug.
Assert
(GeneratedChildren.Count > InternalChildren.Count);
317
Debug.
Assert
(QAT.OverflowPanel.Children.Count == numItemsExpectedInOverflowPanel);
323
Debug.
Assert
(object.ReferenceEquals(InternalChildren[j], GeneratedChildren[j]));
325
Debug.
Assert
(currentChild != null);
326
Debug.
Assert
(RibbonQuickAccessToolBar.GetIsOverflowItem(currentChild) == false);
327
Debug.
Assert
(this.Children.Contains(currentChild) == true);
328
Debug.
Assert
(QAT.OverflowPanel.Children.Contains(currentChild) == false);
329
Debug.
Assert
(currentChild.IsVisible == this.IsVisible);
330
Debug.
Assert
(currentChild.DesiredSize.Width > 0.0);
337
Debug.
Assert
(object.ReferenceEquals(QAT.OverflowPanel.Children[overflowPanelIndex], GeneratedChildren[k]));
339
Debug.
Assert
(currentChild != null);
340
Debug.
Assert
(RibbonQuickAccessToolBar.GetIsOverflowItem(currentChild) == true);
341
Debug.
Assert
(this.Children.Contains(currentChild) == false);
342
Debug.
Assert
(QAT.OverflowPanel.Children.Contains(currentChild) == true);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (3)
250
Debug.
Assert
(ribbon.TabDisplayIndexToIndexMap.ContainsKey(i));
252
Debug.
Assert
(children.Count > index && index >= 0);
736
Debug.
Assert
(child != null);
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (1)
622
Debug.
Assert
(_editableTextBoxSite == sender);
Microsoft\Windows\Controls\Ribbon\RibbonControlLengthConverter.cs (1)
235
Debug.
Assert
(unit == RibbonControlLengthUnitType.Pixel || unit == RibbonControlLengthUnitType.Item ||
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (6)
106
Debug.
Assert
(_filterMenuButton.ItemContainerGenerator != null);
114
Debug.
Assert
(_filterMenuButton.ItemContainerGenerator != null);
1488
Debug.
Assert
(String.IsNullOrEmpty(path) || path == "/InnerText");
2355
Debug.
Assert
(gallery.ItemContainerGenerator.Status == GeneratorStatus.ContainersGenerated);
2652
Debug.
Assert
(e.RoutedEvent == Mouse.MouseMoveEvent || e.RoutedEvent == Mouse.MouseLeaveEvent);
2653
Debug.
Assert
(_localMousePosition.HasValue);
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (1)
1179
Debug.
Assert
(groupSizeDefinition != null && groupSizeDefinition.IsCollapsed);
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (7)
208
Debug.
Assert
(property != null);
214
Debug.
Assert
(d != null);
215
Debug.
Assert
(property != null);
216
Debug.
Assert
(v != null);
1004
Debug.
Assert
(element != null);
1381
Debug.
Assert
(starLayoutProvider != null);
2491
Debug.
Assert
(parentItemsControl != null);
Microsoft\Windows\Controls\Ribbon\RibbonKeyTipAndContentSyncHelper.cs (5)
33
Debug.
Assert
(element != null);
76
Debug.
Assert
(element != null);
96
Debug.
Assert
(element != null);
121
Debug.
Assert
(element != null);
140
Debug.
Assert
(element != null);
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (3)
1488
Debug.
Assert
(GetType().IsSubclassOf(type)); // RibbonMenuButton is a subclass of MenuBase
1492
Debug.
Assert
(property != null);
1497
Debug.
Assert
(method != null);
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
459
Debug.
Assert
(resizeStatusCount > 0);
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (2)
341
Debug.
Assert
(_textBlock1 != null && _textBlock2 != null);
375
Debug.
Assert
(_textBlock1 != null && _textBlock2 != null);
Microsoft\Windows\Controls\TextSearchInternal.cs (2)
808
Debug.
Assert
(_attachedTo != null);
823
Debug.
Assert
(_attachedTo != null);
System.Windows.Input.Manipulations (77)
System\Windows\Input\Manipulations\Exceptions.cs (12)
101
Debug.
Assert
(paramName1 != null);
102
Debug.
Assert
(paramName2 != null);
119
Debug.
Assert
(paramName1 != null);
120
Debug.
Assert
(paramName2 != null);
139
Debug.
Assert
(paramName1 != null);
140
Debug.
Assert
(paramName2a != null);
141
Debug.
Assert
(paramName2b != null);
199
Debug.
Assert
(paramName != null);
200
Debug.
Assert
(messageFormat != null);
218
Debug.
Assert
(paramName != null);
219
Debug.
Assert
(paramName.Length > 0);
238
Debug.
Assert
(format != null);
System\Windows\Input\Manipulations\InertiaParameters2D.cs (3)
30
Debug.
Assert
(isEqual != null);
31
Debug.
Assert
(setNewValue != null);
32
Debug.
Assert
(paramName != null);
System\Windows\Input\Manipulations\InertiaProcessor2D.cs (33)
364
Debug.
Assert
(!IsRunning);
417
Debug.
Assert
(handler != null);
687
Debug.
Assert
(!DoubleUtil.IsZero(state.InitialVelocity));
727
Debug.
Assert
(state.Duration >= 0);
728
Debug.
Assert
(!double.IsNaN(state.Deceleration));
729
Debug.
Assert
(!double.IsNaN(state.Offset));
747
Debug.
Assert
(this.processorState == ProcessorState.Running);
848
Debug.
Assert
(!DoubleUtil.IsZero(previousExpansionValue));
907
Debug.
Assert
(!double.IsNaN(initialVelocity) && !double.IsInfinity(initialValue));
908
Debug.
Assert
(!double.IsNaN(initialVelocity) && !double.IsInfinity(initialVelocity));
909
Debug.
Assert
(!double.IsNaN(deceleration) && !double.IsInfinity(deceleration));
910
Debug.
Assert
(!double.IsNaN(timeDelta) && !double.IsInfinity(timeDelta) && timeDelta >= 0);
924
Debug.
Assert
(!double.IsNaN(timeDelta) && !double.IsInfinity(timeDelta) && timeDelta >= 0);
1020
Debug.
Assert
(false);
1054
Debug.
Assert
(!double.IsInfinity(value));
1072
Debug.
Assert
(!double.IsNaN(length) && length >= 0 && !double.IsInfinity(length));
1073
Debug.
Assert
(!double.IsInfinity(baseVector.X));
1074
Debug.
Assert
(!double.IsInfinity(baseVector.Y));
1241
Debug.
Assert
(initialState != null);
1242
Debug.
Assert
(initialState.AbsoluteDeceleration >= 0 || double.IsNaN(initialState.AbsoluteDeceleration));
1243
Debug.
Assert
(initialState.AbsoluteOffset >= 0 || double.IsNaN(initialState.AbsoluteOffset));
1263
Debug.
Assert
(elapsedTimeSinceInitialTimestamp >= 0);
1275
Debug.
Assert
(Validations.IsFinite((float)result));
1301
Debug.
Assert
(this.ExtrapolationResult == ExtrapolationResult.Skip);
1305
Debug.
Assert
(!double.IsNaN(this.InitialValue) && !double.IsInfinity(this.InitialValue));
1306
Debug.
Assert
(!double.IsNaN(this.InitialVelocity) && !double.IsInfinity(this.InitialVelocity));
1307
Debug.
Assert
(!double.IsNaN(this.Offset)); // can be infinity
1308
Debug.
Assert
(!double.IsNaN(this.AbsoluteDeceleration) && this.AbsoluteDeceleration >= 0 && !double.IsInfinity(this.InitialVelocity));
1309
Debug.
Assert
(!double.IsNaN(this.Duration) && this.Duration >= 0); // can be infinity
1310
Debug.
Assert
(!double.IsNaN(this.FinalValue)); // can be infinity
1349
Debug.
Assert
(!double.IsNaN(value) && !double.IsInfinity(value));
1350
Debug.
Assert
(!double.IsNaN(delta) && !double.IsInfinity(delta));
1351
Debug.
Assert
(!double.IsNaN(total) && !double.IsInfinity(total));
System\Windows\Input\Manipulations\Lazy.cs (1)
32
Debug.
Assert
(getValue != null);
System\Windows\Input\Manipulations\Manipulation2DStartedEventArgs.cs (2)
43
Debug.
Assert
(Validations.IsFinite(originX));
44
Debug.
Assert
(Validations.IsFinite(originY));
System\Windows\Input\Manipulations\ManipulationPivot2D.cs (1)
142
Debug.
Assert
(processor != null);
System\Windows\Input\Manipulations\ManipulationProcessor2D.cs (3)
330
Debug.
Assert
(sender != null);
353
Debug.
Assert
(object.ReferenceEquals(sender, this.currentManipulation));
367
Debug.
Assert
(object.ReferenceEquals(sender, this.currentManipulation));
System\Windows\Input\Manipulations\ManipulationSequence.cs (16)
279
Debug.
Assert
(!float.IsNaN(result) && !float.IsInfinity(result));
599
Debug.
Assert
(this.log.Length > 0); // makes a good breakpoint to read the log
758
Debug.
Assert
(!double.IsNaN(value));
802
Debug.
Assert
(this.manipulatorStates != null);
836
Debug.
Assert
(!float.IsNaN(smoothedRotation) && !float.IsInfinity(smoothedRotation));
842
Debug.
Assert
(!float.IsNaN(smoothedExpansion) && !float.IsInfinity(smoothedExpansion));
848
Debug.
Assert
(!float.IsNaN(smoothedScale) && !float.IsInfinity(smoothedScale));
1017
Debug.
Assert
(this.manipulatorStates != null && this.manipulatorStates.Count > 0);
1038
Debug.
Assert
(this.manipulatorStates != null && this.manipulatorStates.Count > 0);
1077
Debug.
Assert
(queue != null);
1139
Debug.
Assert
(queue != null);
1554
Debug.
Assert
(!float.IsNaN(position.X) && !float.IsNaN(position.Y));
1555
Debug.
Assert
(!float.IsInfinity(position.Y) && !float.IsInfinity(position.Y));
1556
Debug.
Assert
(!float.IsNaN(scale) && !float.IsInfinity(scale) && scale > 0);
1557
Debug.
Assert
(!float.IsNaN(expansion) && !float.IsInfinity(expansion));
1558
Debug.
Assert
(!float.IsNaN(orientation) && !float.IsInfinity(orientation));
System\Windows\Input\Manipulations\ManipulationVelocities2D.cs (4)
88
Debug.
Assert
(Validations.IsFinite(linearVelocityX));
89
Debug.
Assert
(Validations.IsFinite(linearVelocityY));
90
Debug.
Assert
(Validations.IsFinite(angularVelocity));
91
Debug.
Assert
(Validations.IsFinite(expansionVelocity));
System\Windows\Input\Manipulations\Validations.cs (2)
31
Debug.
Assert
(paramName != null);
55
Debug.
Assert
(paramName != null);
System.Xaml (117)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
388
Debug.
Assert
(target != null);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Context\XamlContextStack.cs (5)
30
Debug.
Assert
(CurrentFrame != null);
31
Debug.
Assert
(CurrentFrame.Depth == Depth);
89
Debug.
Assert
(iteratorFrame != null);
113
Debug.
Assert
(CurrentFrame.Depth == Depth);
126
Debug.
Assert
(CurrentFrame.Depth == Depth);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (2)
1279
Debug.
Assert
(collection is not null);
1287
Debug.
Assert
(collection is not null);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
341
Debug.
Assert
(Scope.ShouldProcessContent(namespaceName, Reader.LocalName));
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlWrappingReader.cs (1)
33
Debug.
Assert
( baseReader != null );
System\Xaml\Context\ContextServices.cs (1)
19
Debug.
Assert
(xamlContext.ParentProperty != null);
System\Xaml\Context\NameFixupGraph.cs (8)
61
Debug.
Assert
(fixupToken.Target.Instance == null &&
64
Debug.
Assert
(_deferredRootProvideValue == null);
74
Debug.
Assert
(parentObject != null);
80
Debug.
Assert
(fixupToken.FixupType == FixupType.UnresolvedChildren ||
84
Debug.
Assert
(!_dependenciesByChildObject.ContainsKey(fixupToken.ReferencedObject));
90
Debug.
Assert
(fixupToken.FixupType != FixupType.UnresolvedChildren &&
438
Debug.
Assert
(outEdge.FixupType == FixupType.UnresolvedChildren);
451
Debug.
Assert
(parentDependencies.Contains(token));
System\Xaml\Context\NameFixupToken.cs (1)
131
Debug.
Assert
(_runtime == null);
System\Xaml\Context\ObjectWriterContext.cs (6)
141
Debug.
Assert
(!_nameResolutionComplete || value);
424
Debug.
Assert
(frame != null);
465
Debug.
Assert
(frame != null);
832
Debug.
Assert
(frame.NameScopeDictionary != null || frame.Depth == 0);
846
Debug.
Assert
(nameScopeDictionary != null);
878
Debug.
Assert
(rootFrame.Depth == 1);
System\Xaml\Context\XamlContext.cs (1)
261
Debug.
Assert
(typeName.Namespace != null);
System\Xaml\InfosetObjects\DeferredWriter.cs (2)
148
Debug.
Assert
(!property.IsDirective && !property.IsUnknown);
199
Debug.
Assert
(_deferredTreeDepth == 0);
System\Xaml\InfosetObjects\XamlObjectWriter.cs (19)
399
Debug.
Assert
(_context.CurrentProperty.DeferringLoader != null);
428
Debug.
Assert
(_context.LiveDepth > 0);
504
Debug.
Assert
(_context.LiveDepth > 1);
609
Debug.
Assert
(_context.LiveDepth > 0);
818
Debug.
Assert
(_context.CurrentProperty.DeferringLoader != null);
1173
Debug.
Assert
(inst != null); // runtime throws before it returns null.
1401
Debug.
Assert
(ctx.ParentProperty == XamlLanguage.Key);
1612
Debug.
Assert
(inst == ctx.ParentInstance);
1699
Debug.
Assert
(parentInstance != null || parentProperty != null && parentProperty.IsDirective || ctx.LiveDepth == 1);
1743
Debug.
Assert
(ctx.LiveDepth > 1);
1876
Debug.
Assert
(ctx.CurrentProperty == null);
2085
Debug.
Assert
(token.Target.Property == XamlLanguage.Key);
2339
Debug.
Assert
(!_inNameResolution);
2342
Debug.
Assert
(_nameFixupGraph != null);
2430
Debug.
Assert
(token.NeededNames.Count == 0 || nameResolutionIsComplete);
2525
Debug.
Assert
(token.FixupType == FixupType.MarkupExtensionFirstRun && _lastInstance == token.ReferencedObject);
2553
Debug.
Assert
(token.Target.KeyHolder.Key == token);
2562
Debug.
Assert
(pendingAdd.Key == token);
2572
Debug.
Assert
(pendingAdd.Item == token);
System\Xaml\Parser\GenericTypeNameParser.cs (4)
169
Debug.
Assert
(_scanner.Token == GenericTypeNameScannerToken.NAME);
199
Debug.
Assert
(_scanner.Token == GenericTypeNameScannerToken.OPEN);
230
Debug.
Assert
(_scanner.Token == GenericTypeNameScannerToken.COMMA);
241
Debug.
Assert
(_scanner.Token == GenericTypeNameScannerToken.SUBSCRIPT);
System\Xaml\Parser\GenericTypeNameScanner.cs (3)
298
Debug.
Assert
(_multiCharTokenStartIdx == -1 && _multiCharTokenLength == 0);
306
Debug.
Assert
(_multiCharTokenStartIdx != -1 && _multiCharTokenLength > 0);
359
Debug.
Assert
(KnownStrings.WhitespaceChars.Length == 5);
System\Xaml\Parser\MeScanner.cs (1)
552
Debug.
Assert
(KnownStrings.WhitespaceChars.Length == 5);
System\Xaml\Parser\NodeStreamSorter.cs (5)
553
Debug.
Assert
(deepestIdx != -1);
561
Debug.
Assert
(_sortingInfoArray[start].XamlNodeType == XamlNodeType.StartMember);
587
Debug.
Assert
(_sortingInfoArray[current].XamlNodeType == XamlNodeType.StartMember);
607
Debug.
Assert
(_sortingInfoArray[current].XamlNodeType == XamlNodeType.StartMember);
655
Debug.
Assert
(length1 > 0 && length2 > 0);
System\Xaml\Parser\XamlScanner.cs (4)
248
Debug.
Assert
(_xmlReader.NodeType == XmlNodeType.Element);
284
Debug.
Assert
(_xmlReader.NodeType == XmlNodeType.Element);
426
Debug.
Assert
(_xmlReader.NodeType == XmlNodeType.Element);
773
Debug.
Assert
(prop.IsUnknown);
System\Xaml\Parser\XamlScannerStack.cs (2)
77
Debug.
Assert
(_stack.Count != 0);
87
Debug.
Assert
(_stack.Count != 0);
System\Xaml\Parser\XamlText.cs (2)
264
Debug.
Assert
(start > 0);
265
Debug.
Assert
(end < text.Length);
System\Xaml\Runtime\DynamicMethodRuntime.cs (2)
131
Debug.
Assert
(schemaContext != null);
132
Debug.
Assert
(accessLevel != null);
System\Xaml\Schema\Reflector.cs (3)
252
Debug.
Assert
(attributeType == typeof(XamlDeferLoadAttribute));
253
Debug.
Assert
(count == 2);
358
Debug.
Assert
(value || (bitMask & bitToSet) == 0);
System\Xaml\Schema\TypeReflector.cs (2)
347
Debug.
Assert
(!IsUnknown);
1106
Debug.
Assert
(value);
System\Xaml\Schema\XamlDirective.cs (2)
25
Debug.
Assert
(immutableXamlNamespaces is not null);
28
Debug.
Assert
(ns is not null);
System\Xaml\Schema\XamlNamespace.cs (3)
160
Debug.
Assert
(typeArgs[n] != null);
161
Debug.
Assert
(typeArgs[n].UnderlyingType != null);
180
Debug.
Assert
(_assemblyNamespaces.Count == 1);
System\Xaml\XamlBackgroundReader.cs (1)
154
Debug.
Assert
(XamlNode.IsEof_Helper(nodeType, data));
System\Xaml\XamlMember.cs (1)
1018
Debug.
Assert
(xamlMember2.IsDirective);
System\Xaml\XamlNodeList.cs (1)
79
Debug.
Assert
(XamlNode.IsEof_Helper(nodeType, data));
System\Xaml\XamlNodeQueue.cs (1)
71
Debug.
Assert
(XamlNode.IsEof_Helper(nodeType, data));
System\Xaml\XamlObjectReader.cs (2)
301
Debug.
Assert
(false); //should never reach here
1766
Debug.
Assert
(Object != null);
System\Xaml\XamlType.cs (4)
1185
Debug.
Assert
(typeArgs.Length == 1);
1225
Debug.
Assert
(typeArgs.Length == 1);
1804
Debug.
Assert
(xamlType1.IsUnknown);
1805
Debug.
Assert
(xamlType2.IsUnknown);
System\Xaml\XamlXmlWriter.cs (26)
343
Debug.
Assert
(writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.StartMember);
383
Debug.
Assert
(ns != null);
384
Debug.
Assert
(prefix != null);
502
Debug.
Assert
(objectFrame.AllocatingNodeType == XamlNodeType.StartObject ||
524
Debug.
Assert
(frame.AllocatingNodeType == nodeType);
803
Debug.
Assert
(writer.namespaceScopes.Count > 1);
806
Debug.
Assert
(frame.AllocatingNodeType == XamlNodeType.StartMember);
821
Debug.
Assert
(writer.namespaceScopes.Count > 1);
824
Debug.
Assert
(frame.AllocatingNodeType == XamlNodeType.StartMember);
942
Debug.
Assert
(writer.namespaceScopes.Count == 1);
989
Debug.
Assert
(writer.namespaceScopes.Count > 0);
1075
Debug.
Assert
(writer.namespaceScopes.Count > 0);
1147
Debug.
Assert
(writer.namespaceScopes.Count > 0);
1148
Debug.
Assert
(writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.StartObject ||
1225
Debug.
Assert
(writer.namespaceScopes.Count > 0);
1353
Debug.
Assert
(writer.namespaceScopes.Count > 0);
1418
Debug.
Assert
(writer.namespaceScopes.Count > 0);
1420
Debug.
Assert
(memberFrame.AllocatingNodeType == XamlNodeType.StartMember ||
1551
Debug.
Assert
(writer.namespaceScopes.Count > 0);
1553
Debug.
Assert
(memberFrame.AllocatingNodeType == XamlNodeType.StartMember ||
1740
Debug.
Assert
(value != null);
1885
Debug.
Assert
(frame.AllocatingNodeType == XamlNodeType.StartObject);
1888
Debug.
Assert
(objectXamlType != null);
1929
Debug.
Assert
(member != null);
2055
Debug.
Assert
(writer.ppStateInfo.CurrentDepth != 0);
2056
Debug.
Assert
(writer.ppStateInfo.NodesList.Count != 0);
Templates.Blazor.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
574
Debug.
Assert
(pemEnvelope != null);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
574
Debug.
Assert
(pemEnvelope != null);
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
574
Debug.
Assert
(pemEnvelope != null);
Templates.Mvc.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
574
Debug.
Assert
(pemEnvelope != null);
Templates.Tests (1)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
574
Debug.
Assert
(pemEnvelope != null);
UIAutomationClient (10)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
48
Debug.
Assert
( hwnd != NativeMethods.HWND.NULL );
MS\Internal\Automation\SelectionPatternProviderSideWrapper.cs (1)
28
Debug.
Assert
(target != null);
MS\Internal\Automation\UiaCoreApi.cs (1)
460
Debug.
Assert
(offsets.Length == treeStructures.Length);
System\Windows\Automation\AutomationElement.cs (1)
768
Debug.
Assert
(responses.Length == 1);
System\Windows\Automation\BasePattern.cs (1)
29
Debug.
Assert
(el != null);
System\Windows\Automation\CacheRequest.cs (1)
552
Debug.
Assert
( _request != null );
System\Windows\Automation\Text\TextRange.cs (2)
64
Debug.
Assert
(!hTextRange.IsInvalid);
65
Debug.
Assert
(pattern != null);
System\Windows\Automation\TextPattern.cs (2)
35
Debug.
Assert
(el != null);
36
Debug.
Assert
(!hPattern.IsInvalid);
UIAutomationClientSideProviders (38)
MS\Internal\AutomationProxies\Accessible.cs (7)
324
Debug.
Assert
(parent != null);
335
Debug.
Assert
(false);
351
Debug.
Assert
(parent != null);
362
Debug.
Assert
(false);
752
Debug.
Assert
(_idChild == NativeMethods.CHILD_SELF);
799
Debug.
Assert
(false);
1011
Debug.
Assert
(_accessibleChildrenIndex < 0);
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
96
System.Diagnostics.Debug.
Assert
(remoteTextArea.ToInt32() == remoteTextArea.ToInt64());
MS\Internal\AutomationProxies\Misc.cs (2)
1993
Debug.
Assert
(System.Environment.OSVersion.Version.Major < 6);
2064
Debug.
Assert
(System.Environment.OSVersion.Version.Major >= 6);
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (2)
127
Debug.
Assert
(refcount >= 0);
364
Debug.
Assert
(eventId == NativeMethods.EVENT_OBJECT_REORDER);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (5)
58
Debug.
Assert
(hwnd != IntPtr.Zero);
230
Debug.
Assert
(_hwnd == UnsafeNativeMethods.WindowFromPhysicalPoint((int)x, (int)y));
346
Debug.
Assert
(false);
1030
Debug.
Assert
(!IsRoot);
1083
Debug.
Assert
(_hwnd != IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsEditBox.cs (4)
519
Debug.
Assert
(!IsMultiline);
526
Debug.
Assert
(IsMultiline);
964
Debug.
Assert
(floor >= 0);
975
Debug.
Assert
(i >= floor);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (1)
46
Debug.
Assert
(provider != null);
MS\Internal\AutomationProxies\WindowsListView.cs (1)
1965
System.Diagnostics.Debug.
Assert
(el is ListViewItemCheckbox);
MS\Internal\AutomationProxies\WindowsRichEdit.cs (4)
231
Debug.
Assert
(_document != null);
271
Debug.
Assert
(_document != null);
278
Debug.
Assert
(range.Start == range.End);
314
Debug.
Assert
(_document != null);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (11)
28
Debug.
Assert
(range != null);
29
Debug.
Assert
(pattern != null);
248
Debug.
Assert
(text == null || text.Length == maxLength);
1124
Debug.
Assert
(charMoved == 0 || charMoved == 1);
1127
Debug.
Assert
(paraMoved == 0 || paraMoved == 1);
1153
Debug.
Assert
(charMoved == 0 || charMoved == -1);
1156
Debug.
Assert
(paraMoved == 0 || paraMoved == -1);
1182
Debug.
Assert
(charMoved == 0 || charMoved == 1);
1185
Debug.
Assert
(paraMoved == 0 || paraMoved == 1);
1211
Debug.
Assert
(charMoved == 0 || charMoved == -1);
1214
Debug.
Assert
(paraMoved == 0 || paraMoved == -1);
UIAutomationTypes (2)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (1)
41
Debug.
Assert
((0xFFFF0000 & errorCode) == 0);
System\Windows\Automation\AutomationIdentifier.cs (1)
49
Debug.
Assert
(id != 0);
WindowsFormsIntegration (1)
System\Windows\Integration\ApplicationInterop.cs (1)
219
Debug.
Assert
(windowFilter != null);
xunit.console (1)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextLoader.cs (1)
97
Debug.
Assert
(_fileSystem.File.Exists(location));