4 instantiations of GCHandle
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (1)
77
_gcHandle = new
GCHandle
<EventPipeEventProvider>(this);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.T.cs (1)
74
public static GCHandle<T> FromIntPtr(IntPtr value) => new
GCHandle
<T>(value);
System\GC.NativeAot.cs (1)
326
pWorkItem->action = new
GCHandle
<Action>(callback);
System\Threading\Thread.NativeAot.cs (1)
366
GCHandle<Thread> threadHandle = new
GCHandle
<Thread>(this);
26 references to GCHandle
System.Private.CoreLib (25)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (3)
14
private
GCHandle
<EventPipeEventProvider> _gcHandle;
66
EventPipeEventProvider _this =
GCHandle
<EventPipeEventProvider>.FromIntPtr((IntPtr)callbackContext).Target;
79
_provHandle = EventPipeInternal.CreateProvider(name, &Callback, (void*)
GCHandle
<EventPipeEventProvider>.ToIntPtr(_gcHandle));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (1)
24
/// <seealso cref="
GCHandle
{T}"/>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.T.cs (16)
22
/// <typeparam name="T">The type of the object this <see cref="
GCHandle
{T}"/> tracks to.</typeparam>
23
public struct GCHandle<T> : IEquatable<
GCHandle
<T>>, IDisposable
32
/// <param name="target">The object that uses the <see cref="
GCHandle
{T}"/>.</param>
63
/// Returns a new <see cref="
GCHandle
{T}"/> object created from a handle to a managed object.
65
/// <param name="value">An <see cref="IntPtr"/> handle to a managed object to create a <see cref="
GCHandle
{T}"/> object from.</param>
66
/// <returns>A new <see cref="
GCHandle
{T}"/> object that corresponds to the value parameter.</returns>
70
/// The <see cref="IntPtr"/> representation of <see cref="
GCHandle
{T}"/> is not
74
public static
GCHandle
<T> FromIntPtr(IntPtr value) => new GCHandle<T>(value);
77
/// Returns the internal integer representation of a <see cref="
GCHandle
{T}"/> object.
79
/// <param name="value">A <see cref="
GCHandle
{T}"/> object to retrieve an internal integer representation from.</param>
80
/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="
GCHandle
{T}"/> object.</returns>
82
/// The <see cref="IntPtr"/> representation of <see cref="
GCHandle
{T}"/> is not
85
public static IntPtr ToIntPtr(
GCHandle
<T> value) => value._handle;
87
/// <summary>Releases this <see cref="
GCHandle
{T}"/>.</summary>
102
public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is
GCHandle
<T> handle && Equals(handle);
105
public readonly bool Equals(
GCHandle
<T> other) => _handle == other._handle;
System\GC.NativeAot.cs (1)
314
public
GCHandle
<Action> action;
System\Threading\Thread.NativeAot.cs (2)
366
GCHandle
<Thread> threadHandle = new GCHandle<Thread>(this);
409
Thread thread =
GCHandle
<Thread>.FromIntPtr(parameter).Target;
System\Threading\Thread.NativeAot.Unix.cs (2)
60
private unsafe bool CreateThread(
GCHandle
<Thread> thisThreadHandle)
74
if (!Interop.Sys.CreateThread(stackSize, RuntimeImports.RhGetThreadEntryPointAddress(),
GCHandle
<Thread>.ToIntPtr(thisThreadHandle)))
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
688
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.
GCHandle
<>))]