149 references to SizeOf
GenerateDocumentationAndConfigFiles (8)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (7)
23return Unsafe.SizeOf<T>() switch 40_ => InlineCalculateSegmentSize(Unsafe.SizeOf<T>()), 50return Unsafe.SizeOf<T>() switch 67_ => InlineCalculateSegmentShift(Unsafe.SizeOf<T>()), 77return Unsafe.SizeOf<T>() switch 94_ => InlineCalculateOffsetMask(Unsafe.SizeOf<T>()), 175return System.Numerics.BitOperations.Log2((uint)((Threshold / elementSize) - (2 * Unsafe.SizeOf<object>() + 8)));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Metrics (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Metrics.Legacy (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Internal\Json\EnumConverter.cs (4)
90if (Unsafe.SizeOf<int>() == Unsafe.SizeOf<TEnum>()) 102if (Unsafe.SizeOf<int>() == Unsafe.SizeOf<TEnum>())
Microsoft.Build.Framework (9)
SegmentedArray`1.cs (1)
26/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
SegmentedArrayHelper.cs (8)
29if (Unsafe.SizeOf<T>() == Unsafe.SizeOf<object>()) 42if (Unsafe.SizeOf<T>() == Unsafe.SizeOf<object>()) 55if (Unsafe.SizeOf<T>() == Unsafe.SizeOf<object>()) 138public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<object>()); 145public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
Microsoft.CodeAnalysis (8)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (7)
23return Unsafe.SizeOf<T>() switch 40_ => InlineCalculateSegmentSize(Unsafe.SizeOf<T>()), 50return Unsafe.SizeOf<T>() switch 67_ => InlineCalculateSegmentShift(Unsafe.SizeOf<T>()), 77return Unsafe.SizeOf<T>() switch 94_ => InlineCalculateOffsetMask(Unsafe.SizeOf<T>()), 175return System.Numerics.BitOperations.Log2((uint)((Threshold / elementSize) - (2 * Unsafe.SizeOf<object>() + 8)));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.Analyzers (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.CodeStyle (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.Collections.Package (5)
Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.Extensions.Package (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.InteractiveHost (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.PublicApiAnalyzers (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.Threading.Package (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.Workspaces (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (8)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (7)
23return Unsafe.SizeOf<T>() switch 40_ => InlineCalculateSegmentSize(Unsafe.SizeOf<T>()), 50return Unsafe.SizeOf<T>() switch 67_ => InlineCalculateSegmentShift(Unsafe.SizeOf<T>()), 77return Unsafe.SizeOf<T>() switch 94_ => InlineCalculateOffsetMask(Unsafe.SizeOf<T>()), 175return System.Numerics.BitOperations.Log2((uint)((Threshold / elementSize) - (2 * Unsafe.SizeOf<object>() + 8)));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Microsoft.Data.Analysis (3)
DataFrameColumns\StringDataFrameColumn.cs (1)
21public static int MaxCapacity = ArrayUtility.ArrayMaxSize / Unsafe.SizeOf<IntPtr>(); // Max Size in bytes / size of pointer (8 bytes on x64)
DataFrameColumns\VBufferDataFrameColumn.cs (1)
20public static int MaxCapacity = ArrayUtility.ArrayMaxSize / Unsafe.SizeOf<VBuffer<T>>();
ReadOnlyDataFrameBuffer.cs (1)
35protected static int Size = Unsafe.SizeOf<T>();
Microsoft.DotNet.Build.Tasks.Installers (1)
src\RpmHeader.cs (1)
356Offset = -(Entries.Count + 1) * Unsafe.SizeOf<IndexEntry>(),
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\RentedSpan\RentedSpan.cs (1)
54var size = Unsafe.SizeOf<T>() * length;
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\RentedSpan\RentedSpan.cs (1)
54var size = Unsafe.SizeOf<T>() * length;
Microsoft.Extensions.Telemetry (2)
src\Shared\LogBuffering\SerializedLogRecordFactory.cs (1)
18private static readonly int _serializedLogRecordSize = Unsafe.SizeOf<SerializedLogRecord>();
src\Shared\RentedSpan\RentedSpan.cs (1)
54var size = Unsafe.SizeOf<T>() * length;
PresentationCore (2)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Ink\Native.cs (1)
24SizeOfGuid = (uint)Unsafe.SizeOf<Guid>();
System\Windows\Media\PixelFormat.cs (1)
150Debug.Assert(Unsafe.SizeOf<Guid>() == 16);
PresentationUI (1)
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
518Unsafe.SizeOf<Guid>() + sizeof(UInt32);
Roslyn.Diagnostics.Analyzers (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Shared (2)
LogBuffering\SerializedLogRecordFactory.cs (1)
18private static readonly int _serializedLogRecordSize = Unsafe.SizeOf<SerializedLogRecord>();
RentedSpan\RentedSpan.cs (1)
54var size = Unsafe.SizeOf<T>() * length;
System.Formats.Nrbf (1)
System\Formats\Nrbf\ArraySinglePrimitiveRecord.cs (1)
84? Unsafe.SizeOf<T>()
System.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64Helper.cs (4)
21int vectorElements = Unsafe.SizeOf<TVector>(); 35int vectorElements = Unsafe.SizeOf<TVector>(); 49int vectorElements = Unsafe.SizeOf<TVector>(); 63int vectorElements = Unsafe.SizeOf<TVector>();
src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (2)
238finalContinuation.Data = new byte[Unsafe.SizeOf<T>()]; 304finalContinuation.Data = new byte[Unsafe.SizeOf<T>()];
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (1)
576/// This API returns the same value as <see cref="Unsafe.SizeOf{T}"/> for the type that <paramref name="type"/> represents.
System.Private.Windows.Core (2)
System\Value.cs (2)
671Debug.Assert(Unsafe.SizeOf<T>() <= sizeof(ulong)); 915int size = Unsafe.SizeOf<T>();
System.Text.Json (1)
System\Text\Json\Document\JsonDocument.DbRow.cs (1)
61Debug.Assert(Unsafe.SizeOf<DbRow>() == Size);
Test.Utilities (8)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (7)
23return Unsafe.SizeOf<T>() switch 40_ => InlineCalculateSegmentSize(Unsafe.SizeOf<T>()), 50return Unsafe.SizeOf<T>() switch 67_ => InlineCalculateSegmentShift(Unsafe.SizeOf<T>()), 77return Unsafe.SizeOf<T>() switch 94_ => InlineCalculateOffsetMask(Unsafe.SizeOf<T>()), 175return System.Numerics.BitOperations.Log2((uint)((Threshold / elementSize) - (2 * Unsafe.SizeOf<object>() + 8)));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation
Text.Analyzers (5)
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (4)
23return Unsafe.SizeOf<T>() switch 50return Unsafe.SizeOf<T>() switch 77return Unsafe.SizeOf<T>() switch 200public static readonly int SegmentSize = CalculateSegmentSize(Unsafe.SizeOf<T>());
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
28/// <para>The segment size is calculated according to <see cref="Unsafe.SizeOf{T}"/>, performs the IL operation