Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

213 lines
8.9 KiB
C#

using System;
using System.Diagnostics;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Threading;
using Cpp2IlInjected;
namespace System
{
/// <summary>Provides support for lazy initialization.</summary>
/// <typeparam name="T">The type of object that is being lazily initialized.</typeparam>
// Token: 0x0200008C RID: 140
[Token(Token = "0x200008C")]
[DebuggerDisplay("ThreadSafetyMode={Mode}, IsValueCreated={IsValueCreated}, IsValueFaulted={IsValueFaulted}, Value={ValueForDebugDisplay}")]
[ComVisible(false)]
[DebuggerTypeProxy(typeof(System_LazyDebugView<>))]
[Serializable]
public class Lazy<T>
{
/// <summary>Initializes a new instance of the <see cref="T:System.Lazy`1" /> class. When lazy initialization occurs, the default constructor of the target type is used.</summary>
// Token: 0x06000452 RID: 1106 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000452")]
[Address(RVA = "0x2C77610", Offset = "0x2C76410", VA = "0x182C77610")]
public Lazy()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Lazy`1" /> class. When lazy initialization occurs, the specified initialization function is used.</summary>
/// <param name="valueFactory">The delegate that is invoked to produce the lazily initialized value when it is needed.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="valueFactory" /> is <see langword="null" />.</exception>
// Token: 0x06000453 RID: 1107 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000453")]
[Address(RVA = "0x2C77790", Offset = "0x2C76590", VA = "0x182C77790")]
public Lazy(Func<T> valueFactory)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Lazy`1" /> class that uses the default constructor of <paramref name="T" /> and the specified thread-safety mode.</summary>
/// <param name="mode">One of the enumeration values that specifies the thread safety mode.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="mode" /> contains an invalid value.</exception>
// Token: 0x06000454 RID: 1108 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000454")]
[Address(RVA = "0x2C77530", Offset = "0x2C76330", VA = "0x182C77530")]
public Lazy(LazyThreadSafetyMode mode)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Lazy`1" /> class that uses the specified initialization function and thread-safety mode.</summary>
/// <param name="valueFactory">The delegate that is invoked to produce the lazily initialized value when it is needed.</param>
/// <param name="mode">One of the enumeration values that specifies the thread safety mode.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="mode" /> contains an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="valueFactory" /> is <see langword="null" />.</exception>
// Token: 0x06000455 RID: 1109 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000455")]
[Address(RVA = "0x2C77640", Offset = "0x2C76440", VA = "0x182C77640")]
public Lazy(Func<T> valueFactory, LazyThreadSafetyMode mode)
{
}
// Token: 0x06000456 RID: 1110 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6000456")]
[Address(RVA = "0x2C76CA0", Offset = "0x2C75AA0", VA = "0x182C76CA0")]
private static object GetObjectFromMode(LazyThreadSafetyMode mode)
{
return null;
}
// Token: 0x06000457 RID: 1111 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000457")]
[Address(RVA = "0x2C77230", Offset = "0x2C76030", VA = "0x182C77230")]
[OnSerializing]
private void OnSerializing(StreamingContext context)
{
}
/// <summary>Creates and returns a string representation of the <see cref="P:System.Lazy`1.Value" /> property for this instance.</summary>
/// <returns>The result of calling the <see cref="M:System.Object.ToString" /> method on the <see cref="P:System.Lazy`1.Value" /> property for this instance, if the value has been created (that is, if the <see cref="P:System.Lazy`1.IsValueCreated" /> property returns <see langword="true" />). Otherwise, a string indicating that the value has not been created.</returns>
/// <exception cref="T:System.NullReferenceException">The <see cref="P:System.Lazy`1.Value" /> property is <see langword="null" />.</exception>
// Token: 0x06000458 RID: 1112 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6000458")]
[Address(RVA = "0x2C77260", Offset = "0x2C76060", VA = "0x182C77260", Slot = "3")]
public override string ToString()
{
return null;
}
// Token: 0x17000083 RID: 131
// (get) Token: 0x06000459 RID: 1113 RVA: 0x00004080 File Offset: 0x00002280
[Token(Token = "0x17000083")]
internal LazyThreadSafetyMode Mode
{
[Token(Token = "0x6000459")]
[Address(RVA = "0x2C77820", Offset = "0x2C76620", VA = "0x182C77820")]
get
{
return LazyThreadSafetyMode.None;
}
}
/// <summary>Gets a value that indicates whether a value has been created for this <see cref="T:System.Lazy`1" /> instance.</summary>
/// <returns>
/// <see langword="true" /> if a value has been created for this <see cref="T:System.Lazy`1" /> instance; otherwise, <see langword="false" />.</returns>
// Token: 0x17000084 RID: 132
// (get) Token: 0x0600045A RID: 1114 RVA: 0x00004098 File Offset: 0x00002298
[Token(Token = "0x17000084")]
public bool IsValueCreated
{
[Token(Token = "0x600045A")]
[Address(RVA = "0x2C777C0", Offset = "0x2C765C0", VA = "0x182C777C0")]
get
{
return default(bool);
}
}
/// <summary>Gets the lazily initialized value of the current <see cref="T:System.Lazy`1" /> instance.</summary>
/// <returns>The lazily initialized value of the current <see cref="T:System.Lazy`1" /> instance.</returns>
/// <exception cref="T:System.MemberAccessException">The <see cref="T:System.Lazy`1" /> instance is initialized to use the default constructor of the type that is being lazily initialized, and permissions to access the constructor are missing.</exception>
/// <exception cref="T:System.MissingMemberException">The <see cref="T:System.Lazy`1" /> instance is initialized to use the default constructor of the type that is being lazily initialized, and that type does not have a public, parameterless constructor.</exception>
/// <exception cref="T:System.InvalidOperationException">The initialization function tries to access <see cref="P:System.Lazy`1.Value" /> on this instance.</exception>
// Token: 0x17000085 RID: 133
// (get) Token: 0x0600045B RID: 1115 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x17000085")]
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
public T Value
{
[Token(Token = "0x600045B")]
[Address(RVA = "0x2C778A0", Offset = "0x2C766A0", VA = "0x182C778A0")]
get
{
return null;
}
}
// Token: 0x0600045C RID: 1116 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600045C")]
[Address(RVA = "0x2C76D90", Offset = "0x2C75B90", VA = "0x182C76D90")]
private T LazyInitValue()
{
return null;
}
// Token: 0x0600045D RID: 1117 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x600045D")]
[Address(RVA = "0x2C76740", Offset = "0x2C75540", VA = "0x182C76740")]
private Lazy<T>.Boxed CreateValue()
{
return null;
}
// Token: 0x040001DB RID: 475
[Token(Token = "0x40001DB")]
private static readonly Func<T> ALREADY_INVOKED_SENTINEL;
// Token: 0x040001DC RID: 476
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x40001DC")]
private object m_boxed;
// Token: 0x040001DD RID: 477
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x40001DD")]
[NonSerialized]
private Func<T> m_valueFactory;
// Token: 0x040001DE RID: 478
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x40001DE")]
[NonSerialized]
private object m_threadSafeObj;
// Token: 0x0200008D RID: 141
[Token(Token = "0x200008D")]
[Serializable]
private class Boxed
{
// Token: 0x0600045F RID: 1119 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x600045F")]
[Address(RVA = "0x1A83E00", Offset = "0x1A82C00", VA = "0x181A83E00")]
internal Boxed(T value)
{
}
// Token: 0x040001DF RID: 479
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x40001DF")]
internal T m_value;
}
// Token: 0x0200008E RID: 142
[Token(Token = "0x200008E")]
private class LazyInternalExceptionHolder
{
// Token: 0x06000460 RID: 1120 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000460")]
[Address(RVA = "0x2C76700", Offset = "0x2C75500", VA = "0x182C76700")]
internal LazyInternalExceptionHolder(Exception ex)
{
}
// Token: 0x040001E0 RID: 480
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x40001E0")]
internal ExceptionDispatchInfo m_edi;
}
}
}