Files
Aug2021-Cpp2IL-Dump/mscorlib/System/WeakReference.2.cs
T
2026-04-10 22:50:51 +02:00

85 lines
4.1 KiB
C#

using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using Cpp2IlInjected;
namespace System
{
/// <summary>Represents a typed weak reference, which references an object while still allowing that object to be reclaimed by garbage collection.</summary>
/// <typeparam name="T">The type of the object referenced.</typeparam>
// Token: 0x020001B2 RID: 434
[Token(Token = "0x20001B2")]
[Serializable]
public sealed class WeakReference<T> : ISerializable where T : class
{
/// <summary>Initializes a new instance of the <see cref="T:System.WeakReference`1" /> class that references the specified object.</summary>
/// <param name="target">The object to reference, or <see langword="null" />.</param>
// Token: 0x060010C2 RID: 4290 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010C2")]
[Address(RVA = "0x28EB600", Offset = "0x28EA400", VA = "0x1828EB600")]
public WeakReference(T target)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.WeakReference`1" /> class that references the specified object and uses the specified resurrection tracking.</summary>
/// <param name="target">The object to reference, or <see langword="null" />.</param>
/// <param name="trackResurrection">
/// <see langword="true" /> to track the object after finalization; <see langword="false" /> to track the object only until finalization.</param>
// Token: 0x060010C3 RID: 4291 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010C3")]
[Address(RVA = "0x31B4120", Offset = "0x31B2F20", VA = "0x1831B4120")]
public WeakReference(T target, bool trackResurrection)
{
}
// Token: 0x060010C4 RID: 4292 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010C4")]
[Address(RVA = "0x31B4010", Offset = "0x31B2E10", VA = "0x1831B4010")]
private WeakReference(SerializationInfo info, StreamingContext context)
{
}
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with all the data necessary to serialize the current <see cref="T:System.WeakReference`1" /> object.</summary>
/// <param name="info">An object that holds all the data necessary to serialize or deserialize the current <see cref="T:System.WeakReference`1" /> object.</param>
/// <param name="context">The location where serialized data is stored and retrieved.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="info" /> is <see langword="null" />.</exception>
// Token: 0x060010C5 RID: 4293 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010C5")]
[Address(RVA = "0x31B3E50", Offset = "0x31B2C50", VA = "0x1831B3E50", Slot = "4")]
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
}
/// <summary>Tries to retrieve the target object that is referenced by the current <see cref="T:System.WeakReference`1" /> object.</summary>
/// <param name="target">When this method returns, contains the target object, if it is available. This parameter is treated as uninitialized.</param>
/// <returns>
/// <see langword="true" /> if the target was retrieved; otherwise, <see langword="false" />.</returns>
// Token: 0x060010C6 RID: 4294 RVA: 0x0000D350 File Offset: 0x0000B550
[Token(Token = "0x60010C6")]
[Address(RVA = "0x31B3F10", Offset = "0x31B2D10", VA = "0x1831B3F10")]
public bool TryGetTarget(out T target)
{
return default(bool);
}
/// <summary>Discards the reference to the target that is represented by the current <see cref="T:System.WeakReference`1" /> object.</summary>
// Token: 0x060010C7 RID: 4295 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010C7")]
[Address(RVA = "0x31B3DD0", Offset = "0x31B2BD0", VA = "0x1831B3DD0", Slot = "1")]
protected override void Finalize()
{
}
// Token: 0x040008AE RID: 2222
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x40008AE")]
private GCHandle handle;
// Token: 0x040008AF RID: 2223
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x40008AF")]
private bool trackResurrection;
}
}