Files
27Aug2021-Cpp2IL-Dump/mscorlib/System/WeakReference.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

146 lines
7.1 KiB
C#

using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using Cpp2IlInjected;
namespace System
{
/// <summary>Represents a weak reference, which references an object while still allowing that object to be reclaimed by garbage collection.</summary>
// Token: 0x020001B8 RID: 440
[Token(Token = "0x20001B8")]
[ComVisible(true)]
[Serializable]
public class WeakReference : ISerializable
{
// Token: 0x060010ED RID: 4333 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010ED")]
[Address(RVA = "0x3BBC060", Offset = "0x3BBB060", VA = "0x183BBC060")]
private void AllocateHandle(object target)
{
}
// Token: 0x060010EE RID: 4334 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010EE")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
protected WeakReference()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.WeakReference" /> class, referencing the specified object.</summary>
/// <param name="target">The object to track or <see langword="null" />.</param>
// Token: 0x060010EF RID: 4335 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010EF")]
[Address(RVA = "0x3BBC210", Offset = "0x3BBB210", VA = "0x183BBC210")]
public WeakReference(object target)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.WeakReference" /> class, referencing the specified object and using the specified resurrection tracking.</summary>
/// <param name="target">An object to track.</param>
/// <param name="trackResurrection">Indicates when to stop tracking the object. If <see langword="true" />, the object is tracked after finalization; if <see langword="false" />, the object is only tracked until finalization.</param>
// Token: 0x060010F0 RID: 4336 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010F0")]
[Address(RVA = "0x3BBC250", Offset = "0x3BBB250", VA = "0x183BBC250")]
public WeakReference(object target, bool trackResurrection)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.WeakReference" /> class, using deserialized data from the specified serialization and stream objects.</summary>
/// <param name="info">An object that holds all the data needed to serialize or deserialize the current <see cref="T:System.WeakReference" /> object.</param>
/// <param name="context">(Reserved) Describes the source and destination of the serialized stream specified by <paramref name="info" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="info" /> is <see langword="null" />.</exception>
// Token: 0x060010F1 RID: 4337 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010F1")]
[Address(RVA = "0x3BBC2A0", Offset = "0x3BBB2A0", VA = "0x183BBC2A0")]
protected WeakReference(SerializationInfo info, StreamingContext context)
{
}
/// <summary>Gets an indication whether the object referenced by the current <see cref="T:System.WeakReference" /> object has been garbage collected.</summary>
/// <returns>
/// <see langword="true" /> if the object referenced by the current <see cref="T:System.WeakReference" /> object has not been garbage collected and is still accessible; otherwise, <see langword="false" />.</returns>
// Token: 0x1700019B RID: 411
// (get) Token: 0x060010F2 RID: 4338 RVA: 0x0000D638 File Offset: 0x0000B838
[Token(Token = "0x1700019B")]
public virtual bool IsAlive
{
[Token(Token = "0x60010F2")]
[Address(RVA = "0x3BBC3A0", Offset = "0x3BBB3A0", VA = "0x183BBC3A0", Slot = "5")]
get
{
return default(bool);
}
}
/// <summary>Gets or sets the object (the target) referenced by the current <see cref="T:System.WeakReference" /> object.</summary>
/// <returns>
/// <see langword="null" /> if the object referenced by the current <see cref="T:System.WeakReference" /> object has been garbage collected; otherwise, a reference to the object referenced by the current <see cref="T:System.WeakReference" /> object.</returns>
/// <exception cref="T:System.InvalidOperationException">The reference to the target object is invalid. This exception can be thrown while setting this property if the value is a null reference or if the object has been finalized during the set operation.</exception>
// Token: 0x1700019C RID: 412
// (get) Token: 0x060010F3 RID: 4339 RVA: 0x00002082 File Offset: 0x00000282
// (set) Token: 0x060010F4 RID: 4340 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x1700019C")]
public virtual object Target
{
[Token(Token = "0x60010F3")]
[Address(RVA = "0x3BBC3C0", Offset = "0x3BBB3C0", VA = "0x183BBC3C0", Slot = "6")]
get
{
return null;
}
[Token(Token = "0x60010F4")]
[Address(RVA = "0x3BBC3F0", Offset = "0x3BBB3F0", VA = "0x183BBC3F0", Slot = "7")]
set
{
}
}
/// <summary>Gets an indication whether the object referenced by the current <see cref="T:System.WeakReference" /> object is tracked after it is finalized.</summary>
/// <returns>
/// <see langword="true" /> if the object the current <see cref="T:System.WeakReference" /> object refers to is tracked after finalization; or <see langword="false" /> if the object is only tracked until finalization.</returns>
// Token: 0x1700019D RID: 413
// (get) Token: 0x060010F5 RID: 4341 RVA: 0x0000D650 File Offset: 0x0000B850
[Token(Token = "0x1700019D")]
public virtual bool TrackResurrection
{
[Token(Token = "0x60010F5")]
[Address(RVA = "0x4944B0", Offset = "0x4934B0", VA = "0x1804944B0", Slot = "8")]
get
{
return default(bool);
}
}
/// <summary>Discards the reference to the target represented by the current <see cref="T:System.WeakReference" /> object.</summary>
// Token: 0x060010F6 RID: 4342 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010F6")]
[Address(RVA = "0x3BBC090", Offset = "0x3BBB090", VA = "0x183BBC090", Slot = "1")]
protected override void Finalize()
{
}
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with all the data needed to serialize the current <see cref="T:System.WeakReference" /> object.</summary>
/// <param name="info">An object that holds all the data needed to serialize or deserialize the current <see cref="T:System.WeakReference" /> object.</param>
/// <param name="context">(Reserved) The location where serialized data is stored and retrieved.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="info" /> is <see langword="null" />.</exception>
// Token: 0x060010F7 RID: 4343 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60010F7")]
[Address(RVA = "0x3BBC110", Offset = "0x3BBB110", VA = "0x183BBC110", Slot = "9")]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
}
// Token: 0x040008B6 RID: 2230
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x40008B6")]
private bool isLongReference;
// Token: 0x040008B7 RID: 2231
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
[Token(Token = "0x40008B7")]
private GCHandle gcHandle;
}
}