35 references to AsRef
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.Build (1)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.CodeAnalysis (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.CodeAnalysis.Extensions.Package (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
Microsoft.CSharp (1)
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\BuiltInVariantExtensions.cs (1)
21return ref Unsafe.AsRef<T>((void*)variant.GetRawDataRef<nint>());
Microsoft.Private.Windows.Core (1)
Windows\Win32\System\Com\SAFEARRAY.cs (1)
96return Unsafe.AsRef<T>(v);
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Dependencies\Collections\Internal\RoslynUnsafe.cs (1)
18=> ref Unsafe.AsRef<T>(null);
System.Drawing.Common (3)
System\Drawing\Bitmap.cs (2)
278ref Unsafe.AsRef<GdiPlus.BitmapData>(data)); 291this.UnlockBits(ref Unsafe.AsRef<GdiPlus.BitmapData>(data));
System\Drawing\Imaging\Effects\ColorLookupTableEffect.cs (1)
54SetParameters(ref Unsafe.AsRef<ColorLUTParams>(b));
System.Numerics.Tensors (6)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (2)
196_reference = ref Unsafe.AsRef<T>(data); 235_reference = ref Unsafe.AsRef<T>(data);
System\Numerics\Tensors\netcore\TensorShape.cs (2)
967=> Create(ref Unsafe.AsRef<T>(address), linearLength, pinned: true); 970=> Create(ref Unsafe.AsRef<T>(address), linearLength, lengths, strides, pinned: true);
System\Numerics\Tensors\netcore\TensorSpan_1.cs (2)
122_reference = ref Unsafe.AsRef<T>(data); 135_reference = ref Unsafe.AsRef<T>(data);
System.Private.CoreLib (7)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\Unsafe.cs (1)
776return ref AsRef<T>(null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (2)
133internal static unsafe ref T GetNonNullPinnableReference<T>(Span<T> span) => ref (span.Length != 0) ? ref Unsafe.AsRef(in span._reference) : ref Unsafe.AsRef<T>((void*)1); 140internal static unsafe ref T GetNonNullPinnableReference<T>(ReadOnlySpan<T> span) => ref (span.Length != 0) ? ref Unsafe.AsRef(in span._reference) : ref Unsafe.AsRef<T>((void*)1);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadBlockingInfo.cs (2)
87return ((Lock)Unsafe.AsRef<object>(_objectPtr)).OwningManagedThreadId; 91return ((Condition)Unsafe.AsRef<object>(_objectPtr)).AssociatedLock.OwningManagedThreadId;
System\Type.NativeAot.cs (2)
32ref RuntimeType? type = ref Unsafe.AsRef<RuntimeType?>(pMT->WritableData); 48ref RuntimeType? runtimeTypeCache = ref Unsafe.AsRef<RuntimeType?>(pMT->WritableData);
System.Private.Windows.Core (2)
Windows\Win32\System\Com\SAFEARRAY.cs (1)
96return Unsafe.AsRef<T>(v);
Windows\Win32\System\Variant\VARIANT.cs (1)
876=> MemoryMarshal.CreateSpan(ref Unsafe.AsRef<T>(Marshal.UnsafeAddrOfPinnedArrayElement(array, 0).ToPointer()), array.Length);
System.Security.Cryptography (2)
System\Security\Cryptography\Helpers.cs (2)
370return ref buffer.Length != 0 ? ref MemoryMarshal.GetReference(buffer) : ref Unsafe.AsRef<byte>((void*)1); 377return ref buffer.Length != 0 ? ref MemoryMarshal.GetReference(buffer) : ref Unsafe.AsRef<byte>((void*)1);
System.Text.RegularExpressions.Generator (1)
src\runtime\src\libraries\Common\src\Polyfills\EncodingPolyfills.cs (1)
79return ref buffer.Length != 0 ? ref MemoryMarshal.GetReference(buffer) : ref Unsafe.AsRef<T>((void*)1);
System.Windows.Forms (2)
System\Windows\Forms\Application.ComponentThreadContext.cs (1)
360=> PreTranslateMessage(ref Unsafe.AsRef<MSG>(msg));
System\Windows\Forms\SystemInformation.cs (1)
156return Font.FromLogFont(Unsafe.AsRef<LOGFONT>((LOGFONT*)&data.lfMenuFont));