Table of Contents

Class LazyInit

Namespace
ICSharpCode.Decompiler.Util
Assembly
ICSharpCode.Decompiler.dll
public static class LazyInit
Inheritance
LazyInit
Inherited Members

Methods

GetOrSet<T>(ref T?, T?)

Atomically performs the following operation:

  • If target is null: stores newValue in target and returns newValue.
  • If target is not null: returns target.
public static T? GetOrSet<T>(ref T? target, T? newValue) where T : class

Parameters

target T
newValue T

Returns

T

Type Parameters

T

VolatileRead<T>(ref T)

public static T VolatileRead<T>(ref T location) where T : class?

Parameters

location T

Returns

T

Type Parameters

T