127 references to Size
Microsoft.AspNetCore.DataProtection (1)
Repositories\RegistryXmlRepository.cs (1)
84var registryView = IntPtr.Size == 4 ? RegistryView.Registry32 : RegistryView.Registry64;
Microsoft.AspNetCore.Routing (2)
Matching\ILEmitTrieFactory.cs (1)
55return (IntPtr.Size == 8) &&
Matching\JumpTableBuilder.cs (1)
69var threshold = IntPtr.Size == 8 ? 100 : 50;
Microsoft.AspNetCore.Routing.Tests (1)
Matching\ILEmitTrieFactoryTest.cs (1)
13var is64Bit = IntPtr.Size == 8;
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (2)
26_buffer = new byte[((size / IntPtr.Size) + 2) * IntPtr.Size]; // sizeof DWORD
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (2)
26_buffer = new byte[((size / IntPtr.Size) + 2) * IntPtr.Size]; // sizeof DWORD
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (2)
26_buffer = new byte[((size / IntPtr.Size) + 2) * IntPtr.Size]; // sizeof DWORD
Microsoft.Build (2)
InprocTrackingNativeMethods.cs (1)
153private static readonly Lazy<string> fileTrackerDllName = new Lazy<string>(() => RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "FileTrackerA4.dll" : (IntPtr.Size == sizeof(Int32)) ? "FileTracker32.dll" : "FileTracker64.dll");
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
Microsoft.Build.Framework (1)
SegmentedArrayHelper.cs (1)
92return (2 * IntPtr.Size) + (elementSize * segmentSize);
Microsoft.Build.Tasks.Core (1)
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
Microsoft.Build.Utilities.Core (1)
InprocTrackingNativeMethods.cs (1)
153private static readonly Lazy<string> fileTrackerDllName = new Lazy<string>(() => RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "FileTrackerA4.dll" : (IntPtr.Size == sizeof(Int32)) ? "FileTracker32.dll" : "FileTracker64.dll");
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
248if (IntPtr.Size == 4) 269if (IntPtr.Size == 4)
MSBuild (1)
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
MSBuildTaskHost (2)
Concurrent\ConcurrentDictionary.cs (1)
87return IntPtr.Size == 8;
XMakeAttributes.cs (1)
450string currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
PresentationCore (1)
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
211result.CommHandle = new SecurityCriticalDataClass<IntPtr>((IntPtr.Size == 4 ? new IntPtr((int)commHandle) : new IntPtr(commHandle)));
PresentationFramework (7)
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (4)
651var byte_length = length * IntPtr.Size; 709var byte_length = length * IntPtr.Size; 737var byte_length = length * IntPtr.Size; 742bytes += IntPtr.Size;
System\Windows\Standard\NativeMethods.cs (3)
2850if (8 == IntPtr.Size) 3029if (8 == IntPtr.Size) 3068if (8 == IntPtr.Size)
PresentationUI (1)
MS\Internal\Documents\Application\CommandEnforcer.cs (1)
139if ((!_isRMMissing) && (IntPtr.Size == 4))
System.Collections.Concurrent (6)
System\Collections\Concurrent\ConcurrentDictionary.cs (4)
2210if (IntPtr.Size == 8) 2227if (IntPtr.Size == 8) 2262if (IntPtr.Size == 8) 2326return IntPtr.Size == 8;
System\Collections\Concurrent\PartitionerStatic.cs (2)
1659Debug.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 1660chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System.Collections.Immutable (1)
System\Collections\Frozen\Constants.cs (1)
82|| ((typeof(T) == typeof(nint) || typeof(T) == typeof(nuint)) && IntPtr.Size == 4);
System.Diagnostics.DiagnosticSource (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Diagnostics.Process (1)
System\Diagnostics\Process.Linux.cs (1)
224switch (IntPtr.Size)
System.IO.Compression (1)
System\IO\Compression\ZipArchiveEntry.cs (1)
358private static readonly bool s_allowLargeZipArchiveEntriesInUpdateMode = IntPtr.Size > 4;
System.IO.MemoryMappedFiles (5)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (4)
295if (IntPtr.Size == 4 && capacity > uint.MaxValue) 352if (IntPtr.Size == 4 && capacity > uint.MaxValue) 411if (IntPtr.Size == 4 && size > uint.MaxValue) 445if (IntPtr.Size == 4 && size > uint.MaxValue)
System\IO\MemoryMappedFiles\MemoryMappedView.cs (1)
86if (IntPtr.Size == 4 && newSize > uint.MaxValue)
System.Linq.Parallel (2)
System\Linq\Parallel\Scheduling\Scheduling.cs (2)
88Debug.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 89chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System.Net.Http (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Net.HttpListener (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Net.Mail (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Net.NetworkInformation (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Net.Primitives (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Net.Quic (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Net.Security (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Net.WebClient (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Numerics.Tensors (4)
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (4)
647private static bool IsUInt32Like<T>() => typeof(T) == typeof(uint) || (IntPtr.Size == 4 && typeof(T) == typeof(nuint)); 650private static bool IsInt32Like<T>() => typeof(T) == typeof(int) || (IntPtr.Size == 4 && typeof(T) == typeof(nint)); 653private static bool IsUInt64Like<T>() => typeof(T) == typeof(ulong) || (IntPtr.Size == 8 && typeof(T) == typeof(nuint)); 656private static bool IsInt64Like<T>() => typeof(T) == typeof(long) || (IntPtr.Size == 8 && typeof(T) == typeof(nint));
System.Private.CoreLib (49)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (1)
662return IntPtr.Size == 4 ? TypeCode.Int32 : TypeCode.Int64;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipePayloadDecoder.cs (1)
34payload = payload.Slice(IntPtr.Size);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
1752else if (IntPtr.Size == 4 && dataType == typeof(IntPtr)) 1812else if (IntPtr.Size == 8 && dataType == typeof(IntPtr))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (2)
152public static TraceLoggingTypeInfo IntPtr() => s_intptr ??= new ScalarArrayTypeInfo(typeof(IntPtr[]), Statics.IntPtrType, System.IntPtr.Size); 153public static TraceLoggingTypeInfo UIntPtr() => s_uintptr ??= new ScalarArrayTypeInfo(typeof(UIntPtr[]), Statics.UIntPtrType, System.IntPtr.Size);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (3)
32public static readonly TraceLoggingDataType IntPtrType = IntPtr.Size == 8 35public static readonly TraceLoggingDataType UIntPtrType = IntPtr.Size == 8 38public static readonly TraceLoggingDataType HexIntPtrType = IntPtr.Size == 8
src\libraries\System.Private.CoreLib\src\System\Environment.cs (1)
181public static bool Is64BitProcess => IntPtr.Size == 8;
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (1)
26int ret = Interop.Kernel32.LCMapStringEx(cultureName, Interop.Kernel32.LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (8)
1416if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1425if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 1482if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1491if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 1548if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1557if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 1614if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1623if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint)))
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (4)
450if (IntPtr.Size == 4) 454else if (IntPtr.Size == 8) 466if (IntPtr.Size == 4) 470else if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (1)
180il.Emit(OpCodes.Ldc_I4, i * IntPtr.Size);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (4)
27if (IntPtr.Size == 4) 29Debug.Assert(variantSize == (4 * IntPtr.Size)); 33Debug.Assert(IntPtr.Size == 8); 34Debug.Assert(variantSize == (3 * IntPtr.Size));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (1)
91if (IntPtr.Size == 4 && numBytes > uint.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.Unix.cs (1)
12return IntPtr.Size == 4 ? uint.MaxValue : ulong.MaxValue;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
34private static int HashShiftPerElement => IntPtr.Size == 8 ? 2 : 1;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (1)
385int maxLength = IntPtr.Size == 4 ? 1_000_000_000 : int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (2)
316if (IntPtr.Size >= 8 && (elementCount - i) >= (nuint)(8 / sizeof(TFrom))) 426if (IntPtr.Size < 8 || !Vector128.IsHardwareAccelerated)
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (3)
1333if (IntPtr.Size >= 8) 1375if (IntPtr.Size >= 8) 1435if (IntPtr.Size >= 8)
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (4)
558if (IntPtr.Size >= 8) 590if (IntPtr.Size >= 8) 641if (IntPtr.Size >= 8) 701if (IntPtr.Size >= 8)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (2)
237if (IntPtr.Size == 8) 305if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (1)
446if (IntPtr.Size >= 8 && BitConverter.IsLittleEndian)
src\System\GC.CoreCLR.cs (2)
139if (IntPtr.Size == 4) 150if (IntPtr.Size == 4)
src\System\StubHelpers.cs (2)
938vt = (IntPtr.Size == 4 ? VarEnum.VT_I4 : VarEnum.VT_I8); 942vt = (IntPtr.Size == 4 ? VarEnum.VT_UI4 : VarEnum.VT_UI8);
System.Private.DataContractSerialization (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Private.Uri (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Private.Xml (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Reflection.Metadata (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Runtime.Caching (1)
System\Runtime\Caching\CacheMemoryMonitor.cs (1)
92bool is64bit = (IntPtr.Size == 8);
System.Runtime.Numerics (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Security.Cryptography (2)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (1)
291int targetSize = checked(chainSize * IntPtr.Size);
System.Text.Encodings.Web (2)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System\Text\Encodings\Web\SpanUtility.cs (1)
247if (IntPtr.Size == 4)
System.Text.Json (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Text.RegularExpressions (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\ParallelRangeManager.cs (2)
114if (IntPtr.Size == 4 && _use32BitCurrentIndex) 254_use32BitCurrentIndex = IntPtr.Size == 4 && nRangeSize <= int.MaxValue;
System.Web.HttpUtility (1)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
UIAutomationClient (1)
MS\Internal\Automation\Misc.cs (1)
411if (IntPtr.Size == 4)
UIAutomationClientSideProviders (1)
MS\Win32\UnsafeNativeMethods.cs (1)
381if (IntPtr.Size == 4)
xunit.console (2)
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\RuntimeEnvironment.cs (1)
23return IntPtr.Size == 8 ? "x64" : "x86";
ConsoleRunner.cs (1)
181Console.WriteLine($"Microsoft.DotNet.XUnitConsoleRunner v{typeof(ConsoleRunner).Assembly.GetName().Version} ({IntPtr.Size * 8}-bit {platform})");