102 references to Count
Microsoft.CodeAnalysis (22)
CodeGen\BasicBlock.cs (1)
262public int RegularInstructionsLength => _lazyRegularInstructions?.Count ?? 0;
CodeGen\ILBuilder.cs (1)
904int absoluteOffset = writer.Count + blockOffset;
Emit\EditAndContinue\DeltaMetadataWriter.cs (2)
868int start = writer.Count; 870signature = writer.ToArray(start, writer.Count - start);
InternalUtilities\BlobBuildingStream.cs (1)
49public override long Length => _builder.Count;
PEWriter\MetadataWriter.cs (7)
2351int offset = mappedFieldDataWriter.Count; 2547Debug.Assert(resourceDataWriter == null || (resourceDataWriter.Count % ManagedPEBuilder.ManagedResourcesDataAlignment) == 0); 2557int result = resourceWriter.Count; 2564int result = resourceWriter.Count; 2565resourceWriter.WriteInt32(resource.Count); 2918bodyOffsetCache = ilBuilder.Count; 3763writer.WriteCompressedInteger(customAttributeArgsBuilder.Count);
PEWriter\MetadataWriter.DynamicAnalysis.cs (2)
114result = MetadataTokens.GuidHandle((_guidWriter.Count >> 4) + 1); 288var sizes = new Sizes(_blobHeapSize, _guidWriter.Count);
PEWriter\NativeResourceWriter.cs (3)
252uint nameOffset = (uint)dataWriter.Count + sizeOfDirectoryTree; 280dataWriter.WriteUInt32((uint)(virtualAddressBase + sizeOfDirectoryTree + 16 + dataWriter.Count)); 286while ((dataWriter.Count % 4) != 0)
PEWriter\PeWriter.cs (2)
60Debug.Assert(ManagedResourceBlobBuilder == null || ManagedResourceBlobBuilder.Count > 0); 61Debug.Assert(MappedFieldDataBlobBuilder == null || MappedFieldDataBlobBuilder.Count > 0);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (3)
25Debug.Assert(builder.Count == 0); 216var startOffset = Builder.Count; 226var length = Builder.Count - startOffset;
Microsoft.CodeAnalysis.Debugging.Package (3)
CustomDebugInfoEncoder.cs (3)
25Debug.Assert(builder.Count == 0); 216var startOffset = Builder.Count; 226var length = Builder.Count - startOffset;
Microsoft.CodeAnalysis.Features (3)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (3)
25Debug.Assert(builder.Count == 0); 216var startOffset = Builder.Count; 226var length = Builder.Count - startOffset;
System.Reflection.Emit (1)
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
659_metadataBuilder.AddFieldRelativeVirtualAddress(handle, fieldDataBuilder.Count);
System.Reflection.Metadata (73)
System\Reflection\Metadata\BlobBuilder.cs (12)
140Debug.Assert(totalLength == Count); 216if (Count != other.Count) 266return ToArray(0, Count); 273BlobUtilities.ValidateRange(Count, start, byteCount, nameof(byteCount)); 310return ToImmutableArray(0, Count); 396if (prefix.Count == 0) 402PreviousLength += prefix.Count; 457if (suffix.Count == 0) 463bool isEmpty = Count == 0; 805WriteBytes(0, position - Count); 811int position = Count;
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (2)
391if (encodedArguments.Count > BlobWriterImpl.MaxCompressedIntegerValue) 397Builder.WriteCompressedInteger(encodedArguments.Count);
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (1)
49public int Offset => CodeBuilder.Count;
System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs (4)
24if ((builder.Count % 4) != 0) 207int bodyOffset = SerializeHeader(codeBuilder.Count, (ushort)maxStack, exceptionRegionCount, attributes, localVariablesSignature, hasDynamicStackAllocation); 246offset = Builder.Count; 253offset = Builder.Count;
System\Reflection\Metadata\Ecma335\MetadataBuilder.cs (7)
23_userStringBuilder.Count, 24stringHeapBuilder.Count, 26_guidBuilder.Count); 35int startOffset = builder.Count; 55int metadataVersionStart = builder.Count; 58int metadataVersionEnd = builder.Count; 96int endOffset = builder.Count;
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (5)
29_capacityExpansion = Math.Max(0, capacity - Count - FreeBytes); 432return GuidHandle.FromIndex((_guidBuilder.Count >> 4) + 1); 518int offset = _userStringHeapStartOffset + _userStringBuilder.Count; 555int position = stringHeapStartOffset + heapBuilder.Count; 642int length = source.Count;
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (4)
1643int startPosition = writer.Count; 1871int endPosition = writer.Count; 1877int startPosition = writer.Count; 1918int endPosition = writer.Count;
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (2)
105int startPosition = builder.Count; 115int endPosition = builder.Count;
System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryBuilder.cs (7)
65int start = _dataBuilder.Count; 67int dataSize = _dataBuilder.Count - start; 144int start = builder.Count; 161return builder.Count - start; 204int start = builder.Count; 213return builder.Count - start; 217internal int Size => TableSize + _dataBuilder?.Count ?? 0;
System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryBuilder.EmbeddedPortablePdb.cs (3)
43int start = builder.Count; 47builder.WriteInt32(debugMetadata.Count); 62return builder.Count - start;
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (6)
131ilStreamSize: _ilStream.Count, 133resourceDataSize: _managedResourcesOpt?.Count ?? 0, 136mappedFieldDataSize: _mappedFieldDataOpt?.Count ?? 0); 192_peDirectoriesBuilder.ResourceTable = new DirectoryEntry(location.RelativeVirtualAddress, sectionBuilder.Count); 201_peDirectoriesBuilder.BaseRelocationTable = new DirectoryEntry(location.RelativeVirtualAddress, sectionBuilder.Count); 207Debug.Assert(builder.Count == 0);
System\Reflection\PortableExecutable\ManagedTextSection.cs (17)
246Debug.Assert(builder.Count == 0); 247Debug.Assert(metadataBuilder.Count == MetadataSize); 248Debug.Assert(metadataBuilder.Count % 4 == 0); 249Debug.Assert(ilBuilder.Count == ILStreamSize); 250Debug.Assert((mappedFieldDataBuilderOpt?.Count ?? 0) == MappedFieldDataSize); 251Debug.Assert((resourceBuilderOpt?.Count ?? 0) == ResourceDataSize); 300if (mappedFieldDataBuilderOpt.Count != 0) 305Debug.Assert(builder.Count == ComputeSizeOfTextSection()); 310int start = builder.Count; 327Debug.Assert(builder.Count - start == SizeOfImportAddressTable); 332int start = builder.Count; 364Debug.Assert(builder.Count - start == SizeOfImportTable); 369int start = builder.Count; 374Debug.Assert(builder.Count - start == SizeOfNameTable); 386int start = builder.Count; 429Debug.Assert(builder.Count - start == CorHeaderSize); 430Debug.Assert(builder.Count % 4 == 0);
System\Reflection\PortableExecutable\PEBuilder.cs (3)
58public int VirtualSize => Builder.Count; 141sizeOfRawData: BitArithmetic.Align(builder.Count, Header.FileAlignment), 520return CalculateChecksum(GetContentToChecksum(peImage, checksumFixup)) + (uint)peImage.Count;