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

36 lines
1.6 KiB
C#

using System;
using Cpp2IlInjected;
namespace System.Threading
{
/// <summary>Provides lazy initialization routines.</summary>
// Token: 0x0200030A RID: 778
[Token(Token = "0x200030A")]
public static class LazyInitializer
{
/// <summary>Initializes a target reference type by using a specified function if it hasn't already been initialized.</summary>
/// <param name="target">The reference of type T to initialize if it hasn't already been initialized.</param>
/// <param name="valueFactory">The function that is called to initialize the reference.</param>
/// <typeparam name="T">The reference type of the reference to be initialized.</typeparam>
/// <returns>The initialized value of type <paramref name="T" />.</returns>
/// <exception cref="T:System.MissingMemberException">Type <paramref name="T" /> does not have a default constructor.</exception>
/// <exception cref="T:System.InvalidOperationException">
/// <paramref name="valueFactory" /> returned null (Nothing in Visual Basic).</exception>
// Token: 0x06001CC1 RID: 7361 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001CC1")]
[Address(RVA = "0x12999B0", Offset = "0x12987B0", VA = "0x1812999B0")]
public static T EnsureInitialized<T>(ref T target, Func<T> valueFactory) where T : class
{
return null;
}
// Token: 0x06001CC2 RID: 7362 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x6001CC2")]
[Address(RVA = "0x12998F0", Offset = "0x12986F0", VA = "0x1812998F0")]
private static T EnsureInitializedCore<T>(ref T target, Func<T> valueFactory) where T : class
{
return null;
}
}
}