36 lines
1.6 KiB
C#
36 lines
1.6 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Threading
|
|
{
|
|
/// <summary>Provides lazy initialization routines.</summary>
|
|
// Token: 0x02000324 RID: 804
|
|
[Token(Token = "0x2000324")]
|
|
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: 0x06001EC2 RID: 7874 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6001EC2")]
|
|
[Address(RVA = "0x1E5AF00", Offset = "0x1E59F00", VA = "0x181E5AF00")]
|
|
public static T EnsureInitialized<T>(ref T target, Func<T> valueFactory) where T : class
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06001EC3 RID: 7875 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6001EC3")]
|
|
[Address(RVA = "0x1E5AE40", Offset = "0x1E59E40", VA = "0x181E5AE40")]
|
|
private static T EnsureInitializedCore<T>(ref T target, Func<T> valueFactory) where T : class
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|